diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 000000000..79f287a87 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,18 @@ +# Contributing + +Contributions to this project are [released](https://help.github.com/articles/github-terms-of-service/#6-contributions-under-repository-license) to the public under the [project's open source license](LICENSE). + +This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to uphold this. + +**NOTE**: GitHub no longer accepts new services. If you'd like to integrate +your application or service with GitHub, you should use [webhooks][webhooks] which will `POST` a payload to your server for each event or request to join the [GitHub Marketplace][github-marketplace]. + +## Updating an existing service + +GitHub will only accept pull requests to existing services that implement bug fixes or security improvements. We no longer accept feature changes to existing services. + +All pull requests will be reviewed by multiple GitHub staff members before being merged. To allow ample time for review, testing and deployment, there may be a substantial delay between the pull request being created and the pull request being merged by GitHub's staff. + +[code-of-conduct]: http://todogroup.org/opencodeofconduct/#GitHub%20Services/opensource@github.com +[webhooks]: https://developer.github.com/webhooks/ +[github-marketplace]: https://github.com/marketplace diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..c3187f4db --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1 @@ +Please contact GitHub support instead of creating an issue: https://github.com/contact diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 000000000..9960d253b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1 @@ +Please note: GitHub will only accept pull requests to existing services that implement bug fixes or security improvements. We no longer accept feature changes to existing services. diff --git a/.gitignore b/.gitignore index 8f2e12405..cd770bf1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,22 @@ .DS_Store +.idea deploy.rb *~ +*.sw[po] +config/secrets.yml +config/services.json +/bin +vendor/gems +.bundle +docs/payload_data +.rvmrc +.project +.settings +.buildpath +log +tmp +pkg +.iml +Gemfile.lock + +github-services*.gem diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..197c4d5c2 --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.4.0 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..4d14cdc45 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,6 @@ +language: ruby +rvm: + - 2.4.0 +install: script/bootstrap +script: bundle exec rake test +sudo: false diff --git a/CONTRIBUTORS b/CONTRIBUTORS deleted file mode 100644 index daad3ef1e..000000000 --- a/CONTRIBUTORS +++ /dev/null @@ -1,29 +0,0 @@ -Thanks to the following people for making this possible -------------------------------------------------------- - -- Arun Thampi -- Blake Mizerany -- Brandon Keepers -- Bryan Drewery -- Chris Shoemaker -- Christian Neukirchen -- Dav Glass -- El Draper -- Eric Lindvall -- Florian Frank -- Hans Engel -- Harry Vangberg -- John Nunemaker -- John Reilly -- Jorge Bernal -- Luke Redpath -- Matt Polito -- Michael Bleigh -- Nick Gerakines -- Noah (ngage) -- Sanko Robinson -- Sean O'Brien -- Tekkub Stoutwrithe -- W. Andrew Loe III -- Grant Limberg -- Jess Martin diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..d6e2e3d0d --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source "https://rubygems.org" + +gemspec + +gem "rake", "10.0.3" +gem "minitest", :require => nil diff --git a/README.md b/README.md new file mode 100644 index 000000000..e6e708a00 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +**_GitHub Services has been deprecated_. No more contributions will be accepted. Please see our [blog post](https://developer.github.com/changes/2018-04-25-github-services-deprecation/) for more information.** + +🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 + +GitHub Services +=============== + +This repository contains code to integrate GitHub.com with third party services. + +See the [Contributing Guidelines](https://github.com/github/github-services/blob/master/.github/CONTRIBUTING.md) for instructions on contributing a service. + +Current Status +============== + +Please note: GitHub will only accept pull requests to existing services that implement bug fixes or security improvements. We no longer accept feature changes to existing services. + +[![Build Status](https://travis-ci.org/github/github-services.svg?branch=master)](https://travis-ci.org/github/github-services) diff --git a/README.mkdn b/README.mkdn deleted file mode 100644 index f984e8e35..000000000 --- a/README.mkdn +++ /dev/null @@ -1,61 +0,0 @@ -GitHub Services -=============== - -How the services work ---------------------- - -1. A post-receive background job is submitted when someone pushes their - commits to GitHub -2. If the repository the commits belong to has any "Service Hooks" setup, the - job makes a request to `http://services-server/service_name/` with the - following data: - - `params[:payload]` containing all of the commit data (the same data you get using the API) - - `params[:data]` containing the service data (username, password, room, etc) -3. Sinatra (github-services.rb) processes the request (twitters your data, says - something in campfire, posts it to lighthouse, etc) -4. Rinse and repeat - -Steps to contributing ---------------------- - -1. Fork the project -2. Create a new file in /services/ called `service_name.rb`, using the following - template: - - service :service_name do |data, payload| - end - -3. Vendor any external gems your code relies on, and make sure to include it in - the requires at the top of github-services.rb -4. Add documentation to `docs/service_name` (refer to the others for guidance) -5. Add your name to the `CONTRIBUTORS` file -6. Create an Issue at http://github.com/pjhyett/github-services/issues with - links to each commit you want included. -7. Once it's accepted we'll add any new necessary data fields to the GitHub - front-end so people can start using your addition. - -*Patches including tests are encouraged* - -Running the server locally --------------------------- - -1. [sudo] gem install hpricot -2. git clone git://github.com/pjhyett/github-services.git -3. cd github-services -4. ruby github-services.rb - -* Bugs in the code should be filed under the Issues tab -* Problems with the service hooks can be filed here: [http://support.github.com/discussions/post-receive-issues](http://support.github.com/discussions/post-receive-issues) - -How to test your service ------------------------- - -1. Start the github-services Sinatra server with `ruby github-services.rb`. By - default, it runs on port 8080. -2. Edit the doc/github_payload file as necessary to test your service. (Usually - just editing the "data" values but leaving the "payload" alone.) -3. Send the doc/github_payload file to your service by calling: - `./script/deliver_payload [service-name]` - -NOTE: The name of the service and your docs/ file matters. If your service is RunCodeRun, your service -and docs MUST be `run_code_run`. Good luck! diff --git a/Rakefile b/Rakefile index ad531da80..fb95d85ea 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,68 @@ -require 'spec/rake/spectask' - -Spec::Rake::SpecTask.new('spec') do |t| - t.spec_opts = ['--options', "spec/spec.opts"] - t.spec_files = FileList['spec/**/*_spec.rb'] +require 'rubygems' +require 'bundler/setup' +require 'rake/testtask' +Rake::TestTask.new(:test) do |test| + test.libs << 'lib' << 'test' + test.pattern = 'test/**/*_test.rb' + test.verbose = true end -task :default => :spec +namespace :services do + task :load do + require File.expand_path("../config/load", __FILE__) + end + + desc "Writes JSON config to FILE || config/services.json, Docs to DOCS" + task :build => [:config, :docs] + + desc "Writes a JSON config to FILE || config/services.json" + task :config => :load do + sha = `git rev-parse HEAD`.chomp + file = ENV["FILE"] || default_services_config + services = [] + Service.load_services + Service.services.each do |svc| + services << {:name => svc.hook_name, :events => svc.default_events, :supported_events => svc.supported_events, + :title => svc.title, :schema => svc.schema} + end + services.sort! { |x, y| x[:name] <=> y[:name] } + data = { + :metadata => { :generated_at => Time.now.utc, :sha => sha }, + :services => services + } + puts "Writing config to #{file}" + File.open file, 'w' do |io| + io << Yajl.dump(data, :pretty => true) + end + end + + desc "Writes Docs to DOCS" + task :docs => :load do + dir = ENV['DOCS'] || default_docs_dir + docs = Dir[File.expand_path("../docs/*", __FILE__)] + docs.each do |path| + name = File.basename(path) + next if GitHubDocs.include?(name) + new_name = dir.include?('{name}') ? dir.sub('{name}', name) : File.join(dir, name) + new_dir = File.dirname(new_name) + FileUtils.mkdir_p(new_dir) + puts "COPY #{path} => #{new_name}" + FileUtils.cp(path, new_name) + end + end + + require 'set' + GitHubDocs = Set.new(%w(github_payload payload_data)) + + def base_github_path + ENV['GH_PATH'] || "#{ENV['HOME']}/github/github" + end + + def default_services_config + "#{base_github_path}/config/services.json" + end + + def default_docs_dir + "#{base_github_path}/app/views/edit_repositories/hooks/_{name}.erb" + end +end diff --git a/config/cacert.pem b/config/cacert.pem new file mode 100644 index 000000000..06dbdb279 --- /dev/null +++ b/config/cacert.pem @@ -0,0 +1,4026 @@ +## +## ca-bundle.crt -- Bundle of CA Root Certificates +## +## Certificate data from Mozilla as of: Wed Apr 13 08:13:21 2011 +## +## This is a bundle of X.509 certificates of public Certificate Authorities +## (CA). These were automatically extracted from Mozilla's root certificates +## file (certdata.txt). This file can be found in the mozilla source tree: +## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 +## +## It contains the certificates in PEM format and therefore +## can be directly used with curl / libcurl / php_curl, or with +## an Apache+mod_ssl webserver for SSL client authentication. +## Just configure this file as the SSLCACertificateFile. +## + +# ***** BEGIN LICENSE BLOCK ***** +# Version: MPL 1.1/GPL 2.0/LGPL 2.1 +# +# The contents of this file are subject to the Mozilla Public License Version +# 1.1 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" basis, +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +# for the specific language governing rights and limitations under the +# License. +# +# The Original Code is the Netscape security libraries. +# +# The Initial Developer of the Original Code is +# Netscape Communications Corporation. +# Portions created by the Initial Developer are Copyright (C) 1994-2000 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# +# Alternatively, the contents of this file may be used under the terms of +# either the GNU General Public License Version 2 or later (the "GPL"), or +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +# in which case the provisions of the GPL or the LGPL are applicable instead +# of those above. If you wish to allow use of your version of this file only +# under the terms of either the GPL or the LGPL, and not to allow others to +# use your version of this file under the terms of the MPL, indicate your +# decision by deleting the provisions above and replace them with the notice +# and other provisions required by the GPL or the LGPL. If you do not delete +# the provisions above, a recipient may use your version of this file under +# the terms of any one of the MPL, the GPL or the LGPL. +# +# ***** END LICENSE BLOCK ***** +# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.74 $ $Date: 2011/04/13 00:10:24 $ + +GTE CyberTrust Global Root +========================== +-----BEGIN CERTIFICATE----- +MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg +Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG +A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz +MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL +Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0 +IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u +sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql +HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID +AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW +M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF +NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ +-----END CERTIFICATE----- + +Thawte Server CA +================ +-----BEGIN CERTIFICATE----- +MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE +AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j +b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV +BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u +c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG +A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 +ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl +/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 +1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR +MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J +GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ +GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= +-----END CERTIFICATE----- + +Thawte Premium Server CA +======================== +-----BEGIN CERTIFICATE----- +MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT +DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs +dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE +AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl +ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT +AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU +VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2 +aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZ +cHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2 +aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIh +Udib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/ +qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAm +SCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf +8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t +UCemDaYj+bvLpgcUQg== +-----END CERTIFICATE----- + +Equifax Secure CA +================= +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIENd70zzANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEQMA4GA1UE +ChMHRXF1aWZheDEtMCsGA1UECxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +MB4XDTk4MDgyMjE2NDE1MVoXDTE4MDgyMjE2NDE1MVowTjELMAkGA1UEBhMCVVMxEDAOBgNVBAoT +B0VxdWlmYXgxLTArBgNVBAsTJEVxdWlmYXggU2VjdXJlIENlcnRpZmljYXRlIEF1dGhvcml0eTCB +nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwV2xWGcIYu6gmi0fCG2RFGiYCh7+2gRvE4RiIcPR +fM6fBeC4AfBONOziipUEZKzxa1NfBbPLZ4C/QgKO/t0BCezhABRP/PvwDN1Dulsr4R+AcJkVV5MW +8Q+XarfCaCMczE1ZMKxRHjuvK9buY0V7xdlfUNLjUA86iOe/FP3gx7kCAwEAAaOCAQkwggEFMHAG +A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEQMA4GA1UEChMHRXF1aWZheDEtMCsGA1UE +CxMkRXF1aWZheCBTZWN1cmUgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMBoG +A1UdEAQTMBGBDzIwMTgwODIyMTY0MTUxWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUSOZo+SvS +spXXR9gjIBBPM5iQn9QwHQYDVR0OBBYEFEjmaPkr0rKV10fYIyAQTzOYkJ/UMAwGA1UdEwQFMAMB +Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAFjOKer89961 +zgK5F7WF0bnj4JXMJTENAKaSbn+2kmOeUJXRmm/kEd5jhW6Y7qj/WsjTVbJmcVfewCHrPSqnI0kB +BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 +70+sB3c4 +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 1 +======================================= +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE +ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy +MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs +IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE +NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i +o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo +BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 +dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw +IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY +MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM +BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB +ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq +kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4 +RbyhkwS7hp86W0N6w4pl +-----END CERTIFICATE----- + +Digital Signature Trust Co. Global CA 3 +======================================= +-----BEGIN CERTIFICATE----- +MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE +ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy +MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs +IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA +A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD +VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS +xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo +BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 +dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw +IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY +MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM +BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB +AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi +up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1 +mPnHfxsb1gYgAlihw6ID +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPTCCAaYCEQDNun9W8N/kvFT+IqyzcqpVMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMSBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBaFw0yODA4MDEyMzU5NTla +MF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3Mg +MSBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEF +AAOBjQAwgYkCgYEA5Rm/baNWYS2ZSHH2Z965jeu3noaACpEO+jglr0aIguVzqKCbJF0NH8xlbgyw +0FaEGIeaBpsQoXPftFg5a27B9hXVqKg/qhIGjTGsf7A01480Z4gJzRQR4k5FVmkfeAKA2txHkSm7 +NsljXMXg1y2He6G3MrB7MLoqLzGq7qNn2tsCAwEAATANBgkqhkiG9w0BAQIFAAOBgQBMP7iLxmjf +7kMzDl3ppssHhE16M/+SG/Q2rdiVIjZoEWx8QszznC7EBz8UsA9P/5CSdvnivErpj82ggAr3xSnx +giJduLHdgSOjeyUVRjB5FvjqBUuUfx3CHMjjt/QQQDwTw18fU+hI5Ia0e6E1sHslurjTjqs/OJ0A +NACY89FxlA== +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEC0b/EoXjaOR6+f/9YtFvgswDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAyIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAy +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQC2WoujDWojg4BrzzmH9CETMwZMJaLtVRKXxaeAufqDwSCg+i8VDXyhYGt+eSz6 +Bg86rvYbb7HS/y8oUl+DfUvEerf4Zh+AVPy3wo5ZShRXRtGak75BkQO7FYCTXOvnzAhsPz6zSvz/ +S2wj1VCCJkQZjiPDceoZJEcEnnW/yKYAHwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBAIobK/o5wXTX +XtgZZKJYSi034DNHD6zt96rbHuSLBlxgJ8pFUs4W7z8GZOeUaHxgMxURaa+dYo2jA1Rrpr7l7gUY +YAS/QoD90KioHgE796Ncr6Pc5iaAIzy4RHT3Cq5Ji2F4zCS/iIqnDupzGUH9TQPwiNHleI2lKk/2 +lw0Xd8rY +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA +TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah +WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf +Tqj/ZA1k +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgd +k4xWArzZbxpvUjZudVYKVdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIq +WpDBucSmFc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQIDAQAB +MA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0Jh9ZrbWB85a7FkCMM +XErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2uluIncrKTdcu1OofdPvAbT6shkdHvC +lUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68DzFc6PLZ +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h +cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp +Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 +c3QgTmV0d29yazAeFw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h +cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp +Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 +c3QgTmV0d29yazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjx +nNuX6Zr8wgQGE75fUsjMHiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRC +wiNPStjwDqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cCAwEA +ATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9jinb3/7aHmZuovCfTK +1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAXrXfMSTWqz9iP0b63GJZHc2pUIjRk +LbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnInjBJ7xUS0rg== +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO +FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 +lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB +MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT +1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD +Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 +-----END CERTIFICATE----- + +Verisign Class 4 Public Primary Certification Authority - G2 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDAjCCAmsCEDKIjprS9esTR/h/xCA3JfgwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgNCBQdWJsaWMgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln +biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz +dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC68OTP+cSuhVS5B1f5j8V/aBH4 +xBewRNzjMHPVKmIquNDMHO0oW369atyzkSTKQWI8/AIBvxwWMZQFl3Zuoq29YRdsTjCG8FE3KlDH +qGKB3FtKqsGgtG7rL+VXxbErQHDbWk2hjh+9Ax/YA9SPTJlxvOKCzFjomDqG04Y48wApHwIDAQAB +MA0GCSqGSIb3DQEBBQUAA4GBAIWMEsGnuVAVess+rLhDityq3RS6iYF+ATwjcSGIL4LcY/oCRaxF +WdcqWERbt5+BO5JoPeI3JPV7bI92NZYJqFmduc4jq3TWg/0ycyfYaT5DdPauxYma51N86Xv2S/PB +ZYPejYqcPIiNOVn8qj8ijaHBZlCBckztImRPT8qAkbYp +-----END CERTIFICATE----- + +GlobalSign Root CA +================== +-----BEGIN CERTIFICATE----- +MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx +GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds +b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV +BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD +VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa +DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc +THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb +Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP +c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX +gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV +HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF +AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj +Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG +j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH +hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC +X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A== +-----END CERTIFICATE----- + +GlobalSign Root CA - R2 +======================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6 +ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp +s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN +S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL +TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C +ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E +FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i +YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN +BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp +9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu +01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7 +9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7 +TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== +-----END CERTIFICATE----- + +ValiCert Class 1 VA +=================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIy +MjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIi +GQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCm +DuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwG +lN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkX +icnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nP +Orf1LXLI +-----END CERTIFICATE----- + +ValiCert Class 2 VA +=================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw +MTk1NFoXDTE5MDYyNjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDOOnHK5avIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVC +CSRrCl6zfN1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7Rf +ZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9vUJSZ +SWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTuIYEZoDJJKPTEjlbV +UjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8 +W9ViH0Pd +-----END CERTIFICATE----- + +RSA Root Certificate 1 +====================== +-----BEGIN CERTIFICATE----- +MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp +b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs +YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh +bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw +MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 +d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg +UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 +LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td +3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H +BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs +3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF +V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r +on+jjBXu +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAN2E1Lm0+afY8wR4nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/E +bRrsC+MO8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjVojYJ +rKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjbPG7PoBMAGrgnoeS+ +Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP26KbqxzcSXKMpHgLZ2x87tNcPVkeB +FQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vrn5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +q2aN17O6x5q25lXQBfGfMY1aqtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/N +y9Sn2WCVhDr4wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3 +ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrspSCAaWihT37h +a88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4E1Z5T21Q6huwtVexN2ZYI/Pc +D98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g== +-----END CERTIFICATE----- + +Verisign Class 2 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYTAlVT +MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y +azE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ug +b25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0 +aW9uIEF1dGhvcml0eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJ +BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 +c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y +aXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC +AQEArwoNwtUs22e5LeWUJ92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6 +tW8UvxDOJxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUYwZF7 +C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9okoqQHgiBVrKtaaNS +0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjNqWm6o+sdDZykIKbBoMXRRkwXbdKs +Zj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/ESrg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0 +JhU8wI1NQ0kdvekhktdmnLfexbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf +0xwLRtxyID+u7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU +sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RIsH/7NiXaldDx +JBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTPcjnhsUPgKM+351psE2tJs//j +GHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQCbfgZJoz5iudXukEhxKe9XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDMgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAMu6nFL8eB8aHm8bN3O9+MlrlBIwT/A2R/XQkQr1F8ilYcEWQE37imGQ5XYgwREGfassbqb1 +EUGO+i2tKmFZpGcmTNDovFJbcCAEWNF6yaRpvIMXZK0Fi7zQWM6NjPXr8EJJC52XJ2cybuGukxUc +cLwgTS8Y3pKI6GyFVxEa6X7jJhFUokWWVYPKMIno3Nij7SqAP395ZVc+FSBmCC+Vk7+qRy+oRpfw +EuL+wgorUeZ25rdGt+INpsyow0xZVYnm6FNcHOqd8GIWC6fJXwzw3sJ2zq/3avL6QaaiMxTJ5Xpj +055iN9WFZZ4O5lMkdBteHRJTW8cs54NJOxWuimi5V5cCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +ERSWwauSCPc/L8my/uRan2Te2yFPhpk0djZX3dAVL8WtfxUfN2JzPtTnX84XA9s1+ivbrmAJXx5f +j267Cz3qWhMeDGBvtcC1IyIuBwvLqXTLR7sdwdela8wv0kL9Sd2nic9TutoAWii/gt/4uhMdUIaC +/Y4wjylGsB49Ndo4YhYYSq3mtlFs3q9i6wHQHiT+eo8SGhJouPtmmRQURVyu565pF4ErWjfJXir0 +xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa +t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== +-----END CERTIFICATE----- + +Verisign Class 4 Public Primary Certification Authority - G3 +============================================================ +-----BEGIN CERTIFICATE----- +MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy +dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS +tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM +8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW +Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX +Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA +j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt +mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm +fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd +RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG +UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== +-----END CERTIFICATE----- + +Entrust.net Secure Server CA +============================ +-----BEGIN CERTIFICATE----- +MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV +BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg +cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl +ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv +cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIG +A1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBi +eSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1p +dGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQ +aO2f55M28Qpku0f1BBc/I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5 +gXpa0zf3wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OCAdcw +ggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHboIHYpIHVMIHSMQsw +CQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5l +dC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF +bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu +dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw +NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow +HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA +BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN +Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9 +n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= +-----END CERTIFICATE----- + +Entrust.net Premium 2048 Secure Server CA +========================================= +-----BEGIN CERTIFICATE----- +MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp +bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV +BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx +NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl +MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u +ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL +Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr +hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW +nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo3QwcjARBglghkgBhvhC +AQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGAvtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdER +gL7YibkIozH5oSQJFrlwMB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0B +AQUFAAOCAQEAWUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo +oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcS +o8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z +2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjX +OP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ== +-----END CERTIFICATE----- + +Baltimore CyberTrust Root +========================= +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UE +ChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3li +ZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMC +SUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFs +dGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKME +uyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsB +UnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/C +G9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9 +XbIGevOF6uvUA65ehD5f/xXtabz5OTZydc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjpr +l3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoI +VDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEB +BQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRh +cL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5 +hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsa +Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H +RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp +-----END CERTIFICATE----- + +Equifax Secure Global eBusiness CA +================================== +-----BEGIN CERTIFICATE----- +MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp +bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx +HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds +b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV +PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN +qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn +hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j +BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs +MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN +I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY +NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 1 +============================= +-----BEGIN CERTIFICATE----- +MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB +LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE +ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz +IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ +1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a +IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk +MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW +Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF +AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5 +lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+ +KpYrtWKmpj29f5JZzVoqgrI3eQ== +-----END CERTIFICATE----- + +Equifax Secure eBusiness CA 2 +============================= +-----BEGIN CERTIFICATE----- +MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEXMBUGA1UE +ChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0y +MB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoT +DkVxdWlmYXggU2VjdXJlMSYwJAYDVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCB +nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn +2Z0GvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/BPO3QSQ5 +BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0CAwEAAaOCAQkwggEFMHAG +A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUx +JjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoG +A1UdEAQTMBGBDzIwMTkwNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9e +uSBIplBqy/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQFMAMB +Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAAyGgq3oThr1 +jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia +78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm +V+GRMOrN +-----END CERTIFICATE----- + +AddTrust Low-Value Services Root +================================ +-----BEGIN CERTIFICATE----- +MIIEGDCCAwCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEwHwYDVQQDExhBZGRU +cnVzdCBDbGFzcyAxIENBIFJvb3QwHhcNMDAwNTMwMTAzODMxWhcNMjAwNTMwMTAzODMxWjBlMQsw +CQYDVQQGEwJTRTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBO +ZXR3b3JrMSEwHwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3QwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQCWltQhSWDia+hBBwzexODcEyPNwTXH+9ZOEQpnXvUGW2ulCDtbKRY6 +54eyNAbFvAWlA3yCyykQruGIgb3WntP+LVbBFc7jJp0VLhD7Bo8wBN6ntGO0/7Gcrjyvd7ZWxbWr +oulpOj0OM3kyP3CCkplhbY0wCI9xP6ZIVxn4JdxLZlyldI+Yrsj5wAYi56xz36Uu+1LcsRVlIPo1 +Zmne3yzxbrww2ywkEtvrNTVokMsAsJchPXQhI2U0K7t4WaPW4XY5mqRJjox0r26kmqPZm9I4XJui +GMx1I4S+6+JNM3GOGvDC+Mcdoq0Dlyz4zyXG9rgkMbFjXZJ/Y/AlyVMuH79NAgMBAAGjgdIwgc8w +HQYDVR0OBBYEFJWxtPCUtr3H2tERCSG+wa9J/RB7MAsGA1UdDwQEAwIBBjAPBgNVHRMBAf8EBTAD +AQH/MIGPBgNVHSMEgYcwgYSAFJWxtPCUtr3H2tERCSG+wa9J/RB7oWmkZzBlMQswCQYDVQQGEwJT +RTEUMBIGA1UEChMLQWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSEw +HwYDVQQDExhBZGRUcnVzdCBDbGFzcyAxIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBACxt +ZBsfzQ3duQH6lmM0MkhHma6X7f1yFqZzR1r0693p9db7RcwpiURdv0Y5PejuvE1Uhh4dbOMXJ0Ph +iVYrqW9yTkkz43J8KiOavD7/KCrto/8cI7pDVwlnTUtiBi34/2ydYB7YHEt9tTEv2dB8Xfjea4MY +eDdXL+gzB2ffHsdrKpV2ro9Xo/D0UrSpUwjP4E/TelOL/bscVjby/rK25Xa71SJlpz/+0WatC7xr +mYbvP33zGDLKe8bjq2RGlfgmadlVg3sslgf/WSxEo8bl6ancoWOAWiFeIc9TVPC6b4nbqKqVz4vj +ccweGyBECMB6tkD9xOQ14R0WHNC8K47Wcdk= +-----END CERTIFICATE----- + +AddTrust External Root +====================== +-----BEGIN CERTIFICATE----- +MIIENjCCAx6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBvMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxJjAkBgNVBAsTHUFkZFRydXN0IEV4dGVybmFsIFRUUCBOZXR3b3JrMSIwIAYD +VQQDExlBZGRUcnVzdCBFeHRlcm5hbCBDQSBSb290MB4XDTAwMDUzMDEwNDgzOFoXDTIwMDUzMDEw +NDgzOFowbzELMAkGA1UEBhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMSYwJAYDVQQLEx1BZGRU +cnVzdCBFeHRlcm5hbCBUVFAgTmV0d29yazEiMCAGA1UEAxMZQWRkVHJ1c3QgRXh0ZXJuYWwgQ0Eg +Um9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALf3GjPm8gAELTngTlvtH7xsD821 ++iO2zt6bETOXpClMfZOfvUq8k+0DGuOPz+VtUFrWlymUWoCwSXrbLpX9uMq/NzgtHj6RQa1wVsfw +Tz/oMp50ysiQVOnGXw94nZpAPA6sYapeFI+eh6FqUNzXmk6vBbOmcZSccbNQYArHE504B4YCqOmo +aSYYkKtMsE8jqzpPhNjfzp/haW+710LXa0Tkx63ubUFfclpxCDezeWWkWaCUN/cALw3CknLa0Dhy +2xSoRcRdKn23tNbE7qzNE0S3ySvdQwAl+mG5aWpYIxG3pzOPVnVZ9c0p10a3CitlttNCbxWyuHv7 +7+ldU9U0WicCAwEAAaOB3DCB2TAdBgNVHQ4EFgQUrb2YejS0Jvf6xCZU7wO94CTLVBowCwYDVR0P +BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wgZkGA1UdIwSBkTCBjoAUrb2YejS0Jvf6xCZU7wO94CTL +VBqhc6RxMG8xCzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEmMCQGA1UECxMdQWRk +VHJ1c3QgRXh0ZXJuYWwgVFRQIE5ldHdvcmsxIjAgBgNVBAMTGUFkZFRydXN0IEV4dGVybmFsIENB +IFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBALCb4IUlwtYj4g+WBpKdQZic2YR5gdkeWxQHIzZl +j7DYd7usQWxHYINRsPkyPef89iYTx4AWpb9a/IfPeHmJIZriTAcKhjW88t5RxNKWt9x+Tu5w/Rw5 +6wwCURQtjr0W4MHfRnXnJK3s9EK0hZNwEGe6nQY1ShjTK3rMUUKhemPR5ruhxSvCNr4TDea9Y355 +e6cJDUCrat2PisP29owaQgVR1EX1n6diIWgVIEM8med8vSTYqZEXc4g/VhsxOBi0cQ+azcgOno4u +G+GMmIPLHzHxREzGBHNJdmAPx/i9F4BrLunMTA5amnkPIAou1Z5jJh5VkpTYghdae9C8x49OhgQ= +-----END CERTIFICATE----- + +AddTrust Public Services Root +============================= +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIBATANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSAwHgYDVQQDExdBZGRU +cnVzdCBQdWJsaWMgQ0EgUm9vdDAeFw0wMDA1MzAxMDQxNTBaFw0yMDA1MzAxMDQxNTBaMGQxCzAJ +BgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQIE5l +dHdvcmsxIDAeBgNVBAMTF0FkZFRydXN0IFB1YmxpYyBDQSBSb290MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA6Rowj4OIFMEg2Dybjxt+A3S72mnTRqX4jsIMEZBRpS9mVEBV6tsfSlbu +nyNu9DnLoblv8n75XYcmYZ4c+OLspoH4IcUkzBEMP9smcnrHAZcHF/nXGCwwfQ56HmIexkvA/X1i +d9NEHif2P0tEs7c42TkfYNVRknMDtABp4/MUTu7R3AnPdzRGULD4EfL+OHn3Bzn+UZKXC1sIXzSG +Aa2Il+tmzV7R/9x98oTaunet3IAIx6eH1lWfl2royBFkuucZKT8Rs3iQhCBSWxHveNCD9tVIkNAw +HM+A+WD+eeSI8t0A65RF62WUaUC6wNW0uLp9BBGo6zEFlpROWCGOn9Bg/QIDAQABo4HRMIHOMB0G +A1UdDgQWBBSBPjfYkrAfd59ctKtzquf2NGAv+jALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zCBjgYDVR0jBIGGMIGDgBSBPjfYkrAfd59ctKtzquf2NGAv+qFopGYwZDELMAkGA1UEBhMCU0Ux +FDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29yazEgMB4G +A1UEAxMXQWRkVHJ1c3QgUHVibGljIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQADggEBAAP3FUr4 +JNojVhaTdt02KLmuG7jD8WS6IBh4lSknVwW8fCr0uVFV2ocC3g8WFzH4qnkuCRO7r7IgGRLlk/lL ++YPoRNWyQSW/iHVv/xD8SlTQX/D67zZzfRs2RcYhbbQVuE7PnFylPVoAjgbjPGsye/Kf8Lb93/Ao +GEjwxrzQvzSAlsJKsW2Ox5BF3i9nrEUEo3rcVZLJR2bYGozH7ZxOmuASu7VqTITh4SINhwBk/ox9 +Yjllpu9CtoAlEmEBqCQTcAARJl/6NVDFSMwGR+gn2HCNX2TmoUQmXiLsks3/QppEIW1cxeMiHV9H +EufOX1362KqxMy3ZdvJOOjMMK7MtkAY= +-----END CERTIFICATE----- + +AddTrust Qualified Certificates Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEHjCCAwagAwIBAgIBATANBgkqhkiG9w0BAQUFADBnMQswCQYDVQQGEwJTRTEUMBIGA1UEChML +QWRkVHJ1c3QgQUIxHTAbBgNVBAsTFEFkZFRydXN0IFRUUCBOZXR3b3JrMSMwIQYDVQQDExpBZGRU +cnVzdCBRdWFsaWZpZWQgQ0EgUm9vdDAeFw0wMDA1MzAxMDQ0NTBaFw0yMDA1MzAxMDQ0NTBaMGcx +CzAJBgNVBAYTAlNFMRQwEgYDVQQKEwtBZGRUcnVzdCBBQjEdMBsGA1UECxMUQWRkVHJ1c3QgVFRQ +IE5ldHdvcmsxIzAhBgNVBAMTGkFkZFRydXN0IFF1YWxpZmllZCBDQSBSb290MIIBIjANBgkqhkiG +9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5B6a/twJWoekn0e+EV+vhDTbYjx5eLfpMLXsDBwqxBb/4Oxx +64r1EW7tTw2R0hIYLUkVAcKkIhPHEWT/IhKauY5cLwjPcWqzZwFZ8V1G87B4pfYOQnrjfxvM0PC3 +KP0q6p6zsLkEqv32x7SxuCqg+1jxGaBvcCV+PmlKfw8i2O+tCBGaKZnhqkRFmhJePp1tUvznoD1o +L/BLcHwTOK28FSXx1s6rosAx1i+f4P8UWfyEk9mHfExUE+uf0S0R+Bg6Ot4l2ffTQO2kBhLEO+GR +wVY18BTcZTYJbqukB8c10cIDMzZbdSZtQvESa0NvS3GU+jQd7RNuyoB/mC9suWXY6QIDAQABo4HU +MIHRMB0GA1UdDgQWBBQ5lYtii1zJ1IC6WA+XPxUIQ8yYpzALBgNVHQ8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zCBkQYDVR0jBIGJMIGGgBQ5lYtii1zJ1IC6WA+XPxUIQ8yYp6FrpGkwZzELMAkGA1UE +BhMCU0UxFDASBgNVBAoTC0FkZFRydXN0IEFCMR0wGwYDVQQLExRBZGRUcnVzdCBUVFAgTmV0d29y +azEjMCEGA1UEAxMaQWRkVHJ1c3QgUXVhbGlmaWVkIENBIFJvb3SCAQEwDQYJKoZIhvcNAQEFBQAD +ggEBABmrder4i2VhlRO6aQTvhsoToMeqT2QbPxj2qC0sVY8FtzDqQmodwCVRLae/DLPt7wh/bDxG +GuoYQ992zPlmhpwsaPXpF/gxsxjE1kh9I0xowX67ARRvxdlu3rsEQmr49lx95dr6h+sNNVJn0J6X +dgWTP5XHAeZpVTh/EGGZyeNfpso+gmNIquIISD6q8rKFYqa0p9m9N5xotS1WfbC3P6CxB9bpT9ze +RXEwMn8bLgn5v1Kh7sKAPgZcLlVAwRv1cEWw3F369nJad9Jjzc9YiQBCYz95OdBEsIJuQRno3eDB +iFrRHnGTHyQwdOUeqN48Jzd/g66ed8/wMLH/S5noxqE= +-----END CERTIFICATE----- + +Entrust Root Certification Authority +==================================== +-----BEGIN CERTIFICATE----- +MIIEkTCCA3mgAwIBAgIERWtQVDANBgkqhkiG9w0BAQUFADCBsDELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xOTA3BgNVBAsTMHd3dy5lbnRydXN0Lm5ldC9DUFMgaXMgaW5jb3Jw +b3JhdGVkIGJ5IHJlZmVyZW5jZTEfMB0GA1UECxMWKGMpIDIwMDYgRW50cnVzdCwgSW5jLjEtMCsG +A1UEAxMkRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA2MTEyNzIwMjM0 +MloXDTI2MTEyNzIwNTM0MlowgbAxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1FbnRydXN0LCBJbmMu +MTkwNwYDVQQLEzB3d3cuZW50cnVzdC5uZXQvQ1BTIGlzIGluY29ycG9yYXRlZCBieSByZWZlcmVu +Y2UxHzAdBgNVBAsTFihjKSAyMDA2IEVudHJ1c3QsIEluYy4xLTArBgNVBAMTJEVudHJ1c3QgUm9v +dCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +ALaVtkNC+sZtKm9I35RMOVcF7sN5EUFoNu3s/poBj6E4KPz3EEZmLk0eGrEaTsbRwJWIsMn/MYsz +A9u3g3s+IIRe7bJWKKf44LlAcTfFy0cOlypowCKVYhXbR9n10Cv/gkvJrT7eTNuQgFA/CYqEAOww +Cj0Yzfv9KlmaI5UXLEWeH25DeW0MXJj+SKfFI0dcXv1u5x609mhF0YaDW6KKjbHjKYD+JXGIrb68 +j6xSlkuqUY3kEzEZ6E5Nn9uss2rVvDlUccp6en+Q3X0dgNmBu1kmwhH+5pPi94DkZfs0Nw4pgHBN +rziGLp5/V6+eF67rHMsoIV+2HNjnogQi+dPa2MsCAwEAAaOBsDCBrTAOBgNVHQ8BAf8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zArBgNVHRAEJDAigA8yMDA2MTEyNzIwMjM0MlqBDzIwMjYxMTI3MjA1 +MzQyWjAfBgNVHSMEGDAWgBRokORnpKZTgMeGZqTx90tD+4S9bTAdBgNVHQ4EFgQUaJDkZ6SmU4DH +hmak8fdLQ/uEvW0wHQYJKoZIhvZ9B0EABBAwDhsIVjcuMTo0LjADAgSQMA0GCSqGSIb3DQEBBQUA +A4IBAQCT1DCw1wMgKtD5Y+iRDAUgqV8ZyntyTtSx29CW+1RaGSwMCPeyvIWonX9tO1KzKtvn1ISM +Y/YPyyYBkVBs9F8U4pN0wBOeMDpQ47RgxRzwIkSNcUesyBrJ6ZuaAGAT/3B+XxFNSRuzFVJ7yVTa +v52Vr2ua2J7p8eRDjeIRRDq/r72DQnNSi6q7pynP9WQcCk3RvKqsnyrQ/39/2n3qse0wJcGE2jTS +W3iDVuycNsMm4hH2Z0kdkquM++v/eu6FSqdQgPCnXEqULl8FmTxSQeDNtGPPAUO6nIPcj2A781q0 +tHuu2guQOHXvgR1m0vdXcDazv/wor3ElhVsT/h5/WrQ8 +-----END CERTIFICATE----- + +RSA Security 2048 v3 +==================== +-----BEGIN CERTIFICATE----- +MIIDYTCCAkmgAwIBAgIQCgEBAQAAAnwAAAAKAAAAAjANBgkqhkiG9w0BAQUFADA6MRkwFwYDVQQK +ExBSU0EgU2VjdXJpdHkgSW5jMR0wGwYDVQQLExRSU0EgU2VjdXJpdHkgMjA0OCBWMzAeFw0wMTAy +MjIyMDM5MjNaFw0yNjAyMjIyMDM5MjNaMDoxGTAXBgNVBAoTEFJTQSBTZWN1cml0eSBJbmMxHTAb +BgNVBAsTFFJTQSBTZWN1cml0eSAyMDQ4IFYzMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC +AQEAt49VcdKA3XtpeafwGFAyPGJn9gqVB93mG/Oe2dJBVGutn3y+Gc37RqtBaB4Y6lXIL5F4iSj7 +Jylg/9+PjDvJSZu1pJTOAeo+tWN7fyb9Gd3AIb2E0S1PRsNO3Ng3OTsor8udGuorryGlwSMiuLgb +WhOHV4PR8CDn6E8jQrAApX2J6elhc5SYcSa8LWrg903w8bYqODGBDSnhAMFRD0xS+ARaqn1y07iH +KrtjEAMqs6FPDVpeRrc9DvV07Jmf+T0kgYim3WBU6JU2PcYJk5qjEoAAVZkZR73QpXzDuvsf9/UP ++Ky5tfQ3mBMY3oVbtwyCO4dvlTlYMNpuAWgXIszACwIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/ +MA4GA1UdDwEB/wQEAwIBBjAfBgNVHSMEGDAWgBQHw1EwpKrpRa41JPr/JCwz0LGdjDAdBgNVHQ4E +FgQUB8NRMKSq6UWuNST6/yQsM9CxnYwwDQYJKoZIhvcNAQEFBQADggEBAF8+hnZuuDU8TjYcHnmY +v/3VEhF5Ug7uMYm83X/50cYVIeiKAVQNOvtUudZj1LGqlk2iQk3UUx+LEN5/Zb5gEydxiKRz44Rj +0aRV4VCT5hsOedBnvEbIvz8XDZXmxpBp3ue0L96VfdASPz0+f00/FGj1EVDVwfSQpQgdMWD/YIwj +VAqv/qFuxdF6Kmh4zx6CCiC0H63lhbJqaHVOrSU3lIW+vaHU6rcMSzyd6BIA8F+sDeGscGNz9395 +nzIlQnQFgCi/vcEkllgVsRch6YlL2weIZ/QVrXA+L02FO8K32/6YaCOJ4XQP3vTFhGMpG8zLB8kA +pKnXwiJPZ9d37CAFYd4= +-----END CERTIFICATE----- + +GeoTrust Global CA +================== +-----BEGIN CERTIFICATE----- +MIIDVDCCAjygAwIBAgIDAjRWMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNVBAYTAlVTMRYwFAYDVQQK +Ew1HZW9UcnVzdCBJbmMuMRswGQYDVQQDExJHZW9UcnVzdCBHbG9iYWwgQ0EwHhcNMDIwNTIxMDQw +MDAwWhcNMjIwNTIxMDQwMDAwWjBCMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEbMBkGA1UEAxMSR2VvVHJ1c3QgR2xvYmFsIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEA2swYYzD99BcjGlZ+W988bDjkcbd4kdS8odhM+KhDtgPpTSEHCIjaWC9mOSm9BXiLnTjo +BbdqfnGk5sRgprDvgOSJKA+eJdbtg/OtppHHmMlCGDUUna2YRpIuT8rxh0PBFpVXLVDviS2Aelet +8u5fa9IAjbkU+BQVNdnARqN7csiRv8lVK83Qlz6cJmTM386DGXHKTubU1XupGc1V3sjs0l44U+Vc +T4wt/lAjNvxm5suOpDkZALeVAjmRCw7+OC7RHQWa9k0+bw8HHa8sHo9gOeL6NlMTOdReJivbPagU +vTLrGAMoUgRx5aszPeE4uwc2hGKceeoWMPRfwCvocWvk+QIDAQABo1MwUTAPBgNVHRMBAf8EBTAD +AQH/MB0GA1UdDgQWBBTAephojYn7qwVkDBF9qn1luMrMTjAfBgNVHSMEGDAWgBTAephojYn7qwVk +DBF9qn1luMrMTjANBgkqhkiG9w0BAQUFAAOCAQEANeMpauUvXVSOKVCUn5kaFOSPeCpilKInZ57Q +zxpeR+nBsqTP3UEaBU6bS+5Kb1VSsyShNwrrZHYqLizz/Tt1kL/6cdjHPTfStQWVYrmm3ok9Nns4 +d0iXrKYgjy6myQzCsplFAMfOEVEiIuCl6rYVSAlk6l5PdPcFPseKUgzbFbS9bZvlxrFUaKnjaZC2 +mqUPuLk/IH2uSrW4nOQdtqvmlKXBx4Ot2/Unhw4EbNX/3aBd7YdStysVAq45pmp06drE57xNNB6p +XE0zX5IJL4hmXXeXxx12E6nV5fEWCRE11azbJHFwLJhWC9kXtNHjUStedejV0NxPNO3CBWaAocvm +Mw== +-----END CERTIFICATE----- + +GeoTrust Global CA 2 +==================== +-----BEGIN CERTIFICATE----- +MIIDZjCCAk6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwHhcNMDQwMzA0MDUw +MDAwWhcNMTkwMzA0MDUwMDAwWjBEMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5j +LjEdMBsGA1UEAxMUR2VvVHJ1c3QgR2xvYmFsIENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDvPE1APRDfO1MA4Wf+lGAVPoWI8YkNkMgoI5kF6CsgncbzYEbYwbLVjDHZ3CB5JIG/ +NTL8Y2nbsSpr7iFY8gjpeMtvy/wWUsiRxP89c96xPqfCfWbB9X5SJBri1WeR0IIQ13hLTytCOb1k +LUCgsBDTOEhGiKEMuzozKmKY+wCdE1l/bztyqu6mD4b5BWHqZ38MN5aL5mkWRxHCJ1kDs6ZgwiFA +Vvqgx306E+PsV8ez1q6diYD3Aecs9pYrEw15LNnA5IZ7S4wMcoKK+xfNAGw6EzywhIdLFnopsk/b +HdQL82Y3vdj2V7teJHq4PIu5+pIaGoSe2HSPqht/XvT+RSIhAgMBAAGjYzBhMA8GA1UdEwEB/wQF +MAMBAf8wHQYDVR0OBBYEFHE4NvICMVNHK266ZUapEBVYIAUJMB8GA1UdIwQYMBaAFHE4NvICMVNH +K266ZUapEBVYIAUJMA4GA1UdDwEB/wQEAwIBhjANBgkqhkiG9w0BAQUFAAOCAQEAA/e1K6tdEPx7 +srJerJsOflN4WT5CBP51o62sgU7XAotexC3IUnbHLB/8gTKY0UvGkpMzNTEv/NgdRN3ggX+d6Yvh +ZJFiCzkIjKx0nVnZellSlxG5FntvRdOW2TF9AjYPnDtuzywNA0ZF66D0f0hExghAzN4bcLUprbqL +OzRldRtxIR0sFAqwlpW41uryZfspuk/qkZN0abby/+Ea0AzRdoXLiiW9l14sbxWZJue2Kf8i7MkC +x1YAzUm5s2x7UwQa4qjJqhIFI8LO57sEAszAR6LkxCkvW0VXiVHuPOtSCP8HNR6fNWpHSlaY0VqF +H4z1Ir+rzoPz4iIprn2DQKi6bA== +-----END CERTIFICATE----- + +GeoTrust Universal CA +===================== +-----BEGIN CERTIFICATE----- +MIIFaDCCA1CgAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEeMBwGA1UEAxMVR2VvVHJ1c3QgVW5pdmVyc2FsIENBMB4XDTA0MDMwNDA1 +MDAwMFoXDTI5MDMwNDA1MDAwMFowRTELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IElu +Yy4xHjAcBgNVBAMTFUdlb1RydXN0IFVuaXZlcnNhbCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIP +ADCCAgoCggIBAKYVVaCjxuAfjJ0hUNfBvitbtaSeodlyWL0AG0y/YckUHUWCq8YdgNY96xCcOq9t +JPi8cQGeBvV8Xx7BDlXKg5pZMK4ZyzBIle0iN430SppyZj6tlcDgFgDgEB8rMQ7XlFTTQjOgNB0e +RXbdT8oYN+yFFXoZCPzVx5zw8qkuEKmS5j1YPakWaDwvdSEYfyh3peFhF7em6fgemdtzbvQKoiFs +7tqqhZJmr/Z6a4LauiIINQ/PQvE1+mrufislzDoR5G2vc7J2Ha3QsnhnGqQ5HFELZ1aD/ThdDc7d +8Lsrlh/eezJS/R27tQahsiFepdaVaH/wmZ7cRQg+59IJDTWU3YBOU5fXtQlEIGQWFwMCTFMNaN7V +qnJNk22CDtucvc+081xdVHppCZbW2xHBjXWotM85yM48vCR85mLK4b19p71XZQvk/iXttmkQ3Cga +Rr0BHdCXteGYO8A3ZNY9lO4L4fUorgtWv3GLIylBjobFS1J72HGrH4oVpjuDWtdYAVHGTEHZf9hB +Z3KiKN9gg6meyHv8U3NyWfWTehd2Ds735VzZC1U0oqpbtWpU5xPKV+yXbfReBi9Fi1jUIxaS5BZu +KGNZMN9QAZxjiRqf2xeUgnA3wySemkfWWspOqGmJch+RbNt+nhutxx9z3SxPGWX9f5NAEC7S8O08 +ni4oPmkmM8V7AgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNq7LqqwDLiIJlF0 +XG0D08DYj3rWMB8GA1UdIwQYMBaAFNq7LqqwDLiIJlF0XG0D08DYj3rWMA4GA1UdDwEB/wQEAwIB +hjANBgkqhkiG9w0BAQUFAAOCAgEAMXjmx7XfuJRAyXHEqDXsRh3ChfMoWIawC/yOsjmPRFWrZIRc +aanQmjg8+uUfNeVE44B5lGiku8SfPeE0zTBGi1QrlaXv9z+ZhP015s8xxtxqv6fXIwjhmF7DWgh2 +qaavdy+3YL1ERmrvl/9zlcGO6JP7/TG37FcREUWbMPEaiDnBTzynANXH/KttgCJwpQzgXQQpAvvL +oJHRfNbDflDVnVi+QTjruXU8FdmbyUqDWcDaU/0zuzYYm4UPFd3uLax2k7nZAY1IEKj79TiG8dsK +xr2EoyNB3tZ3b4XUhRxQ4K5RirqNPnbiucon8l+f725ZDQbYKxek0nxru18UGkiPGkzns0ccjkxF +KyDuSN/n3QmOGKjaQI2SJhFTYXNd673nxE0pN2HrrDktZy4W1vUAg4WhzH92xH3kt0tm7wNFYGm2 +DFKWkoRepqO1pD4r2czYG0eq8kTaT/kD6PAUyz/zg97QwVTjt+gKN02LIFkDMBmhLMi9ER/frslK +xfMnZmaGrGiR/9nmUxwPi1xpZQomyB40w11Re9epnAahNt3ViZS82eQtDF4JbAiXfKM9fJP/P6EU +p8+1Xevb2xzEdt+Iub1FBZUbrvxGakyvSOPOrg/SfuvmbJxPgWp6ZKy7PtXny3YuxadIwVyQD8vI +P/rmMuGNG2+k5o7Y+SlIis5z/iw= +-----END CERTIFICATE----- + +GeoTrust Universal CA 2 +======================= +-----BEGIN CERTIFICATE----- +MIIFbDCCA1SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMN +R2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwHhcNMDQwMzA0 +MDUwMDAwWhcNMjkwMzA0MDUwMDAwWjBHMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3Qg +SW5jLjEgMB4GA1UEAxMXR2VvVHJ1c3QgVW5pdmVyc2FsIENBIDIwggIiMA0GCSqGSIb3DQEBAQUA +A4ICDwAwggIKAoICAQCzVFLByT7y2dyxUxpZKeexw0Uo5dfR7cXFS6GqdHtXr0om/Nj1XqduGdt0 +DE81WzILAePb63p3NeqqWuDW6KFXlPCQo3RWlEQwAx5cTiuFJnSCegx2oG9NzkEtoBUGFF+3Qs17 +j1hhNNwqCPkuwwGmIkQcTAeC5lvO0Ep8BNMZcyfwqph/Lq9O64ceJHdqXbboW0W63MOhBW9Wjo8Q +JqVJwy7XQYci4E+GymC16qFjwAGXEHm9ADwSbSsVsaxLse4YuU6W3Nx2/zu+z18DwPw76L5GG//a +QMJS9/7jOvdqdzXQ2o3rXhhqMcceujwbKNZrVMaqW9eiLBsZzKIC9ptZvTdrhrVtgrrY6slWvKk2 +WP0+GfPtDCapkzj4T8FdIgbQl+rhrcZV4IErKIM6+vR7IVEAvlI4zs1meaj0gVbi0IMJR1FbUGrP +20gaXT73y/Zl92zxlfgCOzJWgjl6W70viRu/obTo/3+NjN8D8WBOWBFM66M/ECuDmgFz2ZRthAAn +ZqzwcEAJQpKtT5MNYQlRJNiS1QuUYbKHsu3/mjX/hVTK7URDrBs8FmtISgocQIgfksILAAX/8sgC +SqSqqcyZlpwvWOB94b67B9xfBHJcMTTD7F8t4D1kkCLm0ey4Lt1ZrtmhN79UNdxzMk+MBB4zsslG +8dhcyFVQyWi9qLo2CQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBR281Xh+qQ2 ++/CfXGJx7Tz0RzgQKzAfBgNVHSMEGDAWgBR281Xh+qQ2+/CfXGJx7Tz0RzgQKzAOBgNVHQ8BAf8E +BAMCAYYwDQYJKoZIhvcNAQEFBQADggIBAGbBxiPz2eAubl/oz66wsCVNK/g7WJtAJDday6sWSf+z +dXkzoS9tcBc0kf5nfo/sm+VegqlVHy/c1FEHEv6sFj4sNcZj/NwQ6w2jqtB8zNHQL1EuxBRa3ugZ +4T7GzKQp5y6EqgYweHZUcyiYWTjgAA1i00J9IZ+uPTqM1fp3DRgrFg5fNuH8KrUwJM/gYwx7WBr+ +mbpCErGR9Hxo4sjoryzqyX6uuyo9DRXcNJW2GHSoag/HtPQTxORb7QrSpJdMKu0vbBKJPfEncKpq +A1Ihn0CoZ1Dy81of398j9tx4TuaYT1U6U+Pv8vSfx3zYWK8pIpe44L2RLrB27FcRz+8pRPPphXpg +Y+RdM4kX2TGq2tbzGDVyz4crL2MjhF2EjD9XoIj8mZEoJmmZ1I+XRL6O1UixpCgp8RW04eWe3fiP +pm8m1wk8OhwRDqZsN/etRIcsKMfYdIKz0G9KV7s1KSegi+ghp4dkNl3M2Basx7InQJJVOCiNUW7d +FGdTbHFcJoRNdVq2fmBWqU2t+5sel/MN2dKXVHfaPRK34B7vCAas+YWH6aLcr34YEoP9VhdBLtUp +gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm +X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS +-----END CERTIFICATE----- + +UTN-USER First-Network Applications +=================================== +-----BEGIN CERTIFICATE----- +MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCBozELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzAp +BgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5 +WhcNMTkwNzA5MTg1NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5T +YWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho +dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBB +cHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCz+5Gh5DZVhawGNFug +mliy+LUPBXeDrjKxdpJo7CNKyXY/45y2N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4Cj +DUeJT1FxL+78P/m4FoCHiZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXu +Ozr0hAReYFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1axwi +P8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6gyN7igEL66S/ozjIE +j3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8w +HQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPhahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9j +cmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0G +CSqGSIb3DQEBBQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y +IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6LzsQCv4AdRWOOTK +RIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4ZSfP1FMa8Kxun08FDAOBp4Qp +xFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qMYEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAq +DbUMo2s/rn9X9R+WfN9v3YIwLGUbQErNaLly7HF27FSOH4UMAWr6pjisH8SE +-----END CERTIFICATE----- + +America Online Root Certification Authority 1 +============================================= +-----BEGIN CERTIFICATE----- +MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG +v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z +DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh +sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP +8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T +AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z +o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf +GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF +VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft +3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g +Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds +sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 +-----END CERTIFICATE----- + +America Online Root Certification Authority 2 +============================================= +-----BEGIN CERTIFICATE----- +MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp +Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG +A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg +T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC206B89en +fHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFciKtZHgVdEglZTvYYUAQv8 +f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2JxhP7JsowtS013wMPgwr38oE18aO6lhO +qKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JN +RvCAOVIyD+OEsnpD8l7eXz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0 +gBe4lL8BPeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67Xnfn +6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEqZ8A9W6Wa6897Gqid +FEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZo2C7HK2JNDJiuEMhBnIMoVxtRsX6 +Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnj +B453cMor9H124HhnAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3Op +aaEg5+31IqEjFNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE +AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmnxPBUlgtk87FY +T15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2LHo1YGwRgJfMqZJS5ivmae2p ++DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzcccobGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXg +JXUjhx5c3LqdsKyzadsXg8n33gy8CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//Zoy +zH1kUQ7rVyZ2OuMeIjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgO +ZtMADjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2FAjgQ5ANh +1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUXOm/9riW99XJZZLF0Kjhf +GEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPbAZO1XB4Y3WRayhgoPmMEEf0cjQAPuDff +Z4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQlZvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuP +cX/9XhmgD0uRuMRUvAawRY8mkaKO/qk= +-----END CERTIFICATE----- + +Visa eCommerce Root +=================== +-----BEGIN CERTIFICATE----- +MIIDojCCAoqgAwIBAgIQE4Y1TR0/BvLB+WUF1ZAcYjANBgkqhkiG9w0BAQUFADBrMQswCQYDVQQG +EwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMmVmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2Ug +QXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNvbW1lcmNlIFJvb3QwHhcNMDIwNjI2MDIxODM2 +WhcNMjIwNjI0MDAxNjEyWjBrMQswCQYDVQQGEwJVUzENMAsGA1UEChMEVklTQTEvMC0GA1UECxMm +VmlzYSBJbnRlcm5hdGlvbmFsIFNlcnZpY2UgQXNzb2NpYXRpb24xHDAaBgNVBAMTE1Zpc2EgZUNv +bW1lcmNlIFJvb3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvV95WHm6h2mCxlCfL +F9sHP4CFT8icttD0b0/Pmdjh28JIXDqsOTPHH2qLJj0rNfVIsZHBAk4ElpF7sDPwsRROEW+1QK8b +RaVK7362rPKgH1g/EkZgPI2h4H3PVz4zHvtH8aoVlwdVZqW1LS7YgFmypw23RuwhY/81q6UCzyr0 +TP579ZRdhE2o8mCP2w4lPJ9zcc+U30rq299yOIzzlr3xF7zSujtFWsan9sYXiwGd/BmoKoMWuDpI +/k4+oKsGGelT84ATB+0tvz8KPFUgOSwsAGl0lUq8ILKpeeUYiZGo3BxN77t+Nwtd/jmliFKMAGzs +GHxBvfaLdXe6YJ2E5/4tAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEG +MB0GA1UdDgQWBBQVOIMPPyw/cDMezUb+B4wg4NfDtzANBgkqhkiG9w0BAQUFAAOCAQEAX/FBfXxc +CLkr4NWSR/pnXKUTwwMhmytMiUbPWU3J/qVAtmPN3XEolWcRzCSs00Rsca4BIGsDoo8Ytyk6feUW +YFN4PMCvFYP3j1IzJL1kk5fui/fbGKhtcbP3LBfQdCVp9/5rPJS+TUtBjE7ic9DjkCJzQ83z7+pz +zkWKsKZJ/0x9nXGIxHYdkFsd7v3M9+79YKWxehZx0RbQfBI8bGmX265fOZpwLwU8GUYEmSA20GBu +YQa7FkKMcPcw++DbZqMAAb3mLNqRX6BGi01qnD093QVG/na/oAo85ADmJ7f/hC3euiInlhBx6yLt +398znM/jra6O1I7mT1GvFpLgXPYHDw== +-----END CERTIFICATE----- + +TC TrustCenter, Germany, Class 2 CA +=================================== +-----BEGIN CERTIFICATE----- +MIIDXDCCAsWgAwIBAgICA+owDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQI +EwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig +U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBD +bGFzcyAyIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05 +ODAzMDkxMTU5NTlaFw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFt +YnVyZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9yIFNlY3Vy +aXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3Mg +MiBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVAdHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZI +hvcNAQEBBQADgY0AMIGJAoGBANo46O0yAClxgwENv4wB3NrGrTmkqYov1YtcaF9QxmL1Zr3KkSLs +qh1R1z2zUbKDTl3LSbDwTFXlay3HhQswHJJOgtTKAu33b77c4OMUuAVT8pr0VotanoWT0bSCVq5N +u6hLVxa8/vhYnvgpjbB7zXjJT6yLZwzxnPv8V5tXXE8NAgMBAAGjazBpMA8GA1UdEwEB/wQFMAMB +Af8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3LnRydXN0Y2VudGVy +LmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0GCSqGSIb3DQEBBAUAA4GBAIRS+yjf +/x91AbwBvgRWl2p0QiQxg/lGsQaKic+WLDO/jLVfenKhhQbOhvgFjuj5Jcrag4wGrOs2bYWRNAQ2 +9ELw+HkuCkhcq8xRT3h2oNmsGb0q0WkEKJHKNhAngFdb0lz1wlurZIFjdFH0l7/NEij3TWZ/p/Ac +ASZ4smZHcFFk +-----END CERTIFICATE----- + +TC TrustCenter, Germany, Class 3 CA +=================================== +-----BEGIN CERTIFICATE----- +MIIDXDCCAsWgAwIBAgICA+swDQYJKoZIhvcNAQEEBQAwgbwxCzAJBgNVBAYTAkRFMRAwDgYDVQQI +EwdIYW1idXJnMRAwDgYDVQQHEwdIYW1idXJnMTowOAYDVQQKEzFUQyBUcnVzdENlbnRlciBmb3Ig +U2VjdXJpdHkgaW4gRGF0YSBOZXR3b3JrcyBHbWJIMSIwIAYDVQQLExlUQyBUcnVzdENlbnRlciBD +bGFzcyAzIENBMSkwJwYJKoZIhvcNAQkBFhpjZXJ0aWZpY2F0ZUB0cnVzdGNlbnRlci5kZTAeFw05 +ODAzMDkxMTU5NTlaFw0xMTAxMDExMTU5NTlaMIG8MQswCQYDVQQGEwJERTEQMA4GA1UECBMHSGFt +YnVyZzEQMA4GA1UEBxMHSGFtYnVyZzE6MDgGA1UEChMxVEMgVHJ1c3RDZW50ZXIgZm9yIFNlY3Vy +aXR5IGluIERhdGEgTmV0d29ya3MgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3Mg +MyBDQTEpMCcGCSqGSIb3DQEJARYaY2VydGlmaWNhdGVAdHJ1c3RjZW50ZXIuZGUwgZ8wDQYJKoZI +hvcNAQEBBQADgY0AMIGJAoGBALa0wTUFLg2N7KBAahwOJ6ZQkmtQGwfeLud2zODa/ISoXoxjaitN +2U4CdhHBC/KNecoAtvGwDtf7pBc9r6tpepYnv68zoZoqWarEtTcI8hKlMbZD9TKWcSgoq40oht+7 +7uMMfTDWw1Krj10nnGvAo+cFa1dJRLNu6mTP0o56UHd3AgMBAAGjazBpMA8GA1UdEwEB/wQFMAMB +Af8wDgYDVR0PAQH/BAQDAgGGMDMGCWCGSAGG+EIBCAQmFiRodHRwOi8vd3d3LnRydXN0Y2VudGVy +LmRlL2d1aWRlbGluZXMwEQYJYIZIAYb4QgEBBAQDAgAHMA0GCSqGSIb3DQEBBAUAA4GBABY9xs3B +u4VxhUafPiCPUSiZ7C1FIWMjWwS7TJC4iJIETb19AaM/9uzO8d7+feXhPrvGq14L3T2WxMup1Pkm +5gZOngylerpuw3yCGdHHsbHD2w2Om0B8NwvxXej9H5CIpQ5ON2QhqE6NtJ/x3kit1VYYUimLRzQS +CdS7kjXvD9s0 +-----END CERTIFICATE----- + +Certum Root CA +============== +-----BEGIN CERTIFICATE----- +MIIDDDCCAfSgAwIBAgIDAQAgMA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQK +ExJVbml6ZXRvIFNwLiB6IG8uby4xEjAQBgNVBAMTCUNlcnR1bSBDQTAeFw0wMjA2MTExMDQ2Mzla +Fw0yNzA2MTExMDQ2MzlaMD4xCzAJBgNVBAYTAlBMMRswGQYDVQQKExJVbml6ZXRvIFNwLiB6IG8u +by4xEjAQBgNVBAMTCUNlcnR1bSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM6x +wS7TT3zNJc4YPk/EjG+AanPIW1H4m9LcuwBcsaD8dQPugfCI7iNS6eYVM42sLQnFdvkrOYCJ5JdL +kKWoePhzQ3ukYbDYWMzhbGZ+nPMJXlVjhNWo7/OxLjBos8Q82KxujZlakE403Daaj4GIULdtlkIJ +89eVgw1BS7Bqa/j8D35in2fE7SZfECYPCE/wpFcozo+47UX2bu4lXapuOb7kky/ZR6By6/qmW6/K +Uz/iDsaWVhFu9+lmqSbYf5VT7QqFiLpPKaVCjF62/IUgAKpoC6EahQGcxEZjgoi2IrHu/qpGWX7P +NSzVttpd90gzFFS269lvzs2I1qsb2pY7HVkCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkq +hkiG9w0BAQUFAAOCAQEAuI3O7+cUus/usESSbLQ5PqKEbq24IXfS1HeCh+YgQYHu4vgRt2PRFze+ +GXYkHAQaTOs9qmdvLdTN/mUxcMUbpgIKumB7bVjCmkn+YzILa+M6wKyrO7Do0wlRjBCDxjTgxSvg +GrZgFCdsMneMvLJymM/NzD+5yCRCFNZX/OYmQ6kd5YCQzgNUKD73P9P4Te1qCjqTE5s7FCMTY5w/ +0YcneeVMUeMBrYVdGjux1XMQpNPyvG5k9VpWkKjHDkx0Dy5xO/fIR/RpbxXyEV6DHpx8Uq79AtoS +qFlnGNu8cN2bsWntgM6JQEhqDjXKKWYVIZQs6GAqm4VKQPNriiTsBhYscw== +-----END CERTIFICATE----- + +Comodo AAA Services root +======================== +-----BEGIN CERTIFICATE----- +MIIEMjCCAxqgAwIBAgIBATANBgkqhkiG9w0BAQUFADB7MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEhMB8GA1UEAwwYQUFBIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAwMDAw +MFoXDTI4MTIzMTIzNTk1OVowezELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFuY2hl +c3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxITAfBgNV +BAMMGEFBQSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAL5AnfRu4ep2hxxNRUSOvkbIgwadwSr+GB+O5AL686tdUIoWMQuaBtDFcCLNSS1UY8y2bmhG +C1Pqy0wkwLxyTurxFa70VJoSCsN6sjNg4tqJVfMiWPPe3M/vg4aijJRPn2jymJBGhCfHdr/jzDUs +i14HZGWCwEiwqJH5YZ92IFCokcdmtet4YgNW8IoaE+oxox6gmf049vYnMlhvB/VruPsUK6+3qszW +Y19zjNoFmag4qMsXeDZRrOme9Hg6jc8P2ULimAyrL58OAd7vn5lJ8S3frHRNG5i1R8XlKdH5kBjH +Ypy+g8cmez6KJcfA3Z3mNWgQIJ2P2N7Sw4ScDV7oL8kCAwEAAaOBwDCBvTAdBgNVHQ4EFgQUoBEK +Iz6W8Qfs4q8p74Klf9AwpLQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wewYDVR0f +BHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21vZG9jYS5jb20vQUFBQ2VydGlmaWNhdGVTZXJ2aWNl +cy5jcmwwNqA0oDKGMGh0dHA6Ly9jcmwuY29tb2RvLm5ldC9BQUFDZXJ0aWZpY2F0ZVNlcnZpY2Vz +LmNybDANBgkqhkiG9w0BAQUFAAOCAQEACFb8AvCb6P+k+tZ7xkSAzk/ExfYAWMymtrwUSWgEdujm +7l3sAg9g1o1QGE8mTgHj5rCl7r+8dFRBv/38ErjHT1r0iWAFf2C3BUrz9vHCv8S5dIa2LX1rzNLz +Rt0vxuBqw8M0Ayx9lt1awg6nCpnBBYurDC/zXDrPbDdVCYfeU0BsWO/8tqtlbgT2G9w84FoVxp7Z +8VlIMCFlA2zs6SFz7JsDoeA3raAVGI/6ugLOpyypEBMs1OUIJqsil2D4kF501KKaU73yqWjgom7C +12yxow+ev+to51byrvLjKzg6CYG1a4XXvi3tPxq3smPi9WIsgtRqAEFQ8TmDn5XpNpaYbg== +-----END CERTIFICATE----- + +Comodo Secure Services root +=========================== +-----BEGIN CERTIFICATE----- +MIIEPzCCAyegAwIBAgIBATANBgkqhkiG9w0BAQUFADB+MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDEkMCIGA1UEAwwbU2VjdXJlIENlcnRpZmljYXRlIFNlcnZpY2VzMB4XDTA0MDEwMTAw +MDAwMFoXDTI4MTIzMTIzNTk1OVowfjELMAkGA1UEBhMCR0IxGzAZBgNVBAgMEkdyZWF0ZXIgTWFu +Y2hlc3RlcjEQMA4GA1UEBwwHU2FsZm9yZDEaMBgGA1UECgwRQ29tb2RvIENBIExpbWl0ZWQxJDAi +BgNVBAMMG1NlY3VyZSBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMBxM4KK0HDrc4eCQNUd5MvJDkKQ+d40uaG6EfQlhfPMcm3ye5drswfxdySRXyWP +9nQ95IDC+DwN879A6vfIUtFyb+/Iq0G4bi4XKpVpDM3SHpR7LZQdqnXXs5jLrLxkU0C8j6ysNstc +rbvd4JQX7NFc0L/vpZXJkMWwrPsbQ996CF23uPJAGysnnlDOXmWCiIxe004MeuoIkbY2qitC++rC +oznl2yY4rYsK7hljxxwk3wN42ubqwUcaCwtGCd0C/N7Lh1/XMGNooa7cMqG6vv5Eq2i2pRcV/b3V +p6ea5EQz6YiO/O1R65NxTq0B50SOqy3LqP4BSUjwwN3HaNiS/j0CAwEAAaOBxzCBxDAdBgNVHQ4E +FgQUPNiTiMLAggnMAZkGkyDpnnAJY08wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +gYEGA1UdHwR6MHgwO6A5oDeGNWh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1NlY3VyZUNlcnRpZmlj +YXRlU2VydmljZXMuY3JsMDmgN6A1hjNodHRwOi8vY3JsLmNvbW9kby5uZXQvU2VjdXJlQ2VydGlm +aWNhdGVTZXJ2aWNlcy5jcmwwDQYJKoZIhvcNAQEFBQADggEBAIcBbSMdflsXfcFhMs+P5/OKlFlm +4J4oqF7Tt/Q05qo5spcWxYJvMqTpjOev/e/C6LlLqqP05tqNZSH7uoDrJiiFGv45jN5bBAS0VPmj +Z55B+glSzAVIqMk/IQQezkhr/IXownuvf7fM+F86/TXGDe+X3EyrEeFryzHRbPtIgKvcnDe4IRRL +DXE97IMzbtFuMhbsmMcWi1mmNKsFVy2T96oTy9IT4rcuO81rUBcJaD61JlfutuC23bkpgHl9j6Pw +pCikFcSF9CfUa7/lXORlAnZUtOM3ZiTTGWHIUhDlizeauan5Hb/qmZJhlv8BzaFfDbxxvA6sCx1H +RR3B7Hzs/Sk= +-----END CERTIFICATE----- + +Comodo Trusted Services root +============================ +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIBATANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJHQjEbMBkGA1UECAwS +R3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHDAdTYWxmb3JkMRowGAYDVQQKDBFDb21vZG8gQ0Eg +TGltaXRlZDElMCMGA1UEAwwcVHJ1c3RlZCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczAeFw0wNDAxMDEw +MDAwMDBaFw0yODEyMzEyMzU5NTlaMH8xCzAJBgNVBAYTAkdCMRswGQYDVQQIDBJHcmVhdGVyIE1h +bmNoZXN0ZXIxEDAOBgNVBAcMB1NhbGZvcmQxGjAYBgNVBAoMEUNvbW9kbyBDQSBMaW1pdGVkMSUw +IwYDVQQDDBxUcnVzdGVkIENlcnRpZmljYXRlIFNlcnZpY2VzMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA33FvNlhTWvI2VFeAxHQIIO0Yfyod5jWaHiWsnOWWfnJSoBVC21ndZHoa0Lh7 +3TkVvFVIxO06AOoxEbrycXQaZ7jPM8yoMa+j49d/vzMtTGo87IvDktJTdyR0nAducPy9C1t2ul/y +/9c3S0pgePfw+spwtOpZqqPOSC+pw7ILfhdyFgymBwwbOM/JYrc/oJOlh0Hyt3BAd9i+FHzjqMB6 +juljatEPmsbS9Is6FARW1O24zG71++IsWL1/T2sr92AkWCTOJu80kTrV44HQsvAEAtdbtz6SrGsS +ivnkBbA7kUlcsutT6vifR4buv5XAwAaf0lteERv0xwQ1KdJVXOTt6wIDAQABo4HJMIHGMB0GA1Ud +DgQWBBTFe1i97doladL3WRaoszLAeydb9DAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB +/zCBgwYDVR0fBHwwejA8oDqgOIY2aHR0cDovL2NybC5jb21vZG9jYS5jb20vVHJ1c3RlZENlcnRp +ZmljYXRlU2VydmljZXMuY3JsMDqgOKA2hjRodHRwOi8vY3JsLmNvbW9kby5uZXQvVHJ1c3RlZENl +cnRpZmljYXRlU2VydmljZXMuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQDIk4E7ibSvuIQSTI3S8Ntw +uleGFTQQuS9/HrCoiWChisJ3DFBKmwCL2Iv0QeLQg4pKHBQGsKNoBXAxMKdTmw7pSqBYaWcOrp32 +pSxBvzwGa+RZzG0Q8ZZvH9/0BAKkn0U+yNj6NkZEUD+Cl5EfKNsYEYwq5GWDVxISjBc/lDb+XbDA +BHcTuPQV1T84zJQ6VdCsmPW6AF/ghhmBeC8owH7TzEIK9a5QoNE+xqFx7D+gIIxmOom0jtTYsU0l +R+4viMi14QVFwL4Ucd56/Y57fU0IlqUSc/AtyjcndBInTMu2l+nZrghtWjlA3QVHdWpaIbOjGM9O +9y5Xt5hwXsjEeLBi +-----END CERTIFICATE----- + +QuoVadis Root CA +================ +-----BEGIN CERTIFICATE----- +MIIF0DCCBLigAwIBAgIEOrZQizANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJCTTEZMBcGA1UE +ChMQUXVvVmFkaXMgTGltaXRlZDElMCMGA1UECxMcUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0 +eTEuMCwGA1UEAxMlUXVvVmFkaXMgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wMTAz +MTkxODMzMzNaFw0yMTAzMTcxODMzMzNaMH8xCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRp +cyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MS4wLAYDVQQD +EyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAv2G1lVO6V/z68mcLOhrfEYBklbTRvM16z/Ypli4kVEAkOPcahdxYTMuk +J0KX0J+DisPkBgNbAKVRHnAEdOLB1Dqr1607BxgFjv2DrOpm2RgbaIr1VxqYuvXtdj182d6UajtL +F8HVj71lODqV0D1VNk7feVcxKh7YWWVJWCCYfqtffp/p1k3sg3Spx2zY7ilKhSoGFPlU5tPaZQeL +YzcS19Dsw3sgQUSj7cugF+FxZc4dZjH3dgEZyH0DWLaVSR2mEiboxgx24ONmy+pdpibu5cxfvWen +AScOospUxbF6lR1xHkopigPcakXBpBlebzbNw6Kwt/5cOOJSvPhEQ+aQuwIDAQABo4ICUjCCAk4w +PQYIKwYBBQUHAQEEMTAvMC0GCCsGAQUFBzABhiFodHRwczovL29jc3AucXVvdmFkaXNvZmZzaG9y +ZS5jb20wDwYDVR0TAQH/BAUwAwEB/zCCARoGA1UdIASCAREwggENMIIBCQYJKwYBBAG+WAABMIH7 +MIHUBggrBgEFBQcCAjCBxxqBxFJlbGlhbmNlIG9uIHRoZSBRdW9WYWRpcyBSb290IENlcnRpZmlj +YXRlIGJ5IGFueSBwYXJ0eSBhc3N1bWVzIGFjY2VwdGFuY2Ugb2YgdGhlIHRoZW4gYXBwbGljYWJs +ZSBzdGFuZGFyZCB0ZXJtcyBhbmQgY29uZGl0aW9ucyBvZiB1c2UsIGNlcnRpZmljYXRpb24gcHJh +Y3RpY2VzLCBhbmQgdGhlIFF1b1ZhZGlzIENlcnRpZmljYXRlIFBvbGljeS4wIgYIKwYBBQUHAgEW +Fmh0dHA6Ly93d3cucXVvdmFkaXMuYm0wHQYDVR0OBBYEFItLbe3TKbkGGew5Oanwl4Rqy+/fMIGu +BgNVHSMEgaYwgaOAFItLbe3TKbkGGew5Oanwl4Rqy+/foYGEpIGBMH8xCzAJBgNVBAYTAkJNMRkw +FwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMSUwIwYDVQQLExxSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MS4wLAYDVQQDEyVRdW9WYWRpcyBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggQ6 +tlCLMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAitQUtf70mpKnGdSkfnIYj9lo +fFIk3WdvOXrEql494liwTXCYhGHoG+NpGA7O+0dQoE7/8CQfvbLO9Sf87C9TqnN7Az10buYWnuul +LsS/VidQK2K6vkscPFVcQR0kvoIgR13VRH56FmjffU1RcHhXHTMe/QKZnAzNCgVPx7uOpHX6Sm2x +gI4JVrmcGmD+XcHXetwReNDWXcG31a0ymQM6isxUJTkxgXsTIlG6Rmyhu576BGxJJnSP0nPrzDCi +5upZIof4l/UO/erMkqQWxFIY6iHOsfHmhIHluqmGKPJDWl0Snawe2ajlCmqnf6CHKc/yiU3U7MXi +5nrQNiOKSnQ2+Q== +-----END CERTIFICATE----- + +QuoVadis Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIFtzCCA5+gAwIBAgICBQkwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMjAeFw0wNjExMjQx +ODI3MDBaFw0zMTExMjQxODIzMzNaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDIwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCaGMpLlA0ALa8DKYrwD4HIrkwZhR0In6spRIXzL4GtMh6QRr+jhiYaHv5+HBg6 +XJxgFyo6dIMzMH1hVBHL7avg5tKifvVrbxi3Cgst/ek+7wrGsxDp3MJGF/hd/aTa/55JWpzmM+Yk +lvc/ulsrHHo1wtZn/qtmUIttKGAr79dgw8eTvI02kfN/+NsRE8Scd3bBrrcCaoF6qUWD4gXmuVbB +lDePSHFjIuwXZQeVikvfj8ZaCuWw419eaxGrDPmF60Tp+ARz8un+XJiM9XOva7R+zdRcAitMOeGy +lZUtQofX1bOQQ7dsE/He3fbE+Ik/0XX1ksOR1YqI0JDs3G3eicJlcZaLDQP9nL9bFqyS2+r+eXyt +66/3FsvbzSUr5R/7mp/iUcw6UwxI5g69ybR2BlLmEROFcmMDBOAENisgGQLodKcftslWZvB1Jdxn +wQ5hYIizPtGo/KPaHbDRsSNU30R2be1B2MGyIrZTHN81Hdyhdyox5C315eXbyOD/5YDXC2Og/zOh +D7osFRXql7PSorW+8oyWHhqPHWykYTe5hnMz15eWniN9gqRMgeKh0bpnX5UHoycR7hYQe7xFSkyy +BNKr79X9DFHOUGoIMfmR2gyPZFwDwzqLID9ujWc9Otb+fVuIyV77zGHcizN300QyNQliBJIWENie +J0f7OyHj+OsdWwIDAQABo4GwMIGtMA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1Ud +DgQWBBQahGK8SEwzJQTU7tD2A8QZRtGUazBuBgNVHSMEZzBlgBQahGK8SEwzJQTU7tD2A8QZRtGU +a6FJpEcwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMT +ElF1b1ZhZGlzIFJvb3QgQ0EgMoICBQkwDQYJKoZIhvcNAQEFBQADggIBAD4KFk2fBluornFdLwUv +Z+YTRYPENvbzwCYMDbVHZF34tHLJRqUDGCdViXh9duqWNIAXINzng/iN/Ae42l9NLmeyhP3ZRPx3 +UIHmfLTJDQtyU/h2BwdBR5YM++CCJpNVjP4iH2BlfF/nJrP3MpCYUNQ3cVX2kiF495V5+vgtJodm +VjB3pjd4M1IQWK4/YY7yarHvGH5KWWPKjaJW1acvvFYfzznB4vsKqBUsfU16Y8Zsl0Q80m/DShcK ++JDSV6IZUaUtl0HaB0+pUNqQjZRG4T7wlP0QADj1O+hA4bRuVhogzG9Yje0uRY/W6ZM/57Es3zrW +IozchLsib9D45MY56QSIPMO661V6bYCZJPVsAfv4l7CUW+v90m/xd2gNNWQjrLhVoQPRTUIZ3Ph1 +WVaj+ahJefivDrkRoHy3au000LYmYjgahwz46P0u05B/B5EqHdZ+XIWDmbA4CD/pXvk1B+TJYm5X +f6dQlfe6yJvmjqIBxdZmv3lh8zwc4bmCXF2gw+nYSL0ZohEUGW6yhhtoPkg3Goi3XZZenMfvJ2II +4pEZXNLxId26F0KCl3GBUzGpn/Z9Yr9y4aOTHcyKJloJONDO1w2AFrR4pTqHTI2KpdVGl/IsELm8 +VCLAAVBpQ570su9t+Oza8eOx79+Rj1QqCyXBJhnEUhAFZdWCEOrCMc0u +-----END CERTIFICATE----- + +QuoVadis Root CA 3 +================== +-----BEGIN CERTIFICATE----- +MIIGnTCCBIWgAwIBAgICBcYwDQYJKoZIhvcNAQEFBQAwRTELMAkGA1UEBhMCQk0xGTAXBgNVBAoT +EFF1b1ZhZGlzIExpbWl0ZWQxGzAZBgNVBAMTElF1b1ZhZGlzIFJvb3QgQ0EgMzAeFw0wNjExMjQx +OTExMjNaFw0zMTExMjQxOTA2NDRaMEUxCzAJBgNVBAYTAkJNMRkwFwYDVQQKExBRdW9WYWRpcyBM +aW1pdGVkMRswGQYDVQQDExJRdW9WYWRpcyBSb290IENBIDMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQDMV0IWVJzmmNPTTe7+7cefQzlKZbPoFog02w1ZkXTPkrgEQK0CSzGrvI2RaNgg +DhoB4hp7Thdd4oq3P5kazethq8Jlph+3t723j/z9cI8LoGe+AaJZz3HmDyl2/7FWeUUrH556VOij +KTVopAFPD6QuN+8bv+OPEKhyq1hX51SGyMnzW9os2l2ObjyjPtr7guXd8lyyBTNvijbO0BNO/79K +DDRMpsMhvVAEVeuxu537RR5kFd5VAYwCdrXLoT9CabwvvWhDFlaJKjdhkf2mrk7AyxRllDdLkgbv +BNDInIjbC3uBr7E9KsRlOni27tyAsdLTmZw67mtaa7ONt9XOnMK+pUsvFrGeaDsGb659n/je7Mwp +p5ijJUMv7/FfJuGITfhebtfZFG4ZM2mnO4SJk8RTVROhUXhA+LjJou57ulJCg54U7QVSWllWp5f8 +nT8KKdjcT5EOE7zelaTfi5m+rJsziO+1ga8bxiJTyPbH7pcUsMV8eFLI8M5ud2CEpukqdiDtWAEX +MJPpGovgc2PZapKUSU60rUqFxKMiMPwJ7Wgic6aIDFUhWMXhOp8q3crhkODZc6tsgLjoC2SToJyM +Gf+z0gzskSaHirOi4XCPLArlzW1oUevaPwV/izLmE1xr/l9A4iLItLRkT9a6fUg+qGkM17uGcclz +uD87nSVL2v9A6wIDAQABo4IBlTCCAZEwDwYDVR0TAQH/BAUwAwEB/zCB4QYDVR0gBIHZMIHWMIHT +BgkrBgEEAb5YAAMwgcUwgZMGCCsGAQUFBwICMIGGGoGDQW55IHVzZSBvZiB0aGlzIENlcnRpZmlj +YXRlIGNvbnN0aXR1dGVzIGFjY2VwdGFuY2Ugb2YgdGhlIFF1b1ZhZGlzIFJvb3QgQ0EgMyBDZXJ0 +aWZpY2F0ZSBQb2xpY3kgLyBDZXJ0aWZpY2F0aW9uIFByYWN0aWNlIFN0YXRlbWVudC4wLQYIKwYB +BQUHAgEWIWh0dHA6Ly93d3cucXVvdmFkaXNnbG9iYWwuY29tL2NwczALBgNVHQ8EBAMCAQYwHQYD +VR0OBBYEFPLAE+CCQz777i9nMpY1XNu4ywLQMG4GA1UdIwRnMGWAFPLAE+CCQz777i9nMpY1XNu4 +ywLQoUmkRzBFMQswCQYDVQQGEwJCTTEZMBcGA1UEChMQUXVvVmFkaXMgTGltaXRlZDEbMBkGA1UE +AxMSUXVvVmFkaXMgUm9vdCBDQSAzggIFxjANBgkqhkiG9w0BAQUFAAOCAgEAT62gLEz6wPJv92ZV +qyM07ucp2sNbtrCD2dDQ4iH782CnO11gUyeim/YIIirnv6By5ZwkajGxkHon24QRiSemd1o417+s +hvzuXYO8BsbRd2sPbSQvS3pspweWyuOEn62Iix2rFo1bZhfZFvSLgNLd+LJ2w/w4E6oM3kJpK27z +POuAJ9v1pkQNn1pVWQvVDVJIxa6f8i+AxeoyUDUSly7B4f/xI4hROJ/yZlZ25w9Rl6VSDE1JUZU2 +Pb+iSwwQHYaZTKrzchGT5Or2m9qoXadNt54CrnMAyNojA+j56hl0YgCUyyIgvpSnWbWCar6ZeXqp +8kokUvd0/bpO5qgdAm6xDYBEwa7TIzdfu4V8K5Iu6H6li92Z4b8nby1dqnuH/grdS/yO9SbkbnBC +bjPsMZ57k8HkyWkaPcBrTiJt7qtYTcbQQcEr6k8Sh17rRdhs9ZgC06DYVYoGmRmioHfRMJ6szHXu +g/WwYjnPbFfiTNKRCw51KBuav/0aQ/HKd/s7j2G4aSgWQgRecCocIdiP4b0jWy10QJLZYxkNc91p +vGJHvOB0K7Lrfb5BG7XARsWhIstfTsEokt4YutUqKLsRixeTmJlglFwjz1onl14LBQaTNx47aTbr +qZ5hHY8y2o4M1nQ+ewkk2gF3R8Q7zTSMmfXK4SVhM7JZG+Ju1zdXtg2pEto= +-----END CERTIFICATE----- + +Security Communication Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIDWjCCAkKgAwIBAgIBADANBgkqhkiG9w0BAQUFADBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +HhcNMDMwOTMwMDQyMDQ5WhcNMjMwOTMwMDQyMDQ5WjBQMQswCQYDVQQGEwJKUDEYMBYGA1UEChMP +U0VDT00gVHJ1c3QubmV0MScwJQYDVQQLEx5TZWN1cml0eSBDb21tdW5pY2F0aW9uIFJvb3RDQTEw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCzs/5/022x7xZ8V6UMbXaKL0u/ZPtM7orw +8yl89f/uKuDp6bpbZCKamm8sOiZpUQWZJtzVHGpxxpp9Hp3dfGzGjGdnSj74cbAZJ6kJDKaVv0uM +DPpVmDvY6CKhS3E4eayXkmmziX7qIWgGmBSWh9JhNrxtJ1aeV+7AwFb9Ms+k2Y7CI9eNqPPYJayX +5HA49LY6tJ07lyZDo6G8SVlyTCMwhwFY9k6+HGhWZq/NQV3Is00qVUarH9oe4kA92819uZKAnDfd +DJZkndwi92SL32HeFZRSFaB9UslLqCHJxrHty8OVYNEP8Ktw+N/LTX7s1vqr2b1/VPKl6Xn62dZ2 +JChzAgMBAAGjPzA9MB0GA1UdDgQWBBSgc0mZaNyFW2XjmygvV5+9M7wHSDALBgNVHQ8EBAMCAQYw +DwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAaECpqLvkT115swW1F7NgE+vGkl3g +0dNq/vu+m22/xwVtWSDEHPC32oRYAmP6SBbvT6UL90qY8j+eG61Ha2POCEfrUj94nK9NrvjVT8+a +mCoQQTlSxN3Zmw7vkwGusi7KaEIkQmywszo+zenaSMQVy+n5Bw+SUEmK3TGXX8npN6o7WWWXlDLJ +s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ +6rBK+1YWc26sTfcioU+tHXotRSflMMFe8toTyyVCUZVHA4xsIcx0Qu1T/zOLjw9XARYvz6buyXAi +FL39vmwLAw== +-----END CERTIFICATE----- + +Sonera Class 1 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAxMDQwNjEwNDkxM1oXDTIxMDQw +NjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H88 +7dF+2rDNbS82rDTG29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9 +EJUkoVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk3w0LBUXl +0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBLqdReLjVQCfOAl/QMF645 +2F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIINnvmLVz5MxxftLItyM19yejhW1ebZrgUa +HXVFsculJRwSVzb9IjcCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZT +iFIwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE9 +28Jj2VuXZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0HDjxV +yhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VOTzF2nBBhjrZTOqMR +vq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2UvkVrCqIexVmiUefkl98HVrhq4uz2P +qYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4wzMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9Z +IRlXvVWa +-----END CERTIFICATE----- + +Sonera Class 2 Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIDIDCCAgigAwIBAgIBHTANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG +U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MyIENBMB4XDTAxMDQwNjA3Mjk0MFoXDTIxMDQw +NjA3Mjk0MFowOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh +IENsYXNzMiBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJAXSjWdyvANlsdE+hY3 +/Ei9vX+ALTU74W+oZ6m/AxxNjG8yR9VBaKQTBME1DJqEQ/xcHf+Js+gXGM2RX/uJ4+q/Tl18GybT +dXnt5oTjV+WtKcT0OijnpXuENmmz/V52vaMtmdOQTiMofRhj8VQ7Jp12W5dCsv+u8E7s3TmVToMG +f+dJQMjFAbJUWmYdPfz56TwKnoG4cPABi+QjVHzIrviQHgCWctRUz2EjvOr7nQKV0ba5cTppCD8P +tOFCx4j1P5iop7oc4HFx71hXgVB6XGt0Rg6DA5jDjqhu8nYybieDwnPz3BjotJPqdURrBGAgcVeH +nfO+oJAjPYok4doh28MCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQISqCqWITT +XjwwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQBazof5FnIVV0sd2ZvnoiYw7JNn39Yt +0jSv9zilzqsWuasvfDXLrNAPtEwr/IDva4yRXzZ299uzGxnq9LIR/WFxRL8oszodv7ND6J+/3DEI +cbCdjdY0RzKQxmUk96BKfARzjzlvF4xytb1LyHr4e4PDKE6cCepnP7JnBBvDFNr450kkkdAdavph +Oe9r5yF1BgfYErQhIHBCcYHaPJo2vqZbDWpsmh+Re/n570K6Tk6ezAyNlNzZRZxe7EJQY670XcSx +EtzKO6gunRRaBXW37Ndj4ro1tgQIkejanZz2ZrUYrAqmVCY0M9IbwdR/GjqOC6oybtv8TyWf2TLH +llpwrN9M +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA +============================= +-----BEGIN CERTIFICATE----- +MIIDujCCAqKgAwIBAgIEAJiWijANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQGEwJOTDEeMBwGA1UE +ChMVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSYwJAYDVQQDEx1TdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQTAeFw0wMjEyMTcwOTIzNDlaFw0xNTEyMTYwOTE1MzhaMFUxCzAJBgNVBAYTAk5MMR4w +HAYDVQQKExVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xJjAkBgNVBAMTHVN0YWF0IGRlciBOZWRlcmxh +bmRlbiBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmNK1URF6gaYUmHFt +vsznExvWJw56s2oYHLZhWtVhCb/ekBPHZ+7d89rFDBKeNVU+LCeIQGv33N0iYfXCxw719tV2U02P +jLwYdjeFnejKScfST5gTCaI+Ioicf9byEGW07l8Y1Rfj+MX94p2i71MOhXeiD+EwR+4A5zN9RGca +C1Hoi6CeUJhoNFIfLm0B8mBF8jHrqTFoKbt6QZ7GGX+UtFE5A3+y3qcym7RHjm+0Sq7lr7HcsBth +vJly3uSJt3omXdozSVtSnA71iq3DuD3oBmrC1SoLbHuEvVYFy4ZlkuxEK7COudxwC0barbxjiDn6 +22r+I/q85Ej0ZytqERAhSQIDAQABo4GRMIGOMAwGA1UdEwQFMAMBAf8wTwYDVR0gBEgwRjBEBgRV +HSAAMDwwOgYIKwYBBQUHAgEWLmh0dHA6Ly93d3cucGtpb3ZlcmhlaWQubmwvcG9saWNpZXMvcm9v +dC1wb2xpY3kwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSofeu8Y6R0E3QA7Jbg0zTBLL9s+DAN +BgkqhkiG9w0BAQUFAAOCAQEABYSHVXQ2YcG70dTGFagTtJ+k/rvuFbQvBgwp8qiSpGEN/KtcCFtR +EytNwiphyPgJWPwtArI5fZlmgb9uXJVFIGzmeafR2Bwp/MIgJ1HI8XxdNGdphREwxgDS1/PTfLbw +MVcoEoJz6TMvplW0C5GUR5z6u3pCMuiufi3IvKwUv9kP2Vv8wfl6leF9fpb8cbDCTMjfRTTJzg3y +nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR +iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== +-----END CERTIFICATE----- + +TDC Internet Root CA +==================== +-----BEGIN CERTIFICATE----- +MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE +ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTAeFw0wMTA0MDUx +NjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNVBAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJu +ZXQxHTAbBgNVBAsTFFREQyBJbnRlcm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAxLhAvJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20j +xsNuZp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a0vnRrEvL +znWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc14izbSysseLlJ28TQx5yc +5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGNeGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6 +otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcDR0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZI +AYb4QgEBBAQDAgAHMGUGA1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMM +VERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxMEQ1JM +MTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3WjALBgNVHQ8EBAMC +AQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAwHQYDVR0OBBYEFGxkAcf9hW2syNqe +UAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0G +CSqGSIb3DQEBBQUAA4IBAQBOQ8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540m +gwV5dOy0uaOXwTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+ +2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzb +O0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrU +Cbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l +-----END CERTIFICATE----- + +TDC OCES Root CA +================ +-----BEGIN CERTIFICATE----- +MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJESzEMMAoGA1UE +ChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEwODM5MzBaFw0zNzAyMTEwOTA5 +MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNUREMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuH +nEz9pPPEXyG9VhDr2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0 +zY0s2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItUGBxIYXvV +iGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKjdGqPqcNiKXEx5TukYBde +dObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+rTpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO +3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB +5DCB4TCB3gYIKoFQgSkBAQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5k +ay9yZXBvc2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRlciBm +cmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEuMS4xLiBDZXJ0aWZp +Y2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEuMS4x +LjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1UdHwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEM +MAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYm +aHR0cDovL2NybC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy +MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZJ2cdUBVLc647 ++RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqGSIb2fQdBAAQQMA4bCFY2LjA6 +NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACromJkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4 +A9G28kNBKWKnctj7fAXmMXAnVBhOinxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYsc +A+UYyAFMP8uXBV2YcaaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9 +AOoBmbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQYqbsFbS1 +AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9BKNDLdr8C2LqL19iUw== +-----END CERTIFICATE----- + +UTN DATACorp SGC Root CA +======================== +-----BEGIN CERTIFICATE----- +MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZ +BgNVBAMTElVUTiAtIERBVEFDb3JwIFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBa +MIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4w +HAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRy +dXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ys +raP6LnD43m77VkIVni5c7yPeIbkFdicZD0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlo +wHDyUwDAXlCCpVZvNvlK4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA +9P4yPykqlXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulWbfXv +33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQABo4GrMIGoMAsGA1Ud +DwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRTMtGzz3/64PGgXYVOktKeRR20TzA9 +BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dD +LmNybDAqBgNVHSUEIzAhBggrBgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3 +DQEBBQUAA4IBAQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft +Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0 +I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXx +EZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP +DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI +-----END CERTIFICATE----- + +UTN USERFirst Email Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0 +BgNVBAMTLVVUTi1VU0VSRmlyc3QtQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05 +OTA3MDkxNzI4NTBaFw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQx +FzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsx +ITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UEAxMtVVROLVVTRVJGaXJz +dC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWlsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3BYHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIx +B8dOtINknS4p1aJkxIW9hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8 +om+rWV6lL8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLmSGHG +TPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM1tZUOt4KpLoDd7Nl +yP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws6wIDAQABo4G5MIG2MAsGA1UdDwQE +AwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNV +HR8EUTBPME2gS6BJhkdodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGll +bnRBdXRoZW50aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH +AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u7mFVbwQ+zzne +xRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0xtcgBEXkzYABurorbs6q15L+ +5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQrfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarV +NZ1yQAOJujEdxRBoUp7fooXFXAimeOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZ +w7JHpsIyYdfHb0gkUSeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ= +-----END CERTIFICATE----- + +UTN USERFirst Hardware Root CA +============================== +-----BEGIN CERTIFICATE----- +MIIEdDCCA1ygAwIBAgIQRL4Mi1AAJLQR0zYq/mUK/TANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNOTkwNzA5MTgxMDQyWhcNMTkwNzA5MTgx +OTIyWjCBlzELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0 +eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVz +ZXJ0cnVzdC5jb20xHzAdBgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCx98M4P7Sof885glFn0G2f0v9Y8+efK+wNiVSZuTiZFvfgIXlI +wrthdBKWHTxqctU8EGc6Oe0rE81m65UJM6Rsl7HoxuzBdXmcRl6Nq9Bq/bkqVRcQVLMZ8Jr28bFd +tqdt++BxF2uiiPsA3/4aMXcMmgF6sTLjKwEHOG7DpV4jvEWbe1DByTCP2+UretNb+zNAHqDVmBe8 +i4fDidNdoI6yqqr2jmmIBsX6iSHzCJ1pLgkzmykNRg+MzEk0sGlRvfkGzWitZky8PqxhvQqIDsjf +Pe58BEydCl5rkdbux+0ojatNh4lz0G6k0B4WixThdkQDf2Os5M1JnMWS9KsyoUhbAgMBAAGjgbkw +gbYwCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFKFyXyYbKJhDlV0HN9WF +lp1L0sNFMEQGA1UdHwQ9MDswOaA3oDWGM2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9VVE4tVVNF +UkZpcnN0LUhhcmR3YXJlLmNybDAxBgNVHSUEKjAoBggrBgEFBQcDAQYIKwYBBQUHAwUGCCsGAQUF +BwMGBggrBgEFBQcDBzANBgkqhkiG9w0BAQUFAAOCAQEARxkP3nTGmZev/K0oXnWO6y1n7k57K9cM +//bey1WiCuFMVGWTYGufEpytXoMs61quwOQt9ABjHbjAbPLPSbtNk28GpgoiskliCE7/yMgUsogW +XecB5BKV5UU0s4tpvc+0hY91UZ59Ojg6FEgSxvunOxqNDYJAB+gECJChicsZUN/KHAG8HQQZexB2 +lzvukJDKxA4fFm517zP4029bHpbj4HR3dHuKom4t3XbWOTCC8KucUvIqx69JXn7HaOWCgchqJ/kn +iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 +nfhmqA== +-----END CERTIFICATE----- + +UTN USERFirst Object Root CA +============================ +-----BEGIN CERTIFICATE----- +MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAb +BgNVBAMTFFVUTi1VU0VSRmlyc3QtT2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAz +NlowgZUxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkx +HjAcBgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2Vy +dHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCCASIwDQYJKoZIhvcNAQEB +BQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicPHxzfOpuCaDDASmEd8S8O+r5596Uj71VR +loTN2+O5bj4x2AogZ8f02b+U60cEPgLOKqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQ +w5ujm9M89RKZd7G3CeBo5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vu +lBe3/IW+pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehbkkj7 +RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUCAwEAAaOBrzCBrDAL +BgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU2u1kdBScFDyr3ZmpvVsoTYs8 +ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmly +c3QtT2JqZWN0LmNybDApBgNVHSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQw +DQYJKoZIhvcNAQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw +NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXBmMiKVl0+7kNO +PmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU4U3GDZlDAQ0Slox4nb9QorFE +qmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK581OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCG +hU3IfdeLA/5u1fedFqySLKAj5ZyRUh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= +-----END CERTIFICATE----- + +Camerfirma Chambers of Commerce Root +==================================== +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBADANBgkqhkiG9w0BAQUFADB/MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe +QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i +ZXJzaWduLm9yZzEiMCAGA1UEAxMZQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdDAeFw0wMzA5MzAx +NjEzNDNaFw0zNzA5MzAxNjEzNDRaMH8xCzAJBgNVBAYTAkVVMScwJQYDVQQKEx5BQyBDYW1lcmZp +cm1hIFNBIENJRiBBODI3NDMyODcxIzAhBgNVBAsTGmh0dHA6Ly93d3cuY2hhbWJlcnNpZ24ub3Jn +MSIwIAYDVQQDExlDaGFtYmVycyBvZiBDb21tZXJjZSBSb290MIIBIDANBgkqhkiG9w0BAQEFAAOC +AQ0AMIIBCAKCAQEAtzZV5aVdGDDg2olUkfzIx1L4L1DZ77F1c2VHfRtbunXF/KGIJPov7coISjlU +xFF6tdpg6jg8gbLL8bvZkSM/SAFwdakFKq0fcfPJVD0dBmpAPrMMhe5cG3nCYsS4No41XQEMIwRH +NaqbYE6gZj3LJgqcQKH0XZi/caulAGgq7YN6D6IUtdQis4CwPAxaUWktWBiP7Zme8a7ileb2R6jW +DA+wWFjbw2Y3npuRVDM30pQcakjJyfKl2qUMI/cjDpwyVV5xnIQFUZot/eZOKjRa3spAN2cMVCFV +d9oKDMyXroDclDZK9D7ONhMeU+SsTjoF7Nuucpw4i9A5O4kKPnf+dQIBA6OCAUQwggFAMBIGA1Ud +EwEB/wQIMAYBAf8CAQwwPAYDVR0fBDUwMzAxoC+gLYYraHR0cDovL2NybC5jaGFtYmVyc2lnbi5v +cmcvY2hhbWJlcnNyb290LmNybDAdBgNVHQ4EFgQU45T1sU3p26EpW1eLTXYGduHRooowDgYDVR0P +AQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzAnBgNVHREEIDAegRxjaGFtYmVyc3Jvb3RAY2hh +bWJlcnNpZ24ub3JnMCcGA1UdEgQgMB6BHGNoYW1iZXJzcm9vdEBjaGFtYmVyc2lnbi5vcmcwWAYD +VR0gBFEwTzBNBgsrBgEEAYGHLgoDATA+MDwGCCsGAQUFBwIBFjBodHRwOi8vY3BzLmNoYW1iZXJz +aWduLm9yZy9jcHMvY2hhbWJlcnNyb290Lmh0bWwwDQYJKoZIhvcNAQEFBQADggEBAAxBl8IahsAi +fJ/7kPMa0QOx7xP5IV8EnNrJpY0nbJaHkb5BkAFyk+cefV/2icZdp0AJPaxJRUXcLo0waLIJuvvD +L8y6C98/d3tGfToSJI6WjzwFCm/SlCgdbQzALogi1djPHRPH8EjX1wWnz8dHnjs8NMiAT9QUu/wN +UPf6s+xCX6ndbcj0dc97wXImsQEcXCz9ek60AcUFV7nnPKoF2YjpB0ZBzu9Bga5Y34OirsrXdx/n +ADydb47kMgkdTXg0eDQ8lJsm7U9xxhl6vSAiSFr+S30Dt+dYvsYyTnQeaN2oaFuzPu5ifdmA6Ap1 +erfutGWaIZDgqtCYvDi1czyL+Nw= +-----END CERTIFICATE----- + +Camerfirma Global Chambersign Root +================================== +-----BEGIN CERTIFICATE----- +MIIExTCCA62gAwIBAgIBADANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMe +QUMgQ2FtZXJmaXJtYSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1i +ZXJzaWduLm9yZzEgMB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwHhcNMDMwOTMwMTYx +NDE4WhcNMzcwOTMwMTYxNDE4WjB9MQswCQYDVQQGEwJFVTEnMCUGA1UEChMeQUMgQ2FtZXJmaXJt +YSBTQSBDSUYgQTgyNzQzMjg3MSMwIQYDVQQLExpodHRwOi8vd3d3LmNoYW1iZXJzaWduLm9yZzEg +MB4GA1UEAxMXR2xvYmFsIENoYW1iZXJzaWduIFJvb3QwggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAw +ggEIAoIBAQCicKLQn0KuWxfH2H3PFIP8T8mhtxOviteePgQKkotgVvq0Mi+ITaFgCPS3CU6gSS9J +1tPfnZdan5QEcOw/Wdm3zGaLmFIoCQLfxS+EjXqXd7/sQJ0lcqu1PzKY+7e3/HKE5TWH+VX6ox8O +by4o3Wmg2UIQxvi1RMLQQ3/bvOSiPGpVeAp3qdjqGTK3L/5cPxvusZjsyq16aUXjlg9V9ubtdepl +6DJWk0aJqCWKZQbua795B9Dxt6/tLE2Su8CoX6dnfQTyFQhwrJLWfQTSM/tMtgsL+xrJxI0DqX5c +8lCrEqWhz0hQpe/SyBoT+rB/sYIcd2oPX9wLlY/vQ37mRQklAgEDo4IBUDCCAUwwEgYDVR0TAQH/ +BAgwBgEB/wIBDDA/BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vY3JsLmNoYW1iZXJzaWduLm9yZy9j +aGFtYmVyc2lnbnJvb3QuY3JsMB0GA1UdDgQWBBRDnDafsJ4wTcbOX60Qq+UDpfqpFDAOBgNVHQ8B +Af8EBAMCAQYwEQYJYIZIAYb4QgEBBAQDAgAHMCoGA1UdEQQjMCGBH2NoYW1iZXJzaWducm9vdEBj +aGFtYmVyc2lnbi5vcmcwKgYDVR0SBCMwIYEfY2hhbWJlcnNpZ25yb290QGNoYW1iZXJzaWduLm9y +ZzBbBgNVHSAEVDBSMFAGCysGAQQBgYcuCgEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly9jcHMuY2hh +bWJlcnNpZ24ub3JnL2Nwcy9jaGFtYmVyc2lnbnJvb3QuaHRtbDANBgkqhkiG9w0BAQUFAAOCAQEA +PDtwkfkEVCeR4e3t/mh/YV3lQWVPMvEYBZRqHN4fcNs+ezICNLUMbKGKfKX0j//U2K0X1S0E0T9Y +gOKBWYi+wONGkyT+kL0mojAt6JcmVzWJdJYY9hXiryQZVgICsroPFOrGimbBhkVVi76SvpykBMdJ +PJ7oKXqJ1/6v/2j1pReQvayZzKWGVwlnRtvWFsJG8eSpUPWP0ZIV018+xgBJOm5YstHRJw0lyDL4 +IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes +t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== +-----END CERTIFICATE----- + +NetLock Qualified (Class QA) Root +================================= +-----BEGIN CERTIFICATE----- +MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQDEzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVn +eXpvaSAoQ2xhc3MgUUEpIFRhbnVzaXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0 +bG9jay5odTAeFw0wMzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTER +MA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNhZ2kgS2Z0 +LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5ldExvY2sgTWlub3NpdGV0 +dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZhbnlraWFkbzEeMBwGCSqGSIb3DQEJARYP +aW5mb0BuZXRsb2NrLmh1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx1Ilstg91IRV +CacbvWy5FPSKAtt2/GoqeKvld/Bu4IwjZ9ulZJm53QE+b+8tmjwi8F3JV6BVQX/yQ15YglMxZc4e +8ia6AFQer7C8HORSjKAyr7c3sVNnaHRnUPYtLmTeriZ539+Zhqurf4XsoPuAzPS4DB6TRWO53Lhb +m+1bOdRfYrCnjnxmOCyqsQhjF2d9zL2z8cM/z1A57dEZgxXbhxInlrfa6uWdvLrqOU+L73Sa58XQ +0uqGURzk/mQIKAR5BevKxXEOC++r6uwSEaEYBTJp0QwsGj0lmT+1fMptsK6ZmfoIYOcZwvK9UdPM +0wKswREMgM6r3JSda6M5UzrWhQIDAMV9o4ICwDCCArwwEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV +HQ8BAf8EBAMCAQYwggJ1BglghkgBhvhCAQ0EggJmFoICYkZJR1lFTEVNISBFemVuIHRhbnVzaXR2 +YW55IGEgTmV0TG9jayBLZnQuIE1pbm9zaXRldHQgU3pvbGdhbHRhdGFzaSBTemFiYWx5emF0YWJh +biBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBBIG1pbm9zaXRldHQgZWxla3Ryb25p +a3VzIGFsYWlyYXMgam9naGF0YXMgZXJ2ZW55ZXN1bGVzZW5laywgdmFsYW1pbnQgZWxmb2dhZGFz +YW5hayBmZWx0ZXRlbGUgYSBNaW5vc2l0ZXR0IFN6b2xnYWx0YXRhc2kgU3phYmFseXphdGJhbiwg +YXogQWx0YWxhbm9zIFN6ZXJ6b2Rlc2kgRmVsdGV0ZWxla2JlbiBlbG9pcnQgZWxsZW5vcnplc2kg +ZWxqYXJhcyBtZWd0ZXRlbGUuIEEgZG9rdW1lbnR1bW9rIG1lZ3RhbGFsaGF0b2sgYSBodHRwczov +L3d3dy5uZXRsb2NrLmh1L2RvY3MvIGNpbWVuIHZhZ3kga2VyaGV0b2sgYXogaW5mb0BuZXRsb2Nr +Lm5ldCBlLW1haWwgY2ltZW4uIFdBUk5JTkchIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0 +aGlzIGNlcnRpZmljYXRlIGFyZSBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIFF1YWxpZmllZCBDUFMg +YXZhaWxhYmxlIGF0IGh0dHBzOi8vd3d3Lm5ldGxvY2suaHUvZG9jcy8gb3IgYnkgZS1tYWlsIGF0 +IGluZm9AbmV0bG9jay5uZXQwHQYDVR0OBBYEFAlqYhaSsFq7VQ7LdTI6MuWyIckoMA0GCSqGSIb3 +DQEBBQUAA4IBAQCRalCc23iBmz+LQuM7/KbD7kPgz/PigDVJRXYC4uMvBcXxKufAQTPGtpvQMznN +wNuhrWw3AkxYQTvyl5LGSKjN5Yo5iWH5Upfpvfb5lHTocQ68d4bDBsxafEp+NFAwLvt/MpqNPfMg +W/hqyobzMUwsWYACff44yTB1HLdV47yfuqhthCgFdbOLDcCRVCHnpgu0mfVRQdzNo0ci2ccBgcTc +R08m6h/t280NmPSjnLRzMkqWmf68f8glWPhY83ZmiVSkpj7EUFy6iRiCdUgh0k8T6GB+B3bbELVR +5qq5aKrN9p2QdRLqOBrKROi3macqaJVmlaut74nLYKkGEsaUR+ko +-----END CERTIFICATE----- + +NetLock Notary (Class A) Root +============================= +-----BEGIN CERTIFICATE----- +MIIGfTCCBWWgAwIBAgICAQMwDQYJKoZIhvcNAQEEBQAwga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQI +EwdIdW5nYXJ5MREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 +dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9j +ayBLb3pqZWd5em9pIChDbGFzcyBBKSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNDIzMTQ0N1oX +DTE5MDIxOTIzMTQ0N1owga8xCzAJBgNVBAYTAkhVMRAwDgYDVQQIEwdIdW5nYXJ5MREwDwYDVQQH +EwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6dG9uc2FnaSBLZnQuMRowGAYD +VQQLExFUYW51c2l0dmFueWtpYWRvazE2MDQGA1UEAxMtTmV0TG9jayBLb3pqZWd5em9pIChDbGFz +cyBBKSBUYW51c2l0dmFueWtpYWRvMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvHSM +D7tM9DceqQWC2ObhbHDqeLVu0ThEDaiDzl3S1tWBxdRL51uUcCbbO51qTGL3cfNk1mE7PetzozfZ +z+qMkjvN9wfcZnSX9EUi3fRc4L9t875lM+QVOr/bmJBVOMTtplVjC7B4BPTjbsE/jvxReB+SnoPC +/tmwqcm8WgD/qaiYdPv2LD4VOQ22BFWoDpggQrOxJa1+mm9dU7GrDPzr4PN6s6iz/0b2Y6LYOph7 +tqyF/7AlT3Rj5xMHpQqPBffAZG9+pyeAlt7ULoZgx2srXnN7F+eRP2QM2EsiNCubMvJIH5+hCoR6 +4sKtlz2O1cH5VqNQ6ca0+pii7pXmKgOM3wIDAQABo4ICnzCCApswDgYDVR0PAQH/BAQDAgAGMBIG +A1UdEwEB/wQIMAYBAf8CAQQwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaC +Ak1GSUdZRUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pv +bGdhbHRhdGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQu +IEEgaGl0ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2Vn +LWJpenRvc2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0 +ZXRlbGUgYXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFz +IGxlaXJhc2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBh +IGh0dHBzOi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVu +b3J6ZXNAbmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBh +bmQgdGhlIHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sg +Q1BTIGF2YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFp +bCBhdCBjcHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4IBAQBIJEb3ulZv+sgoA0BO5TE5 +ayZrU3/b39/zcT0mwBQOxmd7I6gMc90Bu8bKbjc5VdXHjFYgDigKDtIqpLBJUsY4B/6+CgmM0ZjP +ytoUMaFP0jn8DxEsQ8Pdq5PHVT5HfBgaANzze9jyf1JsIPQLX2lS9O74silg6+NJMSEN1rUQQeJB +CWziGppWS3cC9qCbmieH6FUpccKQn0V4GuEVZD3QDtigdp+uxdAu6tYPVuxkf1qbFFgBJ34TUMdr +KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM +8CgHrTwXZoi1/baI +-----END CERTIFICATE----- + +NetLock Business (Class B) Root +=============================== +-----BEGIN CERTIFICATE----- +MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg +VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD +VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv +bnNhZ2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5ldExvY2sg +VXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB +iQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xKgZjupNTKihe5In+DCnVMm8Bp2GQ5o+2S +o/1bXHQawEfKOml2mrriRBf8TKPV/riXiK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr +1nGTLbO/CVRY7QbrqHvcQ7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV +HQ8BAf8EBAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZ +RUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRh +dGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQuIEEgaGl0 +ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRv +c2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUg +YXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh +c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBz +Oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA +bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl +IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2 +YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj +cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM +43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR +stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI +-----END CERTIFICATE----- + +NetLock Express (Class C) Root +============================== +-----BEGIN CERTIFICATE----- +MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT +CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV +BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD +KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ +BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 +dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j +ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB +jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNAOoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3Z +W3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63 +euyucYT2BDMIJTLrdKwWRMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQw +DgYDVR0PAQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEWggJN +RklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0YWxhbm9zIFN6b2xn +YWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBB +IGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBOZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1i +aXp0b3NpdGFzYSB2ZWRpLiBBIGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0 +ZWxlIGF6IGVsb2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs +ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25sYXBqYW4gYSBo +dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kga2VyaGV0byBheiBlbGxlbm9y +emVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4gSU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5k +IHRoZSB1c2Ugb2YgdGhpcyBjZXJ0aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQ +UyBhdmFpbGFibGUgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwg +YXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2 +xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW +gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== +-----END CERTIFICATE----- + +XRamp Global CA Root +==================== +-----BEGIN CERTIFICATE----- +MIIEMDCCAxigAwIBAgIQUJRs7Bjq1ZxN1ZfvdY+grTANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UE +BhMCVVMxHjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2Vj +dXJpdHkgU2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDQxMTAxMTcxNDA0WhcNMzUwMTAxMDUzNzE5WjCBgjELMAkGA1UEBhMCVVMx +HjAcBgNVBAsTFXd3dy54cmFtcHNlY3VyaXR5LmNvbTEkMCIGA1UEChMbWFJhbXAgU2VjdXJpdHkg +U2VydmljZXMgSW5jMS0wKwYDVQQDEyRYUmFtcCBHbG9iYWwgQ2VydGlmaWNhdGlvbiBBdXRob3Jp +dHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCYJB69FbS638eMpSe2OAtp87ZOqCwu +IR1cRN8hXX4jdP5efrRKt6atH67gBhbim1vZZ3RrXYCPKZ2GG9mcDZhtdhAoWORlsH9KmHmf4MMx +foArtYzAQDsRhtDLooY2YKTVMIJt2W7QDxIEM5dfT2Fa8OT5kavnHTu86M/0ay00fOJIYRyO82FE +zG+gSqmUsE3a56k0enI4qEHMPJQRfevIpoy3hsvKMzvZPTeL+3o+hiznc9cKV6xkmxnr9A8ECIqs +AxcZZPRaJSKNNCyy9mgdEm3Tih4U2sSPpuIjhdV6Db1q4Ons7Be7QhtnqiXtRYMh/MHJfNViPvry +xS3T/dRlAgMBAAGjgZ8wgZwwEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFMZPoj0GY4QJnM5i5ASsjVy16bYbMDYGA1UdHwQvMC0wK6Ap +oCeGJWh0dHA6Ly9jcmwueHJhbXBzZWN1cml0eS5jb20vWEdDQS5jcmwwEAYJKwYBBAGCNxUBBAMC +AQEwDQYJKoZIhvcNAQEFBQADggEBAJEVOQMBG2f7Shz5CmBbodpNl2L5JFMn14JkTpAuw0kbK5rc +/Kh4ZzXxHfARvbdI4xD2Dd8/0sm2qlWkSLoC295ZLhVbO50WfUfXN+pfTXYSNrsf16GBBEYgoyxt +qZ4Bfj8pzgCT3/3JknOJiWSe5yvkHJEs0rnOfc5vMZnT5r7SHpDwCRR5XCOrTdLaIR9NmXmd4c8n +nxCbHIgNsIpkQTG4DmyQJKSbXHGPurt+HBvbaoAPIbzp26a3QPSyi6mx5O+aGtA9aZnuqCij4Tyz +8LIRnM98QObd50N9otg6tamN8jSZxNQQ4Qb9CYQQO+7ETPTsJ3xCwnR8gooJybQDJbw= +-----END CERTIFICATE----- + +Go Daddy Class 2 CA +=================== +-----BEGIN CERTIFICATE----- +MIIEADCCAuigAwIBAgIBADANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMY +VGhlIEdvIERhZGR5IEdyb3VwLCBJbmMuMTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5MB4XDTA0MDYyOTE3MDYyMFoXDTM0MDYyOTE3MDYyMFowYzELMAkG +A1UEBhMCVVMxITAfBgNVBAoTGFRoZSBHbyBEYWRkeSBHcm91cCwgSW5jLjExMC8GA1UECxMoR28g +RGFkZHkgQ2xhc3MgMiBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCASAwDQYJKoZIhvcNAQEBBQAD +ggENADCCAQgCggEBAN6d1+pXGEmhW+vXX0iG6r7d/+TvZxz0ZWizV3GgXne77ZtJ6XCAPVYYYwhv +2vLM0D9/AlQiVBDYsoHUwHU9S3/Hd8M+eKsaA7Ugay9qK7HFiH7Eux6wwdhFJ2+qN1j3hybX2C32 +qRe3H3I2TqYXP2WYktsqbl2i/ojgC95/5Y0V4evLOtXiEqITLdiOr18SPaAIBQi2XKVlOARFmR6j +YGB0xUGlcmIbYsUfb18aQr4CUWWoriMYavx4A6lNf4DD+qta/KFApMoZFv6yyO9ecw3ud72a9nmY +vLEHZ6IVDd2gWMZEewo+YihfukEHU1jPEX44dMX4/7VpkI+EdOqXG68CAQOjgcAwgb0wHQYDVR0O +BBYEFNLEsNKR1EwRcbNhyz2h/t2oatTjMIGNBgNVHSMEgYUwgYKAFNLEsNKR1EwRcbNhyz2h/t2o +atTjoWekZTBjMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYVGhlIEdvIERhZGR5IEdyb3VwLCBJbmMu +MTEwLwYDVQQLEyhHbyBEYWRkeSBDbGFzcyAyIENlcnRpZmljYXRpb24gQXV0aG9yaXR5ggEAMAwG +A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADJL87LKPpH8EsahB4yOd6AzBhRckB4Y9wim +PQoZ+YeAEW5p5JYXMP80kWNyOO7MHAGjHZQopDH2esRU1/blMVgDoszOYtuURXO1v0XJJLXVggKt +I3lpjbi2Tc7PTMozI+gciKqdi0FuFskg5YmezTvacPd+mSYgFFQlq25zheabIZ0KbIIOqPjCDPoQ +HmyW74cNxA9hi63ugyuV+I6ShHI56yDqg+2DzZduCLzrTia2cyvk0/ZM/iZx4mERdEr/VxqHD3VI +Ls9RaRegAhJhldXRQLIQTO7ErBBDpqWeCtWVYpoNz4iCxTIM5CufReYNnyicsbkqWletNw+vHX/b +vZ8= +-----END CERTIFICATE----- + +Starfield Class 2 CA +==================== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBADANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJVUzElMCMGA1UEChMc +U3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAGA1UECxMpU3RhcmZpZWxkIENsYXNzIDIg +Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDQwNjI5MTczOTE2WhcNMzQwNjI5MTczOTE2WjBo +MQswCQYDVQQGEwJVUzElMCMGA1UEChMcU3RhcmZpZWxkIFRlY2hub2xvZ2llcywgSW5jLjEyMDAG +A1UECxMpU3RhcmZpZWxkIENsYXNzIDIgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEgMA0GCSqG +SIb3DQEBAQUAA4IBDQAwggEIAoIBAQC3Msj+6XGmBIWtDBFk385N78gDGIc/oav7PKaf8MOh2tTY +bitTkPskpD6E8J7oX+zlJ0T1KKY/e97gKvDIr1MvnsoFAZMej2YcOadN+lq2cwQlZut3f+dZxkqZ +JRRU6ybH838Z1TBwj6+wRir/resp7defqgSHo9T5iaU0X9tDkYI22WY8sbi5gv2cOj4QyDvvBmVm +epsZGD3/cVE8MC5fvj13c7JdBmzDI1aaK4UmkhynArPkPw2vCHmCuDY96pzTNbO8acr1zJ3o/WSN +F4Azbl5KXZnJHoe0nRrA1W4TNSNe35tfPe/W93bC6j67eA0cQmdrBNj41tpvi/JEoAGrAgEDo4HF +MIHCMB0GA1UdDgQWBBS/X7fRzt0fhvRbVazc1xDCDqmI5zCBkgYDVR0jBIGKMIGHgBS/X7fRzt0f +hvRbVazc1xDCDqmI56FspGowaDELMAkGA1UEBhMCVVMxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNo +bm9sb2dpZXMsIEluYy4xMjAwBgNVBAsTKVN0YXJmaWVsZCBDbGFzcyAyIENlcnRpZmljYXRpb24g +QXV0aG9yaXR5ggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAAWdP4id0ckaVaGs +afPzWdqbAYcaT1epoXkJKtv3L7IezMdeatiDh6GX70k1PncGQVhiv45YuApnP+yz3SFmH8lU+nLM +PUxA2IGvd56Deruix/U0F47ZEUD0/CwqTRV/p2JdLiXTAAsgGh1o+Re49L2L7ShZ3U0WixeDyLJl +xy16paq8U4Zt3VekyvggQQto8PT7dL5WXXp59fkdheMtlb71cZBDzI0fmgAKhynpVSJYACPq4xJD +KVtHCN2MQWplBqjlIapBtJUhlbl90TSrE9atvNziPTnNvT51cKEYWQPJIrSPnNVeKtelttQKbfi3 +QBFGmh95DmK/D5fs4C8fF5Q= +-----END CERTIFICATE----- + +StartCom Certification Authority +================================ +-----BEGIN CERTIFICATE----- +MIIHyTCCBbGgAwIBAgIBATANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMN +U3RhcnRDb20gTHRkLjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmlu +ZzEpMCcGA1UEAxMgU3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMDYwOTE3MTk0 +NjM2WhcNMzYwOTE3MTk0NjM2WjB9MQswCQYDVQQGEwJJTDEWMBQGA1UEChMNU3RhcnRDb20gTHRk +LjErMCkGA1UECxMiU2VjdXJlIERpZ2l0YWwgQ2VydGlmaWNhdGUgU2lnbmluZzEpMCcGA1UEAxMg +U3RhcnRDb20gQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw +ggIKAoICAQDBiNsJvGxGfHiflXu1M5DycmLWwTYgIiRezul38kMKogZkpMyONvg45iPwbm2xPN1y +o4UcodM9tDMr0y+v/uqwQVlntsQGfQqedIXWeUyAN3rfOQVSWff0G0ZDpNKFhdLDcfN1YjS6LIp/ +Ho/u7TTQEceWzVI9ujPW3U3eCztKS5/CJi/6tRYccjV3yjxd5srhJosaNnZcAdt0FCX+7bWgiA/d +eMotHweXMAEtcnn6RtYTKqi5pquDSR3l8u/d5AGOGAqPY1MWhWKpDhk6zLVmpsJrdAfkK+F2PrRt +2PZE4XNiHzvEvqBTViVsUQn3qqvKv3b9bZvzndu/PWa8DFaqr5hIlTpL36dYUNk4dalb6kMMAv+Z +6+hsTXBbKWWc3apdzK8BMewM69KN6Oqce+Zu9ydmDBpI125C4z/eIT574Q1w+2OqqGwaVLRcJXrJ +osmLFqa7LH4XXgVNWG4SHQHuEhANxjJ/GP/89PrNbpHoNkm+Gkhpi8KWTRoSsmkXwQqQ1vp5Iki/ +untp+HDH+no32NgN0nZPV/+Qt+OR0t3vwmC3Zzrd/qqc8NSLf3Iizsafl7b4r4qgEKjZ+xjGtrVc +UjyJthkqcwEKDwOzEmDyei+B26Nu/yYwl/WL3YlXtq09s68rxbd2AvCl1iuahhQqcvbjM4xdCUsT +37uMdBNSSwIDAQABo4ICUjCCAk4wDAYDVR0TBAUwAwEB/zALBgNVHQ8EBAMCAa4wHQYDVR0OBBYE +FE4L7xqkQFulF2mHMMo0aEPQQa7yMGQGA1UdHwRdMFswLKAqoCiGJmh0dHA6Ly9jZXJ0LnN0YXJ0 +Y29tLm9yZy9zZnNjYS1jcmwuY3JsMCugKaAnhiVodHRwOi8vY3JsLnN0YXJ0Y29tLm9yZy9zZnNj +YS1jcmwuY3JsMIIBXQYDVR0gBIIBVDCCAVAwggFMBgsrBgEEAYG1NwEBATCCATswLwYIKwYBBQUH +AgEWI2h0dHA6Ly9jZXJ0LnN0YXJ0Y29tLm9yZy9wb2xpY3kucGRmMDUGCCsGAQUFBwIBFilodHRw +Oi8vY2VydC5zdGFydGNvbS5vcmcvaW50ZXJtZWRpYXRlLnBkZjCB0AYIKwYBBQUHAgIwgcMwJxYg +U3RhcnQgQ29tbWVyY2lhbCAoU3RhcnRDb20pIEx0ZC4wAwIBARqBl0xpbWl0ZWQgTGlhYmlsaXR5 +LCByZWFkIHRoZSBzZWN0aW9uICpMZWdhbCBMaW1pdGF0aW9ucyogb2YgdGhlIFN0YXJ0Q29tIENl +cnRpZmljYXRpb24gQXV0aG9yaXR5IFBvbGljeSBhdmFpbGFibGUgYXQgaHR0cDovL2NlcnQuc3Rh +cnRjb20ub3JnL3BvbGljeS5wZGYwEQYJYIZIAYb4QgEBBAQDAgAHMDgGCWCGSAGG+EIBDQQrFilT +dGFydENvbSBGcmVlIFNTTCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTANBgkqhkiG9w0BAQUFAAOC +AgEAFmyZ9GYMNPXQhV59CuzaEE44HF7fpiUFS5Eyweg78T3dRAlbB0mKKctmArexmvclmAk8jhvh +3TaHK0u7aNM5Zj2gJsfyOZEdUauCe37Vzlrk4gNXcGmXCPleWKYK34wGmkUWFjgKXlf2Ysd6AgXm +vB618p70qSmD+LIU424oh0TDkBreOKk8rENNZEXO3SipXPJzewT4F+irsfMuXGRuczE6Eri8sxHk +fY+BUZo7jYn0TZNmezwD7dOaHZrzZVD1oNB1ny+v8OqCQ5j4aZyJecRDjkZy42Q2Eq/3JR44iZB3 +fsNrarnDy0RLrHiQi+fHLB5LEUTINFInzQpdn4XBidUaePKVEFMy3YCEZnXZtWgo+2EuvoSoOMCZ +EoalHmdkrQYuL6lwhceWD3yJZfWOQ1QOq92lgDmUYMA0yZZwLKMS9R9Ie70cfmu3nZD0Ijuu+Pwq +yvqCUqDvr0tVk+vBtfAii6w0TiYiBKGHLHVKt+V9E9e4DGTANtLJL4YSjCMJwRuCO3NJo2pXh5Tl +1njFmUNj403gdy3hZZlyaQQaRwnmDwFWJPsfvw55qVguucQJAX6Vum0ABj6y6koQOdjQK/W/7HW/ +lwLFCRsI3FU34oH7N4RDYiDK51ZLZer+bMEkkyShNOsF/5oirpt9P/FlUQqmMGqz9IgcgA38coro +g14= +-----END CERTIFICATE----- + +Taiwan GRCA +=========== +-----BEGIN CERTIFICATE----- +MIIFcjCCA1qgAwIBAgIQH51ZWtcvwgZEpYAIaeNe9jANBgkqhkiG9w0BAQUFADA/MQswCQYDVQQG +EwJUVzEwMC4GA1UECgwnR292ZXJubWVudCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4X +DTAyMTIwNTEzMjMzM1oXDTMyMTIwNTEzMjMzM1owPzELMAkGA1UEBhMCVFcxMDAuBgNVBAoMJ0dv +dmVybm1lbnQgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTCCAiIwDQYJKoZIhvcNAQEBBQAD +ggIPADCCAgoCggIBAJoluOzMonWoe/fOW1mKydGGEghU7Jzy50b2iPN86aXfTEc2pBsBHH8eV4qN +w8XRIePaJD9IK/ufLqGU5ywck9G/GwGHU5nOp/UKIXZ3/6m3xnOUT0b3EEk3+qhZSV1qgQdW8or5 +BtD3cCJNtLdBuTK4sfCxw5w/cP1T3YGq2GN49thTbqGsaoQkclSGxtKyyhwOeYHWtXBiCAEuTk8O +1RGvqa/lmr/czIdtJuTJV6L7lvnM4T9TjGxMfptTCAtsF/tnyMKtsc2AtJfcdgEWFelq16TheEfO +htX7MfP6Mb40qij7cEwdScevLJ1tZqa2jWR+tSBqnTuBto9AAGdLiYa4zGX+FVPpBMHWXx1E1wov +J5pGfaENda1UhhXcSTvxls4Pm6Dso3pdvtUqdULle96ltqqvKKyskKw4t9VoNSZ63Pc78/1Fm9G7 +Q3hub/FCVGqY8A2tl+lSXunVanLeavcbYBT0peS2cWeqH+riTcFCQP5nRhc4L0c/cZyu5SHKYS1t +B6iEfC3uUSXxY5Ce/eFXiGvviiNtsea9P63RPZYLhY3Naye7twWb7LuRqQoHEgKXTiCQ8P8NHuJB +O9NAOueNXdpm5AKwB1KYXA6OM5zCppX7VRluTI6uSw+9wThNXo+EHWbNxWCWtFJaBYmOlXqYwZE8 +lSOyDvR5tMl8wUohAgMBAAGjajBoMB0GA1UdDgQWBBTMzO/MKWCkO7GStjz6MmKPrCUVOzAMBgNV +HRMEBTADAQH/MDkGBGcqBwAEMTAvMC0CAQAwCQYFKw4DAhoFADAHBgVnKgMAAAQUA5vwIhP/lSg2 +09yewDL7MTqKUWUwDQYJKoZIhvcNAQEFBQADggIBAECASvomyc5eMN1PhnR2WPWus4MzeKR6dBcZ +TulStbngCnRiqmjKeKBMmo4sIy7VahIkv9Ro04rQ2JyftB8M3jh+Vzj8jeJPXgyfqzvS/3WXy6Tj +Zwj/5cAWtUgBfen5Cv8b5Wppv3ghqMKnI6mGq3ZW6A4M9hPdKmaKZEk9GhiHkASfQlK3T8v+R0F2 +Ne//AHY2RTKbxkaFXeIksB7jSJaYV0eUVXoPQbFEJPPB/hprv4j9wabak2BegUqZIJxIZhm1AHlU +D7gsL0u8qV1bYH+Mh6XgUmMqvtg7hUAV/h62ZT/FS9p+tXo1KaMuephgIqP0fSdOLeq0dDzpD6Qz +DxARvBMB1uUO07+1EqLhRSPAzAhuYbeJq4PjJB7mXQfnHyA+z2fI56wwbSdLaG5LKlwCCDTb+Hbk +Z6MmnD+iMsJKxYEYMRBWqoTvLQr/uB930r+lWKBi5NdLkXWNiYCYfm3LU05er/ayl4WXudpVBrkk +7tfGOB5jGxI7leFYrPLfhNVfmS8NVVvmONsuP3LpSIXLuykTjx44VbnzssQwmSNOXfJIoRIM3BKQ +CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy ++fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS +-----END CERTIFICATE----- + +Firmaprofesional Root CA +======================== +-----BEGIN CERTIFICATE----- +MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT +GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp +Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA +ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTEL +MAkGA1UEBhMCRVMxIjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMT +OUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2 +ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20wggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5uCp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5V +j1H5WuretXDE7aTt/6MNbg9kUDGvASdYrv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJH +lShbz++AbOCQl4oBPB3zhxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf +3H5idPayBQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcLiam8 +NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcbAgMBAAGjgZ8wgZww +KgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lvbmFsLmNvbTASBgNVHRMBAf8ECDAG +AQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1Ud +DwEB/wQEAwIBBjAdBgNVHQ4EFgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQAD +ggEBAEdz/o0nVPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq +u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36mhoEyIwOdyPdf +wUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzflZKG+TQyTmAyX9odtsz/ny4Cm +7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBpQWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YG +VM+h4k0460tQtcsm9MracEpqoeJ5quGnM/b9Sh/22WA= +-----END CERTIFICATE----- + +Wells Fargo Root CA +=================== +-----BEGIN CERTIFICATE----- +MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxFDASBgNV +BAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhv +cml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN +MDAxMDExMTY0MTI4WhcNMjEwMTE0MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dl +bGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEv +MC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG +SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n135zHCLielTWi5MbqNQ1mX +x3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHESxP9cMIlrCL1dQu3U+SlK93OvRw6esP3 +E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4OJgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5 +OEL8pahbSCOz6+MlsoCultQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4j +sNtlAHCEAQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMBAAGj +YTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcBCzAyMDAGCCsGAQUF +BwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRwb2xpY3kwDQYJKoZIhvcNAQEFBQAD +ggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrv +m+0fazbuSCUlFLZWohDo7qd/0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0R +OhPs7fpvcmR7nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx +x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ33ZwmVxwQ023 +tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s= +-----END CERTIFICATE----- + +Swisscom Root CA 1 +================== +-----BEGIN CERTIFICATE----- +MIIF2TCCA8GgAwIBAgIQXAuFXAvnWUHfV8w/f52oNjANBgkqhkiG9w0BAQUFADBkMQswCQYDVQQG +EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy +dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMTAeFw0wNTA4MTgxMjA2MjBaFw0yNTA4 +MTgyMjA2MjBaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln +aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAxMIIC +IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0LmwqAzZuz8h+BvVM5OAFmUgdbI9m2BtRsiM +MW8Xw/qabFbtPMWRV8PNq5ZJkCoZSx6jbVfd8StiKHVFXqrWW/oLJdihFvkcxC7mlSpnzNApbjyF +NDhhSbEAn9Y6cV9Nbc5fuankiX9qUvrKm/LcqfmdmUc/TilftKaNXXsLmREDA/7n29uj/x2lzZAe +AR81sH8A25Bvxn570e56eqeqDFdvpG3FEzuwpdntMhy0XmeLVNxzh+XTF3xmUHJd1BpYwdnP2IkC +b6dJtDZd0KTeByy2dbcokdaXvij1mB7qWybJvbCXc9qukSbraMH5ORXWZ0sKbU/Lz7DkQnGMU3nn +7uHbHaBuHYwadzVcFh4rUx80i9Fs/PJnB3r1re3WmquhsUvhzDdf/X/NTa64H5xD+SpYVUNFvJbN +cA78yeNmuk6NO4HLFWR7uZToXTNShXEuT46iBhFRyePLoW4xCGQMwtI89Tbo19AOeCMgkckkKmUp +WyL3Ic6DXqTz3kvTaI9GdVyDCW4pa8RwjPWd1yAv/0bSKzjCL3UcPX7ape8eYIVpQtPM+GP+HkM5 +haa2Y0EQs3MevNP6yn0WR+Kn1dCjigoIlmJWbjTb2QK5MHXjBNLnj8KwEUAKrNVxAmKLMb7dxiNY +MUJDLXT5xp6mig/p/r+D5kNXJLrvRjSq1xIBOO0CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw +HQYDVR0hBBYwFDASBgdghXQBUwABBgdghXQBUwABMBIGA1UdEwEB/wQIMAYBAf8CAQcwHwYDVR0j +BBgwFoAUAyUv3m+CATpcLNwroWm1Z9SM0/0wHQYDVR0OBBYEFAMlL95vggE6XCzcK6FptWfUjNP9 +MA0GCSqGSIb3DQEBBQUAA4ICAQA1EMvspgQNDQ/NwNurqPKIlwzfky9NfEBWMXrrpA9gzXrzvsMn +jgM+pN0S734edAY8PzHyHHuRMSG08NBsl9Tpl7IkVh5WwzW9iAUPWxAaZOHHgjD5Mq2eUCzneAXQ +MbFamIp1TpBcahQq4FJHgmDmHtqBsfsUC1rxn9KVuj7QG9YVHaO+htXbD8BJZLsuUBlL0iT43R4H +VtA4oJVwIHaM190e3p9xxCPvgxNcoyQVTSlAPGrEqdi3pkSlDfTgnXceQHAm/NrZNuR55LU/vJtl +vrsRls/bxig5OgjOR1tTWsWZ/l2p3e9M1MalrQLmjAcSHm8D0W+go/MpvRLHUKKwf4ipmXeascCl +OS5cfGniLLDqN2qk4Vrh9VDlg++luyqI54zb/W1elxmofmZ1a3Hqv7HHb6D0jqTsNFFbjCYDcKF3 +1QESVwA12yPeDooomf2xEG9L/zgtYE4snOtnta1J7ksfrK/7DZBaZmBwXarNeNQk7shBoJMBkpxq +nvy5JMWzFYJ+vq6VK+uxwNrjAWALXmmshFZhvnEX/h0TD/7Gh0Xp/jKgGg0TpJRVcaUWi7rKibCy +x/yP2FS1k2Kdzs9Z+z0YzirLNRWCXf9UIltxUvu3yf5gmwBBZPCqKuy2QkPOiWaByIufOVQDJdMW +NY6E0F/6MBr1mmz0DlP5OlvRHA== +-----END CERTIFICATE----- + +DigiCert Assured ID Root CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDtzCCAp+gAwIBAgIQDOfg5RfYRv6P5WD8G/AwOTANBgkqhkiG9w0BAQUFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0EwHhcNMDYxMTEwMDAwMDAwWhcNMzEx +MTEwMDAwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgQ0Ew +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtDhXO5EOAXLGH87dg+XESpa7cJpSIqvTO +9SA5KFhgDPiA2qkVlTJhPLWxKISKityfCgyDF3qPkKyK53lTXDGEKvYPmDI2dsze3Tyoou9q+yHy +UmHfnyDXH+Kx2f4YZNISW1/5WBg1vEfNoTb5a3/UsDg+wRvDjDPZ2C8Y/igPs6eD1sNuRMBhNZYW +/lmci3Zt1/GiSw0r/wty2p5g0I6QNcZ4VYcgoc/lbQrISXwxmDNsIumH0DJaoroTghHtORedmTpy +oeb6pNnVFzF1roV9Iq4/AUaG9ih5yLHa5FcXxH4cDrC0kqZWs72yl+2qp/C3xag/lRbQ/6GW6whf +GHdPAgMBAAGjYzBhMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRF +66Kv9JLLgjEtUYunpyGd823IDzAfBgNVHSMEGDAWgBRF66Kv9JLLgjEtUYunpyGd823IDzANBgkq +hkiG9w0BAQUFAAOCAQEAog683+Lt8ONyc3pklL/3cmbYMuRCdWKuh+vy1dneVrOfzM4UKLkNl2Bc +EkxY5NM9g0lFWJc1aRqoR+pWxnmrEthngYTffwk8lOa4JiwgvT2zKIn3X/8i4peEH+ll74fg38Fn +SbNd67IJKusm7Xi+fT8r87cmNW1fiQG2SVufAQWbqz0lwcy2f8Lxb4bG+mRo64EtlOtCt/qMHt1i +8b5QZ7dsvfPxH2sMNgcWfzd8qVttevESRmCD1ycEvkvOl77DZypoEd+A5wwzZr8TDRRu838fYxAe ++o0bJW1sj6W3YQGx0qMmoRBxna3iw/nDmVG3KwcIzi7mULKn+gpFL6Lw8g== +-----END CERTIFICATE----- + +DigiCert Global Root CA +======================= +-----BEGIN CERTIFICATE----- +MIIDrzCCApegAwIBAgIQCDvgVpBCRrGhdWrJWZHHSjANBgkqhkiG9w0BAQUFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBDQTAeFw0wNjExMTAwMDAwMDBaFw0zMTExMTAw +MDAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IENBMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4jvhEXLeqKTTo1eqUKKPC3eQyaKl7hLOllsBCSDMAZOn +TjC3U/dDxGkAV53ijSLdhwZAAIEJzs4bg7/fzTtxRuLWZscFs3YnFo97nh6Vfe63SKMI2tavegw5 +BmV/Sl0fvBf4q77uKNd0f3p4mVmFaG5cIzJLv07A6Fpt43C/dxC//AH2hdmoRBBYMql1GNXRor5H +4idq9Joz+EkIYIvUX7Q6hL+hqkpMfT7PT19sdl6gSzeRntwi5m3OFBqOasv+zbMUZBfHWymeMr/y +7vrTC0LUq7dBMtoM1O/4gdW7jVg/tRvoSSiicNoxBN33shbyTApOB6jtSj1etX+jkMOvJwIDAQAB +o2MwYTAOBgNVHQ8BAf8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUA95QNVbRTLtm +8KPiGxvDl7I90VUwHwYDVR0jBBgwFoAUA95QNVbRTLtm8KPiGxvDl7I90VUwDQYJKoZIhvcNAQEF +BQADggEBAMucN6pIExIK+t1EnE9SsPTfrgT1eXkIoyQY/EsrhMAtudXH/vTBH1jLuG2cenTnmCmr +EbXjcKChzUyImZOMkXDiqw8cvpOp/2PV5Adg06O/nVsJ8dWO41P0jmP6P6fbtGbfYmbW0W5BjfIt +tep3Sp+dWOIrWcBAI+0tKIJFPnlUkiaY4IBIqDfv8NZ5YBberOgOzW6sRBc4L0na4UU+Krk2U886 +UAb3LujEV0lsYSEY1QSteDwsOoBrp+uvFRTp2InBuThs4pFsiv9kuXclVzDAGySj4dzp30d8tbQk +CAUw7C29C79Fv1C5qfPrmAESrciIxpg0X40KPMbp1ZWVbd4= +-----END CERTIFICATE----- + +DigiCert High Assurance EV Root CA +================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIQAqxcJmoLQJuPC3nyrkYldzANBgkqhkiG9w0BAQUFADBsMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSsw +KQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5jZSBFViBSb290IENBMB4XDTA2MTExMDAwMDAw +MFoXDTMxMTExMDAwMDAwMFowbDELMAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZ +MBcGA1UECxMQd3d3LmRpZ2ljZXJ0LmNvbTErMCkGA1UEAxMiRGlnaUNlcnQgSGlnaCBBc3N1cmFu +Y2UgRVYgUm9vdCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMbM5XPm+9S75S0t +Mqbf5YE/yc0lSbZxKsPVlDRnogocsF9ppkCxxLeyj9CYpKlBWTrT3JTWPNt0OKRKzE0lgvdKpVMS +OO7zSW1xkX5jtqumX8OkhPhPYlG++MXs2ziS4wblCJEMxChBVfvLWokVfnHoNb9Ncgk9vjo4UFt3 +MRuNs8ckRZqnrG0AFFoEt7oT61EKmEFBIk5lYYeBQVCmeVyJ3hlKV9Uu5l0cUyx+mM0aBhakaHPQ +NAQTXKFx01p8VdteZOE3hzBWBOURtCmAEvF5OYiiAhF8J2a3iLd48soKqDirCmTCv2ZdlYTBoSUe +h10aUAsgEsxBu24LUTi4S8sCAwEAAaNjMGEwDgYDVR0PAQH/BAQDAgGGMA8GA1UdEwEB/wQFMAMB +Af8wHQYDVR0OBBYEFLE+w2kD+L9HAdSYJhoIAu9jZCvDMB8GA1UdIwQYMBaAFLE+w2kD+L9HAdSY +JhoIAu9jZCvDMA0GCSqGSIb3DQEBBQUAA4IBAQAcGgaX3NecnzyIZgYIVyHbIUf4KmeqvxgydkAQ +V8GK83rZEWWONfqe/EW1ntlMMUu4kehDLI6zeM7b41N5cdblIZQB2lWHmiRk9opmzN6cN82oNLFp +myPInngiK3BD41VHMWEZ71jFhS9OMPagMRYjyOfiZRYzy78aG6A9+MpeizGLYAiJLQwGXFK3xPkK +mNEVX58Svnw2Yzi9RKR/5CYrCsSXaQ3pjOLAEFe4yHYSkVXySGnYvCoCWw9E1CAx2/S6cCZdkGCe +vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep+OkuE6N36B9K +-----END CERTIFICATE----- + +DigiCert High Assurance CA-3 +============================ +-----BEGIN CERTIFICATE----- +MIIGVTCCBT2gAwIBAgIQCFH5WYFBRcq94CTiEsnCDjANBgkqhkiG9w0BAQUFADBs +MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSswKQYDVQQDEyJEaWdpQ2VydCBIaWdoIEFzc3VyYW5j +ZSBFViBSb290IENBMB4XDTA3MDQwMzAwMDAwMFoXDTIyMDQwMzAwMDAwMFowZjEL +MAkGA1UEBhMCVVMxFTATBgNVBAoTDERpZ2lDZXJ0IEluYzEZMBcGA1UECxMQd3d3 +LmRpZ2ljZXJ0LmNvbTElMCMGA1UEAxMcRGlnaUNlcnQgSGlnaCBBc3N1cmFuY2Ug +Q0EtMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL9hCikQH17+NDdR +CPge+yLtYb4LDXBMUGMmdRW5QYiXtvCgFbsIYOBC6AUpEIc2iihlqO8xB3RtNpcv +KEZmBMcqeSZ6mdWOw21PoF6tvD2Rwll7XjZswFPPAAgyPhBkWBATaccM7pxCUQD5 +BUTuJM56H+2MEb0SqPMV9Bx6MWkBG6fmXcCabH4JnudSREoQOiPkm7YDr6ictFuf +1EutkozOtREqqjcYjbTCuNhcBoz4/yO9NV7UfD5+gw6RlgWYw7If48hl66l7XaAs +zPw82W3tzPpLQ4zJ1LilYRyyQLYoEt+5+F/+07LJ7z20Hkt8HEyZNp496+ynaF4d +32duXvsCAwEAAaOCAvcwggLzMA4GA1UdDwEB/wQEAwIBhjCCAcYGA1UdIASCAb0w +ggG5MIIBtQYLYIZIAYb9bAEDAAIwggGkMDoGCCsGAQUFBwIBFi5odHRwOi8vd3d3 +LmRpZ2ljZXJ0LmNvbS9zc2wtY3BzLXJlcG9zaXRvcnkuaHRtMIIBZAYIKwYBBQUH +AgIwggFWHoIBUgBBAG4AeQAgAHUAcwBlACAAbwBmACAAdABoAGkAcwAgAEMAZQBy +AHQAaQBmAGkAYwBhAHQAZQAgAGMAbwBuAHMAdABpAHQAdQB0AGUAcwAgAGEAYwBj +AGUAcAB0AGEAbgBjAGUAIABvAGYAIAB0AGgAZQAgAEQAaQBnAGkAQwBlAHIAdAAg +AEMAUAAvAEMAUABTACAAYQBuAGQAIAB0AGgAZQAgAFIAZQBsAHkAaQBuAGcAIABQ +AGEAcgB0AHkAIABBAGcAcgBlAGUAbQBlAG4AdAAgAHcAaABpAGMAaAAgAGwAaQBt +AGkAdAAgAGwAaQBhAGIAaQBsAGkAdAB5ACAAYQBuAGQAIABhAHIAZQAgAGkAbgBj +AG8AcgBwAG8AcgBhAHQAZQBkACAAaABlAHIAZQBpAG4AIABiAHkAIAByAGUAZgBl +AHIAZQBuAGMAZQAuMA8GA1UdEwEB/wQFMAMBAf8wNAYIKwYBBQUHAQEEKDAmMCQG +CCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wgY8GA1UdHwSBhzCB +hDBAoD6gPIY6aHR0cDovL2NybDMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0SGlnaEFz +c3VyYW5jZUVWUm9vdENBLmNybDBAoD6gPIY6aHR0cDovL2NybDQuZGlnaWNlcnQu +Y29tL0RpZ2lDZXJ0SGlnaEFzc3VyYW5jZUVWUm9vdENBLmNybDAfBgNVHSMEGDAW +gBSxPsNpA/i/RwHUmCYaCALvY2QrwzAdBgNVHQ4EFgQUUOpzidsp+xCPnuUBINTe +eZlIg/cwDQYJKoZIhvcNAQEFBQADggEBAF1PhPGoiNOjsrycbeUpSXfh59bcqdg1 +rslx3OXb3J0kIZCmz7cBHJvUV5eR13UWpRLXuT0uiT05aYrWNTf58SHEW0CtWakv +XzoAKUMncQPkvTAyVab+hA4LmzgZLEN8rEO/dTHlIxxFVbdpCJG1z9fVsV7un5Tk +1nq5GMO41lJjHBC6iy9tXcwFOPRWBW3vnuzoYTYMFEuFFFoMg08iXFnLjIpx2vrF +EIRYzwfu45DC9fkpx1ojcflZtGQriLCnNseaIGHr+k61rmsb5OPs4tk8QUmoIKRU +9ZKNu8BVIASm2LAXFszj0Mi0PeXZhMbT9m5teMl5Q+h6N/9cNUm/ocU= +-----END CERTIFICATE----- + +Certplus Class 2 Primary CA +=========================== +-----BEGIN CERTIFICATE----- +MIIDkjCCAnqgAwIBAgIRAIW9S/PY2uNp9pTXX8OlRCMwDQYJKoZIhvcNAQEFBQAwPTELMAkGA1UE +BhMCRlIxETAPBgNVBAoTCENlcnRwbHVzMRswGQYDVQQDExJDbGFzcyAyIFByaW1hcnkgQ0EwHhcN +OTkwNzA3MTcwNTAwWhcNMTkwNzA2MjM1OTU5WjA9MQswCQYDVQQGEwJGUjERMA8GA1UEChMIQ2Vy +dHBsdXMxGzAZBgNVBAMTEkNsYXNzIDIgUHJpbWFyeSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBANxQltAS+DXSCHh6tlJw/W/uz7kRy1134ezpfgSN1sxvc0NXYKwzCkTsA18cgCSR +5aiRVhKC9+Ar9NuuYS6JEI1rbLqzAr3VNsVINyPi8Fo3UjMXEuLRYE2+L0ER4/YXJQyLkcAbmXuZ +Vg2v7tK8R1fjeUl7NIknJITesezpWE7+Tt9avkGtrAjFGA7v0lPubNCdEgETjdyAYveVqUSISnFO +YFWe2yMZeVYHDD9jC1yw4r5+FfyUM1hBOHTE4Y+L3yasH7WLO7dDWWuwJKZtkIvEcupdM5i3y95e +e++U8Rs+yskhwcWYAqqi9lt3m/V+llU0HGdpwPFC40es/CgcZlUCAwEAAaOBjDCBiTAPBgNVHRME +CDAGAQH/AgEKMAsGA1UdDwQEAwIBBjAdBgNVHQ4EFgQU43Mt38sOKAze3bOkynm4jrvoMIkwEQYJ +YIZIAYb4QgEBBAQDAgEGMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6Ly93d3cuY2VydHBsdXMuY29t +L0NSTC9jbGFzczIuY3JsMA0GCSqGSIb3DQEBBQUAA4IBAQCnVM+IRBnL39R/AN9WM2K191EBkOvD +P9GIROkkXe/nFL0gt5o8AP5tn9uQ3Nf0YtaLcF3n5QRIqWh8yfFC82x/xXp8HVGIutIKPidd3i1R +TtMTZGnkLuPT55sJmabglZvOGtd/vjzOUrMRFcEPF80Du5wlFbqidon8BvEY0JNLDnyCt6X09l/+ +7UCmnYR0ObncHoUW2ikbhiMAybuJfm6AiB4vFLQDJKgybwOaRywwvlbGp0ICcBvqQNi6BQNwB6SW +//1IMwrh3KWBkJtN3X3n57LNXMhqlfil9o3EXXgIvnsG1knPGTZQIy4I5p4FTUcY1Rbpsda2ENW7 +l7+ijrRU +-----END CERTIFICATE----- + +DST Root CA X3 +============== +-----BEGIN CERTIFICATE----- +MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/MSQwIgYDVQQK +ExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMTDkRTVCBSb290IENBIFgzMB4X +DTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVowPzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1 +cmUgVHJ1c3QgQ28uMRcwFQYDVQQDEw5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmT +rE4Orz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEqOLl5CjH9 +UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9bxiqKqy69cK3FCxolkHRy +xXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40d +utolucbY38EVAjqr2m7xPi71XAicPNaDaeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0T +AQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQ +MA0GCSqGSIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69ikug +dB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXrAvHRAosZy5Q6XkjE +GB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZzR8srzJmwN0jP41ZL9c8PDHIyh8bw +RLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubS +fZGL+T0yjWW06XyxV3bqxbYoOb8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ +-----END CERTIFICATE----- + +DST ACES CA X6 +============== +-----BEGIN CERTIFICATE----- +MIIECTCCAvGgAwIBAgIQDV6ZCtadt3js2AdWO4YV2TANBgkqhkiG9w0BAQUFADBbMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QxETAPBgNVBAsTCERTVCBBQ0VT +MRcwFQYDVQQDEw5EU1QgQUNFUyBDQSBYNjAeFw0wMzExMjAyMTE5NThaFw0xNzExMjAyMTE5NTha +MFsxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdDERMA8GA1UE +CxMIRFNUIEFDRVMxFzAVBgNVBAMTDkRTVCBBQ0VTIENBIFg2MIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAuT31LMmU3HWKlV1j6IR3dma5WZFcRt2SPp/5DgO0PWGSvSMmtWPuktKe1jzI +DZBfZIGxqAgNTNj50wUoUrQBJcWVHAx+PhCEdc/BGZFjz+iokYi5Q1K7gLFViYsx+tC3dr5BPTCa +pCIlF3PoHuLTrCq9Wzgh1SpL11V94zpVvddtawJXa+ZHfAjIgrrep4c9oW24MFbCswKBXy314pow +GCi4ZtPLAZZv6opFVdbgnf9nKxcCpk4aahELfrd755jWjHZvwTvbUJN+5dCOHze4vbrGn2zpfDPy +MjwmR/onJALJfh1biEITajV8fTXpLmaRcpPVMibEdPVTo7NdmvYJywIDAQABo4HIMIHFMA8GA1Ud +EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgHGMB8GA1UdEQQYMBaBFHBraS1vcHNAdHJ1c3Rkc3Qu +Y29tMGIGA1UdIARbMFkwVwYKYIZIAWUDAgEBATBJMEcGCCsGAQUFBwIBFjtodHRwOi8vd3d3LnRy +dXN0ZHN0LmNvbS9jZXJ0aWZpY2F0ZXMvcG9saWN5L0FDRVMtaW5kZXguaHRtbDAdBgNVHQ4EFgQU +CXIGThhDD+XWzMNqizF7eI+og7gwDQYJKoZIhvcNAQEFBQADggEBAKPYjtay284F5zLNAdMEA+V2 +5FYrnJmQ6AgwbN99Pe7lv7UkQIRJ4dEorsTCOlMwiPH1d25Ryvr/ma8kXxug/fKshMrfqfBfBC6t +Fr8hlxCBPeP/h40y3JTlR4peahPJlJU90u7INJXQgNStMgiAVDzgvVJT11J8smk/f3rPanTK+gQq +nExaBqXpIK1FZg9p8d2/6eMyi/rgwYZNcjwu2JN4Cir42NInPRmJX1p7ijvMDNpRrscL9yuwNwXs +vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 +oKfN5XozNmr6mis= +-----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 1 +============================================== +-----BEGIN CERTIFICATE----- +MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP +MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0 +acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx +MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg +U2VydGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYDVQQHDAZB +TktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBC +aWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEuxZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GX +yGl8hMW0kWxsE2qkVa2kheiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8i +Si9BB35JYbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5CurKZ +8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1JuTm5Rh8i27fbMx4 +W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51b0dewQIDAQABoxAwDjAMBgNVHRME +BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46 +sWrv7/hg0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE +q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy +B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY +nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H +-----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 2 +============================================== +-----BEGIN CERTIFICATE----- +MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP +MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg +QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN +MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr +dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEPMA0G +A1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls +acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqe +LCDe2JAOCtFp0if7qnefJ1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKI +x+XlZEdhR3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJQv2g +QrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGXJHpsmxcPbe9TmJEr +5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1pzpwACPI2/z7woQ8arBT9pmAPAgMB +AAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58SFq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8G +A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/ntt +Rbj2hWyfIvwqECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4 +Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFzgw2lGh1uEpJ+ +hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P +9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5 +UrbnBEI= +-----END CERTIFICATE----- + +SwissSign Platinum CA - G2 +========================== +-----BEGIN CERTIFICATE----- +MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWduIFBsYXRpbnVtIENBIC0gRzIw +HhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAwWjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMM +U3dpc3NTaWduIEFHMSMwIQYDVQQDExpTd2lzc1NpZ24gUGxhdGludW0gQ0EgLSBHMjCCAiIwDQYJ +KoZIhvcNAQEBBQADggIPADCCAgoCggIBAMrfogLi2vj8Bxax3mCq3pZcZB/HL37PZ/pEQtZ2Y5Wu +669yIIpFR4ZieIbWIDkm9K6j/SPnpZy1IiEZtzeTIsBQnIJ71NUERFzLtMKfkr4k2HtnIuJpX+UF +eNSH2XFwMyVTtIc7KZAoNppVRDBopIOXfw0enHb/FZ1glwCNioUD7IC+6ixuEFGSzH7VozPY1kne +WCqv9hbrS3uQMpe5up1Y8fhXSQQeol0GcN1x2/ndi5objM89o03Oy3z2u5yg+gnOI2Ky6Q0f4nIo +j5+saCB9bzuohTEJfwvH6GXp43gOCWcwizSC+13gzJ2BbWLuCB4ELE6b7P6pT1/9aXjvCR+htL/6 +8++QHkwFix7qepF6w9fl+zC8bBsQWJj3Gl/QKTIDE0ZNYWqFTFJ0LwYfexHihJfGmfNtf9dng34T +aNhxKFrYzt3oEBSa/m0jh26OWnA81Y0JAKeqvLAxN23IhBQeW71FYyBrS3SMvds6DsHPWhaPpZjy +domyExI7C3d3rLvlPClKknLKYRorXkzig3R3+jVIeoVNjZpTxN94ypeRSCtFKwH3HBqi7Ri6Cr2D ++m+8jVeTO9TUps4e8aCxzqv9KyiaTxvXw3LbpMS/XUz13XuWae5ogObnmLo2t/5u7Su9IPhlGdpV +CX4l3P5hYnL5fhgC72O00Puv5TtjjGePAgMBAAGjgawwgakwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFFCvzAeHFUdvOMW0ZdHelarp35zMMB8GA1UdIwQYMBaAFFCv +zAeHFUdvOMW0ZdHelarp35zMMEYGA1UdIAQ/MD0wOwYJYIV0AVkBAQEBMC4wLAYIKwYBBQUHAgEW +IGh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2lnbi5jb20vMA0GCSqGSIb3DQEBBQUAA4ICAQAIhab1 +Fgz8RBrBY+D5VUYI/HAcQiiWjrfFwUF1TglxeeVtlspLpYhg0DB0uMoI3LQwnkAHFmtllXcBrqS3 +NQuB2nEVqXQXOHtYyvkv+8Bldo1bAbl93oI9ZLi+FHSjClTTLJUYFzX1UWs/j6KWYTl4a0vlpqD4 +U99REJNi54Av4tHgvI42Rncz7Lj7jposiU0xEQ8mngS7twSNC/K5/FqdOxa3L8iYq/6KUFkuozv8 +KV2LwUvJ4ooTHbG/u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl +9x8DYSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1puEa+S1B +aYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXaicYwu+uPyyIIoK6q8QNs +OktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbGDI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSY +Mdp08YSTcU1f+2BY0fvEwW2JorsgH51xkcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAci +IfNAChs0B0QTwoRqjt8ZWr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g== +-----END CERTIFICATE----- + +SwissSign Gold CA - G2 +====================== +-----BEGIN CERTIFICATE----- +MIIFujCCA6KgAwIBAgIJALtAHEP1Xk+wMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNVBAYTAkNIMRUw +EwYDVQQKEwxTd2lzc1NpZ24gQUcxHzAdBgNVBAMTFlN3aXNzU2lnbiBHb2xkIENBIC0gRzIwHhcN +MDYxMDI1MDgzMDM1WhcNMzYxMDI1MDgzMDM1WjBFMQswCQYDVQQGEwJDSDEVMBMGA1UEChMMU3dp +c3NTaWduIEFHMR8wHQYDVQQDExZTd2lzc1NpZ24gR29sZCBDQSAtIEcyMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAr+TufoskDhJuqVAtFkQ7kpJcyrhdhJJCEyq8ZVeCQD5XJM1QiyUq +t2/876LQwB8CJEoTlo8jE+YoWACjR8cGp4QjK7u9lit/VcyLwVcfDmJlD909Vopz2q5+bbqBHH5C +jCA12UNNhPqE21Is8w4ndwtrvxEvcnifLtg+5hg3Wipy+dpikJKVyh+c6bM8K8vzARO/Ws/BtQpg +vd21mWRTuKCWs2/iJneRjOBiEAKfNA+k1ZIzUd6+jbqEemA8atufK+ze3gE/bk3lUIbLtK/tREDF +ylqM2tIrfKjuvqblCqoOpd8FUrdVxyJdMmqXl2MT28nbeTZ7hTpKxVKJ+STnnXepgv9VHKVxaSvR +AiTysybUa9oEVeXBCsdtMDeQKuSeFDNeFhdVxVu1yzSJkvGdJo+hB9TGsnhQ2wwMC3wLjEHXuend +jIj3o02yMszYF9rNt85mndT9Xv+9lz4pded+p2JYryU0pUHHPbwNUMoDAw8IWh+Vc3hiv69yFGkO +peUDDniOJihC8AcLYiAQZzlG+qkDzAQ4embvIIO1jEpWjpEA/I5cgt6IoMPiaG59je883WX0XaxR +7ySArqpWl2/5rX3aYT+YdzylkbYcjCbaZaIJbcHiVOO5ykxMgI93e2CaHt+28kgeDrpOVG2Y4OGi +GqJ3UM/EY5LsRxmd6+ZrzsECAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUWyV7lqRlUX64OfPAeGZe6Drn8O4wHwYDVR0jBBgwFoAUWyV7lqRlUX64 +OfPAeGZe6Drn8O4wRgYDVR0gBD8wPTA7BglghXQBWQECAQEwLjAsBggrBgEFBQcCARYgaHR0cDov +L3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBACe645R88a7A3hfm +5djV9VSwg/S7zV4Fe0+fdWavPOhWfvxyeDgD2StiGwC5+OlgzczOUYrHUDFu4Up+GC9pWbY9ZIEr +44OE5iKHjn3g7gKZYbge9LgriBIWhMIxkziWMaa5O1M/wySTVltpkuzFwbs4AOPsF6m43Md8AYOf +Mke6UiI0HTJ6CVanfCU2qT1L2sCCbwq7EsiHSycR+R4tx5M/nttfJmtS2S6K8RTGRI0Vqbe/vd6m +Gu6uLftIdxf+u+yvGPUqUfA5hJeVbG4bwyvEdGB5JbAKJ9/fXtI5z0V9QkvfsywexcZdylU6oJxp +mo/a77KwPJ+HbBIrZXAVUjEaJM9vMSNQH4xPjyPDdEFjHFWoFN0+4FFQz/EbMFYOkrCChdiDyyJk +vC24JdVUorgG6q2SpCSgwYa1ShNqR88uC1aVVMvOmttqtKay20EIhid392qgQmwLOM7XdVAyksLf +KzAiSNDVQTglXaTpXZ/GlHXQRf0wl0OPkKsKx4ZzYEppLd6leNcG2mqeSz53OiATIgHQv2ieY2Br +NU0LbbqhPcCT4H8js1WtciVORvnSFu+wZMEBnunKoGqYDs/YYPIvSbjkQuE4NRb0yG5P94FW6Lqj +viOvrv1vA+ACOzB2+httQc8Bsem4yWb02ybzOqR08kkkW8mw0FfB+j564ZfJ +-----END CERTIFICATE----- + +SwissSign Silver CA - G2 +======================== +-----BEGIN CERTIFICATE----- +MIIFvTCCA6WgAwIBAgIITxvUL1S7L0swDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCQ0gxFTAT +BgNVBAoTDFN3aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMB4X +DTA2MTAyNTA4MzI0NloXDTM2MTAyNTA4MzI0NlowRzELMAkGA1UEBhMCQ0gxFTATBgNVBAoTDFN3 +aXNzU2lnbiBBRzEhMB8GA1UEAxMYU3dpc3NTaWduIFNpbHZlciBDQSAtIEcyMIICIjANBgkqhkiG +9w0BAQEFAAOCAg8AMIICCgKCAgEAxPGHf9N4Mfc4yfjDmUO8x/e8N+dOcbpLj6VzHVxumK4DV644 +N0MvFz0fyM5oEMF4rhkDKxD6LHmD9ui5aLlV8gREpzn5/ASLHvGiTSf5YXu6t+WiE7brYT7QbNHm ++/pe7R20nqA1W6GSy/BJkv6FCgU+5tkL4k+73JU3/JHpMjUi0R86TieFnbAVlDLaYQ1HTWBCrpJH +6INaUFjpiou5XaHc3ZlKHzZnu0jkg7Y360g6rw9njxcH6ATK72oxh9TAtvmUcXtnZLi2kUpCe2Uu +MGoM9ZDulebyzYLs2aFK7PayS+VFheZteJMELpyCbTapxDFkH4aDCyr0NQp4yVXPQbBH6TCfmb5h +qAaEuSh6XzjZG6k4sIN/c8HDO0gqgg8hm7jMqDXDhBuDsz6+pJVpATqJAHgE2cn0mRmrVn5bi4Y5 +FZGkECwJMoBgs5PAKrYYC51+jUnyEEp/+dVGLxmSo5mnJqy7jDzmDrxHB9xzUfFwZC8I+bRHHTBs +ROopN4WSaGa8gzj+ezku01DwH/teYLappvonQfGbGHLy9YR0SslnxFSuSGTfjNFusB3hB48IHpmc +celM2KX3RxIfdNFRnobzwqIjQAtz20um53MGjMGg6cFZrEb65i/4z3GcRm25xBWNOHkDRUjvxF3X +CO6HOSKGsg0PWEP3calILv3q1h8CAwEAAaOBrDCBqTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUF6DNweRBtjpbO8tFnb0cwpj6hlgwHwYDVR0jBBgwFoAUF6DNweRB +tjpbO8tFnb0cwpj6hlgwRgYDVR0gBD8wPTA7BglghXQBWQEDAQEwLjAsBggrBgEFBQcCARYgaHR0 +cDovL3JlcG9zaXRvcnkuc3dpc3NzaWduLmNvbS8wDQYJKoZIhvcNAQEFBQADggIBAHPGgeAn0i0P +4JUw4ppBf1AsX19iYamGamkYDHRJ1l2E6kFSGG9YrVBWIGrGvShpWJHckRE1qTodvBqlYJ7YH39F +kWnZfrt4csEGDyrOj4VwYaygzQu4OSlWhDJOhrs9xCrZ1x9y7v5RoSJBsXECYxqCsGKrXlcSH9/L +3XWgwF15kIwb4FDm3jH+mHtwX6WQ2K34ArZv02DdQEsixT2tOnqfGhpHkXkzuoLcMmkDlm4fS/Bx +/uNncqCxv1yL5PqZIseEuRuNI5c/7SXgz2W79WEE790eslpBIlqhn10s6FvJbakMDHiqYMZWjwFa +DGi8aRl5xB9+lwW/xekkUV7U1UtT7dkjWjYDZaPBA61BMPNGG4WQr2W11bHkFlt4dR2Xem1ZqSqP +e97Dh4kQmUlzeMg9vVE1dCrV8X5pGyq7O70luJpaPXJhkGaH7gzWTdQRdAtq/gsD/KNVV4n+Ssuu +WxcFyPKNIzFTONItaj+CuY0IavdeQXRuwxF+B6wpYJE/OMpXEA29MC/HpeZBoNquBYeaoKRlbEwJ +DIm6uNO5wJOKMPqN5ZprFQFOZ6raYlY+hAhm0sQ2fac+EPyI4NSA5QC9qvNOBqN6avlicuMJT+ub +DgEj8Z+7fNzcbBGXJbLytGMU0gYqZ4yD9c7qB9iaah7s5Aq7KkzrCWA5zspi2C5u +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority +======================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQGKy1av1pthU6Y2yv2vrEoTANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQG +EwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMoR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNjExMjcwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMFgx +CzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTEwLwYDVQQDEyhHZW9UcnVzdCBQ +cmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvrgVe//UfH1nrYNke8hCUy3f9oQIIGHWAVlqnEQRr+92/ZV+zmEwu3qDXwK9AWbK7hWN +b6EwnL2hhZ6UOvNWiAAxz9juapYC2e0DjPt1befquFUWBRaa9OBesYjAZIVcFU2Ix7e64HXprQU9 +nceJSOC7KMgD4TCTZF5SwFlwIjVXiIrxlQqD17wxcwE07e9GceBrAqg1cmuXm2bgyxx5X9gaBGge +RwLmnWDiNpcB3841kt++Z8dtd1k7j53WkBWUvEI0EME5+bEnPn7WinXFsq+W06Lem+SYvn3h6YGt +tm/81w7a4DSwDRp35+MImO9Y+pyEtzavwt+s0vQQBnBxNQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQULNVQQZcVi/CPNmFbSvtr2ZnJM5IwDQYJKoZI +hvcNAQEFBQADggEBAFpwfyzdtzRP9YZRqSa+S7iq8XEN3GHHoOo0Hnp3DwQ16CePbJC/kRYkRj5K +Ts4rFtULUh38H2eiAkUxT87z+gOneZ1TatnaYzr4gNfTmeGl4b7UVXGYNTq+k+qurUKykG/g/CFN +NWMziUnWm07Kx+dOCQD32sfvmWKZd7aVIl6KoKv0uHiYyjgZmclynnjNS6yvGaBzEi38wkG6gZHa +Floxt/m0cYASSJlyc1pZU8FjUjPtp8nSOQJw+uCxQmYpqptR7TBUIhRf2asdweSU8Pj1K/fqynhG +1riR/aYNKxoUAT6A8EKglQdebc3MS6RFjasS6LPeWuWgfOgPIh1a6Vk= +-----END CERTIFICATE----- + +thawte Primary Root CA +====================== +-----BEGIN CERTIFICATE----- +MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0BAQUFADCBqTELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMTFnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwHhcNMDYxMTE3 +MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCBqTELMAkGA1UEBhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwg +SW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMv +KGMpIDIwMDYgdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxHzAdBgNVBAMT +FnRoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCs +oPD7gFnUnMekz52hWXMJEEUMDSxuaPFsW0hoSVk3/AszGcJ3f8wQLZU0HObrTQmnHNK4yZc2AreJ +1CRfBsDMRJSUjQJib+ta3RGNKJpchJAQeg29dGYvajig4tVUROsdB58Hum/u6f1OCyn1PoSgAfGc +q/gcfomk6KHYcWUNo1F77rzSImANuVud37r8UVsLr5iy6S7pBOhih94ryNdOwUxkHt3Ph1i6Sk/K +aAcdHJ1KxtUvkcx8cXIcxcBn6zL9yZJclNqFwJu/U30rCfSMnZEfl2pSy94JNqR32HuHUETVPm4p +afs5SSYeCaWAe0At6+gnhcn+Yf1+5nyXHdWdAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYD +VR0PAQH/BAQDAgEGMB0GA1UdDgQWBBR7W0XPr87Lev0xkhpqtvNG61dIUDANBgkqhkiG9w0BAQUF +AAOCAQEAeRHAS7ORtvzw6WfUDW5FvlXok9LOAz/t2iWwHVfLHjp2oEzsUHboZHIMpKnxuIvW1oeE +uzLlQRHAd9mzYJ3rG9XRbkREqaYB7FViHXe4XI5ISXycO1cRrK1zN44veFyQaEfZYGDm/Ac9IiAX +xPcW6cTYcvnIc3zfFi8VqT79aie2oetaupgf1eNNZAqdE8hhuvU5HIe6uL17In/2/qxAeeWsEG89 +jxt5dovEN7MhGITlNgDrYyCZuen+MwS7QcjBAvlEYyCegc5C09Y/LHbTY5xZ3Y+m4Q6gLkH3LpVH +z7z9M/P2C2F+fpErgUfCJzDupxBdN49cOSvkBPB7jVaMaA== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G5 +============================================================ +-----BEGIN CERTIFICATE----- +MIIE0zCCA7ugAwIBAgIQGNrRniZ96LtKIVjNzGs7SjANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRp +ZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwHhcNMDYxMTA4MDAwMDAwWhcNMzYwNzE2MjM1OTU5WjCB +yjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2ln +biBUcnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNiBWZXJpU2lnbiwgSW5jLiAtIEZvciBh +dXRob3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmlt +YXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQCvJAgIKXo1nmAMqudLO07cfLw8RRy7K+D+KQL5VwijZIUVJ/XxrcgxiV0i6CqqpkKz +j/i5Vbext0uz/o9+B1fs70PbZmIVYc9gDaTY3vjgw2IIPVQT60nKWVSFJuUrjxuf6/WhkcIzSdhD +Y2pSS9KP6HBRTdGJaXvHcPaz3BJ023tdS1bTlr8Vd6Gw9KIl8q8ckmcY5fQGBO+QueQA5N06tRn/ +Arr0PO7gi+s3i+z016zy9vA9r911kTMZHRxAy3QkGSGT2RT+rCpSx4/VBEnkjWNHiDxpg8v+R70r +fk/Fla4OndTRQ8Bnc+MUCH7lP59zuDMKz10/NIeWiu5T6CUVAgMBAAGjgbIwga8wDwYDVR0TAQH/ +BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2Uv +Z2lmMCEwHzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVy +aXNpZ24uY29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFH/TZafC3ey78DAJ80M5+gKvMzEzMA0GCSqG +SIb3DQEBBQUAA4IBAQCTJEowX2LP2BqYLz3q3JktvXf2pXkiOOzEp6B4Eq1iDkVwZMXnl2YtmAl+ +X6/WzChl8gGqCBpH3vn5fJJaCGkgDdk+bW48DW7Y5gaRQBi5+MHt39tBquCWIMnNZBU4gcmU7qKE +KQsTb47bDN0lAtukixlE0kF6BWlKWE9gyn6CagsCqiUXObXbf+eEZSqVir2G3l6BFoMtEMze/aiC +Km0oHw0LxOXnGiYZ4fQRbxC1lfznQgUy286dUV4otp6F01vvpX1FQHKOtw5rDgb7MzVIcbidJ4vE +ZV8NhnacRHr2lVz2XTIIM6RUthg/aFzyQkqFOFSDX9HoLPKsEdao7WNq +-----END CERTIFICATE----- + +SecureTrust CA +============== +-----BEGIN CERTIFICATE----- +MIIDuDCCAqCgAwIBAgIQDPCOXAgWpa1Cf/DrJxhZ0DANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xFzAVBgNVBAMTDlNlY3VyZVRy +dXN0IENBMB4XDTA2MTEwNzE5MzExOFoXDTI5MTIzMTE5NDA1NVowSDELMAkGA1UEBhMCVVMxIDAe +BgNVBAoTF1NlY3VyZVRydXN0IENvcnBvcmF0aW9uMRcwFQYDVQQDEw5TZWN1cmVUcnVzdCBDQTCC +ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKukgeWVzfX2FI7CT8rU4niVWJxB4Q2ZQCQX +OZEzZum+4YOvYlyJ0fwkW2Gz4BERQRwdbvC4u/jep4G6pkjGnx29vo6pQT64lO0pGtSO0gMdA+9t +DWccV9cGrcrI9f4Or2YlSASWC12juhbDCE/RRvgUXPLIXgGZbf2IzIaowW8xQmxSPmjL8xk037uH +GFaAJsTQ3MBv396gwpEWoGQRS0S8Hvbn+mPeZqx2pHGj7DaUaHp3pLHnDi+BeuK1cobvomuL8A/b +01k/unK8RCSc43Oz969XL0Imnal0ugBS8kvNU3xHCzaFDmapCJcWNFfBZveA4+1wVMeT4C4oFVmH +ursCAwEAAaOBnTCBmjATBgkrBgEEAYI3FAIEBh4EAEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/ +BAUwAwEB/zAdBgNVHQ4EFgQUQjK2FvoE/f5dS3rD/fdMQB1aQ68wNAYDVR0fBC0wKzApoCegJYYj +aHR0cDovL2NybC5zZWN1cmV0cnVzdC5jb20vU1RDQS5jcmwwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBADDtT0rhWDpSclu1pqNlGKa7UTt36Z3q059c4EVlew3KW+JwULKUBRSu +SceNQQcSc5R+DCMh/bwQf2AQWnL1mA6s7Ll/3XpvXdMc9P+IBWlCqQVxyLesJugutIxq/3HcuLHf +mbx8IVQr5Fiiu1cprp6poxkmD5kuCLDv/WnPmRoJjeOnnyvJNjR7JLN4TJUXpAYmHrZkUjZfYGfZ +nMUFdAvnZyPSCPyI6a6Lf+Ew9Dd+/cYy2i2eRDAwbO4H3tI0/NL/QPZL9GZGBlSm8jIKYyYwa5vR +3ItHuuG51WLQoqD0ZwV4KWMabwTW+MZMo5qxN7SN5ShLHZ4swrhovO0C7jE= +-----END CERTIFICATE----- + +Secure Global CA +================ +-----BEGIN CERTIFICATE----- +MIIDvDCCAqSgAwIBAgIQB1YipOjUiolN9BPI8PjqpTANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQG +EwJVUzEgMB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBH +bG9iYWwgQ0EwHhcNMDYxMTA3MTk0MjI4WhcNMjkxMjMxMTk1MjA2WjBKMQswCQYDVQQGEwJVUzEg +MB4GA1UEChMXU2VjdXJlVHJ1c3QgQ29ycG9yYXRpb24xGTAXBgNVBAMTEFNlY3VyZSBHbG9iYWwg +Q0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCvNS7YrGxVaQZx5RNoJLNP2MwhR/jx +YDiJiQPpvepeRlMJ3Fz1Wuj3RSoC6zFh1ykzTM7HfAo3fg+6MpjhHZevj8fcyTiW89sa/FHtaMbQ +bqR8JNGuQsiWUGMu4P51/pinX0kuleM5M2SOHqRfkNJnPLLZ/kG5VacJjnIFHovdRIWCQtBJwB1g +8NEXLJXr9qXBkqPFwqcIYA1gBBCWeZ4WNOaptvolRTnIHmX5k/Wq8VLcmZg9pYYaDDUz+kulBAYV +HDGA76oYa8J719rO+TMg1fW9ajMtgQT7sFzUnKPiXB3jqUJ1XnvUd+85VLrJChgbEplJL4hL/VBi +0XPnj3pDAgMBAAGjgZ0wgZowEwYJKwYBBAGCNxQCBAYeBABDAEEwCwYDVR0PBAQDAgGGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFK9EBMJBfkiD2045AuzshHrmzsmkMDQGA1UdHwQtMCswKaAn +oCWGI2h0dHA6Ly9jcmwuc2VjdXJldHJ1c3QuY29tL1NHQ0EuY3JsMBAGCSsGAQQBgjcVAQQDAgEA +MA0GCSqGSIb3DQEBBQUAA4IBAQBjGghAfaReUw132HquHw0LURYD7xh8yOOvaliTFGCRsoTciE6+ +OYo68+aCiV0BN7OrJKQVDpI1WkpEXk5X+nXOH0jOZvQ8QCaSmGwb7iRGDBezUqXbpZGRzzfTb+cn +CDpOGR86p1hcF895P4vkp9MmI50mD1hp/Ed+stCNi5O/KU9DaXR2Z0vPB4zmAve14bRDtUstFJ/5 +3CYNv6ZHdAbYiNE6KTCEztI5gGIbqMdXSbxqVVFnFUq+NQfk1XWYN3kwFNspnWzFacxHVaIw98xc +f8LDmBxrThaA63p4ZUWiABqvDA1VZDRIuJK58bRQKfJPIx/abKwfROHdI3hRW8cW +-----END CERTIFICATE----- + +COMODO Certification Authority +============================== +-----BEGIN CERTIFICATE----- +MIIEHTCCAwWgAwIBAgIQToEtioJl4AsC7j41AkblPTANBgkqhkiG9w0BAQUFADCBgTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxJzAlBgNVBAMTHkNPTU9ETyBDZXJ0aWZpY2F0aW9uIEF1 +dGhvcml0eTAeFw0wNjEyMDEwMDAwMDBaFw0yOTEyMzEyMzU5NTlaMIGBMQswCQYDVQQGEwJHQjEb +MBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYDVQQHEwdTYWxmb3JkMRowGAYDVQQKExFD +T01PRE8gQ0EgTGltaXRlZDEnMCUGA1UEAxMeQ09NT0RPIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0ECLi3LjkRv3UcEbVASY06m/weaKXTuH ++7uIzg3jLz8GlvCiKVCZrts7oVewdFFxze1CkU1B/qnI2GqGd0S7WWaXUF601CxwRM/aN5VCaTww +xHGzUvAhTaHYujl8HJ6jJJ3ygxaYqhZ8Q5sVW7euNJH+1GImGEaaP+vB+fGQV+useg2L23IwambV +4EajcNxo2f8ESIl33rXp+2dtQem8Ob0y2WIC8bGoPW43nOIv4tOiJovGuFVDiOEjPqXSJDlqR6sA +1KGzqSX+DT+nHbrTUcELpNqsOO9VUCQFZUaTNE8tja3G1CEZ0o7KBWFxB3NH5YoZEr0ETc5OnKVI +rLsm9wIDAQABo4GOMIGLMB0GA1UdDgQWBBQLWOWLxkwVN6RAqTCpIb5HNlpW/zAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zBJBgNVHR8EQjBAMD6gPKA6hjhodHRwOi8vY3JsLmNvbW9k +b2NhLmNvbS9DT01PRE9DZXJ0aWZpY2F0aW9uQXV0aG9yaXR5LmNybDANBgkqhkiG9w0BAQUFAAOC +AQEAPpiem/Yb6dc5t3iuHXIYSdOH5EOC6z/JqvWote9VfCFSZfnVDeFs9D6Mk3ORLgLETgdxb8CP +OGEIqB6BCsAvIC9Bi5HcSEW88cbeunZrM8gALTFGTO3nnc+IlP8zwFboJIYmuNg4ON8qa90SzMc/ +RxdMosIGlgnW2/4/PEZB31jiVg88O8EckzXZOFKs7sjsLjBOlDW0JB9LeGna8gI4zJVSk/BwJVmc +IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN ++8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ== +-----END CERTIFICATE----- + +DigiNotar Root CA +================= +-----BEGIN CERTIFICATE----- +MIIFijCCA3KgAwIBAgIQDHbanJEMTiye/hXQWJM8TDANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQG +EwJOTDESMBAGA1UEChMJRGlnaU5vdGFyMRowGAYDVQQDExFEaWdpTm90YXIgUm9vdCBDQTEgMB4G +CSqGSIb3DQEJARYRaW5mb0BkaWdpbm90YXIubmwwHhcNMDcwNTE2MTcxOTM2WhcNMjUwMzMxMTgx +OTIxWjBfMQswCQYDVQQGEwJOTDESMBAGA1UEChMJRGlnaU5vdGFyMRowGAYDVQQDExFEaWdpTm90 +YXIgUm9vdCBDQTEgMB4GCSqGSIb3DQEJARYRaW5mb0BkaWdpbm90YXIubmwwggIiMA0GCSqGSIb3 +DQEBAQUAA4ICDwAwggIKAoICAQCssFjBAL3YIQgLK5r+blYwBZ8bd5AQQVzDDYcRd46B8cp86Yxq +7Th0Nbva3/m7wAk3tJZzgX0zGpg595NvlX89ubF1h7pRSOiLcD6VBMXYtsMW2YiwsYcdcNqGtA8U +i3rPENF0NqISe3eGSnnme98CEWilToauNFibJBN4ViIlHgGLS1Fx+4LMWZZpiFpoU8W5DQI3y0u8 +ZkqQfioLBQftFl9VkHXYRskbg+IIvvEjzJkd1ioPgyAVWCeCLvriIsJJsbkBgWqdbZ1Ad2h2TiEq +bYRAhU52mXyC8/O3AlnUJgEbjt+tUwbRrhjd4rI6y9eIOI6sWym5GdOY+RgDz0iChmYLG2kPyes4 +iHomGgVMktck1JbyrFIto0fVUvY//s6EBnCmqj6i8rZWNBhXouSBbefK8GrTx5FrAoNBfBXva5pk +XuPQPOWx63tdhvvL5ndJzaNl3Pe5nLjkC1+Tz8wwGjIczhxjlaX56uF0i57pK6kwe6AYHw4YC+Vb +qdPRbB4HZ4+RS6mKvNJmqpMBiLKR+jFc1abBUggJzQpjotMipuih2TkGl/VujQKQjBR7P4DNG5y6 +xFhyI6+2Vp/GekIzKQc/gsnmHwUNzUwoNovTyD4cxojvXu6JZOkd69qJfjKmadHdzIif0dDJZiHc +BmfFlHqabWJMfczgZICynkeOowIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBBjAdBgNVHQ4EFgQUiGi/4I41xDs4a2L3KDuEgcgM100wDQYJKoZIhvcNAQEFBQADggIBADsC +jcs8MOhuoK3yc7NfniUTBAXT9uOLuwt5zlPe5JbF0a9zvNXD0EBVfEB/zRtfCdXyfJ9oHbtdzno5 +wozWmHvFg1Wo1X1AyuAe94leY12hE8JdiraKfADzI8PthV9xdvBoY6pFITlIYXg23PFDk9Qlx/KA +ZeFTAnVR/Ho67zerhChXDNjU1JlWbOOi/lmEtDHoM/hklJRRl6s5xUvt2t2AC298KQ3EjopyDedT +FLJgQT2EkTFoPSdE2+Xe9PpjRchMPpj1P0G6Tss3DbpmmPHdy59c91Q2gmssvBNhl0L4eLvMyKKf +yvBovWsdst+Nbwed2o5nx0ceyrm/KkKRt2NTZvFCo+H0Wk1Ya7XkpDOtXHAd3ODy63MUkZoDweoA +ZbwH/M8SESIsrqC9OuCiKthZ6SnTGDWkrBFfGbW1G/8iSlzGeuQX7yCpp/Q/rYqnmgQlnQ7KN+ZQ +/YxCKQSa7LnPS3K94gg2ryMvYuXKAdNw23yCIywWMQzGNgeQerEfZ1jEO1hZibCMjFCz2IbLaKPE +CudpSyDOwR5WS5WpI2jYMNjD67BVUc3l/Su49bsRn1NU9jQZjHkJNsphFyUXC4KYcwx3dMPVDceo +EkzHp1RxRy4sGn3J4ys7SN4nhKdjNrN9j6BkOSQNPXuHr2ZcdBtLc7LljPCGmbjlxd+Ewbfr +-----END CERTIFICATE----- + +Network Solutions Certificate Authority +======================================= +-----BEGIN CERTIFICATE----- +MIID5jCCAs6gAwIBAgIQV8szb8JcFuZHFhfjkDFo4DANBgkqhkiG9w0BAQUFADBiMQswCQYDVQQG +EwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMuMTAwLgYDVQQDEydOZXR3b3Jr +IFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcNMDYxMjAxMDAwMDAwWhcNMjkxMjMx +MjM1OTU5WjBiMQswCQYDVQQGEwJVUzEhMB8GA1UEChMYTmV0d29yayBTb2x1dGlvbnMgTC5MLkMu +MTAwLgYDVQQDEydOZXR3b3JrIFNvbHV0aW9ucyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDkvH6SMG3G2I4rC7xGzuAnlt7e+foS0zwzc7MEL7xx +jOWftiJgPl9dzgn/ggwbmlFQGiaJ3dVhXRncEg8tCqJDXRfQNJIg6nPPOCwGJgl6cvf6UDL4wpPT +aaIjzkGxzOTVHzbRijr4jGPiFFlp7Q3Tf2vouAPlT2rlmGNpSAW+Lv8ztumXWWn4Zxmuk2GWRBXT +crA/vGp97Eh/jcOrqnErU2lBUzS1sLnFBgrEsEX1QV1uiUV7PTsmjHTC5dLRfbIR1PtYMiKagMnc +/Qzpf14Dl847ABSHJ3A4qY5usyd2mFHgBeMhqxrVhSI8KbWaFsWAqPS7azCPL0YCorEMIuDTAgMB +AAGjgZcwgZQwHQYDVR0OBBYEFCEwyfsA106Y2oeqKtCnLrFAMadMMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MFIGA1UdHwRLMEkwR6BFoEOGQWh0dHA6Ly9jcmwubmV0c29sc3NsLmNv +bS9OZXR3b3JrU29sdXRpb25zQ2VydGlmaWNhdGVBdXRob3JpdHkuY3JsMA0GCSqGSIb3DQEBBQUA +A4IBAQC7rkvnt1frf6ott3NHhWrB5KUd5Oc86fRZZXe1eltajSU24HqXLjjAV2CDmAaDn7l2em5Q +4LqILPxFzBiwmZVRDuwduIj/h1AcgsLj4DKAv6ALR8jDMe+ZZzKATxcheQxpXN5eNK4CtSbqUN9/ +GGUsyfJj4akH/nxxH2szJGoeBfcFaMBqEssuXmHLrijTfsK0ZpEmXzwuJF/LWA/rKOyvEZbz3Htv +wKeI8lN3s2Berq4o2jUsbzRF0ybh3uxbTydrFny9RAQYgrOJeRcQcT16ohZO9QHNpGxlaKFJdlxD +ydi8NmdspZS11My5vWo1ViHe2MPr+8ukYEywVaCge1ey +-----END CERTIFICATE----- + +WellsSecure Public Root Certificate Authority +============================================= +-----BEGIN CERTIFICATE----- +MIIEvTCCA6WgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoM +F1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYw +NAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN +MDcxMjEzMTcwNzU0WhcNMjIxMjE0MDAwNzU0WjCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dl +bGxzIEZhcmdvIFdlbGxzU2VjdXJlMRwwGgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYD +VQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0G +CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDub7S9eeKPCCGeOARBJe+rWxxTkqxtnt3CxC5FlAM1 +iGd0V+PfjLindo8796jE2yljDpFoNoqXjopxaAkH5OjUDk/41itMpBb570OYj7OeUt9tkTmPOL13 +i0Nj67eT/DBMHAGTthP796EfvyXhdDcsHqRePGj4S78NuR4uNuip5Kf4D8uCdXw1LSLWwr8L87T8 +bJVhHlfXBIEyg1J55oNjz7fLY4sR4r1e6/aN7ZVyKLSsEmLpSjPmgzKuBXWVvYSV2ypcm44uDLiB +K0HmOFafSZtsdvqKXfcBeYF8wYNABf5x/Qw/zE5gCQ5lRxAvAcAFP4/4s0HvWkJ+We/SlwxlAgMB +AAGjggE0MIIBMDAPBgNVHRMBAf8EBTADAQH/MDkGA1UdHwQyMDAwLqAsoCqGKGh0dHA6Ly9jcmwu +cGtpLndlbGxzZmFyZ28uY29tL3dzcHJjYS5jcmwwDgYDVR0PAQH/BAQDAgHGMB0GA1UdDgQWBBQm +lRkQ2eihl5H/3BnZtQQ+0nMKajCBsgYDVR0jBIGqMIGngBQmlRkQ2eihl5H/3BnZtQQ+0nMKaqGB +i6SBiDCBhTELMAkGA1UEBhMCVVMxIDAeBgNVBAoMF1dlbGxzIEZhcmdvIFdlbGxzU2VjdXJlMRww +GgYDVQQLDBNXZWxscyBGYXJnbyBCYW5rIE5BMTYwNAYDVQQDDC1XZWxsc1NlY3VyZSBQdWJsaWMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHmCAQEwDQYJKoZIhvcNAQEFBQADggEBALkVsUSRzCPI +K0134/iaeycNzXK7mQDKfGYZUMbVmO2rvwNa5U3lHshPcZeG1eMd/ZDJPHV3V3p9+N701NX3leZ0 +bh08rnyd2wIDBSxxSyU+B+NemvVmFymIGjifz6pBA4SXa5M4esowRBskRDPQ5NHcKDj0E0M1NSlj +qHyita04pO2t/caaH/+Xc/77szWnk4bGdpEA5qxRFsQnMlzbc9qlk1eOPm01JghZ1edE13YgY+es +E2fDbbFwRnzVlhE9iW9dqKHrjQrawx0zbKPqZxmamX9LPYNRKh3KL4YMon4QLSvUFpULB6ouFJJJ +tylv2G0xffX8oRAHh84vWdw+WNs= +-----END CERTIFICATE----- + +COMODO ECC Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIICiTCCAg+gAwIBAgIQH0evqmIAcFBUTAGem2OZKjAKBggqhkjOPQQDAzCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwHhcNMDgwMzA2MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0Ix +GzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR +Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBFQ0MgQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQDR3svdcmCFYX7deSRFtSrYpn1PlILBs5BAH+X +4QokPB0BBO490o0JlwzgdeT6+3eKKvUDYEs2ixYjFq0JcfRK9ChQtP6IHG4/bC8vCVlbpVsLM5ni +wz2J+Wos77LTBumjQjBAMB0GA1UdDgQWBBR1cacZSBm8nZ3qQUfflMRId5nTeTAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjEA7wNbeqy3eApyt4jf/7VG +FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA +U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY= +-----END CERTIFICATE----- + +MD5 Collisions Forged Rogue CA 25c3 +=================================== +-----BEGIN CERTIFICATE----- +MIIEMjCCA5ugAwIBAgIBQjANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT +RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp +bmVzcyBDQS0xMB4XDTA0MDczMTAwMDAwMVoXDTA0MDkwMjAwMDAwMVowPDE6MDgGA1UEAxMxTUQ1 +IENvbGxpc2lvbnMgSW5jLiAoaHR0cDovL3d3dy5waHJlZWRvbS5vcmcvbWQ1KTCBnzANBgkqhkiG +9w0BAQEFAAOBjQAwgYkCgYEAuqZZySwo1iqw+O2fRqSkN+4OGWhZ0bMDmVHWFppeN2sV4A5L9YRk ++KPbQW811ZsVH9vEOFJwgZdej6C193458DKsHq1E0rP6SMPOkZvs9Jx84Vr1yDdrmoPe58oglzFC +cxWRaPSIr/koKMXpD3OwF0sTTJl10ETmfghsGvJPG0ECAwEAAaOCAiQwggIgMAsGA1UdDwQEAwIB +xjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSnBGAfq3JDCMV/CJBVVhzWzuY46zAfBgNVHSME +GDAWgBS+qKB0clBrRLfJI9j7qP+zV2tobDCCAb4GCWCGSAGG+EIBDQSCAa8WggGrMwAAACdeOeCJ +YQ9Oo8VFCza7AdFTqsMIj2/4Tz6Hh0QR3GDg35JV+bhzG1STxZ/QRsRgtjVizbmvHKhpGslbPJY3 +wO1n77v+wIucUC8pvYMino4I+qwTcKJYf2JiihH3ifbftmdZcxb7YxaKtJE4zi71tr5MpJRJ5GUR +CkIVycEw4mnVRX2lJru5YexiZPA54ee8aNhQUZ4dYNPRo6cK+AMgoXABF5E2TwJwMYaD3fcP2Acd +EbMTBKXc8K5QsSgOY2kqDIJvj0cz32yiBpLxT0W+2TA2oyuM1neuNWN/Tkyak0g22Z8CAwEAAaOB +vTCBujAOBgNVHQ8BAf8EBAMCBPAwHQYDVR0OBBYEFM2mg/qlYDf3ljcXKd5BePGHiVXnMDsGA1Ud +HwQ0MDIwMKAuoCyGKmh0dHA6Ly9jcmwuZ2VvdHJ1c3QuY29tL2NybHMvZ2xvYmFsY2ExLmNybDAf +BgNVHSMEGDAWgBS+qKB0clBrRLfJI9j7qP+zV2tobDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYB +BQUHAwIwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQQFAAOBgQCnIQKN0Q6igHcl/UNgFY/s75BH +1IRCFSYRHM3CPBApqbbfq1d1kdrlK7OQRRwwY1Y/itlQ+u1YbMBlrGZX3hzGdjv1AA6ORc5/TJDs +K8bNs7SPYtD+t8UmckTt9phbrsvRlfXaCL5oRrF1yOwdjx56lPGqU3iiRa5U6tGedMh2Zw== +-----END CERTIFICATE----- + +IGC/A +===== +-----BEGIN CERTIFICATE----- +MIIEAjCCAuqgAwIBAgIFORFFEJQwDQYJKoZIhvcNAQEFBQAwgYUxCzAJBgNVBAYTAkZSMQ8wDQYD +VQQIEwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVE +Q1NTSTEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZy +MB4XDTAyMTIxMzE0MjkyM1oXDTIwMTAxNzE0MjkyMlowgYUxCzAJBgNVBAYTAkZSMQ8wDQYDVQQI +EwZGcmFuY2UxDjAMBgNVBAcTBVBhcmlzMRAwDgYDVQQKEwdQTS9TR0ROMQ4wDAYDVQQLEwVEQ1NT +STEOMAwGA1UEAxMFSUdDL0ExIzAhBgkqhkiG9w0BCQEWFGlnY2FAc2dkbi5wbS5nb3V2LmZyMIIB +IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsh/R0GLFMzvABIaIs9z4iPf930Pfeo2aSVz2 +TqrMHLmh6yeJ8kbpO0px1R2OLc/mratjUMdUC24SyZA2xtgv2pGqaMVy/hcKshd+ebUyiHDKcMCW +So7kVc0dJ5S/znIq7Fz5cyD+vfcuiWe4u0dzEvfRNWk68gq5rv9GQkaiv6GFGvm/5P9JhfejcIYy +HF2fYPepraX/z9E0+X1bF8bc1g4oa8Ld8fUzaJ1O/Id8NhLWo4DoQw1VYZTqZDdH6nfK0LJYBcNd +frGoRpAxVs5wKpayMLh35nnAvSk7/ZR3TL0gzUEl4C7HG7vupARB0l2tEmqKm0f7yd1GQOGdPDPQ +tQIDAQABo3cwdTAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIBRjAVBgNVHSAEDjAMMAoGCCqB +egF5AQEBMB0GA1UdDgQWBBSjBS8YYFDCiQrdKyFP/45OqDAxNjAfBgNVHSMEGDAWgBSjBS8YYFDC +iQrdKyFP/45OqDAxNjANBgkqhkiG9w0BAQUFAAOCAQEABdwm2Pp3FURo/C9mOnTgXeQp/wYHE4RK +q89toB9RlPhJy3Q2FLwV3duJL92PoF189RLrn544pEfMs5bZvpwlqwN+Mw+VgQ39FuCIvjfwbF3Q +MZsyK10XZZOYYLxuj7GoPB7ZHPOpJkL5ZB3C55L29B5aqhlSXa/oovdgoPaN8In1buAKBQGVyYsg +Crpa/JosPL3Dt8ldeCUFP1YUmwza+zpI/pdpXsoQhvdOlgQITeywvl3cO45Pwf2aNjSaTFR+FwNI +lQgRHAdvhQh+XU3Endv7rs6y0bO4g2wdsrN58dhwmX7wEwLOXt1R0982gaEbeC9xs/FZTEYYKKuF +0mBWWg== +-----END CERTIFICATE----- + +Security Communication EV RootCA1 +================================= +-----BEGIN CERTIFICATE----- +MIIDfTCCAmWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBgMQswCQYDVQQGEwJKUDElMCMGA1UEChMc +U0VDT00gVHJ1c3QgU3lzdGVtcyBDTy4sTFRELjEqMCgGA1UECxMhU2VjdXJpdHkgQ29tbXVuaWNh +dGlvbiBFViBSb290Q0ExMB4XDTA3MDYwNjAyMTIzMloXDTM3MDYwNjAyMTIzMlowYDELMAkGA1UE +BhMCSlAxJTAjBgNVBAoTHFNFQ09NIFRydXN0IFN5c3RlbXMgQ08uLExURC4xKjAoBgNVBAsTIVNl +Y3VyaXR5IENvbW11bmljYXRpb24gRVYgUm9vdENBMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALx/7FebJOD+nLpCeamIivqA4PUHKUPqjgo0No0c+qe1OXj/l3X3L+SqawSERMqm4miO +/VVQYg+kcQ7OBzgtQoVQrTyWb4vVog7P3kmJPdZkLjjlHmy1V4qe70gOzXppFodEtZDkBp2uoQSX +WHnvIEqCa4wiv+wfD+mEce3xDuS4GBPMVjZd0ZoeUWs5bmB2iDQL87PRsJ3KYeJkHcFGB7hj3R4z +ZbOOCVVSPbW9/wfrrWFVGCypaZhKqkDFMxRldAD5kd6vA0jFQFTcD4SQaCDFkpbcLuUCRarAX1T4 +bepJz11sS6/vmsJWXMY1VkJqMF/Cq/biPT+zyRGPMUzXn0kCAwEAAaNCMEAwHQYDVR0OBBYEFDVK +9U2vP9eCOKyrcWUXdYydVZPmMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MA0GCSqG +SIb3DQEBBQUAA4IBAQCoh+ns+EBnXcPBZsdAS5f8hxOQWsTvoMpfi7ent/HWtWS3irO4G8za+6xm +iEHO6Pzk2x6Ipu0nUBsCMCRGef4Eh3CXQHPRwMFXGZpppSeZq51ihPZRwSzJIxXYKLerJRO1RuGG +Av8mjMSIkh1W/hln8lXkgKNrnKt34VFxDSDbEJrbvXZ5B3eZKK2aXtqxT0QsNY6llsf9g/BYxnnW +mHyojf6GPgcWkuF75x3sM3Z+Qi5KhfmRiWiEA4Glm5q+4zfFVKtWOxgtQaQM+ELbmaDgcm+7XeEW +T1MKZPlO9L9OVL14bIjqv5wTJMJwaaJ/D8g8rQjJsJhAoyrniIPtd490 +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GA CA +=============================== +-----BEGIN CERTIFICATE----- +MIID8TCCAtmgAwIBAgIQQT1yx/RrH4FDffHSKFTfmjANBgkqhkiG9w0BAQUFADCBijELMAkGA1UE +BhMCQ0gxEDAOBgNVBAoTB1dJU2VLZXkxGzAZBgNVBAsTEkNvcHlyaWdodCAoYykgMjAwNTEiMCAG +A1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNlZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBH +bG9iYWwgUm9vdCBHQSBDQTAeFw0wNTEyMTExNjAzNDRaFw0zNzEyMTExNjA5NTFaMIGKMQswCQYD +VQQGEwJDSDEQMA4GA1UEChMHV0lTZUtleTEbMBkGA1UECxMSQ29weXJpZ2h0IChjKSAyMDA1MSIw +IAYDVQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5 +IEdsb2JhbCBSb290IEdBIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAy0+zAJs9 +Nt350UlqaxBJH+zYK7LG+DKBKUOVTJoZIyEVRd7jyBxRVVuuk+g3/ytr6dTqvirdqFEr12bDYVxg +Asj1znJ7O7jyTmUIms2kahnBAbtzptf2w93NvKSLtZlhuAGio9RN1AU9ka34tAhxZK9w8RxrfvbD +d50kc3vkDIzh2TbhmYsFmQvtRTEJysIA2/dyoJaqlYfQjse2YXMNdmaM3Bu0Y6Kff5MTMPGhJ9vZ +/yxViJGg4E8HsChWjBgbl0SOid3gF27nKu+POQoxhILYQBRJLnpB5Kf+42TMwVlxSywhp1t94B3R +LoGbw9ho972WG6xwsRYUC9tguSYBBQIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUw +AwEB/zAdBgNVHQ4EFgQUswN+rja8sHnR3JQmthG+IbJphpQwEAYJKwYBBAGCNxUBBAMCAQAwDQYJ +KoZIhvcNAQEFBQADggEBAEuh/wuHbrP5wUOxSPMowB0uyQlB+pQAHKSkq0lPjz0e701vvbyk9vIm +MMkQyh2I+3QZH4VFvbBsUfk2ftv1TDI6QU9bR8/oCy22xBmddMVHxjtqD6wU2zz0c5ypBd8A3HR4 ++vg1YFkCExh8vPtNsCBtQ7tgMHpnM1zFmdH4LTlSc/uMqpclXHLZCB6rTjzjgTGfA6b7wP4piFXa +hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY +okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= +-----END CERTIFICATE----- + +S-TRUST Authentication and Encryption Root CA 2005 PN +===================================================== +-----BEGIN CERTIFICATE----- +MIIEezCCA2OgAwIBAgIQNxkY5lNUfBq1uMtZWts1tzANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE +BhMCREUxIDAeBgNVBAgTF0JhZGVuLVd1ZXJ0dGVtYmVyZyAoQlcpMRIwEAYDVQQHEwlTdHV0dGdh +cnQxKTAnBgNVBAoTIERldXRzY2hlciBTcGFya2Fzc2VuIFZlcmxhZyBHbWJIMT4wPAYDVQQDEzVT +LVRSVVNUIEF1dGhlbnRpY2F0aW9uIGFuZCBFbmNyeXB0aW9uIFJvb3QgQ0EgMjAwNTpQTjAeFw0w +NTA2MjIwMDAwMDBaFw0zMDA2MjEyMzU5NTlaMIGuMQswCQYDVQQGEwJERTEgMB4GA1UECBMXQmFk +ZW4tV3VlcnR0ZW1iZXJnIChCVykxEjAQBgNVBAcTCVN0dXR0Z2FydDEpMCcGA1UEChMgRGV1dHNj +aGVyIFNwYXJrYXNzZW4gVmVybGFnIEdtYkgxPjA8BgNVBAMTNVMtVFJVU1QgQXV0aGVudGljYXRp +b24gYW5kIEVuY3J5cHRpb24gUm9vdCBDQSAyMDA1OlBOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEA2bVKwdMz6tNGs9HiTNL1toPQb9UY6ZOvJ44TzbUlNlA0EmQpoVXhOmCTnijJ4/Ob +4QSwI7+Vio5bG0F/WsPoTUzVJBY+h0jUJ67m91MduwwA7z5hca2/OnpYH5Q9XIHV1W/fuJvS9eXL +g3KSwlOyggLrra1fFi2SU3bxibYs9cEv4KdKb6AwajLrmnQDaHgTncovmwsdvs91DSaXm8f1Xgqf +eN+zvOyauu9VjxuapgdjKRdZYgkqeQd3peDRF2npW932kKvimAoA0SVtnteFhy+S8dF2g08LOlk3 +KC8zpxdQ1iALCvQm+Z845y2kuJuJja2tyWp9iRe79n+Ag3rm7QIDAQABo4GSMIGPMBIGA1UdEwEB +/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFTVFJv +bmxpbmUxLTIwNDgtNTAdBgNVHQ4EFgQUD8oeXHngovMpttKFswtKtWXsa1IwHwYDVR0jBBgwFoAU +D8oeXHngovMpttKFswtKtWXsa1IwDQYJKoZIhvcNAQEFBQADggEBAK8B8O0ZPCjoTVy7pWMciDMD +pwCHpB8gq9Yc4wYfl35UvbfRssnV2oDsF9eK9XvCAPbpEW+EoFolMeKJ+aQAPzFoLtU96G7m1R08 +P7K9n3frndOMusDXtk3sU5wPBG7qNWdX4wple5A64U8+wwCSersFiXOMy6ZNwPv2AtawB6MDwidA +nwzkhYItr5pCHdDHjfhA7p0GVxzZotiAFP7hYy0yh9WUUpY6RsZxlj33mA6ykaqP2vROJAA5Veit +F7nTNCtKqUDMFypVZUF0Qn71wK/Ik63yGFs9iQzbRzkk+OBM8h+wPQrKBU6JIRrjKpms/H+h8Q8b +Hz2eBIPdltkdOpQ= +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA +========================= +-----BEGIN CERTIFICATE----- +MIIHqDCCBpCgAwIBAgIRAMy4579OKRr9otxmpRwsDxEwDQYJKoZIhvcNAQEFBQAwcjELMAkGA1UE +BhMCSFUxETAPBgNVBAcTCEJ1ZGFwZXN0MRYwFAYDVQQKEw1NaWNyb3NlYyBMdGQuMRQwEgYDVQQL +EwtlLVN6aWdubyBDQTEiMCAGA1UEAxMZTWljcm9zZWMgZS1Temlnbm8gUm9vdCBDQTAeFw0wNTA0 +MDYxMjI4NDRaFw0xNzA0MDYxMjI4NDRaMHIxCzAJBgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVz +dDEWMBQGA1UEChMNTWljcm9zZWMgTHRkLjEUMBIGA1UECxMLZS1Temlnbm8gQ0ExIjAgBgNVBAMT +GU1pY3Jvc2VjIGUtU3ppZ25vIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +AQDtyADVgXvNOABHzNuEwSFpLHSQDCHZU4ftPkNEU6+r+ICbPHiN1I2uuO/TEdyB5s87lozWbxXG +d36hL+BfkrYn13aaHUM86tnsL+4582pnS4uCzyL4ZVX+LMsvfUh6PXX5qqAnu3jCBspRwn5mS6/N +oqdNAoI/gqyFxuEPkEeZlApxcpMqyabAvjxWTHOSJ/FrtfX9/DAFYJLG65Z+AZHCabEeHXtTRbjc +QR/Ji3HWVBTji1R4P770Yjtb9aPs1ZJ04nQw7wHb4dSrmZsqa/i9phyGI0Jf7Enemotb9HI6QMVJ +PqW+jqpx62z69Rrkav17fVVA71hu5tnVvCSrwe+3AgMBAAGjggQ3MIIEMzBnBggrBgEFBQcBAQRb +MFkwKAYIKwYBBQUHMAGGHGh0dHBzOi8vcmNhLmUtc3ppZ25vLmh1L29jc3AwLQYIKwYBBQUHMAKG +IWh0dHA6Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNydDAPBgNVHRMBAf8EBTADAQH/MIIBcwYD +VR0gBIIBajCCAWYwggFiBgwrBgEEAYGoGAIBAQEwggFQMCgGCCsGAQUFBwIBFhxodHRwOi8vd3d3 +LmUtc3ppZ25vLmh1L1NaU1ovMIIBIgYIKwYBBQUHAgIwggEUHoIBEABBACAAdABhAG4A+gBzAO0A +dAB2AOEAbgB5ACAA6QByAHQAZQBsAG0AZQB6AOkAcwDpAGgAZQB6ACAA6QBzACAAZQBsAGYAbwBn +AGEAZADhAHMA4QBoAG8AegAgAGEAIABTAHoAbwBsAGcA4QBsAHQAYQB0APMAIABTAHoAbwBsAGcA +4QBsAHQAYQB0AOEAcwBpACAAUwB6AGEAYgDhAGwAeQB6AGEAdABhACAAcwB6AGUAcgBpAG4AdAAg +AGsAZQBsAGwAIABlAGwAagDhAHIAbgBpADoAIABoAHQAdABwADoALwAvAHcAdwB3AC4AZQAtAHMA +egBpAGcAbgBvAC4AaAB1AC8AUwBaAFMAWgAvMIHIBgNVHR8EgcAwgb0wgbqggbeggbSGIWh0dHA6 +Ly93d3cuZS1zemlnbm8uaHUvUm9vdENBLmNybIaBjmxkYXA6Ly9sZGFwLmUtc3ppZ25vLmh1L0NO +PU1pY3Jvc2VjJTIwZS1Temlnbm8lMjBSb290JTIwQ0EsT1U9ZS1Temlnbm8lMjBDQSxPPU1pY3Jv +c2VjJTIwTHRkLixMPUJ1ZGFwZXN0LEM9SFU/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDtiaW5h +cnkwDgYDVR0PAQH/BAQDAgEGMIGWBgNVHREEgY4wgYuBEGluZm9AZS1zemlnbm8uaHWkdzB1MSMw +IQYDVQQDDBpNaWNyb3NlYyBlLVN6aWduw7MgUm9vdCBDQTEWMBQGA1UECwwNZS1TemlnbsOzIEhT +WjEWMBQGA1UEChMNTWljcm9zZWMgS2Z0LjERMA8GA1UEBxMIQnVkYXBlc3QxCzAJBgNVBAYTAkhV +MIGsBgNVHSMEgaQwgaGAFMegSXUWYYTbMUuE0vE3QJDvTtz3oXakdDByMQswCQYDVQQGEwJIVTER +MA8GA1UEBxMIQnVkYXBlc3QxFjAUBgNVBAoTDU1pY3Jvc2VjIEx0ZC4xFDASBgNVBAsTC2UtU3pp +Z25vIENBMSIwIAYDVQQDExlNaWNyb3NlYyBlLVN6aWdubyBSb290IENBghEAzLjnv04pGv2i3Gal +HCwPETAdBgNVHQ4EFgQUx6BJdRZhhNsxS4TS8TdAkO9O3PcwDQYJKoZIhvcNAQEFBQADggEBANMT +nGZjWS7KXHAM/IO8VbH0jgdsZifOwTsgqRy7RlRw7lrMoHfqaEQn6/Ip3Xep1fvj1KcExJW4C+FE +aGAHQzAxQmHl7tnlJNUb3+FKG6qfx1/4ehHqE5MAyopYse7tDk2016g2JnzgOsHVV4Lxdbb9iV/a +86g4nzUGCM4ilb7N1fy+W955a9x6qWVmvrElWl/tftOsRm1M9DKHtCAE4Gx4sHfRhUZLphK3dehK +yVZs15KrnfVJONJPU+NVkBHbmJbGSfI+9J8b4PeI3CVimUTYc78/MPMMNz7UwiiAc7EBt51alhQB +S6kRnSlqLtBdgcDPsiBDxwPgN05dCtxZICU= +-----END CERTIFICATE----- + +Certigna +======== +-----BEGIN CERTIFICATE----- +MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNVBAYTAkZSMRIw +EAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4XDTA3MDYyOTE1MTMwNVoXDTI3 +MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQBgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwI +Q2VydGlnbmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7q +XOEm7RFHYeGifBZ4QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyH +GxnygQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbwzBfsV1/p +ogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q130yGLMLLGq/jj8UEYkg +DncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKf +Irjxwo1p3Po6WAbfAgMBAAGjgbwwgbkwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQ +tCRZvgHyUtVF9lo53BEwZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJ +BgNVBAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzjAQ/J +SP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG9w0BAQUFAAOCAQEA +hQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8hbV6lUmPOEvjvKtpv6zf+EwLHyzs+ +ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFncfca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1klu +PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY +1gkIl2PlwS6wt0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw +WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== +-----END CERTIFICATE----- + +AC Ra\xC3\xADz Certic\xC3\xA1mara S.A. +====================================== +-----BEGIN CERTIFICATE----- +MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNVBAYT +AkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRpZmljYWNpw7NuIERpZ2l0YWwg +LSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwaQUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4w +HhcNMDYxMTI3MjA0NjI5WhcNMzAwNDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+ +U29jaWVkYWQgQ2FtZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJh +IFMuQS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeGqentLhM0R7LQcNzJPNCN +yu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzLfDe3fezTf3MZsGqy2IiKLUV0qPezuMDU +2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQY5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU3 +4ojC2I+GdV75LaeHM/J4Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP +2yYe68yQ54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+bMMCm +8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48jilSH5L887uvDdUhf +HjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++EjYfDIJss2yKHzMI+ko6Kh3VOz3vCa +Mh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/ztA/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK +5lw1omdMEWux+IBkAC1vImHFrEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1b +czwmPS9KvqfJpxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE +AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCBlTCBkgYEVR0g +ADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFyYS5jb20vZHBjLzBaBggrBgEF +BQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW507WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2Ug +cHVlZGVuIGVuY29udHJhciBlbiBsYSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEf +AygPU3zmpFmps4p6xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuX +EpBcunvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/Jre7Ir5v +/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dpezy4ydV/NgIlqmjCMRW3 +MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42gzmRkBDI8ck1fj+404HGIGQatlDCIaR4 +3NAvO2STdPCWkPHv+wlaNECW8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wk +eZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f +/RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5h +RqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU +Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ== +-----END CERTIFICATE----- + +TC TrustCenter Class 2 CA II +============================ +-----BEGIN CERTIFICATE----- +MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy +IENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYw +MTEyMTQzODQzWhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 +c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UE +AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jftMjWQ+nEdVl//OEd+DFw +IxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKguNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2 +xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2JXjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQ +Xa7pIXSSTYtZgo+U4+lK8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7u +SNQZu+995OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3kUrL84J6E1wIqzCB +7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 +Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU +cnVzdENlbnRlciUyMENsYXNzJTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i +SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u +TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G +dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ +KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj +TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP +JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk +vQ== +-----END CERTIFICATE----- + +TC TrustCenter Class 3 CA II +============================ +-----BEGIN CERTIFICATE----- +MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy +IENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYw +MTEyMTQ0MTU3WhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 +c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UE +AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJWHt4bNwcwIi9v8Qbxq63W +yKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+QVl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo +6SI7dYnWRBpl8huXJh0obazovVkdKyT21oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZ +uV3bOx4a+9P/FRQI2AlqukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk +2ZyqBwi1Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NXXAek0CSnwPIA1DCB +7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 +Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU +cnVzdENlbnRlciUyMENsYXNzJTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i +SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u +TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE +O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8 +yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9 +IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal +092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc +5A== +-----END CERTIFICATE----- + +TC TrustCenter Universal CA I +============================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy +IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN +MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg +VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYw +JAYDVQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSRJJZ4Hgmgm5qVSkr1YnwC +qMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3TfCZdzHd55yx4Oagmcw6iXSVphU9VDprv +xrlE4Vc93x9UIuVvZaozhDrzznq+VZeujRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtw +ag+1m7Z3W0hZneTvWq3zwZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9O +gdwZu5GQfezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYDVR0j +BBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0GCSqGSIb3DQEBBQUAA4IBAQAo0uCG +1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X17caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/Cy +vwbZ71q+s2IhtNerNXxTPqYn8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3 +ghUJGooWMNjsydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT +ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/2TYcuiUaUj0a +7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY +-----END CERTIFICATE----- + +Deutsche Telekom Root CA 2 +========================== +-----BEGIN CERTIFICATE----- +MIIDnzCCAoegAwIBAgIBJjANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMT +RGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0GA1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEG +A1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBSb290IENBIDIwHhcNOTkwNzA5MTIxMTAwWhcNMTkwNzA5 +MjM1OTAwWjBxMQswCQYDVQQGEwJERTEcMBoGA1UEChMTRGV1dHNjaGUgVGVsZWtvbSBBRzEfMB0G +A1UECxMWVC1UZWxlU2VjIFRydXN0IENlbnRlcjEjMCEGA1UEAxMaRGV1dHNjaGUgVGVsZWtvbSBS +b290IENBIDIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCrC6M14IspFLEUha88EOQ5 +bzVdSq7d6mGNlUn0b2SjGmBmpKlAIoTZ1KXleJMOaAGtuU1cOs7TuKhCQN/Po7qCWWqSG6wcmtoI +KyUn+WkjR/Hg6yx6m/UTAtB+NHzCnjwAWav12gz1MjwrrFDa1sPeg5TKqAyZMg4ISFZbavva4VhY +AUlfckE8FQYBjl2tqriTtM2e66foai1SNNs671x1Udrb8zH57nGYMsRUFUQM+ZtV7a3fGAigo4aK +Se5TBY8ZTNXeWHmb0mocQqvF1afPaA+W5OFhmHZhyJF81j4A4pFQh+GdCuatl9Idxjp9y7zaAzTV +jlsB9WoHtxa2bkp/AgMBAAGjQjBAMB0GA1UdDgQWBBQxw3kbuvVT1xfgiXotF2wKsyudMzAPBgNV +HRMECDAGAQH/AgEFMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAlGRZrTlk5ynr +E/5aw4sTV8gEJPB0d8Bg42f76Ymmg7+Wgnxu1MM9756AbrsptJh6sTtU6zkXR34ajgv8HzFZMQSy +zhfzLMdiNlXiItiJVbSYSKpk+tYcNthEeFpaIzpXl/V6ME+un2pMSyuOoAPjPuCp1NJ70rOo4nI8 +rZ7/gFnkm0W09juwzTkZmDLl6iFhkOQxIY40sfcvNUqFENrnijchvllj4PKFiDFT1FQUhXB59C4G +dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU +Cm26OWMohpLzGITY+9HPBVZkVw== +-----END CERTIFICATE----- + +ComSign CA +========== +-----BEGIN CERTIFICATE----- +MIIDkzCCAnugAwIBAgIQFBOWgxRVjOp7Y+X8NId3RDANBgkqhkiG9w0BAQUFADA0MRMwEQYDVQQD +EwpDb21TaWduIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTMy +MThaFw0yOTAzMTkxNTAyMThaMDQxEzARBgNVBAMTCkNvbVNpZ24gQ0ExEDAOBgNVBAoTB0NvbVNp +Z24xCzAJBgNVBAYTAklMMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8ORUaSvTx49q +ROR+WCf4C9DklBKK8Rs4OC8fMZwG1Cyn3gsqrhqg455qv588x26i+YtkbDqthVVRVKU4VbirgwTy +P2Q298CNQ0NqZtH3FyrV7zb6MBBC11PN+fozc0yz6YQgitZBJzXkOPqUm7h65HkfM/sb2CEJKHxN +GGleZIp6GZPKfuzzcuc3B1hZKKxC+cX/zT/npfo4sdAMx9lSGlPWgcxCejVb7Us6eva1jsz/D3zk +YDaHL63woSV9/9JLEYhwVKZBqGdTUkJe5DSe5L6j7KpiXd3DTKaCQeQzC6zJMw9kglcq/QytNuEM +rkvF7zuZ2SOzW120V+x0cAwqTwIDAQABo4GgMIGdMAwGA1UdEwQFMAMBAf8wPQYDVR0fBDYwNDAy +oDCgLoYsaHR0cDovL2ZlZGlyLmNvbXNpZ24uY28uaWwvY3JsL0NvbVNpZ25DQS5jcmwwDgYDVR0P +AQH/BAQDAgGGMB8GA1UdIwQYMBaAFEsBmz5WGmU2dst7l6qSBe4y5ygxMB0GA1UdDgQWBBRLAZs+ +VhplNnbLe5eqkgXuMucoMTANBgkqhkiG9w0BAQUFAAOCAQEA0Nmlfv4pYEWdfoPPbrxHbvUanlR2 +QnG0PFg/LUAlQvaBnPGJEMgOqnhPOAlXsDzACPw1jvFIUY0McXS6hMTXcpuEfDhOZAYnKuGntewI +mbQKDdSFc8gS4TXt8QUxHXOZDOuWyt3T5oWq8Ir7dcHyCTxlZWTzTNity4hp8+SDtwy9F1qWF8pb +/627HOkthIDYIb6FUtnUdLlphbpN7Sgy6/lhSuTENh4Z3G+EER+V9YMoGKgzkkMn3V0TBEVPh9VG +zT2ouvDzuFYkRes3x+F2T3I5GN9+dHLHcy056mDmrRGiVod7w2ia/viMcKjfZTL0pECMocJEAw6U +AGegcQCCSA== +-----END CERTIFICATE----- + +ComSign Secured CA +================== +-----BEGIN CERTIFICATE----- +MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAwPDEbMBkGA1UE +AxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0w +NDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwxGzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBD +QTEQMA4GA1UEChMHQ29tU2lnbjELMAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDGtWhfHZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs +49ohgHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sWv+bznkqH +7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ueMv5WJDmyVIRD9YTC2LxB +kMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d1 +9guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUw +AwEB/zBEBgNVHR8EPTA7MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29t +U2lnblNlY3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58ADsA +j8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkqhkiG9w0BAQUFAAOC +AQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7piL1DRYHjZiM/EoZNGeQFsOY3wo3a +BijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtCdsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtp +FhpFfTMDZflScZAmlaxMDPWLkz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP +51qJThRv4zdLhfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz +OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw== +-----END CERTIFICATE----- + +Cybertrust Global Root +====================== +-----BEGIN CERTIFICATE----- +MIIDoTCCAomgAwIBAgILBAAAAAABD4WqLUgwDQYJKoZIhvcNAQEFBQAwOzEYMBYGA1UEChMPQ3li +ZXJ0cnVzdCwgSW5jMR8wHQYDVQQDExZDeWJlcnRydXN0IEdsb2JhbCBSb290MB4XDTA2MTIxNTA4 +MDAwMFoXDTIxMTIxNTA4MDAwMFowOzEYMBYGA1UEChMPQ3liZXJ0cnVzdCwgSW5jMR8wHQYDVQQD +ExZDeWJlcnRydXN0IEdsb2JhbCBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA ++Mi8vRRQZhP/8NN57CPytxrHjoXxEnOmGaoQ25yiZXRadz5RfVb23CO21O1fWLE3TdVJDm71aofW +0ozSJ8bi/zafmGWgE07GKmSb1ZASzxQG9Dvj1Ci+6A74q05IlG2OlTEQXO2iLb3VOm2yHLtgwEZL +AfVJrn5GitB0jaEMAs7u/OePuGtm839EAL9mJRQr3RAwHQeWP032a7iPt3sMpTjr3kfb1V05/Iin +89cqdPHoWqI7n1C6poxFNcJQZZXcY4Lv3b93TZxiyWNzFtApD0mpSPCzqrdsxacwOUBdrsTiXSZT +8M4cIwhhqJQZugRiQOwfOHB3EgZxpzAYXSUnpQIDAQABo4GlMIGiMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBS2CHsNesysIEyGVjJez6tuhS1wVzA/BgNVHR8EODA2 +MDSgMqAwhi5odHRwOi8vd3d3Mi5wdWJsaWMtdHJ1c3QuY29tL2NybC9jdC9jdHJvb3QuY3JsMB8G +A1UdIwQYMBaAFLYIew16zKwgTIZWMl7Pq26FLXBXMA0GCSqGSIb3DQEBBQUAA4IBAQBW7wojoFRO +lZfJ+InaRcHUowAl9B8Tq7ejhVhpwjCt2BWKLePJzYFa+HMjWqd8BfP9IjsO0QbE2zZMcwSO5bAi +5MXzLqXZI+O4Tkogp24CJJ8iYGd7ix1yCcUxXOl5n4BHPa2hCwcUPUf/A2kaDAtE52Mlp3+yybh2 +hO0j9n0Hq0V+09+zv+mKts2oomcrUtW3ZfA5TGOgkXmTUg9U3YO7n9GPp1Nzw8v/MOx8BLjYRB+T +X3EJIrduPuocA06dGiBh+4E37F78CkWr1+cXVdCg6mCbpvbjjFspwgZgFJ0tl0ypkxWdYcQBX0jW +WL1WMRJOEcgh4LMRkWXbtKaIOM5V +-----END CERTIFICATE----- + +ePKI Root Certification Authority +================================= +-----BEGIN CERTIFICATE----- +MIIFsDCCA5igAwIBAgIQFci9ZUdcr7iXAF7kBtK8nTANBgkqhkiG9w0BAQUFADBeMQswCQYDVQQG +EwJUVzEjMCEGA1UECgwaQ2h1bmdod2EgVGVsZWNvbSBDby4sIEx0ZC4xKjAoBgNVBAsMIWVQS0kg +Um9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw0wNDEyMjAwMjMxMjdaFw0zNDEyMjAwMjMx +MjdaMF4xCzAJBgNVBAYTAlRXMSMwIQYDVQQKDBpDaHVuZ2h3YSBUZWxlY29tIENvLiwgTHRkLjEq +MCgGA1UECwwhZVBLSSBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0B +AQEFAAOCAg8AMIICCgKCAgEA4SUP7o3biDN1Z82tH306Tm2d0y8U82N0ywEhajfqhFAHSyZbCUNs +IZ5qyNUD9WBpj8zwIuQf5/dqIjG3LBXy4P4AakP/h2XGtRrBp0xtInAhijHyl3SJCRImHJ7K2RKi +lTza6We/CKBk49ZCt0Xvl/T29de1ShUCWH2YWEtgvM3XDZoTM1PRYfl61dd4s5oz9wCGzh1NlDiv +qOx4UXCKXBCDUSH3ET00hl7lSM2XgYI1TBnsZfZrxQWh7kcT1rMhJ5QQCtkkO7q+RBNGMD+XPNjX +12ruOzjjK9SXDrkb5wdJfzcq+Xd4z1TtW0ado4AOkUPB1ltfFLqfpo0kR0BZv3I4sjZsN/+Z0V0O +WQqraffAsgRFelQArr5T9rXn4fg8ozHSqf4hUmTFpmfwdQcGlBSBVcYn5AGPF8Fqcde+S/uUWH1+ +ETOxQvdibBjWzwloPn9s9h6PYq2lY9sJpx8iQkEeb5mKPtf5P0B6ebClAZLSnT0IFaUQAS2zMnao +lQ2zepr7BxB4EW/hj8e6DyUadCrlHJhBmd8hh+iVBmoKs2pHdmX2Os+PYhcZewoozRrSgx4hxyy/ +vv9haLdnG7t4TY3OZ+XkwY63I2binZB1NJipNiuKmpS5nezMirH4JYlcWrYvjB9teSSnUmjDhDXi +Zo1jDiVN1Rmy5nk3pyKdVDECAwEAAaNqMGgwHQYDVR0OBBYEFB4M97Zn8uGSJglFwFU5Lnc/Qkqi +MAwGA1UdEwQFMAMBAf8wOQYEZyoHAAQxMC8wLQIBADAJBgUrDgMCGgUAMAcGBWcqAwAABBRFsMLH +ClZ87lt4DJX5GFPBphzYEDANBgkqhkiG9w0BAQUFAAOCAgEACbODU1kBPpVJufGBuvl2ICO1J2B0 +1GqZNF5sAFPZn/KmsSQHRGoqxqWOeBLoR9lYGxMqXnmbnwoqZ6YlPwZpVnPDimZI+ymBV3QGypzq +KOg4ZyYr8dW1P2WT+DZdjo2NQCCHGervJ8A9tDkPJXtoUHRVnAxZfVo9QZQlUgjgRywVMRnVvwdV +xrsStZf0X4OFunHB2WyBEXYKCrC/gpf36j36+uwtqSiUO1bd0lEursC9CBWMd1I0ltabrNMdjmEP +NXubrjlpC2JgQCA2j6/7Nu4tCEoduL+bXPjqpRugc6bY+G7gMwRfaKonh+3ZwZCc7b3jajWvY9+r +GNm65ulK6lCKD2GTHuItGeIwlDWSXQ62B68ZgI9HkFFLLk3dheLSClIKF5r8GrBQAuUBo2M3IUxE +xJtRmREOc5wGj1QupyheRDmHVi03vYVElOEMSyycw5KFNGHLD7ibSkNS/jQ6fbjpKdx2qcgw+BRx +gMYeNkh0IkFch4LoGHGLQYlE535YW6i4jRPpp2zDR+2zGp1iro2C6pSe3VkQw63d4k3jMdXH7Ojy +sP6SHhYKGvzZ8/gntsm+HbRsZJB/9OTEW9c3rkIO3aQab3yIVMUWbuF6aC74Or8NpDyJO3inTmOD +BCEIZ43ygknQW/2xzQ+DhNQ+IIX3Sj0rnP0qCglN6oH4EZw= +-----END CERTIFICATE----- + +T\xc3\x9c\x42\xC4\xB0TAK UEKAE K\xC3\xB6k Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 - S\xC3\xBCr\xC3\xBCm 3 +============================================================================================================================= +-----BEGIN CERTIFICATE----- +MIIFFzCCA/+gAwIBAgIBETANBgkqhkiG9w0BAQUFADCCASsxCzAJBgNVBAYTAlRSMRgwFgYDVQQH +DA9HZWJ6ZSAtIEtvY2FlbGkxRzBFBgNVBAoMPlTDvHJraXllIEJpbGltc2VsIHZlIFRla25vbG9q +aWsgQXJhxZ90xLFybWEgS3VydW11IC0gVMOcQsSwVEFLMUgwRgYDVQQLDD9VbHVzYWwgRWxla3Ry +b25payB2ZSBLcmlwdG9sb2ppIEFyYcWfdMSxcm1hIEVuc3RpdMO8c8O8IC0gVUVLQUUxIzAhBgNV +BAsMGkthbXUgU2VydGlmaWthc3lvbiBNZXJrZXppMUowSAYDVQQDDEFUw5xCxLBUQUsgVUVLQUUg +S8O2ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSAtIFPDvHLDvG0gMzAeFw0wNzA4 +MjQxMTM3MDdaFw0xNzA4MjExMTM3MDdaMIIBKzELMAkGA1UEBhMCVFIxGDAWBgNVBAcMD0dlYnpl +IC0gS29jYWVsaTFHMEUGA1UECgw+VMO8cmtpeWUgQmlsaW1zZWwgdmUgVGVrbm9sb2ppayBBcmHF +n3TEsXJtYSBLdXJ1bXUgLSBUw5xCxLBUQUsxSDBGBgNVBAsMP1VsdXNhbCBFbGVrdHJvbmlrIHZl +IEtyaXB0b2xvamkgQXJhxZ90xLFybWEgRW5zdGl0w7xzw7wgLSBVRUtBRTEjMCEGA1UECwwaS2Ft +dSBTZXJ0aWZpa2FzeW9uIE1lcmtlemkxSjBIBgNVBAMMQVTDnELEsFRBSyBVRUtBRSBLw7ZrIFNl +cnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIC0gU8O8csO8bSAzMIIBIjANBgkqhkiG9w0B +AQEFAAOCAQ8AMIIBCgKCAQEAim1L/xCIOsP2fpTo6iBkcK4hgb46ezzb8R1Sf1n68yJMlaCQvEhO +Eav7t7WNeoMojCZG2E6VQIdhn8WebYGHV2yKO7Rm6sxA/OOqbLLLAdsyv9Lrhc+hDVXDWzhXcLh1 +xnnRFDDtG1hba+818qEhTsXOfJlfbLm4IpNQp81McGq+agV/E5wrHur+R84EpW+sky58K5+eeROR +6Oqeyjh1jmKwlZMq5d/pXpduIF9fhHpEORlAHLpVK/swsoHvhOPc7Jg4OQOFCKlUAwUp8MmPi+oL +hmUZEdPpCSPeaJMDyTYcIW7OjGbxmTDY17PDHfiBLqi9ggtm/oLL4eAagsNAgQIDAQABo0IwQDAd +BgNVHQ4EFgQUvYiHyY/2pAoLquvF/pEjnatKijIwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAB18+kmPNOm3JpIWmgV050vQbTlswyb2zrgxvMTfvCr4 +N5EY3ATIZJkrGG2AA1nJrvhY0D7twyOfaTyGOBye79oneNGEN3GKPEs5z35FBtYt2IpNeBLWrcLT +y9LQQfMmNkqblWwM7uXRQydmwYj3erMgbOqwaSvHIOgMA8RBBZniP+Rr+KCGgceExh/VS4ESshYh +LBOhgLJeDEoTniDYYkCrkOpkSi+sDQESeUWoL4cZaMjihccwsnX5OD+ywJO0a+IDRM5noN+J1q2M +dqMTw5RhK2vZbMEHCiIHhWyFJEapvj+LeISCfiQMnf2BN+MlqO02TpUsyZyQ2uypQjyttgI= +-----END CERTIFICATE----- + +Buypass Class 2 CA 1 +==================== +-----BEGIN CERTIFICATE----- +MIIDUzCCAjugAwIBAgIBATANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMiBDQSAxMB4XDTA2 +MTAxMzEwMjUwOVoXDTE2MTAxMzEwMjUwOVowSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh +c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDIgQ0EgMTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAIs8B0XY9t/mx8q6jUPFR42wWsE425KEHK8T1A9vNkYgxC7M +cXA0ojTTNy7Y3Tp3L8DrKehc0rWpkTSHIln+zNvnma+WwajHQN2lFYxuyHyXA8vmIPLXl18xoS83 +0r7uvqmtqEyeIWZDO6i88wmjONVZJMHCR3axiFyCO7srpgTXjAePzdVBHfCuuCkslFJgNJQ72uA4 +0Z0zPhX0kzLFANq1KWYOOngPIVJfAuWSeyXTkh4vFZ2B5J2O6O+JzhRMVB0cgRJNcKi+EAUXfh/R +uFdV7c27UsKwHnjCTTZoy1YmwVLBvXb3WNVyfh9EdrsAiR0WnVE1703CVu9r4Iw7DekCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUP42aWYv8e3uco684sDntkHGA1sgwDgYDVR0P +AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQAVGn4TirnoB6NLJzKyQJHyIdFkhb5jatLPgcIV +1Xp+DCmsNx4cfHZSldq1fyOhKXdlyTKdqC5Wq2B2zha0jX94wNWZUYN/Xtm+DKhQ7SLHrQVMdvvt +7h5HZPb3J31cKA9FxVxiXqaakZG3Uxcu3K1gnZZkOb1naLKuBctN518fV4bVIJwo+28TOPX2EZL2 +fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w +wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho +-----END CERTIFICATE----- + +Buypass Class 3 CA 1 +==================== +-----BEGIN CERTIFICATE----- +MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU +QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMyBDQSAxMB4XDTA1 +MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh +c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKx +ifZgisRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//zNIqeKNc0 +n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI+MkcVyzwPX6UvCWThOia +AJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2RhzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c +1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0P +AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFPBdy7 +pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA +EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5 +htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj +el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915 +-----END CERTIFICATE----- + +EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 +========================================================================== +-----BEGIN CERTIFICATE----- +MIIF5zCCA8+gAwIBAgIITK9zQhyOdAIwDQYJKoZIhvcNAQEFBQAwgYAxODA2BgNVBAMML0VCRyBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMTcwNQYDVQQKDC5FQkcg +QmlsacWfaW0gVGVrbm9sb2ppbGVyaSB2ZSBIaXptZXRsZXJpIEEuxZ4uMQswCQYDVQQGEwJUUjAe +Fw0wNjA4MTcwMDIxMDlaFw0xNjA4MTQwMDMxMDlaMIGAMTgwNgYDVQQDDC9FQkcgRWxla3Ryb25p +ayBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTE3MDUGA1UECgwuRUJHIEJpbGnFn2lt +IFRla25vbG9qaWxlcmkgdmUgSGl6bWV0bGVyaSBBLsWeLjELMAkGA1UEBhMCVFIwggIiMA0GCSqG +SIb3DQEBAQUAA4ICDwAwggIKAoICAQDuoIRh0DpqZhAy2DE4f6en5f2h4fuXd7hxlugTlkaDT7by +X3JWbhNgpQGR4lvFzVcfd2NR/y8927k/qqk153nQ9dAktiHq6yOU/im/+4mRDGSaBUorzAzu8T2b +gmmkTPiab+ci2hC6X5L8GCcKqKpE+i4stPtGmggDg3KriORqcsnlZR9uKg+ds+g75AxuetpX/dfr +eYteIAbTdgtsApWjluTLdlHRKJ2hGvxEok3MenaoDT2/F08iiFD9rrbskFBKW5+VQarKD7JK/oCZ +TqNGFav4c0JqwmZ2sQomFd2TkuzbqV9UIlKRcF0T6kjsbgNs2d1s/OsNA/+mgxKb8amTD8UmTDGy +Y5lhcucqZJnSuOl14nypqZoaqsNW2xCaPINStnuWt6yHd6i58mcLlEOzrz5z+kI2sSXFCjEmN1Zn +uqMLfdb3ic1nobc6HmZP9qBVFCVMLDMNpkGMvQQxahByCp0OLna9XvNRiYuoP1Vzv9s6xiQFlpJI +qkuNKgPlV5EQ9GooFW5Hd4RcUXSfGenmHmMWOeMRFeNYGkS9y8RsZteEBt8w9DeiQyJ50hBs37vm +ExH8nYQKE3vwO9D8owrXieqWfo1IhR5kX9tUoqzVegJ5a9KK8GfaZXINFHDk6Y54jzJ0fFfy1tb0 +Nokb+Clsi7n2l9GkLqq+CxnCRelwXQIDAJ3Zo2MwYTAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHQ4EFgQU587GT/wWZ5b6SqMHwQSny2re2kcwHwYDVR0jBBgwFoAU587GT/wW +Z5b6SqMHwQSny2re2kcwDQYJKoZIhvcNAQEFBQADggIBAJuYml2+8ygjdsZs93/mQJ7ANtyVDR2t +FcU22NU57/IeIl6zgrRdu0waypIN30ckHrMk2pGI6YNw3ZPX6bqz3xZaPt7gyPvT/Wwp+BVGoGgm +zJNSroIBk5DKd8pNSe/iWtkqvTDOTLKBtjDOWU/aWR1qeqRFsIImgYZ29fUQALjuswnoT4cCB64k +XPBfrAowzIpAoHMEwfuJJPaaHFy3PApnNgUIMbOv2AFoKuB4j3TeuFGkjGwgPaL7s9QJ/XvCgKqT +bCmYIai7FvOpEl90tYeY8pUm3zTvilORiF0alKM/fCL414i6poyWqD1SNGKfAB5UVUJnxk1Gj7sU +RT0KlhaOEKGXmdXTMIXM3rRyt7yKPBgpaP3ccQfuJDlq+u2lrDgv+R4QDgZxGhBM/nV+/x5XOULK +1+EVoVZVWRvRo68R2E7DpSvvkL/A7IITW43WciyTTo9qKd+FPNMN4KIYEsxVL0e3p5sC/kH2iExt +2qkBR4NkJ2IQgtYSe14DHzSpyZH+r11thie3I6p1GMog57AP14kOpmciY/SDQSsGS7tY1dHXt7kQ +Y9iJSrSq3RZj9W6+YKH47ejWkE8axsWgKdOnIaj1Wjz3x0miIZpKlVIglnKaZsv30oZDfCK+lvm9 +AahH3eU7QPl1K5srRmSGjR70j/sHd9DqSaIcjVIUpgqT +-----END CERTIFICATE----- + +certSIGN ROOT CA +================ +-----BEGIN CERTIFICATE----- +MIIDODCCAiCgAwIBAgIGIAYFFnACMA0GCSqGSIb3DQEBBQUAMDsxCzAJBgNVBAYTAlJPMREwDwYD +VQQKEwhjZXJ0U0lHTjEZMBcGA1UECxMQY2VydFNJR04gUk9PVCBDQTAeFw0wNjA3MDQxNzIwMDRa +Fw0zMTA3MDQxNzIwMDRaMDsxCzAJBgNVBAYTAlJPMREwDwYDVQQKEwhjZXJ0U0lHTjEZMBcGA1UE +CxMQY2VydFNJR04gUk9PVCBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALczuX7I +JUqOtdu0KBuqV5Do0SLTZLrTk+jUrIZhQGpgV2hUhE28alQCBf/fm5oqrl0Hj0rDKH/v+yv6efHH +rfAQUySQi2bJqIirr1qjAOm+ukbuW3N7LBeCgV5iLKECZbO9xSsAfsT8AzNXDe3i+s5dRdY4zTW2 +ssHQnIFKquSyAVwdj1+ZxLGt24gh65AIgoDzMKND5pCCrlUoSe1b16kQOA7+j0xbm0bqQfWwCHTD +0IgztnzXdN/chNFDDnU5oSVAKOp4yw4sLjmdjItuFhwvJoIQ4uNllAoEwF73XVv4EOLQunpL+943 +AAAaWyjj0pxzPjKHmKHJUS/X3qwzs08CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8B +Af8EBAMCAcYwHQYDVR0OBBYEFOCMm9slSbPxfIbWskKHC9BroNnkMA0GCSqGSIb3DQEBBQUAA4IB +AQA+0hyJLjX8+HXd5n9liPRyTMks1zJO890ZeUe9jjtbkw9QSSQTaxQGcu8J06Gh40CEyecYMnQ8 +SG4Pn0vU9x7Tk4ZkVJdjclDVVc/6IJMCopvDI5NOFlV2oHB5bc0hH88vLbwZ44gx+FkagQnIl6Z0 +x2DEW8xXjrJ1/RsCCdtZb3KTafcxQdaIOL+Hsr0Wefmq5L6IJd1hJyMctTEHBDa0GpC9oHRxUIlt +vBTjD4au8as+x6AJzKNI0eDbZOeStc+vckNwi/nDhDwTqn6Sm1dTk/pwwpEOMfmbZ13pljheX7Nz +TogVZ96edhBiIL5VaZVDADlN9u6wWk5JRFRYX0KD +-----END CERTIFICATE----- + +CNNIC ROOT +========== +-----BEGIN CERTIFICATE----- +MIIDVTCCAj2gAwIBAgIESTMAATANBgkqhkiG9w0BAQUFADAyMQswCQYDVQQGEwJDTjEOMAwGA1UE +ChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1QwHhcNMDcwNDE2MDcwOTE0WhcNMjcwNDE2MDcw +OTE0WjAyMQswCQYDVQQGEwJDTjEOMAwGA1UEChMFQ05OSUMxEzARBgNVBAMTCkNOTklDIFJPT1Qw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDTNfc/c3et6FtzF8LRb+1VvG7q6KR5smzD +o+/hn7E7SIX1mlwhIhAsxYLO2uOabjfhhyzcuQxauohV3/2q2x8x6gHx3zkBwRP9SFIhxFXf2tiz +VHa6dLG3fdfA6PZZxU3Iva0fFNrfWEQlMhkqx35+jq44sDB7R3IJMfAw28Mbdim7aXZOV/kbZKKT +VrdvmW7bCgScEeOAH8tjlBAKqeFkgjH5jCftppkA9nCTGPihNIaj3XrCGHn2emU1z5DrvTOTn1Or +czvmmzQgLx3vqR1jGqCA2wMv+SYahtKNu6m+UjqHZ0gNv7Sg2Ca+I19zN38m5pIEo3/PIKe38zrK +y5nLAgMBAAGjczBxMBEGCWCGSAGG+EIBAQQEAwIABzAfBgNVHSMEGDAWgBRl8jGtKvf33VKWCscC +wQ7vptU7ETAPBgNVHRMBAf8EBTADAQH/MAsGA1UdDwQEAwIB/jAdBgNVHQ4EFgQUZfIxrSr3991S +lgrHAsEO76bVOxEwDQYJKoZIhvcNAQEFBQADggEBAEs17szkrr/Dbq2flTtLP1se31cpolnKOOK5 +Gv+e5m4y3R6u6jW39ZORTtpC4cMXYFDy0VwmuYK36m3knITnA3kXr5g9lNvHugDnuL8BV8F3RTIM +O/G0HAiw/VGgod2aHRM2mm23xzy54cXZF/qD1T0VoDy7HgviyJA/qIYM/PmLXoXLT1tLYhFHxUV8 +BS9BsZ4QaRuZluBVeftOhpm4lNqGOGqTo+fLbuXf6iFViZx9fX+Y9QCJ7uOEwFyWtcVG6kbghVW2 +G8kS1sHNzYDzAgE8yGnLRUhj2JTQ7IUOO04RZfSCjKY9ri4ilAnIXOo8gV0WKgOXFlUJ24pBgp5m +mxE= +-----END CERTIFICATE----- + +ApplicationCA - Japanese Government +=================================== +-----BEGIN CERTIFICATE----- +MIIDoDCCAoigAwIBAgIBMTANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJKUDEcMBoGA1UEChMT +SmFwYW5lc2UgR292ZXJubWVudDEWMBQGA1UECxMNQXBwbGljYXRpb25DQTAeFw0wNzEyMTIxNTAw +MDBaFw0xNzEyMTIxNTAwMDBaMEMxCzAJBgNVBAYTAkpQMRwwGgYDVQQKExNKYXBhbmVzZSBHb3Zl +cm5tZW50MRYwFAYDVQQLEw1BcHBsaWNhdGlvbkNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAp23gdE6Hj6UG3mii24aZS2QNcfAKBZuOquHMLtJqO8F6tJdhjYq+xpqcBrSGUeQ3DnR4 +fl+Kf5Sk10cI/VBaVuRorChzoHvpfxiSQE8tnfWuREhzNgaeZCw7NCPbXCbkcXmP1G55IrmTwcrN +wVbtiGrXoDkhBFcsovW8R0FPXjQilbUfKW1eSvNNcr5BViCH/OlQR9cwFO5cjFW6WY2H/CPek9AE +jP3vbb3QesmlOmpyM8ZKDQUXKi17safY1vC+9D/qDihtQWEjdnjDuGWk81quzMKq2edY3rZ+nYVu +nyoKb58DKTCXKB28t89UKU5RMfkntigm/qJj5kEW8DOYRwIDAQABo4GeMIGbMB0GA1UdDgQWBBRU +WssmP3HMlEYNllPqa0jQk/5CdTAOBgNVHQ8BAf8EBAMCAQYwWQYDVR0RBFIwUKROMEwxCzAJBgNV +BAYTAkpQMRgwFgYDVQQKDA/ml6XmnKzlm73mlL/lupwxIzAhBgNVBAsMGuOCouODl+ODquOCseOD +vOOCt+ODp+ODs0NBMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBADlqRHZ3ODrs +o2dGD/mLBqj7apAxzn7s2tGJfHrrLgy9mTLnsCTWw//1sogJhyzjVOGjprIIC8CFqMjSnHH2HZ9g +/DgzE+Ge3Atf2hZQKXsvcJEPmbo0NI2VdMV+eKlmXb3KIXdCEKxmJj3ekav9FfBv7WxfEPjzFvYD +io+nEhEMy/0/ecGc/WLuo89UDNErXxc+4z6/wCs+CZv+iKZ+tJIX/COUgb1up8WMwusRRdv4QcmW +dupwX3kSa+SjB1oF7ydJzyGfikwJcGapJsErEU4z0g781mzSDjJkaP+tBXhfAx2o45CsJOAPQKdL +rosot4LKGAfmt1t06SAZf7IbiVQ= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G3 +============================================= +-----BEGIN CERTIFICATE----- +MIID/jCCAuagAwIBAgIQFaxulBmyeUtB9iepwxgPHzANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UE +BhMCVVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA4IEdlb1RydXN0 +IEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFy +eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMB4XDTA4MDQwMjAwMDAwMFoXDTM3MTIwMTIz +NTk1OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAo +YykgMjAwOCBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMT +LUdlb1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBANziXmJYHTNXOTIz+uvLh4yn1ErdBojqZI4xmKU4kB6Yzy5j +K/BGvESyiaHAKAxJcCGVn2TAppMSAmUmhsalifD614SgcK9PGpc/BkTVyetyEH3kMSj7HGHmKAdE +c5IiaacDiGydY8hS2pgn5whMcD60yRLBxWeDXTPzAxHsatBT4tG6NmCUgLthY2xbF37fQJQeqw3C +IShwiP/WJmxsYAQlTlV+fe+/lEjetx3dcI0FX4ilm/LC7urRQEFtYjgdVgbFA0dRIBn8exALDmKu +dlW/X3e+PkkBUz2YJQN2JFodtNuJ6nnltrM7P7pMKEF/BqxqjsHQ9gUdfeZChuOl1UcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMR5yo6hTgMdHNxr +2zFblD4/MH8tMA0GCSqGSIb3DQEBCwUAA4IBAQAtxRPPVoB7eni9n64smefv2t+UXglpp+duaIy9 +cr5HqQ6XErhK8WTTOd8lNNTBzU6B8A8ExCSzNJbGpqow32hhc9f5joWJ7w5elShKKiePEI4ufIbE +Ap7aDHdlDkQNkv39sxY2+hENHYwOB4lqKVb3cvTdFZx3NWZXqxNT2I7BQMXXExZacse3aQHEerGD +AWh9jUGhlBjBJVz88P6DAod8DQ3PLghcSkANPuyBYeYk28rgDi0Hsj5W3I31QYUHSJsMC8tJP33s +t/3LjWeJGqvtux6jAAgIFyqCXDFdRootD4abdNlF+9RAsXqqaC2Gspki4cErx5z481+oghLrGREt +-----END CERTIFICATE----- + +thawte Primary Root CA - G2 +=========================== +-----BEGIN CERTIFICATE----- +MIICiDCCAg2gAwIBAgIQNfwmXNmET8k9Jj1Xm67XVjAKBggqhkjOPQQDAzCBhDELMAkGA1UEBhMC +VVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjE4MDYGA1UECxMvKGMpIDIwMDcgdGhhd3RlLCBJbmMu +IC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3Qg +Q0EgLSBHMjAeFw0wNzExMDUwMDAwMDBaFw0zODAxMTgyMzU5NTlaMIGEMQswCQYDVQQGEwJVUzEV +MBMGA1UEChMMdGhhd3RlLCBJbmMuMTgwNgYDVQQLEy8oYykgMjAwNyB0aGF3dGUsIEluYy4gLSBG +b3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIGA1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAt +IEcyMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEotWcgnuVnfFSeIf+iha/BebfowJPDQfGAFG6DAJS +LSKkQjnE/o/qycG+1E3/n3qe4rF8mq2nhglzh9HnmuN6papu+7qzcMBniKI11KOasf2twu8x+qi5 +8/sIxpHR+ymVo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU +mtgAMADna3+FGO6Lts6KDPgR4bswCgYIKoZIzj0EAwMDaQAwZgIxAN344FdHW6fmCsO99YCKlzUN +G4k8VIZ3KMqh9HneteY4sPBlcIx/AlTCv//YoT7ZzwIxAMSNlPzcU9LcnXgWHxUzI1NS41oxXZ3K +rr0TKUQNJ1uo52icEvdYPy5yAlejj6EULg== +-----END CERTIFICATE----- + +thawte Primary Root CA - G3 +=========================== +-----BEGIN CERTIFICATE----- +MIIEKjCCAxKgAwIBAgIQYAGXt0an6rS0mtZLL/eQ+zANBgkqhkiG9w0BAQsFADCBrjELMAkGA1UE +BhMCVVMxFTATBgNVBAoTDHRoYXd0ZSwgSW5jLjEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2 +aWNlcyBEaXZpc2lvbjE4MDYGA1UECxMvKGMpIDIwMDggdGhhd3RlLCBJbmMuIC0gRm9yIGF1dGhv +cml6ZWQgdXNlIG9ubHkxJDAiBgNVBAMTG3RoYXd0ZSBQcmltYXJ5IFJvb3QgQ0EgLSBHMzAeFw0w +ODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIGuMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhh +d3RlLCBJbmMuMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2VzIERpdmlzaW9uMTgwNgYD +VQQLEy8oYykgMjAwOCB0aGF3dGUsIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEkMCIG +A1UEAxMbdGhhd3RlIFByaW1hcnkgUm9vdCBDQSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsr8nLPvb2FvdeHsbnndmgcs+vHyu86YnmjSjaDFxODNi5PNxZnmxqWWjpYvVj2At +P0LMqmsywCPLLEHd5N/8YZzic7IilRFDGF/Eth9XbAoFWCLINkw6fKXRz4aviKdEAhN0cXMKQlkC ++BsUa0Lfb1+6a4KinVvnSr0eAXLbS3ToO39/fR8EtCab4LRarEc9VbjXsCZSKAExQGbY2SS99irY +7CFJXJv2eul/VTV+lmuNk5Mny5K76qxAwJ/C+IDPXfRa3M50hqY+bAtTyr2SzhkGcuYMXDhpxwTW +vGzOW/b3aJzcJRVIiKHpqfiYnODz1TEoYRFsZ5aNOZnLwkUkOQIDAQABo0IwQDAPBgNVHRMBAf8E +BTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUrWyqlGCc7eT/+j4KdCtjA/e2Wb8wDQYJ +KoZIhvcNAQELBQADggEBABpA2JVlrAmSicY59BDlqQ5mU1143vokkbvnRFHfxhY0Cu9qRFHqKweK +A3rD6z8KLFIWoCtDuSWQP3CpMyVtRRooOyfPqsMpQhvfO0zAMzRbQYi/aytlryjvsvXDqmbOe1bu +t8jLZ8HJnBoYuMTDSQPxYA5QzUbF83d597YV4Djbxy8ooAw/dyZ02SUS2jHaGh7cKUGRIjxpp7sC +8rZcJwOJ9Abqm+RyguOhCcHpABnTPtRwa7pxpqpYrvS76Wy274fMm7v/OeZWYdMKp8RcTGB7BXcm +er/YB1IsYvdwY9k5vG8cwnncdimvzsUsZAReiDZuMdRAGmI0Nj81Aa6sY6A= +-----END CERTIFICATE----- + +GeoTrust Primary Certification Authority - G2 +============================================= +-----BEGIN CERTIFICATE----- +MIICrjCCAjWgAwIBAgIQPLL0SAoA4v7rJDteYD7DazAKBggqhkjOPQQDAzCBmDELMAkGA1UEBhMC +VVMxFjAUBgNVBAoTDUdlb1RydXN0IEluYy4xOTA3BgNVBAsTMChjKSAyMDA3IEdlb1RydXN0IElu +Yy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTE2MDQGA1UEAxMtR2VvVHJ1c3QgUHJpbWFyeSBD +ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMB4XDTA3MTEwNTAwMDAwMFoXDTM4MDExODIzNTk1 +OVowgZgxCzAJBgNVBAYTAlVTMRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMTkwNwYDVQQLEzAoYykg +MjAwNyBHZW9UcnVzdCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNlIG9ubHkxNjA0BgNVBAMTLUdl +b1RydXN0IFByaW1hcnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjB2MBAGByqGSM49AgEG +BSuBBAAiA2IABBWx6P0DFUPlrOuHNxFi79KDNlJ9RVcLSo17VDs6bl8VAsBQps8lL33KSLjHUGMc +KiEIfJo22Av+0SbFWDEwKCXzXV2juLaltJLtbCyf691DiaI8S0iRHVDsJt/WYC69IaNCMEAwDwYD +VR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFBVfNVdRVfslsq0DafwBo/q+ +EVXVMAoGCCqGSM49BAMDA2cAMGQCMGSWWaboCd6LuvpaiIjwH5HTRqjySkwCY/tsXzjbLkGTqQ7m +ndwxHLKgpxgceeHHNgIwOlavmnRs9vuD4DPTCF+hnMJbn0bWtsuRBmOiBuczrD6ogRLQy7rQkgu2 +npaqBA+K +-----END CERTIFICATE----- + +VeriSign Universal Root Certification Authority +=============================================== +-----BEGIN CERTIFICATE----- +MIIEuTCCA6GgAwIBAgIQQBrEZCGzEyEDDrvkEhrFHTANBgkqhkiG9w0BAQsFADCBvTELMAkGA1UE +BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBO +ZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwOCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVk +IHVzZSBvbmx5MTgwNgYDVQQDEy9WZXJpU2lnbiBVbml2ZXJzYWwgUm9vdCBDZXJ0aWZpY2F0aW9u +IEF1dGhvcml0eTAeFw0wODA0MDIwMDAwMDBaFw0zNzEyMDEyMzU5NTlaMIG9MQswCQYDVQQGEwJV +UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv +cmsxOjA4BgNVBAsTMShjKSAyMDA4IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl +IG9ubHkxODA2BgNVBAMTL1ZlcmlTaWduIFVuaXZlcnNhbCBSb290IENlcnRpZmljYXRpb24gQXV0 +aG9yaXR5MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx2E3XrEBNNti1xWb/1hajCMj +1mCOkdeQmIN65lgZOIzF9uVkhbSicfvtvbnazU0AtMgtc6XHaXGVHzk8skQHnOgO+k1KxCHfKWGP +MiJhgsWHH26MfF8WIFFE0XBPV+rjHOPMee5Y2A7Cs0WTwCznmhcrewA3ekEzeOEz4vMQGn+HLL72 +9fdC4uW/h2KJXwBL38Xd5HVEMkE6HnFuacsLdUYI0crSK5XQz/u5QGtkjFdN/BMReYTtXlT2NJ8I +AfMQJQYXStrxHXpma5hgZqTZ79IugvHw7wnqRMkVauIDbjPTrJ9VAMf2CGqUuV/c4DPxhGD5WycR +tPwW8rtWaoAljQIDAQABo4GyMIGvMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMG0G +CCsGAQUFBwEMBGEwX6FdoFswWTBXMFUWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFI/l0xqGrI2O +a8PPgGrUSBgsexkuMCUWI2h0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92c2xvZ28uZ2lmMB0GA1Ud +DgQWBBS2d/ppSEefUxLVwuoHMnYH0ZcHGTANBgkqhkiG9w0BAQsFAAOCAQEASvj4sAPmLGd75JR3 +Y8xuTPl9Dg3cyLk1uXBPY/ok+myDjEedO2Pzmvl2MpWRsXe8rJq+seQxIcaBlVZaDrHC1LGmWazx +Y8u4TB1ZkErvkBYoH1quEPuBUDgMbMzxPcP1Y+Oz4yHJJDnp/RVmRvQbEdBNc6N9Rvk97ahfYtTx +P/jgdFcrGJ2BtMQo2pSXpXDrrB2+BxHw1dvd5Yzw1TKwg+ZX4o+/vqGqvz0dtdQ46tewXDpPaj+P +wGZsY6rp2aQW9IHRlRQOfc2VNNnSj3BzgXucfr2YYdhFh5iQxeuGMMY1v/D/w1WIg0vvBZIGcfK4 +mJO37M2CYfE45k+XmCpajQ== +-----END CERTIFICATE----- + +VeriSign Class 3 Public Primary Certification Authority - G4 +============================================================ +-----BEGIN CERTIFICATE----- +MIIDhDCCAwqgAwIBAgIQL4D+I4wOIg9IZxIokYesszAKBggqhkjOPQQDAzCByjELMAkGA1UEBhMC +VVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3 +b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVz +ZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmlj +YXRpb24gQXV0aG9yaXR5IC0gRzQwHhcNMDcxMTA1MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCByjEL +MAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQLExZWZXJpU2lnbiBU +cnVzdCBOZXR3b3JrMTowOAYDVQQLEzEoYykgMjAwNyBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRo +b3JpemVkIHVzZSBvbmx5MUUwQwYDVQQDEzxWZXJpU2lnbiBDbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzQwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAASnVnp8 +Utpkmw4tXNherJI9/gHmGUo9FANL+mAnINmDiWn6VMaaGF5VKmTeBvaNSjutEDxlPZCIBIngMGGz +rl0Bp3vefLK+ymVhAIau2o970ImtTR1ZmkGxvEeA3J5iw/mjgbIwga8wDwYDVR0TAQH/BAUwAwEB +/zAOBgNVHQ8BAf8EBAMCAQYwbQYIKwYBBQUHAQwEYTBfoV2gWzBZMFcwVRYJaW1hZ2UvZ2lmMCEw +HzAHBgUrDgMCGgQUj+XTGoasjY5rw8+AatRIGCx7GS4wJRYjaHR0cDovL2xvZ28udmVyaXNpZ24u +Y29tL3ZzbG9nby5naWYwHQYDVR0OBBYEFLMWkf3upm7ktS5Jj4d4gYDs5bG1MAoGCCqGSM49BAMD +A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx +AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== +-----END CERTIFICATE----- + +NetLock Arany (Class Gold) FÅ‘tanúsítvány +============================================ +-----BEGIN CERTIFICATE----- +MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G +A1UEBwwIQnVkYXBlc3QxFTATBgNVBAoMDE5ldExvY2sgS2Z0LjE3MDUGA1UECwwuVGFuw7pzw610 +dsOhbnlraWFkw7NrIChDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzKTE1MDMGA1UEAwwsTmV0TG9jayBB +cmFueSAoQ2xhc3MgR29sZCkgRsWRdGFuw7pzw610dsOhbnkwHhcNMDgxMjExMTUwODIxWhcNMjgx +MjA2MTUwODIxWjCBpzELMAkGA1UEBhMCSFUxETAPBgNVBAcMCEJ1ZGFwZXN0MRUwEwYDVQQKDAxO +ZXRMb2NrIEtmdC4xNzA1BgNVBAsMLlRhbsO6c8OtdHbDoW55a2lhZMOzayAoQ2VydGlmaWNhdGlv +biBTZXJ2aWNlcykxNTAzBgNVBAMMLE5ldExvY2sgQXJhbnkgKENsYXNzIEdvbGQpIEbFkXRhbsO6 +c8OtdHbDoW55MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxCRec75LbRTDofTjl5Bu +0jBFHjzuZ9lk4BqKf8owyoPjIMHj9DrTlF8afFttvzBPhCf2nx9JvMaZCpDyD/V/Q4Q3Y1GLeqVw +/HpYzY6b7cNGbIRwXdrzAZAj/E4wqX7hJ2Pn7WQ8oLjJM2P+FpD/sLj916jAwJRDC7bVWaaeVtAk +H3B5r9s5VA1lddkVQZQBr17s9o3x/61k/iCa11zr/qYfCGSji3ZVrR47KGAuhyXoqq8fxmRGILdw +fzzeSNuWU7c5d+Qa4scWhHaXWy+7GRWF+GmF9ZmnqfI0p6m2pgP8b4Y9VHx2BJtr+UBdADTHLpl1 +neWIA6pN+APSQnbAGwIDAKiLo0UwQzASBgNVHRMBAf8ECDAGAQH/AgEEMA4GA1UdDwEB/wQEAwIB +BjAdBgNVHQ4EFgQUzPpnk/C2uNClwB7zU/2MU9+D15YwDQYJKoZIhvcNAQELBQADggEBAKt/7hwW +qZw8UQCgwBEIBaeZ5m8BiFRhbvG5GK1Krf6BQCOUL/t1fC8oS2IkgYIL9WHxHG64YTjrgfpioTta +YtOUZcTh5m2C+C8lcLIhJsFyUR+MLMOEkMNaj7rP9KdlpeuY0fsFskZ1FSNqb4VjMIDw1Z4fKRzC +bLBQWV2QWzuoDTDPv31/zvGdg73JRm4gpvlhUbohL3u+pRVjodSVh/GeufOJ8z2FuLjbvrW5Kfna +NwUASZQDhETnv0Mxz3WLJdH0pmT1kvarBes96aULNmLazAZfNou2XjG4Kvte9nHfRCaexOYNkbQu +dZWAUWpLMKawYqGT8ZvYzsRjdT9ZR7E= +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G2 +================================== +-----BEGIN CERTIFICATE----- +MIIFyjCCA7KgAwIBAgIEAJiWjDANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEcyMB4XDTA4MDMyNjExMTgxN1oXDTIwMDMyNTExMDMxMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMVZ +5291qj5LnLW4rJ4L5PnZyqtdj7U5EILXr1HgO+EASGrP2uEGQxGZqhQlEq0i6ABtQ8SpuOUfiUtn +vWFI7/3S4GCI5bkYYCjDdyutsDeqN95kWSpGV+RLufg3fNU254DBtvPUZ5uW6M7XxgpT0GtJlvOj +CwV3SPcl5XCsMBQgJeN/dVrlSPhOewMHBPqCYYdu8DvEpMfQ9XQ+pV0aCPKbJdL2rAQmPlU6Yiil +e7Iwr/g3wtG61jj99O9JMDeZJiFIhQGp5Rbn3JBV3w/oOM2ZNyFPXfUib2rFEhZgF1XyZWampzCR +OME4HYYEhLoaJXhena/MUGDWE4dS7WMfbWV9whUYdMrhfmQpjHLYFhN9C0lK8SgbIHRrxT3dsKpI +CT0ugpTNGmXZK4iambwYfp/ufWZ8Pr2UuIHOzZgweMFvZ9C+X+Bo7d7iscksWXiSqt8rYGPy5V65 +48r6f1CGPqI0GAwJaCgRHOThuVw+R7oyPxjMW4T182t0xHJ04eOLoEq9jWYv6q012iDTiIJh8BIi +trzQ1aTsr1SIJSQ8p22xcik/Plemf1WvbibG/ufMQFxRRIEKeN5KzlW/HdXZt1bv8Hb/C3m1r737 +qWmRRpdogBQ2HbN/uymYNqUg+oJgYjOk7Na6B6duxc8UpufWkjTYgfX8HV2qXB72o007uPc5AgMB +AAGjgZcwgZQwDwYDVR0TAQH/BAUwAwEB/zBSBgNVHSAESzBJMEcGBFUdIAAwPzA9BggrBgEFBQcC +ARYxaHR0cDovL3d3dy5wa2lvdmVyaGVpZC5ubC9wb2xpY2llcy9yb290LXBvbGljeS1HMjAOBgNV +HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJFoMocVHYnitfGsNig0jQt8YojrMA0GCSqGSIb3DQEBCwUA +A4ICAQCoQUpnKpKBglBu4dfYszk78wIVCVBR7y29JHuIhjv5tLySCZa59sCrI2AGeYwRTlHSeYAz ++51IvuxBQ4EffkdAHOV6CMqqi3WtFMTC6GY8ggen5ieCWxjmD27ZUD6KQhgpxrRW/FYQoAUXvQwj +f/ST7ZwaUb7dRUG/kSS0H4zpX897IZmflZ85OkYcbPnNe5yQzSipx6lVu6xiNGI1E0sUOlWDuYaN +kqbG9AclVMwWVxJKgnjIFNkXgiYtXSAfea7+1HAWFpWD2DU5/1JddRwWxRNVz0fMdWVSSt7wsKfk +CpYL+63C4iWEst3kvX5ZbJvw8NjnyvLplzh+ib7M+zkXYT9y2zqR2GUBGR2tUKRXCnxLvJxxcypF +URmFzI79R6d0lR2o0a9OF7FpJsKqeFdbxU2n5Z4FF5TKsl+gSRiNNOkmbEgeqmiSBeGCc1qb3Adb +CG19ndeNIdn8FCCqwkXfP+cAslHkwvgFuXkajDTznlvkN1trSt8sV4pAWja63XVECDdCcAz+3F4h +oKOKwJCcaNpQ5kUQR3i2TtJlycM33+FCY7BXN0Ute4qcvwXqZVUz9zkQxSgqIXobisQk+T8VyJoV +IPVVYpbtbZNQvOSqeK3Zywplh6ZmwcSBo3c6WB4L7oOLnR7SUqTMHW+wmG2UMbX4cQrcufx9MmDm +66+KAQ== +-----END CERTIFICATE----- + +CA Disig +======== +-----BEGIN CERTIFICATE----- +MIIEDzCCAvegAwIBAgIBATANBgkqhkiG9w0BAQUFADBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMK +QnJhdGlzbGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwHhcNMDYw +MzIyMDEzOTM0WhcNMTYwMzIyMDEzOTM0WjBKMQswCQYDVQQGEwJTSzETMBEGA1UEBxMKQnJhdGlz +bGF2YTETMBEGA1UEChMKRGlzaWcgYS5zLjERMA8GA1UEAxMIQ0EgRGlzaWcwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCS9jHBfYj9mQGp2HvycXXxMcbzdWb6UShGhJd4NLxs/LxFWYgm +GErENx+hSkS943EE9UQX4j/8SFhvXJ56CbpRNyIjZkMhsDxkovhqFQ4/61HhVKndBpnXmjxUizkD +Pw/Fzsbrg3ICqB9x8y34dQjbYkzo+s7552oftms1grrijxaSfQUMbEYDXcDtab86wYqg6I7ZuUUo +hwjstMoVvoLdtUSLLa2GDGhibYVW8qwUYzrG0ZmsNHhWS8+2rT+MitcE5eN4TPWGqvWP+j1scaMt +ymfraHtuM6kMgiioTGohQBUgDCZbg8KpFhXAJIJdKxatymP2dACw30PEEGBWZ2NFAgMBAAGjgf8w +gfwwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUjbJJaJ1yCCW5wCf1UJNWSEZx+Y8wDgYDVR0P +AQH/BAQDAgEGMDYGA1UdEQQvMC2BE2Nhb3BlcmF0b3JAZGlzaWcuc2uGFmh0dHA6Ly93d3cuZGlz +aWcuc2svY2EwZgYDVR0fBF8wXTAtoCugKYYnaHR0cDovL3d3dy5kaXNpZy5zay9jYS9jcmwvY2Ff +ZGlzaWcuY3JsMCygKqAohiZodHRwOi8vY2EuZGlzaWcuc2svY2EvY3JsL2NhX2Rpc2lnLmNybDAa +BgNVHSAEEzARMA8GDSuBHpGT5goAAAABAQEwDQYJKoZIhvcNAQEFBQADggEBAF00dGFMrzvY/59t +WDYcPQuBDRIrRhCA/ec8J9B6yKm2fnQwM6M6int0wHl5QpNt/7EpFIKrIYwvF/k/Ji/1WcbvgAa3 +mkkp7M5+cTxqEEHA9tOasnxakZzArFvITV734VP/Q3f8nktnbNfzg9Gg4H8l37iYC5oyOGwwoPP/ +CBUz91BKez6jPiCp3C9WgArtQVCwyfTssuMmRAAOb54GvCKWU3BlxFAKRmukLyeBEicTXxChds6K +ezfqwzlhA5WYOudsiCUI/HloDYd9Yvi0X/vF2Ey9WLw/Q1vUHgFNPGO+I++MzVpQuGhU+QqZMxEA +4Z7CRneC9VkGjCFMhwnN5ag= +-----END CERTIFICATE----- + +Juur-SK +======= +-----BEGIN CERTIFICATE----- +MIIE5jCCA86gAwIBAgIEO45L/DANBgkqhkiG9w0BAQUFADBdMRgwFgYJKoZIhvcNAQkBFglwa2lA +c2suZWUxCzAJBgNVBAYTAkVFMSIwIAYDVQQKExlBUyBTZXJ0aWZpdHNlZXJpbWlza2Vza3VzMRAw +DgYDVQQDEwdKdXVyLVNLMB4XDTAxMDgzMDE0MjMwMVoXDTE2MDgyNjE0MjMwMVowXTEYMBYGCSqG +SIb3DQEJARYJcGtpQHNrLmVlMQswCQYDVQQGEwJFRTEiMCAGA1UEChMZQVMgU2VydGlmaXRzZWVy +aW1pc2tlc2t1czEQMA4GA1UEAxMHSnV1ci1TSzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC +ggEBAIFxNj4zB9bjMI0TfncyRsvPGbJgMUaXhvSYRqTCZUXP00B841oiqBB4M8yIsdOBSvZiF3tf +TQou0M+LI+5PAk676w7KvRhj6IAcjeEcjT3g/1tf6mTll+g/mX8MCgkzABpTpyHhOEvWgxutr2TC ++Rx6jGZITWYfGAriPrsfB2WThbkasLnE+w0R9vXW+RvHLCu3GFH+4Hv2qEivbDtPL+/40UceJlfw +UR0zlv/vWT3aTdEVNMfqPxZIe5EcgEMPPbgFPtGzlc3Yyg/CQ2fbt5PgIoIuvvVoKIO5wTtpeyDa +Tpxt4brNj3pssAki14sL2xzVWiZbDcDq5WDQn/413z8CAwEAAaOCAawwggGoMA8GA1UdEwEB/wQF +MAMBAf8wggEWBgNVHSAEggENMIIBCTCCAQUGCisGAQQBzh8BAQEwgfYwgdAGCCsGAQUFBwICMIHD +HoHAAFMAZQBlACAAcwBlAHIAdABpAGYAaQBrAGEAYQB0ACAAbwBuACAAdgDkAGwAagBhAHMAdABh +AHQAdQBkACAAQQBTAC0AaQBzACAAUwBlAHIAdABpAGYAaQB0AHMAZQBlAHIAaQBtAGkAcwBrAGUA +cwBrAHUAcwAgAGEAbABhAG0ALQBTAEsAIABzAGUAcgB0AGkAZgBpAGsAYQBhAHQAaQBkAGUAIABr +AGkAbgBuAGkAdABhAG0AaQBzAGUAawBzMCEGCCsGAQUFBwIBFhVodHRwOi8vd3d3LnNrLmVlL2Nw +cy8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3d3dy5zay5lZS9qdXVyL2NybC8wHQYDVR0OBBYE +FASqekej5ImvGs8KQKcYP2/v6X2+MB8GA1UdIwQYMBaAFASqekej5ImvGs8KQKcYP2/v6X2+MA4G +A1UdDwEB/wQEAwIB5jANBgkqhkiG9w0BAQUFAAOCAQEAe8EYlFOiCfP+JmeaUOTDBS8rNXiRTHyo +ERF5TElZrMj3hWVcRrs7EKACr81Ptcw2Kuxd/u+gkcm2k298gFTsxwhwDY77guwqYHhpNjbRxZyL +abVAyJRld/JXIWY7zoVAtjNjGr95HvxcHdMdkxuLDF2FvZkwMhgJkVLpfKG6/2SSmuz+Ne6ML678 +IIbsSt4beDI3poHSna9aEhbKmVv8b20OxaAehsmR0FyYgl9jDIpaq9iVpszLita/ZEuOyoqysOkh +Mp6qqIWYNIE5ITuoOlIyPfZrN4YGWhWY3PARZv40ILcD9EEQfTmEeZZyY7aWAuVrua0ZTbvGRNs2 +yyqcjg== +-----END CERTIFICATE----- + +Hongkong Post Root CA 1 +======================= +-----BEGIN CERTIFICATE----- +MIIDMDCCAhigAwIBAgICA+gwDQYJKoZIhvcNAQEFBQAwRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoT +DUhvbmdrb25nIFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMB4XDTAzMDUx +NTA1MTMxNFoXDTIzMDUxNTA0NTIyOVowRzELMAkGA1UEBhMCSEsxFjAUBgNVBAoTDUhvbmdrb25n +IFBvc3QxIDAeBgNVBAMTF0hvbmdrb25nIFBvc3QgUm9vdCBDQSAxMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEArP84tulmAknjorThkPlAj3n54r15/gK97iSSHSL22oVyaf7XPwnU3ZG1 +ApzQjVrhVcNQhrkpJsLj2aDxaQMoIIBFIi1WpztUlVYiWR8o3x8gPW2iNr4joLFutbEnPzlTCeqr +auh0ssJlXI6/fMN4hM2eFvz1Lk8gKgifd/PFHsSaUmYeSF7jEAaPIpjhZY4bXSNmO7ilMlHIhqqh +qZ5/dpTCpmy3QfDVyAY45tQM4vM7TG1QjMSDJ8EThFk9nnV0ttgCXjqQesBCNnLsak3c78QA3xMY +V18meMjWCnl3v/evt3a5pQuEF10Q6m/hq5URX208o1xNg1vysxmKgIsLhwIDAQABoyYwJDASBgNV +HRMBAf8ECDAGAQH/AgEDMA4GA1UdDwEB/wQEAwIBxjANBgkqhkiG9w0BAQUFAAOCAQEADkbVPK7i +h9legYsCmEEIjEy82tvuJxuC52pF7BaLT4Wg87JwvVqWuspube5Gi27nKi6Wsxkz67SfqLI37pio +l7Yutmcn1KZJ/RyTZXaeQi/cImyaT/JaFTmxcdcrUehtHJjA2Sr0oYJ71clBoiMBdDhViw+5Lmei +IAQ32pwL0xch4I+XeTRvhEgCIDMb5jREn5Fw9IBehEPCKdJsEhTkYY2sEJCehFC78JZvRZ+K88ps +T/oROhUVRsPNH4NbLUES7VBnQRM9IauUiqpOfMGx+6fWtScvl6tu4B3i0RwsH0Ti/L6RoZz71ilT +c4afU9hDDl3WY4JxHYB0yvbiAmvZWg== +-----END CERTIFICATE----- + +SecureSign RootCA11 +=================== +-----BEGIN CERTIFICATE----- +MIIDbTCCAlWgAwIBAgIBATANBgkqhkiG9w0BAQUFADBYMQswCQYDVQQGEwJKUDErMCkGA1UEChMi +SmFwYW4gQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcywgSW5jLjEcMBoGA1UEAxMTU2VjdXJlU2lnbiBS +b290Q0ExMTAeFw0wOTA0MDgwNDU2NDdaFw0yOTA0MDgwNDU2NDdaMFgxCzAJBgNVBAYTAkpQMSsw +KQYDVQQKEyJKYXBhbiBDZXJ0aWZpY2F0aW9uIFNlcnZpY2VzLCBJbmMuMRwwGgYDVQQDExNTZWN1 +cmVTaWduIFJvb3RDQTExMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA/XeqpRyQBTvL +TJszi1oURaTnkBbR31fSIRCkF/3frNYfp+TbfPfs37gD2pRY/V1yfIw/XwFndBWW4wI8h9uuywGO +wvNmxoVF9ALGOrVisq/6nL+k5tSAMJjzDbaTj6nU2DbysPyKyiyhFTOVMdrAG/LuYpmGYz+/3ZMq +g6h2uRMft85OQoWPIucuGvKVCbIFtUROd6EgvanyTgp9UK31BQ1FT0Zx/Sg+U/sE2C3XZR1KG/rP +O7AxmjVuyIsG0wCR8pQIZUyxNAYAeoni8McDWc/V1uinMrPmmECGxc0nEovMe863ETxiYAcjPitA +bpSACW22s293bzUIUPsCh8U+iQIDAQABo0IwQDAdBgNVHQ4EFgQUW/hNT7KlhtQ60vFjmqC+CfZX +t94wDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAKCh +OBZmLqdWHyGcBvod7bkixTgm2E5P7KN/ed5GIaGHd48HCJqypMWvDzKYC3xmKbabfSVSSUOrTC4r +bnpwrxYO4wJs+0LmGJ1F2FXI6Dvd5+H0LgscNFxsWEr7jIhQX5Ucv+2rIrVls4W6ng+4reV6G4pQ +Oh29Dbx7VFALuUKvVaAYga1lme++5Jy/xIWrQbJUb9wlze144o4MjQlJ3WN7WmmWAiGovVJZ6X01 +y8hSyn+B/tlr0/cR7SXf+Of5pPpyl4RTDaXQMhhRdlkUbA/r7F+AjHVDg8OFmP9Mni0N5HeDk061 +lgeLKBObjBmNQSdJQO7e5iNEOdyhIta6A/I= +-----END CERTIFICATE----- + +ACEDICOM Root +============= +-----BEGIN CERTIFICATE----- +MIIFtTCCA52gAwIBAgIIYY3HhjsBggUwDQYJKoZIhvcNAQEFBQAwRDEWMBQGA1UEAwwNQUNFRElD +T00gUm9vdDEMMAoGA1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMB4XDTA4 +MDQxODE2MjQyMloXDTI4MDQxMzE2MjQyMlowRDEWMBQGA1UEAwwNQUNFRElDT00gUm9vdDEMMAoG +A1UECwwDUEtJMQ8wDQYDVQQKDAZFRElDT00xCzAJBgNVBAYTAkVTMIICIjANBgkqhkiG9w0BAQEF +AAOCAg8AMIICCgKCAgEA/5KV4WgGdrQsyFhIyv2AVClVYyT/kGWbEHV7w2rbYgIB8hiGtXxaOLHk +WLn709gtn70yN78sFW2+tfQh0hOR2QetAQXW8713zl9CgQr5auODAKgrLlUTY4HKRxx7XBZXehuD +YAQ6PmXDzQHe3qTWDLqO3tkE7hdWIpuPY/1NFgu3e3eM+SW10W2ZEi5PGrjm6gSSrj0RuVFCPYew +MYWveVqc/udOXpJPQ/yrOq2lEiZmueIM15jO1FillUAKt0SdE3QrwqXrIhWYENiLxQSfHY9g5QYb +m8+5eaA9oiM/Qj9r+hwDezCNzmzAv+YbX79nuIQZ1RXve8uQNjFiybwCq0Zfm/4aaJQ0PZCOrfbk +HQl/Sog4P75n/TSW9R28MHTLOO7VbKvU/PQAtwBbhTIWdjPp2KOZnQUAqhbm84F9b32qhm2tFXTT +xKJxqvQUfecyuB+81fFOvW8XAjnXDpVCOscAPukmYxHqC9FK/xidstd7LzrZlvvoHpKuE1XI2Sf2 +3EgbsCTBheN3nZqk8wwRHQ3ItBTutYJXCb8gWH8vIiPYcMt5bMlL8qkqyPyHK9caUPgn6C9D4zq9 +2Fdx/c6mUlv53U3t5fZvie27k5x2IXXwkkwp9y+cAS7+UEaeZAwUswdbxcJzbPEHXEUkFDWug/Fq +TYl6+rPYLWbwNof1K1MCAwEAAaOBqjCBpzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKaz +4SsrSbbXc6GqlPUB53NlTKxQMA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUprPhKytJttdzoaqU +9QHnc2VMrFAwRAYDVR0gBD0wOzA5BgRVHSAAMDEwLwYIKwYBBQUHAgEWI2h0dHA6Ly9hY2VkaWNv +bS5lZGljb21ncm91cC5jb20vZG9jMA0GCSqGSIb3DQEBBQUAA4ICAQDOLAtSUWImfQwng4/F9tqg +aHtPkl7qpHMyEVNEskTLnewPeUKzEKbHDZ3Ltvo/Onzqv4hTGzz3gvoFNTPhNahXwOf9jU8/kzJP +eGYDdwdY6ZXIfj7QeQCM8htRM5u8lOk6e25SLTKeI6RF+7YuE7CLGLHdztUdp0J/Vb77W7tH1Pwk +zQSulgUV1qzOMPPKC8W64iLgpq0i5ALudBF/TP94HTXa5gI06xgSYXcGCRZj6hitoocf8seACQl1 +ThCojz2GuHURwCRiipZ7SkXp7FnFvmuD5uHorLUwHv4FB4D54SMNUI8FmP8sX+g7tq3PgbUhh8oI +KiMnMCArz+2UW6yyetLHKKGKC5tNSixthT8Jcjxn4tncB7rrZXtaAWPWkFtPF2Y9fwsZo5NjEFIq +nxQWWOLcpfShFosOkYuByptZ+thrkQdlVV9SH686+5DdaaVbnG0OLLb6zqylfDJKZ0DcMDQj3dcE +I2bw/FWAp/tmGYI1Z2JwOV5vx+qQQEQIHriy1tvuWacNGHk0vFQYXlPKNFHtRQrmjseCNj6nOGOp +MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o +tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== +-----END CERTIFICATE----- + +Verisign Class 1 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCED9pHoGc8JpK83P/uUii5N0wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAx +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDlGb9to1ZhLZlIcfZn3rmN67eehoAKkQ76OCWvRoiC5XOooJskXQ0fzGVuDLDQ +VoQYh5oGmxChc9+0WDlrbsH2FdWoqD+qEgaNMax/sDTXjzRniAnNFBHiTkVWaR94AoDa3EeRKbs2 +yWNcxeDXLYd7obcysHswuiovMaruo2fa2wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFgVKTk8d6Pa +XCUDfGD67gmZPCcQcMgMCeazh88K4hiWNWLMv5sneYlfycQJ9M61Hd8qveXbhpxoJeUwfLaJFf5n +0a3hUKw8fGJLj7qE1xIVGx/KXQ/BUpQqEZnae88MNhPVNdwQGVnqlMEAv3WP2fr9dgTbYruQagPZ +RjXZ+Hxb +-----END CERTIFICATE----- + +Verisign Class 3 Public Primary Certification Authority +======================================================= +-----BEGIN CERTIFICATE----- +MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx +FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 +IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow +XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz +IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA +A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 +f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol +hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky +CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX +bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/ +D/xwzoiQ +-----END CERTIFICATE----- + +Microsec e-Szigno Root CA 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIECjCCAvKgAwIBAgIJAMJ+QwRORz8ZMA0GCSqGSIb3DQEBCwUAMIGCMQswCQYDVQQGEwJIVTER +MA8GA1UEBwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jv +c2VjIGUtU3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5o +dTAeFw0wOTA2MTYxMTMwMThaFw0yOTEyMzAxMTMwMThaMIGCMQswCQYDVQQGEwJIVTERMA8GA1UE +BwwIQnVkYXBlc3QxFjAUBgNVBAoMDU1pY3Jvc2VjIEx0ZC4xJzAlBgNVBAMMHk1pY3Jvc2VjIGUt +U3ppZ25vIFJvb3QgQ0EgMjAwOTEfMB0GCSqGSIb3DQEJARYQaW5mb0BlLXN6aWduby5odTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOn4j/NjrdqG2KfgQvvPkd6mJviZpWNwrZuuyjNA +fW2WbqEORO7hE52UQlKavXWFdCyoDh2Tthi3jCyoz/tccbna7P7ofo/kLx2yqHWH2Leh5TvPmUpG +0IMZfcChEhyVbUr02MelTTMuhTlAdX4UfIASmFDHQWe4oIBhVKZsTh/gnQ4H6cm6M+f+wFUoLAKA +pxn1ntxVUwOXewdI/5n7N4okxFnMUBBjjqqpGrCEGob5X7uxUG6k0QrM1XF+H6cbfPVTbiJfyyvm +1HxdrtbCxkzlBQHZ7Vf8wSN5/PrIJIOV87VqUQHQd9bpEqH5GoP7ghu5sJf0dgYzQ0mg/wu1+rUC +AwEAAaOBgDB+MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTLD8bf +QkPMPcu1SCOhGnqmKrs0aDAfBgNVHSMEGDAWgBTLD8bfQkPMPcu1SCOhGnqmKrs0aDAbBgNVHREE +FDASgRBpbmZvQGUtc3ppZ25vLmh1MA0GCSqGSIb3DQEBCwUAA4IBAQDJ0Q5eLtXMs3w+y/w9/w0o +lZMEyL/azXm4Q5DwpL7v8u8hmLzU1F0G9u5C7DBsoKqpyvGvivo/C3NqPuouQH4frlRheesuCDfX +I/OMn74dseGkddug4lQUsbocKaQY9hK6ohQU4zE1yED/t+AFdlfBHFny+L/k7SViXITwfn4fs775 +tyERzAMBVnCnEJIeGzSBHq2cGsMEPO0CYdYeBvNfOofyK/FFh+U9rNHHV4S9a67c2Pm2G2JwCz02 +yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi +LXpUq3DDfSJlgnCW +-----END CERTIFICATE----- + +E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi +=================================================== +-----BEGIN CERTIFICATE----- +MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG +EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz +ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3 +MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0 +cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u +aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdUMZTe1RK6UxYC6lhj71vY +8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlTL/jDj/6z/P2douNffb7tC+Bg62nsM+3Y +jfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAI +JjjcJRFHLfO6IxClv7wC90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk +9Ok0oSy1c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/BAQD +AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoEVtstxNulMA0GCSqG +SIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLPqk/CaOv/gKlR6D1id4k9CnU58W5d +F4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwq +D2fK/A+JYZ1lpTzlvBNbCNvj/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4 +Vwpm+Vganf2XKWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq +fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX +-----END CERTIFICATE----- + +GlobalSign Root CA - R3 +======================= +-----BEGIN CERTIFICATE----- +MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4GA1UECxMXR2xv +YmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh +bFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT +aWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln +bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWt +iHL8RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsTgHeMCOFJ +0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmmKPZpO/bLyCiR5Z2KYVc3 +rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zdQQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjl +OCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZXriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2 +xmmFghcCAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FI/wS3+oLkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZURUm7 +lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMpjjM5RcOO5LlXbKr8 +EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK6fBdRoyV3XpYKBovHd7NADdBj+1E +bddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQXmcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18 +YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r +kpeDMdmztcpHWD9f +-----END CERTIFICATE----- + +TC TrustCenter Universal CA III +=============================== +-----BEGIN CERTIFICATE----- +MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC +REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy +IFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAe +Fw0wOTA5MDkwODE1MjdaFw0yOTEyMzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNU +QyBUcnVzdENlbnRlciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0Ex +KDAmBgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqGSIb3DQEB +AQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF5+cvAqBNLaT6hdqbJYUt +QCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYvDIRlzg9uwliT6CwLOunBjvvya8o84pxO +juT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8vzArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+Eut +CHnNaYlAJ/Uqwa1D7KRTyGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1 +M4BDj5yjdipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBhMB8G +A1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ +BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI4jANBgkqhkiG9w0BAQUFAAOCAQEA +g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+ +KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK +BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV +CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq +woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg== +-----END CERTIFICATE----- + +Autoridad de Certificacion Firmaprofesional CIF A62634068 +========================================================= +-----BEGIN CERTIFICATE----- +MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMxQjBA +BgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2 +MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNVBAYTAkVTMUIw +QAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zlc2lvbmFsIENJRiBB +NjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDKlmuO6vj78aI14H9M2uDD +Utd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOSL/UR5GLXMnE42QQMcas9UX4P +B99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9qFD0sefGL9ItWY16Ck6WaVICqjaY +7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15iNA9wBj4gGFrO93IbJWyTdBSTo3OxDqqH +ECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyI +plD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctX +MbScyJCyZ/QYFpM6/EfY0XiWMR+6KwxfXZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsX +LZmdEyRG98Xi2J+Of8ePdG1asuhy9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLK +bpf7Q8UIJm+K9Lv9nyiqDdVF8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgU +vzlN1J5Bto+WHWOWk9mVBngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1Ud +EwEB/wQIMAYBAf8CAQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNH +DhpkLzCBpgYDVR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZp +cm1hcHJvZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAA +bABhACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx +ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+xDLx +51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5xhOW1//qk +R71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5eTSSPi5E6PaP +T481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5FlClrD2VQS3a/DTg4f +Jl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5kSeTy36LssUzAKh3ntLFl +osS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2gHN99ZwExEWN57kci57q13XR +crHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYDNEeyrPsiBsse3RdHHF9mudMaotoR +saS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhrJKyXWERHrVkY8SFlcN7ONGCoQPHzPKTD +KCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIySxZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi +6Et8Vcad+qMUu2WFbm5PEn4KPJ2V +-----END CERTIFICATE----- + +Izenpe.com +========== +-----BEGIN CERTIFICATE----- +MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYDVQQG +EwJFUzEUMBIGA1UECgwLSVpFTlBFIFMuQS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wHhcNMDcxMjEz +MTMwODI4WhcNMzcxMjEzMDgyNzI1WjA4MQswCQYDVQQGEwJFUzEUMBIGA1UECgwLSVpFTlBFIFMu +QS4xEzARBgNVBAMMCkl6ZW5wZS5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDJ +03rKDx6sp4boFmVqscIbRTJxldn+EFvMr+eleQGPicPK8lVx93e+d5TzcqQsRNiekpsUOqHnJJAK +ClaOxdgmlOHZSOEtPtoKct2jmRXagaKH9HtuJneJWK3W6wyyQXpzbm3benhB6QiIEn6HLmYRY2xU ++zydcsC8Lv/Ct90NduM61/e0aL6i9eOBbsFGb12N4E3GVFWJGjMxCrFXuaOKmMPsOzTFlUFpfnXC +PCDFYbpRR6AgkJOhkEvzTnyFRVSa0QUmQbC1TR0zvsQDyCV8wXDbO/QJLVQnSKwv4cSsPsjLkkxT +OTcj7NMB+eAJRE1NZMDhDVqHIrytG6P+JrUV86f8hBnp7KGItERphIPzidF0BqnMC9bC3ieFUCbK +F7jJeodWLBoBHmy+E60QrLUk9TiRodZL2vG70t5HtfG8gfZZa88ZU+mNFctKy6lvROUbQc/hhqfK +0GqfvEyNBjNaooXlkDWgYlwWTvDjovoDGrQscbNYLN57C9saD+veIR8GdwYDsMnvmfzAuU8Lhij+ +0rnq49qlw0dpEuDb8PYZi+17cNcC1u2HGCgsBCRMd+RIihrGO5rUD8r6ddIBQFqNeb+Lz0vPqhbB +leStTIo+F5HUsWLlguWABKQDfo2/2n+iD5dPDNMN+9fR5XJ+HMh3/1uaD7euBUbl8agW7EekFwID +AQABo4H2MIHzMIGwBgNVHREEgagwgaWBD2luZm9AaXplbnBlLmNvbaSBkTCBjjFHMEUGA1UECgw+ +SVpFTlBFIFMuQS4gLSBDSUYgQTAxMzM3MjYwLVJNZXJjLlZpdG9yaWEtR2FzdGVpeiBUMTA1NSBG +NjIgUzgxQzBBBgNVBAkMOkF2ZGEgZGVsIE1lZGl0ZXJyYW5lbyBFdG9yYmlkZWEgMTQgLSAwMTAx +MCBWaXRvcmlhLUdhc3RlaXowDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0O +BBYEFB0cZQ6o8iV7tJHP5LGx5r1VdGwFMA0GCSqGSIb3DQEBCwUAA4ICAQB4pgwWSp9MiDrAyw6l +Fn2fuUhfGI8NYjb2zRlrrKvV9pF9rnHzP7MOeIWblaQnIUdCSnxIOvVFfLMMjlF4rJUT3sb9fbga +kEyrkgPH7UIBzg/YsfqikuFgba56awmqxinuaElnMIAkejEWOVt+8Rwu3WwJrfIxwYJOubv5vr8q +hT/AQKM6WfxZSzwoJNu0FXWuDYi6LnPAvViH5ULy617uHjAimcs30cQhbIHsvm0m5hzkQiCeR7Cs +g1lwLDXWrzY0tM07+DKo7+N4ifuNRSzanLh+QBxh5z6ikixL8s36mLYp//Pye6kfLqCTVyvehQP5 +aTfLnnhqBbTFMXiJ7HqnheG5ezzevh55hM6fcA5ZwjUukCox2eRFekGkLhObNA5me0mrZJfQRsN5 +nXJQY6aYWwa9SG3YOYNw6DXwBdGqvOPbyALqfP2C2sJbUjWumDqtujWTI6cfSN01RpiyEGjkpTHC +ClguGYEQyVB1/OpaFs4R1+7vUIgtYf8/QnMFlEPVjjxOAToZpR9GTnfQXeWBIiGH/pR9hNiTrdZo +Q0iy2+tzJOeRf1SktoA+naM8THLCV8Sg1Mw4J87VBp6iSNnpn86CcDaTmjvfliHjWbcM2pE38P1Z +WrOZyGlsQyYBNWNgVYkDOnXYukrZVP/u3oDYLdE41V4tC5h9Pmzb/CaIxw== +-----END CERTIFICATE----- + +Chambers of Commerce Root - 2008 +================================ +-----BEGIN CERTIFICATE----- +MIIHTzCCBTegAwIBAgIJAKPaQn6ksa7aMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xKTAnBgNVBAMTIENoYW1iZXJzIG9mIENvbW1lcmNlIFJvb3QgLSAyMDA4MB4XDTA4MDgwMTEy +Mjk1MFoXDTM4MDczMTEyMjk1MFowga4xCzAJBgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNl +ZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNhbWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQF +EwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENhbWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJl +cnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +AQCvAMtwNyuAWko6bHiUfaN/Gh/2NdW928sNRHI+JrKQUrpjOyhYb6WzbZSm891kDFX29ufyIiKA +XuFixrYp4YFs8r/lfTJqVKAyGVn+H4vXPWCGhSRv4xGzdz4gljUha7MI2XAuZPeEklPWDrCQiorj +h40G072QDuKZoRuGDtqaCrsLYVAGUvGef3bsyw/QHg3PmTA9HMRFEFis1tPo1+XqxQEHd9ZR5gN/ +ikilTWh1uem8nk4ZcfUyS5xtYBkL+8ydddy/Js2Pk3g5eXNeJQ7KXOt3EgfLZEFHcpOrUMPrCXZk +NNI5t3YRCQ12RcSprj1qr7V9ZS+UWBDsXHyvfuK2GNnQm05aSd+pZgvMPMZ4fKecHePOjlO+Bd5g +D2vlGts/4+EhySnB8esHnFIbAURRPHsl18TlUlRdJQfKFiC4reRB7noI/plvg6aRArBsNlVq5331 +lubKgdaX8ZSD6e2wsWsSaR6s+12pxZjptFtYer49okQ6Y1nUCyXeG0+95QGezdIp1Z8XGQpvvwyQ +0wlf2eOKNcx5Wk0ZN5K3xMGtr/R5JJqyAQuxr1yW84Ay+1w9mPGgP0revq+ULtlVmhduYJ1jbLhj +ya6BXBg14JC7vjxPNyK5fuvPnnchpj04gftI2jE9K+OJ9dC1vX7gUMQSibMjmhAxhduub+84Mxh2 +EQIDAQABo4IBbDCCAWgwEgYDVR0TAQH/BAgwBgEB/wIBDDAdBgNVHQ4EFgQU+SSsD7K1+HnA+mCI +G8TZTQKeFxkwgeMGA1UdIwSB2zCB2IAU+SSsD7K1+HnA+mCIG8TZTQKeFxmhgbSkgbEwga4xCzAJ +BgNVBAYTAkVVMUMwQQYDVQQHEzpNYWRyaWQgKHNlZSBjdXJyZW50IGFkZHJlc3MgYXQgd3d3LmNh +bWVyZmlybWEuY29tL2FkZHJlc3MpMRIwEAYDVQQFEwlBODI3NDMyODcxGzAZBgNVBAoTEkFDIENh +bWVyZmlybWEgUy5BLjEpMCcGA1UEAxMgQ2hhbWJlcnMgb2YgQ29tbWVyY2UgUm9vdCAtIDIwMDiC +CQCj2kJ+pLGu2jAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUH +AgEWHGh0dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAJASryI1 +wqM58C7e6bXpeHxIvj99RZJe6dqxGfwWPJ+0W2aeaufDuV2I6A+tzyMP3iU6XsxPpcG1Lawk0lgH +3qLPaYRgM+gQDROpI9CF5Y57pp49chNyM/WqfcZjHwj0/gF/JM8rLFQJ3uIrbZLGOU8W6jx+ekbU +RWpGqOt1glanq6B8aBMz9p0w8G8nOSQjKpD9kCk18pPfNKXG9/jvjA9iSnyu0/VU+I22mlaHFoI6 +M6taIgj3grrqLuBHmrS1RaMFO9ncLkVAO+rcf+g769HsJtg1pDDFOqxXnrN2pSB7+R5KBWIBpih1 +YJeSDW4+TTdDDZIVnBgizVGZoCkaPF+KMjNbMMeJL0eYD6MDxvbxrN8y8NmBGuScvfaAFPDRLLmF +9dijscilIeUcE5fuDr3fKanvNFNb0+RqE4QGtjICxFKuItLcsiFCGtpA8CnJ7AoMXOLQusxI0zcK +zBIKinmwPQN/aUv0NCB9szTqjktk9T79syNnFQ0EuPAtwQlRPLJsFfClI9eDdOTlLsn+mCdCxqvG +nrDQWzilm1DefhiYtUU79nm06PcaewaD+9CL2rvHvRirCG88gGtAPxkZumWK5r7VXNM21+9AUiRg +OGcEMeyP84LG3rlV8zsxkVrctQgVrXYlCg17LofiDKYGvCYQbTed7N14jHyAxfDZd0jQ +-----END CERTIFICATE----- + +Global Chambersign Root - 2008 +============================== +-----BEGIN CERTIFICATE----- +MIIHSTCCBTGgAwIBAgIJAMnN0+nVfSPOMA0GCSqGSIb3DQEBBQUAMIGsMQswCQYDVQQGEwJFVTFD +MEEGA1UEBxM6TWFkcmlkIChzZWUgY3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNv +bS9hZGRyZXNzKTESMBAGA1UEBRMJQTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMu +QS4xJzAlBgNVBAMTHkdsb2JhbCBDaGFtYmVyc2lnbiBSb290IC0gMjAwODAeFw0wODA4MDExMjMx +NDBaFw0zODA3MzExMjMxNDBaMIGsMQswCQYDVQQGEwJFVTFDMEEGA1UEBxM6TWFkcmlkIChzZWUg +Y3VycmVudCBhZGRyZXNzIGF0IHd3dy5jYW1lcmZpcm1hLmNvbS9hZGRyZXNzKTESMBAGA1UEBRMJ +QTgyNzQzMjg3MRswGQYDVQQKExJBQyBDYW1lcmZpcm1hIFMuQS4xJzAlBgNVBAMTHkdsb2JhbCBD +aGFtYmVyc2lnbiBSb290IC0gMjAwODCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMDf +VtPkOpt2RbQT2//BthmLN0EYlVJH6xedKYiONWwGMi5HYvNJBL99RDaxccy9Wglz1dmFRP+RVyXf +XjaOcNFccUMd2drvXNL7G706tcuto8xEpw2uIRU/uXpbknXYpBI4iRmKt4DS4jJvVpyR1ogQC7N0 +ZJJ0YPP2zxhPYLIj0Mc7zmFLmY/CDNBAspjcDahOo7kKrmCgrUVSY7pmvWjg+b4aqIG7HkF4ddPB +/gBVsIdU6CeQNR1MM62X/JcumIS/LMmjv9GYERTtY/jKmIhYF5ntRQOXfjyGHoiMvvKRhI9lNNgA +TH23MRdaKXoKGCQwoze1eqkBfSbW+Q6OWfH9GzO1KTsXO0G2Id3UwD2ln58fQ1DJu7xsepeY7s2M +H/ucUa6LcL0nn3HAa6x9kGbo1106DbDVwo3VyJ2dwW3Q0L9R5OP4wzg2rtandeavhENdk5IMagfe +Ox2YItaswTXbo6Al/3K1dh3ebeksZixShNBFks4c5eUzHdwHU1SjqoI7mjcv3N2gZOnm3b2u/GSF +HTynyQbehP9r6GsaPMWis0L7iwk+XwhSx2LE1AVxv8Rk5Pihg+g+EpuoHtQ2TS9x9o0o9oOpE9Jh +wZG7SMA0j0GMS0zbaRL/UJScIINZc+18ofLx/d33SdNDWKBWY8o9PeU1VlnpDsogzCtLkykPAgMB +AAGjggFqMIIBZjASBgNVHRMBAf8ECDAGAQH/AgEMMB0GA1UdDgQWBBS5CcqcHtvTbDprru1U8VuT +BjUuXjCB4QYDVR0jBIHZMIHWgBS5CcqcHtvTbDprru1U8VuTBjUuXqGBsqSBrzCBrDELMAkGA1UE +BhMCRVUxQzBBBgNVBAcTOk1hZHJpZCAoc2VlIGN1cnJlbnQgYWRkcmVzcyBhdCB3d3cuY2FtZXJm +aXJtYS5jb20vYWRkcmVzcykxEjAQBgNVBAUTCUE4Mjc0MzI4NzEbMBkGA1UEChMSQUMgQ2FtZXJm +aXJtYSBTLkEuMScwJQYDVQQDEx5HbG9iYWwgQ2hhbWJlcnNpZ24gUm9vdCAtIDIwMDiCCQDJzdPp +1X0jzjAOBgNVHQ8BAf8EBAMCAQYwPQYDVR0gBDYwNDAyBgRVHSAAMCowKAYIKwYBBQUHAgEWHGh0 +dHA6Ly9wb2xpY3kuY2FtZXJmaXJtYS5jb20wDQYJKoZIhvcNAQEFBQADggIBAICIf3DekijZBZRG +/5BXqfEv3xoNa/p8DhxJJHkn2EaqbylZUohwEurdPfWbU1Rv4WCiqAm57OtZfMY18dwY6fFn5a+6 +ReAJ3spED8IXDneRRXozX1+WLGiLwUePmJs9wOzL9dWCkoQ10b42OFZyMVtHLaoXpGNR6woBrX/s +dZ7LoR/xfxKxueRkf2fWIyr0uDldmOghp+G9PUIadJpwr2hsUF1Jz//7Dl3mLEfXgTpZALVza2Mg +9jFFCDkO9HB+QHBaP9BrQql0PSgvAm11cpUJjUhjxsYjV5KTXjXBjfkK9yydYhz2rXzdpjEetrHH +foUm+qRqtdpjMNHvkzeyZi99Bffnt0uYlDXA2TopwZ2yUDMdSqlapskD7+3056huirRXhOukP9Du +qqqHW2Pok+JrqNS4cnhrG+055F3Lm6qH1U9OAP7Zap88MQ8oAgF9mOinsKJknnn4SPIVqczmyETr +P3iZ8ntxPjzxmKfFGBI/5rsoM0LpRQp8bfKGeS/Fghl9CYl8slR2iK7ewfPM4W7bMdaTrpmg7yVq +c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z +09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B +-----END CERTIFICATE----- + +Bogus Mozilla Addons +==================== +-----BEGIN CERTIFICATE----- +MIIF+DCCBOCgAwIBAgIRAJI51TSPQNFpWnRUcOHyP0MwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgeIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ +MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds +ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw +IENvcnBvcmF0aW9uMRQwEgYDVQQLEwtQbGF0aW51bVNTTDEbMBkGA1UEAxMSYWRkb25zLm1vemls +bGEub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAq8ZtNvMVc3iDc850hdWu7LLw +4CQfE4O4IKy7mv6Iu6uhHQsfRQCqSbc1Nwxq70dMudG+41cSBI2Sx7bsAby22seBOCCtcoXmDvyB +bAetaHY4xUTXzMZKxZc+ZPRR5vB+suxW9yWCTUmYyxaY3SPxiZHRF5dAmSbW4qIrXt+9ifIbGlMt +zFBBetA9KgxVcBQB6VhJEHoLk4KL4R7tOoAQgs6WijTwzNfTubRQh1VUCbidQihVAOWMNVS/3SWR +RrcN5V2DqOWL+4TkPK522sRDK1t0C/i+XWjxeFu1zn3xXZlA2sruOIFQvpihbLgkrfOvjA/XESgs +hBhMfbXZjzC1GwIDAQABo4IB8DCCAewwHwYDVR0jBBgwFoAUoXJfJhsomEOVXQc31YWWnUvSw0Uw +HQYDVR0OBBYEFN2A0lQ990xwyqOw3TR6MuToO1o7MA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8E +AjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBGBgNVHSAEPzA9MDsGDCsGAQQBsjEB +AgEDBDArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3VyZS5jb21vZG8uY29tL0NQUzB7BgNVHR8E +dDByMDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJl +LmNybDA2oDSgMoYwaHR0cDovL2NybC5jb21vZG8ubmV0L1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUu +Y3JsMHEGCCsGAQUFBwEBBGUwYzA7BggrBgEFBQcwAoYvaHR0cDovL2NydC5jb21vZG9jYS5jb20v +VVROQWRkVHJ1c3RTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2Nh +LmNvbTA1BgNVHREELjAsghJhZGRvbnMubW96aWxsYS5vcmeCFnd3dy5hZGRvbnMubW96aWxsYS5v +cmcwDQYJKoZIhvcNAQEFBQADggEBADM7YxX8sewULJPddZTegVrZTpm++0qkOVVNoUB63hMqh6k3 +z+jV+63Re21vjCCHglTmV0m8ICiEzdYB2ZOLF24jZuWEyIA/xqFwgOTsTR35/JFac2IpmvcgHGHg +izmfyrx+jd282bHjn57fFVORIVIL2RojD2Y226yTlkqjpSLPKfeimaj2ttlArtl+tvZYLpusNspk +j2VS3IacgqtuUEvaX/oFAIgwDt6NVr+BR409BuKyYpJnj57ImrLlBrhwJLh3fCMKOMN5CNixUZ2s +lRHHQBeeoxyP8hGnaCfaSQWEGHxYLQFnXOWfoSm7SjlFL78Rqnmi7bTUtWVDt5NGitM= +-----END CERTIFICATE----- + +Bogus Global Trustee +==================== +-----BEGIN CERTIFICATE----- +MIIG3TCCBcWgAwIBAgIRANjzX063hystqwaS4xU4L7AwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgeMxCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEO +MAwGA1UEBxMFVGFtcGExFzAVBgNVBAkTDlNlYSBWaWxsYWdlIDEwMRcwFQYDVQQKEw5HbG9iYWwg +VHJ1c3RlZTEXMBUGA1UECxMOR2xvYmFsIFRydXN0ZWUxKDAmBgNVBAsTH0hvc3RlZCBieSBHVEkg +R3JvdXAgQ29ycG9yYXRpb24xFDASBgNVBAsTC1BsYXRpbnVtU1NMMRcwFQYDVQQDEw5nbG9iYWwg +dHJ1c3RlZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANl08qpBHd/1whZDSVwpv7aJ +dCm8nI0MRk9ZfrJBF2Y0DGWJ4Wwl44YKniJFIozdneajld7ciAJVXONbkXXrJmljuS7Gyi4n34i6 +AiBu/rkLKden1tdIGhzO3R+pJw5iT6GWHt1UOjRjSnb1d31ZZ9gQ1LUPOkMimNv0CcQKcM7dkNQv +73QTw83CiTliFZ3mdKjom/BjbpyJtg6tm/fMgujoLbgL2iLsSYUHiJmYP/R0qQn3gXyXC1mZGHKL +25SCK6foqmuXv4h+dbCLRUUMx6gJ6htBWDA7X3hlFTTS5Dw0DR3YZDyKpVZJmSgtS/LPzdluSWSb +qXmQd1WpCButGnSe4AOTCgm3rae0XO+DbLeatMZoQIAdQtFueZupGSGanPmGLQDRNP7gtvlVtvUm +xZUWpXxznwopiaw6mPebdGe3kLddCSNqau0sEO5TChDwFh9Xs7ENeZEZsOvNMD+gFF+zxv1cM6ew +/5iwVYy5pfJvRyRJIWnMQqJRAECFjIKCqzKly5rc0NkYDd8Z9K+DDcE+MdskSLZ1gKHhyXdkHqfl +i38VTUunwtDteZVekTHsGP9On0gU6nW6Ic4pdukfTlGHLrPMBGC6Ix8fZbIKuNVuj0tCiUepgZBb +K7K2ruagcHt4kAp6xeXnxfsK9i9pjIwfV+AGmf8R1VIyIJcnmO5lAgMBAAGjggHUMIIB0DAfBgNV +HSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNVHQ4EFgQUt8PeGkPtQZepjyl4nAO5rEBC +AKwwDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsG +AQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQMEMCswKQYIKwYBBQUHAgEWHWh0dHBzOi8v +c2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIwOKA2oDSGMmh0dHA6Ly9jcmwuY29tb2Rv +Y2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3JsMDagNKAyhjBodHRwOi8vY3JsLmNvbW9k +by5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmwwcQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUF +BzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5BZGRUcnVzdFNlcnZlckNBLmNydDAkBggr +BgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMBkGA1UdEQQSMBCCDmdsb2JhbCB0cnVz +dGVlMA0GCSqGSIb3DQEBBQUAA4IBAQCPunW6OdQm03APxLMCp8USI3HJ/mPpo2J4JERP1LkRPh/H +KOdVa+704QCRhorJCWufLqRFOdFhYl6TpQVFeJ9gEiz0bGVlDcxGNIsouqDG9JlxZPMidqxP82LJ +pzNaBx89yYaA3NsEL4cn6L9IRIHA8Ekjbh/l5AOGJBOihWJ8WATK5o0Tcgq6VkSiD7z7oD0NKn/7 +nqkJPbda1IqN4SXopAmEcK0SRLnPuTN6ulzmS6a7BQaY//KYUnt3gCdK2eL6uVLU+/vm1i2ej8EV +RI2bdC/ulFpO08SLiqxDnXP2rgyHia2HycnH3boUYHr4tTWdwo3GloENqVKKKUAE6Rm0 +-----END CERTIFICATE----- + +Bogus GMail +=========== +-----BEGIN CERTIFICATE----- +MIIF7jCCBNagAwIBAgIQBH7L6fylX3vQnq424QyuHjANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNMTEwMzE1MDAwMDAwWhcNMTQwMzE0MjM1 +OTU5WjCB3zELMAkGA1UEBhMCVVMxDjAMBgNVBBETBTM4NDc3MRAwDgYDVQQIEwdGbG9yaWRhMRAw +DgYDVQQHEwdFbmdsaXNoMRcwFQYDVQQJEw5TZWEgVmlsbGFnZSAxMDEUMBIGA1UEChMLR29vZ2xl +IEx0ZC4xEzARBgNVBAsTClRlY2ggRGVwdC4xKDAmBgNVBAsTH0hvc3RlZCBieSBHVEkgR3JvdXAg +Q29ycG9yYXRpb24xFDASBgNVBAsTC1BsYXRpbnVtU1NMMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwc/DyBO7CokbKNCqqu2Aj0RF2Hx86 +0GWDTppFqENwhXbwH4cAAh9uOxcXxLXpGUaikiWNYiq0YzAfuYX4NeEWWnZJzFBIUzlZidaEAvua +7BvHUdV2lZDUOiq4pt4CTQb7ze2lRkFfVXTl7H5A3FCcteQ1XR5oIPjp3qNqKL9B0qGz4iWNDBvK +PZMMGK7fxbz9vIK6aADXFjJxn2W1EdpoWdCmV2Qbyf6Y5fWlZerh2+70s52zjuqHrhbSHqB8fGk/ +KRaFAVOnbPFgq92i/CVH1DLREt33SBLg/Jyid5jpiZm4+DjxjAbCeiM2bZudzTDIxzQXHrt9Qsir +5xUW9nO1AgMBAAGjggHqMIIB5jAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQUGCqiyNR6P3utBIu9b54QRhN4cZ0wDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MC8GA1UdEQQoMCaCD21haWwuZ29vZ2xlLmNvbYITd3d3Lm1haWwuZ29vZ2xlLmNvbTANBgkqhkiG +9w0BAQUFAAOCAQEAZwYICifFk24C8t4XP9DTG3z/tc16x3fHvt8SyhnesBNXDAORxHlSz3+3XlUg +hEnd9dApLw4E2lmeDhOf9MAym/+hESQql6PyPz0qa6itjBl1lQ4dJf1PxHoVwx3HE0DIDb6XYHKm +/iW+j+zVpobDIVxZUtlqC1yfS961+ezi9MXMYlN2iWXkKdq3v5bgYI0NtwlV1kBVHcHyliF1r4mG +H12BlykoHinXlsEgAzJ7ADtqNxdao7MabzI7bvGjXaurzCrLMAwfNSOLaURc6qwoYO2ra2Oe9pK8 +vZpaJkzFmLgOGT78BTHjFtn9kAUDhsZXAR9/eKDPM2qqZmsi0KdJIw== +-----END CERTIFICATE----- + +Bogus Google +============ +-----BEGIN CERTIFICATE----- +MIIF5DCCBMygAwIBAgIRAPXIavNhYvE6ZPVPbclYfAYwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgd4xCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ +MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds +ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw +IENvcnBvcmF0aW9uMRQwEgYDVQQLEwtQbGF0aW51bVNTTDEXMBUGA1UEAxMOd3d3Lmdvb2dsZS5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwc/DyBO7CokbKNCqqu2Aj0RF2Hx86 +0GWDTppFqENwhXbwH4cAAh9uOxcXxLXpGUaikiWNYiq0YzAfuYX4NeEWWnZJzFBIUzlZidaEAvua +7BvHUdV2lZDUOiq4pt4CTQb7ze2lRkFfVXTl7H5A3FCcteQ1XR5oIPjp3qNqKL9B0qGz4iWNDBvK +PZMMGK7fxbz9vIK6aADXFjJxn2W1EdpoWdCmV2Qbyf6Y5fWlZerh2+70s52zjuqHrhbSHqB8fGk/ +KRaFAVOnbPFgq92i/CVH1DLREt33SBLg/Jyid5jpiZm4+DjxjAbCeiM2bZudzTDIxzQXHrt9Qsir +5xUW9nO1AgMBAAGjggHgMIIB3DAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQUGCqiyNR6P3utBIu9b54QRhN4cZ0wDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MCUGA1UdEQQeMByCDnd3dy5nb29nbGUuY29tggpnb29nbGUuY29tMA0GCSqGSIb3DQEBBQUAA4IB +AQBxwJk/Xva9M/+eFsuov91w+dJTOzauyRfIrl5N3WL3t9M+d6P+wHsytcmUBVJQ8l89eYRJT11s +sNdZvdRsiPr8xWWG6yhSokL2fLxqxwcuJdGQYiDGjVHCLEU5TgPa9xjozAo62UXYbG40i2KcThX5 +Q+7ll8A/rTUTxSsGx0H94vd+Ra2b0eFm7fh6S5Q5ei/r6D9D2DXWVvp0523m7axlhP7QTQYS3tpZ +ADwJXM+IS+g9tBUhksxtplHijpfx9IJGy8RTXtpcnWWSAWWJAOW2mf8mQPEvGTEIGrFnVYYNrjUz +hryXSJLXlmD4zvyW64fEc8yUm1hb83qkJxPWT/Rp +-----END CERTIFICATE----- + +Bogus Skype +=========== +-----BEGIN CERTIFICATE----- +MIIF7zCCBNegAwIBAgIRAOkCi5V45BXcGnEKK4gVREcwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgd8xCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ +MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds +ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw +IENvcnBvcmF0aW9uMRQwEgYDVQQLEwtQbGF0aW51bVNTTDEYMBYGA1UEAxMPbG9naW4uc2t5cGUu +Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsHiZhg6icyPUWsNJ67E2jHzKhK48 +rziIKJmNLVgTsZd4PlIgZ6xbc5hsMlXJcNHZqhXoLiaFgbxW5LyAY9tO1/UCvlFjHjzb39cAXVq5 +5Xtq6jggsju27nVUhPmmyjhw3b+w/6WFXbRB/t092SrhMEMamHmToF/gZ2yV+j56rnF7422IQj8l +1O6+aGisraxg4CCjOYO5Wyijk22hvXYK4+uuhycOVI+0SAyaVPRdjjdQ3F6ki2tL3KbzNL53WSKI +/xkrbXZkc9oMhwcrmjc60OKM9jYya5p5zNI7k28aTWzmwZ1ArC10w77qXHNlASmxKr9wWcHOxsOi +yEVfumc9DwIDAQABo4IB6jCCAeYwHwYDVR0jBBgwFoAUoXJfJhsomEOVXQc31YWWnUvSw0UwHQYD +VR0OBBYEFNWOWlETtCkNMbYcjT5RUTEKM6qBMA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAA +MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBGBgNVHSAEPzA9MDsGDCsGAQQBsjEBAgED +BDArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3VyZS5jb21vZG8uY29tL0NQUzB7BgNVHR8EdDBy +MDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy +bDA2oDSgMoYwaHR0cDovL2NybC5jb21vZG8ubmV0L1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MHEGCCsGAQUFBwEBBGUwYzA7BggrBgEFBQcwAoYvaHR0cDovL2NydC5jb21vZG9jYS5jb20vVVRO +QWRkVHJ1c3RTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNv +bTAvBgNVHREEKDAmgg9sb2dpbi5za3lwZS5jb22CE3d3dy5sb2dpbi5za3lwZS5jb20wDQYJKoZI +hvcNAQEFBQADggEBAAjygXWRu84SBBjCTVr7RpAKVET08t0HgfAfpnpvn8+4DixPnMSa9aj2uqTJ +el2x4lrKPPpgqGg+y7ot4s3WtuSSPGmtV+qoLzgQhHLlaHHtvutuGO9jer7nJP/AY/1YO0yBktgp +q441XdfTCWuF09VzBUTi5buDUxDL8s+3buFpt6GSZMXPzYK7NqA4rdck31P8P2K3t9XHV+OTMXCO +JImGymMrObpd2Wpg7KFOiv5T+F6S3y9cJhdtA30CDw+qQ2dtsGK/flPdzOx4c5XlpfYAowT9PwQq +s5jFtwMc28lQq7AFHR6+VrTPPkITlJ755wGBpXhvDHp2rAWG7KzCEaw= +-----END CERTIFICATE----- + +Bogus Yahoo 1 +============= +-----BEGIN CERTIFICATE----- +MIIF7zCCBNegAwIBAgIRANdVj9r18RBbshMoK3B3KaMwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgd8xCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ +MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds +ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw +IENvcnBvcmF0aW9uMRQwEgYDVQQLEwtQbGF0aW51bVNTTDEYMBYGA1UEAxMPbG9naW4ueWFob28u +Y29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoaQFPe2FRZOKGE3GAwBX4kB38Bzr +0BnfIl0If9EHPEGJRhejCfr8+KkE0ZaPq9dPPPmtGKl0gcRXCjomFs5iPrw/bCHuk43LDaAfmpbQ +j631k5OC7nIMoXUVo3uEVrit/1IRcYS8OjALfpio4ag/N1LQ8XxvkNhFCqw5cmph1bvDjPnCzN/9 +OnG5r7zcOtwMtrHS0Ym7Qbby3lfVFd/8/eIxxd/KwdiPLL/wDltx4DRxw8VNfXrU+u0wSy/qti6e +kzziOvhCohru3N/ND6n2eYQajmwCtoblv1FqZvjznNNZDHulmXjNfJn6xpZH2DLUdHYOd0sgdKS3 +iXWSSrRbVQIDAQABo4IB6jCCAeYwHwYDVR0jBBgwFoAUoXJfJhsomEOVXQc31YWWnUvSw0UwHQYD +VR0OBBYEFIZJRfwzGTPUBO0nYe7oAckMfy9+MA4GA1UdDwEB/wQEAwIFoDAMBgNVHRMBAf8EAjAA +MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBGBgNVHSAEPzA9MDsGDCsGAQQBsjEBAgED +BDArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3VyZS5jb21vZG8uY29tL0NQUzB7BgNVHR8EdDBy +MDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy +bDA2oDSgMoYwaHR0cDovL2NybC5jb21vZG8ubmV0L1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MHEGCCsGAQUFBwEBBGUwYzA7BggrBgEFBQcwAoYvaHR0cDovL2NydC5jb21vZG9jYS5jb20vVVRO +QWRkVHJ1c3RTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNv +bTAvBgNVHREEKDAmgg9sb2dpbi55YWhvby5jb22CE3d3dy5sb2dpbi55YWhvby5jb20wDQYJKoZI +hvcNAQEFBQADggEBAD1XyUgkXO5kgfWuvlUpFv8qL4Tt2fijA8gwZrvI1IEtIfcI96yWQppBdXq6 +XRAjy5JCYfqK2m1lNBnlqdYtE3jXgUSSqW6AYxXL/jUfAtGKFLCozJQgO6ga8F02UNsNrulk5PaN +aX0wyBQXAErlpjX7fQ0inXl2Uiy8lwaImhX0c+bx9ZilzQdEkbinaGdF0nIRYOJxt1BV4oqpDdaS +7gQqizCgogVGNG2SxjuqTaDQqwEZCjK36OPP8dKXSXuspJf38FeuY3eaf5baTf2+3Ac24yW9iXmO +KRITi4gH+2vbpM2zLSfp1Mpg14VT+3TGXDWMcB/5sreSJyDHlNVnFDA= +-----END CERTIFICATE----- + +Bogus Yahoo 2 +============= +-----BEGIN CERTIFICATE----- +MIIF2TCCBMGgAwIBAgIQOSpDTw4H3x+KowXeNODCKTANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNMTEwMzE1MDAwMDAwWhcNMTQwMzE0MjM1 +OTU5WjCB3zELMAkGA1UEBhMCVVMxDjAMBgNVBBETBTM4NDc3MRAwDgYDVQQIEwdGbG9yaWRhMRAw +DgYDVQQHEwdFbmdsaXNoMRcwFQYDVQQJEw5TZWEgVmlsbGFnZSAxMDEUMBIGA1UEChMLR29vZ2xl +IEx0ZC4xEzARBgNVBAsTClRlY2ggRGVwdC4xKDAmBgNVBAsTH0hvc3RlZCBieSBHVEkgR3JvdXAg +Q29ycG9yYXRpb24xFDASBgNVBAsTC1BsYXRpbnVtU1NMMRgwFgYDVQQDEw9sb2dpbi55YWhvby5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQChpAU97YVFk4oYTcYDAFfiQHfwHOvQ +Gd8iXQh/0Qc8QYlGF6MJ+vz4qQTRlo+r1088+a0YqXSBxFcKOiYWzmI+vD9sIe6TjcsNoB+altCP +rfWTk4LucgyhdRWje4RWuK3/UhFxhLw6MAt+mKjhqD83UtDxfG+Q2EUKrDlyamHVu8OM+cLM3/06 +cbmvvNw63Ay2sdLRibtBtvLeV9UV3/z94jHF38rB2I8sv/AOW3HgNHHDxU19etT67TBLL+q2Lp6T +POI6+EKiGu7c380PqfZ5hBqObAK2huW/UWpm+POc01kMe6WZeM18mfrGlkfYMtR0dg53SyB0pLeJ +dZJKtFtVAgMBAAGjggHVMIIB0TAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQUhklF/DMZM9QE7Sdh7ugByQx/L34wDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MBoGA1UdEQQTMBGCD2xvZ2luLnlhaG9vLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAV2Lhd+v8H7+I +U69Y09TWbWcwF0C+4B9k3ocVzOCkVqnRn/kB/gKxseriX+5xFjH5CNXC15qbslo416l/6YdrMfkL +rNn9UHHg24KSD4GcjXfp6y7q1CNBh+wtsnizjrFn0u5xAwgSmbMCKW/ei97BqQMKWjMcPREDxkgM +mJwVLtmmhVLnBYquMCPr7ShsYOktf49Hiy/Q3Oa7D35f8kiBjlAEY7FRgHWaqbYQHBBfbxhv4A6W +Rc7u8bUg2+/absiV4/ZF/cr8pV9JbQYe0t5hPRV9N+UcNY4Gwmv3tKgoLDHLqrSnl0+divavfje5 +ez3fkmaLj06dxjbnXKarEg/Wzw== +-----END CERTIFICATE----- + +Bogus Yahoo 3 +============= +-----BEGIN CERTIFICATE----- +MIIF2TCCBMGgAwIBAgIQPnXO1GtpMCEhiDCuhqgqcTANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNMTEwMzE1MDAwMDAwWhcNMTQwMzE0MjM1 +OTU5WjCB3zELMAkGA1UEBhMCVVMxDjAMBgNVBBETBTM4NDc3MRAwDgYDVQQIEwdGbG9yaWRhMRAw +DgYDVQQHEwdFbmdsaXNoMRcwFQYDVQQJEw5TZWEgVmlsbGFnZSAxMDEUMBIGA1UEChMLR29vZ2xl +IEx0ZC4xEzARBgNVBAsTClRlY2ggRGVwdC4xKDAmBgNVBAsTH0hvc3RlZCBieSBHVEkgR3JvdXAg +Q29ycG9yYXRpb24xFDASBgNVBAsTC1BsYXRpbnVtU1NMMRgwFgYDVQQDEw9sb2dpbi55YWhvby5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQChpAU97YVFk4oYTcYDAFfiQHfwHOvQ +Gd8iXQh/0Qc8QYlGF6MJ+vz4qQTRlo+r1088+a0YqXSBxFcKOiYWzmI+vD9sIe6TjcsNoB+altCP +rfWTk4LucgyhdRWje4RWuK3/UhFxhLw6MAt+mKjhqD83UtDxfG+Q2EUKrDlyamHVu8OM+cLM3/06 +cbmvvNw63Ay2sdLRibtBtvLeV9UV3/z94jHF38rB2I8sv/AOW3HgNHHDxU19etT67TBLL+q2Lp6T +POI6+EKiGu7c380PqfZ5hBqObAK2huW/UWpm+POc01kMe6WZeM18mfrGlkfYMtR0dg53SyB0pLeJ +dZJKtFtVAgMBAAGjggHVMIIB0TAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQUhklF/DMZM9QE7Sdh7ugByQx/L34wDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MBoGA1UdEQQTMBGCD2xvZ2luLnlhaG9vLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAU2mYjihOnCtb +Hcxrdyg9u/qlTn5WKaTqEOL05i0G0YTbI86X82i2DzreFQskHZHjbC4wt+lwsMNGgPDTsVG/T9Z4 +oPysxs8xBGPiNFUFSj32MLrzM+W60pbz1bG2k4kapGi+fu1jtBpIwFPko/A5DDKSx0MNGnHt0EaT +v5NibDNLzTYNaV67bJaZIWnES2dy22xquPdo7cWPrWNllQpM4PkPfjc9qtSTumcJw6WkDQNabdUL +/vBAFLT2uGl8bcIyS5+1GudGrkxaK6p6XpBXlfrbZgIgHmppZhWcwrb1vFC1/UXHH2i0R1msxBso +k05SUxIDWEtxg59m5qx5SP7+Rw== +-----END CERTIFICATE----- + +Bogus live.com +============== +-----BEGIN CERTIFICATE----- +MIIF7DCCBNSgAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV +BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo +ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w +HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz +NTk1OVowgd4xCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ +MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds +ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw +IENvcnBvcmF0aW9uMRQwEgYDVQQLEwtQbGF0aW51bVNTTDEXMBUGA1UEAxMObG9naW4ubGl2ZS5j +b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDz/Csv7+GtWfBCPMLxgr8sQZPR9pgz +lUy8YvGVWAi26Xt3SLDT3Bc/vG7m7B7sjRf+HCTGPmc9kpWiMMCnVyDPcIiXSgWTeZNCly8+/8QU +FCiiEza0+O6+Hbx4XWGTX+uI19HkK5rNWOIHRZ9PuLlAajMsWyEDWkqU8nqXWRuotULYgwCqNMyn +dtBHA18FrzvhuaE0JbdsX5owhJjCwtfyuEJKEFW9+lOBXY1oZkUsUn7lxATDVOfDOdp6SsW5mIIg +4SxgV7+68kYAvF863OMzl/hKmLnsM08tYGwVkqaBSgvp7HZwNDEXcOZwS46L03XLeEmrZpuGn4+p +xAHoyhvnAgMBAAGjggHoMIIB5DAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQU1GT2qeilfte/Y1IDg1PbxUGN6oAwDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MC0GA1UdEQQmMCSCDmxvZ2luLmxpdmUuY29tghJ3d3cubG9naW4ubGl2ZS5jb20wDQYJKoZIhvcN +AQEFBQADggEBAFTjpJok0vMdQq0b8B6r+9rVqunPWrMeV3sx8m5XSzGvM7u2DRXHXlkBzkS1t78J +ydXcaYTpxRq38D7UwCS9KV+06dZY60URiTQ00xHrNM4qTwA99nLvaWbAn5qsfnBQrFVH2r5DW+yL +yMUjhMmftlIIz5EbL4Bp5jQz5rOfpOUNmhX5V/wLqUEL9f9YQZIiJ2YSBscq2Fmnxt9EEk/AqH+n +QcjIaf+6BS6XrTvQ6/MVbX4b5brdNL4iEexomDOBAmoLE1V5MXVOOsi2E72XbzcKCy2IDt5nkMKz +yiDKmlH0ZD7b9C5F8sdHF6j0+pBaf4CmgqzkbIFGu1KFICT4gOo= +-----END CERTIFICATE----- + +Bogus kuix.de +============= +-----BEGIN CERTIFICATE----- +MIIFbDCCBFSgAwIBAgIQcgMhBcUMCFc9jqUwTv7osDANBgkqhkiG9w0BAQUFADCBlzELMAkGA1UE +BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl +IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHzAd +BgNVBAMTFlVUTi1VU0VSRmlyc3QtSGFyZHdhcmUwHhcNMTEwMzE3MDAwMDAwWhcNMTEwNDE2MjM1 +OTU5WjCB8TELMAkGA1UEBhMCREUxDjAMBgNVBBETBTEyMzQ1MRMwEQYDVQQIEwpUZXN0IFN0YXRl +MRIwEAYDVQQHEwlUZXN0IENpdHkxFDASBgNVBAkTC1Rlc3QgU3RyZWV0MRMwEQYDVQQKEwpLYWkg +RW5nZXJ0MSIwIAYDVQQLExlGb3IgVGVzdGluZyBQdXJwb3NlcyBPbmx5MS0wKwYDVQQLEyRURVNU +IFVTRSBPTkxZIC0gTk8gV0FSUkFOVFkgQVRUQUNIRUQxGTAXBgNVBAsTEENvbW9kbyBUcmlhbCBT +U0wxEDAOBgNVBAMTB2t1aXguZGUwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALiqjvWXRwdf +5Xh2bpNrjt9LPNuZL3FTKW6l8yRPSCUjQAHsChUL7G7IniYjZvvp29gohSFPHt97TOVjwQuyYlaU +U8u/nKFN2YfFaUg8sb+laFIhHXrclE9EbkclHZ+cktI3HflbW7LdPhjX84dmraP0zo/Rb/C5tO+x +6hVjCs6BAgMBAAGjggHaMIIB1jAfBgNVHSMEGDAWgBShcl8mGyiYQ5VdBzfVhZadS9LDRTAdBgNV +HQ4EFgQUQI85JpxMhiOZxlEJpubywf6n9rcwDgYDVR0PAQH/BAQDAgWgMAwGA1UdEwEB/wQCMAAw +HQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMEYGA1UdIAQ/MD0wOwYMKwYBBAGyMQECAQME +MCswKQYIKwYBBQUHAgEWHWh0dHBzOi8vc2VjdXJlLmNvbW9kby5jb20vQ1BTMHsGA1UdHwR0MHIw +OKA2oDSGMmh0dHA6Ly9jcmwuY29tb2RvY2EuY29tL1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js +MDagNKAyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww +cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B +ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t +MB8GA1UdEQQYMBaCB2t1aXguZGWCC3d3dy5rdWl4LmRlMA0GCSqGSIb3DQEBBQUAA4IBAQCOYR4m +HqLZGdDw1L2J+eqSEXlqXnt8n345cwlWUeaGVMdtRnZSymqoNMBgPgPOs8lIl9GfpqFqD/530R4Q +s1eAqQYmhKb7ejcTzoTMd3kJLuJEvh+sd253RkHbsLJpkXTRgJZhMQwvCs+10NwILev2dYLeii66 +PQeQYDlWg+GCyiOs3+PPTXBXwbi3k5rt3IveSqBVKAKrQwxUl2gYous54bn8v3OAZDMSe4dgAuc+ +cMmHyqk2PAXxBl5xCg4KNpmwh+dpWrGgME59YVjLxqiWgF59wSr/m0pK6ylnig9v5hntgs+BV+Ek +raLR+toUl7BsfEfG15QRIezWWtLdj3+R +-----END CERTIFICATE----- + +Go Daddy Root Certificate Authority - G2 +======================================== +-----BEGIN CERTIFICATE----- +MIIDxTCCAq2gAwIBAgIBADANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoTEUdvRGFkZHkuY29tLCBJbmMu +MTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTA5 +MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgYMxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6 +b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMRowGAYDVQQKExFHb0RhZGR5LmNvbSwgSW5jLjExMC8G +A1UEAxMoR28gRGFkZHkgUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZI +hvcNAQEBBQADggEPADCCAQoCggEBAL9xYgjx+lk09xvJGKP3gElY6SKDE6bFIEMBO4Tx5oVJnyfq +9oQbTqC023CYxzIBsQU+B07u9PpPL1kwIuerGVZr4oAH/PMWdYA5UXvl+TW2dE6pjYIT5LY/qQOD ++qK+ihVqf94Lw7YZFAXK6sOoBJQ7RnwyDfMAZiLIjWltNowRGLfTshxgtDj6AozO091GB94KPutd +fMh8+7ArU6SSYmlRJQVhGkSBjCypQ5Yj36w6gZoOKcUcqeldHraenjAKOc7xiID7S13MMuyFYkMl +NAJWJwGRtDtwKj9useiciAF9n9T521NtYJ2/LOdYq7hfRvzOxBsDPAnrSTFcaUaz4EcCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFDqahQcQZyi27/a9 +BUFuIMGU2g/eMA0GCSqGSIb3DQEBCwUAA4IBAQCZ21151fmXWWcDYfF+OwYxdS2hII5PZYe096ac +vNjpL9DbWu7PdIxztDhC2gV7+AJ1uP2lsdeu9tfeE8tTEH6KRtGX+rcuKxGrkLAngPnon1rpN5+r +5N9ss4UXnT3ZJE95kTXWXwTrgIOrmgIttRD02JDHBHNA7XIloKmf7J6raBKZV8aPEjoJpL1E/QYV +N8Gb5DKj7Tjo2GTzLH4U/ALqn83/B2gX2yKQOC16jdFU8WnjXzPKej17CuPKf1855eJ1usV2GDPO +LPAvTK33sefOT6jEm0pUBsV/fdUID+Ic/n4XuKxe9tQWskMJDE32p2u0mYRlynqI4uJEvlz36hz1 +-----END CERTIFICATE----- + +Starfield Root Certificate Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIID3TCCAsWgAwIBAgIBADANBgkqhkiG9w0BAQsFADCBjzELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xMjAwBgNVBAMTKVN0YXJmaWVsZCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0 +eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgY8xCzAJBgNVBAYTAlVTMRAw +DgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxTdGFyZmllbGQg +VGVjaG5vbG9naWVzLCBJbmMuMTIwMAYDVQQDEylTdGFyZmllbGQgUm9vdCBDZXJ0aWZpY2F0ZSBB +dXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3twQP89o/8ArFv +W59I2Z154qK3A2FWGMNHttfKPTUuiUP3oWmb3ooa/RMgnLRJdzIpVv257IzdIvpy3Cdhl+72WoTs +bhm5iSzchFvVdPtrX8WJpRBSiUZV9Lh1HOZ/5FSuS/hVclcCGfgXcVnrHigHdMWdSL5stPSksPNk +N3mSwOxGXn/hbVNMYq/NHwtjuzqd+/x5AJhhdM8mgkBj87JyahkNmcrUDnXMN/uLicFZ8WJ/X7Nf +ZTD4p7dNdloedl40wOiWVpmKs/B/pM293DIxfJHP4F8R+GuqSVzRmZTRouNjWwl2tVZi4Ut0HZbU +JtQIBFnQmA4O5t78w+wfkPECAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwHQYDVR0OBBYEFHwMMh+n2TB/xH1oo2Kooc6rB1snMA0GCSqGSIb3DQEBCwUAA4IBAQARWfol +TwNvlJk7mh+ChTnUdgWUXuEok21iXQnCoKjUsHU48TRqneSfioYmUeYs0cYtbpUgSpIB7LiKZ3sx +4mcujJUDJi5DnUox9g61DLu34jd/IroAow57UvtruzvE03lRTs2Q9GcHGcg8RnoNAX3FWOdt5oUw +F5okxBDgBPfg8n/Uqgr/Qh037ZTlZFkSIHc40zI+OIF1lnP6aI+xy84fxez6nH7PfrHxBy22/L/K +pL/QlwVKvOoYKAKQvVR4CSFx09F9HdkWsKlhPdAKACL8x3vLCWRFCztAgfd9fDL1mMpYjn0q7pBZ +c2T5NnReJaH1ZgUufzkVqSr7UIuOhWn0 +-----END CERTIFICATE----- + +Starfield Services Root Certificate Authority - G2 +================================================== +-----BEGIN CERTIFICATE----- +MIID7zCCAtegAwIBAgIBADANBgkqhkiG9w0BAQsFADCBmDELMAkGA1UEBhMCVVMxEDAOBgNVBAgT +B0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxJTAjBgNVBAoTHFN0YXJmaWVsZCBUZWNobm9s +b2dpZXMsIEluYy4xOzA5BgNVBAMTMlN0YXJmaWVsZCBTZXJ2aWNlcyBSb290IENlcnRpZmljYXRl +IEF1dGhvcml0eSAtIEcyMB4XDTA5MDkwMTAwMDAwMFoXDTM3MTIzMTIzNTk1OVowgZgxCzAJBgNV +BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQHEwpTY290dHNkYWxlMSUwIwYDVQQKExxT +dGFyZmllbGQgVGVjaG5vbG9naWVzLCBJbmMuMTswOQYDVQQDEzJTdGFyZmllbGQgU2VydmljZXMg +Um9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBANUMOsQq+U7i9b4Zl1+OiFOxHz/Lz58gE20pOsgPfTz3a3Y4Y9k2YKibXlwAgLIvWX/2 +h/klQ4bnaRtSmpDhcePYLQ1Ob/bISdm28xpWriu2dBTrz/sm4xq6HZYuajtYlIlHVv8loJNwU4Pa +hHQUw2eeBGg6345AWh1KTs9DkTvnVtYAcMtS7nt9rjrnvDH5RfbCYM8TWQIrgMw0R9+53pBlbQLP +LJGmpufehRhJfGZOozptqbXuNC66DQO4M99H67FrjSXZm86B0UVGMpZwh94CDklDhbZsc7tk6mFB +rMnUVN+HL8cisibMn1lUaJ/8viovxFUcdUBgF4UCVTmLfwUCAwEAAaNCMEAwDwYDVR0TAQH/BAUw +AwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFJxfAN+qAdcwKziIorhtSpzyEZGDMA0GCSqG +SIb3DQEBCwUAA4IBAQBLNqaEd2ndOxmfZyMIbw5hyf2E3F/YNoHN2BtBLZ9g3ccaaNnRbobhiCPP +E95Dz+I0swSdHynVv/heyNXBve6SbzJ08pGCL72CQnqtKrcgfU28elUSwhXqvfdqlS5sdJ/PHLTy +xQGjhdByPq1zqwubdQxtRbeOlKyWN7Wg0I8VRw7j6IPdj/3vQQF3zCepYoUz8jcI73HPdwbeyBkd +iEDPfUYd/x7H4c7/I9vG+o1VTqkC50cRRj70/b17KSa7qWFiNyi2LSr2EIZkyXCn0q23KXB56jza +YyWf/Wi3MOxw+3WKt21gZ7IeyLnp2KhvAotnDU0mV3HaIPzBSlCNsSi6 +-----END CERTIFICATE----- + +AffirmTrust Commercial +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIId3cGJyapsXwwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMB4XDTEw +MDEyOTE0MDYwNloXDTMwMTIzMTE0MDYwNlowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBDb21tZXJjaWFsMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEA9htPZwcroRX1BiLLHwGy43NFBkRJLLtJJRTWzsO3qyxPxkEylFf6Eqdb +DuKPHx6GGaeqtS25Xw2Kwq+FNXkyLbscYjfysVtKPcrNcV/pQr6U6Mje+SJIZMblq8Yrba0F8PrV +C8+a5fBQpIs7R6UjW3p6+DM/uO+Zl+MgwdYoic+U+7lF7eNAFxHUdPALMeIrJmqbTFeurCA+ukV6 +BfO9m2kVrn1OIGPENXY6BwLJN/3HR+7o8XYdcxXyl6S1yHp52UKqK39c/s4mT6NmgTWvRLpUHhww +MmWd5jyTXlBOeuM61G7MGvv50jeuJCqrVwMiKA1JdX+3KNp1v47j3A55MQIDAQABo0IwQDAdBgNV +HQ4EFgQUnZPGU4teyq8/nx4P5ZmVvCT2lI8wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQELBQADggEBAFis9AQOzcAN/wr91LoWXym9e2iZWEnStB03TX8nfUYGXUPG +hi4+c7ImfU+TqbbEKpqrIZcUsd6M06uJFdhrJNTxFq7YpFzUf1GO7RgBsZNjvbz4YYCanrHOQnDi +qX0GJX0nof5v7LMeJNrjS1UaADs1tDvZ110w/YETifLCBivtZ8SOyUOyXGsViQK8YvxO8rUzqrJv +0wqiUOP2O+guRMLbZjipM1ZI8W0bM40NjD9gN53Tym1+NH4Nn3J2ixufcv1SNUFFApYvHLKac0kh +sUlHRUe072o0EclNmsxZt9YCnlpOZbWUrhvfKbAW8b8Angc6F2S1BLUjIZkKlTuXfO8= +-----END CERTIFICATE----- + +AffirmTrust Networking +====================== +-----BEGIN CERTIFICATE----- +MIIDTDCCAjSgAwIBAgIIfE8EORzUmS0wDQYJKoZIhvcNAQEFBQAwRDELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMB4XDTEw +MDEyOTE0MDgyNFoXDTMwMTIzMTE0MDgyNFowRDELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmly +bVRydXN0MR8wHQYDVQQDDBZBZmZpcm1UcnVzdCBOZXR3b3JraW5nMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEAtITMMxcua5Rsa2FSoOujz3mUTOWUgJnLVWREZY9nZOIG41w3SfYvm4SE +Hi3yYJ0wTsyEheIszx6e/jarM3c1RNg1lho9Nuh6DtjVR6FqaYvZ/Ls6rnla1fTWcbuakCNrmreI +dIcMHl+5ni36q1Mr3Lt2PpNMCAiMHqIjHNRqrSK6mQEubWXLviRmVSRLQESxG9fhwoXA3hA/Pe24 +/PHxI1Pcv2WXb9n5QHGNfb2V1M6+oF4nI979ptAmDgAp6zxG8D1gvz9Q0twmQVGeFDdCBKNwV6gb +h+0t+nvujArjqWaJGctB+d1ENmHP4ndGyH329JKBNv3bNPFyfvMMFr20FQIDAQABo0IwQDAdBgNV +HQ4EFgQUBx/S55zawm6iQLSwelAQUHTEyL0wDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC +AQYwDQYJKoZIhvcNAQEFBQADggEBAIlXshZ6qML91tmbmzTCnLQyFE2npN/svqe++EPbkTfOtDIu +UFUaNU52Q3Eg75N3ThVwLofDwR1t3Mu1J9QsVtFSUzpE0nPIxBsFZVpikpzuQY0x2+c06lkh1QF6 +12S4ZDnNye2v7UsDSKegmQGA3GWjNq5lWUhPgkvIZfFXHeVZLgo/bNjR9eUJtGxUAArgFU2HdW23 +WJZa3W3SAKD0m0i+wzekujbgfIeFlxoVot4uolu9rxj5kFDNcFn4J2dHy8egBzp90SxdbBk6ZrV9 +/ZFvgrG+CJPbFEfxojfHRZ48x3evZKiT3/Zpg4Jg8klCNO1aAFSFHBY2kgxc+qatv9s= +-----END CERTIFICATE----- + +AffirmTrust Premium +=================== +-----BEGIN CERTIFICATE----- +MIIFRjCCAy6gAwIBAgIIbYwURrGmCu4wDQYJKoZIhvcNAQEMBQAwQTELMAkGA1UEBhMCVVMxFDAS +BgNVBAoMC0FmZmlybVRydXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMB4XDTEwMDEy +OTE0MTAzNloXDTQwMTIzMTE0MTAzNlowQTELMAkGA1UEBhMCVVMxFDASBgNVBAoMC0FmZmlybVRy +dXN0MRwwGgYDVQQDDBNBZmZpcm1UcnVzdCBQcmVtaXVtMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEAxBLfqV/+Qd3d9Z+K4/as4Tx4mrzY8H96oDMq3I0gW64tb+eT2TZwamjPjlGjhVtn +BKAQJG9dKILBl1fYSCkTtuG+kU3fhQxTGJoeJKJPj/CihQvL9Cl/0qRY7iZNyaqoe5rZ+jjeRFcV +5fiMyNlI4g0WJx0eyIOFJbe6qlVBzAMiSy2RjYvmia9mx+n/K+k8rNrSs8PhaJyJ+HoAVt70VZVs ++7pk3WKL3wt3MutizCaam7uqYoNMtAZ6MMgpv+0GTZe5HMQxK9VfvFMSF5yZVylmd2EhMQcuJUmd +GPLu8ytxjLW6OQdJd/zvLpKQBY0tL3d770O/Nbua2Plzpyzy0FfuKE4mX4+QaAkvuPjcBukumj5R +p9EixAqnOEhss/n/fauGV+O61oV4d7pD6kh/9ti+I20ev9E2bFhc8e6kGVQa9QPSdubhjL08s9NI +S+LI+H+SqHZGnEJlPqQewQcDWkYtuJfzt9WyVSHvutxMAJf7FJUnM7/oQ0dG0giZFmA7mn7S5u04 +6uwBHjxIVkkJx0w3AJ6IDsBz4W9m6XJHMD4Q5QsDyZpCAGzFlH5hxIrff4IaC1nEWTJ3s7xgaVY5 +/bQGeyzWZDbZvUjthB9+pSKPKrhC9IK31FOQeE4tGv2Bb0TXOwF0lkLgAOIua+rF7nKsu7/+6qqo ++Nz2snmKtmcCAwEAAaNCMEAwHQYDVR0OBBYEFJ3AZ6YMItkm9UWrpmVSESfYRaxjMA8GA1UdEwEB +/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBDAUAA4ICAQCzV00QYk465KzquByv +MiPIs0laUZx2KI15qldGF9X1Uva3ROgIRL8YhNILgM3FEv0AVQVhh0HctSSePMTYyPtwni94loMg +Nt58D2kTiKV1NpgIpsbfrM7jWNa3Pt668+s0QNiigfV4Py/VpfzZotReBA4Xrf5B8OWycvpEgjNC +6C1Y91aMYj+6QrCcDFx+LmUmXFNPALJ4fqENmS2NuB2OosSw/WDQMKSOyARiqcTtNd56l+0OOF6S +L5Nwpamcb6d9Ex1+xghIsV5n61EIJenmJWtSKZGc0jlzCFfemQa0W50QBuHCAKi4HEoCChTQwUHK ++4w1IX2COPKpVJEZNZOUbWo6xbLQu4mGk+ibyQ86p3q4ofB4Rvr8Ny/lioTz3/4E2aFooC8k4gmV +BtWVyuEklut89pMFu+1z6S3RdTnX5yTb2E5fQ4+e0BQ5v1VwSJlXMbSc7kqYA5YwH2AG7hsj/oFg +IxpHYoWlzBk0gG+zrBrjn/B7SK3VAdlntqlyk+otZrWyuOQ9PLLvTIzq6we/qzWaVYa8GKa1qF60 +g2xraUDTn9zxw2lrueFtCfTxqlB2Cnp9ehehVZZCmTEJ3WARjQUwfuaORtGdFNrHF+QFlozEJLUb +zxQHskD4o55BhrwE0GuWyCqANP2/7waj3VjFhT0+j/6eKeC2uAloGRwYQw== +-----END CERTIFICATE----- + +AffirmTrust Premium ECC +======================= +-----BEGIN CERTIFICATE----- +MIIB/jCCAYWgAwIBAgIIdJclisc/elQwCgYIKoZIzj0EAwMwRTELMAkGA1UEBhMCVVMxFDASBgNV +BAoMC0FmZmlybVRydXN0MSAwHgYDVQQDDBdBZmZpcm1UcnVzdCBQcmVtaXVtIEVDQzAeFw0xMDAx +MjkxNDIwMjRaFw00MDEyMzExNDIwMjRaMEUxCzAJBgNVBAYTAlVTMRQwEgYDVQQKDAtBZmZpcm1U +cnVzdDEgMB4GA1UEAwwXQWZmaXJtVHJ1c3QgUHJlbWl1bSBFQ0MwdjAQBgcqhkjOPQIBBgUrgQQA +IgNiAAQNMF4bFZ0D0KF5Nbc6PJJ6yhUczWLznCZcBz3lVPqj1swS6vQUX+iOGasvLkjmrBhDeKzQ +N8O9ss0s5kfiGuZjuD0uL3jET9v0D6RoTFVya5UdThhClXjMNzyR4ptlKymjQjBAMB0GA1UdDgQW +BBSaryl6wBE1NSZRMADDav5A1a7WPDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAK +BggqhkjOPQQDAwNnADBkAjAXCfOHiFBar8jAQr9HX/VsaobgxCd05DhT1wV/GzTjxi+zygk8N53X +57hG8f2h4nECMEJZh0PUUd+60wkyWs6Iflc9nF9Ca/UHLbXwgpP5WW+uZPpY5Yse42O+tYHNbwKM +eQ== +-----END CERTIFICATE----- + +Certum Trusted Network CA +========================= +-----BEGIN CERTIFICATE----- +MIIDuzCCAqOgAwIBAgIDBETAMA0GCSqGSIb3DQEBBQUAMH4xCzAJBgNVBAYTAlBMMSIwIAYDVQQK +ExlVbml6ZXRvIFRlY2hub2xvZ2llcyBTLkEuMScwJQYDVQQLEx5DZXJ0dW0gQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkxIjAgBgNVBAMTGUNlcnR1bSBUcnVzdGVkIE5ldHdvcmsgQ0EwHhcNMDgxMDIy +MTIwNzM3WhcNMjkxMjMxMTIwNzM3WjB+MQswCQYDVQQGEwJQTDEiMCAGA1UEChMZVW5pemV0byBU +ZWNobm9sb2dpZXMgUy5BLjEnMCUGA1UECxMeQ2VydHVtIENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +MSIwIAYDVQQDExlDZXJ0dW0gVHJ1c3RlZCBOZXR3b3JrIENBMIIBIjANBgkqhkiG9w0BAQEFAAOC +AQ8AMIIBCgKCAQEA4/t9o3K6wvDJFIf1awFO4W5AB7ptJ11/91sts1rHUV+rpDKmYYe2bg+G0jAC +l/jXaVehGDldamR5xgFZrDwxSjh80gTSSyjoIF87B6LMTXPb865Px1bVWqeWifrzq2jUI4ZZJ88J +J7ysbnKDHDBy3+Ci6dLhdHUZvSqeexVUBBvXQzmtVSjF4hq79MDkrjhJM8x2hZ85RdKknvISjFH4 +fOQtf/WsX+sWn7Et0brMkUJ3TCXJkDhv2/DM+44el1k+1WBO5gUo7Ul5E0u6SNsv+XLTOcr+H9g0 +cvW0QM8xAcPs3hEtF10fuFDRXhmnad4HMyjKUJX5p1TLVIZQRan5SQIDAQABo0IwQDAPBgNVHRMB +Af8EBTADAQH/MB0GA1UdDgQWBBQIds3LB/8k9sXN7buQvOKEN0Z19zAOBgNVHQ8BAf8EBAMCAQYw +DQYJKoZIhvcNAQEFBQADggEBAKaorSLOAT2mo/9i0Eidi15ysHhE49wcrwn9I0j6vSrEuVUEtRCj +jSfeC4Jj0O7eDDd5QVsisrCaQVymcODU0HfLI9MA4GxWL+FpDQ3Zqr8hgVDZBqWo/5U30Kr+4rP1 +mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj +Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI +03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= +-----END CERTIFICATE----- diff --git a/config/console.rb b/config/console.rb new file mode 100644 index 000000000..bc83fb2c5 --- /dev/null +++ b/config/console.rb @@ -0,0 +1,2 @@ +require File.expand_path("../load", __FILE__) +Service.load_services diff --git a/config/load.rb b/config/load.rb new file mode 100644 index 000000000..48a00a5e1 --- /dev/null +++ b/config/load.rb @@ -0,0 +1,5 @@ +require 'rubygems' +require 'bundler/setup' +$:.unshift *Dir["#{File.dirname(__FILE__)}/../vendor/internal-gems/**/lib"] + +require File.expand_path("../../lib/github-services", __FILE__) diff --git a/config/secrets.yml.example b/config/secrets.yml.example new file mode 100644 index 000000000..2fbf34789 --- /dev/null +++ b/config/secrets.yml.example @@ -0,0 +1,2 @@ +# This is a placeholder for service secrets that gets written over on deploy. +# THEY ARE SECRET, YOU CANNOT HAVE THEM diff --git a/docs/activecollab b/docs/activecollab new file mode 100644 index 000000000..fc454bffc --- /dev/null +++ b/docs/activecollab @@ -0,0 +1,6 @@ +Install Notes +------------- + +1. Currently, you must specify in the configuration milestone and or category if you want the commits to be associated with them. + In the future, I plan for this to have some form of configuration via tags / branches, or something like that. +2. URL, Project ID, and Token are required the others not so much. diff --git a/docs/acunote b/docs/acunote new file mode 100644 index 000000000..9262a376a --- /dev/null +++ b/docs/acunote @@ -0,0 +1,11 @@ +Acunote is an online project management and Scrum software. Integrating it with +GitHub lets you see commits in the Timeline, perform code review on commits and +create code inspection tasks. See http://www.acunote.com/ for more information. + +Install Notes +------------- + +1. Token - GitHub Service Hook Token for your Acunote organization. Get it + from "Edit Organization" > "Repositories" page in Acunote. +2. Don't forget to check "Active" + diff --git a/docs/amazonsns b/docs/amazonsns new file mode 100644 index 000000000..78517c128 --- /dev/null +++ b/docs/amazonsns @@ -0,0 +1,34 @@ +This service lets you publish event messages to Amazon's Simple Notification Service. Please note that SNS Topics are region specific. + +The AWS Key and Secret you provide can either be from your master account (not recommended) or from an IAM Resource. + +If using IAM, be sure to check that the user has the correct policies for publishing to the specified SNS Topic. A policy similar to the one below will provide your IAM Resource with the correct permission level. + +``` +{ + "Version": "2012-10-17", + "Statement": [ + { + "Action": [ + "sns:Publish" + ], + "Sid": "Stmt0000000000000", + "Resource": [ + "arn:aws:sns:us-east-1:718656560584:app-deploy" + ], + "Effect": "Allow" + } + ] +} +``` + +This service will attempt to provide you with meaningful errors if your configuration is incorrect. + +1. 'aws_key' (Required) The access key to an Amazon Account or IAM User. + +2. 'aws_secret' (Required) The Amazon secret access key associated with the AWS Key. + +3. 'sns_topic' (Required) Full ARN path to the SNS Topic, ie. `arn:aws:sns:eu-west-1:718656560584:sns_topic_name` + +4. 'sns_region' (Optional) the identifier for the AWS Region that the SNS Topic is located in. This defaults to `us-east-1`. + diff --git a/docs/apiary b/docs/apiary new file mode 100644 index 000000000..6d169a8c7 --- /dev/null +++ b/docs/apiary @@ -0,0 +1,10 @@ +[Apiary.io](http://apiary.io/) is a REST API documentation, mocking and testing service. This service hook auto-updates your hosted API documentation generated from [API Blueprint](http://apiary.io/blueprint) in your repository. See more at [http://apiary.io/](http://apiary.io/) + +Install Notes +------------- + +Apiary needs your OAuth token in order to download your `apiary.apib` (that describes your API) file from your repository. Set up this service by: + +1. Go to [Apiary Settings](http://apiary.io/settings) +2. Click the **Connect to GitHub** button +3. _(optional)_ After completing the steps above you can always edit `Branch` field right here. Commits to this GitHub branch will trigger an update at Apiary diff --git a/docs/appharbor b/docs/appharbor new file mode 100644 index 000000000..08ffe8e21 --- /dev/null +++ b/docs/appharbor @@ -0,0 +1,10 @@ +AppHarbor is a .NET Platform as a Service. Use this service to automatically trigger build, test run and deployment of your AppHarbor application when you push to GitHub. + +Install Notes +------------- + +1. Go to your application's main page on AppHarbor and find the "Create build URL". Example: https://appharbor.com/application/{application_slug}/build?authorization={token} +2. "token" is the value of the "authorization" parameter. +3. "application_slug" is a list of unique application identifiers delimited by "," (i.e. "foo" or "foo,bar") that pushes should trigger builds on. +4. If your GitHub repository is private you need to add the "apphb" GitHub user as a collaborator. This enables AppHarbor to download the source code. + diff --git a/docs/apropos b/docs/apropos new file mode 100644 index 000000000..4fdd8fd8e --- /dev/null +++ b/docs/apropos @@ -0,0 +1,5 @@ +Install Notes +------------- + +Use the project identifier from your Apropos project. It will be right below the project name +on the project page. It will look something like: GEZDGORQFY2TCNZRGY2TSMBVGUYDK \ No newline at end of file diff --git a/docs/asana b/docs/asana new file mode 100644 index 000000000..613e83ebf --- /dev/null +++ b/docs/asana @@ -0,0 +1,20 @@ +This service adds commit messages as comments to Asana tasks. Once enabled, commit messages +are checked for Asana task URLs (for example, https://app.asana.com/0/12345678/9012345) or task IDs +starting with # (for example, #9012345). Every task ID found will get the commit comment added to it. + +A commit with the message: + +``` +Fixes layout rendering bug. Reported in https://app.asana.com/0/12345678/9012345 +``` + +will show up as: +``` pushed to branch of / +(https://github.com///commit/) +-Fixes layout rendering bug. Reported in https://app.asana.com/0/12345678/9012345``` + +Install Notes +------------- +1. **Auth Token** - User API token. User must have access to task, all comments will be attributed to this user. See: https://developer.asana.com/documentation/#Authentication +2. **Restrict to Branch** - Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. +3. **Restrict to Last Commit** - Will only inspect the last commit of each push for task IDs. diff --git a/docs/autodeploy b/docs/autodeploy new file mode 100644 index 000000000..aebe58148 --- /dev/null +++ b/docs/autodeploy @@ -0,0 +1,16 @@ +This service automatically creates deployments based on your [workflow](http://www.atmos.org/github-services/auto-deployment/). + +By enabling this hook, GitHub will request a [GitHub Deployment][1] when the default branch is pushed to or your tests suite passes certain criteria. + +If you use Continuous Integration and GitHub you can select to "Deploy on Status" which will only create deployments when the default branch receives a "success" status for a commit. + +Install Notes +------------- + +1. `github_token` A [personal access token](https://github.com/settings/applications) from GitHub with `repo_deployment` scope. +2. `environments` A comma delimited set of environment names to auto-deploy. e.g. production,staging. +3. `deploy_on_status`: If checked deployments will only be created when successful [commit statuses][2] are created by your continuous integration system. +4. `github_api_url` The URL for the GitHub API. Override this for enterprise. **Optional** e.g. `https://enterprise.myorg.com`. + +[1]: https://developer.github.com/v3/repos/deployments +[2]: https://developer.github.com/v3/repos/statuses diff --git a/docs/awscodedeploy b/docs/awscodedeploy new file mode 100644 index 000000000..1a101438d --- /dev/null +++ b/docs/awscodedeploy @@ -0,0 +1,44 @@ +This service lets you deploy apps in [AWS CodeDeploy][1] when Deployments are created via the API. + +You need to provide an AWS access key id and the corresponding secret access key having at least the permission for the `codedeploy:CreateDeployment` action. This is the minimal required policy file: + +Note: You will need to replace “us-east-1†if you are using a different region, and replace “123ACCOUNTID†with your AWS account ID that is found on your Account Settings page. +``` +{ + "Statement": [ + { + "Effect": "Allow", + "Action": "codedeploy:GetDeploymentConfig", + "Resource": "arn:aws:codedeploy:us-east-1:123ACCOUNTID:deploymentconfig:*" + }, + { + "Effect": "Allow", + "Action": "codedeploy:RegisterApplicationRevision", + "Resource": "arn:aws:codedeploy:us-east-1:123ACCOUNTID:application:DemoApplication" + }, + { + "Effect": "Allow", + "Action": "codedeploy:GetApplicationRevision", + "Resource": "arn:aws:codedeploy:us-east-1:123ACCOUNTID:application:DemoApplication" + }, + { + "Effect": "Allow", + "Action": "codedeploy:CreateDeployment", + "Resource": "arn:aws:codedeploy:us-east-1:123ACCOUNTID:deploymentgroup:DemoApplication/DemoFleet" + } + ] +} +``` + +Install Notes +------------- + +1. **Application Name** (required) - "CodeDeploy Application Name" on the **applications page** in the AWS CodeDeploy Console. +2. **Deployment Group** (Optional) - "Deployment Group" on the **app setting page** in the AWS CodeDeploy Console. Defaults to production. +3. **Aws Access Key Id** (required) - Access key id of an AWS IAM user having the permission for the `codedeploy:CreateDeployment` action. +4. **Aws Secret Access Key** (required) - Corresponding secret access key of the AWS IAM user. +5. **Aws Region** (Optional) - The region your servers are in. +6. **GitHub Token** (Optional) - A GitHub personal access token with `repo` scope to for OAuth cloning and deployment statuses for the GitHub API. +7. **GitHub API Url** (Optional) - The URL for the GitHub API. Override this for enterprise. e.g. `https://enterprise.myorg.com`. + +[1]: https://console.aws.amazon.com/codedeploy/home diff --git a/docs/awsopsworks b/docs/awsopsworks new file mode 100644 index 000000000..4d7420a36 --- /dev/null +++ b/docs/awsopsworks @@ -0,0 +1,32 @@ +This service lets you deploy apps in AWS OpsWorks after pushing to the configured branch. It will also pick up on deployment events and update the app to deploy to the requested sha. + +You need to provide an AWS access key id and the corresponding secret access key having at least the permission for the `opsworks:CreateDeployment` action. That's the minimal required policy file: + +``` +{ + "Statement": [ + { + "Effect": "Allow", + "Action": "opsworks:CreateDeployment", + "Resource": "*" + }, + { + "Effect": "Allow", + "Action": "opsworks:UpdateApp", + "Resource": "*" + } + ] +} +``` + +Install Notes +------------- + +1. **Stack Id** (required) - "OpsWorks ID" on the **stack setting page** in the AWS OpsWorks Console or see `StackId` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Stack.html +2. **App Id** (required) - "OpsWorks ID" on the **app setting page** in the AWS OpsWorks Console or see `AppId` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_App.html +3. **Branch Name** (required) - "Branch/Revision" configured for that app in the AWS OpsWorks Console or see `Revision` at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Source.html +4. **Aws Access Key Id** (required) - Access key id of an AWS IAM user having the permission for the `opsworks:CreateDeployment` action. +5. **Aws Secret Access Key** (required) - Corresponding secret access key of the AWS IAM user. +6. **Endpoint Region** (Optional) - The API endpoint region for your stack. Defaults to us-east-1 (classic) +6. **GitHub Token** (Optional) - A GitHub personal access token with `repo` scope to for OAuth cloning and deployment statuses for the GitHub API. +7. **GitHub API Url** (Optional) - The URL for the GitHub API. Override this for enterprise. e.g. `https://enterprise.myorg.com`. diff --git a/docs/backlog b/docs/backlog new file mode 100644 index 000000000..8108023c3 --- /dev/null +++ b/docs/backlog @@ -0,0 +1,11 @@ +Backlog is a project management, hosting service. +http://backlogtool.com, http://www.backlog.jp (Japanese) + +Install Notes +------------- + +1. **api_url** is a API URL. e.g. if the Space ID is example, then the api_url will be https://example.backlog.jp/XML-RPC or https://example.backlogtoo.com/XML-RPC + +2. **user_id** and **password** - user_id and password of a Backlog user that can post comment and update issue. + +You can specify issue keys (e.g. DORA-1) and status keywords (#fixed, #closed) to change issue status (Resolved, Closed). diff --git a/docs/bamboo b/docs/bamboo new file mode 100644 index 000000000..87fc3f746 --- /dev/null +++ b/docs/bamboo @@ -0,0 +1,23 @@ +Bamboo is a continuous integration server that automates the building and testing of your software. +The GitHub Bamboo service can be used to trigger builds after code has been pushed to your git repository. + +Install Notes +------------- + +1. Your Bamboo server must be accessible from the internet. + +2. "base_url" is the URL to your Bamboo server + Example: https://bamboo.example.com/ or http://bamboo.example.com/bamboo/ + +3. "build_key" is the identifier of the plan you want to trigger + Example: "BAM-TRUNK", where BAM = project key, TRUNK = plan key + + A compound build key value can be used to specify multiple builds or associate + specific branches with a build + Example: "master:BAM-TRUNK,3-2-patches:BAM-32PATCH,BAM-TESTS", where BAM-TRUNK + will be triggered only by pushes to the master branch, BAM-32PATCH will only + be triggered by pushes to the 3-2-patches branch, and BAM-TESTS will be triggered + for any push. + +4. "username" and "password" - username and password of a Bamboo user that can + trigger a manual build of the Bamboo plan defined in "build_key" diff --git a/docs/basecamp b/docs/basecamp index 248d8bea7..87ef55f8a 100644 --- a/docs/basecamp +++ b/docs/basecamp @@ -1,25 +1,6 @@ -Basecamp -======== - Install Notes ------------- - 1. url should be your Basecamp url - 2. username should be the username of the user that you want to use to post messages into your Basecamp - you can setup a user just for this purpose - 3. password should be the password of the user that you want to use to post the messages - 4. project should be the name of the project that you want to post the message into (not the id) - 5. category should be the name of the category that you want to post the message using (not the id) - - -Developer Notes ---------------- - -data - - url - - username - - password - - project - - category - -payload - - refer to docs/github_payload \ No newline at end of file + 1. project_url is the URL of your Basecamp project: https://basecamp.com/1234/projects/5678 + 2. email_address is the email you sign in to Basecamp with. This person must have access to the project. To add events on behalf of other people, make the person an admin on the project. + 3. password is the password you sign in to Basecamp with. diff --git a/docs/bugherd b/docs/bugherd new file mode 100644 index 000000000..3635d7859 --- /dev/null +++ b/docs/bugherd @@ -0,0 +1,3 @@ +BugHerd is the world's simplest bug tracker for the web. See: http://www.bugherd.com + +BugHerd allows you to visually track issues on your website. Using the GitHub integration you can update tasks directly from GitHub commit messages. diff --git a/docs/bugzilla b/docs/bugzilla new file mode 100644 index 000000000..341446973 --- /dev/null +++ b/docs/bugzilla @@ -0,0 +1,36 @@ +This service hook posts comments on Bugzilla bugs when commit messages +reference a bug by id number. + +Bugs are recognised by the following formats, which are case-insensitive: + - Ticket 123 + - Bug 123 + - Tracker item 123 + +Multiple bugs can also be specified by separating them with a comma, +apersand, plus or "and": + - Bug 123, 124 and 125 + +If the "Integration Branch" option is filled in, only commits to that branch +will result in bugs being modified. This is useful for disabling premature bug +closing/comments when working on feature branches. + +If "Integration Branch" is not set, commits to *all* branches will be +processed. If you only want to update Bugzilla when you push to your "main" +branch: you probably want to set this to "master". + +If the central repository option is enabled and there is a "fix", +"close", or "address" before the bug then that bug is closed. + +When using the close bug feature you should disable +`commentonchange_resolution` in Bugzilla's configuration. Without this option +disabled when someone set bugs to `RESOLVED FIXED` status it will fail with +the message `You have to specify a comment when changing the Resolution of a +bug from (empty) to FIXED` + +If a commit has already been mentioned in the bug comments when pushed +by another user then a comment isn't made, unless the central repository +option is enabled. In this case only the first line of the commit message +is included in the bug comment. + +This hook requires Bugzilla version >= 3.4 to function correctly +and >= 4.0 to be able to close bugs. diff --git a/docs/campfire b/docs/campfire index 30e578c26..b757a9c12 100644 --- a/docs/campfire +++ b/docs/campfire @@ -1,27 +1,18 @@ -Campfire -======== - Install Notes ------------- 1. subdomain is your campfire subdomain - (ie 'your-subdomain' if you visit 'http://your-subdomain.campfirenow.com') + (ie 'your-subdomain' if you visit 'https://your-subdomain.campfirenow.com') 2. room is the actual room name, not the id 3. token is your API token. get it from campfire's "Edit my Campfire account" screen + 4. master_only is a boolean flag indicating whether only commits to master + should be announced -Developer Notes ---------------- - -data - - subdomain - - token - - room - - ssl - - play_sound + 5. play_sound is a boolean flag indicating whether a sound should be played -payload - - refer to docs/github_payload + 6. sound is the sound that should be played if play_sound is + true. defaults to 'rimshot' diff --git a/docs/cia b/docs/cia index 7a045e1ff..7caef28c6 100644 --- a/docs/cia +++ b/docs/cia @@ -1,17 +1,8 @@ -CIA.vc -======== +1. Disable multiple messages if more than 5 commits are pushed. Instead announce the last commit with "(+## more commits...)" appended to the note. +2. `address` is the optional CIA address, defaults to http://cia.vc +3. `project` is the optional project name, defaults to the Repository name. +4. `branch` lets you specify the branch name, or a template with `%s` to fill the branch name in. +5. `long_urls` enables full URLs instead of shortened URLs. +6. `module` sets the module name in the project. +7. `full_commits` enables sending full commit messages to CIA (as opposed to just the first line). -Install Notes -------------- - - 1. Disable multiple messages if more than 5 commits are pushed. Instead announce the last commit with "(+## more commits...)" appended to the note. - - -Developer Notes ---------------- - -data - - no_spam - -payload - - refer to docs/github_payload diff --git a/docs/codeclimate b/docs/codeclimate new file mode 100644 index 000000000..e2e493af6 --- /dev/null +++ b/docs/codeclimate @@ -0,0 +1,20 @@ +Install Notes +------------- + +To set up this service hook, follow these steps: + +1. Browse to your Code Climate [Dashboard](https://codeclimate.com/dashboard). +2. Click **Organization** in the top-right corner of the page. If this link isn't visible, see below. +3. Select the **Integrations** tab. +4. Copy the **GitHub Service Token** to your clipboard. Note that you do not want to copy the **API Token**. +5. Back in GitHub, paste the token into the text box below. + +### Why don't I see the Organization link in Code Climate? + +Few possible reasons: + +* You're trying to set up a service hook for a repository that lives in the **Open Source** section of your **Dashboard**. Unfortunately we don't yet support service hooks for these repositories. +* Your Code Climate user is not a member of any organizations. +* You're in an organization but not in its **Owners** group. In this case, you unfortunately won't have administrative-rights to view this token. + +For more detailed info, see our [help article](http://docs.codeclimate.com/article/222-how-do-i-install-code-climates-github-service-hook). diff --git a/docs/codereviewhub b/docs/codereviewhub new file mode 100644 index 000000000..74ea34792 --- /dev/null +++ b/docs/codereviewhub @@ -0,0 +1,17 @@ +[CodeReviewHub](https://www.codereviewhub.com) will add these hooks automatically to projects which you enable on www.codereviewhub.com + +GitHub Code Reviews made easy +----------------------------- + +- Keep track of unaddressed comments. +- Keep track of open issues. +- No more lost file comments due to changing diffs! + +Install Notes +------------- + +1. Sign up at https://www.codereviewhub.com with your GitHub account +2. Add your repository +3. You're ready! + +For more details about CodeReviewHub, go to https://www.codereviewhub.com. diff --git a/docs/codeship b/docs/codeship new file mode 100644 index 000000000..960ea7e7a --- /dev/null +++ b/docs/codeship @@ -0,0 +1,19 @@ +Codeship offers continuous integration and deployment for a variety of applications including Ruby, Node, PHP, Python, Java and Go. + +This service hook will inform Codeship every time you push to GitHub. On every push Codeship tests the current version of your application. If all tests succeed, Codeship can also deploy your application, otherwise it informs you about the failures. + +Install Notes +------------- + +Codeship will install this hook automatically on sign up. However, if creating the service didn't succeed or you accidentally deleted it, you can also install it manually. + +1. Sign up at [codeship.com](https://codeship.com) +2. Go to your project's settings, find the General section and copy the project UUID +3. Paste the project UUID into the text field below +4. Make sure the "Active" checkbox is ticked and click "Update service" +5. Click on the "Codeship" service name and then click "Test service" +6. Now there should be a running build on your Codeship dashboard + +Learn more by visiting [codeship.com](https://codeship.com) and our [documentation](https://documentation.codeship.com). + +[Contact us](https://helpdesk.codeship.com) if you need further assistance. diff --git a/docs/commandoio b/docs/commandoio new file mode 100644 index 000000000..6ebef16ac --- /dev/null +++ b/docs/commandoio @@ -0,0 +1,12 @@ +[Commando.io](https://commando.io) A simpler way to manage servers online. Commando.io; your first DevOps hire! + +Install Notes +------------- + + * **API token secret key** - A valid API token secret key. You may create API tokens on the settings page in the Commando.io web interface. + * **Account alias** - Your account alias is simply the subdomain that you access Commando.io with. For example the account alias of `https://foo.commando.io` is `foo`. + * **Recipe** - The recipe you wish to execute. You may find recipe ids in the in the Commando.io web interface. + * **Server** - A single server id. You may find server ids in the modal popup when clicking a server in the Commando.io web interface. + * **Groups** - A list of group ids separated by commas. You may find group ids in the modal popup when clicking a group in the Commando.io web interface. + * **Notes** _(Optional)_ - Notes and comments you wish to attach to this execution. Markdown is supported. + * **Halt on stderr** _(Optional)_ - If a server returns stderr during execution, halt and prevent the remaining servers from executing the recipe. diff --git a/docs/conductor b/docs/conductor new file mode 100644 index 000000000..d675c3d68 --- /dev/null +++ b/docs/conductor @@ -0,0 +1,5 @@ +Install Notes +------------- + 1. **API Key** is from within the Conductor project. (https://conductor-app.com/) + 2. This service will post back all pushes, regardless of whether or not they contain ticket annotations. + 3. Annotations will be parsed for [#xxx] content, where xxx denotes a valid ticket number in the relevant Conductor project diff --git a/docs/copperegg b/docs/copperegg new file mode 100644 index 000000000..089c001e0 --- /dev/null +++ b/docs/copperegg @@ -0,0 +1,12 @@ +Allows you to setup a GitHub repository to create Annotations on git pushes. +Annotations are created like so: + + "GitHub: #{payload['pusher']['name']} has pushed + #{payload['commits'].size} commit(s) to + #{payload['repository']['name']}" + +Install Notes +------------- +1. **API Key** - Your API key. See: Settings tab, Personal Settings: https://app.copperegg.com/ +2. **Tag** - Tag to automatically apply to each created Annotation. +3. **Master Only** - Only create Annotations for pushes to the master branch. diff --git a/docs/crocagile b/docs/crocagile new file mode 100644 index 000000000..5d130425b --- /dev/null +++ b/docs/crocagile @@ -0,0 +1,35 @@ +Crocagile is an agile-inspired workspace that keeps your team together +throughout the entire product life-cycle. Learn more at https://www.crocagile.com + +GitHub integration supports progress updates and time logging for tasks via +commit message using "Updates" and "Time" triggers. Samples below. + + +INSTALLATION +============= + +1. Obtain your Project Key from the settings area of your Crocagile project. +2. Save your project key to the Crocagile Service in your repository. +3. Use commit messages to update tasks. (See samples). +4. Visit https://blog.crocagile.com for friendly documentation. + + +SAMPLES +============= + +Update a task to 60% complete. +-m " Your commit message. Updates T2355=60" + +Update two tasks at once. (No spaces between tasks) +-m " Your commit message. Updates T2355=60,T2660=90" + +Mark a task complete and log time in hours (supports float). +-m " Your commit message. Updates T2355=100 Time T2355=2.5" + +Update multiple progress+time (Spaces permitted between triggers, Not between tasks) +-m "Your commit message. Updates T2355=100,T1039=75 Time T2355=2,T1039=1.5" + +Notes: +"Update T2355" is identical to "Update T2355=100" +"Time T2355" is identical to "Time T2355=1" +Don't forget the "T" ! diff --git a/docs/deployervc b/docs/deployervc new file mode 100644 index 000000000..1b3ad5696 --- /dev/null +++ b/docs/deployervc @@ -0,0 +1,7 @@ +This service hook triggers a deployment on deployer.vc whenever a push is made. + +Install Notes +------------- + + 1. **Deployment Address** - URL of the deployment to be triggered whenever a commit/push occurs, normally in the format `https://.deployer.vc/#/deployment/` + 2. **API Token** - An API token for your deployer.vc account, which can be created under `https://.deployer.vc/#/account` \ No newline at end of file diff --git a/docs/deployhq b/docs/deployhq new file mode 100644 index 000000000..11bf70ab3 --- /dev/null +++ b/docs/deployhq @@ -0,0 +1,14 @@ +DeployHQ is a service which lets you deploy directly +from your GitHub repository to your server via FTP or +SSH/SFTP. + +Install Notes +------------- + +1. **Deploy Hook URL** Should be the automatic deployment URL of the +server you wish to deploy to. You can find this on the +Edit Server or Edit Server Group page in DeployHQ. + +1. **Email Pusher** Specifies whether the person who pushed +the commits should receive an email once a deployment +is completed. diff --git a/docs/divecloud b/docs/divecloud new file mode 100644 index 000000000..3275eedbf --- /dev/null +++ b/docs/divecloud @@ -0,0 +1,9 @@ +DiveCloud integrates Application Performance Testing into the Continuous Integration Cycle by allowing you to run a performance test after each successful deployment. + +When GitHub receives notice that you have successfully deployed your application, it will initiate a performance test based on the test plan you created at https://divecloud.nouvola.com. + +Please enter your API Key and the Plan ID for the plan that you would like to run on successful deployment of your application. + +If you would like to add 'Think Time' to you test, select the 'Think Time' checkbox. + +If your test plan includes credentials, include your credential password in the field below. diff --git a/docs/djangopackages b/docs/djangopackages new file mode 100644 index 000000000..bb77adf46 --- /dev/null +++ b/docs/djangopackages @@ -0,0 +1 @@ +Automatically update commit history as tracked on djangopackages.com. \ No newline at end of file diff --git a/docs/docker b/docs/docker new file mode 100644 index 000000000..4b71ec1c7 --- /dev/null +++ b/docs/docker @@ -0,0 +1,25 @@ +When enabled this will let the Docker Hub know when you have made changes to +your repository. The Docker Hub will then pull down your repository and build +your Dockerfile to create a Docker repository and push it onto the Docker Hub +so that it is available for others to download. When you commit changes to your +git Repo the Docker Hub will keep the Docker Repository up to date. + +#### Note: + +Docker has two types of repositories, public and private. A public repository +is able to be downloaded by anyone. The private repository can only be +downloaded by someone whom the owner has given explicit access too. + +When creating an automated build from a private GitHub repo, it is recommended +that you only use a private Docker repo. If you have a private GitHub +repository and you are building into a public Docker repository, you might be +accidentally exposing data you don't intend to expose. + +#### Requirements: + +In order for this to work correctly, you should have the following: + +1. A [Docker Hub](https://hub.docker.com "Docker Hub") + Account, that is linked to your GitHub account. +2. A [Dockerfile](https://docs.docker.com/reference/builder/ "Dockerfile") + in your project directory. diff --git a/docs/email b/docs/email index 80afa1a32..72a3ce23a 100644 --- a/docs/email +++ b/docs/email @@ -1,17 +1,7 @@ -Email -======== - Install Notes ------------- - 1. address (only one is allowed) - - -Developer Notes ---------------- - -data - - address - -payload - - refer to docs/github_payload +1. `address` whitespace separated email addresses (at most two) +2. `secret` fills out the Approved header to automatically approve the message + in a read-only or moderated mailing list. +3. `send_from_author` uses the commit author email address in the From address of the email. diff --git a/docs/firebase b/docs/firebase new file mode 100644 index 000000000..24d92a3ad --- /dev/null +++ b/docs/firebase @@ -0,0 +1,15 @@ +This service hook adds an object to a given Firebase for every commit. + +The commit will be appended, in-order, to the URL provided in the 'firebase' +configuration option. This is the equivalent of calling: + + new Firebase(firebase).push(commit); + +from the JS library. + +The provided URL must point to a valid Firebase reference, and must be prefixed +with https:// + +If you have secured your Firebase with security rules that prevent anonymous +writes, you may provide the secret to your firebase in the configuration +options. diff --git a/docs/fisheye b/docs/fisheye new file mode 100644 index 000000000..b95c1eb7a --- /dev/null +++ b/docs/fisheye @@ -0,0 +1,18 @@ +Atlassian FishEye is a revision-control browser and search engine. +The GitHub FishEye service can be used to trigger repository scan after code has been pushed to your git repository. + +Requires FishEye 2.10 or later. + +Install Notes +------------- + +1. Your FishEye server must be accessible from the internet + +2. "url_base" is the URL to your FishEye server + Example: http://fisheye.example.com/ or http://fisheye.example.com/fisheye/ + +3. "token" is the REST API token for your FishEye server + It is defined in FishEye Administration > Security Settings > Authentication > REST API Token + +4. "repository_name" is the repository name (optional) + If not set GitHub repository name is used diff --git a/docs/flowdock b/docs/flowdock new file mode 100644 index 000000000..6198c195c --- /dev/null +++ b/docs/flowdock @@ -0,0 +1,16 @@ +Broadcast this project's commits, pull requests, issues, and their +respective comments to Flowdock. + +Install Notes +------------- + + API Token is a flow-specific token. You can find it either in the flow, or in Flowdock's Integrations help page at https://www.flowdock.com/help/integrations. + + Multiple flows may be specified with multiple comma-separated tokens. + + To include certain tags with every message, you can add tags to the tokens. Use + to separate tags. For example, "65f80e994031fcd80f57d1a9e294c1d1d+frontend+web,af8629b07978d1223c9d48d05ff1356+fyi" would add `frontend` and `web` tags to the messages posted to the first flow, and `fyi` to the messages posted to the second flow. + +Configure From Flowdock +----------------------- + + You can also configure hooks from within Flowdock. Those hooks will appear in the `Web Hooks` category of the service hooks. This can be done from the flow’s inbox settings. diff --git a/docs/fog_bugz b/docs/fog_bugz deleted file mode 100644 index 0cc47652e..000000000 --- a/docs/fog_bugz +++ /dev/null @@ -1,74 +0,0 @@ -FogBugz -======= - -Install Notes -------------- - - 1. Requires FogBugz version 6.1 or above, and your FogBugz installation - must be accessible from the internet - - 2. "cvssubmit_url" is the url to the cvsSubmit.[php|asp] file on your - FogBugz server. - Example: https://server.com/fogbugz/cvsSubmit.php - - 3. The "sRepo" field (in FogBugz 6.1) will be automatically set to the name of - this GitHub repository. - - 4. The ixRepository field (in FogBugz 7.0) will be set to the fb_repoid set in the - hooks configuration page - -FogBugz 6.1 Configuration ---------------------- - -If you want to use GitHub as your sole source control system, configuration -within FogBugz is relatively easy. - -In your site configuration: - - 1. Set "the Source Control URL for logs" field to be: - https://github.com/[github_username]/^REPO/commits/^FILE - - 2. Set "the Source Control URL for diffs" field to be: - https://github.com/[github_username]/^REPO/commit/^R2 - -If you have commits in FogBugz from a previous source control system, or if -you want to use multiple GitHub accounts, please read: - -http://www.fogcreek.com/FogBugz/KB/howto/MultipleRepositories-Mult.html - - -FogBugz 7.0 Configuration ---------------- - -FogBugz 7 has a configuration page for multiple repositories. Each repository -is given and ID that will be used by the cvsSubmit.asp page. - - 1. From the admin menu, select Source Control. - - 2. Click 'Create New Repository'. - - 3. An option pane will pop up. Select 'Other (custom)'. Enter a name for - the repository. The name does not have to be the same as the github repo - name. Click Next. - - 4. Set the 'Diff URL' field to be: - https://github.com/[github_username]/[github_reponame]/commit/^R2 - - 5. Set the 'Log URL' field to be: - https://github.com/[github_username]/[github_reponame]/commits/^FILE - - 6. There's a URL printed at the top of the configuration screen. Make - note of the number following ixRepository= That is the ID that needs - to be filled in for the fb_repoid field. - - -Developer Notes ---------------- - -data - - cvssubmit_url - - fb_version (Valid options are 6.1 and 7.0) - - fb_repoid - -payload - - refer to docs/github_payload diff --git a/docs/fogbugz b/docs/fogbugz new file mode 100644 index 000000000..ed0e34b6e --- /dev/null +++ b/docs/fogbugz @@ -0,0 +1,86 @@ +Install Notes +------------- + + 1. Requires FogBugz version 6.1 or above, and your FogBugz installation + must be accessible from the internet + + 2. "cvssubmit_url" is the url to the `cvsSubmit.[php|asp]` file on your + FogBugz server. + Example: https://server.com/fogbugz/cvsSubmit.php + + 3. The "sRepo" field (in FogBugz 6.1) will be automatically set to the name of + this GitHub repository. + + 4. The "ixRepository" field (in FogBugz 7.0 and later) will be set to the fb_repoid set in the + hooks configuration page + +FogBugz 7.0 and later Configuration +--------------- + +FogBugz 7 has a configuration page for multiple repositories. Each repository +is given and ID that will be used by the cvsSubmit.asp page. + + 1. From the admin menu, select Source Control. + + 2. Click 'Create New Repository'. + + 3. An option pane will pop up. Select 'Other (custom)'. Enter a name for + the repository. The name does not have to be the same as the GitHub repo + name. Click Next. + + 4. Set the 'Diff URL' field to be: + `https://github.com/[github_username]/[github_reponame]/commit/^R2` + + 5. Set the 'Log URL' field to be: + `https://github.com/[github_username]/[github_reponame]/commits/^FILE` + + 6. There's a URL printed at the top of the configuration screen. Make + note of the number following ixRepository= That is the ID that needs + to be filled in for the fb_repoid field. + +In the service hook here: + + 1. Set your Cvssubmit Url. + + 2. Set "Fb Version" to the version you are running, e.g. "8". + + 3. Set "Fb Repoid" to the number following "ixRepository=" from step 6 above. + +FogBugz 6.1 Configuration +--------------------- + +If you want to use GitHub as your sole source control system, configuration +within FogBugz is relatively easy. + +In your site configuration: + + 1. Set "the Source Control URL for logs" field to be: + https://github.com/[github_username]/^REPO/commits/^FILE + + 2. Set "the Source Control URL for diffs" field to be: + https://github.com/[github_username]/^REPO/commit/^R2 + +If you have commits in FogBugz from a previous source control system, or if +you want to use multiple GitHub accounts, please read: + +In the service hook here: + + 1. Set your Cvssubmit Url. + + 2. Set "Fb Version" to "6" (without quotes). + + 3. Leave "Fb Repoid" blank. + + + + +Usage +----- + +The commit message will be added as a note to the case. You cannot resolve a case via the commit message. +The hook parses the commit messages for bug ids based on the below syntax. + +Examples: + + * case(s): 12345, 67890, [additional] + * bug(s)ID: 12345, 67890, [additional] diff --git a/docs/freckle b/docs/freckle index 116ff2a92..038ef1e42 100644 --- a/docs/freckle +++ b/docs/freckle @@ -1,27 +1,12 @@ -freckle -======== - Install Notes ------------- -Using the following URL as an example: -https://nutsnbolts.letsfreckle.com +Using the following URL as an example: https://nutsnbolts.letsfreckle.com 1. Account name: subdomain of the freckle account (nutsnbolts) 2. Token: the API token for an individual freckle user who is associated with the target freckle account (see instructions below) 3. Project name: the exact name of the target freckle project to log time for this repo -To get your API token: log into your freckle account, click Settings at the top right, then click the Integration (API) tab. - -Note about email addresses: the email address on a committer's Github account should match his/her email address on his/her freckle account. Otherwise, we can't identify the person who is logging time. - -Developer Notes ---------------- - -data - - subdomain - - token - - project name +To get your API token: log into your freckle account, click Settings at the top right, then click the Integration (API) tab. -payload - - refer to docs/github_payload +Note about email addresses: the email address on a committer's GitHub account should match his/her email address on his/her freckle account. Otherwise, we can't identify the person who is logging time. \ No newline at end of file diff --git a/docs/friend_feed b/docs/friend_feed deleted file mode 100644 index 46ab95ae2..000000000 --- a/docs/friend_feed +++ /dev/null @@ -1,18 +0,0 @@ -FriendFeed -========== - -This service lets your broadcast your commits on FriendFeed. A simple post is made to http://www.friendfeed.com/api/share with your commits. - -Example: 'Arun Thampi just pushed 56436bcdef2342ddfca234234 to github-services on GitHub' -with the comment set as 'Integrated FriendFeed in github-services' - - -Developer Notes ---------------- - -data - - nickname - - remotekey [As specified by http://www.friendfeed.com/remotekey] - -payload - - refer to docs/github_payload diff --git a/docs/gemini b/docs/gemini new file mode 100644 index 000000000..dd8aca7a5 --- /dev/null +++ b/docs/gemini @@ -0,0 +1,11 @@ +IT'S ABOUT TRACKING +Gemini is the all-in-one Tracker that works beautifully for any kind of project, team or process. +Every task, initiative, bug, issue, enquiry, change request and ticket in one place. + +This GitHub integration works with Gemini v5.1.2+. + +Install Notes +------------- + +* Create an API Key(GUID) in your Web.config file for the key "gemini.apikey". +* "gemini_url" is YOUR Gemini instance i.e "http://gemini.countersoft.com". diff --git a/docs/gemnasium b/docs/gemnasium new file mode 100644 index 000000000..abd355a38 --- /dev/null +++ b/docs/gemnasium @@ -0,0 +1,10 @@ +Gemnasium notifies you when new versions are released for your GitHub repositories' gem dependencies. + +---- + +1. Enter your GitHub name +2. Create an account on [gemnasium.com](http://gemnasium.com/) +3. Enter your API key (from [gemnasium.com/account](http://gemnasium.com/account)) +4. Check "Active" +5. Click "Update Settings" + diff --git a/docs/getlocalization b/docs/getlocalization new file mode 100644 index 000000000..5a2dcd04a --- /dev/null +++ b/docs/getlocalization @@ -0,0 +1,9 @@ +1. Project name is your project name in Get Localization URL e.g: + + Given this URL: + + http://www.getlocalization.com/Example/ + + Your project name is "Example" + +2. Project token is available at your project settings if you've GitHub support enabled. diff --git a/docs/github_payload b/docs/github_payload index 044263fc0..dc98ff9e3 100644 --- a/docs/github_payload +++ b/docs/github_payload @@ -1,15 +1,21 @@ # example params hash sinatra receives -{ +{ "data" => { - "username" => "foo", - "password" => "bar" + "api_version" => "2.0.alpha1", + "username" => "jamie.winsor", + "password" => "passw0rd", + "server_url" => "http://jira" }, "payload" => { - "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", - "ref" => "refs/heads/master", - "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "http://github.com/mojombo/grit/compare/4c8124ffcf4039d292442eeccabdeca5af5c5017...a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "forced" => false, + "created" => false, + "deleted" => false, "repository" => { "name" => "grit", @@ -17,18 +23,24 @@ "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" } }, + "pusher" => { + "name" => "rtomayko" + }, + "commits" => [ { + "distinct" => true, "removed" => [], - "message" => "stub git call for Grit#heads test", + "message" => "[#WEB-249 status:31 resolution:1] stub git call for Grit#heads test", "added" => [], "timestamp" => "2007-10-10T00:11:02-07:00", "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, "id" => "06f63b43050935962f84fe54473a7c5de7977325" - }, + }, { + "distinct" => true, "removed" => [], "message" => "clean up heads test", "added" => [], @@ -39,6 +51,7 @@ "id" => "5057e76a11abd02e83b7d3d3171c4b68d9c88480" }, { + "distinct" => true, "removed" => [], "message" => "add more comments throughout", "added" => [], @@ -51,3 +64,4 @@ ] } } + diff --git a/docs/gitter b/docs/gitter new file mode 100644 index 000000000..85b8433a7 --- /dev/null +++ b/docs/gitter @@ -0,0 +1,23 @@ +Chat rooms for your public and private repos with awesome GitHub integration. + +https://gitter.im + +If you want to see detailed repo activity in your room, follow this steps: + + - Click the **Settings Cog** on the top right + - Click on **Integrations** + - Select **GitHub** + - Click on **configure manually** option + - Copy and paste the provided token here + +Install Notes +------------- + +1. **Token** - Gitter token for this repo + +Options + +2. **Mute Fork** - Mute fork notifications. +3. **Mute Watch** - Mute watch notifications. +4. **Mute Comments** - Mute issue and pull request comments. +5. **Mute Wiki** - Mute wiki changes. diff --git a/docs/gocd b/docs/gocd new file mode 100644 index 000000000..baff0c10e --- /dev/null +++ b/docs/gocd @@ -0,0 +1,21 @@ +[Go](http://go.cd) (also GoCD) is a Continuous Integration (CI) and Continuous Delivery (CD) server. + +The GitHub GoCD service can be used to trigger builds when changes are pushed to the corresponding GitHub repository. +This is a replacement for the polling method, where the Go server periodically polls the repositories for changes. + +Install Notes +------------- + +1. Your Go server must be accessible from the internet. + +2. "base_url" (mandatory) is the URL to your Go server + Example: https://go.example.com/ or http://go.example.com:8153 + +3. "repository_url" (mandatory) is the URL that is configured in the Materials section of the concerned pipelines. + Example: git@github.com:gocd/gocd.git or git://github.com/gocd/gocd + +4. "username" and "password" - username and password of a Go admin user that can + trigger the Materials API endpoint. Can be left empty if the Go server has no authentication configured (not recommended.) + +5. "verify_ssl" is used to enable (recommended) or disable certificate checking when using ssl. + Disabling this can make the ssl connection insecure. diff --git a/docs/grove b/docs/grove new file mode 100644 index 000000000..1f477db64 --- /dev/null +++ b/docs/grove @@ -0,0 +1,7 @@ +This delivers updates to your GitHub repository to Grove.io's IRC channels. +Events include Git pushes, issues, wiki changes, and comments. + +Install Notes +------------- + + `channel_token` - Channel's unique token which can be found from channel settings (available for organization owners) diff --git a/docs/habitualist b/docs/habitualist new file mode 100644 index 000000000..1836ae1d9 --- /dev/null +++ b/docs/habitualist @@ -0,0 +1 @@ +Automatically log commit activity against actions on https://habitualist.com diff --git a/docs/harvest b/docs/harvest new file mode 100644 index 000000000..c26cd04ff --- /dev/null +++ b/docs/harvest @@ -0,0 +1,4 @@ +Install Notes +------------- + +1. Applies the status to the currently clocked in project. Future updates are expected to include more versatility. diff --git a/docs/herokubeta b/docs/herokubeta new file mode 100644 index 000000000..ab018eb36 --- /dev/null +++ b/docs/herokubeta @@ -0,0 +1,17 @@ +[heroku](https://heroku.com) is a hosting platform with support for a large number of languages. + +By enabling this hook, GitHub will request a [heroku build](https://devcenter.heroku.com/articles/platform-api-reference#build-create) that pushes your code to a named heroku application when a [deployment event](https://developer.github.com/webhooks/#events) is received. + +To trigger deployment events you'll need to [create a deployment](https://developer.github.com/v3/repos/deployments/#create-a-deployment) with the API. + +There's a [hubot-deploy](https://github.com/atmos/hubot-deploy) script that allows you to deploy from chat. Heroku has various options for [deploy hooks](https://devcenter.heroku.com/articles/deploy-hooks) to give you feedback. + +The [auto-deployment](http://www.atmos.org/github-services/auto-deployment/) service exists for creating deployments automatically on push and successful CI runs. + +Install Notes +------------- + +1. `name` The application name on heroku to deploy to. +2. `heroku_token` A user or [direct authorization](https://devcenter.heroku.com/articles/oauth#direct-authorization) token from heroku. +3. `github_token` A [personal access token](https://github.com/settings/applications) from GitHub with the `repo` scope. We generate an [archive link](https://developer.github.com/v3/repos/contents/#get-archive-link) for the heroku API with it. +4. `github_api_url` The URL for the GitHub API. Override this for enterprise. **Optional** e.g. `https://enterprise.myorg.com`. diff --git a/docs/hipchat b/docs/hipchat new file mode 100644 index 000000000..d2811a916 --- /dev/null +++ b/docs/hipchat @@ -0,0 +1,27 @@ +Note: Atlassian provides its own native integration for GitHub. We recommend +using the Atlassian integration, as opposed to this GitHub provided service. +Read more here: https://hipchat.com/addons/github-for-hipchat + +This service currently enables all of the available hook events including +commit comments, downloads, forks, fork applies, wiki updates, issues, issue +comments, member adds, pull requests, pushes, and watches. A full list with +descriptions can be found here: https://developer.github.com/v3/repos/hooks/ + +Install Notes +------------- + +1. **Auth Token** - One of your group's API tokens. See: http://www.hipchat.com/docs/api/auth +2. **Room** - The full name of the room to send the message to. The room's room_id will also work. +3. **Restrict to Branch** - List of branches to which will be inspected. +4. **Color** - Optional background color for the message. Available options are: yellow, red, green, purple, gray, or random. Defaults to yellow. +5. **Server** - If you use a self-hosted HipChat server, enter the name of your server here, e.g. chat.example.com. Defaults to api.hipchat.com. + +Options +1. **Notify** - Whether or not to notify room members. +2. **Quiet Fork** - Suppress the room notice if a project has been forked. +3. **Quiet Watch** - Suppress the room notice that someone has started to watch the project. +4. **Quiet Comments** - Suppress the room notice if a comment has been made on repo. +5. **Quiet Labels** - Suppress the room notice if an issue has had any label changes. +6. **Quiet Assigning** - Suppress the room notice if an issue has been assigned or unassigned. +7. **Quiet Wiki** - Suppress the room notice if a wiki item has been updated. +8. **Active** - Turn On or Off the service hook. diff --git a/docs/hostedgraphite b/docs/hostedgraphite new file mode 100644 index 000000000..a05bc4478 --- /dev/null +++ b/docs/hostedgraphite @@ -0,0 +1,10 @@ +Hosted Graphite is a time-series database for application and performance monitoring. +Integrating it with GitHub gives you a realtime view of the commits happening on your codebase. +See http://www.hostedgraphite.com/ for more information. + +Install Notes +------------- + +1. API Key - Add your API key from your Hosted Graphite account page, located at https://www.hostedgraphite.com/accounts/profile/ +2. Bingo! GitHub will send details of each commit to your Hosted Graphite account. + diff --git a/docs/huboard b/docs/huboard new file mode 100644 index 000000000..7b87f86a5 --- /dev/null +++ b/docs/huboard @@ -0,0 +1,9 @@ +Instant project management for you GitHub repositories + +See: https://huboard.com + +HuBoard is built from the ground up using the GitHub public API. HuBoard issues **are** GitHub issues, you will never +have to deal with synchronization problems. Keep you issues where they belong, in the repository with you code. + +By enabling GitHub's Service Hook integration, HuBoard keeps your agile boards up to date by sending events that occur +on GitHub directly to HuBoard. diff --git a/docs/humbug b/docs/humbug new file mode 100644 index 000000000..7af7b0f03 --- /dev/null +++ b/docs/humbug @@ -0,0 +1,24 @@ +Install Notes +------------- + +Zulip is a group communication tool. + +https://zulip.com/hello + +Configuration Fields +-------------------- + +1. **Email** - The user to authenticate as. +2. **Api Key** - The API key associated with the provided user. See: https://zulip.com/#settings +3. **Stream** - The default Zulip stream where event notifications will be sent. Defaults to "commits" if left empty. The stream (or the "commits" stream if empty) must exist in Zulip. +4. **Commit Stream** - Overrides **Stream** for Git commit notifications. The stream must exist in Zulip. +5. **Issue Stream** - Overrides **Stream** for GitHub issues notifications. The stream must exist in Zulip. +6. **Branches** - A comma-delimited whitelist of branches to receive event notifications about (e.g., "master,staging,prod"). If empty, event notifications will be sent about all branches. +7. **Alternative Endpoint** - Specify the full URL for the Zulip server's GitHub endpoint (e.g., https://zulip.example.com/api/v1/external/github). If empty, the integration will talk to zulip.com. + +Checkboxes +---------- + +1. **Exclude Pull Requests** - Don't send GitHub pull request notifications to Zulip. +2. **Exclude Issues** - Don't send GitHub issues notifications to Zulip. +3. **Exclude Commits** - Don't send Git commit notifcations to Zulip. diff --git a/docs/ibmdevopsservices b/docs/ibmdevopsservices new file mode 100644 index 000000000..cdd20c818 --- /dev/null +++ b/docs/ibmdevopsservices @@ -0,0 +1,18 @@ +This service replaces the Rational JazzHub service to integrate GitHub with IBM Bluemix DevOps Services (http://hub.jazz.net). The hook automatically adds change set links in the work item specified by the commit message. + +The hook will recognize any of the common work item type names in the commit message and look for a corresponding work item. + +For example: + - "Fix bug 42" + - "Deliver Story 99" + - "[work item 999] fixed some stuff" + +Install Notes +------------- + +The IBM Bluemix DevOps Services hook needs to be configured with your DevOps Services login info: + +1. Ibm - The user ID that is used to access DevOps Services. +2. Ibm password - The password for the user ID that is used to access DevOps Services. If your organization uses federated authentication, you must use a personal access token. See [Setting up the GitHub hook](https://hub.jazz.net/docs/githubhooks/#github_hook) for details. +3. Project membership - The configured user needs to be a member of the DevOps Services project. +4. Override server url - The DevOps Services server url (for IBM internal testing only). diff --git a/docs/icescrum b/docs/icescrum new file mode 100644 index 000000000..8cbfb36d9 --- /dev/null +++ b/docs/icescrum @@ -0,0 +1,20 @@ +iceScrum is a an open source web application for using Scrum while keeping the spirit of a collaborative workspace. It also offers virtual boards with post-its for sprint backlog, product backlog and others. You can use iceScrum on your own server or in the cloud (SaaS) with Kagilum. + +Integrating with GitHub will allow you to associate Git commits to specific tasks. If you add a task number (ID) to your commit message, iceScrum Pro will associate the commit with the task. + +For example, if you add the text 'T76' to your commit message, iceScrum Pro will attach the commit to task 76 and move the task to in Progress column in the Sprint Plan. One or more TXX in the same commit message. You can also update the remaining time on the task if you write : 'T76-4' : iceScrum will update the remaining time to 4 hours for the task 76. + +This allows your team to stay up to date on the latest development work and view a history of commits for each story / task. + +More information on iceScrum : http://www.icescrum.org +More information on iceScrum : https://www.kagilum.com/icescrum-pro/ +More information on Kagilum : https://www.kagilum.com + +Install Notes +------------- + +1. **project_key** - This is your iceScrum Project key. +2. **username** - Username of one team member in the project (such as the ScrumMaster). +3. **password** - Password of one team member in the project. +4. **base_url** - Base_url is the url where your iceScrum is alive (http://www.example.com/icescrum). This input is optional. If not set, "https://www.kagilum.com/a" will be used for iceScrum Cloud customers. + diff --git a/docs/irc b/docs/irc index 1a126ee90..a3773eefd 100644 --- a/docs/irc +++ b/docs/irc @@ -1,29 +1,125 @@ -IRC -======== +Example +------- -Install Notes -------------- +For [freenode](https://freenode.net/): - 1. server (ie. irc.freenode.net) - 2. port is normally 6667 / 9999 for ssl - 3. the room field can support multiple rooms (comma separated) - 4. the password field is for the server password - 5. room passwords can be specified for each room like this: - room_name::password - 6. prefixing '#' to the room field is optional - 7. nick is not required, if provided the IRCBot will use that nick +- Server: `chat.freenode.net` +- Room: `#CHANNELNAME` +- Message without join: _yes_ +- Notice: _yes_ +- Active: _yes_ +Remember to allow [external messages](#message-without-join) and [colors](#no-colors) in the channel: -Developer Notes +``` +/msg ChanServ set #CHANNELNAME mlock -nc +``` + + +Usage +----- + +### Server + +IRC server address. + +> For freenode, use `chat.freenode.net` + + +### Port + +Port to use when connecting to the IRC server (optional). + +Default ports are `6667` (no SSL), and `6697` (SSL). + +> [freenode servers](https://freenode.net/irc_servers.shtml) listen on `6665`, `6666`, `6667`, `8000`, `8001`, and `8002` (no SSL and SSL), and `6697`, `7000`, and `7070` (SSL only). + + +### Room + +IRC channel (or channels) to which messages will be sent. + +Supports single or multiple channels (comma separated). Also supports channel passwords (`CHANNELNAME::PASSWORD`). Prefixing the channel name with `#` is optional. + + +### Nick + +Nickname to use when sending messages (optional). + + +### Branches + +Names of the git branches (or refs) to monitor for events (comma-separated). + + +### Nickserv password + +Password for the IRC server’s [NickServ](http://en.wikipedia.org/wiki/Internet_Relay_Chat_services) (optional). + +> For freenode, see the [nickname setup instructions](https://freenode.net/faq.shtml#nicksetup). + + +### Password + +Password for the IRC server (optional). + + +### Ssl + +Enables connecting to the IRC server via SSL. + + +### Message without join + +Enables sending messages to the channel without joining the channel first. + +_Recommended_, as it decreases channel noise. Requires the IRC channel to allow external messages. + +> On freenode, allow external messages to the channel by messaging [ChanServ](https://freenode.net/services.shtml): +> +> ``` +> /msg ChanServ set #CHANNELNAME mlock -n +> ``` +> +> On most other IRC networks, set the channel mode directly: +> +> ``` +> /mode #CHANNELNAME -n +> ``` + + +### No colors + +Disables colors in messages. + +_Enabling_ colors in messages may require the IRC channel to allow colors. + +> On freenode, allow colors in the channel by messaging ChanServ: +> +> ``` +> /msg ChanServ set #CHANNELNAME mlock -c +> ``` + + +### Long url + +Enables including full URLs in messages. When disabled, [git.io](https://git.io/) URLs will be used. + + +### Notice + +Enables sending IRC notices instead of regular messages. + +_Recommended_, as it decreases channel noise. + + +Troubleshooting --------------- -data - - server - - port - - room - - password - - ssl - - nick +Diagnostic information can be retrieved from GitHub with an HTTP request. + +Use your GitHub `USERNAME` and `PASSWORD` to authenticate, and specify the appropriate repository with `REPOUSER` and `REPONAME`. -payload - - refer to docs/github_payload +``` +curl -i -u 'USERNAME:PASSWORD' https://api.github.com/repos/REPOUSER/REPONAME/hooks +``` diff --git a/docs/irker b/docs/irker new file mode 100644 index 000000000..ec065a943 --- /dev/null +++ b/docs/irker @@ -0,0 +1,9 @@ +1. `address` is the irker service address. +2. `channels` is the channel or list of channels the commit notification should be posted to. Format is irc://chat.freenode.net/#commits. Multiple urls should be semicolon (;) separated. +3. `project` is the optional project name, defaults to the Repository name. +4. `branch` lets you specify the branch name, or a template with `%s` to fill the branch name in. +5. `long_urls` enables full URLs instead of shortened URLs. +6. `module` sets the module name in the project. +7. `color` adds mIRC color codes to the message. +8. `full_commits` sends multiple messages to show up to 5 lines of the commit message. + diff --git a/docs/ironmq b/docs/ironmq new file mode 100644 index 000000000..5b866bb91 --- /dev/null +++ b/docs/ironmq @@ -0,0 +1,11 @@ +Posts all of your GitHub events to IronMQ so you can process the events asynchronously. This can also be used as a safe +buffer between GitHub and your application so you never miss a GitHub event. + +For more information about IronMQ, see [www.iron.io](http://www.iron.io). + +Install Notes +------------- + +1. **token** - Your Iron.io OAuth token. Get yours at: http://hud.iron.io/tokens +2. **project_id** - The Iron.io project ID you you'd like to use. +3. **queue_name** - The name of the queue to post to. diff --git a/docs/ironworker b/docs/ironworker new file mode 100644 index 000000000..8d9a57fbb --- /dev/null +++ b/docs/ironworker @@ -0,0 +1,10 @@ +Posts all of your GitHub events to IronWorker so you can write IronWorker scripts for testing and deploying applications. + +For more information about IronWorker, see [www.iron.io](http://www.iron.io). + +Install Notes +------------- + +1. **token** - Your Iron.io OAuth token. Get yours at: http://hud.iron.io/tokens +2. **project_id** - The Iron.io project ID you you'd like to use. +3. **code_name** - The name of the worker code to post to. diff --git a/docs/jabber b/docs/jabber index b286d6f54..a56ec9cb2 100644 --- a/docs/jabber +++ b/docs/jabber @@ -1,16 +1,5 @@ -Jabber -====== - Install Notes ------------- - 1. user is the Jabber ID (e.g.: myusername@jabber.org). Multiple users can be added by separating them with commas. Currently, there is a maximum of 25 users. - -Developer Notes ---------------- - -data - - user - -payload - - refer to docs/github_payload + 1. **User** is the Jabber ID (e.g.: myusername@jabber.org). Multiple users can be added by separating them with commas. Currently, there is a maximum of 25 users. Add `github-services@jabber.org` to receive notifications. + diff --git a/docs/jaconda b/docs/jaconda new file mode 100644 index 000000000..d479e715a --- /dev/null +++ b/docs/jaconda @@ -0,0 +1,12 @@ +Install Notes +------------- + +Pushes all Hooks for this Repository to Jaconda (Pushes, Issues, Pull Requests, etc). + +Using the following url as an example: +https://bigbang.jaconda.im/rooms/galaxo + +1. Subdomain is bigbang +2. Room ID is galaxo +3. Room token can be found on the Room Integration page +4. if Digest is checked, all commits will be compressed in one message diff --git a/docs/jenkins b/docs/jenkins new file mode 100644 index 000000000..56487398a --- /dev/null +++ b/docs/jenkins @@ -0,0 +1,12 @@ +[Jenkins](http://jenkins-ci.org/) is a popular continuous integration server. + +Using the Jenkins GitHub Plugin you can automatically trigger build jobs when +pushes are made to GitHub. + +Install Notes +------------- + + 1. "Jenkins Hook Url" is the URL of your Jenkins server's webhook endpoint. For + example: `http://ci.jenkins-ci.org/github-webhook/`. + +For more information see . diff --git a/docs/jenkinsgit b/docs/jenkinsgit new file mode 100644 index 000000000..0d351a3d8 --- /dev/null +++ b/docs/jenkinsgit @@ -0,0 +1,28 @@ +Install Notes +------------- + +* Requires **[Git Plugin][wiki] v1.1.18**, released 2012-04-27, and the "Poll SCM" + build trigger needs to be enabled. (Though you can have it poll very + infrequently, I recommend something like `0 */3 * * *`) +* "Jenkins Url" is the base URL of your [Jenkins][] server. For example: + `http://ci.jenkins-ci.org/`. We will hit `/git/notifyCommit` under this URL. (See + [the Git plugin wiki page][wiki-push] for more details.) + +Details +------- + +[Jenkins][] is a popular continuous integration server. + +If you're using the standard [Jenkins Git plugin][wiki] to poll & check out +your repository, you can quickly and easily switch to a push model using this +service. + +It will send a request to your Jenkins instance telling it about the +repositories and branches that changed. Jenkins will then poll the repository +and build if needed. See [push notification from repository][wiki-push] on the +Jenkins wiki for information. + +[jenkins]: http://jenkins-ci.org/ "Jenkins CI Server" +[wiki]: https://wiki.jenkins-ci.org/display/JENKINS/Git+plugin +[wiki-push]: https://wiki.jenkins-ci.org/display/JENKINS/Git+plugin#GitPlugin-Pushnotificationfromrepository + diff --git a/docs/jira b/docs/jira new file mode 100644 index 000000000..1ff7b7d4d --- /dev/null +++ b/docs/jira @@ -0,0 +1,26 @@ +This service hook allows you to transition JIRA tickets using the REST API available in +version 4.2+ of JIRA. To interact with tickets in JIRA you will need to place markup +similar to Lighthouse's in your commit message. + + Fixed an annoying bug [#WEB-210 transition:31 resolution:1] + +This will perform transition 31 with a resolution code of 1 on the issue WEB-210. You can specify +any key value pair with the `key:value` notation, but at the very least transition must be present. + +NOTE: As of 2.0.alpha1, the REST API will not automatically interpret strings into integers and vice +versa. + +Install Notes +------------- + +A user in JIRA will need to be created for GitHub. It should be given full +access to all projects. + +Using the following url as an example: + + http://jira.enmasse.com/rest/2.0.alpha1/issue/WEB-249 + +1. http://jira.enmasse.com is the server_hostname +2. 2.0.alpha1 is the api_version +3. username of the GitHub user in JIRA +4. password of the GitHub user in JIRA diff --git a/docs/kanbanery b/docs/kanbanery new file mode 100644 index 000000000..f97deacb6 --- /dev/null +++ b/docs/kanbanery @@ -0,0 +1,5 @@ +Install Notes +------------- + +1. project token - Your project GitHub token from Kanbanery +2. project id diff --git a/docs/kanbanize b/docs/kanbanize new file mode 100644 index 000000000..2b3a2b963 --- /dev/null +++ b/docs/kanbanize @@ -0,0 +1,9 @@ +Install Notes +------------- + +1. **Kanbanize domain name** - Your project Kanbanize domain name Ex: **mycompany.kanbanize.com** +2. **Kanbanize api key** - The API key of a Kanbanize user account. We recommend using a dedicated Administrator user or a standard user (e.g. GitHub_user) with permissions to access, comment and modify cards on the desired boards. +3. **Branch Filter** - A Comma-separated list of branches which will be automatically inspected. Leave blank to include all branches. +4. **Restrict to Last Commit** - Only the last commit of each push will be inspected for task IDs. +5. **Track Project Issues In Kanbanize** - Open/Move to Done a card when a project issue is Open/Closed +6. **Project Issues Board Id** - The ID of the board that must keep the project issue cards. You can see the board ID on the Kanbanize dashboard screen, next to the board name. diff --git a/docs/landscape b/docs/landscape new file mode 100644 index 000000000..8ec335c0f --- /dev/null +++ b/docs/landscape @@ -0,0 +1,15 @@ +Landscape is a continuous code quality inspector for Python projects. + +By enabling this hook, Landscape will listen for pushes and on each push, instigate a new code check. + +Install Notes +------------- + +Landscape will automatically install this hook, there is no need to do it manually. + +To install: + +1. Create an account at https://landscape.io (you can sign in with GitHub) +2. Enable checking on a repository. The hook will be automatically installed. + +For more information about Landscape, see https://docs.landscape.io/ diff --git a/docs/leanpub b/docs/leanpub new file mode 100644 index 000000000..a0744520f --- /dev/null +++ b/docs/leanpub @@ -0,0 +1,9 @@ +This service starts a preview of your book on Leanpub whenever a push is made to your repository. + +Required values are: + +api_key: Your Leanpub api_key, which you can find at https://leanpub.com/author_dashboard/settings. + +slug: The slug for your book. This is the part of the URL for your book after https://leanpub.com/. For example, for https://leanpub.com/lean, the slug is lean. + +See https://leanpub.com/help/api for more information on the Leanpub API. diff --git a/docs/lighthouse b/docs/lighthouse index 1600498ce..76f839f05 100644 --- a/docs/lighthouse +++ b/docs/lighthouse @@ -1,29 +1,15 @@ -Lighthouse -======== - Install Notes ------------- Using the following url as an example: http://logicalawesome.lighthouseapp.com/projects/8570-github/overview - 1. subdomain is logicalawesome - 2. project_id is 8570 - 3. this service only supports project tokens + 1. **Subdomain** is logicalawesome + 2. **Project Id** is 8570 + 3. This service only supports project tokens (accepting patches for user-based tokens) - 4. 'private' determines whether changed files - should be displayed (useful for public LH + 4. **Private** determines whether changed files + should be displayed (useful for public LH accounts and private GH repos) - - -Developer Notes ---------------- - -data - - subdomain - - project_id - - token - - private - -payload - - refer to docs/github_payload + 5. **Send Only Ticket Commits** ensures that the only commits sent to + Lighthouse are ones with Lighthouse ticket codes. diff --git a/docs/lingohub b/docs/lingohub new file mode 100644 index 000000000..d29104c3f --- /dev/null +++ b/docs/lingohub @@ -0,0 +1,8 @@ +Start localizing your software to increase market share and improve customer satisfaction. +Localization is simple with lingohub. Be Global, Go Local! + +Install Notes +------------- + +1. Please enter your Project Token found in your project settings page. +2. Now edit your 'Watch Patterns on the 'Imports/Edit your repository settings' page. Only files that contain translations for your master locale should be included in the given regular expression. diff --git a/docs/mantisbt b/docs/mantisbt new file mode 100644 index 000000000..5b3f6454e --- /dev/null +++ b/docs/mantisbt @@ -0,0 +1,7 @@ +Install Notes +------------- + +Requires the Source Integration plugins from http://leetcode.net/projects/source-integration/ + + 1. Base URL to MantisBT install + 2. Secret API Key set at http://yoursite/mantis/plugin.php?page=Source/manage_config_page \ No newline at end of file diff --git a/docs/maxcdn b/docs/maxcdn new file mode 100644 index 000000000..964b3c5d8 --- /dev/null +++ b/docs/maxcdn @@ -0,0 +1,16 @@ +Purge your MaxCDN Pull Zone +--------------------------- + +**Setup Notes** + + 1. Get your "Company Alias", "Consumer Key" and "Consumer Secret" from your [MaxCDN Account API Page][account_api_url]. + 2. Get your "Zone ID" from your [MaxCDN Account Pull Zones Overview page][account_pull_zone]. + 3. "Static Only" will only purge your zone if modified files include static files — `css`, `js`, `jpg`, `jpeg`, `gif`, `ico`, `png`, `bmp`, `pict`, `csv`, `doc`, `pdf`, `pls`, `ppt`, `tif`, `tiff`, `eps`, `ejs`, `swf`, `midi`, `mid`, `txt`, `ttf`, `eot`, `woff`, `otf`, `svg`, `svgz`, `webp`, `docx`, `xlsx`, `xls`, `pptx`, `ps`, `rss`, `class`, `jar`. + 4. Whitelist the GitHub web hook IP block with MaxCDN. For instructions, see MaxCDN's support page on [How To Whitelist Your Server IP To Use The API][whitelist_article]. + +> GitHub's IPs may change from time to time, if you're having issues, verify that the IP you've whitelisted is still current, by checking the "hook" key at [GitHub's "meta" API endpoint][meta_endpoint]. + +[account_api_url]: https://cp.maxcdn.com/account/api +[account_pull_zone]: https://cp.maxcdn.com/zones/pull +[whitelist_article]: http://support.maxcdn.com/tutorials/how-to-whitelist-your-server-ip-to-use-the-api/ +[meta_endpoint]: https://api.github.com/meta diff --git a/docs/mqttpub b/docs/mqttpub new file mode 100644 index 000000000..8d927b2f8 --- /dev/null +++ b/docs/mqttpub @@ -0,0 +1,16 @@ +This service lets you publish push and commit messages to a message broker via the MQTT protocol. + +Install Notes +------------- + +1. OPTIONAL. 'broker' is the hostname of the MQTT broker (default is q.m2m.io). +2. OPTIONAL. 'port' is the port to connect (default is 1883, MQTT standard). +3. 'topic' is the name of the topic to publish on. Suggested example: 'github/{github_username}/{repo_name} . +4. OPTIONAL. 'clientid' is the unique client ID which publishes the payload message (default is a prefixed epoc time long, e.g. "github_1336363787"). +5. OPTIONAL. 'user' is the v3.1 username (default is none). +6. OPTIONAL. 'pass' is the v3.1 password (default is none). +7. OPTIONAL. 'retain' specifies whether or not the publication should be retained as the last/most recent message for new subscribers. +8. The payload of the message is JSON received from GitHub (refer to docs/github_payload). +9. ruby-mqtt only supports QoS 0. +10. For testing, you can use mqtt.io as your web MQTT client. broker: q.m2m.io, port: 1883, clientid: {github_username}. You will "Subscribe to Topics": 'github/{github_username}/{repo_name}'. Unauthenticated username/password sets default to the public channel! + diff --git a/docs/myget b/docs/myget new file mode 100644 index 000000000..8407e9215 --- /dev/null +++ b/docs/myget @@ -0,0 +1,19 @@ +MyGet allows you to create and host your own NuGet feed. Include packages from +the official NuGet feed or upload your own NuGet packages. We can also compile +and package your source code from GitHub, BitBucket, CodePlex and more! + +The GitHub MyGet service can be used to trigger builds after changes have been +pushed to your GitHub repository. + +Install Notes +------------- + +1. Login to https://www.myget.org. If you are on the Enterprise plan, + login through that URL instead. + +2. Navigate to the feed's build services setup for which you want to + automatically trigger builds when changes have been pushed to GitHub. + +3. For the build, copy the Hook (HTTP POST) URL into the Hook URL field. + +4. Show your love for MyGet and include the Status badge in your README.md diff --git a/docs/obs b/docs/obs new file mode 100644 index 000000000..7cbe7be0d --- /dev/null +++ b/docs/obs @@ -0,0 +1,45 @@ +# Open Build Service + +[Open Build Service (OBS)][obs] is a Web service for building packages for various Linux distributions. It's run by OpenSUSE project but available for any open-source community. + +This hook enables you to trigger your OBS build once new commits are pushed into the repository. It is configured to use *api.opensuse.org* host by default, but you may use it for your own OBS instance as well. It must be version 2.5 or higher, though. + +[obs]: http://build.opensuse.org + +## Prerequisites + +1. Configure your OBS project to fetch sources from Git. You would have to add a *Source Service* for this to work, check OBS manual for more information. + +2. Create an authentification token for your account using `osc` command line tool. + For a generic token not tied to the specific package: + + # osc token --create + + For a token which can be used only for specific package + + # osc token --create PROJECT PACKAGE + + In the former case you may use single token in multiple Web hooks, to trigger multiple projects, but you would have to specify those OBS project and repository names. If the latter case you have to use different tokens for different projects, but you may leave "Project" and "Package" fields blank here, simply using the token only is enough. + + To see all your already-created tokens, run + + # osc token + + You may also use a comma-separated list of tokens to trigger several OBS builds in order. + +## Parameters + + - `Url` + This is the URL where OBS instance resides. You should alter this parameter only if you're using a dedicated OBS instance, leave it empty if you just use OpenSUSE's server. + + - `Project` + The package fully-qualified name on the instance. This should be something like `devel:languages:haskell`, where `devel:languages` is a namespace part of name. You may leave this field blank if your token is project-specific. + + - `Package` + The package name within the project. This should be something like `ghc` for the example above. You may also leave this field blank if your token is project-specific. + + - `Token` + The comma-separated list of tokens to be used for triggering builds. This is the only required field here. See the "Prerequisites" section for more information on token creation. + + - `Refs` + The filter expression for pushed referenced. This field lists colon-separated patterns, build is triggered only if at least one of them satisfies. You may leave it blank, then no filtering is done by default. But you should consider setting this field to something like `refs/heads/master` or `refs/tags/version-*` in order not to rebuild your packages on each commit. diff --git a/docs/ontime b/docs/ontime new file mode 100644 index 000000000..afa7c0900 --- /dev/null +++ b/docs/ontime @@ -0,0 +1,45 @@ +Install Notes +------------- + +In order to properly configure OnTime and GitHub to work together a few settings have to be configured. + +1. Log into your OnTime v11.1+ installation as the Administrator or with a user that has System Options privledges. + +2. Open up the "Tools" menu and click on "System Options" and then go to the "GitHub Integration" option in the left pane. + +3. Make sure that "Enable GitHub Integration" is checked and that an API Key exists. If it doesn't then click "Generate a New API Key" to make one + +4. Copy the API key and paste that into the OnTime service hook in your GitHub repository. + +NOTE: If you have a non-hosted installation of OnTime your installation must have access to the internet. Hosted accounts already have internet access. + +Usage +----- + +When entering in commit messages in Git, any message that contains a specially formatted OnTime tag will attempted to be linked to the respective OnTime item. The tag is formatted as follows: + + [otx: id# (wl: # timeunit)] + +* Where the `x` in `otx` can be: + * `d` for defects (i.e. `otd`) + * `f` for features (i.e. `otf`) + * `t` for tasks (i.e. `ott`) + * `i` for incidents (i.e. `oti`) + * NOTE: d, f, t and i are constant even if you've renamed the fields in your OnTime installation. +* `id#` is the id number of the item that the commit links to +* `wl: # timeunit` is optional. When provided it will add a worklog entry to that item after the commit is pushed to github. + * `#` is some non-negative real number + * `timeunit` is a valid timeunit that is used in your installation, either fully spelled or abbreviated with respect to your OnTime timeunit pick list configuration + +A few examples of valid tags (assuming you have hours as a timeunit in OnTime and it's abbreviated spelling is 'hrs'): + + [otd: 45] + + [otf: 2] + + [otf: 823 wl: 5 hours] + + [ott: 92 wl: 8.3 hrs] + + [oti: srx0091] + diff --git a/docs/packagist b/docs/packagist new file mode 100644 index 000000000..d217794ed --- /dev/null +++ b/docs/packagist @@ -0,0 +1,16 @@ +Packagist – the main Composer repository + +Install Notes +------------- + + 1. Create an account on packagist.org + 2. Enter your credentials + - The token which you can find on the Packagist profile page + + Optional steps: + - Enter the username (**not** email) who the API token belongs to (defaults to the repository owner) + - Enter the host of your Packagist installation (defaults to https://packagist.org), the protocol-prefix is optional and defaults to "http://". + + 3. Check the "Active" checkbox and click "Update Service". + +For more details about Packagist, visit https://packagist.org/ diff --git a/docs/phraseapp b/docs/phraseapp new file mode 100644 index 000000000..bf9870bec --- /dev/null +++ b/docs/phraseapp @@ -0,0 +1,10 @@ +*Your companion to become a global player. The translation management software for websites and mobile apps.* + +This service lets you connect your GitHub repository to an existing [PhraseApp](https://phraseapp.com) translation project to automatically push new translations from your locale files into PhraseApp. + +Read more: [Documentation](https://phraseapp.com/docs) + +Install Notes +------------- + +Just add your project **auth token** to the hook configuration. You find your token on your project overview page after creating the first project in PhraseApp. diff --git a/docs/pivotaltracker b/docs/pivotaltracker new file mode 100644 index 000000000..676afbe61 --- /dev/null +++ b/docs/pivotaltracker @@ -0,0 +1,6 @@ +Install Notes +------------- + +1. "token" is your Pivotal Tracker API Token. This is at the bottom of your 'My Profile' page. +2. "branch" is a space-separated list of the branches you want to listen for commits on. If none is provided it will listen on all branches. +3. "endpoint" is an optional endpoint for a custom Pivotal Tracker installation. Leave this blank to use "https://www.pivotaltracker.com". diff --git a/docs/piwikplugins b/docs/piwikplugins new file mode 100644 index 000000000..a9042324a --- /dev/null +++ b/docs/piwikplugins @@ -0,0 +1 @@ +[Piwik](http://piwik.org) is an open analytics platform which can be extended with Plugins and Themes. This service notifies the [Piwik Marketplace](http://plugins.piwik.org) of any new releases to your Piwik plugin. See [http://developer.piwik.org/guides/distributing-your-plugin](the Publisher Guide) for more information. diff --git a/docs/planbox b/docs/planbox new file mode 100644 index 000000000..3e527225e --- /dev/null +++ b/docs/planbox @@ -0,0 +1,5 @@ +Install Notes +------------- + + 1. The token is your Planbox Inititative Token. Find in on the Manage page. + 2. More information available on Planbox's help site. diff --git a/docs/planio b/docs/planio new file mode 100644 index 000000000..d63e1e3a0 --- /dev/null +++ b/docs/planio @@ -0,0 +1,15 @@ +Planio ♥ GitHub! This service hook notifies Planio to fetch new commits from your repository at GitHub whenever you push to it. + +Install Notes +------------- + +1. Create a free or paid Planio account at http://plan.io +2. Logged in to your Planio account, navigate to **Administration** -> **Settings** -> **Repositories** and make sure that the **Enable WS for repository management** checkbox is active and that you have an **API key** set up +3. Create a project, then navigate to **Settings** -> **Repositories** +4. Click on **New repository** +5. Select **Git**, choose an **Identifier**, enter the (preferably public, read-only, git://, non-HTTP) URL of your GitHub repository in the **Mirror from external URL** field, then click **Create** +6. Back in your project, head over to the **Repository** tab, find and select the repository you just created in the sidebar +7. Should you not see the blue instructions screen, click on **Help** on the upper right +8. Fill in the information from the **Set up web hook** section in the above form here on GitHub and click **Update settings** +9. Optional: if this GitHub repository is private, click on **Deploy Keys** here on the right and add the SSH public key from the **Set up a public key (deploy key)** section in Planio +10. A short while after your next commit, the repository will show up on Planio. If you have nothing to commit, you can also come back here and hit the **Test Hook** button. diff --git a/docs/presently b/docs/presently deleted file mode 100644 index f6075b09f..000000000 --- a/docs/presently +++ /dev/null @@ -1,21 +0,0 @@ -Present.ly -========== - -Install Notes -------------- - - 1. subdomain (for a Present.ly account) - 2. group_name (OPTIONAL; will broadcast as a group or as the system if group is 'system') - 3. username (user must be a manager of the specified group or admin for 'system') - -Developer Notes ---------------- - -data - - subdomain - - group_name (optional) - - username - - password - -payload - - refer to docs/github_payload diff --git a/docs/prowl b/docs/prowl new file mode 100644 index 000000000..7837f59cb --- /dev/null +++ b/docs/prowl @@ -0,0 +1,8 @@ +Prowl is an iPhone App+Web Service for arbitrary Push Notifications. After installing the app and registering the device, you receive an API key and can send notifications from your computer via Growl (with the Prowl GrowlStyle installed) or from any server with very little work (at least as far as the Push submission is concerned). + +To get started, create a user account for Prowl at https://www.prowlapp.com/. + +Install Notes +------------- + +1. Create a new API key for GitHub at the [Prowl website](https://www.prowlapp.com/api_settings.php). diff --git a/docs/pushbullet b/docs/pushbullet new file mode 100644 index 000000000..f8e2b5465 --- /dev/null +++ b/docs/pushbullet @@ -0,0 +1,18 @@ +[Pushbullet](https://www.pushbullet.com/) makes getting things on and off your phone easy and fast. + +Supported events: push, issue and pull request. + +Install Notes +------------- + +1. Install the [Android client](https://play.google.com/store/apps/details?id=com.pushbullet.android) from the Android Market or a browser extension. + +2. Login to [Pushbullet](https://www.pushbullet.com/account) and copy your api key. + +3. Add your api key in the field above. + +If you want to send to a specific device, else leave the "Device iden" field blank: + +4. Open [Pushbullet API](https://api.pushbullet.com/api/devices) and paste your api key to the username field, leave password empty. + +5. Find your desired device from the output and copy it's iden to the field above. diff --git a/docs/pushover b/docs/pushover new file mode 100644 index 000000000..b86188c47 --- /dev/null +++ b/docs/pushover @@ -0,0 +1,11 @@ +Pushover is a cross-platform push notification service with a [simple API](https://pushover.net/api). + +Install Notes +------------- + +1. Install the [iOS client](https://pushover.net/clients) from the App Store, or the [Android client](https://pushover.net/clients) from the Android Market. + +2. Login to [Pushover](https://pushover.net/) and copy your user key. + +3. Add your user key in the field above. Optionally enter a device name to have notifications go to a single device, or leave blank to send to all active devices on your account. + diff --git a/docs/rally b/docs/rally new file mode 100644 index 000000000..c914db3d9 --- /dev/null +++ b/docs/rally @@ -0,0 +1,46 @@ +Rally (http://www.rallydev.com) is the recognized leader in Agile +application lifecycle management (ALM). Rally is dedicated to helping +organizations embrace Agile and Lean development and portfolio management +practices that dramatically increase the pace of innovation, improve +product quality and boost customer satisfaction. + +The GitHub-Services integration for Rally creates Changeset/Change +information in Rally associated with the Workspace and SCMRepository +of your choice. In Rally, when looking at an artifact, you can see +detail on Changesets associated with commits from GitHub push activities. +Rally also provides reports that use the Artifact, Changeset and Change +information to provide insight into files that get changed frequently +or that are associated with higher than normal defect rates and other +useful metrics based reports. + +The integration scans for tokens in the commit message that conform to a +Rally Artifact FormattedID format. These tokens are validated against +Rally so that a reference to a valid Rally Artifact (UserStory, Defect, +TestCase, Task, etc.) results in the association of the Artifact to the +Changeset posted in Rally performed by this integration. +Commits containing a commit message that doesn't have a valid artifact +reference also get posted to Rally so that they show up in any Rally +reports against Changesets/Changes. + +NB: Uri fields in Rally Changeset/Change records refer the to master branch. + +Install Notes +------------- + +You'll need a Rally account (see http://rally.rallydev.com). + +1. server - (REQUIRED) is the hostname of the Rally server. + You do not have to provide the domain name portion of the server + if the name of the server is a Rally SaaS server, + ie., rally1 or trial or demo. + If you are utilizing the Rally OnPrem product, you'll need + to provide fully qualified hostname. +2. username - (REQUIRED) is the Rally UserName for the subscription. + Make sure you specify the UserName (not the DisplayName or FirstName and LastName or Email). +3. password - (REQUIRED) is the password associated with the UserName for the Rally Subscription. +4. workspace - (REQUIRED) is the name of the Rally Workspace in which the target SCMRepository + resides. +5. repository - (OPTIONAL) is the name of the Rally SCMRepository. By default, if not provided, + this integration will use the name of your GitHub repository as the SCMRepository name. + But, you have the ability to name the Rally SCMRepository to your choice of a name. + diff --git a/docs/rationalteamconcert b/docs/rationalteamconcert new file mode 100644 index 000000000..811852d14 --- /dev/null +++ b/docs/rationalteamconcert @@ -0,0 +1,25 @@ +This service integrates GitHub with Rational Team Concert (http://www.jazz.net). The service automatically adds comments into work item specified by the commit message. Additionally, this hook allows you to create new work items from commits. + +Use the pattern "[#] Commit text" to add a comment to the work item with the number specified in the commit message. E.g. + "[#32] Fix an annoying bug." + +Note that the '#' is optional. + +Use the pattern "[workItemType] Fix an annoying bug" to create a new work item for type workItemType. Note, that you have to enter the workItemType id instead of the name. E.g. + "[defect] Fox an annoying bug" + +This implementation supports both form based and basic authentication. + +Install Notes +------------- + +A user with the correct licenses to add comments and create work items needs to be created. + +Configuring the GitHub hook: + +1. Server Url - This is your server url (including the jazz application suffix). A valid example would be https://yourdomain:port/jazz or https://yourdomain:port/ccm. +2. Username - This is the username of the user used to access your Rational Team Concert instance. +3. Password - This is the password of the user used to access your Rational Team Concert instance. +4. Project Area UUID - This is the uuid of your project area. It is needed to create new work items. You can find out the uuid by accessing your project using the web ui (using the admin panel). The uuid will be after the itemId parameter in the url. E.g. itemId=_VZsIQOehEeGMALe74yZ8ZQ. Enter just the itemId, which in this example is _VZsIQOehEeGMALe74yZ8ZQ +5. Basic Authentication - Check this option if you have configured your server to use basic authentication instead of form authentication. +6. No Verify SSL - Check this option if you need the hook to skip the verification of your server's SSL certificate. Not recommended for production use, but necessary if your server is running with a self-signed certificate or with a wildcard certificate, since the current Ruby level does not understand SNA/SNI. diff --git a/docs/rdocinfo b/docs/rdocinfo new file mode 100644 index 000000000..43a06d289 --- /dev/null +++ b/docs/rdocinfo @@ -0,0 +1,2 @@ +This service allows you to auto-publish documentation for your Ruby gem or library. +The resulting documentation will be hosted for you at http://rubydoc.info/github/your-name/your-project \ No newline at end of file diff --git a/docs/readthedocs b/docs/readthedocs new file mode 100644 index 000000000..78a617de4 --- /dev/null +++ b/docs/readthedocs @@ -0,0 +1 @@ +Automatically build documentation hosted on readthedocs.org. \ No newline at end of file diff --git a/docs/redmine b/docs/redmine new file mode 100644 index 000000000..96985817d --- /dev/null +++ b/docs/redmine @@ -0,0 +1,52 @@ +Redmine Service has the following modules: + +1. Fetch GitHub Commits +----------------------- + +Notifies an instance of Redmine, a project management tool, to fetch the new commits from GitHub. + +Install Notes +------------- + +1. Download and install Redmine from http://redmine.org +2. Activate "Enable WS for repository management" in the global settings. While there, generate an API key (if necessary) and copy it. +3. Set your GitHub repository as git repository for a project. +4. Enter the full URL to your Redmine instance as well as the project's identifier and the API key. +5. Check the "Fetch GitHub Commits" option to enable the module. +6. We will then notify your Redmine whenever you do a "git push". + +Note: The GitHub servers need to have access to "sys/fetch_changesets". Some older tutorials have you add a rule to your server config to +allow access to sys/ only from localhost. Since it is now possible to use an API key, this is no longer necessary. + +Notifies an instance of Redmine, a project management tool, to fetch the new commits from GitHub. + +2. Update Redmine Issues about related commits +---------------------------------------------- + +Updates an issue on Redmine, a project management tool, whenever a commit happened and is related to this issue +Commits which are related to Redmine issues are detected by matching '#IssueNo' in the commit message (i.e "fixing bug #234" is related to issue #234) + +Install Notes +------------- +1. Generate API key from Redmine from My account -> API access key (Right Side Section) -> Show +3. This module requires setting Redmine url and API access Key. +4. Check the "Update Redmine Issues About Commits" option to enable the module. + +Note: Evey post update on the issues will be authored by the account given the API access key + +Example of the update issue post on Redmine (the output): + + Commit: b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33 + https://github.com/modsaid/github-services/commit/b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33 + Author: modsaid + Date: 2007-10-10 (Sun, 02 Aug 2012) + Log Message: + ----------- + Fix #{IssueNo} + + Credits + ------- + * modsaid + * basayel + + http://www.espace.com.eg diff --git a/docs/rubyforge b/docs/rubyforge deleted file mode 100644 index cb2e59b39..000000000 --- a/docs/rubyforge +++ /dev/null @@ -1,30 +0,0 @@ -RubyForge -========= - -Special Thanks -------------- - -Would like to notice Ara Howard and his RubyForge gem, from which I copied most of the code -used in this service. Would also like to notice the author of the Basecamp service, since -I used that service as a template for the RubyForge service. - -This service simply posts a new NewsByte to the RubyForge project (as specified by the groupid). - -Install Notes -------------- - - 1. username should be the username of a user that has access to the RubyForge project - 2. password should be the password of the given user - 3. groupid should be the group id of the RubyForge project - - -Developer Notes ---------------- - -data - - username - - password - - groupid - -payload - - refer to docs/github_payload diff --git a/docs/run_code_run b/docs/run_code_run deleted file mode 100644 index 916e577e0..000000000 --- a/docs/run_code_run +++ /dev/null @@ -1,16 +0,0 @@ -RunCodeRun -========== - -RunCodeRun is a hosted continuous integration service. It is free for public -projects. For private project plans, see http://runcoderun.com/plans. - -Install Notes -------------- - - 1. Check the "Active" checkbox and click "Update Settings". - 2. Click on the "RunCodeRun" service name and then click the "Test Hook" link. - 3. You should receive an email from RunCodeRun letting you know your - project was setup. - 4. If this is a private project, add the rcr-private user as a collaborator. - -For more details, go to http://runcoderun.com/github diff --git a/docs/scrumdo b/docs/scrumdo new file mode 100644 index 000000000..96e9c8e2b --- /dev/null +++ b/docs/scrumdo @@ -0,0 +1,21 @@ +ScrumDo is an agile/scrum project management site found at http://www.scrumdo.com +Integrating GitHub with ScrumDo lets you see commits in your project newsfeed, and allows you to update stories via commit messages. + +To update a story, type Story #(num) Status as part of your commit message. Examples: + +* Story #13 Done +* Story #5 Doing +* Story #3 Reviewing + +Install Notes +------------- + +1. Username and Password are your ScrumDo.com credentials. +2. The project slug can be found in the URL of your project. + + Given this URL: + + http://www.scrumdo.com/projects/project/acme-project/ + + Your project slug is `acme-project` + diff --git a/docs/sifter b/docs/sifter new file mode 100644 index 000000000..8e41e451b --- /dev/null +++ b/docs/sifter @@ -0,0 +1,13 @@ +Sifter is a simple issue tracker designed explicitly for teams with non-technical team members. (https://sifterapp.com) + +The integration enables you to comment on, resolve, and close issues via commit messages. + +Install Notes +------------- + +0. Sign up for Sifter (https://sifterapp.com) +1. Create a new project. +2. Go to your Sifter project +3. Go to the "Project Settings" > "Integrations" page. +4. Copy the token on the page for GitHub and add it here along with your account's subdomain. +5. Any team members that want to use the integration will need to visit their profile page and explicitly link their Sifter user account with their GitHub user account so that we can identify individuals from their commits. \ No newline at end of file diff --git a/docs/simperium b/docs/simperium new file mode 100644 index 000000000..038d508f0 --- /dev/null +++ b/docs/simperium @@ -0,0 +1,25 @@ +This service posts an event object for GitHub events to a Simperium app. +A Simperium object is created for each hook event in a bucket you choose. + +Supported events are currently: +'push', 'issues', 'issue_comment', 'commit_comment', 'pull_request', +'pull_request_review_comment', 'watch', 'fork', 'fork_apply', +'member', 'public', 'team_add', 'status' + +Simperium IDs: +Each object ID will be a guid, eg. 'guid-0.3939192' + +Data: +'event' - The GitHub event type, eg. 'push' for commits +'payload' - The data for the event, varies by event type. + +More details on GitHub events: https://developer.github.com/v3/repos/hooks/ + +Install Notes +------------ + +App ID: Your Simperium app id created on https://simperium.com/dashboard +Token: You'll need to generate an access token for a specific user (not an API key) +Bucket: Name of the bucket you want events posted to + +See https://simperium.com/docs/reference/http/#auth for more details on Simperium authentication. diff --git a/docs/skydeskprojects b/docs/skydeskprojects new file mode 100644 index 000000000..8ba3000b2 --- /dev/null +++ b/docs/skydeskprojects @@ -0,0 +1,19 @@ +SkyDesk Projects Requirements: + +Log into the SkyDesk portal first. +SkyDesk Portal URL : https://www.skydesk.jp +Then access SkyDesk projects using https://projects.skydesk.jp. + +Project ID and Token is required for configuration which will be available under "Dashboard" --> "Project Settings" --> "Service Hooks". + +This service hook allows you to associate changeset(s) with bug(s) in SkyDesk Projects. To associate changeset(s) with bug(s) in SkyDeskProjects you will need to give the BUG ID in in your commit message. + +Syntax: `OPEN SQUARE BRACKET #BUGID CLOSE SQUARE BRACKET` followed by commit message + +Ex: `[#SDP-23] fixed the memory leak issue.` + +This will associate the changeset with bug with ID SDP-23. + +For more than one bugs, provide the BUG IDS separated by comma. + +Ex: `[#SDP-24,#SDP-25] UI alignment fix done.` diff --git a/docs/smartling b/docs/smartling new file mode 100644 index 000000000..490c6f508 --- /dev/null +++ b/docs/smartling @@ -0,0 +1,10 @@ +The [Smartling](http://www.smartling.com/) platform simplifies and accelerates translation and localization of your websites, mobile apps, and documents. + +Install Notes +------------- + +1. **Service url** - URL where your _Repository Connector service_ is run +2. **Project ID** - Your Smartling Project identifier code. You can find it and your **API key** in [Smartling dashboard -> Project Settings -> API](https://dashboard.smartling.com/settings/api.htm) +3. **API key** - Your Smartling API key +4. **Config path** - Relative path to the Smartling configuration file in your repository. By default the file name is expected to be `smartling-config.json` +5. **Master only** - If this flag is checked only changes to the `master` branch will be uploaded to Smartling diff --git a/docs/snowyevening b/docs/snowyevening new file mode 100644 index 000000000..6aea38780 --- /dev/null +++ b/docs/snowyevening @@ -0,0 +1,10 @@ +Notifies your project account on Snowy-Evening.com of commits. + +Install Notes +------------- + +1. Login or create a free or paid account with Snowy-Evening.com +2. Create a project and visit the Project Edit page +3. Find the GitHub integration box, which contains the API Key and Project ID +4. Copy those credentials into these fields. + diff --git a/docs/softlayermessaging b/docs/softlayermessaging new file mode 100644 index 000000000..aee391d15 --- /dev/null +++ b/docs/softlayermessaging @@ -0,0 +1,12 @@ +Install Notes +------------- + + + "SoftLayer Message Queue" getting started guide: + http://sldn.softlayer.com/article/Message-Queue-Getting-Started + + 1. account is the publishing account, typically 5 characters and not the username + 2. user is the authenticating portal user + 3. key is the messaging API key (not SoftLayer API key). + 4. name is the queue or topic name. This will need to be created before hand. + 5. topic designates whether the name provided is either a topic or a queue name. diff --git a/docs/sprintly b/docs/sprintly new file mode 100644 index 000000000..5d3451338 --- /dev/null +++ b/docs/sprintly @@ -0,0 +1,11 @@ +Sprint.ly is a project management aide which is lightweight for developers and provides visibility for external stakeholders. + +Integration with sprint.ly powers closing tickets through commit messages, updating ticket status via pull request and much more. + +Install Notes +------------- + +1. Sign up at https://sprint.ly/ +2. On your profile page ( https://sprint.ly/account/profile/ ), get your API key. +3. On your product's page, get the product number. The id is in the URL like: https://sprint.ly/product/3722/ -- 3722 would be your product id. +4. Enjoy! diff --git a/docs/sqsqueue b/docs/sqsqueue new file mode 100644 index 000000000..43d98cbbd --- /dev/null +++ b/docs/sqsqueue @@ -0,0 +1,12 @@ +Install Notes +------------- + +The Amazon SQS service allows GitHub to send a notification to an Amazon SQS queue. + +1. Configure your Amazon AWS account with an appropriately set up access-key/secret-key (Either parent account or IAM) + that has permissions to perform 'SendMessage' operations. (https://console.aws.amazon.com/sqs/) + +2. Amazon SQS ARN is the unique code SQS references your queue with. It can be copied from the console + or fetched through the API. It takes the form of arn:aws:sqs:us-(region)-(dc):(id):(name). Copy and + paste the entire string. This hook parses the necessary details from the arn. + You may also specify a SQS Queue URL instead of an ARN if you want to use IAM or a Queue that was created using a different account. diff --git a/docs/statusnet b/docs/statusnet new file mode 100644 index 000000000..7a78d4131 --- /dev/null +++ b/docs/statusnet @@ -0,0 +1,4 @@ +Install Notes +------------- + + 1. **Server** should be the server base URI.(eg. http://identi.ca or http://identi.ca/index.php) \ No newline at end of file diff --git a/docs/talker b/docs/talker new file mode 100644 index 000000000..2f489977a --- /dev/null +++ b/docs/talker @@ -0,0 +1,8 @@ +Install Notes +------------- + + 1. **Url** should be your room url, for example https://youraccount.talkerapp.com/rooms/ROOM_ID + 2. **Token** should be on your settings page + 3. If **Digest** is checked, all commits will be compressed in one message + +Note: replace https with http on the url if you're on the Free plan as it doesn't include enhanced security (SSL). \ No newline at end of file diff --git a/docs/targetprocess b/docs/targetprocess new file mode 100644 index 000000000..bdeccab58 --- /dev/null +++ b/docs/targetprocess @@ -0,0 +1,39 @@ +Integration with TargetProcess allows GitHub user to change current entity states +and add comments directly from their commit messages. + + +Install Notes +-------------- + +1. TargetProcess Requirements + + - Requires TargetProcess version 2.22.4.19887 or newer. + + - Your TargetProcess must should be accessible from the internet. + + - Committer's email addresses in GitHub and TargetProcess should be the same. + +2. Settings in GitHub + + In the GitHub integration config, the following settings should be provided: + + - TargetProcess Server URL + + - A project admin's account credentials to access your TargetProcess server. + + +Commit Message Syntax +--------------------- + +General comment format for adding comments and/or changing entity states: + + + (#|id:)[Entity ID]: + Eg: Fixed out of memory exceptions #1221:Fixed + id:1221:Fixed Fixed out of memory exceptions + + +The entire line will appear as a comment in your User Story, Bug, Feature, or Task; and the entity's +state will be changed to the state name, if specified. A new state is not required, and an +Assignable's state will not change unless it is specified. Entity ID is required. This +text sequence can appear anywhere in your commit message. diff --git a/docs/tddium b/docs/tddium new file mode 100644 index 000000000..19077d569 --- /dev/null +++ b/docs/tddium @@ -0,0 +1,30 @@ +Tddium Continuous Integration + +Learn more at [tddium.com](https://www.tddium.com). + +Install Notes +------------- + +This hook will be automatically configured for GitHub repos you've configured +with a connected Tddium account. + +If you don't want to connect your GitHub account, or you don't want to give +Tddium `repo` privileges, follow these steps: + +1. Go to your Tddium dashboard +2. Open the Configuration page for this repo and click on the 'CI Setup' section +3. Copy the hex value listed under 'CI Token' +4. Paste the token above. +5. Install Tddium's repo-specific public key into this repo's deploy keys. + +You can safely leave the Override URL field blank. + +Supported Events +---------------- + +Tddium monitors all events on your repo, but it currently only acts on: + +- push +- create a branch +- delete a branch +- open, close, synchronize pull requests diff --git a/docs/teamcity b/docs/teamcity new file mode 100644 index 000000000..42eb39483 --- /dev/null +++ b/docs/teamcity @@ -0,0 +1,39 @@ +[TeamCity](https://www.jetbrains.com/teamcity/) is a continuous integration server that automates building and testing of your software. + + +The GitHub TeamCity service can be used in two ways: +* to trigger builds after code has been pushed to your git repository; (Default) +* to enforce checking for changes after code has been pushed to your git repository. (see 7) + +Install Notes +------------- + +1. Your TeamCity server must be accessible from the internet. + +2. "Base url" is the URL to your TeamCity server + Example: https://teamcity.example.com/ or http://teamcity.example.com/teamcity/ + +3. "Build type" is the identifier of the build configuration you want to trigger. + Multiple configurations can be triggered by specifying a comma-separated list of identifiers. + Example: "bt123", which can be found in URL of the build configuration page + ("...viewType.html?buildTypeId=bt123&...") + +4. "Username" and "Password" - username and password of a TeamCity user that can + trigger a manual build of the TeamCity build configuration defined in "Build type" + +5. "Branches" (Optional) is an space-separated list of branches to watch commits for. + Commits to other branches will be ignored. + If no branches are specified, TeamCity will be notified of all commits. + +6. "Full branch ref" if enabled full branch reference (e.g. 'refs/heads/master') + will be send to TeamCity server. Otherwise 'refs/heads' will be omitted. + +7. "Check for pending changes" if enabled, service will force TeamCity server + to check for pending changes. Service will not trigger new build. + +8. Since TeamCity uses BASIC authentication, it is highly recommended that the + TeamCity server use HTTPS/SSL to protect the password that is passed + unencrypted over the internet. + diff --git a/docs/tender b/docs/tender new file mode 100644 index 000000000..7f8e4f80f --- /dev/null +++ b/docs/tender @@ -0,0 +1,9 @@ +Install Notes +------------- + +If your URL is http://mysite.tenderapp.com, then: + +* Your **domain** is `mysite.tenderapp.com` + +* You can find your token in the tracker settings: + http://mysite.tenderapp.com/settings/trackers diff --git a/docs/toggl b/docs/toggl new file mode 100644 index 000000000..3364d0bf6 --- /dev/null +++ b/docs/toggl @@ -0,0 +1,4 @@ +1. API Key: Your toggl api key. (Get it at https://toggl.com/app/profile) +2. Project: the id of the toggl project that this repo links to +3. Activate and go! +4. To track your time simply add t:number-of-minutes (integer) to your commit message diff --git a/docs/trac b/docs/trac index 0b12db48d..c212dc4e1 100644 --- a/docs/trac +++ b/docs/trac @@ -1,20 +1,7 @@ -Trac -==== +This service is deprecated. To integrate GitHub with Trac, follow the +instructions at: https://github.com/aaugustin/trac-github -Install the following plugin on your Trac server before proceeding: http://github.com/davglass/github-trac/ +If you're currently relying on this service, please consider upgrading to +trac-github. It uses a standard webhook to provide the same features and it's +more actively maintained. - 1. url field is your Trac install's url - 2. token (this needs to be the same token you put in your trac.ini installed via the plugin) - - -The plugin searches commit messages for text in the form of: - command #1 - command #1, #2 - command #1 & #2 - command #1 and #2 - -Instead of the short-hand syntax "#1", "ticket:1" can be used as well, e.g.: - command ticket:1 - command ticket:1, ticket:2 - command ticket:1 & ticket:2 - command ticket:1 and ticket:2 diff --git a/docs/travis b/docs/travis new file mode 100644 index 000000000..c3f87cd90 --- /dev/null +++ b/docs/travis @@ -0,0 +1,12 @@ +Travis CI is a distributed continuous integration service. + +By enabling this hook, Travis CI will listen to push and pull request events to trigger new builds. + +For more details about Travis, go to http://docs.travis-ci.com. + +## Automatic configuration from Travis CI +We recommend using the Travis profile page at https://travis-ci.org/profile to manage your hooks. +For private repositories, use https://travis-ci.com/profile. + +## Travis CI Status +Travis CI status page: http://status.travis-ci.com diff --git a/docs/trello b/docs/trello new file mode 100644 index 000000000..11696937c --- /dev/null +++ b/docs/trello @@ -0,0 +1,13 @@ +Adds a card to a Trello list for each commit pushed to GitHub, optionally limited to the master branch or by exclusion regex. + +Install Notes +------------- + +1. [Create a consumer token][create] authorizing GitHub to write to the Trello API. +2. Supply the list identifier for the list to be added to. Pull requests can optionally be added to a separate Trello list. You can get the lists for a board at this URL: + https://api.trello.com/1/board/BOARDID?token=TOKEN&key=db1e35883bfe8f8da1725a0d7d032a9c&lists=all + (To edit this URL for your Trello board, replace 'TOKEN' with the consumer token you created in step 1, and BOARDID with the ID of the Trello board that the list is on – the ID is the final section of the board's Trello URL.) +3. If you want to ignore commits with commit messages matching a particular regular expression (i.e. "Merge branch"), put the regex here. +4. If you want to create cards only for commits on the master branch, tick "Master Only." + +[create]: https://trello.com/1/authorize?key=db1e35883bfe8f8da1725a0d7d032a9c&name=GitHub+Services&expiration=never&response_type=token&scope=read,write diff --git a/docs/twilio b/docs/twilio new file mode 100644 index 000000000..39a8a3db4 --- /dev/null +++ b/docs/twilio @@ -0,0 +1,14 @@ +Allows you to setup a GitHub repository to send out SMS messages on git pushes. +Currently the SMS message is built to say: + + "#{payload['pusher']['name']} has pushed #{payload['commits'].size} commit(s) to #{payload['repository']['name']}" + +Install Notes +------------- + +1. Signup for a Twilio account at http://www.twilio.com/try-twilio?home-page +2. You can find your account_sid and auth_token on your account page at https://www.twilio.com/user/account +3. from_phone must be a "Twilio phone number enabled for SMS. Only phone numbers or short codes purchased from Twilio work here" +4. to_phone is the "destination phone number. Format with a '+' and country code e.g., +16175551212 (E.164 format)." +5. Check master_only if you only want to receive updates for master. + diff --git a/docs/twitter b/docs/twitter index 6ecc79536..6975550e4 100644 --- a/docs/twitter +++ b/docs/twitter @@ -1,19 +1,17 @@ -Twitter -======== - Install Notes ------------- - 1. email or username will work in username field + 1. [Get an OAuth Token for Your Twitter Account][authorize_url]. + 2. You're going to be redirected to Twitter to allow GitHub to tweet on your behalf. + 3. Be sure that you're logged in as the Twitter user you would like to tweet from. +Check "Digest" to send only the number of recent commits to a branch along with a link to that branches +commit list, instead of tweeting all commits individually with their message and direct link to each commit. -Developer Notes ---------------- +Check "Short format" to omit the repository and commiter's names from the tweet to get more +space for the commit message. -data - - username - - password - - digest (boolean) +If you would like to only receive messages for a specific branch, add the name (or partial name) to +the "Filter branch" option. Otherwise, leave the field blank to receive messages for all branches. -payload - - refer to docs/github_payload +[authorize_url]: <%= twitter_oauth_path(current_repository.user, current_repository) %> diff --git a/docs/typetalk b/docs/typetalk new file mode 100644 index 000000000..e5d4f1a0c --- /dev/null +++ b/docs/typetalk @@ -0,0 +1,10 @@ +Posts a message to [Typetalk](https://typetalk.in) topics when you push to GitHub. + +Install Notes +------------- + +1. Need to [register new application](https://typetalk.in/my/develop/applications) that authorises GitHub to access to the Typetalk API. (Grant type must be "Client Credentials") +2. Enter your credentials. + - client_id + - client_secret +3. Enter topic id to post messages. diff --git a/docs/unfuddle b/docs/unfuddle new file mode 100644 index 000000000..cd28ebd23 --- /dev/null +++ b/docs/unfuddle @@ -0,0 +1,19 @@ +Unfuddle is a lovely ticket management, time tracking, project hosting service. + +Install Notes +--------------- + +Create a new Git repository in your Unfuddle project. +Once created, edit the repository settings. Check the +"Changesets Managed Manually" checkbox. + +Make note of the following from the URL: + + http://example.unfuddle.com/a#/projects/32429/repositories/28573/browse + +In the above, the data you need for configuration is: + +* subdomain: example +* repo_id: 28573 + +If your URL begins with http:// rather than https:// check the Httponly box when setting up the service hook. diff --git a/docs/weblate b/docs/weblate new file mode 100644 index 000000000..8384aad2d --- /dev/null +++ b/docs/weblate @@ -0,0 +1,12 @@ +This service will notify Weblate about pushes to your repository. +Weblate will then refresh updated translations and merge them with your +changes. + +More info: http://weblate.org/ + +Install Notes +------------- + +You need to have enabled hooks in your Weblate installation (this is default) +see documentation for more information: +https://weblate.readthedocs.org/en/latest/api.html#notification-hooks diff --git a/docs/webtranslateit b/docs/webtranslateit new file mode 100644 index 000000000..ce30b7990 --- /dev/null +++ b/docs/webtranslateit @@ -0,0 +1,8 @@ +This service notify Web Translate It of pushes to your public repository. Web Translate It will then refresh the language file(s) if they have been updated. + +More info: http://docs.webtranslateit.com/github-integration/ + +Install Notes +------------- + + * **API Key** is your project API key (you can find it in the project settings) diff --git a/docs/windowsazure b/docs/windowsazure new file mode 100644 index 000000000..3622ee1b0 --- /dev/null +++ b/docs/windowsazure @@ -0,0 +1,14 @@ +This service posts a payload for GitHub 'push' event to a Windows Azure WebSites (WAWS). +This enables continuous integration and deployment with WAWS. + +More Info: http://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-git/ + +Supported events are currently: 'push' + +Config: + 'hostname' - The Azure WebSites SCM endpoint hostname. + 'username' - Username basic cred for SCM endpoint. + 'password' - Password basic cred for SCM endpoint. + +Data: + 'payload' - Standard GitHub event payload by event type. diff --git a/docs/xmpp_im b/docs/xmpp_im new file mode 100644 index 000000000..34c9e84bc --- /dev/null +++ b/docs/xmpp_im @@ -0,0 +1,34 @@ +# XMPP IM + +This service will connect to an XMPP account with the provided details and then send a status update to one or more JIDs (bare or full). It then immediately disconnects from the server. + +## Configuration + +1. **JID** - The JID (Jabber ID) with which to connect to the XMPP server +2. **Password** - Password +3. **Receivers** - The JIDs (bare or full) that you'd like to send updates to. JIDS are whitespace separated +4. **Restrict to Branch** - List of branches which will be inspected. +5. **Host** - If you need to set a custom host enter here, otherwise leave blank for DNS lookup. +6. **Port** - If ou need to use a custom port (default: 5222) enter value here. + +### Options + +1. **Active** - Master on/off switch +2. **Notify wiki** - Get notifications of wiki events +3. **Notify comments** - Get notifications of comments +4. **Notify watch** - Get notifictions of watch events +5. **Notify issues** - Get notifications on issues +6. **Notify pull requests** - Get notifications of pull requests + +If you would like to only receive messages for a specific branch, add the name (or partial name) to +the "Restrict to Branch" option. Otherwise, leave the field blank to receive messages for all branches. + +## Notes + +This service currently enables all of the available hook events including +commit comments, downloads, forks, fork applies, wiki updates, issues, issue +comments, member adds, pull requests, pushes, and watches. However, not all +events are posted to the MUC room. If you would like these events supported +please raise an issue, or make a pull request! + +A full list of events with descriptions can be found here: https://developer.github.com/v3/repos/hooks/. diff --git a/docs/xmpp_muc b/docs/xmpp_muc new file mode 100644 index 000000000..d9b015bf0 --- /dev/null +++ b/docs/xmpp_muc @@ -0,0 +1,40 @@ +# XMPP MUC + +This service will connect to an XMPP MUC room with the provided details and then post a status update. It then immediately disconnects from the room. + +## Configuration + +1. **JID** - The JID (Jabber ID) with which to connect to the XMPP server +2. **Password** - Password +3. **Room** - The room you'd like to join +4. **Server** - The server in which the room lives +5. **Nickname** - The nickname that should be used (defaults to __github__) +6. **Room password** - The password (if required) to join the MUC room +7. **Restrict to Branch** - List of branches which will be inspected. +8. **Host** - If you need to set a custom host enter here, otherwise leave blank for DNS lookup. +9. **Port** - If ou need to use a custom port (default: 5222) enter value here. + +### Options + +1. **Active** - Master on/off switch +2. **Notify wiki** - Get notifications of wiki events +3. **Notify comments** - Get notifications of comments +4. **Notify watch** - Get notifictions of watch events +5. **Notify issues** - Get notifications on issues +6. **Notify pull requests** - Get notifications of pull requests + +If you would like to only receive messages for a specific branch, add the name (or partial name) to +the "Restrict to Branch" option. Otherwise, leave the field blank to receive messages for all branches. + +## Notes + +You may wish to reserve the nickname for the user in question so that it will +always be able to connect to the room. + +Note: This service currently enables all of the available hook events including +commit comments, downloads, forks, fork applies, wiki updates, issues, issue +comments, member adds, pull requests, pushes, and watches. However, not all +events are posted to the MUC room. If you would like these events supported +please raise an issue, or make a pull request! + +A full list of events with descriptions can be found here: https://developer.github.com/v3/repos/hooks/. diff --git a/docs/youtrack b/docs/youtrack new file mode 100644 index 000000000..741b3aa28 --- /dev/null +++ b/docs/youtrack @@ -0,0 +1,54 @@ +This service processes commit comments and pull request descriptions and searches for YouTrack issue id's and commands. +Commands are applied to issues, associated with commit or pull request. + +1. YouTrack Requirements + + - Requires YouTrack version 2.0 or above. YouTrack Energy EAP builds are + supported as well. + + - Your YouTrack server should be accessible from the internet. + + - REST API must be enabled in your YouTrack server. It can be set in YouTrack Settings menu. + + - Committer's email addresses in GitHub and YouTrack should be the same. + YouTrack looks for user account of a committer by an email address, which the + commiter has registered in GitHub. If YouTrack doesn't find a user account with the + same email as committer's email, a command specified in commit's comment won't be applied. + +2. Settings in GitHub + + In the GitHub integration config, the following settings should be provided: + + - Base url: YouTrack Server URL + + - Committers: Name of a user group in YouTrack, in which YouTrack will search for committer's account. + + - Username: Administrator's account (e.g. 'root' user or Admin role) credentials to access your YouTrack server. + + - Branch: Branch names to track separated by space. If branches are provided, only commits to those branches will trigger + YouTrack commands and commits to others will be ignored. If the branch field is left empty, commits on any branch will trigger commands. + + - Process distinct: If only distinct commits should be processed. If this setting is false, same commit may be processed several times + (for example, when branches are merged) + + - Password: a password of YouTrack Username. Username should have Admin role. + + +* Additional Information + + - [Introduction to invoke YouTrack commands by GitHub comments](http://blog.jetbrains.com/youtrack/2011/04/integrate-youtrack-with-github/) + + - [Official integration documentation](http://confluence.jetbrains.com/display/YTD5/GitHub+Integration) + + - [Setup walkthrough video](http://www.youtube.com/watch?v=0iK1J_fWhns) + + - [YouTrack commands grammar](http://confluence.jetbrains.com/display/YTD5/Command+Grammar) + + +* Troubleshooting + + - GitHub hook errors + + - Authentication problem: You may have to regenerate token in `GibHub > Applications > Personal access tokens` menu and enter it at YouTrack project `settings > GitHub > Edit` menu. + + - 400: Failed to parse YouTrack commands from GitHub commit comments. [Related answer](http://stackoverflow.com/a/26540723/361100) diff --git a/docs/zendesk b/docs/zendesk new file mode 100644 index 000000000..00a8779e8 --- /dev/null +++ b/docs/zendesk @@ -0,0 +1,13 @@ +Zendesk is the fastest way to great customer service. Use this service hook to selectively update tickets with private comments based on GitHub commit messages and issue updates. + +In order to update a Zendesk ticket, all you need to do is to configure and enable this hook, and then subsequently reference the ticket you want updated with the GitHub status. The format of the ticket reference is ZD#123 where 123 is the id of the ticket. Only commits/comments containing a valid ZD ticket reference are sent to Zendesk. + +Install Notes +------------- + + 1. The subdomain is your Zendesk subdomain, i.e. "subdomain" if you visit https://subdomain.zendesk.com + + 2. Username is the email address of the user you wish to authenticate as + + 3. Password is either the password of the user, or your Zendesk API token from "Settings / Channel / API". Remember to adjust the username if you use the API token. + diff --git a/docs/zohoprojects b/docs/zohoprojects new file mode 100644 index 000000000..3afd4c82f --- /dev/null +++ b/docs/zohoprojects @@ -0,0 +1,13 @@ +Project ID and Token is required for configuration which will be available under "Dashboard" --> "Project Settings" --> "Service Hooks". + +This service hook allows you to associate changeset(s) with bug(s) in Zoho Projects. To associate changeset(s) with bug(s) in ZohoProjects you will need to give the BUG ID in in your commit message. + +Syntax: `OPEN SQUARE BRACKET #BUGID CLOSE SQUARE BRACKET` followed by commit message + +Ex: `[#SDP-23] fixed the memory leak issue.` + +This will associate the changeset with bug with ID SDP-23. + +For more than one bugs, provide the BUG IDS separated by comma. + +Ex: `[#SDP-24,#SDP-25] UI alignment fix done.` diff --git a/github-services.gemspec b/github-services.gemspec new file mode 100644 index 000000000..6f445038c --- /dev/null +++ b/github-services.gemspec @@ -0,0 +1,76 @@ +lib = "github-services" +lib_file = File.expand_path("../lib/#{lib}.rb", __FILE__) +File.read(lib_file) =~ /\bVERSION\s*=\s*["'](.+?)["']/ +version = $1 +sha = `git rev-parse HEAD 2>/dev/null || echo unknown` +sha.chomp! +version << ".#{sha[0,7]}" + +Gem::Specification.new do |spec| + spec.specification_version = 2 if spec.respond_to? :specification_version= + spec.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if spec.respond_to? :required_rubygems_version= + + spec.name = lib + spec.version = version + + spec.summary = "GitHub Services client code" + + spec.authors = ["Rick Olson"] + spec.email = 'rick@github.com' + spec.homepage = 'https://github.com/github/github-services' + spec.licenses = ['MIT'] + + spec.add_dependency "addressable", "~> 2.3" + spec.add_dependency 'yajl-ruby', '>= 1.1.0' + spec.add_dependency "mash", "~> 0.1.1" + spec.add_dependency "mime-types", "~> 1.15" + spec.add_dependency "ruby-hmac", "0.4.0" + spec.add_dependency "faraday", "0.9.0" + spec.add_dependency "xmlrpc", "0.2.1" + + # Basecamp Classic + spec.add_dependency "activeresource", "~> 4.0.0" + + # Twitter + spec.add_dependency "oauth", "0.4.4" + + # MaxCDN + spec.add_dependency "maxcdn", "~> 0.3.2" + + # Campfire + spec.add_dependency "tinder", "1.10.0" + + # Bamboo, Buddycloud + spec.add_dependency "xml-simple", "1.0.11" + + # Email + spec.add_dependency "mail", "~>2.3" + + # Jabber + spec.add_dependency "xmpp4r", "~> 0.5" + + # Twilio + spec.add_dependency "twilio-ruby", "~> 3.9.0" + + # MQTT + spec.add_dependency "mqtt", "0.0.8" + + # Softlayer Messaging + spec.add_dependency "softlayer_messaging", "~> 1.0.2" + + # Amazon SQS, AWS OpsWorks + spec.add_dependency "aws-sdk", "~> 1.64" + + # AWS CodeDeploy, Amazon SNS + spec.add_dependency "aws-sdk-core", "~>2.0.8" + + spec.files = %w(Gemfile LICENSE README.mkdn CONTRIBUTING.md Rakefile) + spec.files << "#{lib}.gemspec" + spec.files += Dir.glob("lib/**/*.rb") + spec.files += Dir.glob("test/**/*.rb") + spec.files += Dir.glob("script/*") + + dev_null = File.exist?('/dev/null') ? '/dev/null' : 'NUL' + git_files = `git ls-files -z 2>#{dev_null}` + spec.files &= git_files.split("\0") if $?.success? +end diff --git a/github-services.rb b/github-services.rb deleted file mode 100644 index 7680312f0..000000000 --- a/github-services.rb +++ /dev/null @@ -1,69 +0,0 @@ -$LOAD_PATH.unshift *Dir["#{File.dirname(__FILE__)}/vendor/**/lib"] - -# stdlib -require 'net/http' -require 'net/https' -require 'net/smtp' -require 'socket' -require 'timeout' -require 'xmlrpc/client' -require 'openssl' -require 'cgi' -#~ require 'date' # This is needed by the CIA service in ruby 1.8.7 or later - -# vendor -require 'mime/types' -require 'xmlsimple' -require 'activesupport' -require 'rack' -require 'sinatra' -require 'tinder' -require 'json' -require 'tinder' -require 'basecamp' -require 'tmail' -require 'xmpp4r' -require 'xmpp4r-simple' -require 'rubyforge' - -set :run, true -set :environment, :production -set :port, ARGV.first || 8080 - -begin - require 'mongrel' - set :server, 'mongrel' -rescue LoadError - begin - require 'thin' - set :server, 'thin' - rescue LoadError - set :server, 'webrick' - end -end - -module GitHub - def service(name) - Timeout.timeout(20) do - post "/#{name}/" do - data = JSON.parse(params[:data]) - payload = JSON.parse(params[:payload]) - yield data, payload - end - end - rescue Timeout::Error - end - - def shorten_url(url) - Timeout::timeout(6) do - short = Net::HTTP.get("api.bit.ly", "/shorten?version=2.0.1&longUrl=#{url}&login=github&apiKey=R_261d14760f4938f0cda9bea984b212e4") - short = JSON.parse(short) - short["errorCode"].zero? ? short["results"][url]["shortUrl"] : url - end - rescue Timeout::Error - url - end -end -include GitHub - -Dir["#{File.dirname(__FILE__)}/services/**/*.rb"].each { |service| load service } diff --git a/lib/github-services.rb b/lib/github-services.rb new file mode 100644 index 000000000..b76d5cbdc --- /dev/null +++ b/lib/github-services.rb @@ -0,0 +1,71 @@ +# stdlib +require 'net/http' +require 'net/https' +require 'net/smtp' +require 'socket' +require 'xmlrpc/client' +require 'openssl' +require 'cgi' +#~ require 'date' # This is needed by the CIA service in ruby 1.8.7 or later + +# bundled +require 'addressable/uri' +require 'mime/types' +require 'xmlsimple' +require 'active_resource' +require 'tinder' +require 'yajl/json_gem' +require 'basecamp' +require 'mail' +require 'xmpp4r' +require 'xmpp4r/jid' +require 'xmpp4r/presence' +require 'xmpp4r/muc' +require 'xmpp4r/roster' +require 'oauth' +require 'twilio-ruby' + +# vendor +require 'basecamp' +require 'softlayer/messaging' + +require 'faraday' +require 'faraday_middleware' +require 'ostruct' +require File.expand_path("../service/structs", __FILE__) +require File.expand_path("../service/http_helper", __FILE__) + +class Addressable::URI + attr_accessor :validation_deferred +end + +Faraday::Utils.default_uri_parser = lambda do |url| + uri = if url =~ /^https?\:\/\/?$/ + ::Addressable::URI.new + else + ::Addressable::URI.parse(url) + end + + uri.validation_deferred = true + uri.port ||= uri.inferred_port + uri +end + +XMLRPC::Config::send(:remove_const, :ENABLE_MARSHALLING) +XMLRPC::Config::ENABLE_MARSHALLING = false + +module GitHubServices + VERSION = '1.0.0' + + # The SHA1 of the commit that was HEAD when the process started. This is + # used in production to determine which version of the app is deployed. + # + # Returns the 40 char commit SHA1 string. + def self.current_sha + @current_sha ||= + `cd #{root}; git rev-parse HEAD 2>/dev/null || echo unknown`. + chomp.freeze + end +end + +require File.expand_path('../service', __FILE__) diff --git a/lib/service.rb b/lib/service.rb new file mode 100644 index 000000000..094ba06a0 --- /dev/null +++ b/lib/service.rb @@ -0,0 +1,915 @@ +# Represents a single triggered Service call. Each Service tracks the event +# type, the configuration data, and the payload for the current call. +class Service + UTF8 = "UTF-8".freeze + class Contributor < Struct.new(:value) + def self.contributor_types + @contributor_types ||= [] + end + + def self.inherited(contributor_type) + contributor_types << contributor_type + super + end + + def self.create(type, keys) + klass = contributor_types.detect { |struct| struct.contributor_type == type } + if klass + Array(keys).map do |key| + klass.new(key) + end + else + raise ArgumentError, "Invalid Contributor type #{type.inspect}" + end + end + + def to_contributor_hash(key) + {:type => self.class.contributor_type, key => value} + end + end + + class EmailContributor < Contributor + def self.contributor_type + :email + end + + def to_hash + to_contributor_hash(:address) + end + end + + class GitHubContributor < Contributor + def self.contributor_type + :github + end + + def to_hash + to_contributor_hash(:login) + end + end + + class TwitterContributor < Contributor + def self.contributor_type + :twitter + end + + def to_hash + to_contributor_hash(:login) + end + end + + class WebContributor < Contributor + def self.contributor_type + :web + end + + def to_hash + to_contributor_hash(:url) + end + end + + dir = File.expand_path '../service', __FILE__ + Dir["#{dir}/events/helpers/*.rb"].each do |helper| + require helper + end + Dir["#{dir}/events/*.rb"].each do |helper| + require helper + end + + ALL_EVENTS = %w[ + commit_comment create delete download follow fork fork_apply gist gollum + issue_comment issues member public pull_request push team_add watch + pull_request_review_comment status release deployment deployment_status + ].sort + + class << self + attr_accessor :root, :env, :host + + %w(development test production staging fi).each do |m| + define_method "#{m}?" do + env == m + end + end + + # The SHA1 of the commit that was HEAD when the process started. This is + # used in production to determine which version of the app is deployed. + # + # Returns the 40 char commit SHA1 string. + def current_sha + @current_sha ||= + `cd #{root}; git rev-parse HEAD 2>/dev/null || echo unknown`. + chomp.freeze + end + + attr_writer :current_sha + + # Returns the Service instance if it responds to this event, or nil. + def receive(event, data, payload = nil) + new(event, data, payload).receive + end + + def load_services + require File.expand_path("../services/http_post", __FILE__) + path = File.expand_path("../services/**/*.rb", __FILE__) + Dir[path].each { |lib| require(lib) } + end + + # Tracks the defined services. + # + # Returns an Array of Service Classes. + def services + @services ||= [] + end + + # Gets the default events that this Service will listen for. This defines + # the default event configuration when Hooks are created on GitHub. By + # default, GitHub Hooks will only send `push` events. + # + # Returns an Array of Strings (or Symbols). + def default_events(*events) + if events.empty? + @default_events ||= [:push] + else + @default_events = events.flatten + end + end + + # Gets a list of events support by the service. Should be a superset of + # default_events. + def supported_events + return ALL_EVENTS.dup if method_defined? :receive_event + ALL_EVENTS.select { |event| method_defined? "receive_#{event}" } + end + + # Gets the current schema for the data attributes that this Service + # expects. This schema is used to generate the GitHub repository admin + # interface. The attribute types loosely to HTML input elements. + # + # Example: + # + # class FooService < Service + # string :token + # end + # + # FooService.schema + # # => [[:string, :token]] + # + # Returns an Array of [Symbol attribute type, Symbol attribute name] tuples. + def schema + @schema ||= [] + end + + # Public: Adds the given attributes as String attributes in the Service's + # schema. + # + # Example: + # + # class FooService < Service + # string :token + # end + # + # FooService.schema + # # => [[:string, :token]] + # + # *attrs - Array of Symbol attribute names. + # + # Returns nothing. + def string(*attrs) + add_to_schema :string, attrs + end + + # Public: Adds the given attributes as Password attributes in the Service's + # schema. + # + # Example: + # + # class FooService < Service + # password :token + # end + # + # FooService.schema + # # => [[:password, :token]] + # + # *attrs - Array of Symbol attribute names. + # + # Returns nothing. + def password(*attrs) + add_to_schema :password, attrs + end + + # Public: Adds the given attributes as Boolean attributes in the Service's + # schema. + # + # Example: + # + # class FooService < Service + # boolean :digest + # end + # + # FooService.schema + # # => [[:boolean, :digest]] + # + # *attrs - Array of Symbol attribute names. + # + # Returns nothing. + def boolean(*attrs) + add_to_schema :boolean, attrs + end + + # Public: get a list of attributes that are approved for logging. Don't + # add things like tokens or passwords here. + # + # Returns an Array of String attribute names. + def white_listed + @white_listed ||= [] + end + + def white_list(*attrs) + attrs.each do |attr| + white_listed << attr.to_s + end + end + + + # Adds the given attributes to the Service's data schema. + # + # type - A Symbol specifying the type: :string, :password, :boolean. + # attrs - Array of Symbol attribute names. + # + # Returns nothing. + def add_to_schema(type, attrs) + attrs.each do |attr| + schema << [type, attr.to_sym] + end + end + + # Gets the official title of this Service. This is used in any + # user-facing documentation regarding the Service. + # + # Returns a String. + def title(value = nil) + if value + @title = value + else + @title ||= begin + hook = name.dup + hook.sub! /.*:/, '' + hook + end + end + end + + # Sets the official title of this Service. + # + # title - The String title. + # + # Returns nothing. + attr_writer :title + + # Gets the name that identifies this Service type. This is a + # short string that is used to uniquely identify the service internally. + # + # Returns a String. + def hook_name(value = nil) + if value + @hook_name = value + else + @hook_name ||= begin + hook = name.dup + hook.downcase! + hook.sub! /.*:/, '' + hook + end + end + end + + # Sets the uniquely identifying name for this Service type. + # + # hook_name - The String name. + # + # Returns a String. + attr_writer :hook_name + + attr_reader :url, :logo_url + + def url(value = nil) + if value + @url = value + else + @url + end + end + + def logo_url(value = nil) + if value + @logo_url = value + else + @logo_url + end + end + + def supporters + @supporters ||= [] + end + + def maintainers + @maintainers ||= [] + end + + def supported_by(values) + values.each do |contributor_type, value| + supporters.push(*Contributor.create(contributor_type, value)) + end + end + + def maintained_by(values) + values.each do |contributor_type, value| + maintainers.push(*Contributor.create(contributor_type, value)) + end + end + + # Public: Gets the Hash of secret configuration options. These are set on + # the GitHub servers and never committed to git. + # + # Returns a Hash. + def secrets + @secrets ||= begin + jabber = ENV['SERVICES_JABBER'].to_s.split("::") + twitter = ENV['SERVICES_TWITTER'].to_s.split("::") + + { 'jabber' => {'user' => jabber[0], 'password' => jabber[1] }, + 'boxcar' => {'apikey' => ENV['SERVICES_BOXCAR'].to_s}, + 'twitter' => {'key' => twitter[0], 'secret' => twitter[1]}, + 'bitly' => {'key' => ENV['SERVICES_BITLY'].to_s} + } + end + end + + # Public: Gets the Hash of email configuration options. These are set on + # the GitHub servers and never committed to git. + # + # Returns a Hash. + def email_config + @email_config ||= begin + hash = (File.exist?(email_config_file) && YAML.load_file(email_config_file)) || {} + EMAIL_KEYS.each do |key| + env_key = "EMAIL_SMTP_#{key.upcase}" + value = ENV[env_key] + if value && value != '' + hash[key] = value + end + end + hash + end + end + EMAIL_KEYS = %w(address port domain authentication user_name password + enable_starttls_auto openssl_verify_mode enable_logging + noreply_address) + + # Gets the path to the secret configuration file. + # + # Returns a String path. + def secret_file + @secret_file ||= File.expand_path("../../config/secrets.yml", __FILE__) + end + + # Gets the path to the email configuration file. + # + # Returns a String path. + def email_config_file + @email_config_file ||= File.expand_path('../../config/email.yml', __FILE__) + end + + def objectify(hash) + struct = OpenStruct.new + hash.each do |key, value| + struct.send("#{key}=", value.is_a?(Hash) ? objectify(value) : value) + end + struct + end + + # Sets the path to the secrets configuration file. + # + # secret_file - String path. + # + # Returns nothing. + attr_writer :secret_file + + # Sets the default private configuration data for all Services. + # + # secrets - Configuration Hash. + # + # Returns nothing. + attr_writer :secrets + + # Sets the path to the email configuration file. + # + # email_config_file - The String path. + # + # Returns nothing. + attr_writer :email_config_file + + # Sets the default email configuration data for all Services. + # + # email_config - Email configuration Hash. + # + # Returns nothing. + attr_writer :email_config + + # Binds the current Service to the Sinatra App. + # + # Returns nothing. + def inherited(svc) + Service.services << svc + super + end + end + + # Determine #root from this file's location + self.root ||= File.expand_path('../..', __FILE__) + self.host ||= `hostname -s`.chomp + + # Determine #env from the environment + self.env ||= ENV['RACK_ENV'] || ENV['GEM_STRICT'] ? 'production' : 'development' + + # Public: Gets the configuration data for this Service instance. + # + # Returns a Hash. + attr_reader :data + + # Public: Gets the unique payload data for this Service instance. + # + # Returns a Hash. + attr_reader :payload + + # Public: Gets the identifier for the Service's event. + # + # Returns a Symbol. + attr_reader :event + + # Optional String unique identifier for this exact event. + attr_accessor :delivery_guid + + # Sets the Faraday::Connection for this Service instance. + # + # http - New Faraday::Connection instance. + # + # Returns a Faraday::Connection. + attr_writer :http + + # Sets the private configuration data. + # + # secrets - Configuration Hash. + # + # Returns nothing. + attr_writer :secrets + + # Sets the email configuration data. + # + # email_config - Email configuration Hash. + # + # Returns nothing. + attr_writer :email_config + + # Sets the path to the SSL Certificate Authority file. + # + # ca_file - String path. + # + # Returns nothing. + attr_writer :ca_file + + attr_reader :event_method + + attr_reader :http_calls + + attr_reader :remote_calls + + attr_reader :pre_delivery_callbacks + + def initialize(event = :push, data = {}, payload = nil) + helper_name = "#{event.to_s.classify}Helpers" + if Service.const_defined?(helper_name) + @helper = Service.const_get(helper_name) + extend @helper + end + + @event = event.to_sym + @data = data || {} + @payload = payload || sample_payload + @event_method = ["receive_#{event}", "receive_event"].detect do |method| + respond_to?(method) + end + @http = @secrets = @email_config = nil + @http_calls = [] + @remote_calls = [] + @pre_delivery_callbacks = [] + end + + # Boolean fields as either nil, "0", or "1". + def config_boolean_true?(boolean_field) + data[boolean_field].to_i == 1 + end + + def config_boolean_false?(boolean_field) + !config_boolean_true?(boolean_field) + end + + def respond_to_event? + !@event_method.nil? + end + + # Public: Shortens the given URL with git.io. + # + # url - String URL to be shortened. + # + # Returns the String URL response from git.io. + def shorten_url(url) + res = http_post("https://git.io", :url => url) + if res.status == 201 + res.headers['location'] + else + url + end + rescue TimeoutError + url + end + + ENABLED_TRANSPORTS = ["", "http", "https"] + + # Public: Makes an HTTP GET call. + # + # url - Optional String URL to request. + # params - Optional Hash of GET parameters to set. + # headers - Optional Hash of HTTP headers to set. + # + # Examples + # + # http_get("http://github.com") + # # => + # + # # GET http://github.com?page=1 + # http_get("http://github.com", :page => 1) + # # => + # + # http_get("http://github.com", {:page => 1}, + # 'Accept': 'application/json') + # # => + # + # # Yield the Faraday::Response for more control. + # http_get "http://github.com" do |req| + # req.basic_auth("username", "password") + # req.params[:page] = 1 + # req.headers['Accept'] = 'application/json' + # end + # # => + # + # Yields a Faraday::Request instance. + # Returns a Faraday::Response instance. + def http_get(url = nil, params = {}, headers = {}) + raise_config_error("Invalid scheme") unless permitted_transport?(url) + url = url.strip if url + + if pre_delivery_callbacks.any? + pre_delivery_callbacks.each { |c| c.call(url, nil, headers, params) } + end + + http.get do |req| + req.url(url) if url + req.params.update(params) if params.present? + req.headers.update(headers) if headers.present? + yield req if block_given? + end + end + + # Public: Makes an HTTP POST call. + # + # url - Optional String URL to request. + # body - Optional String Body of the POST request. + # headers - Optional Hash of HTTP headers to set. + # + # Examples + # + # http_post("http://github.com/create", "foobar") + # # => + # + # http_post("http://github.com/create", "foobar", + # 'Accept': 'application/json') + # # => + # + # # Yield the Faraday::Response for more control. + # http_post "http://github.com/create" do |req| + # req.basic_auth("username", "password") + # req.params[:page] = 1 # http://github.com/create?page=1 + # req.headers['Content-Type'] = 'application/json' + # req.body = generate_json(:foo => :bar) + # end + # # => + # + # Yields a Faraday::Request instance. + # Returns a Faraday::Response instance. + def http_post(url = nil, body = nil, headers = {}, params = {}) + block = Proc.new if block_given? + http_method :post, url, body, headers, params, &block + end + + # Public: Makes an HTTP call. + # + # method - Symbol of the HTTP method. Example: :put + # url - Optional String URL to request. + # body - Optional String Body of the POST request. + # headers - Optional Hash of HTTP headers to set. + # + # Examples + # + # http_method(:put, "http://github.com/create", "foobar") + # # => + # + # http_method(:put, "http://github.com/create", "foobar", + # 'Accept': 'application/json') + # # => + # + # # Yield the Faraday::Response for more control. + # http_method :put, "http://github.com/create" do |req| + # req.basic_auth("username", "password") + # req.params[:page] = 1 # http://github.com/create?page=1 + # req.headers['Content-Type'] = 'application/json' + # req.body = generate_json(:foo => :bar) + # end + # # => + # + # Yields a Faraday::Request instance. + # Returns a Faraday::Response instance. + def http_method(method, url = nil, body = nil, headers = {}, params = {}) + block = Proc.new if block_given? + + url = url.strip if url + raise_config_error("Invalid scheme") unless permitted_transport?(url) + + if pre_delivery_callbacks.any? + pre_delivery_callbacks.each { |c| c.call(url, body, headers, params) } + end + + check_ssl do + http.send(method) do |req| + req.url(url) if url + req.headers.update(headers) if headers.present? + req.body = body if body + req.params = params if params.present? + block.call req if block + end + end + end + + def permitted_transport?(url = nil) + ENABLED_TRANSPORTS.include?(http.url_prefix.scheme.to_s.downcase) && + ENABLED_TRANSPORTS.include?(Addressable::URI.parse(url).scheme.to_s.downcase) + end + + # Public: Lazily loads the Faraday::Connection for the current Service + # instance. + # + # options - Optional Hash of Faraday::Connection options. + # + # Returns a Faraday::Connection instance. + def http(options = {}) + @http ||= begin + config = self.class.default_http_options + config.each do |key, sub_options| + next if key == :adapter + sub_hash = options[key] ||= {} + sub_options.each do |sub_key, sub_value| + sub_hash[sub_key] ||= sub_value + end + end + options[:ssl][:ca_file] ||= ca_file + + adapter = Array(options.delete(:adapter) || config[:adapter]) + Faraday.new(options) do |b| + b.request(:url_encoded) + b.adapter *adapter + b.use(HttpReporter, self) + end + end + end + + def self.default_http_options + @@default_http_options ||= { + :adapter => :net_http, + :request => {:timeout => 10, :open_timeout => 5}, + :ssl => {:verify_depth => 5}, + :headers => {} + } + end + + # Passes HTTP response debug data to the HTTP callbacks. + def receive_http(env) + @http_calls << env + end + + # Passes raw debug data to remote call callbacks. + def receive_remote_call(text) + @remote_calls << text + end + + def receive(timeout = nil) + return unless respond_to_event? + timeout_sec = (timeout || 20).to_i + Service::Timeout.timeout(timeout_sec, TimeoutError) do + send(event_method) + end + + self + rescue Service::ConfigurationError, Errno::EHOSTUNREACH, Errno::ECONNRESET, SocketError, Net::ProtocolError => err + if !err.is_a?(Service::Error) + err = ConfigurationError.new(err) + end + raise err + end + + def generate_json(body) + JSON.generate(clean_for_json(body)) + end + + def clean_hash_for_json(hash) + new_hash = {} + hash.keys.each do |key| + new_hash[key] = clean_for_json(hash[key]) + end + new_hash + end + + def clean_array_for_json(array) + array.map { |value| clean_for_json(value) } + end + + # overridden in Hookshot for proper UTF-8 transcoding with CharlockHolmes + def clean_string_for_json(str) + str.to_s.force_encoding(Service::UTF8) + end + + def clean_for_json(value) + case value + when Hash then clean_hash_for_json(value) + when Array then clean_array_for_json(value) + when String then clean_string_for_json(value) + else value + end + end + + # Public: Checks for an SSL error, and re-raises a Services configuration error. + # + # Returns nothing. + def check_ssl + yield + rescue OpenSSL::SSL::SSLError => e + raise_config_error "Invalid SSL cert" + end + + # Public: Builds a log message for this Service request. Respects the white + # listed attributes in the Service schema. + # + # Returns a String. + def log_message(status = 0) + "[%s] %03d %s/%s %s" % [Time.now.utc.to_s(:db), status, + self.class.hook_name, @event, generate_json(log_data)] + end + + # Public: Builds a sanitized Hash of the Data hash without passwords. + # + # Returns a Hash. + def log_data + @log_data ||= self.class.white_listed.inject({}) do |hash, key| + if value = data[key] + hash.update key => sanitize_log_value(value) + else + hash + end + end + end + + # Attempts to sanitize passwords out of URI strings. + # + # value - The String attribute value. + # + # Returns a sanitized String. + def sanitize_log_value(value) + string = value.to_s + string.strip! + if string =~ /^[a-z]+\:\/\// + uri = Addressable::URI.parse(string) + uri.password = "*" * 8 if uri.password + uri.to_s + else + string + end + rescue Addressable::URI::InvalidURIError + string + end + + # Public: Gets the Hash of secret configuration options. These are set on + # the GitHub servers and never committed to git. + # + # Returns a Hash. + def secrets + @secrets || Service.secrets + end + + # Public: Gets the Hash of email configuration options. These are set on + # the GitHub servers and never committed to git. + # + # Returns a Hash. + def email_config + @email_config || Service.email_config + end + + # Public: Raises a configuration error inside a service, and halts further + # processing. + # + # Raises a Service;:ConfigurationError. + def raise_config_error(msg = "Invalid configuration") + raise ConfigurationError, msg + end + + def raise_missing_error(msg = "Remote endpoint not found") + raise MissingError, msg + end + + # Gets the path to the SSL Certificate Authority certs. These were taken + # from: http://curl.haxx.se/ca/cacert.pem + # + # Returns a String path. + def ca_file + @ca_file ||= File.expand_path('../../config/cacert.pem', __FILE__) + end + + # Generates a sample payload for the current Service instance. + # + # Returns a Hash payload. + def sample_payload + @helper ? @helper.sample_payload : {} + end + + def reportable_http_env(env, time) + { + :request => { + :url => env[:url].to_s, + :headers => env[:request_headers] + }, :response => { + :status => env[:status], + :headers => env[:response_headers], + :body => env[:body].to_s, + :duration => "%.02fs" % [Time.now - time] + }, + :adapter => env[:adapter] + } + end + + def before_delivery(&block) + @pre_delivery_callbacks << block + end + + def reset_pre_delivery_callbacks! + @pre_delivery_callbacks = [] + end + + # Raised when an unexpected error occurs during service hook execution. + class Error < StandardError + attr_reader :original_exception + def initialize(message, original_exception=nil) + original_exception = message if message.kind_of?(Exception) + @original_exception = original_exception + super(message) + end + end + + class TimeoutError < Timeout::Error + end + + # Raised when a service hook fails due to bad configuration. Services that + # fail with this exception may be automatically disabled. + class ConfigurationError < Error + end + + class MissingError < Error + end + + class HttpReporter < Faraday::Response::Middleware + def initialize(app, service = nil) + super(app) + @service = service + @time = Time.now + end + + def on_complete(env) + @service.receive_http(@service.reportable_http_env(env, @time)) + end + end +end + +require 'timeout' +begin + require 'system_timer' + Service::Timeout = SystemTimer +rescue LoadError + Service::Timeout = Timeout +end diff --git a/lib/service/events/commit_comment_helpers.rb b/lib/service/events/commit_comment_helpers.rb new file mode 100644 index 000000000..037e3840e --- /dev/null +++ b/lib/service/events/commit_comment_helpers.rb @@ -0,0 +1,36 @@ +module Service::CommitCommentHelpers + include Service::HelpersWithMeta + + def comment + @comment ||= self.class.objectify(payload['comment']) + end + + def summary_url + comment.html_url + end + + def summary_message + "[%s] %s comment on commit %s: %s. %s" % [ + repo.name, + sender.login, + comment.commit_id, + comment.body, + comment.html_url + ] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + comment_id = 3332777 + commit_id = "441e5686a726b79bcdace639e2591a60718c9719" + Service::HelpersWithMeta.sample_payload.merge( + "comment" => { + "user" => { "login" => "defunkt" }, + "commit_id" => commit_id, + "body" => "this\r\nis\r\ntest comment", + "html_url" => "https://github.com/mojombo/magik/commit/#{commit_id}#commitcomment-#{comment_id}" + } + ) + end +end diff --git a/lib/service/events/deployment_helpers.rb b/lib/service/events/deployment_helpers.rb new file mode 100644 index 000000000..0f616a3f2 --- /dev/null +++ b/lib/service/events/deployment_helpers.rb @@ -0,0 +1,57 @@ +module Service::DeploymentHelpers + def self.sample_deployment_payload + { + "deployment" => { + "id"=>721, + "ref"=>"master", + "sha"=>"9be5c2b9c34c1f8beb0cec30bb0c875d098f45ef", + "name"=>"atmos/my-robot", + "task"=>"deploy", + "environment"=>"production", + "payload"=>{ + "config"=>{ + "heroku_production_name"=>"my-app" + } + }, + "description"=>nil, + }, + "repository"=> + { + "id"=>16650088, + "name"=>"my-robot", + "full_name"=>"atmos/my-robot", + "owner"=> + { + "login"=>"atmos", + "id"=>6626297, + "avatar_url"=> "https://identicons.github.com/86f5d368c1103c6a77ddb061e7727e46.png", + "gravatar_id"=>nil, + "url"=>"https://api.github.com/users/atmos", + "html_url"=>"https://github.com/atmos", + "type"=>"Organization", + "site_admin"=>false + }, + "private"=>true, + "html_url"=>"https://github.com/atmos/my-robot", + "description"=>"SlackHQ hubot for atmos", + "fork"=>false, + "created_at"=>"2014-02-08T18:40:20Z", + "updated_at"=>"2014-02-20T00:00:11Z", + "pushed_at"=>"2014-02-16T02:00:37Z", + "default_branch"=>"master", + "master_branch"=>"master" + }, + "sender"=> + { + "login"=>"atmos", + "id"=>38, + "avatar_url"=> "https://gravatar.com/avatar/a86224d72ce21cd9f5bee6784d4b06c7?d=https%3A%2F%2Fidenticons.github.com%2Fa5771bce93e200c36f7cd9dfd0e5deaa.png&r=x", + "gravatar_id"=>"a86224d72ce21cd9f5bee6784d4b06c7", + "url"=>"https://api.github.com/users/atmos", + "html_url"=>"https://github.com/atmos", + "type"=>"User", + "site_admin"=>true + } + } + end +end diff --git a/lib/service/events/gollum_helpers.rb b/lib/service/events/gollum_helpers.rb new file mode 100644 index 000000000..2a7d690d4 --- /dev/null +++ b/lib/service/events/gollum_helpers.rb @@ -0,0 +1,65 @@ +module Service::GollumHelpers + include Service::HelpersWithMeta + + def pages + payload['pages'] + end + + def summary_url + if pages.size == 1 + pages[0]['html_url'] + else + "#{payload['repository']['url']}/wiki" + end + end + + def summary_message + if pages.size == 1 + single_page_summary_message + else + pages_summary_message + end + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def single_page_summary_message + summary = pages[0]['summary'] + + '[%s] %s %s wiki page %s%s' % [ + repo.name, + sender.login, + pages[0]['action'], + pages[0]['title'], + summary ? ": #{summary}" : '', + ] + end + + def pages_summary_message + counts = {} + counts.default = 0 + pages.each { |page| counts[page['action']] += 1 } + + actions = [] + counts.each { |action, count| actions << "#{action} #{count}" } + + '[%s] %s %s wiki pages' % [ + repo.name, + sender.login, + actions.sort.to_sentence, + ] + end + + def self.sample_payload + Service::HelpersWithMeta.sample_payload.merge( + 'pages' => [{ + 'html_url' => 'https://github.com/mojombo/magik/wiki/Foo', + 'sha' => '0123456789abcdef0123456789abcdef01234567', + 'action' => 'created', + 'summary' => nil, + 'title' => 'Foo', + 'page_name' => 'Foo', + }] + ) + end +end diff --git a/lib/service/events/helpers/helpers_with_actions.rb b/lib/service/events/helpers/helpers_with_actions.rb new file mode 100644 index 000000000..fffc42a5a --- /dev/null +++ b/lib/service/events/helpers/helpers_with_actions.rb @@ -0,0 +1,9 @@ +module Service::HelpersWithActions + def action + payload['action'].to_s + end + + def opened? + action == 'opened' + end +end diff --git a/lib/service/events/helpers/helpers_with_meta.rb b/lib/service/events/helpers/helpers_with_meta.rb new file mode 100644 index 000000000..863268d7d --- /dev/null +++ b/lib/service/events/helpers/helpers_with_meta.rb @@ -0,0 +1,20 @@ +module Service::HelpersWithMeta + def repo + @repo ||= self.class.objectify(payload['repository']) + end + + def sender + @sender ||= self.class.objectify(payload['sender']) + end + + def self.sample_payload + { + "repository" => { + "name" => "grit", + "url" => "http://github.com/mojombo/grit", + "owner" => { "login" => "mojombo" } + }, + "sender" => { "login" => 'defunkt' } + } + end +end diff --git a/lib/service/events/issue_comment_helpers.rb b/lib/service/events/issue_comment_helpers.rb new file mode 100644 index 000000000..9d2089d60 --- /dev/null +++ b/lib/service/events/issue_comment_helpers.rb @@ -0,0 +1,45 @@ +module Service::IssueCommentHelpers + include Service::HelpersWithMeta, + Service::HelpersWithActions + + def issue + @issue ||= self.class.objectify(payload['issue']) + end + + def comment + @comment ||= self.class.objectify(payload['comment']) + end + + def summary_url + comment.html_url + end + + def summary_message + "[%s] %s comment on issue #%d: %s. %s" % [ + repo.name, + sender.login, + issue.number, + comment.body, + comment.html_url + ] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + Service::HelpersWithMeta.sample_payload.merge( + "action" => "created", + "issue" => { + "number" => 5, + "state" => "open", + "title" => "booya", + "body" => "boom town", + "user" => { "login" => "mojombo" } + }, + "comment" => { + "user" => { "login" => "defunkt" }, + "body" => "this\r\nis\r\ntest comment" + } + ) + end +end diff --git a/lib/service/events/issue_helpers.rb b/lib/service/events/issue_helpers.rb new file mode 100644 index 000000000..49c283148 --- /dev/null +++ b/lib/service/events/issue_helpers.rb @@ -0,0 +1,36 @@ +module Service::IssueHelpers + include Service::HelpersWithMeta, + Service::HelpersWithActions + + def issue + @issue ||= self.class.objectify(payload['issue']) + end + + def summary_url + issue.html_url + end + + def summary_message + "[%s] %s %s issue #%d: %s" % [ + repo.name, + sender.login, + action, + issue.number, + issue.title] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + Service::HelpersWithMeta.sample_payload.merge( + "action" => "opened", + "issue" => { + "number" => 5, + "state" => "open", + "title" => "booya", + "body" => "boom town", + "user" => { "login" => "mojombo" } + } + ) + end +end diff --git a/lib/service/events/public_helpers.rb b/lib/service/events/public_helpers.rb new file mode 100644 index 000000000..536a8dce7 --- /dev/null +++ b/lib/service/events/public_helpers.rb @@ -0,0 +1,20 @@ +module Service::PublicHelpers + include Service::HelpersWithMeta + + def summary_url + payload['repository']['url'] + end + + def summary_message + "[%s] %s made the repository public" % [ + repo.name, + sender.login, + ] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + Service::HelpersWithMeta.sample_payload + end +end diff --git a/lib/service/events/pull_request_helpers.rb b/lib/service/events/pull_request_helpers.rb new file mode 100644 index 000000000..3edc9948c --- /dev/null +++ b/lib/service/events/pull_request_helpers.rb @@ -0,0 +1,50 @@ +module Service::PullRequestHelpers + include Service::HelpersWithMeta, + Service::HelpersWithActions + + def pull + @pull ||= self.class.objectify(payload['pull_request']) + end + + def summary_url + pull.html_url + end + + def summary_message + base_ref = pull.base.label.split(':').last + head_ref = pull.head.label.split(':').last + + "[%s] %s %s pull request #%d: %s (%s...%s)" % [ + repo.name, + sender.login, + action, + pull.number, + pull.title, + base_ref, + head_ref != base_ref ? head_ref : pull.head.label] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + repo_owner = "mojombo" + repo_name = "magik" + pull_user = "foo" + pull_number = 5 + Service::HelpersWithMeta.sample_payload.merge( + "action" => "opened", + "pull_request" => { + "number" => pull_number, + "commits" => 1, + "state" => "open", + "title" => "booya", + "body" => "boom town", + "user" => { "login" => "#{pull_user}" }, + "head" => {"label" => "#{pull_user}:feature"}, + "base" => {"label" => "#{repo_owner}:master"}, + "html_url" => "https://github.com/#{repo_owner}/#{repo_name}/pulls/#{pull_number}" + } + ) + end +end + diff --git a/lib/service/events/pull_request_review_comment_helpers.rb b/lib/service/events/pull_request_review_comment_helpers.rb new file mode 100644 index 000000000..1e7a14c9f --- /dev/null +++ b/lib/service/events/pull_request_review_comment_helpers.rb @@ -0,0 +1,62 @@ +module Service::PullRequestReviewCommentHelpers + include Service::HelpersWithMeta + + def comment + @comment ||= self.class.objectify(payload['comment']) + end + + def summary_url + comment.html_url + end + + def pull_request_number + comment.pull_request_url =~ /\/(\d+)$/ + $1 + end + + def summary_message + "[%s] %s comment on pull request #%d %s: %s. %s" % [ + repo.name, + sender.login, + pull_request_number, + comment.commit_id, + comment.body, + comment.html_url + ] + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def self.sample_payload + repo_owner = "mojombo" + repo_name = "magik" + pull_user = "foo" + pull_number = 5 + comment_id = 18785396 + commit_id = "03af7b9daa89ea2821116adaabf78620a14346a0" + + Service::HelpersWithMeta.sample_payload.merge( + "comment" => { + "url" => "https://api.github.com/repos/#{repo_owner}/#{repo_name}/pulls/comments/#{comment_id}", + "id" => comment_id, + "user" => { "login" => "defunkt", }, + "body" => "very\r\ncool", + "commit_id" => commit_id, + "original_commit_id" => commit_id, + "html_url" => "https://github.com/#{repo_owner}/#{repo_name}/pull/#{pull_number}#discussion_r#{comment_id}", + "pull_request_url" => "https://api.github.com/repos/#{repo_owner}/#{repo_name}/pulls/#{pull_number}", + "_links" => { + "self" => { + "href" => "https://api.github.com/repos/#{repo_owner}/#{repo_name}/pulls/comments/#{comment_id}" + }, + "html" => { + "href" => "https://github.com/#{repo_owner}/#{repo_name}/pull/#{pull_number}#discussion_r#{comment_id}" + }, + "pull_request" => { + "href" => "https://api.github.com/#{repo_owner}/#{repo_name}/test/pulls/#{pull_number}" + } + } + } + ) + end +end diff --git a/lib/service/events/push_helpers.rb b/lib/service/events/push_helpers.rb new file mode 100644 index 000000000..f6ebb7eb1 --- /dev/null +++ b/lib/service/events/push_helpers.rb @@ -0,0 +1,228 @@ +# This is a set of common helpers for Push events. +module Service::PushHelpers + def created? + payload['created'] || !!(payload['before'] =~ /0{40}/) + end + + def deleted? + payload['deleted'] || !!(payload['after'] =~ /0{40}/) + end + + def forced? + payload['forced'] + end + + def ref + payload['ref'].to_s + end + + def base_ref + payload['base_ref'] + end + + def tag? + !!(ref =~ %r|^refs/tags/|) + end + + def ref_name + payload['ref_name'] ||= ref.sub(/\Arefs\/(heads|tags)\//, '') + end + alias :tag_name :ref_name + alias :branch_name :ref_name + + def base_ref_name + payload['base_ref_name'] ||= base_ref.sub(/\Arefs\/(heads|tags)\//, '') + end + + def before_sha + payload['before'][0..6] + end + + def after_sha + payload['after'][0..6] + end + + def format_commit_message(commit) + short = commit['message'].split("\n", 2).first + "[#{repo_name}/#{branch_name}] #{short} - #{commit['author']['name']}" + end + + def commit_messages + distinct_commits.map do |commit| + format_commit_message(commit) + end + end + + def summary_message + message = [] + message << "[#{repo_name}] #{pusher_name}" + + if created? + if tag? + message << "tagged #{tag_name} at" + message << (base_ref ? base_ref_name : after_sha) + else + message << "created #{branch_name}" + + if base_ref + message << "from #{base_ref_name}" + elsif distinct_commits.empty? + message << "at #{after_sha}" + end + + if distinct_commits.any? + num = distinct_commits.size + message << "(+#{num} new commit#{num > 1 ? 's' : ''})" + end + end + + elsif deleted? + message << "deleted #{branch_name} at #{before_sha}" + + elsif forced? + message << "force-pushed #{branch_name} from #{before_sha} to #{after_sha}" + + elsif commits.any? and distinct_commits.empty? + if base_ref + message << "merged #{base_ref_name} into #{branch_name}" + else + message << "fast-forwarded #{branch_name} from #{before_sha} to #{after_sha}" + end + + elsif distinct_commits.any? + num = distinct_commits.size + message << "pushed #{num} new commit#{num > 1 ? 's' : ''} to #{branch_name}" + + else + message << "pushed nothing" + end + + message.join(' ') + end + + def summary_url + if created? + if distinct_commits.empty? + branch_url + else + compare_url + end + + elsif deleted? + before_sha_url + + elsif forced? + branch_url + + elsif distinct_commits.size == 1 + distinct_commits.first['url'] + + else + compare_url + end + end + + def repo_url + payload['repository']['url'] + end + + def compare_url + payload['compare'] + end + + def branch_url + repo_url + "/commits/#{branch_name}" + end + + def before_sha_url + repo_url + "/commit/#{before_sha}" + end + + def after_sha_url + repo_url + "/commit/#{after_sha}" + end + + def pusher_name + payload.include?('pusher') ? payload['pusher']['name'] : "somebody" + end + + def owner_name + payload['repository']['owner']['name'] + end + + def repo_name + payload['repository']['name'] + end + + def name_with_owner + File.join(owner_name, repo_name) + end + + def commits + Array(payload['commits']) + end + + def distinct_commits + payload['distinct_commits'] ||= Array(commits.select do |commit| + commit['distinct'] and !commit['message'].to_s.strip.empty? + end) + end + + def self.sample_payload + { + "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "http://github.com/mojombo/grit/compare/4c8124f...a47fd41", + + "repository" => { + "name" => "grit", + "url" => "http://github.com/mojombo/grit", + "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" }, + "master_branch" => "master", + "default_branch" => "master", + "private" => false + }, + + "pusher" => { + "name" => "rtomayko" + }, + + "commits" => [ + { + "distinct" => true, + "removed" => [], + "message" => "stub git call for Grit#heads test f:15 Case#1", + "added" => [], + "timestamp" => "2007-10-10T00:11:02-07:00", + "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "06f63b43050935962f84fe54473a7c5de7977325" + }, + { + "distinct" => true, + "removed" => [], + "message" => "clean up heads test f:2hrs", + "added" => [], + "timestamp" => "2007-10-10T00:18:20-07:00", + "modified" => ["test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/5057e76a11abd02e83b7d3d3171c4b68d9c88480", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "5057e76a11abd02e83b7d3d3171c4b68d9c88480" + }, + { + "distinct" => true, + "removed" => [], + "message" => "add more comments throughout", + "added" => [], + "timestamp" => "2007-10-10T00:50:39-07:00", + "modified" => ["lib/grit.rb", "lib/grit/commit.rb", "lib/grit/grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425" + } + ] + } + end +end diff --git a/lib/service/events/status_helpers.rb b/lib/service/events/status_helpers.rb new file mode 100644 index 000000000..889ebd8d7 --- /dev/null +++ b/lib/service/events/status_helpers.rb @@ -0,0 +1,108 @@ +module Service::StatusHelpers + def self.sample_status_payload + {"sha"=>"7b80eb100206a56523dbda6202d8e5daa05e265b", + "name"=>"mojombo/grit", + "target_url"=>nil, + "context"=>"default", + "description"=>nil, + "state"=>"success", + "branches"=> [ + { + "name"=>"master", + "commit"=> { + "sha"=>"69a8b72e2d3d955075d47f03d902929dcaf74033", + "url"=> "https://api.github.com/repos/mojombo/grit/commits/69a8b72e2d3d955075d47f03d902929dcaf74033" + } + }, + { + "name"=>"changes", + "commit"=> { + "sha"=>"05c588ba8cd510ecbe112d020f215facb17817a6", + "url"=> "https://api.github.com/repos/mojombo/grit/commits/05c588ba8cd510ecbe112d020f215facb17817a6" + } + }, + { + "name"=>"gh-pages", + "commit"=> { + "sha"=> "993b46bdfc03ae59434816829162829e67c4d490", + "url"=> "https://api.github.com/repos/mojombo/grit/commits/993b46bdfc03ae59434816829162829e67c4d490" + } + } + ], + "commit"=> { + "sha"=>"7b80eb100206a56523dbda6202d8e5daa05e265b", + "commit" => { + "author" => { + "name" =>"rtomayko", + "email" =>"rtomayko@users.noreply.github.com", + "date" =>"2014-05-20T22:26:15Z" + }, + "committer" => { + "name"=>"rtomayko", + "email"=>"rtomayko@users.noreply.github.com", + "date"=>"2014-05-20T22:26:15Z" + }, + "message"=>"Create README.md", + "tree"=> { + "sha"=>"aa81d3d185d48ac4eb935b57d9aa54e8eb0dcd9d", + "url"=> "https://api.github.com/repos/mojombo/grit/git/trees/aa81d3d185d48ac4eb935b57d9aa54e8eb0dcd9d" + }, + "url"=> "https://api.github.com/repos/mojombo/grit/git/commits/7b80eb100206a56523dbda6202d8e5daa05e265b", + "comment_count"=>23 + }, + "url"=> "https://api.github.com/repos/mojombo/grit/commits/7b80eb100206a56523dbda6202d8e5daa05e265b", + "html_url"=> "https://github.com/mojombo/grit/commit/7b80eb100206a56523dbda6202d8e5daa05e265b", + "comments_url"=> "https://api.github.com/repos/mojombo/grit/commits/7b80eb100206a56523dbda6202d8e5daa05e265b/comments", + "author"=> { + "login"=>"rtomayko", + "id"=>6752317, + "avatar_url"=>"https://avatars.githubusercontent.com/u/6752317?", + "gravatar_id"=>"258ae60b5512c8402b93673b7478d9c6", + "url"=>"https://api.github.com/users/rtomayko", + "type"=>"User", + "site_admin"=>false + }, + "committer"=> { + "login"=>"rtomayko", + "id"=>6752317, + "avatar_url"=>"https://avatars.githubusercontent.com/u/6752317?", + "gravatar_id"=>"258ae60b5512c8402b93673b7478d9c6", + "url"=>"https://api.github.com/users/rtomayko", + "type"=>"User", + "site_admin"=>false + }, + "parents"=>[] + }, + "repository"=> { + "id"=>20000106, + "name"=>"grit", + "full_name"=>"mojombo/grit", + "owner"=> { + "login"=>"rtomayko", + "id"=>6752317, + "avatar_url"=>"https://avatars.githubusercontent.com/u/6752317?", + "gravatar_id"=>"258ae60b5512c8402b93673b7478d9c6", + "url"=>"https://api.github.com/users/rtomayko", + "type"=>"User", + "site_admin"=>false + }, + "private"=>false, + "html_url"=>"https://github.com/mojombo/grit", + "description"=>"", + "fork"=>false, + "url"=>"https://api.github.com/repos/mojombo/grit", + "default_branch"=>"master" + }, + "sender"=> { + "login"=>"rtomayko", + "id"=>6752317, + "avatar_url"=>"https://avatars.githubusercontent.com/u/6752317?", + "gravatar_id"=>"258ae60b5512c8402b93673b7478d9c6", + "url"=>"https://api.github.com/users/rtomayko", + "received_events_url"=> "https://api.github.com/users/rtomayko/received_events", + "type"=>"User", + "site_admin"=>false + } + } + end +end diff --git a/lib/service/http_helper.rb b/lib/service/http_helper.rb new file mode 100644 index 000000000..ce8024bec --- /dev/null +++ b/lib/service/http_helper.rb @@ -0,0 +1,98 @@ +class Service + module HttpHelper + HMAC_DIGEST = OpenSSL::Digest.new('sha1') + + def deliver(url_value, options = {}) + insecure = options[:insecure_ssl] + ctype = options[:content_type] + secret = options[:secret] + + wrap_http_errors do + url = set_url(url_value) + + if insecure + http.ssl[:verify] = false + end + + body = encode_body(ctype) + + set_body_signature(body, secret) + + http_post url, body + end + end + + # Grabs a sanitized configuration value. + def config_value(key) + value = data[key.to_s].to_s + value.strip! + value + end + + # Grabs a sanitized configuration value and ensures it is set. + def required_config_value(key) + if (value = config_value(key)).empty? + raise_config_error("#{key.inspect} is empty") + end + + value + end + + def wrap_http_errors + yield + rescue Addressable::URI::InvalidURIError, Errno::EHOSTUNREACH + raise_missing_error $!.to_s + rescue SocketError + if $!.to_s =~ /getaddrinfo:/ + raise_missing_error "Invalid host name." + else + raise + end + rescue EOFError + raise_config_error "Invalid server response. Make sure the URL uses the correct protocol." + end + + def set_url(url) + url = url.to_s + url.gsub! /\s/, '' + + if url.empty? + raise_config_error "Invalid URL: #{url.inspect}" + end + + if url !~ /^https?\:\/\// + url = "http://#{url}" + end + + # set this so that basic auth is added, + # and GET params are added to the POST body + http.url_prefix = url + + url + end + + def set_body_signature(body, secret) + return if (secret = secret.to_s).empty? + http.headers['X-Hub-Signature'] = + 'sha1='+OpenSSL::HMAC.hexdigest(HMAC_DIGEST, secret, body) + end + + def original_body + raise NotImplementedError + end + + def encode_body(content_type = nil) + method = "encode_body_as_#{content_type}" + respond_to?(method) ? send(method) : default_encode_body + end + + def default_encode_body + encode_body_as_json + end + + def encode_body_as_json + http.headers['content-type'] = 'application/json' + generate_json(original_body) + end + end +end diff --git a/lib/service/structs.rb b/lib/service/structs.rb new file mode 100644 index 000000000..66a1b7914 --- /dev/null +++ b/lib/service/structs.rb @@ -0,0 +1,36 @@ +class Service + module StructLoading + def from(hash) + new *members.map { |attr| hash[attr.to_s] } + end + end + + class Meta < Struct.new(:id, :sender, :repository) + def self.from(hash) + sender = User.from(hash['sender']) + repository = Repository.from(hash['repository']) + repository.owner = User.from(hash['user']) + new hash['id'], sender, repository + end + end + + class User < Struct.new(:id, :login, :gravatar_id) + extend StructLoading + + def url + "https://github.com/#{login}" + end + end + + class Repository < Struct.new(:id, :source_id, :name, :owner) + extend StructLoading + + def name_with_owner + @name_with_owner ||= "#{owner.login}/#{name}" + end + + def url + owner.url << "/#{name}" + end + end +end diff --git a/lib/services/README.md b/lib/services/README.md new file mode 100644 index 000000000..8bdeeb57e --- /dev/null +++ b/lib/services/README.md @@ -0,0 +1,86 @@ +# Services + +This is the directory that all Services go. Creating a Service is +simple: + +```ruby +class Service::MyService < Service + def receive_push + end +end +``` + +Inside the method, you can access the configuration data in a hash named +`data`, and the payload data in a Hash named `payload`. + +Note: A service can respond to more than one event. + +## Tip: Check configuration data early. + +```ruby +class Service::MyService < Service + def receive_push + if data['username'].to_s.empty? + raise_config_error "Needs a username" + end + end +end +``` + +## Tip: Use `http` helpers to make HTTP calls easily. + +```ruby +class Service::MyService < Service + def receive_push + # Sets this basic auth info for every request. + http.basic_auth(data['username'], data['password']) + + # Every request sends JSON. + http.headers['Content-Type'] = 'application/json' + + # Uses this URL as a prefix for every request. + http.url_prefix = "https://my-service.com/api" + + payload['commits'].each do |commit| + + # POST https://my-service.com/api/commits.json + http_post "commits.json", commit.to_json + + end + end +end +``` + +## Tip: Test your service like a boss. + +```ruby +class MyServiceTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/create.json" do |env| + assert_equal 'my-service.com', env[:url].host + assert_equal 'application/json', + env[:request_headers]['content-type'] + assert_equal basic_auth("user", "pass"), + env[:request_headers]['authorization'] + [200, {}, ''] + end + + svc = service :push, + {'username' => 'user', 'password' => 'pass'}, payload + svc.receive_push + end + + def service(*args) + super Service::MyService, *args + end +end +``` + +## Documentation + +Each Service needs to have documentation aimed at end users in /docs. +See existing services for the format. diff --git a/lib/services/active_collab.rb b/lib/services/active_collab.rb new file mode 100644 index 000000000..64f4ebe21 --- /dev/null +++ b/lib/services/active_collab.rb @@ -0,0 +1,60 @@ +require 'bigdecimal' +require 'date' +require 'jcode' if RUBY_VERSION < '1.9' +require 'net/http' +require 'net/https' +require 'time' +require 'rexml/document' +require 'uri' + +class Service::ActiveCollab < Service + string :url, :project_id, :milestone_id, :category_id + password :token + white_list :url, :project_id, :milestone_id, :category_id + + def receive_push + if data['url'].to_s.empty? + raise_config_error "Need an activeCollab Url" + end + if data['token'].to_s.empty? + raise_config_error "Need an API Token" + end + if data['project_id'].to_s.empty? + raise_config_error "Need a Project ID" + end + + statuses = [ ] + repository = payload['repository']['name'] + + push_message = "New Commits made in #{payload['pusher']['name']} / #{repository}" + + payload['commits'].each do |commit| + author = commit['author'] || {} + tiny_url = shorten_url(commit['url']) + statuses << "[#{repository}] #{tiny_url} #{author['name']} - #{commit['message']}" + end + + build_message = statuses * "\n" + + url = data['url'] + body = params(push_message, build_message) + headers = {:Accept => 'application/xml'} + params = { + :path_info => "projects/#{data['project_id']}/discussions/add", + :token => data['token'] + } + + http_post url, body, headers, params + end + + def params(name, message) + { + "submitted" => "submitted", + "discussion[name]" => "#{name}", + "discussion[body]" => "#{message}", + "discussion[milestone_id]" => data['milestone_id'], + "discussion[parent_id]" => data['category_id'], + "discussion[visibility]" => 1, + } + end +end diff --git a/lib/services/acunote.rb b/lib/services/acunote.rb new file mode 100644 index 000000000..de8df4b6a --- /dev/null +++ b/lib/services/acunote.rb @@ -0,0 +1,13 @@ +class Service::Acunote < Service + password :token + + def receive_push + res = http_post "https://www.acunote.com/source_control/github/%s" % + [ data['token'] ], + {'payload' => generate_json(payload)} + + if res.status != 200 + raise_config_error + end + end +end diff --git a/lib/services/amazon_sns.rb b/lib/services/amazon_sns.rb new file mode 100644 index 000000000..90a39c737 --- /dev/null +++ b/lib/services/amazon_sns.rb @@ -0,0 +1,143 @@ +require 'aws-sdk-core' +require 'digest' + +class Service::AmazonSNS < Service + self.title = "Amazon SNS" + + string :aws_key, :sns_topic, :sns_region + + password :aws_secret + + white_list :aws_key, :sns_topic, :sns_region + + url "http://aws.amazon.com/console" + + maintained_by :github => "davidkelley" + + # Manage an event. Validate the data that has been received + # and then publish to SNS. + # + # Returns nothing. + def receive_event + validate_data + publish_to_sns(data, generate_json(payload)) + end + + # Maximum SNS message size is 256 kilobytes. + MAX_MESSAGE_SIZE = 256 * 1024 + + # Size in bytes for each partial message. + PARTIAL_MESSAGE_SIZE = 128 * 1024 + + # Create a new SNS object using the AWS Ruby SDK and publish to it. + # If the message exceeds the maximum SNS size limit of 256K, then it will be + # sent in parts. + # cfg - Configuration hash of key, secret, etc. + # json - The valid JSON payload to send. + # + # Returns the instantiated Amazon SNS Object + def publish_to_sns(cfg, json) + if json.bytesize <= MAX_MESSAGE_SIZE + return publish_messages_to_sns(cfg, [json]) + end + + checksum = Digest::MD5.hexdigest(json) + payloads = split_bytes(json, PARTIAL_MESSAGE_SIZE) + + messages = payloads.each_with_index.map do |payload, i| + generate_json({ + :error => "Message exceeds the maximum SNS size limit of 256K", + :page_total => payloads.length, + :page_number => i + 1, + :checksum => checksum, + :message => payload + }) + end + + publish_messages_to_sns(cfg, messages) + end + + # Build a valid AWS Configuration hash using the supplied + # parameters. + # + # Returns a valid AWS Config Hash. + def config(key, secret) + { + access_key_id: key, + secret_access_key: secret, + } + end + + # Build a valid set of message attributes for this message. + # + # Returns a valid Hash of message attributes. + def message_attributes + { + "X-Github-Event" => { + :data_type => "String", + :string_value => event.to_s + } + } + end + + # Validate the data that has been passed to the event. + # An AWS Key & Secret are required. As well as the ARN of an SNS topic. + # Defaults region to us-east-1 if not set. + # + # Returns nothing + def validate_data + if data['aws_key'].to_s.empty? || data['aws_secret'].to_s.empty? + raise_config_error "You need to provide an AWS Key and Secret Access Key" + end + + if data['sns_topic'].to_s.empty? || !data['sns_topic'].downcase[0..3] == 'arn' + raise_config_error "You need to provide a full SNS Topic ARN" + end + + data['sns_region'] = "us-east-1" if data['sns_region'].to_s.empty? + end + + private + + # Split the string into chunks of n bytes. + # + # Returns an array of strings. + def split_bytes(string, n) + string.bytes.each_slice(n).collect { |bytes| bytes.pack("C*") } + end + + # Create a new SNS object using the AWS Ruby SDK and publish it. + # cfg - Configuration hash of key, secret, etc. + # messages - The valid JSON messages to send. + # + # Returns the instantiated Amazon SNS Object. + def publish_messages_to_sns(cfg, messages) + begin + sns = Aws::SNS::Client.new({ + :region => cfg['sns_region'], + :access_key_id => cfg['aws_key'], + :secret_access_key => cfg['aws_secret'] + }) + + messages.each_with_index do |message, i| + puts "message ##{i} is #{message.bytesize} bytes" + sns.publish({ + :message => message, + :topic_arn => cfg['sns_topic'], + :message_attributes => message_attributes + }) + puts "finished publishing message ##{i}" + end + + sns + + rescue Aws::SNS::Errors::AuthorizationErrorException => e + raise_config_error e.message + rescue Aws::SNS::Errors::NotFoundException => e + raise_missing_error e.message + rescue SocketError + raise_missing_error + end + end + +end diff --git a/lib/services/apiary.rb b/lib/services/apiary.rb new file mode 100644 index 000000000..051ebd719 --- /dev/null +++ b/lib/services/apiary.rb @@ -0,0 +1,33 @@ +class Service::Apiary < Service::HttpPost + string :branch, :domain + white_list :branch + default_events :push + + url "http://apiary.io" + logo_url "http://static.apiary.io/css/design2/apiary-io-symbol-1x.png" + maintained_by :github => 'tu1ly' + supported_by :web => 'http://support.apiary.io/', + :email => 'support@apiary.io' + + APIARY_URL = "http://api.apiary.io/github/service-hook" + + def make_apiary_call + return true if not domain + http_post APIARY_URL, + :payload => generate_json(payload), + :branch => branch, + :vanity => domain + end + + def branch + @branch ||= (not data['branch'].to_s.strip.empty?) ? data['branch'].to_s.strip : 'master' + end + + def domain + @domain ||= (not data['domain'].to_s.strip.empty?) ? data['domain'].to_s.strip : nil + end + + def receive_event + return make_apiary_call + end +end diff --git a/lib/services/appharbor.rb b/lib/services/appharbor.rb new file mode 100644 index 000000000..eccab97cf --- /dev/null +++ b/lib/services/appharbor.rb @@ -0,0 +1,40 @@ +class Service::AppHarbor < Service + string :application_slug + password :token + white_list :application_slug + + def receive_push + slugs = data['application_slug'] + token = data['token'] + + raise_config_error 'Missing application slug' if slugs.to_s.empty? + raise_config_error 'Missing token' if token.to_s.empty? + + slugs.split(",").each do |slug| + slug.strip! + post_appharbor_message(slug, token) + end + end + +private + + def post_appharbor_message(slug, token) + return unless commit = distinct_commits.last + create_build_url = "https://appharbor.com/applications/#{slug}/builds" + + appharbor_message = { + :branches => { + ref_name => { + :commit_id => commit['id'], + :commit_message => commit['message'], + :download_url => commit['url'].sub('commit', 'tarball') + } + } + } + + http.headers['Accept'] = 'application/json' + http.headers['Authorization'] = "BEARER #{token}" + + http_post create_build_url, generate_json(appharbor_message) + end +end diff --git a/lib/services/apropos.rb b/lib/services/apropos.rb new file mode 100644 index 000000000..4ba3f0ccf --- /dev/null +++ b/lib/services/apropos.rb @@ -0,0 +1,41 @@ + +class Service::Apropos < Service::HttpPost + default_events :commit_comment, :issues, :issue_comment, :pull_request, :push + string :project_id + + def apropos_url + proj_id = appid = required_config_value('project_id') + "http://www.apropos.io/api/v1/githook/#{proj_id}" + end + + def receive_commit_comment + http.headers['content-type'] = 'application/json' + http.headers['X-Github-Event'] = 'commit_comment' + deliver apropos_url + end + + def receive_issue_comment + http.headers['content-type'] = 'application/json' + http.headers['X-Github-Event'] = 'issue_comment' + deliver apropos_url + end + + def receive_pull_request + http.headers['content-type'] = 'application/json' + http.headers['X-Github-Event'] = 'pull_request' + deliver apropos_url + end + + def receive_issues + http.headers['content-type'] = 'application/json' + http.headers['X-Github-Event'] = 'issues' + deliver apropos_url + end + + def receive_push + http.headers['content-type'] = 'application/json' + http.headers['X-Github-Event'] = 'push' + deliver apropos_url + end + +end diff --git a/lib/services/asana.rb b/lib/services/asana.rb new file mode 100644 index 000000000..0ab2986cf --- /dev/null +++ b/lib/services/asana.rb @@ -0,0 +1,67 @@ +class Service::Asana < Service + password :auth_token + string :restrict_to_branch + boolean :restrict_to_last_commit + white_list :restrict_to_branch, :restrict_to_last_commit + + def receive_push + # make sure we have what we need + raise_config_error "Missing 'auth_token'" if data['auth_token'].to_s == '' + + user = payload['pusher']['name'] + branch = payload['ref'].split('/').last + + branch_restriction = data['restrict_to_branch'].to_s + commit_restriction = config_boolean_true?('restrict_to_last_commit') + + # check the branch restriction is poplulated and branch is not included + if branch_restriction.length > 0 && branch_restriction.index(branch) == nil + return + end + + rep = payload['repository']['url'].split('/').last(2).join('/') + push_msg = user + " pushed to branch " + branch + " of " + rep + + # code heavily derived from fog_bugz.rb + # iterate over commits + if commit_restriction + check_commit( payload['commits'].last, push_msg ) + else + payload['commits'].each do |commit| + check_commit( commit, push_msg ) + end + end + end + + def check_commit(commit, push_msg) + message = "(#{commit['url']})\n- #{commit['message']}" + + task_list = [] + message.split("\n").each do |line| + task_list.concat( line.scan(/#(\d+)/) ) + task_list.concat( line.scan(/https:\/\/app\.asana\.com\/\d+\/\d+\/(\d+)/) ) + end + + # post commit to every taskid found + task_list.flatten.each do |taskid| + deliver_story taskid, "#{push_msg} #{message}" + end + end + + def deliver_story(task_id, text) + http.basic_auth(data['auth_token'], "") + http.headers['X-GitHub-Event'] = event.to_s + + res = http_post "https://app.asana.com/api/1.0/tasks/#{task_id}/stories", URI.encode_www_form("text" => text) + case res.status + when 200..299 + # Success + when 400 + # Unknown task. Could be GitHub issue or pull request number. Ignore it. + else + # Try to pull out an error message from the Asana response + error_message = JSON.parse(res.body)['errors'][0]['message'] rescue nil + raise_config_error(error_message || "Unexpected Error") + end + end +end diff --git a/lib/services/auto_deploy.rb b/lib/services/auto_deploy.rb new file mode 100644 index 000000000..d4cc8a116 --- /dev/null +++ b/lib/services/auto_deploy.rb @@ -0,0 +1,207 @@ +class Service::AutoDeploy < Service::HttpPost + password :github_token + string :environments + boolean :deploy_on_status + string :github_api_url + + white_list :environments, :deploy_on_status, :contexts, :github_api_url + + default_events :push, :status + + self.title = "GitHub Auto-Deployment" + url 'http://www.atmos.org/github-services/auto-deployment/' + logo_url 'https://camo.githubusercontent.com/edbc46e94fd4e9724da99bdd8da5d18e82f7b737/687474703a2f2f7777772e746f756368696e737069726174696f6e2e636f6d2f6173736574732f6865726f6b752d6c6f676f2d61663863386230333462346261343433613632376232393035666337316138362e706e67' + + maintained_by :github => 'atmos', :twitter => '@atmos' + + supported_by :web => 'https://github.com/contact', + :email => 'support@github.com', + :twitter => '@atmos' + + def github_repo_path + if payload['repository'] && payload['repository']['full_name'] + payload['repository']['full_name'] + else + [ payload['repository']['owner']['name'], + payload['repository']['name'] ].join('/') + end + end + + def environment_names + @environment_names ||= required_config_value("environments").split(',').map { |e| e.strip } + end + + def payload_ref + payload['ref'].to_s[/refs\/heads\/(.*)/, 1] + end + + def sha + if payload['after'] + payload['after'][0..7] + else + payload['sha'][0..7] + end + end + + def pusher_name + if payload['pusher'] + payload['pusher']['name'] + else + payload['commit']['committer']['login'] + end + end + + def default_branch + payload['repository']['default_branch'] + end + + def default_branch? + payload_ref == default_branch + end + + def deploy_on_push? + !deploy_on_status? + end + + def deploy_on_status? + config_boolean_true?('deploy_on_status') + end + + def version_string + payload_ref == sha ? sha : "#{payload_ref}@#{sha}" + end + + def receive_event + http.ssl[:verify] = true + + case event.to_sym + when :push + github_user_access? + github_repo_deployment_access? + deploy_from_push_payload if deploy_on_push? + when :status + github_user_access? + github_repo_deployment_access? + deploy_from_status_payload if deploy_on_status? + else + raise_config_error_with_message(:no_event_handler) + end + end + + def push_deployment_description + "Auto-Deployed on push by GitHub Services@#{Service.current_sha[0..7]} for #{pusher_name} - #{version_string}" + end + + def status_deployment_description + "Auto-Deployed on status by GitHub Services@#{Service.current_sha[0..7]} for #{pusher_name} - #{default_branch}@#{sha}" + end + + def deploy_from_push_payload + return unless default_branch? + + environment_names.each do |environment_name| + deployment_options = { + "ref" => sha, + "payload" => last_deployment_payload_for(environment_name), + "environment" => environment_name, + "description" => push_deployment_description, + "required_contexts" => [ ] + } + create_deployment_for_options(deployment_options) + end + end + + def status_payload_contains_default_branch? + payload['branches'].any? { |branch| branch['name'] == default_branch } + end + + def deploy_from_status_payload + return unless payload['state'] == 'success' + if status_payload_contains_default_branch? + environment_names.each do |environment_name| + deployment_options = { + "ref" => sha, + "payload" => last_deployment_payload_for(environment_name), + "environment" => environment_name, + "description" => status_deployment_description, + "required_contexts" => [ ] + } + create_deployment_for_options(deployment_options) + end + end + end + + def api_url + if config_value("github_api_url").empty? + "https://api.github.com" + else + config_value("github_api_url").chomp("/") + end + end + + def create_deployment_for_options(options) + deployment_path = "/repos/#{github_repo_path}/deployments" + response = http_post "#{api_url}#{deployment_path}" do |req| + req.headers.merge!(default_github_headers) + req.body = JSON.dump(options) + end + raise_config_error_with_message(:no_github_deployment_access) unless response.success? + end + + def last_deployment_payload_for(environment) + response = github_get("/repos/#{github_repo_path}/deployments") + unless response.success? + raise_config_error_with_message(:no_github_repo_deployment_access) + end + deployment = JSON.parse(response.body).find do |element| + element['environment'] == environment + end + deployment ? deployment['payload'] : { } + end + + def github_user_access? + response = github_get("/user") + unless response.success? + raise_config_error_with_message(:no_github_user_access) + end + end + + def github_repo_deployment_access? + response = github_get("/repos/#{github_repo_path}/deployments") + unless response.success? + raise_config_error_with_message(:no_github_repo_deployment_access) + end + end + + def github_get(path) + http_get "#{api_url}#{path}" do |req| + req.headers.merge!(default_github_headers) + end + end + + def default_github_headers + { + 'Accept' => "application/vnd.github.cannonball-preview+json", + 'User-Agent' => "Operation: California Auto-Deploy", + 'Content-Type' => "application/json", + 'Authorization' => "token #{required_config_value('github_token')}" + } + end + + def raise_config_error_with_message(sym) + raise_config_error(error_messages[sym]) + end + + def error_messages + @default_error_messages ||= { + :no_event_handler => + "The #{event} event is currently unsupported.", + :no_github_user_access => + "Unable to access GitHub with the provided token.", + :no_github_repo_deployment_access => + "Unable to access the #{github_repo_path} repository's deployments on GitHub with the provided token.", + :no_github_repo_deployment_status_access => + "Unable to update the deployment status on GitHub with the provided token." + } + end +end diff --git a/lib/services/aws_code_deploy.rb b/lib/services/aws_code_deploy.rb new file mode 100644 index 000000000..52940b28a --- /dev/null +++ b/lib/services/aws_code_deploy.rb @@ -0,0 +1,149 @@ +require 'aws-sdk-core' + +class Service::AwsCodeDeploy < Service::HttpPost + self.title = 'AWS CodeDeploy' + + string :application_name, :deployment_group, + :aws_access_key_id, :aws_region, :github_api_url + + password :aws_secret_access_key, :github_token + + white_list :application_name, + :deployment_group, + :github_api_url, + :aws_access_key_id, + :aws_region + + default_events :deployment + url "http://docs.aws.amazon.com/codedeploy/latest/APIReference/" + + def environment + payload['deployment']['environment'] + end + + def application_name + environment_application_name || required_config_value('application_name') + end + + def environment_application_name + codedeploy_payload_environment('application_name') + end + + def codedeploy_payload_environment(key) + codedeploy_payload && + codedeploy_payload[environment] && + codedeploy_payload[environment][key] + end + + def codedeploy_payload + payload['deployment']['payload'] && + payload['deployment']['payload']['config'] && + payload['deployment']['payload']['config']['codedeploy'] + end + + def receive_event + http.ssl[:verify] = true + + case event.to_s + when 'deployment' + deployment = create_deployment + update_deployment_statuses(deployment) + deployment + else + raise_config_error("The #{event} event is currently unsupported.") + end + end + + def create_deployment + options = { + :revision => { + :git_hub_location => { + :commit_id => payload['deployment']["sha"], + :repository => github_repo_path, + }, + :revision_type => "GitHub" + }, + + :application_name => application_name, + :deployment_group_name => environment + } + code_deploy_client.create_deployment(options) + end + + def update_deployment_statuses(deployment) + return unless config_value('github_token') && !config_value('github_token').empty? + + deployment_id = deployment['deployment_id'] + + deployment_status_options = { + "state" => "success", + "target_url" => aws_code_deploy_client_url, + "description" => "Deployment #{payload['deployment']['id']} Accepted by Amazon. (github-services@#{Service.current_sha[0..7]})" + } + + deployment_path = "/repos/#{github_repo_path}/deployments/#{payload['deployment']['id']}/statuses" + response = http_post "#{github_api_url}#{deployment_path}" do |req| + req.headers.merge!(default_github_headers) + req.body = JSON.dump(deployment_status_options) + end + raise_config_error("Unable to post deployment statuses back to the GitHub API.") unless response.success? + end + + def aws_code_deploy_client_url + "https://console.aws.amazon.com/codedeploy/home?region=#{custom_aws_region}#/deployments" + end + + def default_github_headers + { + 'Accept' => "application/vnd.github.cannonball-preview+json", + 'User-Agent' => "Operation: California", + 'Content-Type' => "application/json", + 'Authorization' => "token #{required_config_value('github_token')}" + } + end + + def github_repo_path + payload['repository']['full_name'] + end + + def code_deploy_aws_region + (codedeploy_payload && + codedeploy_payload["aws"] && + codedeploy_payload["aws"]["region"]) + end + + def custom_aws_region + return code_deploy_aws_region if code_deploy_aws_region + if config_value('aws_region').empty? + 'us-east-1' + else + config_value('aws_region') + end + end + + def stubbed_responses? + !!ENV['CODE_DEPLOY_STUB_RESPONSES'] + end + + def aws_config + { + :region => custom_aws_region, + :logger => stubbed_responses? ? nil : Logger.new(STDOUT), + :access_key_id => required_config_value("aws_access_key_id"), + :secret_access_key => required_config_value("aws_secret_access_key"), + :stub_responses => stubbed_responses? + } + end + + def code_deploy_client + @code_deploy_client ||= ::Aws::CodeDeploy::Client.new(aws_config) + end + + def github_api_url + if config_value("github_api_url").empty? + "https://api.github.com" + else + config_value("github_api_url") + end + end +end diff --git a/lib/services/aws_ops_works.rb b/lib/services/aws_ops_works.rb new file mode 100644 index 000000000..bf5007af9 --- /dev/null +++ b/lib/services/aws_ops_works.rb @@ -0,0 +1,160 @@ +require 'aws/ops_works' + +class Service::AwsOpsWorks < Service::HttpPost + self.title = 'AWS OpsWorks' + + string :app_id, # see AppId at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_App.html + :stack_id, # see StackId at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Stack.html + :branch_name, # see Revision at http://docs.aws.amazon.com/opsworks/latest/APIReference/API_Source.html + :endpoint_region, # see AWS Opsworks Stacks at http://docs.aws.amazon.com/general/latest/gr/rande.html#opsworks_region + :github_api_url, # The GitHub API endpoint to post DeploymentStatus callbacks to + :aws_access_key_id # see AWSAccessKeyID at http://docs.aws.amazon.com/opsworks/latest/APIReference/CommonParameters.html + password :aws_secret_access_key, :github_token + + white_list :app_id, + :stack_id, + :branch_name, + :endpoint_region, + :github_api_url, + :aws_access_key_id + + default_events :push, :deployment + url "http://docs.aws.amazon.com/opsworks/latest/APIReference/API_CreateDeployment.html" + + def app_id + environment_app_id || required_config_value('app_id') + end + + def stack_id + environment_stack_id || required_config_value('stack_id') + end + + def deployment_payload + payload['deployment'] + end + + def deployment_command + (deployment_payload && deployment_payload['task']) || 'deploy' + end + + def environment_stack_id + opsworks_payload_environment('stack_id') + end + + def environment_app_id + opsworks_payload_environment('app_id') + end + + def opsworks_payload_environment(key) + opsworks_payload && opsworks_payload[environment] && opsworks_payload[environment][key] + end + + def opsworks_payload + deployment_payload && deployment_payload['payload'] && + deployment_payload['payload']['config'] && + deployment_payload['payload']['config']['opsworks'] + end + + def environment + deployment_payload['environment'] + end + + def receive_event + http.ssl[:verify] = true + + case event.to_s + when 'deployment' + update_app_revision(deployment_ref_name) + app_deployment = create_deployment + update_deployment_statuses(app_deployment) + app_deployment + when 'push' + if branch_name == required_config_value('branch_name') + create_deployment + end + else + raise_config_error("The #{event} event is currently unsupported.") + end + end + + def update_deployment_statuses(app_deployment) + return unless config_value('github_token') && !config_value('github_token').empty? + + deployment_id = app_deployment['deployment_id'] + + deployment_status_options = { + "state" => "success", + "target_url" => aws_opsworks_output_url, + "description" => "Deployment #{payload['deployment']['id']} Accepted by Amazon. (github-services@#{Service.current_sha[0..7]})" + } + + deployment_path = "/repos/#{github_repo_path}/deployments/#{payload['deployment']['id']}/statuses" + response = http_post "#{github_api_url}#{deployment_path}" do |req| + req.headers.merge!(default_github_headers) + req.body = JSON.dump(deployment_status_options) + end + raise_config_error("Unable to post deployment statuses back to the GitHub API.") unless response.success? + end + + def aws_opsworks_output_url + "https://console.aws.amazon.com/opsworks/home?#/stack/#{stack_id}/deployments" + end + + def default_github_headers + { + 'Accept' => "application/vnd.github.cannonball-preview+json", + 'User-Agent' => "Operation: California", + 'Content-Type' => "application/json", + 'Authorization' => "token #{required_config_value('github_token')}" + } + end + + def github_repo_path + payload['repository']['full_name'] + end + + def configured_branch_name + required_config_value('branch_name') + end + + def deployment_ref_name + payload['deployment']['ref'] + end + + def update_app_revision(revision_name) + app_source = { revision: revision_name } + if config_value('github_token') && !config_value('github_token').empty? + app_source = { + url: "#{github_api_url}/repos/#{github_repo_path}/zipball/#{revision_name}", + type: "archive", + username: required_config_value("github_token"), + password: "x-oauth-basic", + revision: revision_name + } + end + ops_works_client.update_app app_id: app_id, app_source: app_source + end + + def create_deployment + ops_works_client.create_deployment stack_id: stack_id, app_id: app_id, + command: { name: deployment_command } + end + + def ops_works_client + region = config_value('endpoint_region') + # The AWS library requires you pass `nil`, and not an empty string, if you + # want to connect to a legitimate default AWS host name. + region = nil if region.empty? + AWS::OpsWorks::Client.new access_key_id: required_config_value('aws_access_key_id'), + secret_access_key: required_config_value('aws_secret_access_key'), + region: region + end + + def github_api_url + if config_value("github_api_url").empty? + "https://api.github.com" + else + config_value("github_api_url") + end + end +end diff --git a/lib/services/backlog.rb b/lib/services/backlog.rb new file mode 100644 index 000000000..c0bc646d5 --- /dev/null +++ b/lib/services/backlog.rb @@ -0,0 +1,123 @@ +require 'uri' + +class Service::Backlog < Service + string :api_url, :user_id + password :password + white_list :space_id, :user_id + + def receive_push + if data['api_url'].to_s.empty? + raise_config_error "Backlog API URL not set" + end + if data['user_id'].to_s.empty? + raise_config_error "user_id not set" + end + if data['password'].to_s.empty? + raise_config_error "password not set" + end + + repository = payload['repository']['url'].to_s + commits = payload['commits'].collect{|c| Commit.new(c)} + issue_commits = sort_commits(commits) + issue_commits.sort.map do | issue, commits | + post(issue, repository, commits, branch.to_s) + end + + end + + def branch + return @branch if defined?(@branch) + + matches = payload['ref'].match(/^refs\/heads\/(.*)$/) + @branch = matches ? matches[1] : nil + end + + attr_writer :xmlrpc_client + def xmlrpc_client + @xmlrpc_client ||= begin + uri = URI(data['api_url']) + params = { + 'host' => uri.host, + 'path' => uri.path, + 'port' => uri.port, + 'user' => data['user_id'], + 'password' => data['password'], + 'use_ssl' => true + } + client = XMLRPC::Client.new3(params) + # call for auth check + client.call('backlog.getProjects') + client + rescue XMLRPC::FaultException + raise_config_error "Invalid login details" + rescue SocketError, RuntimeError, Errno::ECONNREFUSED + raise_config_error "Invalid server url" + end + end + + def sort_commits(commits) + issue_commits = Hash.new{|k,v| k[v] = []} + commits.each do |commit| + commit.issue.each do |issue| + issue_commits[issue] << commit + end + end + return issue_commits + end + + def post(issue, repository, commits, branch_name) + if commits.length == 0 + return + end + + branch_str = branch_name.empty? ? "" : "#{branch_name} at " + message = "pushed to #{branch_str}#{repository}\n\n" + + commits.each do |commit| + comment = "#{message}#{commit.comment}" + begin + if commit.status + xmlrpc_client.call('backlog.switchStatus', {'key' => issue, 'statusId' => commit.status, 'comment' => comment}) + else + xmlrpc_client.call('backlog.addComment', {'key' => issue, 'content' => comment}) + end + rescue XMLRPC::FaultException + raise_config_error "failed post" + rescue RuntimeError + raise_config_error "failed post" + end + end + end + + class Commit + attr_reader :status, :issue, :url, :id + + def initialize(commit_hash) + @id = commit_hash['id'].to_s + @url = commit_hash['url'].to_s + @message = commit_hash['message'].to_s + @status = nil + @issue = [] + + re_issue_key = /(?:\[\[)?(([A-Z0-9]+(?:_[A-Z0-9]+)*)-([1-9][0-9]*))(?:\]\])?/ + temp = @message + while temp =~ re_issue_key + issue << $1 + temp.sub!($1, '') + end + + re_status = /(?:^|\s+?)(#fixes|#fixed|#fix|#closes|#closed|#close)(?:\s+?|$)/ + while @message =~ re_status + switch = $1 + @message.sub!(switch, '') + @status = (switch =~ /fix/) ? 3 : 4 + end + end + + def comment() + output = "#{@url}\n" + output += @message.strip + return output + end + end +end diff --git a/lib/services/bamboo.rb b/lib/services/bamboo.rb new file mode 100644 index 000000000..49f79c6ac --- /dev/null +++ b/lib/services/bamboo.rb @@ -0,0 +1,84 @@ +class Service::Bamboo < Service + string :base_url, :build_key, :username + password :password + white_list :base_url, :build_key, :username + + def receive_push + verify_config + branch = payload['ref'] + trigger_build(branch) + rescue SocketError => e + if e.to_s =~ /getaddrinfo: Name or service not known/ + raise_config_error("Invalid Bamboo host name") + else + raise + end + end + + def trigger_build(ref) + # Post body is empty but Bamboo REST expects this to be set (in 3.x) + http.headers['Content-Type'] = 'application/xml' + + commit_branch = ref.sub(/\Arefs\/(heads|tags)\//, '') + + build_key.split(',').each do |branch_key| + #See if the split result is just a key or a branch:key + parts = branch_key.split(':') + key = parts[0] + if parts.length == 2 + branch = parts[0] + key = parts[1] + + #Has a branch, verify it matches the branch for the commit + next unless branch == commit_branch + end + + res = http_post "rest/api/latest/queue/#{key}" + handle_response(res) + end + end + + def handle_response(response) + case response.status + when 200..204 + "Ok" + when 403, 401, 422 then raise_config_error("Invalid credentials") + when 404, 301 then raise_config_error("Invalid Bamboo project URL") + else + maybe_xml = response.body + msg = if maybe_xml =~ / SERVICE_NAME, + :logo_url => LOGO_URL, + :creator_email_address => author_email, + :description => action, + :title => message, + :url => url + end + + def http_post_event(params) + http.basic_auth data['email_address'], data['password'] + http.headers['User-Agent'] = 'GitHub service hook' + http.headers['Content-Type'] = 'application/json' + http.headers['Accept'] = 'application/json' + + response = http_post(events_api_url, generate_json(params)) + + case response.status + when 401; raise_config_error "Invalid email + password: #{response.body.inspect}" + when 403; raise_config_error "No access to project: #{response.body.inspect}" + when 404; raise_config_error "No such project: #{response.body.inspect}" + when 422; raise_config_error "Validation error: #{response.body.inspect}" + end + end + + EVENTS_API_URL = 'https://basecamp.com:443/%d/api/v1/projects/%d/events.json' + def events_api_url + if data['project_url'] =~ %r{^https://basecamp\.com/(\d+)/projects/(\d+)} + EVENTS_API_URL % [$1, $2] + elsif data['project_url'] =~ /basecamphq\.com/ + raise_config_error "That's a URL for a Basecamp Classic project, not the new Basecamp. Check out the Basecamp Classic service hook instead!" + else + raise_config_error "That's not a URL to a Basecamp project! Navigate to the Basecamp project you'd like to post to and note the URL. It should look something like: https://basecamp.com/123456/projects/7890123 -- paste that URL here." + end + end +end diff --git a/lib/services/bugherd.rb b/lib/services/bugherd.rb new file mode 100644 index 000000000..4c7eee477 --- /dev/null +++ b/lib/services/bugherd.rb @@ -0,0 +1,13 @@ +class Service::BugHerd < Service + default_events :issues, :issue_comment, :push + string :project_key + white_list :project_key + + def receive_push + url = "http://www.bugherd.com/github_web_hook/#{data['project_key']}" + http_post url, :payload => generate_json(payload) + end + + alias receive_issues receive_push + alias receive_issue_comment receive_push +end diff --git a/lib/services/bugzilla.rb b/lib/services/bugzilla.rb new file mode 100644 index 000000000..1e6f7e0f5 --- /dev/null +++ b/lib/services/bugzilla.rb @@ -0,0 +1,177 @@ +class Service::Bugzilla < Service + string :server_url, :username, :integration_branch + password :password + boolean :central_repository + white_list :server_url, :username, :integration_branch + + def receive_push + # Check for settings + if data['server_url'].to_s.empty? + raise_config_error "Bugzilla url not set" + end + if data['username'].to_s.empty? + raise_config_error "username not set" + end + if data['password'].to_s.empty? + raise_config_error "password not set" + end + + # Don't operate on these commits unless this is our "integration" (i.e. main) branch, + # as defined by the user. If no integration_branch is set, we operate on all commits. + return unless integration_branch? + + # Post comments on all bugs identified in commits + repository = payload['repository']['url'].to_s + commits = payload['commits'].collect{|c| Commit.new(c)} + bug_commits = sort_commits(commits) + bugs_to_close = [] + bug_commits.each_pair do | bug, commits | + if central_repository? + # Only include first line of message if commit already mentioned + commit_messages = commits.collect{|c| c.comment(bug_mentions_commit?(bug, c))} + else + # Don't include commits already mentioned + commit_messages = commits.select{|c| !bug_mentions_commit?(bug, c)}.collect{|c| c.comment} + end + post_bug_comment(bug, repository, commit_messages, branch.to_s) + if commits.collect{|c| c.closes}.any? + bugs_to_close << bug + end + end + + # Close bugs + if central_repository? + close_bugs(bugs_to_close) + end + end + + def central_repository? + config_boolean_true?('central_repository') + end + + # Name of the branch for this payload; nil if it isn't branch-related. + def branch + return @branch if defined?(@branch) + + matches = payload['ref'].match(/^refs\/heads\/(.*)$/) + @branch = matches ? matches[1] : nil + end + + def integration_branch? + data['integration_branch'].to_s.empty? or data['integration_branch'].to_s == branch.to_s + end + + attr_writer :xmlrpc_client # Can define own server for testing + def xmlrpc_client + # XMLRPC client to communicate with Bugzilla server + @xmlrpc_client ||= begin + client = XMLRPC::Client.new2("#{data['server_url'].to_s}/xmlrpc.cgi") + + # Workaround for XMLRPC bug - https://bugs.ruby-lang.org/issues/8182 + # Should no longer be needed when we start running Ruby 2.2 + client.http_header_extra = {"accept-encoding" => "identity"} + + result = client.call('User.login', {'login' => data['username'].to_s, 'password' => data['password'].to_s}) + @token = result['token'] + client + rescue XMLRPC::FaultException + raise_config_error "Invalid login details" + rescue SocketError, RuntimeError + raise_config_error "Invalid server url" + end + end + + def xmlrpc_authed_call(method, args) + # Add token parameter to XMLRPC call if one was received when logging into Bugzilla + args['Bugzilla_token'] = @token if not @token.nil? + xmlrpc_client.call(method, args) + end + + def sort_commits(commits) + # Sort commits into a hash of arrays based on bug id + bug_commits = Hash.new{|k,v| k[v] = []} + commits.each do |commit| + commit.bugs.each do |bug| + bug_commits[bug] << commit + end + end + return bug_commits + end + + def bug_mentions_commit?(bug_id, commit) + # Check if a bug already mentions a commit. + # This is to avoid repeating commits that have + # been pushed to another person's repository + result = xmlrpc_authed_call('Bug.comments', {'ids' => [bug_id]}) + all_comments = result['bugs']["#{bug_id}"]['comments'].collect{|c| c['text']}.join("\n") + all_comments.include? commit.id + rescue XMLRPC::FaultException, RuntimeError + # Bug doesn't exist or Bugzilla version doesn't support getting comments + false + end + + def post_bug_comment(bug, repository, commit_messages, branch_name) + # Post a comment on an individual bug + if commit_messages.length == 0 + return + end + branch_str = branch_name.empty? ? "" : "#{branch_name} at " + if commit_messages.length > 1 + message = "Commits pushed to #{branch_str}#{repository}\n\n" + else + message = "Commit pushed to #{branch_str}#{repository}\n\n" + end + message += commit_messages.join("\n\n") + begin + xmlrpc_authed_call('Bug.add_comment', {'id' => bug, 'comment' => message}) + rescue XMLRPC::FaultException + # Bug doesn't exist or user can't add comments, do nothing + rescue RuntimeError + raise_config_error "Bugzilla version doesn't support adding comments" + end + end + + def close_bugs(bug_ids) + if bug_ids.length > 0 + begin + xmlrpc_authed_call('Bug.update', {'ids' => bug_ids, 'status' => 'RESOLVED', 'resolution' => 'FIXED'}) + rescue XMLRPC::FaultException, RuntimeError + # Bug doesn't exist, user can't close bug, or version < 4.0 that doesn't support Bug.update. + # Do nothing + end + end + end + + class Commit + attr_reader :closes, :bugs, :url, :id + + def initialize(commit_hash) + @id = commit_hash['id'].to_s + @url = commit_hash['url'].to_s + @message = commit_hash['message'].to_s + @closes = false + + # Get the list of bugs mentioned in this commit message + message_re = /((close|fix|address)e?(s|d)? )?(ticket|bug|tracker item|issue)s?:? *([\d ,\+&#and]+)/i + if (@message =~ message_re) != nil + if $1 + @closes = true + end + @bugs = $5.split(/[^\d]+/).select{|b| !b.empty?}.collect{|b| Integer(b)} + else + @bugs = [] + end + end + + def comment(first_line_only=false) + # Comment contents for a commit + output = "#{@url}\n" + if first_line_only + output += @message.lines.first.strip + else + output += @message.strip + end + return output + end + end +end diff --git a/lib/services/campfire.rb b/lib/services/campfire.rb new file mode 100644 index 000000000..2b129da0d --- /dev/null +++ b/lib/services/campfire.rb @@ -0,0 +1,81 @@ +class Service::Campfire < Service + class << self + attr_accessor :campfire_class + end + + self.campfire_class = Tinder::Campfire + + string :subdomain, :room, :sound + password :token + boolean :master_only, :play_sound, :long_url + white_list :subdomain, :room + + default_events :push, :pull_request, :issues + + def receive_push + url = configured_summary_url + messages = [] + messages << "#{summary_message}: #{url}" + messages += commit_messages.first(8) + + if messages.first =~ /pushed 1 new commit/ + messages.shift # drop summary message + messages.first << " ( #{distinct_commits.first['url']} )" + end + + send_messages messages + end + + def receive_pull_request + message = "#{summary_message}: #{configured_summary_url}" + send_messages message if action =~ /(open)|(close)/ + end + + alias receive_issues receive_pull_request + + def receive_public + send_messages "#{summary_message}: #{configured_summary_url}" + end + + alias receive_gollum receive_public + + def send_messages(messages) + raise_config_error 'Missing campfire token' if data['token'].to_s.empty? + + return if config_boolean_true?('master_only') && respond_to?(:branch_name) && branch_name != 'master' + + play_sound = config_boolean_true?('play_sound') + sound = data['sound'].blank? ? 'rimshot' : data['sound'] + + unless room = find_room + raise_config_error 'No such campfire room' + end + + Array(messages).each { |line| room.speak line } + room.play sound if play_sound && room.respond_to?(:play) + rescue OpenSSL::SSL::SSLError => boom + raise_config_error "SSL Error: #{boom}" + rescue Tinder::AuthenticationFailed => boom + raise_config_error "Authentication Error: #{boom}" + rescue Faraday::Error::ConnectionFailed + raise_config_error "Connection refused- invalid campfire subdomain." + end + + attr_writer :campfire + def campfire + @campfire ||= self.class.campfire_class.new(campfire_domain, :ssl => true, :token => data['token']) + end + + def campfire_domain + data['subdomain'].to_s.sub /\.campfirenow\.com$/i, '' + end + + def configured_summary_url + config_boolean_true?('long_url') ? summary_url : shorten_url(summary_url) + end + + def find_room + room = campfire.find_room_by_name(data['room']) + rescue StandardError + end +end diff --git a/lib/services/cia.rb b/lib/services/cia.rb new file mode 100644 index 000000000..e9afbdb1a --- /dev/null +++ b/lib/services/cia.rb @@ -0,0 +1,101 @@ +class Service::CIA < Service + string :address, :project, :branch, :module + boolean :long_url, :full_commits + white_list :address, :project, :branch, :module + + def receive_push + repository = + if !(name = data['project'].to_s).empty? + name + else + payload['repository']['name'] + end + + branch = + if !(branch = data['branch'].to_s).empty? + branch % branch_name + else + ref_name + end + + module_name = data['module'].to_s + + commits = payload['commits'] + + if commits.size > 5 + message = build_cia_commit(repository, branch, payload['after'], commits.last, module_name, commits.size - 1) + deliver(message) + else + commits.each do |commit| + sha1 = commit['id'] + message = build_cia_commit(repository, branch, sha1, commit, module_name) + deliver(message) + end + end + end + + attr_writer :xmlrpc_server + def xmlrpc_server + @xmlrpc_server ||= begin + XMLRPC::Client.new2( + (address = data['address'].to_s).present? ? + address : 'http://cia.vc/xmlrpc.php') + end + end + + def deliver(message) + xmlrpc_server.call("hub.deliver", message) + rescue StandardError => err + if $!.to_s =~ /content\-type/i || $!.to_s =~ /HTTP\-Error/i + raise_config_error "Check the CIA Address: #{$!.message}" + else + raise + end + end + + def build_cia_commit(repository, branch, sha1, commit, module_name, size = 1) + log_lines = commit['message'].split("\n") + log = log_lines.shift + log << " (+#{size} more commits...)" if size > 1 + + dt = DateTime.parse(commit['timestamp']).new_offset + timestamp = Time.send(:gm, dt.year, dt.month, dt.day, dt.hour, dt.min, dt.sec).to_i + files = commit['modified'] + commit['added'] + commit['removed'] + tiny_url = config_boolean_true?('long_url') ? commit['url'] : shorten_url(commit['url']) + + log << " - #{tiny_url}" + + if config_boolean_true?('full_commits') + log_lines.each do |log_line| + log << "\n" << log_line + end + end + + <<-MSG + + + github + 1 + http://www.github.com + + + #{repository} + #{branch} + #{module_name} + + #{timestamp} + + + #{commit['author']['name']} + #{sha1[0..6]} + #{CGI.escapeHTML(log)} + #{commit['url']} + + #{files.join("\n")} + + + + + MSG + end +end diff --git a/lib/services/clever_cloud.rb b/lib/services/clever_cloud.rb new file mode 100644 index 000000000..0496380a7 --- /dev/null +++ b/lib/services/clever_cloud.rb @@ -0,0 +1,32 @@ +class Service::CleverCloud < Service + include HttpHelper + + self.title = 'Clever Cloud' + + password :secret + + default_events :push + + url "https://www..clever-cloud.com/" + logo_url "http://cleverstatic.cleverapps.io/twitter-cards-assets/tw-card-logo.png" + maintained_by :github => 'Keruspe' + supported_by :web => 'https://www.clever-cloud.com/', + :email => 'support@clever-cloud.com' + + def receive_push + secret_ok = required_config_value ("secret") + + http.headers['X-GitHub-Event'] = event.to_s + http.headers['X-GitHub-Delivery'] = delivery_guid.to_s + + res = deliver 'https://api.clever-cloud.com/v2/github/redeploy/', :content_type => 'application/json', :secret => secret_ok + + if res.status < 200 || res.status > 299 + raise_config_error "Invalid HTTP Response: #{res.status}" + end + end + + def original_body + payload + end +end diff --git a/lib/services/codeclimate.rb b/lib/services/codeclimate.rb new file mode 100644 index 000000000..8ac70bf89 --- /dev/null +++ b/lib/services/codeclimate.rb @@ -0,0 +1,24 @@ +class Service::CodeClimate < Service::HttpPost + password :token + + default_events :push, :pull_request + + url "http://codeclimate.com" + + maintained_by :github => "mrb" + + supported_by :web => "https://codeclimate.com/contact", + :email => "hello@codeclimate.com", + :twitter => "@codeclimate" + + def receive_event + token = required_config_value('token') + http.basic_auth "github", token + deliver "https://codeclimate.com/github_events", insecure_ssl: true + end + + def token + data["token"].to_s.strip + end + +end diff --git a/lib/services/codereviewhub.rb b/lib/services/codereviewhub.rb new file mode 100644 index 000000000..c18b6a3d9 --- /dev/null +++ b/lib/services/codereviewhub.rb @@ -0,0 +1,11 @@ +require File.expand_path('../web', __FILE__) + +class Service::Codereviewhub < Service::Web + self.title = "CodeReviewHub" + url "https://www.codereviewhub.com" + logo_url "https://www.codereviewhub.com/favicon.ico" + + supported_by :email => 'contact@codereviewhub.com' + maintained_by :github => 'codereviewhub' + default_events :pull_request, :issue_comment, :commit_comment, :pull_request_review_comment +end diff --git a/lib/services/codeship.rb b/lib/services/codeship.rb new file mode 100644 index 000000000..8b178a244 --- /dev/null +++ b/lib/services/codeship.rb @@ -0,0 +1,29 @@ +class Service::Codeship < Service::HttpPost + string :project_uuid + + url "http://www.codeship.io" + logo_url "http://www.codeship.io/logo_codeship_topbar.png" + + default_events :push, :pull_request + + maintained_by github: 'beanieboi', + twitter: '@beanieboi' + supported_by web: 'http://www.codeship.io/contact', + email: 'support@codeship.io', + twitter: '@codeship' + + def receive_event + http.headers['X-GitHub-Event'] = event.to_s + http_post codeship_url, payload: generate_json(payload) + end + + private + + def project_uuid + required_config_value('project_uuid') + end + + def codeship_url + "https://lighthouse.codeship.io/github/#{project_uuid}" + end +end diff --git a/lib/services/commandoio.rb b/lib/services/commandoio.rb new file mode 100644 index 000000000..9b28a6a50 --- /dev/null +++ b/lib/services/commandoio.rb @@ -0,0 +1,104 @@ +# Commando.io GitHub services integration +class Service::Commandoio < Service::HttpPost + + # Hook information + self.title = 'Commando.io' + self.hook_name = 'commandoio' + + # Support and maintainer information + url 'https://commando.io' + logo_url 'https://static.commando.io/img/favicon-250.png' + + supported_by :web => 'https://commando.io', + :twitter => '@commando_io', + :email => 'hello@commando.io' + + maintained_by :web => 'https://unscramble.co.jp', + :github => 'aw', + :twitter => '@alexandermensa' + + # Form fields + password :api_token_secret_key + + string :account_alias, + :recipe, + :server, + :groups, + :notes + + boolean :halt_on_stderr + + # Only include these in the debug logs + white_list :account_alias, + :recipe, + :server, + :groups, + :halt_on_stderr + + def receive_event + validate_config + validate_server_groups + + url = "recipes/#{data['recipe']}/execute" + + http.basic_auth data['account_alias'], data['api_token_secret_key'] + + http.ssl[:verify] = true + http.url_prefix = "https://api.commando.io/v1/" + + groups = data['groups'].split(',').map {|x| x.strip } if data['groups'] + + params = { :payload => generate_json(payload) } + + params.merge!(:server => data['server']) if data['server'] + params.merge!(:groups => groups) unless groups.nil? + params.merge!(:halt_on_stderr => data['halt_on_stderr']) if config_boolean_true?('halt_on_stderr') + params.merge!(:notes => CGI.escape(data['notes'])) if data['notes'] + + http_post url, params + end + + # Validates the required config values + # + # Raises an error if a config value is invalid or empty + def validate_config + %w(api_token_secret_key account_alias recipe server groups).each {|key| + raise_config_error("Invalid or empty #{key}") if is_error? key, config_value(key) + } + end + + # Validates the server and groups config values + # + # Raises an error if one or the other is missing, or if both are set (XOR) + def validate_server_groups + # XOR the server and groups + raise_config_error("Server or Groups must be set, but not both.") unless config_value('server').empty? ^ config_value('groups').empty? + end + + # Check if there's an error in the provided value + # + # Returns a boolean + def is_error?(key, value) + case key + when 'api_token_secret_key' then true if value.empty? || + value !~ /\Askey_[a-zA-Z0-9]+\z/ + + when 'account_alias' then true if value.empty? || + value.length > 15 || + value !~ /\A[a-z0-9]+\z/ + + when 'recipe' then true if value.empty? || + value.length > 25 || + value !~ /\A[a-zA-Z0-9_]+\z/ + + when 'server' then true if !value.empty? && + value !~ /\A[a-zA-Z0-9_]+\z/ + + when 'groups' then true if !value.empty? && + value !~ /\A[a-zA-Z0-9_\s\,]+\z/ + else + false + end + end + +end diff --git a/lib/services/conductor.rb b/lib/services/conductor.rb new file mode 100644 index 000000000..af4228b8f --- /dev/null +++ b/lib/services/conductor.rb @@ -0,0 +1,21 @@ +class Service::Conductor < Service + string :api_key + white_list :api_key + + default_events :push + + url "https://conductor-app.com" + logo_url "#{url}/logo-blue.png" + + maintained_by :github => 'Shuntyard' + supported_by :email => 'support@conductor-app.com' + + def receive_push + api_key = data['api_key'] + + http.ssl[:verify] = false + http.headers['X-GitHub-Event'] = event.to_s + http_post "#{self.class.url}/github/commit/#{api_key}", :payload => generate_json(payload) + end + +end diff --git a/lib/services/copperegg.rb b/lib/services/copperegg.rb new file mode 100644 index 000000000..409765da9 --- /dev/null +++ b/lib/services/copperegg.rb @@ -0,0 +1,31 @@ +class Service::CopperEgg < Service + string :url, :tag + boolean :master_only + string :api_key + + def receive_push + + raise_config_error 'API Key must be set' if data['api_key'].blank? + + if config_boolean_true?('master_only') && branch_name != 'master' + return + end + + http.ssl[:verify] = false + http.basic_auth(data['api_key'], "U") + http.headers['Content-Type'] = 'application/json' + if data['url'] != "" && data['url'] != nil + url = data['url'] + else + url = "https://api.copperegg.com/v2/annotations.json" + end + note = "GitHub: #{payload['pusher']['name']} has pushed #{payload['commits'].size} commit(s) to #{payload['repository']['name']}" + body = {"note" => note, "starttime" => Time.now.to_i - 30, "endtime" => Time.now.to_i + 30, "tags" => data['tag']} + json = generate_json(body) + + res = http_post url, json + if res.status < 200 || res.status > 299 + raise_config_error + end + end +end diff --git a/lib/services/crocagile.rb b/lib/services/crocagile.rb new file mode 100644 index 000000000..84c6a1687 --- /dev/null +++ b/lib/services/crocagile.rb @@ -0,0 +1,16 @@ +class Service::Crocagile < Service::HttpPost + string :project_key + url "https://www.crocagile.com/home" + logo_url "https://www.crocagile.com/_images/crocagile100x100t.png" + maintained_by :github => 'noelbaron', + :twitter => 'noelbaron' + supported_by :web => 'https://www.crocagile.com/home', + :email => 'support@crocagile.com', + :twitter => 'crocagilehelp' + + def receive_event + raise_config_error "Please enter your Project Key (located via Project Settings screen)." if data['project_key'].to_s.empty? + http.headers['Content-Type'] = 'application/json' + deliver "https://www.crocagile.com/api/integration/github" + end +end diff --git a/lib/services/deploy_hq.rb b/lib/services/deploy_hq.rb new file mode 100644 index 000000000..d5c70e9bb --- /dev/null +++ b/lib/services/deploy_hq.rb @@ -0,0 +1,25 @@ +class Service::DeployHq < Service + string :deploy_hook_url + boolean :email_pusher + + url "http://www.deployhq.com/" + logo_url "http://www.deployhq.com/images/deploy/logo.png" + maintained_by :github => 'darkphnx' + supported_by :web => 'http://support.deployhq.com/', :email => 'support@deployhq.com' + + def receive_push + unless data['deploy_hook_url'].to_s =~ /^https:\/\/[a-z0-9\-\_]+\.deployhq.com\/deploy\/[a-z0-9\-\_]+\/to\/[a-z0-9\-\_]+\/[a-z0-9]+$/i + raise_config_error "Deploy Hook invalid" + end + email_pusher = config_boolean_true?('email_pusher') + + http.url_prefix = data['deploy_hook_url'] + http.headers['content-type'] = 'application/x-www-form-urlencoded' + http.headers['X-GitHub-Event'] = 'push' + + body = Faraday::Utils.build_nested_query(http.params.merge(:payload => generate_json(payload), :notify => email_pusher)) + + http_post data['deploy_hook_url'], body + end + +end diff --git a/lib/services/deployervc.rb b/lib/services/deployervc.rb new file mode 100644 index 000000000..68f2f85c9 --- /dev/null +++ b/lib/services/deployervc.rb @@ -0,0 +1,44 @@ +require 'uri' + +class Service::Deployervc < Service::HttpPost + string :deployment_address + password :api_token + + white_list :deployment_address + + default_events :push + + url "https://deployer.vc" + + maintained_by :github => 'deployervc-emre' + + supported_by :web => 'https://deployer.vc/support.html', + :email => 'support@deployer.vc' + + + def receive_event + deploymentaddress = required_config_value('deployment_address') + apitoken = required_config_value('api_token') + + begin + URI.parse(deploymentaddress) + rescue URI::InvalidURIError + raise_config_error("Invalid URL for deployment address: #{deploymentaddress}") + end + + parts = URI.split(deploymentaddress) + scheme = parts[0] + host = parts[2] + path = parts.last + deployment_id = path.split('/').last + + http.headers['X-Deployervc-Token'] = apitoken + http.headers['Content-Type'] = 'application/json' + http.headers['Accept'] = 'application/json' + + http.url_prefix = "#{scheme}://#{host}" + + url = "/api/v1/deployments/deploy/#{deployment_id}" + http_post(url, generate_json({:revision => ''})) + end +end \ No newline at end of file diff --git a/lib/services/divecloud.rb b/lib/services/divecloud.rb new file mode 100644 index 000000000..1051aff0b --- /dev/null +++ b/lib/services/divecloud.rb @@ -0,0 +1,41 @@ +class Service::DiveCloud < Service::HttpPost + title 'DiveCloud - Application Performance Testing' + url "https://divecloud.nouvola.com" + logo_url "http://www.nouvola.com/wp-content/uploads/2014/01/nouvola_logo_reg1.png" + + maintained_by github: 'prossaro' + supported_by web: 'http://www.nouvola.com/contact', + email: 'support@nouvola.com', + twitter: '@NouvolaTech' + + default_events :deployment_status + string :plan_id + password :api_key, :creds_pass + boolean :random_timing + white_list :plan_id, :random_timing + + + def receive_deployment_status + #Only run performance test after successful deployment + return unless payload['status'] == "success" + + #Sanitize instances of data[:params] + @plan_id = required_config_value('plan_id') + @api_key = required_config_value('api_key') + @creds_pass = config_value('creds_pass') + @random_timing = config_value('random_timing') + + #Connect to api on port 443 + http.url_prefix = "https://divecloud.nouvola.com" + + #Run test + http.post do |request| + request.url "/api/v1/plans/#{@plan_id}/run" + request.headers['Content-Type'] = 'application/json' + request.headers['x-api'] = @api_key + request.headers['user_agent'] = 'Github Agent' + request.body = generate_json(:creds_pass => @creds_pass, :random_timing => @random_timing ) + end + end + +end \ No newline at end of file diff --git a/lib/services/djangopackages.rb b/lib/services/djangopackages.rb new file mode 100644 index 000000000..5cb4ac4a6 --- /dev/null +++ b/lib/services/djangopackages.rb @@ -0,0 +1,20 @@ +class Service::DjangoPackages < Service::HttpPost + + default_events :push + + url "https://www.djangopackages.com/" + logo_url "https://s3.amazonaws.com/opencomparison/img/logo_squares.png" + + maintained_by :github => 'pydanny', + :twitter => '@pydanny' + + supported_by :email => 'pydanny@gmail.com', + :twitter => '@pydanny' + + # ssl_version 2 + + def receive_push + url = "https://www.djangopackages.com/packages/github-webhook/" + http_post url, :payload => generate_json(payload) + end +end diff --git a/lib/services/docker.rb b/lib/services/docker.rb new file mode 100644 index 000000000..58b1e6772 --- /dev/null +++ b/lib/services/docker.rb @@ -0,0 +1,19 @@ +class Service::Docker < Service::HttpPost + + url "http://www.docker.com" + logo_url "http://www.docker.com/static/img/nav/docker-logo-loggedout.png" + + # kencochrane on GitHub/twitter is pinged for any bugs with the Hook code. + maintained_by :github => 'kencochrane', + :twitter => '@kencochrane' + + # Support channels for user-level Hook problems (service failure, + # misconfigured + supported_by :github => 'kencochrane', + :twitter => '@docker' + + def receive_event + deliver "https://registry.hub.docker.com/hooks/github" + end +end + diff --git a/lib/services/email.rb b/lib/services/email.rb new file mode 100644 index 000000000..2d4e8b587 --- /dev/null +++ b/lib/services/email.rb @@ -0,0 +1,326 @@ +class Net::SMTP + def mailfrom(from_addr) + from_addr = from_addr[/<([^>]+)>/, 1] if from_addr.include?('<') + + if $SAFE > 0 + raise SecurityError, 'tainted from_addr' if from_addr.tainted? + end + getok("MAIL FROM:<#{from_addr}>") + end +end + +class Service::Email < Service + string :address + password :secret + boolean :send_from_author + white_list :address + + def receive_push + extend PushEmail + deliver_to_addresses + end + + def receive_public + extend PublicEmail + deliver_to_addresses + end + + def deliver_to_addresses + if addresses.size.zero? + raise_config_error "Invalid addresses: #{data['address'].inspect}" + end + + configure_mail_defaults unless mail_configured? + + addresses.each do |address| + send_message_to address + end + end + + def send_message_to(address) + send_mail mail_message(address) + end + + def send_mail(mail) + mail.deliver! + end + + def configure_mail_defaults + my = self + + Mail.defaults do + delivery_method :smtp, + :address => my.smtp_address, + :port => my.smtp_port, + :domain => my.smtp_domain, + :user_name => my.smtp_user_name, + :password => my.smtp_password, + :authentication => my.smtp_authentication, + :enable_starttls_auto => my.smtp_enable_starttls_auto?, + :openssl_verify_mode => my.smtp_openssl_verify_mode + end + + mail_configured! + end + + def mail_configured? + defined?(@@mail_configured) && @@mail_configured + end + + def mail_configured! + @@mail_configured = true + end + + def addresses + @addresses ||= data['address'].to_s.split(' ').slice(0, 2) + end + + def mail_message(address) + my = self + + Mail.new do + to address + from my.mail_from + reply_to my.mail_from + subject my.mail_subject + headers my.secret_header + + text_part do + content_type 'text/plain; charset=UTF-8' + body my.mail_body + end + end + end + + def secret_header + secret ? {'Approved' => secret} : {} + end + + def secret + data['secret'] if data['secret'].to_s.size > 0 + end + + def shorten(text, limit) + text.slice(0, limit) << '...' + end + + def align(text, indent = ' ') + margin = text[/\A\s+/].size + + text.gsub(/^\s{#{margin}}/, indent) + end + + def send_from_author? + config_boolean_true?('send_from_author') + end + + def smtp_address + @smtp_address ||= email_config['address'] + end + + def smtp_port + @smtp_port ||= (email_config['port'] || 25).to_i + end + + def smtp_domain + @smtp_domain ||= email_config['domain'] || 'localhost.localdomain' + end + + def smtp_authentication + @smtp_authentication ||= email_config['authentication'] + end + + def smtp_user_name + @smtp_user_name ||= email_config['user_name'] + end + + def smtp_password + @smtp_password ||= email_config['password'] + end + + def smtp_enable_starttls_auto? + @smtp_enable_starttls_auto ||= (email_config['enable_starttls_auto'] != 'false' && true) + end + + def smtp_openssl_verify_mode + @smtp_openssl_verify_mode ||= email_config['openssl_verify_mode'] + end + + def smtp_logging? + @smtp_logging ||= email_config['enable_logging'] + end + + def noreply_address + @noreply_address ||= email_config['noreply_address'] || "GitHub " + end + + module RepositoryEmailHelpers + def name_with_owner + File.join(owner_name, repository_name) + end + + def owner_name + payload['repository']['owner']['login'] + end + + def repository_name + payload['repository']['name'] + end + + def repo_url + payload['repository']['url'] + end + end + + module PushEmail + include RepositoryEmailHelpers + + # Public + def mail_subject + if first_commit + "[#{name_with_owner}] #{first_commit_sha.slice(0, 6)}: #{first_commit_title}" + else + "[#{name_with_owner}]" + end + end + + # Public + def mail_body + body = commits.inject(repository_text) do |text, commit| + text << commit_text(commit) + end + + body << compare_text unless single_commit? + + body << <<-NOTE + + **NOTE:** GitHub Services has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/ + + We will provide an alternative path for the email notifications by January 31st, 2019. + NOTE + end + + # Public + def mail_from + send_from_author? ? author_address : noreply_address + end + + def repository_text + align(<<-EOH) + Branch: #{branch_ref} + Home: #{repo_url} + EOH + end + + def commit_text(commit) + gitsha = commit['id'] + added = commit['added'].map { |f| ['A', f] } + removed = commit['removed'].map { |f| ['R', f] } + modified = commit['modified'].map { |f| ['M', f] } + + changed_paths = (added + removed + modified).sort_by { |(char, file)| file } + changed_paths = changed_paths.collect { |entry| entry * ' ' }.join("\n ") + + timestamp = Date.parse(commit['timestamp']) + + commit_author = "#{commit['author']['name']} <#{commit['author']['email']}>" + + text = align(<<-EOH) + Commit: #{gitsha} + #{commit['url']} + Author: #{commit_author} + Date: #{timestamp} (#{timestamp.strftime('%a, %d %b %Y')}) + + EOH + + if changed_paths.size > 0 + text << align(<<-EOH) + Changed paths: + #{changed_paths} + + EOH + end + + text << align(<<-EOH) + Log Message: + ----------- + #{commit['message']} + + + EOH + + text + end + + def compare_text + "Compare: #{payload['compare']}" + end + + def single_commit? + first_commit == last_commit + end + + def branch_ref + payload['ref'] + end + + def author_address + "#{author_name} <#{author_email}>" + end + + def author + commit = last_commit || {} + commit['author'] || commit['committer'] || payload['pusher'] + end + + def author_name + author['name'] + end + + def author_email + author['email'] + end + + def last_commit + payload['commits'].last # assume that the last committer is also the pusher + end + + def first_commit_sha + first_commit['id'] + end + + def first_commit_title(limit = 50) + title_line = first_commit['message'][/\A[^\n]+/] || '' + + title_line.length > limit ? shorten(title_line, limit) : title_line + end + + def first_commit + payload['commits'].first + end + + # must be a difference with push payloads + def owner_name + payload['repository']['owner']['name'] + end + end + + module PublicEmail + include RepositoryEmailHelpers + + # Public + def mail_subject + "#{name_with_owner} has changed from Private to Public" + end + + # Public + def mail_body + "#{name_with_owner} has changed from Private to Public\n\n#{repo_url}" + end + + # Public + def mail_from + noreply_address + end + end +end diff --git a/lib/services/firebase.rb b/lib/services/firebase.rb new file mode 100644 index 000000000..0f466d12b --- /dev/null +++ b/lib/services/firebase.rb @@ -0,0 +1,45 @@ +class Service::Firebase < Service + string :firebase, :secret + white_list :firebase + + url 'https://www.firebase.com' + logo_url 'https://www.firebase.com/images/logo.png' + maintained_by :github => 'anantn' + supported_by :email => 'support@firebase.com' + + def receive_push + url = data['firebase'].to_s + url.gsub! /\s/, '' + + if url.empty? + raise_config_error 'Invalid URL.' + end + + if url !~ /^https\:\/\// + raise_config_error 'Invalid URL (did you include the https prefix?)' + end + + if url !~ /^.*\.json$/ + url = url + '.json' + end + + secret = data['secret'].to_s + if secret.length > 0 + url = url + '?auth=' + secret + end + + payload['commits'].each do |commit| + http_post url, generate_json(commit) + end + rescue Addressable::URI::InvalidURIError, Errno::EHOSTUNREACH + raise_missing_error $!.to_s + rescue SocketError + if $!.to_s =~ /getaddrinfo:/ + raise_missing_error 'Invalid host name.' + else + raise + end + rescue EOFError + raise_config_error 'Invalid server response.' + end +end diff --git a/lib/services/fisheye.rb b/lib/services/fisheye.rb new file mode 100644 index 000000000..f61bc7a01 --- /dev/null +++ b/lib/services/fisheye.rb @@ -0,0 +1,64 @@ +class Service::FishEye < Service + + string :url_base, :repository_name + password :token + white_list :url_base, :repository_name + + def receive_push + + verify_config + + http.headers['X-Api-Key'] = token + http.headers['Content-Type'] = 'application/json' + + url = "%s/rest-service-fecru/admin/repositories-v1/%s/scan" % [url_base, repository_name] + + res = http_post url + + handle_response(res) + + end + + def handle_response(response) + case response.status + when 200 + "Ok" + when 401 + raise_config_error("Invalid REST API token") + when 404 + raise_config_error("Invalid repository name") + else + msg = "#{url_base}, repository: #{repository_name} with token: #{token.to_s.strip.length != 0}" + raise_config_error("Error occurred: #{response.status} when connecting to: #{msg}") + end + end + + def verify_config + %w(url_base token repository_name).each do |var| + raise_config_error "Missing configuration: #{var}" if send(var).to_s.empty? + end + end + + def repository_name + @repository_name ||= (data['repository_name'].to_s.strip.length != 0) ? data['repository_name'] : payload['repository']['name'] + end + + def url_base + @url_base ||= begin + url_base = data['url_base'] + if (!(url_base.nil? || url_base.empty?)) + if url_base !~ /^https?\:\/\// + url_base = "http://#{url_base}" + end + url_base = url_base.gsub(/\/+$/, '') + end + url_base + end + end + + def token + @token ||= data['token'] + end + +end + diff --git a/lib/services/flowdock.rb b/lib/services/flowdock.rb new file mode 100644 index 000000000..1221c201f --- /dev/null +++ b/lib/services/flowdock.rb @@ -0,0 +1,22 @@ +require 'uri' + +class Service::Flowdock < Service::HttpPost + default_events :commit_comment, :gollum, :issues, :issue_comment, :pull_request, :push, :pull_request_review_comment + password :token + + url "https://www.flowdock.com" + logo_url "https://d2ph5hv9wbwvla.cloudfront.net/github/icon_220x140.png" + maintained_by email: "team@flowdock.com", github: 'Mumakil' + supported_by email: "support@flowdock.com", twitter: "@flowdock" + + def receive_event + raw_token = required_config_value('token') + token = URI.escape(raw_token.to_s.gsub(/\s/, '')) + http.headers['X-GitHub-Event'] = event.to_s + deliver "https://api.flowdock.com/v1/github/#{token}" + end + + def original_body + payload + end +end diff --git a/lib/services/fog_bugz.rb b/lib/services/fog_bugz.rb new file mode 100644 index 000000000..eaaf67f85 --- /dev/null +++ b/lib/services/fog_bugz.rb @@ -0,0 +1,49 @@ +class Service::FogBugz < Service + string :cvssubmit_url, :fb_repoid, :fb_version + white_list :cvssubmit_url, :fb_repoid, :fb_version + + def receive_push + if (fb_url = data['cvssubmit_url']).blank? + raise_config_error "Invalid FogBugz URL" + end + + # FIXME + http.ssl[:verify] = false + + repository = payload['repository']['name'] + branch = branch_name + before = payload['before'] + + payload['commits'].each do |commit| + commit_id = commit['id'] + message = commit["message"] + files = commit["removed"] | commit["added"] | commit["modified"] + + # look for a bug id in each line of the commit message + bug_list = [] + message.split("\n").each do |line| + # match variants of bugids or cases + if (line =~ /\s*(?:Bug[zs]*\s*IDs*\s*|Case[s]*)[#:; ]+((\d+[ ,:;#]*)+)/i) + bug_list << $1.to_i + end + end + + # for each found bugzid, submit the files to fogbugz. + bug_list.each do |fb_bugzid| + files.each do |f| + # build the GET request, and send it to fogbugz + params = {:ixBug => fb_bugzid, :sFile => "#{branch}/#{f}", :sPrev => before, :sNew => commit_id} + if data['fb_version'] == '6' + # FogBugz 6 created repositories automatically upon source checkin based on "sRepo" + params[:sRepo] = repository + else + # FogBugz 7 and later requires you to create the repo in FogBugz and supply "ixRepository" here + params[:ixRepository] = data['fb_repoid'] + end + + http_get fb_url, params + end + end + end + end +end diff --git a/lib/services/freckle.rb b/lib/services/freckle.rb new file mode 100644 index 000000000..b39073bd3 --- /dev/null +++ b/lib/services/freckle.rb @@ -0,0 +1,26 @@ +class Service::Freckle < Service::HttpPost + string :subdomain, :project + password :token + white_list :subdomain, :project + + default_events :push + + url "https://letsfreckle.com" + + maintained_by :github => 'LockeCole117', :twitter => '@LockeCole117' + + supported_by :web => 'https://letsfreckle.com', + :email => 'support@letsfreckle.com', + :twitter => '@letsfreckle' + + def receive_event + subdomain = required_config_value('subdomain').strip + token = required_config_value('token').strip + project = required_config_value('project').strip + + http.headers['X-FreckleToken'] = token + http.headers['X-FreckleProject'] = project + url = "https://#{data['subdomain']}.letsfreckle.com/api/github/commits" + deliver url + end +end diff --git a/lib/services/gemini.rb b/lib/services/gemini.rb new file mode 100644 index 000000000..00a537fb0 --- /dev/null +++ b/lib/services/gemini.rb @@ -0,0 +1,25 @@ +class Service::Gemini < Service + string :server_url, :api_key + + def receive_push + if data['server_url'].to_s.empty? + raise_config_error "Server URL is missing" + end + + if data['api_key'].to_s.empty? + raise_config_error "API Key is missing" + end + + # Sets this basic auth info for every request. GitHub user and Gemini API Key. + http.basic_auth(data['api_key'], data['api_key']) + + # Every request sends JSON. + http.headers['Content-Type'] = 'application/json' + + # Uses this URL as a prefix for every request. + http.url_prefix = '%s/api/github' % [data['server_url']] + + # POST http://localhost/gemini/api/github/commit + http_post "commit", generate_json(payload) + end +end diff --git a/lib/services/gemnasium.rb b/lib/services/gemnasium.rb new file mode 100644 index 000000000..b8bcdeccd --- /dev/null +++ b/lib/services/gemnasium.rb @@ -0,0 +1,42 @@ +class Service::Gemnasium < Service + string :user + password :token + white_list :user + + def receive_push + http.basic_auth(user, signature) + http_post(url, body, headers) + end + + def http(*) + super.tap{|h| h.builder.delete(Faraday::Request::UrlEncoded) } + end + + def user + data["user"].strip + rescue + raise_config_error "Invalid user value" + end + + def signature + Digest::SHA2.hexdigest(token + body) + end + + def token + data["token"].strip.downcase + rescue + raise_config_error "Invalid token value" + end + + def body + generate_json(payload) + end + + def url + "https://gemnasium.com/repositories/hook" + end + + def headers + {:content_type => "application/json"} + end +end diff --git a/lib/services/get_localization.rb b/lib/services/get_localization.rb new file mode 100644 index 000000000..7abb13925 --- /dev/null +++ b/lib/services/get_localization.rb @@ -0,0 +1,19 @@ +class Service::GetLocalization < Service + string :project_name + password :project_token + white_list :project_name + + def receive_push + project_name = data['project_name'] + project_token = data['project_token'] + + res = http_post "https://www.getlocalization.com/services/github/notify/#{project_name}/#{project_token}/", + :payload => generate_json(payload) + + if res.status < 200 || res.status > 299 + raise_config_error + end + end +end + + diff --git a/lib/services/gitter.rb b/lib/services/gitter.rb new file mode 100644 index 000000000..5d3561f8a --- /dev/null +++ b/lib/services/gitter.rb @@ -0,0 +1,30 @@ +class Service::Gitter < Service::HttpPost + password :token + boolean :mute_fork, :mute_watch, :mute_comments, :mute_wiki + + default_events ALL_EVENTS + + url 'https://gitter.im' + logo_url 'https://gitter.im/_s/1/images/2/gitter/logo-blue-text.png' + + maintained_by github: 'malditogeek', + twitter: '@malditogeek' + + supported_by github: 'gitterHQ', + twitter: '@gitchat', + email: 'support@gitter.im' + + def receive_event + token = required_config_value('token') + raise_config_error 'Invalid token' unless token.match(/^\w+$/) + + return if config_boolean_true?('mute_fork') && event.to_s =~ /fork/ + return if config_boolean_true?('mute_watch') && event.to_s =~ /watch/ + return if config_boolean_true?('mute_comments') && event.to_s =~ /comment/ + return if config_boolean_true?('mute_wiki') && event.to_s =~ /gollum/ + + http.headers['X-GitHub-Event'] = event.to_s + + deliver "https://webhooks.gitter.im/e/#{token}" + end +end diff --git a/lib/services/gocd.rb b/lib/services/gocd.rb new file mode 100644 index 000000000..142303f9b --- /dev/null +++ b/lib/services/gocd.rb @@ -0,0 +1,59 @@ +class Service::GoCD < Service + string :base_url, :repository_url, :username + password :password + boolean :verify_ssl + white_list :base_url, :repository_url, :username + + url "http://www.go.cd/" + logo_url "http://www.go.cd/images/logo-go-home_2014.png" + maintained_by github: "manojlds" + + def receive_push + return if payload['deleted'] + validate_config + + http.ssl[:verify] = verify_ssl + http.url_prefix = base_url + http.headers['confirm'] = true + + http.basic_auth username, password if username.present? and password.present? + + res = http_post "go/api/material/notify/git", repository_url: repository_url + case res.status + when 200..299 + when 403, 401, 422 then raise_config_error("Invalid credentials") + when 404, 301, 302 then raise_config_error("Invalid Go server URL") + else raise_config_error("HTTP: #{res.status}") + end + rescue SocketError => e + raise_config_error "Invalid Go sever host" if e.to_s =~ /getaddrinfo: Name or service not known/ + raise + end + + def validate_config + %w(base_url repository_url).each do |var| + raise_config_error "Missing configuration: #{var}" if send(var).to_s.empty? + end + end + + def base_url + @base_url ||= data['base_url'] + end + + def repository_url + @build_key ||= data['repository_url'] + end + + def username + @username ||= data['username'] + end + + def password + @password ||= data['password'] + end + + def verify_ssl + # If verify SSL has never been set, let's default to true + @verify_ssl ||= data['verify_ssl'].nil? || config_boolean_true?('verify_ssl') + end +end diff --git a/lib/services/grove.rb b/lib/services/grove.rb new file mode 100644 index 000000000..9735fb5e5 --- /dev/null +++ b/lib/services/grove.rb @@ -0,0 +1,12 @@ +class Service::Grove < Service + default_events :commit_comment, :gollum, :issues, :issue_comment, :pull_request, :push + password :channel_token + + def receive_push + token = data['channel_token'].to_s + raise_config_error "Missing channel token" if token.empty? + + res = http_post "https://grove.io/api/services/github/#{token}", + :payload => generate_json(payload) + end +end diff --git a/lib/services/habitualist.rb b/lib/services/habitualist.rb new file mode 100644 index 000000000..d1795f92e --- /dev/null +++ b/lib/services/habitualist.rb @@ -0,0 +1,6 @@ +class Service::Habitualist < Service + def receive_push + http_post "https://habitualist.com/webhooks/github/", + :payload => generate_json(payload) + end +end diff --git a/lib/services/harvest.rb b/lib/services/harvest.rb new file mode 100644 index 000000000..957bdd212 --- /dev/null +++ b/lib/services/harvest.rb @@ -0,0 +1,60 @@ +require 'base64' +require 'bigdecimal' +require 'date' +require 'jcode' if RUBY_VERSION < '1.9' +require 'time' +require 'rexml/document' + +class Service::Harvest < Service + string :subdomain, :username + password :password + boolean :ssl + white_list :subdomain, :username + + def receive_push + if data['username'].to_s.empty? + raise_config_error "Needs a username" + end + if data['password'].to_s.empty? + raise_config_error "Needs a password" + end + + http.basic_auth(data['username'], data['password']) + http.headers['Content-Type'] = 'application/xml' + http.headers['Accept'] = 'application/xml' + protocol = config_boolean_true?('ssl') ? 'https' : 'http' + http.url_prefix = "#{protocol}://#{data['subdomain']}.harvestapp.com/" + + statuses = [] + repository = payload['repository']['name'] + + payload['commits'].each do |commit| + author = commit['author'] || {} + tiny_url = shorten_url(commit['url']) + statuses << "[#{repository}] #{tiny_url} #{author['name']} - #{commit['message']}" + end + + messages = messages_from_daily statuses * "\n" + + timer, message = messages.last + http_post "daily/update/#{timer}", message if timer + end + + # Gets the daily day entries, and builds the xml payload for the timer update api. + # + # status - String message build from the commit messages of the push. + # + # Returns an Array of [timer, String xml message] tuples for each day entry. + def messages_from_daily(status) + daily = http_get 'daily' + doc = REXML::Document.new(daily.body) + messages = [] + doc.elements.each('daily/day_entries/day_entry') do |ele| + if ele.elements['timer_started_at'] + messages << [ele.elements['id'].text, + "#{ele.elements['notes'].text}\n#{status}#{ele.elements['hours'].text}"] + end + end + messages + end +end diff --git a/lib/services/heroku_beta.rb b/lib/services/heroku_beta.rb new file mode 100644 index 000000000..b10fc08dc --- /dev/null +++ b/lib/services/heroku_beta.rb @@ -0,0 +1,175 @@ +require 'base64' + +class Service::HerokuBeta < Service::HttpPost + string :name, :github_api_url + password :heroku_token, :github_token + + white_list :name, :github_api_url + + default_events :deployment + + url 'https://heroku.com' + logo_url 'https://camo.githubusercontent.com/edbc46e94fd4e9724da99bdd8da5d18e82f7b737/687474703a2f2f7777772e746f756368696e737069726174696f6e2e636f6d2f6173736574732f6865726f6b752d6c6f676f2d61663863386230333462346261343433613632376232393035666337316138362e706e67' + + maintained_by :github => 'atmos', :twitter => '@atmos' + + supported_by :web => 'https://github.com/contact', + :email => 'support@github.com', + :twitter => '@atmos' + + def github_repo_path + payload['repository']['full_name'] + end + + def environment + payload['deployment']['environment'] + end + + def ref + payload['deployment']['ref'] + end + + def sha + payload['deployment']['sha'][0..7] + end + + def version_string + ref == sha ? sha : "#{ref}@#{sha}" + end + + def receive_event + http.ssl[:verify] = true + + case event + when :deployment + heroku_app_access? + github_user_access? + github_repo_access? + deploy + when :status + # create a deployment if the default branch is pushed to and commit + # status is green + raise_config_error_with_message(:no_event_handler) + when :push + # create a deployment if the default branch is pushed to(basic-auto-deploy) + raise_config_error_with_message(:no_event_handler) + else + raise_config_error_with_message(:no_event_handler) + end + end + + def heroku_application_name + required_config_value('name') + end + + def heroku_headers + { + 'Accept' => 'application/vnd.heroku+json; version=3', + 'Content-Type' => "application/json", + "Authorization" => Base64.encode64(":#{required_config_value('heroku_token')}").strip + } + end + + def deploy + response = http_post "https://api.heroku.com/apps/#{heroku_application_name}/builds" do |req| + req.headers.merge!(heroku_headers) + req.body = JSON.dump({:source_blob => {:url => repo_archive_link, :version => version_string}}) + end + raise_config_error_with_message(:no_heroku_app_build_access) unless response.success? + + build_id = JSON.parse(response.body)['id'] + deployment_status_options = { + "state" => "success", + "target_url" => heroku_build_output_url(build_id), + "description" => "Created by GitHub Services@#{Service.current_sha[0..7]}" + } + + deployment_path = "/repos/#{github_repo_path}/deployments/#{payload['deployment']['id']}/statuses" + response = http_post "#{github_api_url}#{deployment_path}" do |req| + req.headers.merge!(default_github_headers) + req.body = JSON.dump(deployment_status_options) + end + raise_config_error_with_message(:no_github_deployment_access) unless response.success? + end + + def heroku_build_output_url(id) + "https://dashboard.heroku.com/apps/#{heroku_application_name}/activity/builds/#{id}" + end + + def heroku_app_access? + response = http_get "https://api.heroku.com/apps/#{heroku_application_name}" do |req| + req.headers.merge!(heroku_headers) + end + unless response.success? + raise_config_error_with_message(:no_heroku_app_access) + end + end + + def github_user_access? + response = github_get("/user") + unless response.success? + raise_config_error_with_message(:no_github_user_access) + end + end + + def github_repo_access? + response = github_get("/repos/#{github_repo_path}") + unless response.success? + raise_config_error_with_message(:no_github_repo_access) + end + end + + def repo_archive_link + response = github_get("/repos/#{github_repo_path}/tarball/#{sha}") + unless response.status == 302 + raise_config_error_with_message(:no_github_archive_link) + end + response.headers['Location'] + end + + def github_get(path) + http_get "#{github_api_url}#{path}" do |req| + req.headers.merge!(default_github_headers) + end + end + + def default_github_headers + { + 'Accept' => "application/vnd.github.cannonball-preview+json", + 'User-Agent' => "Operation: California", + 'Content-Type' => "application/json", + 'Authorization' => "token #{required_config_value('github_token')}" + } + end + + def github_api_url + if config_value("github_api_url").empty? + "https://api.github.com" + else + config_value("github_api_url") + end + end + + def raise_config_error_with_message(sym) + raise_config_error(error_messages[sym]) + end + + def error_messages + @default_error_messages ||= { + :no_event_handler => + "The #{event} event is currently unsupported.", + :no_github_archive_link => + "Unable to generate an archive link for #{github_repo_path} on GitHub with the provided token.", + :no_github_repo_access => + "Unable to access the #{github_repo_path} repository on GitHub with the provided token.", + :no_github_user_access => + "Unable to access GitHub with the provided token.", + :no_github_deployment_access => + "Unable to update the deployment status on GitHub with the provided token.", + :no_heroku_app_access => + "Unable to access #{heroku_application_name} on heroku with the provided token.", + :no_heroku_app_build_access => + "Unable to create a build for #{heroku_application_name} on heroku with the provided token." + } + end +end diff --git a/lib/services/hipchat.rb b/lib/services/hipchat.rb new file mode 100644 index 000000000..ad7fc6ecb --- /dev/null +++ b/lib/services/hipchat.rb @@ -0,0 +1,62 @@ +class Service::HipChat < Service + password :auth_token + string :room, :restrict_to_branch, :color, :server + boolean :notify, :quiet_fork, :quiet_watch, :quiet_comments, :quiet_labels, :quiet_assigning, :quiet_wiki + white_list :room, :restrict_to_branch, :color + + default_events :commit_comment, :download, :fork, :fork_apply, :gollum, + :issues, :issue_comment, :member, :public, :pull_request, :pull_request_review_comment, + :push, :watch + + def receive_event + # make sure we have what we need + raise_config_error "Missing 'auth_token'" if data['auth_token'].to_s == '' + raise_config_error "Missing 'room'" if data['room'].to_s == '' + + server = data['server'].presence || 'api.hipchat.com' + + # push events can be restricted to certain branches + if event.to_s == 'push' + branch = payload['ref'].split('/').last + branch_restriction = data['restrict_to_branch'].to_s + + # check the branch restriction is poplulated and branch is not included + if branch_restriction.length > 0 && branch_restriction.index(branch) == nil + return + end + end + + # ignore forks and watches if boolean is set + return if event.to_s =~ /fork/ && config_boolean_true?('quiet_fork') + return if event.to_s =~ /watch/ && config_boolean_true?('quiet_watch') + return if event.to_s =~ /comment/ && config_boolean_true?('quiet_comments') + return if event.to_s =~ /gollum/ && config_boolean_true?('quiet_wiki') + return if event.to_s =~ /issue|pull_request/ && payload['action'].to_s =~ /label/ && config_boolean_true?('quiet_labels') + return if event.to_s =~ /issue|pull_request/ && payload['action'].to_s =~ /assign/ && config_boolean_true?('quiet_assigning') + + http.headers['X-GitHub-Event'] = event.to_s + + rooms = data['room'].to_s.split(",") + room_ids = if rooms.all? { |room_id| Integer(room_id) rescue false } + rooms + else + [data['room'].to_s] + end + + room_ids.each do |room_id| + params = { + :auth_token => data['auth_token'], + :room_id => room_id, + :payload => generate_json(payload), + :notify => config_boolean_true?('notify') ? 1 : 0 + } + if data['color'].present? + params.merge!(:color => data['color']) + end + res = http_post "https://#{server}/v1/webhooks/github", params + if res.status < 200 || res.status > 299 + raise_config_error + end + end + end +end diff --git a/lib/services/hostedgraphite.rb b/lib/services/hostedgraphite.rb new file mode 100644 index 000000000..de5ff570e --- /dev/null +++ b/lib/services/hostedgraphite.rb @@ -0,0 +1,15 @@ +class Service::Hostedgraphite < Service + string :api_key + + def receive_push + res = http_post "https://www.hostedgraphite.com/integrations/github/", + 'payload' => generate_json(payload), + 'api_key' => data['api_key'] + + if res.status != 200 + raise_config_error + end + + end +end + diff --git a/lib/services/http_post.rb b/lib/services/http_post.rb new file mode 100644 index 000000000..1b83ddb00 --- /dev/null +++ b/lib/services/http_post.rb @@ -0,0 +1,15 @@ +class Service::HttpPost < Service + include HttpHelper + + alias receive_event deliver + + def receive_event + deliver data['url'], :content_type => data['content_type'], + :insecure_ssl => data['insecure_ssl'].to_i == 1, :secret => data['secret'] + end + + def original_body + {:payload => payload, :event => event.to_s, :config => data, + :guid => delivery_guid} + end +end diff --git a/lib/services/huboard.rb b/lib/services/huboard.rb new file mode 100644 index 000000000..c666f471b --- /dev/null +++ b/lib/services/huboard.rb @@ -0,0 +1,21 @@ +class Service::HuBoard < Service::HttpPost + + default_events :issue_comment, :issues + + url "https://huboard.com" + logo_url "https://huboard.com/img/LogoFullPurpleLight.png" + maintained_by :github => 'rauhryan' + supported_by :email => 'support@huboard.com' + + HUBOARD_URL = "https://huboard.com/api/site" + + def receive_issues + http_post "#{HUBOARD_URL}/webhook/issue", :payload => generate_json(payload) + end + + def receive_issue_comment + http_post "#{HUBOARD_URL}/webhook/comment", :payload => generate_json(payload) + end + +end + diff --git a/lib/services/humbug.rb b/lib/services/humbug.rb new file mode 100644 index 000000000..206ff07d9 --- /dev/null +++ b/lib/services/humbug.rb @@ -0,0 +1,78 @@ +class Service::Humbug < Service + self.title = "Zulip" + url = 'https://zulip.com' + logo_url = 'https://zulip.com/static/images/logo/zulip-icon-512x512.png' + maintained_by :github => 'zulip' + supported_by :email => 'support@zulip.com' + + # textboxes + string :email + string :api_key + string :stream + string :commit_stream + string :issue_stream + string :branches + string :alternative_endpoint + + # checkboxes + boolean :exclude_pull_requests + boolean :exclude_issues + boolean :exclude_commits + + # list of things approved for github's logging. See service.rb for more. + white_list :email + white_list :branches + white_list :alternative_endpoint + white_list :exclude_pull_requests + white_list :exclude_issues + white_list :exclude_commits + + # events handled by this GitHub hook + default_events :commit_comment, :create, :delete, :download, :follow, :fork, + :fork_apply, :gist, :gollum, :issue_comment, :issues, :member, :public, + :pull_request, :push, :team_add, :watch, :pull_request_review_comment, + :status + + def receive_event + raise_config_error "Missing 'email'" if data['email'].to_s.empty? + raise_config_error "Missing 'api_key'" if data['api_key'].to_s.empty? + + data['alternative_endpoint'] = data['alternative_endpoint'].to_s.strip + + if data['alternative_endpoint'].empty? + url = 'https://api.zulip.com/v1/external/github' + else + url = data['alternative_endpoint'] + end + + begin + http.headers['User-Agent'] = 'ZulipGitHubWebhook' + http.headers['Accept'] = 'application/json' + res = http_post url, + :email => data['email'], + :api_key => data['api_key'], + :stream => data['stream'], + :commit_stream => data['commit_stream'], + :issue_stream => data['issue_stream'], + :branches => data['branches'], + :exclude_pull_requests => data['exclude_pull_requests'], + :exclude_issues => data['exclude_issues'], + :exclude_commits => data['exclude_commits'], + + :event => event, + :payload => generate_json(payload), + # The GitHub payload version. Unspecified means an implicit version 1 + :version => '2', + :client => 'ZulipGitHubWebhook' + + + + if not res.success? + raise_config_error ("Server returned status " + res.status.to_s + + ": " + res.body) + end + rescue Errno::ENOENT => e + raise_missing_error (url + " could not be reached") + end + end +end diff --git a/lib/services/ibm_devops.rb b/lib/services/ibm_devops.rb new file mode 100644 index 000000000..2d1a52d8e --- /dev/null +++ b/lib/services/ibm_devops.rb @@ -0,0 +1,41 @@ +class Service::IBMDevOpsServices < Service::HttpPost + string :ibm_id + password :ibm_password + string :override_server_url + title 'IBM Bluemix DevOps Services' + white_list :ibm_id + + default_events :push + + # annotate this service + url "http://hub.jazz.net" + logo_url "https://hub.jazz.net/manage/web/com.ibm.team.jazzhub.web/graphics/HomePage/Powered-by-JH_white.png" + supported_by :web => "https://hub.jazz.net/support", :email => "hub@jazz.net", :twitter => "@JazzHub" + + def receive_push + username = required_config_value('ibm_id') + password = required_config_value('ibm_password') + override_server_url = data['override_server_url'] + server_url = (override_server_url.nil? || override_server_url.empty? ? "https://hub.jazz.net/manage" : override_server_url) + post_url = "#{server_url}/processGitHubPayload?auth_type=ibmlogin" + @request = {:ibm_id => username, :server_url => server_url, :url => post_url} + @response = deliver post_url + verify_post_response + end + + def verify_post_response + case @response.status + when 200, 201, 304 + # OK + when 401 then + raise_config_error("Authentication failed for #{@request[:ibm_id]}: Status=#{@response.status}, Message=#{@response.body}") + when 403 then + raise_config_error("Authorization failure: Status=#{@response.status}, Message=#{@response.body}") + when 404 then + raise_config_error("Invalid git repo URL provided: Status=#{@response.status}, Message=#{@response.body}") + else + raise_config_error("HTTP Error: Status=#{@response.status}, Message=#{@response.body}") + end + end + +end diff --git a/lib/services/icescrum.rb b/lib/services/icescrum.rb new file mode 100644 index 000000000..1cf81a876 --- /dev/null +++ b/lib/services/icescrum.rb @@ -0,0 +1,26 @@ +class Service::IceScrum < Service + string :base_url, :project_key, :username + password :password + def receive_push + raise_config_error "Invalid username" if data['username'].to_s.empty? + raise_config_error "Invalid password" if data['password'].to_s.empty? + raise_config_error "Invalid project key" if data['project_key'].to_s.empty? + + username = data['username'].to_s.gsub(/\s+/, "") + project_key = data['project_key'].to_s.upcase.gsub(/\s+/, "") + password = data['password'].to_s.gsub(/\s+/, "") + + if data['base_url'].present? + url = "#{data['base_url']}/ws/p/#{project_key}/commit" + else + url = "https://www.kagilum.com/a/ws/p/#{project_key}/commit" + end + + http.ssl[:verify] = false + http.basic_auth username, password + + http_post url, { :payload => generate_json(payload) } + end + +end + diff --git a/lib/services/irc.rb b/lib/services/irc.rb new file mode 100644 index 000000000..45ed9050a --- /dev/null +++ b/lib/services/irc.rb @@ -0,0 +1,348 @@ +class Service::IRC < Service + string :server, :port, :room, :nick, :branches + password :password, :nickserv_password + boolean :ssl, :message_without_join, :no_colors, :long_url, :notice + white_list :server, :port, :room, :nick + + default_events :push, :pull_request + + def receive_push + return unless branch_name_matches? + + messages = [] + messages << "#{irc_push_summary_message}: #{fmt_url url}" + messages += distinct_commits.first(3).map { + |commit| self.irc_format_commit_message(commit) + } + send_messages messages + end + + def receive_commit_comment + send_messages "#{irc_commit_comment_summary_message} #{fmt_url url}" + end + + def receive_pull_request + send_messages "#{irc_pull_request_summary_message} #{fmt_url url}" if action =~ /(open)|(close)/ + end + + def receive_pull_request_review_comment + send_messages "#{irc_pull_request_review_comment_summary_message} #{fmt_url url}" + end + + def receive_issues + send_messages "#{irc_issue_summary_message} #{fmt_url url}" if action =~ /(open)|(close)/ + end + + def receive_issue_comment + send_messages "#{irc_issue_comment_summary_message} #{fmt_url url}" + end + + def receive_gollum + send_messages "#{irc_gollum_summary_message} #{fmt_url summary_url}" + end + + def send_messages(messages) + messages = Array(messages) + + if config_boolean_true?('no_colors') + messages.each{|message| + message.gsub!(/\002|\017|\026|\037|\003\d{0,2}(?:,\d{1,2})?/, '')} + end + + rooms = data['room'].to_s + if rooms.empty? + raise_config_error "No rooms: #{rooms.inspect}" + return + end + + rooms = rooms.gsub(",", " ").split(" ").map{|room| room[0].chr == '#' ? room : "##{room}"} + botname = data['nick'].to_s.empty? ? "GitHub#{rand(200)}" : data['nick'][0..16] + command = config_boolean_true?('notice') ? 'NOTICE' : 'PRIVMSG' + + irc_password("PASS", data['password']) if !data['password'].to_s.empty? + irc_puts "NICK #{botname}" + irc_puts "USER #{botname} 8 * :#{irc_realname}" + + loop do + case irc_gets + when / 00[1-4] #{Regexp.escape(botname)} / + break + when /^PING\s*:\s*(.*)$/ + irc_puts "PONG #{$1}" + end + end + + nickserv_password = data['nickserv_password'].to_s + if !nickserv_password.empty? + irc_password("PRIVMSG NICKSERV :IDENTIFY", nickserv_password) + loop do + case irc_gets + when /^:NickServ/i + # NickServ responded somehow. + break + when /^PING\s*:\s*(.*)$/ + irc_puts "PONG #{$1}" + end + end + end + + without_join = config_boolean_true?('message_without_join') + rooms.each do |room| + room, pass = room.split("::") + irc_puts "JOIN #{room} #{pass}" unless without_join + + messages.each do |message| + irc_puts "#{command} #{room} :#{message}" + end + + irc_puts "PART #{room}" unless without_join + end + + irc_puts "QUIT" + irc_gets until irc_eof? + rescue SocketError => boom + if boom.to_s =~ /getaddrinfo: Name or service not known/ + raise_config_error 'Invalid host' + elsif boom.to_s =~ /getaddrinfo: Servname not supported for ai_socktype/ + raise_config_error 'Invalid port' + else + raise + end + rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH + raise_config_error 'Invalid host' + rescue OpenSSL::SSL::SSLError + raise_config_error 'Host does not support SSL' + ensure + emit_debug_log + end + + def irc_gets + response = readable_irc.gets + debug_incoming(clean_string_for_json(response)) unless !response || response.empty? + response + end + + def irc_eof? + readable_irc.eof? + end + + def irc_password(command, password) + real_command = "#{command} #{password}" + debug_command = "#{command} #{'*' * password.size}" + irc_puts(real_command, debug_command) + end + + def irc_puts(command, debug_command=command) + debug_outgoing(debug_command) + writable_irc.puts command + end + + def irc_realname + repo_name = payload["repository"]["name"] + repo_private = payload["repository"]["private"] + + "GitHub IRCBot - #{repo_owner}" + (repo_private == false ? "/#{repo_name}" : "") + end + + def repo_owner + # for (what I presume to be) legacy reasonings, some events send owner login, + # others send owner name. this method accounts for both cases. + # sample: push event returns owner name, pull request event returns owner login + payload["repository"]["owner"]["name"] ? + payload["repository"]["owner"]["name"] : + payload["repository"]["owner"]["login"] + end + + def debug_outgoing(command) + irc_debug_log << ">> #{command.strip}" + end + + def debug_incoming(command) + irc_debug_log << "=> #{command.strip}" + end + + def irc_debug_log + @irc_debug_log ||= [] + end + + def emit_debug_log + return unless irc_debug_log.any? + receive_remote_call("IRC Log:\n#{irc_debug_log.join("\n")}") + end + + def irc + @irc ||= begin + socket = TCPSocket.open(data['server'], port) + socket = new_ssl_wrapper(socket) if use_ssl? + socket + end + end + + alias readable_irc irc + alias writable_irc irc + + def new_ssl_wrapper(socket) + ssl_context = OpenSSL::SSL::SSLContext.new + ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE + ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context) + ssl_socket.sync_close = true + ssl_socket.connect + ssl_socket + end + + def use_ssl? + config_boolean_true?('ssl') + end + + def default_port + use_ssl? ? 6697 : 6667 + end + + def port + data['port'].to_i > 0 ? data['port'].to_i : default_port + end + + def url + config_boolean_true?('long_url') ? summary_url : shorten_url(summary_url) + end + + ### IRC message formatting. For reference: + ### \002 bold \003 color \017 reset \026 italic/reverse \037 underline + ### 0 white 1 black 2 dark blue 3 dark green + ### 4 dark red 5 brownish 6 dark purple 7 orange + ### 8 yellow 9 light green 10 dark teal 11 light teal + ### 12 light blue 13 light purple 14 dark gray 15 light gray + + def fmt_url(s) + "\00302\037#{s}\017" + end + + def fmt_repo(s) + "\00313#{s}\017" + end + + def fmt_name(s) + "\00315#{s}\017" + end + + def fmt_branch(s) + "\00306#{s}\017" + end + + def fmt_tag(s) + "\00306#{s}\017" + end + + def fmt_hash(s) + "\00314#{s}\017" + end + + def irc_push_summary_message + message = [] + message << "[#{fmt_repo repo_name}] #{fmt_name pusher_name}" + + if created? + if tag? + message << "tagged #{fmt_tag tag_name} at" + message << (base_ref ? fmt_branch(base_ref_name) : fmt_hash(after_sha)) + else + message << "created #{fmt_branch branch_name}" + + if base_ref + message << "from #{fmt_branch base_ref_name}" + elsif distinct_commits.empty? + message << "at #{fmt_hash after_sha}" + end + + num = distinct_commits.size + message << "(+\002#{num}\017 new commit#{num != 1 ? 's' : ''})" + end + + elsif deleted? + message << "\00304deleted\017 #{fmt_branch branch_name} at #{fmt_hash before_sha}" + + elsif forced? + message << "\00304force-pushed\017 #{fmt_branch branch_name} from #{fmt_hash before_sha} to #{fmt_hash after_sha}" + + elsif commits.any? and distinct_commits.empty? + if base_ref + message << "merged #{fmt_branch base_ref_name} into #{fmt_branch branch_name}" + else + message << "fast-forwarded #{fmt_branch branch_name} from #{fmt_hash before_sha} to #{fmt_hash after_sha}" + end + + else + num = distinct_commits.size + message << "pushed \002#{num}\017 new commit#{num != 1 ? 's' : ''} to #{fmt_branch branch_name}" + end + + message.join(' ') + end + + def irc_format_commit_message(commit) + short = commit['message'].split("\n", 2).first.to_s + short += '...' if short != commit['message'] + + author = commit['author']['name'] + sha1 = commit['id'] + files = Array(commit['modified']) + dirs = files.map { |file| File.dirname(file) }.uniq + + "#{fmt_repo repo_name}/#{fmt_branch branch_name} #{fmt_hash sha1[0..6]} " + + "#{fmt_name commit['author']['name']}: #{short}" + end + + def irc_issue_summary_message + "[#{fmt_repo repo.name}] #{fmt_name sender.login} #{action} issue \##{issue.number}: #{issue.title}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def irc_issue_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + "[#{fmt_repo repo.name}] #{fmt_name sender.login} commented on issue \##{issue.number}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def irc_commit_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + sha1 = comment.commit_id + "[#{fmt_repo repo.name}] #{fmt_name sender.login} commented on commit #{fmt_hash sha1[0..6]}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def irc_pull_request_summary_message + base_ref = pull.base.label.split(':').last + head_ref = pull.head.label.split(':').last + head_label = head_ref != base_ref ? head_ref : pull.head.label + + "[#{fmt_repo repo.name}] #{fmt_name sender.login} #{action} pull request " + + "\##{pull.number}: #{pull.title} (#{fmt_branch base_ref}...#{fmt_branch head_ref})" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def irc_pull_request_review_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + sha1 = comment.commit_id + "[#{fmt_repo repo.name}] #{fmt_name sender.login} commented on pull request " + + "\##{pull_request_number} #{fmt_hash sha1[0..6]}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def irc_gollum_summary_message + summary_message + end + + def branch_name_matches? + return true if data['branches'].nil? + return true if data['branches'].strip == "" + data['branches'].split(',').include?(branch_name) + end +end diff --git a/lib/services/irker.rb b/lib/services/irker.rb new file mode 100644 index 000000000..988b0cee3 --- /dev/null +++ b/lib/services/irker.rb @@ -0,0 +1,103 @@ +class Service::Irker < Service + string :address, :project, :branch, :module, :channels + boolean :long_url, :color, :full_commits + white_list :address, :project, :branch, :module, :channels, :long_url, :color, + :full_commits + + url 'http://www.catb.org/~esr/irker/' + logo_url 'http://www.catb.org/~esr/irker/irker-logo.png' + maintained_by :github => 'AI0867' + supported_by :web => 'irc://chat.freenode.net/#irker' + + require 'json' + + def receive_push + repository = + if !(name = data['project'].to_s).empty? + name + else + payload['repository']['name'] + end + + branch = + if !(branch = data['branch'].to_s).empty? + branch % branch_name + else + ref_name + end + + module_name = data['module'].to_s + + commits = payload['commits'] + + commits.each do |commit| + sha1 = commit['id'] + messages = build_irker_commit(repository, branch, sha1, commit, module_name) + messages.each do |message| + deliver(message) + end + end + end + + attr_writer :irker_con + def irker_con + @irker_con ||= begin + address = data['address'].to_s + if address.empty? + address = "localhost" + end + TCPSocket.new address, 6659 + end + end + + def deliver(message) + irker_con.puts(message) + end + + def build_irker_commit(repository, branch, sha1, commit, module_name) + log_lines = commit['message'].split("\n") + + files = commit['modified'] + commit['added'] + commit['removed'] + tiny_url = config_boolean_true?('long_url') ? commit['url'] : shorten_url(commit['url']) + channels = data['channels'].split(";") + + if config_boolean_true?('color') then + bold = "\x02" + green = "\x0303" + yellow = "\x0307" + brown = "\x0305" + reset = "\x0F" + else + bold = green = yellow = brown = reset = '' + end + + files.uniq! + file_string = files.join(",") + if file_string.size > 80 and files.size > 1 + prefix = files[0] + files.each do |file| + prefix = prefix.rpartition("/")[0] until file.match prefix + end + file_string = "#{prefix}/ (#{files.size} files)" + end + + messages = [] + if config_boolean_true?('full_commits') + privmsg = <<-PRIVMSG +#{bold}#{repository}:#{reset} #{green}#{commit['author']['name']}#{reset} #{module_name}:#{yellow}#{branch}#{reset} * #{bold}#{sha1[0..6]}#{reset} / #{bold}#{file_string}#{reset}: #{brown}#{tiny_url}#{reset} + PRIVMSG + log_lines[0..4].each do |log_line| + privmsg << <<-PRIVMSG +#{bold}#{repository}:#{reset} #{log_line[0..400]} + PRIVMSG + end + messages.push generate_json({'to' => channels, 'privmsg' => privmsg.strip}) + else + privmsg = <<-PRIVMSG +#{bold}#{repository}:#{reset} #{green}#{commit['author']['name']}#{reset} #{module_name}:#{yellow}#{branch}#{reset} * #{bold}#{sha1[0..6]}#{reset} / #{bold}#{file_string}#{reset}: #{log_lines[0][0..300]} #{brown}#{tiny_url}#{reset} + PRIVMSG + messages.push generate_json({'to' => channels, 'privmsg' => privmsg.strip}) + end + return messages + end +end diff --git a/lib/services/iron_mq.rb b/lib/services/iron_mq.rb new file mode 100644 index 000000000..c7030e37d --- /dev/null +++ b/lib/services/iron_mq.rb @@ -0,0 +1,58 @@ +class Service::IronMQ < Service + password :token + string :project_id + string :queue_name + white_list :project_id, :queue_name + + default_events :commit_comment, :download, :fork, :fork_apply, :gollum, + :issues, :issue_comment, :member, :public, :pull_request, :push, :watch + + url "http://iron.io" + logo_url "http://www.iron.io/assets/resources/mq/ironmq-logo-290x160.png" + + # Technoweenie on GitHub is pinged for any bugs with the Hook code. + maintained_by :github => 'treeder' + + # Support channels for user-level Hook problems (service failure, + # misconfigured + supported_by :web => 'http://support.iron.io', + :email => 'support@iron.io' + + def receive_event + #puts "IN PUSH" + #p data + #puts "payload:" + #p payload + + # make sure we have what we need + token = data['token'].to_s.strip + project_id = data['project_id'].to_s.strip + queue_name = data['queue_name'].to_s.strip + raise_config_error "Missing 'token'" if token == '' + raise_config_error "Missing 'project_id'" if project_id == '' + queue_name = queue_name != '' ? queue_name : "github_service_hooks" + + #http.ssl[:verify] = false + body = { + "messages" => [ + "body" => generate_json(payload) + ] + } + + if project_id == '111122223333444455556666' + # test + resp = DumbResponse.new + else + http_post " https://mq-aws-us-east-1.iron.io/1/projects/#{project_id}/queues/#{queue_name}/messages", generate_json(body), {"Authorization" => "OAuth #{token}"} + end + + return data, payload, resp + + end +end + +class DumbResponse + def code + 200 + end +end diff --git a/lib/services/iron_worker.rb b/lib/services/iron_worker.rb new file mode 100644 index 000000000..8a8f672f8 --- /dev/null +++ b/lib/services/iron_worker.rb @@ -0,0 +1,64 @@ +class Service::IronWorker < Service::HttpPost + password :token + string :project_id + string :code_name + white_list :project_id, :code_name + + default_events :commit_comment, :download, :fork, :fork_apply, :gollum, + :issues, :issue_comment, :member, :public, :pull_request, :push, :watch + + url "http://iron.io" + logo_url "http://www.iron.io/assets/resources/worker/ironworker-logo-290x160.png" + + # Technoweenie on GitHub is pinged for any bugs with the Hook code. + maintained_by :github => "treeder" # I'm happy to get pinged for bugs, but feel free to remove me and add Iron.io staff. + + # Support channels for user-level Hook problems (service failure, + # misconfigured + supported_by :web => 'http://get.iron.io/chat', + :email => 'support@iron.io' + + def receive_event + #puts "IN PUSH" + #p data + #puts "payload:" + #p payload + + # make sure we have what we need + token = data['token'].to_s.strip + project_id = data['project_id'].to_s.strip + code_name = data['code_name'].to_s.strip + + raise_config_error "Missing 'token'" if token == '' + raise_config_error "Missing 'project_id'" if project_id == '' + raise_config_error "Missing 'code_name'" if code_name == '' + + #http.ssl[:verify] = false + #body = { + # "messages" => [ + # "body" => payload.to_json + # ] + #} + + if project_id == '111122223333444455556666' + # test + resp = DumbResponse.new + else + url = iron_worker_webhook_url(project_id, token, code_name) + http_post url, JSON.generate(payload) + end + + return data, payload, resp + end + + def iron_worker_webhook_url(project_id, token, code_name) + worker_api_url = "https://worker-aws-us-east-1.iron.io/2" + "#{worker_api_url}/projects/#{project_id}/tasks/webhook?code_name=#{code_name}&oauth=#{token}" + end +end + +class DumbResponse + def code + 200 + end +end diff --git a/lib/services/jabber.rb b/lib/services/jabber.rb new file mode 100644 index 000000000..6445b1b8a --- /dev/null +++ b/lib/services/jabber.rb @@ -0,0 +1,56 @@ +class Service::Jabber < Service + string :user + white_list :user + + def receive_push + #Split multiple addresses into array, removing duplicates + recipients = data.has_key?('user') ? data['user'].split(',').each(&:strip!).uniq : [] + messages = [] + messages << "#{summary_message}: #{summary_url}" + messages += commit_messages + message = messages.join("\n") + + deliver_messages(message, recipients) + end + + def deliver_messages(message, recipients) + m = ::Jabber::Message.new(nil, message).set_type(:chat) + recipients.each do |recipient| + m.set_to(recipient) + client.send(m) + end + disconnect + end + + def client + @client ||= begin + user = secrets['jabber']['user'].to_s + pass = secrets['jabber']['password'].to_s + + if user.empty? || pass.empty? + raise_config_error("Missing Jabber user/pass: #{user.inspect}") + end + + jid = ::Jabber::JID.new(user) + client = ::Jabber::Client.new(jid) + client.connect + client.auth(pass) + + roster = ::Jabber::Roster::Helper.new(client, false) + roster.add_subscription_request_callback do |roster_item, presence| + roster.accept_subscription(presence.from) + end + + presence = ::Jabber::Presence.new(nil, "Available") + client.send(presence) + client.send_with_id(::Jabber::Iq.new_rosterget) + client + end + end + + def disconnect + client.close + @client = nil + end + +end diff --git a/lib/services/jaconda.rb b/lib/services/jaconda.rb new file mode 100644 index 000000000..66f536c63 --- /dev/null +++ b/lib/services/jaconda.rb @@ -0,0 +1,26 @@ +class Service::Jaconda < Service + string :subdomain, :room_id + password :room_token + boolean :digest + white_list :subdomain, :room_id + + default_events :commit_comment, :download, :fork, :fork_apply, :gollum, + :issues, :issue_comment, :member, :public, :pull_request, :push, :watch + + def receive_event + raise_config_error "Missing 'subdomain'" if data['subdomain'].to_s.empty? + raise_config_error "Missing 'room_id'" if data['room_id'].to_s.empty? + + http.basic_auth data['room_token'], 'X' + + res = http_post "https://#{data['subdomain']}.jaconda.im/api/v2/rooms/#{data['room_id']}/notify/github.json", + :payload => generate_json(payload), + :digest => data['digest'], + :event => event + + if res.status < 200 || res.status > 299 + raise_config_error "#{res.status}: #{res.body}" + end + end +end + diff --git a/lib/services/jenkins_git.rb b/lib/services/jenkins_git.rb new file mode 100644 index 000000000..c1b2e376a --- /dev/null +++ b/lib/services/jenkins_git.rb @@ -0,0 +1,27 @@ +class Service::JenkinsGit < Service + self.title = 'Jenkins (Git plugin)' + + NOTIFY_URL = '%s/git/notifyCommit' + + string :jenkins_url + white_list :jenkins_url + + def receive_push + if !data['jenkins_url'].present? + raise_config_error "Jenkins URL not set" + end + + url = NOTIFY_URL % data['jenkins_url'].sub(%r{/+$}, '') + + params = { + :url => repo_url, + :from => 'github' + } + + params[:branches] = branch_name unless tag? + + http.ssl[:verify] = false + http.url_prefix = url + http_get url, params + end +end diff --git a/lib/services/jenkins_github.rb b/lib/services/jenkins_github.rb new file mode 100644 index 000000000..a6955c112 --- /dev/null +++ b/lib/services/jenkins_github.rb @@ -0,0 +1,20 @@ +class Service::JenkinsGitHub < Service + self.title = 'Jenkins (GitHub plugin)' + self.hook_name = 'jenkins' # legacy hook name + + string :jenkins_hook_url + white_list :jenkins_hook_url + + def receive_push + if data['jenkins_hook_url'].present? + url = data['jenkins_hook_url'] + else + raise_config_error "Jenkins Hook Url not set" + end + http.ssl[:verify] = false # :( + http.url_prefix = url + http.headers['X-GitHub-Event'] = "push" + http_post url, + :payload => generate_json(payload) + end +end diff --git a/lib/services/jira.rb b/lib/services/jira.rb new file mode 100644 index 000000000..f33171d05 --- /dev/null +++ b/lib/services/jira.rb @@ -0,0 +1,49 @@ +class Service::JIRA < Service + string :server_url, :api_version, :username + password :password + white_list :api_version, :server_url, :username + + def receive_push + payload['commits'].each do |commit| + next if commit['message'] =~ /^x / + + comment_body = "#{commit['message']}\n#{commit['url']}" + + commit['message'].match(/\[#(.+)\]/) + # Don't need to continue if we don't have a commit message containing JIRA markup + next unless $1 + + jira_markup = $1.split + issue_id = jira_markup.shift + + changeset = { :comment => { :body => comment_body } } + + jira_markup.each do |entry| + key, value = entry.split(':') + + if key =~ /(?i)status|(?i)transition/ + changeset.merge!(:transition => value.to_s) + elsif key =~ /(?i)resolution/ + changeset.merge!(:fields => { :resolution => { :id => value.to_s } }) + else + changeset.merge!(:fields => { key.to_sym => "Resolved" }) + end + end + + # Don't need to continue if we don't have a transition to perform + next unless changeset.has_key?(:transition) + + begin + # :( + http.ssl[:verify] = false + + http.basic_auth data['username'], data['password'] + http.headers['Content-Type'] = 'application/json' + res = http_post '%s/rest/api/%s/issue/%s/transitions' % [data['server_url'], data['api_version'], issue_id], + generate_json(changeset) + rescue URI::InvalidURIError + raise_config_error "Invalid server_hostname: #{data['server_url']}" + end + end + end +end diff --git a/lib/services/kanbanery.rb b/lib/services/kanbanery.rb new file mode 100644 index 000000000..973cd1b5b --- /dev/null +++ b/lib/services/kanbanery.rb @@ -0,0 +1,16 @@ +class Service::Kanbanery < Service + string :project_id + password :project_token + white_list :project_id + + def receive_push + project_id = data['project_id'] + token = data['project_token'] + + http_post "https://kanbanery.com/api/v1/projects/#{project_id}/git_commits", + generate_json(payload), + 'X-Kanbanery-ProjectGitHubToken' => token, + 'Content-Type' => 'application/json' + end +end + diff --git a/lib/services/kanbanize.rb b/lib/services/kanbanize.rb new file mode 100644 index 000000000..7354084c3 --- /dev/null +++ b/lib/services/kanbanize.rb @@ -0,0 +1,48 @@ +class Service::Kanbanize < Service + string :kanbanize_domain_name + string :kanbanize_api_key + string :restrict_to_branch + boolean :restrict_to_last_commit + boolean :track_project_issues_in_kanbanize + string :project_issues_board_id + + # Skip the api key from the debug logs. + white_list :kanbanize_domain_name, :restrict_to_branch, :restrict_to_last_comment, :track_project_issues_in_kanbanize, :project_issues_board_id + + default_events :push, :issues, :issue_comment + + url "https://kanbanize.com/" + logo_url "https://kanbanize.com/application/resources/images/logo.png" + + maintained_by :github => 'DanielDraganov' + supported_by :email => 'office@kanbanize.com' + + def receive_event + # Make sure that the api key is provided. + raise_config_error "Missing 'kanbanize_api_key'" if data['kanbanize_api_key'].to_s == '' + + domain_name = data['kanbanize_domain_name'] + api_key = data['kanbanize_api_key'] + branch_restriction = data['restrict_to_branch'].to_s + commit_restriction = config_boolean_true?('restrict_to_last_commit') + issues_tracking = config_boolean_true?('track_project_issues_in_kanbanize') + issues_board_id = data['project_issues_board_id'].to_s + + # check the branch restriction is poplulated and branch is not included + if event.to_s == 'push' + branch = payload['ref'].split('/').last + if branch_restriction.length > 0 && branch_restriction.index(branch) == nil + return + end + end + + http_post "http://#{domain_name}/index.php/api/kanbanize/git_hub_event", + generate_json(payload), + 'apikey' => api_key, + 'branch-filter' => branch_restriction, + 'last-commit' => commit_restriction, + 'track-issues' => issues_tracking, + 'board-id' => issues_board_id, + 'Content-Type' => 'application/json' + end +end diff --git a/lib/services/landscape.rb b/lib/services/landscape.rb new file mode 100644 index 000000000..ca17ba1ef --- /dev/null +++ b/lib/services/landscape.rb @@ -0,0 +1,17 @@ +class Service::Landscape < Service::HttpPost + default_events Service::ALL_EVENTS + + url "https://landscape.io" + logo_url "https://landscape-io.s3.amazonaws.com/img/landscape_logo.png" + + maintained_by :github => 'landscapeio' + + supported_by :web => 'https://landscape.io/contact', + :email => 'help@landscape.io', + :twitter => 'landscapeio', + :github => 'landscapeio' + + def receive_event + deliver 'https://landscape.io/hooks/github' + end +end diff --git a/lib/services/leanpub.rb b/lib/services/leanpub.rb new file mode 100644 index 000000000..5de89a7ae --- /dev/null +++ b/lib/services/leanpub.rb @@ -0,0 +1,34 @@ +class Service::Leanpub < Service::HttpPost + string :api_key, :slug + + white_list :slug + + default_events :push + + url "https://leanpub.com" + logo_url "https://leanpub.com/assets/leanpub_logo_small.png" + + maintained_by :github => 'spatten', + :email => 'scott@leanpub.com', + :twitter => '@scott_patten' + + supported_by :web => 'https://leanpub.com/contact', + :email => 'hello@leanpub.com', + :twitter => '@leanpub' + + def receive_event + slug = required_config_value('slug') + api_key = required_config_value('api_key') + + if api_key.match(/^[A-Za-z0-9_-]+$/) == nil + raise_config_error "Invalid api key" + end + + if slug.match(/^[A-Za-z0-9_-]+$/) == nil + raise_config_error "Invalid slug" + end + + url = "https://leanpub.com:443/#{slug}/preview?api_key=#{api_key}" + deliver url + end +end diff --git a/lib/services/lighthouse.rb b/lib/services/lighthouse.rb new file mode 100644 index 000000000..3268ea779 --- /dev/null +++ b/lib/services/lighthouse.rb @@ -0,0 +1,59 @@ +class Service::Lighthouse < Service + string :subdomain, :project_id + password :token + boolean :private, :send_only_ticket_commits + white_list :subdomain, :project_id + + def receive_push + # matches string with square braces with content starting with # and a digit. + check_for_lighthouse_flags = /\[#\d.+?\]/ + + payload['commits'].each do |commit| + next if commit['message'] =~ /^x / + next if config_boolean_true?('send_only_ticket_commits') \ + && (commit['message'] =~ check_for_lighthouse_flags).nil? + + commit_id = commit['id'] + added = commit['added'].map { |f| ['A', f] } + removed = commit['removed'].map { |f| ['R', f] } + modified = commit['modified'].map { |f| ['M', f] } + diff = YAML.dump(added + removed + modified) + + diff = YAML.dump([]) if config_boolean_true?('private') + + title = "Changeset [%s] by %s" % [commit_id, commit['author']['name']] + body = "#{commit['message']}\n#{commit['url']}" + changeset_xml = <<-XML.strip + + #{CGI.escapeHTML(title)} + #{CGI.escapeHTML(body)} + #{CGI.escapeHTML(diff)} + #{CGI.escapeHTML(commit['author']['name'])} + #{CGI.escapeHTML(commit_id)} + #{CGI.escapeHTML(commit['timestamp'])} + + XML + + @lighthouse_body = changeset_xml + + account = "http://#{data['subdomain']}.lighthouseapp.com" + + begin + http.basic_auth data['token'], 'x' + http.headers['Content-Type'] = 'application/xml' + http_post '%s/projects/%d/changesets.xml' % [ + "http://#{data['subdomain']}.lighthouseapp.com", data['project_id'].to_i], + changeset_xml + rescue URI::InvalidURIError + raise_config_error "Invalid subdomain: #{data['subdomain']}" + end + end + end + + def reportable_http_env(env, time) + hash = super(env, time) + hash[:request][:body] = @lighthouse_body + @lighthouse_body = nil + hash + end +end diff --git a/lib/services/lingohub.rb b/lib/services/lingohub.rb new file mode 100644 index 000000000..e7e87415b --- /dev/null +++ b/lib/services/lingohub.rb @@ -0,0 +1,28 @@ +class Service::Lingohub < Service + + url "https://lingohub.com" + logo_url "https://lingohub.com/assets/public/press/media_kit/lingohub_logo.jpg" + + maintained_by :github => 'lingohub' + + supported_by :web => 'http://support.lingohub.com', + :email => 'support@lingohub.com' + + default_events :push + password :project_token + + def receive_push + project_token = data['project_token'] + + if project_token.nil? + raise_config_error "You have to specify a Project Token" + end + + res = http_post "http://lingohub.com/github_callback?auth_token=#{project_token}", + :payload => generate_json(payload) + + if res.status < 200 || res.status > 299 + raise_config_error res.body + end + end +end diff --git a/lib/services/mantis_bt.rb b/lib/services/mantis_bt.rb new file mode 100644 index 000000000..f46adb595 --- /dev/null +++ b/lib/services/mantis_bt.rb @@ -0,0 +1,20 @@ +class Service::MantisBT < Service + string :url, :api_key + white_list :url + + def receive_push + http.ssl[:verify] = false + http.url_prefix = data['url'] + res = http_post 'plugin.php', :payload => generate_json(payload) do |req| + req.params.update \ + :page => "Source/checkin", + :api_key => data['api_key'] + end + + if res.status < 200 || res.status > 299 + raise_config_error + end + rescue Faraday::Error::ConnectionFailed + raise_config_error "Connection refused. Invalid server URL." + end +end diff --git a/lib/services/maxcdn.rb b/lib/services/maxcdn.rb new file mode 100644 index 000000000..354ea11b2 --- /dev/null +++ b/lib/services/maxcdn.rb @@ -0,0 +1,66 @@ +require "maxcdn" + +class Service::MaxCDN < Service + + STATIC_EXTENSIONS = [ + :css, :js, :jpg, :jpeg, :gif, :ico, :png, :bmp, + :pict, :csv, :doc, :pdf, :pls, :ppt, :tif, :tiff, + :eps, :ejs, :swf, :midi, :mid, :txt, :ttf, :eot, + :woff, :otf, :svg, :svgz, :webp, :docx, :xlsx, + :xls, :pptx, :ps, :rss, :class, :jar + ].freeze + + string :alias, + :key, + :secret, + :zone_id + + boolean :static_only + + url "http://docs.maxcdn.com/" + logo_url "http://www.maxcdn.com/wp-content/themes/maxcdnv4/img/png/maxcdn-colored-logo.png" + + maintained_by :github => "jmervine", + :email => "joshua@mervine.net", + :twitter => "@mervinej" + + supported_by :web => "http://support.maxcdn.com/", + :email => "support@maxcdn.com", + :twitter => "@MaxCDN" + + def receive_push + return unless payload["commits"] + return if config_boolean_true?("static_only") and !has_static? + + begin + maxcdn.purge data["zone_id"] + rescue ::MaxCDN::APIException => e + raise_config_error(e.message) + end + end + + def modified_files + payload["commits"].map { |commit| commit["modified"] }.flatten!.uniq! + end + + def extensions + ::Service::MaxCDN::STATIC_EXTENSIONS + end + + def has_static? + files = modified_files.clone.select! do |file| + matched = false + extensions.each do |ext| + matched = true if /#{ext}/.match(file) + end + matched + end + + (files.size > 0) + end + + def maxcdn + @maxcdn ||= ::MaxCDN::Client.new(data["alias"], data["key"], data["secret"]) + end +end + diff --git a/lib/services/mqtt.rb b/lib/services/mqtt.rb new file mode 100644 index 000000000..550b01c05 --- /dev/null +++ b/lib/services/mqtt.rb @@ -0,0 +1,75 @@ +class Service::MqttPub < Service + self.title = 'MQTT publish' + + string :broker, :port, :topic, :clientid, :user + password :pass + boolean :retain + + require 'mqtt' + + def receive_push + + # Optional - use m2m.io public broker if not specified + broker = data['broker'].to_s + if broker == '' + broker = 'q.m2m.io' + end + + # Optional - use standard MQTT port if not specified + port = data['port'].to_i + if data['port'].to_s == '' + port = 1883 + end + + if data['topic'].to_s == '' + raise_config_error "Invalid topic. Try github// ." + end + + # Optional - generate random epoch for ID if not specified + clientid = data['clientid'].to_s + if clientid == '' + # Random ID doesn't make sense, but use prefix like MQTT::generate_client_id + clientid = 'github_' + Time.now.to_i.to_s + end + + # Optional, specify nil if not specified (per http://rubydoc.info/gems/mqtt/MQTT/Client) + user = data['user'].to_s + if user == '' + user = nil + end + + # Optional, specify nil if not specified + pass = data['pass'].to_s + if pass == '' + pass = nil + end + + # Handle specifying a username or a password, but not both + if user != nil and pass == nil + raise_config_error "You specified a username without a password." + end + + if pass != nil and user == nil + raise_config_error "You specified a password without a username." + end + + begin + # Connect to the broker, publish the payload! + MQTT::Client.connect( + :remote_host => broker, + :remote_port => port, + :client_id => clientid, + :username => user, + :password => pass + ) do |client| + client.publish(data['topic'].to_s, generate_json(payload), retain=data['retain']) + # Disconnect (don't send last will and testament) + client.disconnect(false) + end + rescue SocketError => e + warn "SocketError occurred: " + e + end + + end +end + diff --git a/lib/services/myget.rb b/lib/services/myget.rb new file mode 100644 index 000000000..e8489527e --- /dev/null +++ b/lib/services/myget.rb @@ -0,0 +1,23 @@ +class Service::MyGet < Service::HttpPost + string :hook_url + + white_list :hook_url + + url "https://www.myget.org" + logo_url "https://www.myget.org/Content/images/myget/myget_125x25.png" + + default_events :push + + maintained_by :github => 'myget', + :twitter => '@MyGetTeam' + + supported_by :web => 'https://www.myget.org/support', + :email => 'support@myget.org', + :twitter => '@MyGetTeam' + + def receive_event + url = required_config_value('hook_url') + + deliver url + end +end diff --git a/lib/services/obs.rb b/lib/services/obs.rb new file mode 100644 index 000000000..f3f08d635 --- /dev/null +++ b/lib/services/obs.rb @@ -0,0 +1,53 @@ +class Service::Obs < Service::HttpPost + string :url, :project, :package, :refs + password :token + + white_list :url, :project, :package, :refs + + default_events :push + + url "https://build.opensuse.org" + logo_url "https://github.com/openSUSE/obs-landing/blob/gh-pages/images/obs-logo.png" + + maintained_by :github => 'adrianschroeter' + + supported_by :web => 'https://www.openbuildservice.org/support/', + :email => 'buildservice-opensuse@opensuse.org' + + def receive_push + # required + token = required_config_value('token').to_s + apiurl = config_value('url') + apiurl = "https://api.opensuse.org:443" if apiurl.blank? + + # optional. The token may set the package container already. + project = config_value('project') + package = config_value('package') + + # optional. Do not filter references by default. + refs = config_value('refs') + + if refs.present? + return unless refs.split(":").any? do |pattern| + File::fnmatch(pattern, ref) + end + end + + # multiple tokens? handle each one individually + token.split(",").each do |t| + # token is not base64 + if t.strip.match(/^[A-Za-z0-9+\/=]+$/) == nil + raise_config_error "Invalid token" + end + + http.ssl[:verify] = false + http.headers['Authorization'] = "Token #{t.strip}" + + url = "#{apiurl}/trigger/runservice" + unless project.blank? or package.blank? + url << "?project=#{CGI.escape(project)}&package=#{CGI.escape(package)}" + end + deliver url + end + end +end diff --git a/lib/services/ontime.rb b/lib/services/ontime.rb new file mode 100644 index 000000000..6c9a29ae3 --- /dev/null +++ b/lib/services/ontime.rb @@ -0,0 +1,43 @@ +class Service::OnTime < Service + string :ontime_url, :api_key + white_list :ontime_url + + self.title = 'OnTime' + + def receive_push + raise_config_error 'No OnTime URL to connect to.' if data['ontime_url'].to_s.empty? + raise_config_error 'No API Key.' if data['api_key'].to_s.empty? + + http.url_prefix = data['ontime_url'] + json = generate_json(payload) + resp = http_get 'api/version' + version = JSON.parse(resp.body)['data'] + curvers = "#{version['major']}.#{version['minor]']}" + + # Hash the data, it has to be hexdigest in order to have the same hash value in .NET + hash_data = Digest::SHA256.hexdigest(json + data['api_key']) + + if (version['major'] == 11 and version['minor'] >= 1) or (version['major'] == 12 and version['minor'] < 2) + result = http_post 'api/github', :payload => json, :hash_data => hash_data, :source => :github, :service_version => 1.0, :ontime_version => curvers + elsif (version['major'] == 12 and version['minor'] >= 2) or (version['major'] == 13 and version['minor'] < 3) + result = http_post 'api/v1/github', :payload => json, :hash_data => hash_data, :source => :github, :service_version => 1.1, :ontime_version => curvers + elsif (version['major'] == 13 and version['minor'] >= 3) or version['major'] > 13 + http.headers['Content-Type'] = 'application/json' + result = http_post("api/v2/github?hash_data=#{hash_data}&ontime_version=#{curvers}&service_version=2.0", json) + else + raise_config_error 'Unexpected API version. Please update to the latest version of OnTime to use this service.' + end + + verify_response(result) + end + + def verify_response(res) + case res.status + when 200..299 + when 403, 401, 422 then raise_config_error("Invalid Credentials") + when 404, 301, 302 then raise_config_error("Invalid URL") + else raise_config_error("HTTP: #{res.status}") + end + end +end + diff --git a/lib/services/packagist.rb b/lib/services/packagist.rb new file mode 100644 index 000000000..f323ef0b3 --- /dev/null +++ b/lib/services/packagist.rb @@ -0,0 +1,52 @@ +class Service::Packagist < Service + string :user + password :token + string :domain + white_list :domain, :user + + def receive_push + http_post packagist_url, :payload => generate_json(payload), :username => user, :apiToken => token + end + + def packagist_url + "#{scheme}://#{domain}/api/github" + end + + def user + if data['user'].to_s == '' + payload['repository']['owner']['name'] + else + data['user'] + end.strip + end + + def token + if data['token'].to_s == '' + '' + else + data['token'].strip + end + end + + def scheme + domain_parts.size == 1 ? 'http' : domain_parts.first + end + + def domain + domain_parts.last + end + + protected + + def full_domain + if data['domain'].to_s == '' + 'https://packagist.org' + else + data['domain'].lstrip.sub(/[\/\s]+\z/,'').sub(/\Ahttp:\/\/packagist.org/, 'https://packagist.org') + end + end + + def domain_parts + @domain_parts ||= full_domain.split('://') + end +end diff --git a/lib/services/phraseapp.rb b/lib/services/phraseapp.rb new file mode 100644 index 000000000..b859514ff --- /dev/null +++ b/lib/services/phraseapp.rb @@ -0,0 +1,40 @@ +class Service::Phraseapp < Service::HttpPost + title "PhraseApp" + + password :auth_token + + white_list :auth_token + + default_events :push + + url "https://phraseapp.com" + logo_url "https://phraseapp.com/assets/github/phraseapp-logo.png" + + maintained_by github: "docstun" + + supported_by web: "https://phraseapp.com/contact", + email: "info@phraseapp.com", + twitter: "@phraseapp" + + def receive_push + auth_token = required_config_value("auth_token") + raise_config_error "Invalid auth token" unless auth_token.match(/^[A-Za-z0-9]+$/) + + body = generate_json(hook_params) + http_post(hook_uri, body) do |request| + request.params[:auth_token] = auth_token + end + end + +protected + def hook_uri + "https://phraseapp.com:443/api/v1/hooks/github" + end + + def hook_params + { + data: data, + payload: payload + } + end +end diff --git a/lib/services/pivotal_tracker.rb b/lib/services/pivotal_tracker.rb new file mode 100644 index 000000000..63c757ffe --- /dev/null +++ b/lib/services/pivotal_tracker.rb @@ -0,0 +1,27 @@ +class Service::PivotalTracker < Service + password :token + string :branch, :endpoint + white_list :endpoint, :branch + + def receive_push + token = data['token'] + branches = data['branch'].to_s.split(/\s+/) + ref = payload["ref"].to_s + + notify if branches.empty? || branches.include?(ref.split("/").last) + end + + def notify + endpoint = data['endpoint'].to_s + endpoint = 'https://www.pivotaltracker.com/services/v3/github_commits' if endpoint.empty? + res = http_post endpoint do |req| + req.params[:token] = data['token'] + req.body = {:payload => generate_json(payload)} + end + + if res.status < 200 || res.status > 299 + raise_config_error + end + end +end + diff --git a/lib/services/piwik_plugins.rb b/lib/services/piwik_plugins.rb new file mode 100644 index 000000000..8fdbbad71 --- /dev/null +++ b/lib/services/piwik_plugins.rb @@ -0,0 +1,17 @@ +class Service::PiwikPlugins < Service::HttpPost + + self.title = 'Piwik Plugins' + + url "http://plugins.piwik.org/" + + logo_url "http://piwik.org/wp-content/themes/piwik/img/logo_mainpage.png" + + maintained_by :github => 'halfdan', :twitter => 'geekproject' + + supported_by :email => 'fabian@piwik.org' + + def receive_push + deliver "http://plugins.piwik.org/postreceive-hook" + end + +end diff --git a/lib/services/planbox.rb b/lib/services/planbox.rb new file mode 100644 index 000000000..1af238eb3 --- /dev/null +++ b/lib/services/planbox.rb @@ -0,0 +1,16 @@ +class Service::Planbox < Service + password :token + + def receive_push + token = data['token'] + res = http_post 'https://work.planbox.com/api/github_commits' do |req| + req.params[:token] = data['token'] + req.body = {:payload => generate_json(payload)} + end + + if res.status < 200 || res.status > 299 + raise_config_error + end + end +end + diff --git a/lib/services/planio.rb b/lib/services/planio.rb new file mode 100644 index 000000000..cfb7f3181 --- /dev/null +++ b/lib/services/planio.rb @@ -0,0 +1,14 @@ +class Service::Planio < Service + string :address, :project, :api_key + white_list :address, :project + + def receive_push + http.ssl[:verify] = true + http.url_prefix = data['address'] + http_get "sys/fetch_changesets" do |req| + req.params['key'] = data['api_key'] + req.params['id'] = data['project'] + end + end +end + diff --git a/lib/services/prowl.rb b/lib/services/prowl.rb new file mode 100644 index 000000000..c23691d41 --- /dev/null +++ b/lib/services/prowl.rb @@ -0,0 +1,22 @@ +class Service::Prowl < Service + string :apikey + + def receive_push + return if payload['commits'].blank? + url = URI.parse('https://api.prowlapp.com/publicapi/add') + repository = payload['repository']['url'].split("/") + event = [repository[-2], repository[-1]].join('/') + application = "GitHub" + description = "#{payload['commits'].length} commits pushed to #{application} (#{payload['commits'][-1]['id'][0..7]}..#{payload['commits'][0]['id'][0..7]}) + + Latest Commit by #{payload['commits'][-1]['author']['name']} + #{payload['commits'][-1]['id'][0..7]} #{payload['commits'][-1]['message']}" + + http_post 'https://api.prowlapp.com/publicapi/add', + :apikey => data['apikey'], + :application => application, + :event => event, + :description => description, + :url => payload['compare'] + end +end diff --git a/lib/services/pushbullet.rb b/lib/services/pushbullet.rb new file mode 100644 index 000000000..c2460774d --- /dev/null +++ b/lib/services/pushbullet.rb @@ -0,0 +1,26 @@ +class Service::Pushbullet < Service::HttpPost + string :api_key, :device_iden + + default_events :push, :issues, :pull_request + + url "https://www.pushbullet.com/" + logo_url "https://www.pushbullet.com/img/header-logo.png" + + maintained_by :github => 'tuhoojabotti', + :twitter => 'tuhoojabotti', + :web => 'http://tuhoojabotti.com/#contact' + + supported_by :web => 'https://www.pushbullet.com/help', + :email => 'hey@pushbullet.com' + + def receive_event + unless required_config_value('api_key').match(/^[A-Za-z0-9\.]+$/) + raise_config_error "Invalid api key." + end + unless config_value('device_iden').match(/^([A-Za-z0-9]+|)$/) + raise_config_error "Invalid device iden." + end + + deliver "https://webhook.pushbullet.com:443/github" + end +end diff --git a/lib/services/pushover.rb b/lib/services/pushover.rb new file mode 100644 index 000000000..a95381a3c --- /dev/null +++ b/lib/services/pushover.rb @@ -0,0 +1,42 @@ +class Service::Pushover < Service + string :user_key, :device_name + white_list :device_name + + def receive_push + if !payload["commits"].any? + return + end + + if !data["user_key"] + raise_config_error "Invalid Pushover user key." + end + + url = URI.parse("https://api.pushover.net/1/messages.json") + + commits = payload["commits"].length + repo = payload["repository"]["url"].split("/")[-2 .. -1].join("/") + latest_message = payload["commits"].last["message"].split("\n").first + if latest_message.length > 100 + latest_message = latest_message[0 ... 96] + "[..]" + end + latest_url = shorten_url(payload["commits"].last["url"]) + + if commits == 1 + title = "#{payload["pusher"]["name"]} pushed to #{repo}" + message = latest_message + else + title = "#{payload["pusher"]["name"]} pushed #{commits} " + + "commit#{commits == 1 ? '' : 's'} to #{repo}" + message = "Latest: #{latest_message}" + end + + http_post url.to_s, + :token => "E6jpcJjaeASA7CWQ0cYjW6oP9N5xtJ", + :user => data["user_key"], + :device => data["device_name"], + :title => title, + :message => message, + :url => latest_url, + :url_title => "View commit on GitHub" + end +end diff --git a/lib/services/rally.rb b/lib/services/rally.rb new file mode 100644 index 000000000..6d5ee0f0e --- /dev/null +++ b/lib/services/rally.rb @@ -0,0 +1,186 @@ +require 'time' + +class Service::Rally < Service + string :server, :username, :workspace, :repository + password :password + white_list :server, :workspace, :repository + + attr_accessor :wksp_ref, :user_cache + + def receive_push + server = data['server'] + username = data['username'] + password = data['password'] + workspace = data['workspace'] + scm_repository = data['repository'] + raise_config_error("No Server value specified") if server.nil? or server.strip.length == 0 + raise_config_error("No UserName value specified") if username.nil? or username.strip.length == 0 + raise_config_error("No Password value specified") if password.nil? or password.strip.length == 0 + raise_config_error("No Workspace value specified") if workspace.nil? or workspace.strip.length == 0 + branch = payload['ref'].split('/')[-1] # most of the time it'll be refs/heads/master ==> master + repo = payload['repository']['name'] + repo_uri = payload['repository']['url'] + + http.ssl[:verify] = false + if server =~ /^https?:\/\// # if they have http:// or https://, leave server value unchanged + http.url_prefix = "#{server}/slm/webservice/1.30" + else + server = "#{server}.rallydev.com" if server !~ /\./ # leave unchanged if '.' in server + http.url_prefix = "https://#{server}/slm/webservice/1.30" + end + http.basic_auth(username, password) + http.headers['Content-Type'] = 'application/json' + http.headers['X-RallyIntegrationVendor'] = 'Rally' + http.headers['X-RallyIntegrationName'] = 'GitHub-Service' + http.headers['X-RallyIntegrationVersion'] = '1.1' + + # create the repo in Rally if it doesn't already exist + @wksp_ref = validateWorkspace(workspace) + repo_ref = getOrCreateRepo(scm_repository, repo, repo_uri) + @user_cache = {} + payload['commits'].each do |commit| + artifact_refs = snarfArtifacts(commit['message']) + addChangeset(commit, repo_ref, artifact_refs, repo_uri, branch) + end + end + + def addChangeset(commit, repo_ref, artifact_refs, repo_uri, branch) + author = commit['author']['email'] + if !@user_cache.has_key?(author) + user = rallyQuery('User', 'Name,UserName', 'UserName = "%s"' % [author]) + user_ref = "" + user_ref = itemRef(user) unless user.nil? + @user_cache[author] = user_ref + end + + user_ref = @user_cache[author] + message = commit['message'][0..3999] # message max size is 4000 characters + changeset = { + 'SCMRepository' => repo_ref, + 'Revision' => commit['id'], + 'CommitTimestamp' => Time.iso8601(commit['timestamp']).strftime("%FT%H:%M:%S.00Z"), + 'Author' => user_ref, + 'Message' => message, + 'Uri' => '%s/commit/%s' % [repo_uri, commit['id']], + 'Artifacts' => artifact_refs # [{'_ref' => 'defect/1324.js'}, {}...] + } + changeset.delete('Author') if user_ref == "" + + begin + changeset_item = rallyCreate('Changeset', changeset) + chgset_ref = itemRef(changeset_item) + rescue Faraday::Error => boom # or some other sort of Faraday::Error::xxxError + raise_config_error("Unable to create Rally Changeset") + # changeset_item = nil + end + + return if changeset_item.nil? + + # change has changeset_ref, Action, PathAndFilename, Uri + changes = [] + commit['added'].each { |add| changes << {'Action' => 'A', 'PathAndFilename' => add } } + commit['modified'].each { |mod| changes << {'Action' => 'M', 'PathAndFilename' => mod } } + commit['removed'].each { |rem| changes << {'Action' => 'R', 'PathAndFilename' => rem } } + changes.each do |change| + change['Changeset'] = chgset_ref + change['Uri'] = '%s/blob/%s/%s' % [repo_uri, branch, change['PathAndFilename']] + chg_item = rallyCreate('Change', change) + end + end + + def validateWorkspace(workspace) + all_your_workspaces = rallyWorkspaces() + target_workspace = all_your_workspaces.select {|wksp| wksp['Name'] == workspace and wksp['State'] != 'Closed'} + if target_workspace.length != 1 + problem = 'Config Error: target workspace %s not available in list of workspaces associated with your credentials' % [workspace] + raise_config_error(problem) + end + + return itemRef(target_workspace[0]) + end + + def getOrCreateRepo(scm_repository, repo, repo_uri) + scm_repository = repo if (scm_repository.nil? or scm_repository == "") + repo_item = rallyQuery('SCMRepository', 'Name', 'Name = "%s"' % scm_repository) + return itemRef(repo_item) unless repo_item.nil? + repo_info = { + 'Workspace' => @wksp_ref, + 'Name' => scm_repository, + 'SCMType' => 'GitHub', + 'Description' => 'GitHub-Service push Changesets', + 'Uri' => '%s' % [repo_uri] + } + repo_item = rallyCreate('SCMRepository', repo_info) + + return itemRef(repo_item) + end + + def itemRef(item) + ref = item['_ref'].split('/')[-2..-1].join('/')[0..-4] + end + + def rallyWorkspaces() + response = http_get('Subscription.js?fetch=Name,Workspaces,Workspace&pretty=true') + raise_config_error('Config error: credentials not valid for Rally endpoint') if response.status == 401 + raise_config_error('Config error: unable to obtain your Rally subscription info') unless response.success? + qr = JSON.parse(response.body) + begin + workspaces = qr['Subscription']['Workspaces'] + rescue Exception => ex + raise_config_error('Config error: no such workspace for your credentials') + end + + return workspaces + end + + def rallyQuery(entity, fields, criteria) + target_url = '%s.js?fetch=%s' % [entity.downcase, fields] + target_url += '&query=(%s)' % [criteria] if criteria.length > 0 + target_url += '&workspace=%s' % [@wksp_ref] + res = http_get(target_url) + raise StandardError("Config Error: #{entity} query failed") unless res.success? + qr = JSON.parse(res.body)['QueryResult'] + item = qr['TotalResultCount'] > 0 ? qr['Results'][0] : nil + + return item + end + + def rallyCreate(entity, data) + create_url = "%s/create.js?workspace=%s" % [entity, @wksp_ref] + payload = {"#{entity}" => data} + res = http_post(create_url,generate_json(payload)) + raise_config_error("Unable to create the Rally #{entity} for #{data['Name']}") unless res.success? + cr = JSON.parse(res.body)['CreateResult'] + item = cr['Object'] + + return item + end + + def snarfArtifacts(message) + art_type = { + 'D' => 'defect', + 'DE' => 'defect', + 'DS' => 'defectsuite', + 'TA' => 'task', + 'TC' => 'testcase', + 'S' => 'hierarchicalrequirement', + 'US' => 'hierarchicalrequirement' + } + formatted_id_pattern = '^(%s)\d+[\.:;]?$' % art_type.keys.join('|') # '^(D|DE|DS|TA|TC|S|US)\d+[\.:;]?$' + artifact_detector = Regexp.compile(formatted_id_pattern) + words = message.gsub(',', ' ').gsub('\r\n', '\n').gsub('\n', ' ').gsub('\t', ' ').split(' ') + rally_formatted_ids = words.select { |word| artifact_detector.match(word) } + artifacts = [] # actually, just the refs + rally_formatted_ids.uniq.each do |fmtid| + next unless fmtid =~ /^(([A-Z]{1,2})\d+)[\.:;]?$/ + fmtid, prefix = $1, $2 + entity = art_type[prefix] + artifact = rallyQuery(entity, 'Name', 'FormattedID = "%s"' % fmtid) + next if artifact.nil? + art_ref = itemRef(artifact) + artifacts << {'_ref' => art_ref} + end + + return artifacts + end +end diff --git a/lib/services/rational_team_concert.rb b/lib/services/rational_team_concert.rb new file mode 100644 index 000000000..8e3ffd390 --- /dev/null +++ b/lib/services/rational_team_concert.rb @@ -0,0 +1,163 @@ +class Service::RationalTeamConcert < Service + string :server_url, :username, :project_area_uuid + password :password + boolean :basic_authentication + boolean :no_verify_ssl + white_list :server_url, :username, :basic_authentication + attr_accessor :cookies + + def receive_push + checkSettings + prepare + authenticate + commit_changes + end + + def server_url + #trim trailing / if provided + @server_url ||= data['server_url'].gsub(/\/$/, '') + end + + def checkSettings + raise_config_error "Server Url url not set" if data['server_url'].blank? + raise_config_error "username not set" if data['username'].blank? + raise_config_error "password not set" if data['password'].blank? + raise_config_error "Project Area UUID is not set" if data['project_area_uuid'].blank? + end + + def prepare + if config_boolean_true?('no_verify_ssl') + http.ssl[:verify] = false + end + http.headers['X-com-ibm-team-userid']= data['username'] + end + + def authenticate + if config_boolean_true?('basic_authentication') + http.basic_auth data['username'], data['password'] + else + form_based_authentification + end + end + + def form_based_authentification + res= http_get '%s/authenticated/identity' % server_url + if not 'authrequired'.eql? res.headers['X-com-ibm-team-repository-web-auth-msg'] + # Expect one follow for WAS login + if res.env[:status] == 302 + captureCookies res + http.headers['Cookie']= cookieString + res = http_get res.env[:response_headers][:location] + if not 'authrequired'.eql? res.headers['X-com-ibm-team-repository-web-auth-msg'] + raise_config_error "Invalid authentication url. The response did not include a X-com-ibm-team-repository-web-auth-msg header" + end + else + raise_config_error "Invalid authentication url. The response did not include a X-com-ibm-team-repository-web-auth-msg header" + end + end + http.headers['Cookie']= captureCookies res + http.headers['Content-Type']= 'application/x-www-form-urlencoded' + + res= http_post '%s/authenticated/j_security_check' % server_url, + Faraday::Utils.build_nested_query(http.params.merge(:j_username => data['username'], :j_password => data['password'])) + + if 'authrequired'.eql? res.headers['X-com-ibm-team-repository-web-auth-msg'] + raise_config_error 'Invalid Username or Password' + end + + http.headers['Cookie']= captureCookies res + http.headers['Content-Type']= '' + res= http_get '%s/authenticated/identity' % server_url + captureCookies res + end + + def captureCookies (response) + @cookies ||= Hash.new + setstring = response.headers['set-cookie'] + if setstring + setstring.split(/, (?=[\w]+=)/).each { | cookie | + # trim off the cookie domain and update info + cookiepair = cookie.split('; ')[0]; + # split the key and value + cookieparts = cookiepair.split('=') + cookies[cookieparts[0]] = cookiepair[cookieparts[0].size+1..-1] + } + end + return cookieString + end + + def cookieString + result = '' + if cookies + cookies.each { |key, value| + result += key + '=' + value + (cookies.size > 1 ? ";" : "") + } + end + return result + end + + def commit_changes + http.headers['Content-Type']= 'application/json' + http.headers['oslc-core-version']= '2.0' + http.headers['accept']= 'application/json' + + payload['commits'].each do |commit| + next if commit['message'] =~ /^x / + commit['message'].match(/\[(#?(\d+)|[a-zA-Z0-9]+)[^\]]*\]/) + next unless $1 + + comment_body= generate_comment_body commit + work_item= $2 ? get_work_item($2) : new_work_item(commit, $1) + post_comment work_item, comment_body + end + end + + def generate_comment_body (commit) + + comment_body= "[Message] #{commit['message']}
" + + "[Author] #{commit['author']['name']}(#{commit['author']['email']})
" + + "[Url] #{commit['url']}
" + + comment_body= comment_body + "[Modified]
#{commit['modified'].join('
')}
" if commit['modified'].length > 0 + comment_body= comment_body + "[Added]
#{commit['added'].join('
')}
" if commit['added'].length > 0 + comment_body= comment_body + "[Removed]
#{commit['removed'].join('
')}
" if commit['removed'].length > 0 + return comment_body + end + + def get_work_item (work_item_number) + http.headers['Cookie']= cookieString + res= http_get "%s/resource/itemName/com.ibm.team.workitem.WorkItem/%s?oslc.properties=oslc:discussedBy" % [ server_url, work_item_number ] + # Expect one follow for WAS login + if res.env[:status] == 302 + captureCookies res + http.headers['Cookie']= cookieString + res = http_get res.env[:response_headers][:location] + end + return res.body + end + + def new_work_item (commit, work_item_type) + url= "%s/oslc/contexts/%s/workitems/%s" % [server_url, data['project_area_uuid'], work_item_type] + work_item= { 'dcterms:title' => commit['message']} + http.headers['Cookie']= cookieString + res= http_post url, generate_json(work_item) + raise_config_error "Work item was not created. Make sure that its possible to create work items with no additional required fields" unless res.status == 201 + return res.body + end + + def post_comment(work_item, comment_body) + comment_url= get_comment_url work_item + comment= { 'dcterms:description' => comment_body } + http.headers['Cookie']= cookieString + res= http_post comment_url, generate_json(comment) + raise_config_error "Not possible to add comments with the current setup" unless res.status == 201 + end + + def get_comment_url (work_item) + answer= JSON.parse(work_item) + raise_config_error "Invalid OSLC response. Unable to parse the work item" unless answer + discussedBy= answer['oslc:discussedBy'] + raise_config_error "Invalid OSLC response. Expected to receive oslc:discussedBy in the response" unless discussedBy + return "#{discussedBy['rdf:resource']}/oslc:comment" + end +end diff --git a/lib/services/rdocinfo.rb b/lib/services/rdocinfo.rb new file mode 100644 index 000000000..4489a3d36 --- /dev/null +++ b/lib/services/rdocinfo.rb @@ -0,0 +1,15 @@ +class Service::RDocInfo < Service::HttpPost + + default_events :push + + title 'RubyDoc.info' + url 'http://www.rubydoc.info' + + maintained_by :github => 'zapnap' + + supported_by :web => 'http://www.rubydoc.info', :github => 'zapnap' + + def receive_event + deliver 'http://www.rubydoc.info/checkout' + end +end diff --git a/lib/services/read_the_docs.rb b/lib/services/read_the_docs.rb new file mode 100644 index 000000000..50679a24d --- /dev/null +++ b/lib/services/read_the_docs.rb @@ -0,0 +1,6 @@ +class Service::ReadTheDocs < Service + def receive_push + http_post "https://readthedocs.org/github", :payload => generate_json(payload) + end +end + diff --git a/lib/services/redmine.rb b/lib/services/redmine.rb new file mode 100644 index 000000000..b64eb49a7 --- /dev/null +++ b/lib/services/redmine.rb @@ -0,0 +1,99 @@ +class Service::Redmine < Service + string :address, :project, :api_key + boolean :fetch_commits + boolean :update_redmine_issues_about_commits + white_list :address, :project + + def receive_push + + if fetch_github_commits_enabled? + http.ssl[:verify] = false + http.url_prefix = data['address'] + http_get "sys/fetch_changesets" do |req| + req.params['key'] = data['api_key'] + req.params['id'] = data['project'] + end + end + + if update_issues_enabled? + begin + # check configurations first + check_configuration_options(data) + + payload['commits'].each do |commit| + message = commit['message'].clone + + #Extract issue IDs and send update to the related issues + while !(id= message[/#(\d)+/]).nil? do + message.gsub!(id,'') + issue_no = id.gsub('#','') + + # Send the commit information to the related issue on redmine + http.url_prefix = data['address'] + + http_method :put, "issues/#{issue_no}.json" do |req| + req.headers['Content-Type'] = 'application/json' + req.headers['X-Redmine-API-Key'] = data['api_key'] + req.params['issue[notes]'] = commit_text(commit) + end + end + end + return true + rescue SocketError => se + puts "SocketError has occurred: #{se.inspect}" + return false + rescue Exception => e + puts "Other Exception has occurred: #{e.inspect}" + return false + end + end + end + + private + def check_configuration_options(data) + raise_config_error 'Redmine url must be set' if data['address'].blank? + raise_config_error 'API key is required' if data['api_key'].blank? + end + + def fetch_github_commits_enabled? + config_boolean_true?('fetch_commits') + end + + def update_issues_enabled? + config_boolean_true?('update_redmine_issues_about_commits') + end + + #Extract and buffer the needed commit information into one string + def commit_text(commit) + gitsha = commit['id'] + added = commit['added'].map { |f| ['A', f] } + removed = commit['removed'].map { |f| ['R', f] } + modified = commit['modified'].map { |f| ['M', f] } + + timestamp = Date.parse(commit['timestamp']) + + commit_author = "#{commit['author']['name']} <#{commit['author']['email']}>" + + text = align(<<-EOH) + Commit: #{gitsha} + #{commit['url']} + Author: #{commit_author} + Date: #{timestamp} (#{timestamp.strftime('%a, %d %b %Y')}) + + EOH + + text << align(<<-EOH) + Log Message: + ----------- + #{commit['message']} + EOH + + text + end + + def align(text, indent = ' ') + margin = text[/\A\s+/].size + text.gsub(/^\s{#{margin}}/, indent) + end + +end diff --git a/lib/services/scrumdo.rb b/lib/services/scrumdo.rb new file mode 100644 index 000000000..94f3aea17 --- /dev/null +++ b/lib/services/scrumdo.rb @@ -0,0 +1,20 @@ +class Service::ScrumDo < Service + string :username, :project_slug + password :password + white_list :project_slug, :username + + def receive_push + username = data["username"] + password = data["password"] + + url = "http://www.scrumdo.com/hooks/github/#{data["project_slug"]}" + res = http_post url do |req| + req.body = {:payload => generate_json(payload), :username=>username, :password=>password} + end + + if res.status < 200 || res.status > 299 + raise_config_error + end + end +end + diff --git a/lib/services/sifter.rb b/lib/services/sifter.rb new file mode 100644 index 000000000..ec432dcaf --- /dev/null +++ b/lib/services/sifter.rb @@ -0,0 +1,33 @@ +class Service::Sifter < Service + string :subdomain + password :token + + def receive_push + http.ssl[:verify] = false + + http_post hook_url do |req| + req.params[:token] = token + req.headers['Content-Type'] = 'application/json' + req.body = generate_json(payload) + end + end + + def hook_url + # For development/troubleshooting, the host and protocol can be set + # with the SIFTER_HOST variable, e.g. SIFTER_HOST=http://sifter.dev + host = ENV.fetch('SIFTER_HOST', 'sifterapp.com') + proto = ENV.has_key?('SIFTER_HOST') ? 'http' : 'https' + + "#{proto}://#{subdomain}.#{host}/api/github" + end + + def subdomain + data["subdomain"].to_s.strip + end + + def token + data["token"].to_s.strip + end + +end + diff --git a/lib/services/simperium.rb b/lib/services/simperium.rb new file mode 100644 index 000000000..cde1a1f58 --- /dev/null +++ b/lib/services/simperium.rb @@ -0,0 +1,43 @@ +class Service::Simperium < Service::HttpPost + string :app_id, :bucket + password :token + + white_list :app_id, :bucket + + default_events :push, :issues, :issue_comment, :commit_comment, + :pull_request, :pull_request_review_comment, :watch, :fork, + :fork_apply, :member, :public, :team_add, :status + + url "https://simperium.com" + logo_url "https://simperium.com/media/images/simperium_logo_black_sm.png" + + maintained_by :github => 'fredrocious', + :twitter => '@fredrocious' + + supported_by :web => 'https://simperium.com/contact', + :email => 'help@simperium.com', + :twitter => '@simperium' + + def receive_event + appid = required_config_value('app_id') + token = required_config_value('token') + bucket = required_config_value('bucket') + + if appid.match(/^[A-Za-z0-9-]+$/) == nil + raise_config_error "Invalid app id" + end + + if token.match(/^[A-Za-z0-9]+$/) == nil + raise_config_error "Invalid token" + end + + if bucket.match(/^[A-Za-z0-9\-\.@]+$/) == nil + raise_config_error "Invalid bucket name" + end + + http.headers['Authorization'] = "Token #{token}" + + url = "https://api.simperium.com:443/1/#{appid}/#{bucket}/i/#{delivery_guid}" + deliver url + end +end diff --git a/lib/services/skydeskprojects.rb b/lib/services/skydeskprojects.rb new file mode 100644 index 000000000..538ecbb1a --- /dev/null +++ b/lib/services/skydeskprojects.rb @@ -0,0 +1,31 @@ +# encoding: utf-8 +class Service::SkyDeskProjects < Service::HttpPost + string :project_id + password :token + + white_list :project_id + + url "https://www.skydesk.jp" + logo_url "https://www.skydesk.jp/static/common/images/header/ci/ci_skydesk.gif" + + maintained_by :github => 'SkyDeskProjects' + + supported_by :web => 'www.skydesk.jp/en/contact/', + :email => 'support_projects@skydesk.jp' + + def receive_push + token = required_config_value('token') + pId = required_config_value('project_id') + #http.headers['Authorization'] = "Token #{token}" + + #url = "https://projects.skydesk.jp/serviceHook" + res = http_post "https://projects.skydesk.jp/serviceHook", + :pId => pId, + :authtoken => token, + :scope => "projectsapi", + :payload => generate_json(payload) + if res.status != 200 + raise_config_error + end + end +end diff --git a/lib/services/smartling.rb b/lib/services/smartling.rb new file mode 100644 index 000000000..93f1eecf4 --- /dev/null +++ b/lib/services/smartling.rb @@ -0,0 +1,39 @@ +class Service::Smartling < Service + + url "http://smartling.com" + + maintained_by :github => 'smartling' + + supported_by :web => 'http://support.smartling.com', + :email => 'support@smartling.com' + + string :service_url, :project_id + password :api_key + string :config_path + boolean :master_only + white_list :service_url, :project_id, :config_path + + def receive_push + check_config + if config_boolean_false?("master_only") || payload["ref"] == "refs/heads/master" + payload["projectId"] = data["project_id"] + payload["apiKey"] = data["api_key"] + payload["resourceFile"] = data["config_path"] + + http.url_prefix = data["service_url"].to_s + res = http_post "github", generate_json(payload) + + if res.status < 200 || res.status > 299 + raise_config_error "Status: " + res.status.to_s + ", body: " + res.body + end + end + end + + def check_config + raise_config_error "Missing smartling broker url" if data["service_url"].to_s.empty? + raise_config_error "Missing project id" if data["project_id"].to_s.empty? + raise_config_error "Missing smartling api key" if data["api_key"].to_s.empty? + raise_config_error "Missing path to the project configuration" if data["config_path"].to_s.empty? + end + +end diff --git a/lib/services/snowyevening.rb b/lib/services/snowyevening.rb new file mode 100644 index 000000000..6a844562d --- /dev/null +++ b/lib/services/snowyevening.rb @@ -0,0 +1,10 @@ +class Service::SnowyEvening < Service + string :project, :api_key + + def receive_push + http.ssl[:verify] = false + res = http_post "https://snowy-evening.com/api/integration/github_commit/"+data['api_key']+"/"+data['project'], + :payload => generate_json(payload) + return + end +end diff --git a/lib/services/softlayer_messaging.rb b/lib/services/softlayer_messaging.rb new file mode 100644 index 000000000..14774b1e7 --- /dev/null +++ b/lib/services/softlayer_messaging.rb @@ -0,0 +1,104 @@ +class Service::SoftLayerMessaging < Service + string :account, :user, :name + password :key + boolean :topic + white_list :account, :user, :name + + attr_writer :client + + # receive_push + def receive_push + return unless data && payload + + if data['account'].to_s.empty? + raise_config_error "You must define an publishing account." + end + + if data['user'].to_s.empty? + raise_config_error "You must define an authorized user." + end + + if data['name'].to_s.empty? + raise_config_error "You must define a queue/topic name." + end + + if data['key'].to_s.empty? + raise_config_error "You must provide the api key." + end + + publish_message(account, user, apikey, name, data['topic'], payload) + + end + + # publish_message + def publish_message(account, user, key, name, topic, payload) + client.authenticate(user, key) + # mungle + options = { + :fields => { + :repository => payload['repository']['name'], + :owner => payload['repository']['owner']['name'], + :email => payload['repository']['owner']['email'], + :ref => payload['ref'], + :created => payload['created'], + :forced => payload['forced'], + :deleted => payload['deleted'] + } + } + + # Encode payload to JSON + # hopefully not bigger than 64K + payload_json_data = generate_json(payload) + + begin + if topic + push_to_topic(name, payload_json_data, options) + else + push_to_queue(name, payload_json_data, options) + end + + rescue RestClient::ServerBrokeConnection => broken + raise_config_error "Disconnected #{broken.to_s}" + rescue RestClient::ExceptionWithResponse => req + case req.http_code + when 404 + raise_config_error 'Topic or Queue not created prior to publishing' + when 401 + raise_config_error 'Bad SoftLayer messaging authentication information' + else + raise_config_error "Unhandled SoftLayer response: #{req}" + end + end + end + + def push_to_topic(name, payload, options={}) + topic = client.topic(name) + topic.publish(payload, options) + end + + def push_to_queue(name, payload, options={}) + queue = client.queue(name) + queue.push(payload, options) + end + + def client + @client ||= SL::Messaging::Client.new(data['account']) + end + + def account + data['account'].strip + end + + def apikey + data['key'].strip + end + + def user + data['user'].strip + end + + def name + data['name'].strip + end + +end diff --git a/lib/services/sprintly.rb b/lib/services/sprintly.rb new file mode 100644 index 000000000..abfd0db4f --- /dev/null +++ b/lib/services/sprintly.rb @@ -0,0 +1,21 @@ +class Service::Sprintly < Service + default_events :commit_comment, :create, :delete, :download, + :follow, :fork, :fork_apply, :gist, :gollum, :issue_comment, + :issues, :member, :public, :pull_request, :push, :team_add, + :watch, :pull_request_review_comment, :status + string :email, :api_key, :product_id + white_list :email, :product_id + + def receive_event + raise_config_error "Must provide an api key" if data['api_key'].to_s.empty? + raise_config_error "Must provide an email address." if data['email'].to_s.empty? + raise_config_error "Must provide a product id." if data['product_id'].to_s.empty? + host_name = ENV['SPRINTLY_DEBUG_HOST'] || "https://sprint.ly" + + http.headers['Content-Type'] = 'application/json' + http.basic_auth(data['email'], data['api_key']) + + http_post "#{host_name}/integration/github/#{data['product_id']}/#{event}/", generate_json(payload) + end +end + diff --git a/lib/services/sqs_queue.rb b/lib/services/sqs_queue.rb new file mode 100644 index 000000000..7f4daa70f --- /dev/null +++ b/lib/services/sqs_queue.rb @@ -0,0 +1,100 @@ +class Service::SqsQueue < Service::HttpPost + self.title = "Amazon SQS" + + string :aws_access_key, :aws_sqs_arn + password :aws_secret_key + # NOTE: at some point, sqs_queue_name needs to be deprecated and removed + white_list :aws_access_key, :sqs_queue_name, :aws_sqs_arn + + maintained_by github: 'brycem', + twitter: 'brycemcd' + + def receive_event + return unless data && payload + + if data['aws_access_key'].to_s.empty? + raise_config_error "You must define an AWS access key." + end + + if data['aws_secret_key'].to_s.empty? + raise_config_error "You must define an AWS secret key." + end + + if data['sqs_queue_name'].to_s.empty? && data['aws_sqs_arn'].to_s.empty? + raise_config_error "You must define an SQS queue name or SQS queue ARN." + end + + # Encode payload to JSON + payload_json_data = generate_json(payload) + + # Send payload to SQS queue + notify_sqs( access_key, secret_key, payload_json_data ) + end + + def notify_sqs(aws_access_key, aws_secret_key, payload) + sqs = sqs_client + + if data['aws_sqs_arn'] && data['aws_sqs_arn'].match(/^http/) + queue = sqs.queues[data['aws_sqs_arn']] + else + queue = sqs.queues.named(queue_name) + end + sqs.client.send_message( + queue_url: queue.url, + message_body: clean_for_json(payload), + message_attributes: { + 'X-GitHub-Event' => { string_value: event.to_s, data_type: 'String'} + } + ) + end + + def access_key + data['aws_access_key'].strip + end + + def secret_key + data['aws_secret_key'].strip + end + + def queue_name + arn[:queue_name] || data['sqs_queue_name'].strip + end + + def region + arn[:region] || 'us-east-1' + end + + def stubbed_requests? + !!ENV['SQS_STUB_REQUESTS'] + end + + def aws_config + { + :region => region, + :logger => stubbed_requests? ? nil : Logger.new(STDOUT), + :access_key_id => access_key, + :secret_access_key => secret_key, + :stub_requests => stubbed_requests?, + } + end + + def sqs_client + @sqs_client ||= ::AWS::SQS.new(aws_config) + end + + private + + def arn + @arn ||= parse_arn + end + + def parse_arn + return {} unless data['aws_sqs_arn'] && !data['aws_sqs_arn'].match(/^http/) + _,_,service,region,id,queue_name = data['aws_sqs_arn'].split(":") + {service: service.strip, + region: region.strip, + id: id.strip, + queue_name: queue_name.strip + } + end +end diff --git a/lib/services/statusnet.rb b/lib/services/statusnet.rb new file mode 100644 index 000000000..2c965c12a --- /dev/null +++ b/lib/services/statusnet.rb @@ -0,0 +1,32 @@ +class Service::StatusNet < Service + string :server, :username + password :password + boolean :digest + white_list :server, :username + + def receive_push + repository = payload['repository']['name'] + statuses = Array.new + + if config_boolean_true?('digest') + commit = payload['commits'][-1] + tiny_url = shorten_url("#{payload['repository']['url']}/commits/#{ref_name}") + statuses.push "[#{repository}] #{tiny_url} #{commit['author']['name']} - #{payload['commits'].length} commits" + else + payload['commits'].each do |commit| + tiny_url = shorten_url(commit['url']) + statuses.push "[#{repository}] #{tiny_url} #{commit['author']['name']} - #{commit['message']}" + end + end + + http.ssl[:verify] = false + http.url_prefix = data['server'] + http.basic_auth(data['username'], data['password']) + statuses.each do |status| + http_post '/api/statuses/update.xml', + 'status' => status, 'source' => 'github' + end + rescue Faraday::Error::ConnectionFailed + raise_config_error "Connection refused. Invalid server configuration." + end +end diff --git a/lib/services/talker.rb b/lib/services/talker.rb new file mode 100644 index 000000000..c52f47263 --- /dev/null +++ b/lib/services/talker.rb @@ -0,0 +1,52 @@ +# coding: utf-8 +class Service::Talker < Service + string :url + password :token + boolean :digest + white_list :url + + def receive_push + repository = payload['repository']['name'] + branch = branch_name + commits = payload['commits'] + + prepare_http + + say "#{summary_message} – #{summary_url}" + if config_boolean_false?('digest') + if distinct_commits.size == 1 + commit = distinct_commits.first + say format_commit_message(commit) + else + distinct_commits.each do |commit| + say "#{format_commit_message(commit)} – #{commit['url']}" + end + end + end + end + + def receive_pull_request + return unless opened? + + prepare_http + say "#{summary_message}. #{summary_url}" + end + + def receive_issues + return unless opened? + + prepare_http + say summary_message + end + + private + def prepare_http + http.ssl[:verify] = false + http.headers["X-Talker-Token"] = data['token'] + http.url_prefix = data['url'] + end + + def say(message) + http_post 'messages.json', :message => message + end +end diff --git a/lib/services/target_process.rb b/lib/services/target_process.rb new file mode 100644 index 000000000..34b12a5c1 --- /dev/null +++ b/lib/services/target_process.rb @@ -0,0 +1,63 @@ +class Service::TargetProcess < Service + string :base_url, :username + password :password + white_list :base_url, :username + + def receive_push + # setup things for our REST calls + http.ssl[:verify] = false + http.url_prefix = data['base_url'] + http.headers['Content-Type'] = 'application/json' + http.basic_auth(data['username'], data['password']) + @project_id = data['project_id'] + # And go! + payload["commits"].each{ + |commit| process_commit(commit) + } + end + +private + def valid_response?(res) + case res.status + when 200..299 + when 403, 401, 422 then raise_config_error("Invalid Credentials") + when 404, 301, 302 then raise_config_error("Invalid TargetProcess URL") + else raise_config_error("HTTP: #{res.status}") + end + true + end + + def process_commit(commit) + author = commit["author"]["email"] + commit_url = commit["url"] + commit["message"].split("\n").each { |commit_line| + parts = commit_line.match(/(\s|^)(?#|id:)(\d+)(:[^\s]+)?(\s|$)/) + next if parts.nil? + entity_id = parts[3].strip + next if entity_id.nil? or entity_id.length == 0 + if parts[4].nil? or parts[4].length == 0 + command = nil + else + command = parts[4].strip + end + execute_command(author, entity_id, command, commit_line, commit_url, commit) + } + end + + def execute_command(author, entity_id, new_state, commit_message, commit_url, raw_commit) + return if command.nil? + require 'json' + # get the user's id + res = http_get "api/v1/Users", {:where => "(Email eq '%s')" % author} + valid_response?(res) + author_id = begin JSON.parse(res.body)['Users']['User']['Id'] rescue nil end + return if author_id.nil? + # Make it happen + commit_message = "#{commit_message}
Commit: #{commit_url}" + valid_response?(http_post "api/v1/Comments", "{General: {Id: #{entity_id}}, Description: '#{commit_message.gsub("'","\'")}', Owner: {Id: #{author_id}}}") + if !new_state.nil? + valid_response?(http_post "api/v1/Assignables/%s" % entity_id, "{EntityState: {Name: #{new_state}}}") + end + end +end + diff --git a/lib/services/tddium.rb b/lib/services/tddium.rb new file mode 100644 index 000000000..6adbecafa --- /dev/null +++ b/lib/services/tddium.rb @@ -0,0 +1,23 @@ +class Service::Tddium < Service::HttpPost + password :token + string :override_url + + white_list :override_url + + url "https://www.tddium.com" + logo_url "https://www.tddium.com/favicon.ico" + + maintained_by :github => 'solanolabs', :twitter => '@solanolabs' + supported_by :web => 'https://support.tddium.com/', :email => 'support@tddium.com' + + default_events Service::ALL_EVENTS + + def receive_event + token = required_config_value('token') + override_url = data['override_url'] + + url_base = override_url.present? ? override_url : "https://hooks.tddium.com:443/1/github" + tddium_url = "#{url_base}/#{token}" + deliver tddium_url + end +end diff --git a/lib/services/teamcity.rb b/lib/services/teamcity.rb new file mode 100644 index 000000000..cd16293cf --- /dev/null +++ b/lib/services/teamcity.rb @@ -0,0 +1,75 @@ +class Service::TeamCity < Service + string :base_url, :build_type_id, :branches + boolean :full_branch_ref + string :username + password :password + boolean :check_for_changes_only + white_list :base_url, :build_type_id, :branches, :username, :full_branch_ref + + maintained_by :github => 'JetBrains' + + supported_by :web => 'http://confluence.jetbrains.com/display/TW/Feedback', + :email => 'teamcity-support@jetbrains.com' + + def receive_push + return if payload['deleted'] + + check_for_changes_only = config_boolean_true?('check_for_changes_only') + + branches = data['branches'].to_s.split(/\s+/) + ref = payload["ref"].to_s + branch = config_boolean_true?('full_branch_ref') ? ref : ref.split("/", 3).last + return unless branches.empty? || branches.include?(branch) + + # :( + http.ssl[:verify] = false + + base_url = data['base_url'].to_s + if base_url.empty? + raise_config_error "No base url: #{base_url.inspect}" + end + + http.headers['Content-Type'] = 'application/xml' + http.url_prefix = base_url + http.basic_auth data['username'].to_s, data['password'].to_s + build_type_ids = data['build_type_id'].to_s + build_type_ids.split(",").each do |build_type_id| + + res = perform_post_request(build_type_id, check_for_changes_only, branch: branch) + + # Hotfix for older TeamCity versions (older than 2017.1.1) where a GET is needed + if res.status == 415 || res.status == 405 + res = perform_get_request(build_type_id, check_for_changes_only, branch: branch) + end + + case res.status + when 200..299 + when 403, 401, 422 then raise_config_error("Invalid credentials") + when 404, 301, 302 then raise_config_error("Invalid TeamCity URL") + else raise_config_error("HTTP: #{res.status}") + end + + end + rescue SocketError => e + raise_config_error "Invalid TeamCity host name" if e.to_s =~ /getaddrinfo: Name or service not known/ + raise + end + + # This is undocumented call. TODO: migrate to REST API (TC at least 8.0) + def perform_post_request(build_type_id, check_for_changes_only, branch: nil) + if check_for_changes_only + http_post "httpAuth/app/rest/vcs-root-instances/checkingForChangesQueue?locator=buildType:#{build_type_id}" + else + http_post "httpAuth/app/rest/buildQueue", "" + end + end + + # This is undocumented call. TODO: migrate to REST API (TC at least 8.0) + def perform_get_request(build_type_id, check_for_changes_only, branch: nil) + if check_for_changes_only + http_get "httpAuth/action.html", :checkForChangesBuildType => build_type_id + else + http_get "httpAuth/action.html", :add2Queue => build_type_id, :branchName => branch + end + end +end diff --git a/lib/services/tender.rb b/lib/services/tender.rb new file mode 100644 index 000000000..52d8c9a28 --- /dev/null +++ b/lib/services/tender.rb @@ -0,0 +1,48 @@ +class Service::Tender < Service + # mysite.tenderapp.com + string :domain + + # tracker token. can be found here: + # http://mysite.tenderapp.com/settings/trackers + password :token + + default_events :issues, :pull_request + + url 'https://tenderapp.com' + logo_url 'https://tenderapp.com/images/logo.jpg' + + # julien on http://help.tenderapp.com/home + maintained_by :github => 'calexicoz' + + # Support channels for user-level Hook problems (service failure, misconfigured) + supported_by :web => 'http://help.tenderapp.com/home', + :email => 'support@tenderapp.com' + + def receive_issues + raise_config_error 'Missing token' if data['token'].to_s.empty? + raise_config_error 'Missing domain' if data['domain'].to_s.empty? + + begin + # Nothing to see here really, just reposting the payload as-is + http.headers['content-type'] = 'application/json' + http.ssl[:verify] = false + body = generate_json(payload) + url = "https://#{data['domain']}/tickets/github/#{data['token']}" + http_post url, body + + # Shamelessly copied from the 'web' service + rescue Addressable::URI::InvalidURIError, Errno::EHOSTUNREACH + raise_missing_error $!.to_s + rescue SocketError + if $!.to_s =~ /getaddrinfo:/ + raise_missing_error "Invalid host name." + else + raise + end + rescue EOFError + raise_config_error "Invalid server response. Make sure the URL uses the correct protocol." + end + end + + alias receive_pull_request receive_issues +end diff --git a/lib/services/toggl.rb b/lib/services/toggl.rb new file mode 100644 index 000000000..97925a422 --- /dev/null +++ b/lib/services/toggl.rb @@ -0,0 +1,30 @@ +class Service::Toggl < Service + string :project + password :api_token + white_list :project + + def receive_push + http.url_prefix = "https://www.toggl.com/api/v8" + http.basic_auth data['api_token'], 'api_token' + http.headers['Content-Type'] = 'application/json' + + payload["commits"].each do |commit| + duration = (commit["message"].split(/\s/).find { |item| /t:/ =~ item } || "")[2,100] + next unless duration + + # Toggl wants it in seconds. Commits should be in seconds + duration = duration.to_i * 60 + http_post "time_entries", generate_json( + :time_entry => { + :duration => duration.to_i, + :description => commit["message"].strip, + :pid => data["project"], + :start => (Time.now - duration.to_i).iso8601, + :billable => true, # this is a pro feature, will be ignored for free version users + :created_with => "github", + :stop => Time.now.iso8601 + } + ) + end + end +end diff --git a/lib/services/trac.rb b/lib/services/trac.rb new file mode 100644 index 000000000..c60b1b79d --- /dev/null +++ b/lib/services/trac.rb @@ -0,0 +1,13 @@ +class Service::Trac < Service + string :url + password :token + white_list :url + + def receive_push + http.ssl[:verify] = false + http.url_prefix = data['url'] + http_post "github/#{data['token']}", :payload => generate_json(payload) + rescue Faraday::Error::ConnectionFailed + raise_config_error "Connection refused. Invalid server URL." + end +end diff --git a/lib/services/travis.rb b/lib/services/travis.rb new file mode 100644 index 000000000..b9821d16f --- /dev/null +++ b/lib/services/travis.rb @@ -0,0 +1,65 @@ +class Service::Travis < Service + self.title = "Travis CI" + url "https://travis-ci.org" + + maintained_by :github => 'travisci' + + supported_by :email => 'support@travis-ci.com' + + default_events :push, :pull_request, :issue_comment, :public, :member + string :user + password :token + string :domain + white_list :domain, :user + + def receive_event + http.ssl[:verify] = false + http.basic_auth user, token + http.headers['X-GitHub-Event'] = event.to_s + http.headers['X-GitHub-GUID'] = delivery_guid.to_s + http_post travis_url, :payload => generate_json(payload) + end + + def travis_url + "#{scheme}://#{domain}" + end + + def user + if data['user'].to_s == '' + owner_payload['login'] || owner_payload['name'] + else + data['user'] + end.strip + end + + def token + data['token'].to_s.strip + end + + def scheme + domain_parts.size == 1 ? 'http' : domain_parts.first + end + + def domain + domain_parts.last + end + + protected + + def owner_payload + payload['repository']['owner'] + end + + def full_domain + if data['domain'].present? + data['domain'] + else + 'http://notify.travis-ci.org' + end.strip + end + + def domain_parts + @domain_parts ||= full_domain.split('://') + end +end + diff --git a/lib/services/trello.rb b/lib/services/trello.rb new file mode 100644 index 000000000..86d277303 --- /dev/null +++ b/lib/services/trello.rb @@ -0,0 +1,150 @@ +class Service::Trello < Service + string :push_list_id, :pull_request_list_id, :ignore_regex + boolean :master_only + password :consumer_token + + default_events :push, :pull_request + + def receive_pull_request + return unless opened? + assert_required_credentials :pull_request + create_card :pull_request, name_for_pull(pull), desc_for_pull(pull) + end + + def receive_push + return unless process_commits? + assert_required_credentials :push + process_commits :push + end + + private + + def name_for_pull(pull) + pull.title + end + + def desc_for_pull(pull) + "Author: %s\n\n%s\n\nDescription: %s" % [ + pull.user.login, + pull.html_url, + pull.body || '[no description]' + ] + end + + def http_post(*args) + http.url_prefix = "https://api.trello.com/1" + super + end + + def process_commits? + payload['commits'].size > 0 && (config_boolean_false?('master_only') || branch_name == 'master') + end + + def assert_required_credentials(event) + if consumer_token.empty? + raise_config_error "You need an authorization Token. See tips below." + end + if list_id(event).empty? + raise_config_error "You need to enter a list identifiter. See tips below." + end + end + + def create_card(event, name, description) + http_post "cards", + :name => name, + :desc => description, + :idList => list_id(event), + :key => application_key, + :token => consumer_token + end + + def process_commits(event) + payload['commits'].each do |commit| + next if ignore_commit? commit + create_card event, name_for_commit(commit), desc_for_commit(commit) + find_card_ids(commit['message'] || '').each do |card_id| + comment_on_card card_id, card_comment(commit) + end + end + end + + def card_comment(commit) + "#{commit_author(commit)} added commit #{commit['url']}" + end + + def comment_on_card(card_id, message) + http_post "cards/#{card_id}/actions/comments", + :text => message, + :key => application_key, + :token => consumer_token + end + + def find_card_ids(message) + message.scan(%r{https://trello.com/c/([a-z0-9]+)}i).flatten + end + + def ignore_commit? commit + Service::Timeout.timeout(0.500, TimeoutError) do + ignore_regex && ignore_regex.match(commit['message']) + end + end + + def truncate_message(message) + message.length > message_max_length ? message[0...message_max_length] + "..." : message + end + + def name_for_commit(commit) + truncate_message commit['message'] + end + + def commit_author(commit) + author = commit['author'] || {} + author['name'] || '[unknown]' + end + + def desc_for_commit(commit) + + + "Author: %s\n\n%s\n\nRepo: %s\n\nBranch: %s\n\nCommit Message: %s" % [ + commit_author(commit), + commit['url'], + repository, + branch_name, + commit['message'] || '[no description]' + ] + end + + def consumer_token + data['consumer_token'].to_s + end + + def list_id(event) + list = data["#{event}_list_id"] + + # this should make the old `list_id`, which was implicitly for push, + # backwards-compatible + list ||= data["list_id"] if event == :push + + list.to_s + end + + def ignore_regex + @_memoized_ignore_regexp ||= if data['ignore_regex'].to_s.blank? + nil + else + Regexp.new(data['ignore_regex'].to_s) + end + end + + def application_key + "db1e35883bfe8f8da1725a0d7d032a9c" + end + + def repository + payload['repository']['name'] + end + + def message_max_length + 80 + end +end diff --git a/lib/services/twilio.rb b/lib/services/twilio.rb new file mode 100644 index 000000000..d6f7747b6 --- /dev/null +++ b/lib/services/twilio.rb @@ -0,0 +1,39 @@ +class Service::Twilio < Service + string :account_sid, :from_phone, :to_phone + boolean :master_only + password :auth_token + white_list :account_sid, :from_phone, :to_phone + + def receive_push + check_configuration_options(data) + + sms_body = "#{payload['pusher']['name']} has pushed #{payload['commits'].size} commit(s) to #{payload['repository']['name']}" + send_message(data, sms_body) if send_notification?(data) + end + + private + + def send_notification?(data) + notify_user = true + if config_boolean_true?('master_only') && branch_name != 'master' + notify_user = false + end + notify_user + end + + def check_configuration_options(data) + raise_config_error 'Account SID must be set' if data['account_sid'].blank? + raise_config_error 'Authorization token must be set' if data['auth_token'].blank? + raise_config_error 'Twilio-enabled phone number or short code must be set' if data['from_phone'].blank? + raise_config_error 'Destination phone number must be set' if data['to_phone'].blank? + end + + def send_message(data, message) + client = ::Twilio::REST::Client.new(data['account_sid'], data['auth_token']) + client.account.sms.messages.create( + :from => data['from_phone'], + :to => data['to_phone'], + :body => message + ) + end +end diff --git a/lib/services/twitter.rb b/lib/services/twitter.rb new file mode 100644 index 000000000..4b6c3d043 --- /dev/null +++ b/lib/services/twitter.rb @@ -0,0 +1,113 @@ +class Service::Twitter < Service + password :token, :secret + string :filter_branch + boolean :digest, :short_format + TWITTER_SHORT_URL_LENGTH_HTTPS = 23 + + white_list :filter_branch + + def receive_push + return unless payload['commits'] + + commit_branch = (payload['ref'] || '').split('/').last || '' + filter_branch = data['filter_branch'].to_s + + # If filtering by branch then don't make a post + if (filter_branch.length > 0) && (commit_branch.index(filter_branch) == nil) + return false + end + + statuses = [] + repository = payload['repository']['name'] + + if config_boolean_true?('digest') + commit = payload['commits'][-1] + author = commit['author'] || {} + url = "#{payload['repository']['url']}/commits/#{ref_name}" + status = "[#{repository}] #{url} #{author['name']} - #{payload['commits'].length} commits" + status = if short_format? + "#{url} - #{payload['commits'].length} commits" + else + "[#{repository}] #{url} #{author['name']} - #{payload['commits'].length} commits" + end + length = status.length - url.length + TWITTER_SHORT_URL_LENGTH_HTTPS # The URL is going to be shortened by twitter. It's length will be at most 23 chars (HTTPS). + # How many chars of the status can we actually use? + # We can use 140 chars, have to reserve 3 chars for the railing dots (-3) + # also 23 chars for the t.co-URL (-23) but can fit the whole URL into the tweet (+url.length) + usable_chars = 140 - 3 - TWITTER_SHORT_URL_LENGTH_HTTPS + url.length + length >= 140 ? statuses << status[0..(usable_chars-1)] + '...' : statuses << status + else + payload['commits'].each do |commit| + author = commit['author'] || {} + url = commit['url'] + message = commit['message'] + # Strip out leading @s so that github @ mentions don't become twitter @ mentions + # since there's zero reason to believe IDs on one side match IDs on the other + message.gsub!(/\B[@@][[:word:]]/) do |word| + "@\u200b#{word[1..word.length]}" + end + status = if short_format? + "#{url} #{message}" + else + "[#{repository}] #{url} #{author['name']} - #{message}" + end + # Twitter barfs on asterisks so replace them with a slightly different unicode one. + status.gsub!("*", "﹡") + # The URL is going to be shortened by twitter. It's length will be at most 23 chars (HTTPS). + length = status.length - url.length + TWITTER_SHORT_URL_LENGTH_HTTPS + # How many chars of the status can we actually use? + # We can use 140 chars, have to reserve 3 chars for the railing dots (-3) + # also 23 chars for the t.co-URL (-23) but can fit the whole URL into the tweet (+url.length) + usable_chars = 140 - 3 - TWITTER_SHORT_URL_LENGTH_HTTPS + url.length + length >= 140 ? statuses << status[0..(usable_chars-1)] + '...' : statuses << status + end + end + + statuses.each do |status| + post(status) + end + end + + def post(status) + params = { 'status' => status } + + access_token = ::OAuth::AccessToken.new(consumer, data['token'], data['secret']) + res = consumer.request(:post, "/1.1/statuses/update.json", + access_token, { :scheme => :query_string }, params) + if res.code !~ /^2\d\d/ + raise_response_error(res) + end + end + + def raise_response_error(res) + error = "Received HTTP #{res.code}" + if msg = response_error_message(res) + error << ": " + error << msg + end + + raise_config_error(error) + end + + def response_error_message(res) + JSON.parse(res.body)['errors'].map { |error| error['message'] }.join('; ') + rescue + end + + def consumer_key + secrets['twitter']['key'] + end + + def consumer_secret + secrets['twitter']['secret'] + end + + def consumer + @consumer ||= ::OAuth::Consumer.new(consumer_key, consumer_secret, + {:site => "https://api.twitter.com"}) + end + + def short_format? + config_boolean_true?('short_format') + end +end diff --git a/lib/services/typetalk.rb b/lib/services/typetalk.rb new file mode 100644 index 000000000..7c54e068b --- /dev/null +++ b/lib/services/typetalk.rb @@ -0,0 +1,68 @@ +class Service::Typetalk < Service::HttpPost + string :client_id, :topic, :restrict_to_branch + password :client_secret + white_list :topic, :restrict_to_branch + + default_events :push, :pull_request + + url "http://typetalk.in" + logo_url "https://deeb7lj8m1sjw.cloudfront.net/1.3.5/assets/images/common/logo.png" + + def receive_push + check_config() + + branch = payload['ref'].split('/').last + branch_restriction = data['restrict_to_branch'].to_s + if branch_restriction.length > 0 && branch_restriction.index(branch) == nil + return + end + send_message(format_pushed_message(payload)) + end + + def receive_pull_request + check_config() + + send_message(format_pull_request_message(payload)) + end + + def check_config + raise_config_error "Missing 'client_id'" if data['client_id'].to_s == '' + raise_config_error "Missing 'client_secret'" if data['client_secret'].to_s == '' + raise_config_error "Missing 'topic'" if data['topic'].to_s == '' + end + + def send_message(message) + http.url_prefix = 'https://typetalk.in' + http.headers['X-GitHub-Event'] = event.to_s + + # get an access_token + res = http_post '/oauth2/access_token', + { :client_id => data['client_id'], + :client_secret => data['client_secret'], + :grant_type => 'client_credentials', + :scope => 'topic.post',} + + json = JSON.parse(res.body) + http.headers['Authorization'] = "Bearer #{json['access_token']}" + + topics = data['topic'].to_s.split(",") + topics.each do |topic| + params = { + :message => message + } + res = http_post "/api/v1/topics/#{topic}", params + if res.status < 200 || res.status > 299 + raise_config_error + end + end + end + + def format_pushed_message(payload) + branch = payload['ref'].split('/').last + return "#{payload['pusher']['name']} has pushed #{payload['commits'].size} commit(s) to #{branch} at #{payload['repository']['name']}\n#{payload['compare']}" + end + def format_pull_request_message(payload) + return "#{payload['sender']['login']} #{payload['action']} pull request \##{payload['pull_request']['number']}: #{payload['pull_request']['title']}\n#{payload['pull_request']['html_url']}" + end + +end diff --git a/lib/services/unfuddle.rb b/lib/services/unfuddle.rb new file mode 100644 index 000000000..a0c27da3f --- /dev/null +++ b/lib/services/unfuddle.rb @@ -0,0 +1,78 @@ +class Service::Unfuddle < Service + string :subdomain, :repo_id, :username + password :password + boolean :httponly + white_list :subdomain, :repo_id, :username + + def receive_push + u_repoid = data['repo_id'].to_i + repository = payload['repository']['name'] + branch = branch_name + before = payload['before'] + # use https by default since most accounts support SSL + protocol = config_boolean_true?('httponly') ? 'http' : 'https' + + http.url_prefix = "#{protocol}://#{data['subdomain']}.unfuddle.com" + http.basic_auth data['username'], data['password'] + + # grab people data for matching author-id + begin + res = http_get "/api/v1/people.json" + if res.status < 200 || res.status > 299 + raise_config_error + end + + people = JSON.parse(res.body) + rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, + Net::ProtocolError => e + raise_config_error "#{e.class}: #{e.message}" + end + + payload['commits'].each do |commit| + commit_id = commit['id'] + message = "#{commit['message']}\n#{commit['url']}" + files = commit['removed'] | commit['added'] | commit['modified'] + + # set Unfuddles's correct changeset association by getting the matching + # author-id + author_id = 0 + people.each do |person| + if person['email'] == commit['author']['email'] + author_id = person['account_id'].to_i + break + end + end + + if author_id > 0 + author_id_element = "#{author_id}" + committer_id_element = "#{author_id}" + else + author_id_element = "" + committer_id_element = "" + end + + changeset_xml = <<-XML.strip + + #{author_id_element} + #{CGI.escapeHTML(commit['author']['name'])} + #{CGI.escapeHTML(commit['author']['email'])} + #{CGI.escapeHTML(commit['timestamp'])} + #{committer_id_element} + #{CGI.escapeHTML(commit['author']['name'])} + #{CGI.escapeHTML(commit['author']['email'])} + #{CGI.escapeHTML(commit['timestamp'])} + #{CGI.escapeHTML(commit['timestamp'])} + #{CGI.escapeHTML(message)} + #{CGI.escapeHTML(commit_id)} + + XML + + begin + res = http_post "/api/v1/repositories/#{u_repoid}/changesets.json?process_message_actions=true" do |req| + req.headers['Content-Type'] = 'application/xml' + req.body = changeset_xml + end + end + end + end +end diff --git a/lib/services/web.rb b/lib/services/web.rb new file mode 100644 index 000000000..a9cf483f9 --- /dev/null +++ b/lib/services/web.rb @@ -0,0 +1,44 @@ +class Service::Web < Service + include HttpHelper + + string :url, + # old hooks send form params ?payload=JSON(...) + # new hooks should set content_type == 'json' + :content_type + + # adds a X-Hub-Signature of the body content + # X-Hub-Signature: sha1=.... + password :secret + + white_list :url, :content_type + + boolean :insecure_ssl # :( + + def receive_event + http.headers['X-GitHub-Event'] = event.to_s + http.headers['X-GitHub-Delivery'] = delivery_guid.to_s + + res = deliver data['url'], + :content_type => data['content_type'], + :insecure_ssl => config_boolean_true?('insecure_ssl'), + :secret => data['secret'] + + if res.status < 200 || res.status > 299 + raise_config_error "Invalid HTTP Response: #{res.status}" + end + end + + def original_body + payload + end + + def default_encode_body + encode_body_as_form + end + + def encode_body_as_form + http.headers['content-type'] = 'application/x-www-form-urlencoded' + Faraday::Utils.build_nested_query( + http.params.merge(:payload => generate_json(original_body))) + end +end diff --git a/lib/services/web_translate_it.rb b/lib/services/web_translate_it.rb new file mode 100644 index 000000000..008282f57 --- /dev/null +++ b/lib/services/web_translate_it.rb @@ -0,0 +1,8 @@ +class Service::WebTranslateIt < Service + string :api_key + + def receive_push + http_post "https://webtranslateit.com/api/projects/#{data['api_key']}/refresh_files", + :payload => generate_json(payload) + end +end diff --git a/lib/services/weblate.rb b/lib/services/weblate.rb new file mode 100644 index 000000000..522923685 --- /dev/null +++ b/lib/services/weblate.rb @@ -0,0 +1,32 @@ +class Service::Weblate < Service + string :url + white_list :url + + url "http://weblate.org/" + logo_url "http://weblate.org/graphics/weblate-32.png" + maintained_by :github => 'nijel' + + def receive_push + url = data['url'] + url.gsub! /\s/, '' + + if url.empty? + raise_config_error "Invalid URL: #{url.inspect}" + end + + if url !~ /^https?\:\/\// + url = "http://#{url}" + end + + res = http_post "#{url}/hooks/github/", + :payload => generate_json(payload) + + if res.status < 200 || res.status > 299 + raise_config_error "Failed with #{res.status}" + end + rescue URI::InvalidURIError + raise_config_error "Invalid URL: #{data['url']}" + end +end + + diff --git a/lib/services/windowsazure.rb b/lib/services/windowsazure.rb new file mode 100644 index 000000000..13c08fcc1 --- /dev/null +++ b/lib/services/windowsazure.rb @@ -0,0 +1,51 @@ +class Service::WindowsAzure < Service::HttpPost + string :hostname, :username, :password + + white_list :hostname, :username + + default_events :push + + url "https://www.windowsazure.com/" + logo_url "https://www.windowsazure.com/css/images/logo.png" + + maintained_by :github => "suwatch", + :twitter => "@suwat_ch" + + supported_by :web => "https://github.com/projectkudu/kudu/wiki", + :email => "davidebb@microsoft.com", + :twitter => "@davidebbo" + + def receive_event + hostname = required_config_value("hostname").to_s.strip + username = required_config_value("username").to_s.strip + password = required_config_value("password").to_s.strip + + raise_config_error "Invalid hostname" if hostname.empty? + raise_config_error "Invalid username" if username.empty? + raise_config_error "Invalid password" if password.empty? + + http.ssl[:verify] = false + http.headers['X-GitHub-Event'] = event.to_s + + http.basic_auth(username, password) + + url = "https://#{hostname}:443/deploy?scmType=GitHub" + + res = deliver url + raise_config_error "Invalid HTTP Response: #{res.status}" if res.status < 200 || res.status >= 400 + end + + def original_body + payload + end + + def default_encode_body + encode_body_as_form + end + + def encode_body_as_form + http.headers["content-type"] = "application/x-www-form-urlencoded" + Faraday::Utils.build_nested_query( + http.params.merge(:payload => generate_json(original_body))) + end +end diff --git a/lib/services/xmpp_base.rb b/lib/services/xmpp_base.rb new file mode 100644 index 000000000..c78ac7239 --- /dev/null +++ b/lib/services/xmpp_base.rb @@ -0,0 +1,184 @@ +class XmppHelper < Service + + def receive_event + check_config data + + commit_branch = (payload['ref'] || '').split('/').last || '' + filter_branch = data['filter_branch'].to_s + + # If filtering by branch then don't make a post + if (filter_branch.length > 0) && (commit_branch.index(filter_branch) == nil) + return false + end + + return false if event.to_s =~ /fork/ && config_boolean_false?('notify_fork') + return false if event.to_s =~ /watch/ && config_boolean_false?('notify_watch') + return false if event.to_s =~ /_comment/ && config_boolean_false?('notify_comments') + return false if event.to_s =~ /gollum/ && config_boolean_false?('notify_wiki') + return false if event.to_s =~ /issue/ && config_boolean_false?('notify_issue') + return false if event.to_s =~ /pull_/ && config_boolean_false?('notify_pull') + + build_message(event, payload) + return true + end + + def check_port(data) + return 5222 if data['port'].to_s.empty? + begin + return Integer(data['port']) + rescue Exception => e + raise_config_error 'XMPP port must be numeric' + end + end + + def check_host(data) + return nil if data['host'].to_s.empty? + return data['host'].to_s + end + + def build_message(event, payload) + case event + when :push + messages = [] + messages << "#{push_summary_message}: #{url}" + messages += distinct_commits.first(3).map { + |commit| self.format_commit_message(commit) + } + send_messages messages + when :commit_comment + send_messages "#{commit_comment_summary_message} #{url}" + when :issue_comment + send_messages "#{issue_comment_summary_message} #{url}" + when :issues + send_messages "#{issue_summary_message} #{url}" + when :pull_request + send_messages "#{pull_request_summary_message} #{url}" if action =~ /(open)|(close)/ + when :pull_request_review_comment + send_messages "#{pull_request_review_comment_summary_message} #{url}" + when :gollum + messages = [] + messages << "#{gollum_summary_message} #{url}" + pages.first(3).map { + | page | messages << self.format_wiki_page_message(page) + } + send_messages messages + end + end + + def url + shorten_url(summary_url) if not @data['is_test'] + summary_url + end + + def gollum_summary_message + num = pages.length + "[#{payload['repository']['name']}] @#{sender.login} modified #{num} page#{num != 1 ? 's' : ''}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def format_wiki_page_message(page) + url = page['html_url'] + url = shorten_url(url) if not @data['is_test'] + "User #{page['action']} page \"#{page['title']}\" #{url}" + end + + def push_summary_message + message = [] + message << "[#{repo_name}] @#{pusher_name}" + + if created? + if tag? + message << "tagged #{tag_name} at" + message << (base_ref ? base_ref_name : after_sha) + else + message << "created #{branch_name}" + + if base_ref + message << "from #{base_ref_name}" + elsif distinct_commits.empty? + message << "at #{after_sha}" + end + + num = distinct_commits.size + message << "(+#{num} new commit#{num != 1 ? 's' : ''})" + end + + elsif deleted? + message << "deleted #{branch_name} at #{before_sha}" + + elsif forced? + message << "force-pushed #{branch_name} from #{before_sha} to #{after_sha}" + + elsif commits.any? and distinct_commits.empty? + if base_ref + message << "merged #{base_ref_name} into #{branch_name}" + else + message << "fast-forwarded #{branch_name} from #{before_sha} to #{after_sha}" + end + + else + num = distinct_commits.size + message << "pushed #{num} new commit#{num != 1 ? 's' : ''} to #{branch_name}" + end + + message.join(' ') + end + + def format_commit_message(commit) + short = commit['message'].split("\n", 2).first.to_s + short += '...' if short != commit['message'] + + author = commit['author']['name'] + sha1 = commit['id'] + files = Array(commit['modified']) + #dirs = files.map { |file| File.dirname(file) }.uniq + + "#{repo_name}/#{branch_name} #{sha1[0..6]} " + + "#{commit['author']['name']}: #{short}" + end + + def issue_summary_message + "[#{repo.name}] @#{sender.login} #{action} issue \##{issue.number}: #{issue.title}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def issue_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + "[#{repo.name}] @#{sender.login} commented on issue \##{issue.number}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def commit_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + sha1 = comment.commit_id + "[#{repo.name}] @#{sender.login} commented on commit #{sha1[0..6]}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def pull_request_summary_message + base_ref = pull.base.label.split(':').last + head_ref = pull.head.label.split(':').last + head_label = head_ref != base_ref ? head_ref : pull.head.label + + "[#{repo.name}] @#{sender.login} #{action} pull request " + + "\##{pull.number}: #{pull.title} (#{base_ref}...#{head_ref})" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end + + def pull_request_review_comment_summary_message + short = comment.body.split("\r\n", 2).first.to_s + short += '...' if short != comment.body + sha1 = comment.commit_id + "[#{repo.name}] @#{sender.login} commented on pull request " + + "\##{pull_request_number} #{sha1[0..6]}: #{short}" + rescue + raise_config_error "Unable to build message: #{$!.to_s}" + end +end \ No newline at end of file diff --git a/lib/services/xmpp_im.rb b/lib/services/xmpp_im.rb new file mode 100644 index 000000000..3af72f146 --- /dev/null +++ b/lib/services/xmpp_im.rb @@ -0,0 +1,84 @@ +require_relative 'xmpp_base' + +class Service::XmppIm < XmppHelper + + self.title = 'XMPP IM' + self.hook_name = 'xmpp_im' + + string :JID, :receivers, :host, :port + password :password + boolean :notify_fork, :notify_wiki, :notify_comments, + :notify_issue, :notify_watch, :notify_pull + + white_list :filter_branch, :JID, :receivers + + default_events :push, :commit_comment, :issue_comment, + :issues, :pull_request, :pull_request_review_comment, + :gollum + + def send_messages(messages) + messages = Array(messages) + setup_connection() + @receivers.each do |receiver| + messages.each do |message| + @client.send ::Jabber::Message::new(receiver, message) + end + end + ensure + @client.close if @client + end + + def setup_connection + if (@client.nil?) + begin + @client = ::Jabber::Client.new(::Jabber::JID::new(@data['JID'])) + @client.connect(@data['host'], @data['port']) + @client.auth(@data['password']) + ::Jabber::debug = true + rescue ::Jabber::ErrorResponse + raise_config_error 'Error response' + rescue ::Jabber::ClientAuthenticationFailure + raise_config_error 'Authentication error' + rescue ::Jabber::JabberError + raise_config_error "XMPP Error: #{$!.to_s}" + rescue StandardError => e + raise_config_error "Unknown error: #{$!.to_s}" + end + end + @client + end + + def set_connection(client) + @client = client + end + + def check_config(data) + raise_config_error 'JID is required' if data['JID'].to_s.empty? + raise_config_error 'Password is required' if data['password'].to_s.empty? + raise_config_error 'Receivers list is required' if data['receivers'].to_s.empty? + @receivers = Array.new + data['receivers'].split().each do |jid| + begin + @receivers.push(::Jabber::JID.new(jid)) + rescue Exception => e + raise_config_error 'Illegal receiver JID' + end + end + data['port'] = check_port(data) + data['host'] = check_host(data) + @data = data + end + + url 'http://xmpp.org/rfcs/rfc6121.html' + logo_url 'http://xmpp.org/images/xmpp-small.png' + + # lloydwatkin on GitHub is pinged contacted for any bugs with the Hook code. + maintained_by :github => 'lloydwatkin' + + # Support channels for user-level Hook problems (service failure, + # misconfigured + supported_by :web => 'http://github.com/lloydwatkin/github-services/issues', + :email => 'lloyd@evilprofessor.co.uk', + :twitter => 'lloydwatkin', + :github => 'lloydwatkin' +end diff --git a/lib/services/xmpp_muc.rb b/lib/services/xmpp_muc.rb new file mode 100644 index 000000000..3fe85293a --- /dev/null +++ b/lib/services/xmpp_muc.rb @@ -0,0 +1,83 @@ +require_relative 'xmpp_base' + +class Service::XmppMuc < XmppHelper + + self.title = 'XMPP MUC' + self.hook_name = 'xmpp_muc' + + string :JID, :room, :server, :nickname, :host, :port + password :password, :room_password + boolean :notify_fork, :notify_wiki, :notify_comments, + :notify_issue, :notify_watch, :notify_pull + + white_list :room, :filter_branch, :JID, :room, :server, :nickname + + default_events :push, :commit_comment, :issue_comment, + :issues, :pull_request, :pull_request_review_comment, + :gollum + + def send_messages(messages) + messages = Array(messages) + setup_muc_connection() + messages.each do |message| + @muc.send ::Jabber::Message::new(::Jabber::JID.new(@data['muc_room']), message) + end + @muc.exit + ensure + @client.close if @client + end + + def setup_muc_connection + if (@muc.nil?) + begin + @client = ::Jabber::Client.new(::Jabber::JID::new(@data['JID'])) + @client.connect(@data['host'], @data['port']) + @client.auth(@data['password']) + ::Jabber::debug = true + @muc = ::Jabber::MUC::MUCClient.new(@client) + @muc.join(::Jabber::JID.new(@data['muc_room']), @data['room_password']) + rescue ::Jabber::ErrorResponse + raise_config_error 'Error response' + rescue ::Jabber::ClientAuthenticationFailure + raise_config_error 'Authentication error' + rescue ::Jabber::JabberError + raise_config_error "XMPP Error: #{$!.to_s}" + rescue StandardError => e + raise_config_error "Unknown error: #{$!.to_s}" + end + end + @muc + end + + def set_muc_connection(muc) + @muc = muc + end + + def check_config(data) + raise_config_error 'JID is required' if data['JID'].to_s.empty? + raise_config_error 'Password is required' if data['password'].to_s.empty? + raise_config_error 'Room is required' if data['room'].to_s.empty? + raise_config_error 'Server is required' if data['server'].to_s.empty? + data['nickname'] = 'github' if data['nickname'].to_s.empty? + data.delete(:room_password) if data['room_password'].to_s.empty? + data['muc_room'] = "#{data['room']}@#{data['server']}/#{data['nickname']}" + + data['port'] = check_port(data) + data['host'] = check_host(data) + + @data = data + end + + url 'http://xmpp.org/extensions/xep-0045.html' + logo_url 'http://xmpp.org/images/xmpp-small.png' + + # lloydwatkin on GitHub is pinged contacted for any bugs with the Hook code. + maintained_by :github => 'lloydwatkin' + + # Support channels for user-level Hook problems (service failure, + # misconfigured + supported_by :web => 'http://github.com/lloydwatkin/github-services/issues', + :email => 'lloyd@evilprofessor.co.uk', + :twitter => 'lloydwatkin', + :github => 'lloydwatkin' +end diff --git a/lib/services/you_track.rb b/lib/services/you_track.rb new file mode 100644 index 000000000..6b7c74c01 --- /dev/null +++ b/lib/services/you_track.rb @@ -0,0 +1,155 @@ +class Service::YouTrack < Service + string :base_url, :committers, :username, :branch + boolean :process_distinct + password :password + white_list :base_url, :username, :committers, :branch + + default_events :push, :pull_request + + url 'http://http://www.jetbrains.com/youtrack' + logo_url 'http://www.jetbrains.com/img/logos/YouTrack_logo_press_materials.gif' + + maintained_by :github => 'anna239' + supported_by :web => 'http://www.jetbrains.com/support/youtrack', + :email => 'youtrack-feedback@jetbrains.com', + :twitter => 'youtrack' + + + def receive_push + # If branch is defined by user setting, process commands only if commits + # are on that branch. If branch is not defined, process regardless of branch. + return unless active_branch? + + http.ssl[:verify] = false + http.url_prefix = data['base_url'] + payload['commits'].each { |c| process_commit(c) } + end + + def receive_pull_request + return unless payload['action'] == 'closed' + + http.ssl[:verify] = false + http.url_prefix = data['base_url'] + + process_pull_request + end + + def active_branch? + pushed_branch = payload['ref'].to_s[/refs\/heads\/(.*)/, 1] + active_branch = data['branch'].to_s + active_branch.empty? or active_branch.split(' ').include?(pushed_branch) + end + + def login + @logged_in ||= begin + api_key = data['api_key'] + if api_key.nil? + res = http_post 'rest/user/login' do |req| + req.params.update \ + :login => data['username'], + :password => data['password'] + req.headers['Content-Length'] = '0' + end + verify_response(res) + + http.headers['Cookie'] = res.headers['set-cookie'] + else + http.headers['X-YouTrack-ApiKey'] = api_key + end + http.headers['Cache-Control'] = 'no-cache' + true + end + end + + def process_commit(commit) + author = nil + + #If only distinct commits should be processed, check this + return unless commit['distinct'] or config_boolean_false?('process_distinct') + + commit['message'].split("\n").each { |commit_line| + issue_id, command = parse_message(commit_line) + next if issue_id.nil? + + login + # lazily load author + author ||= find_user_by_email(commit['author']['email']) + return if author.nil? + + command = 'comment' if command.nil? + comment_string = "Commit made by '''" + commit['author']['name'] + "''' on ''" + commit['timestamp'] + "''\n" + commit['url'] + "\n\n{quote}" + commit['message'].to_s + '{quote}' + execute_command(author, issue_id, command, comment_string) + } + end + + def process_pull_request + login + sender = payload['sender'] + author = find_user_by_email(sender['email']) + return if author.nil? + + request = payload['pull_request'] + request['body'].split("\n").each { |line| + issue_id, command = parse_message(line) + next if issue_id.nil? + + comment = "Pull request accepted by '''" + sender['login'] + "'''\n" + request['html_url'] + "\n\n{quote}" + request['body'].to_s + '{quote}' + execute_command(author, issue_id, command, comment) + } + + end + + def find_user_by_email(email) + counter = 0 + found_user = nil + while true + body = '' + res = http_get 'rest/admin/user', :q => email, :group => data['committers'], :start => counter + verify_response(res) + xml_body = REXML::Document.new(res.body) + xml_body.root.each_element do |user_ref| + res = http_get "rest/admin/user/#{user_ref.attributes['login']}" + verify_response(res) + attributes = REXML::Document.new(res.body).root.attributes + if attributes['email'].upcase == email.upcase || (attributes['jabber'] ? attributes['jabber'].upcase == email.upcase : false) + return if !found_user.nil? + found_user = user_ref.attributes['login'] + end + end + return found_user if xml_body.root.elements.size < 10 + counter += 10 + end + end + + def execute_command(author, issue_id, command, comment_string) + res = http_post "rest/issue/#{issue_id}/execute" do |req| + req.params[:command] = command unless command.nil? + req.params[:comment] = comment_string + req.params[:runAs] = author + end + verify_response(res) + end + + def verify_response(res) + case res.status + when 200..299 + when 403, 401, 422 then + raise_config_error('Invalid Credentials') + when 404, 301, 302 then + raise_config_error('Invalid YouTrack URL') + else + raise_config_error("HTTP: #{res.status}") + end + end + + def parse_message(message) + issue_id = message[/( |^)#(\w+-\d+)\b/, 2] + return nil, nil if issue_id.nil? + + command = message[/( |^)#\w+-\d+ (.+)/, 2] + command.strip! unless command.nil? + + return issue_id, command + end + +end diff --git a/lib/services/zendesk.rb b/lib/services/zendesk.rb new file mode 100644 index 000000000..c999f0365 --- /dev/null +++ b/lib/services/zendesk.rb @@ -0,0 +1,50 @@ +class Service::Zendesk < Service + default_events :commit_comment, :issues, :issue_comment, :pull_request, :push + string :subdomain, :username + password :password + white_list :subdomain, :username + + def invalid_request? + data['username'].to_s.empty? or + data['password'].to_s.empty? or + data['subdomain'].to_s.empty? + end + + def service_url(subdomain, ticket_id) + if subdomain =~ /\./ + url = "https://#{subdomain}/api/v2/integrations/github?ticket_id=#{ticket_id}" + else + url = "https://#{subdomain}.zendesk.com/api/v2/integrations/github?ticket_id=#{ticket_id}" + end + + begin + Addressable::URI.parse(url) + rescue Addressable::URI::InvalidURIError + raise_config_error("Invalid subdomain #{subdomain}") + end + + url + end + + def receive_event + raise_config_error "Missing or bad configuration" if invalid_request? + + if payload.inspect =~ /zd#(\d+)/i + ticket_id = $1 + else + return + end + + http.basic_auth(data['username'], data['password']) + http.headers['Content-Type'] = 'application/json' + http.headers['Accept'] = 'application/json' + http.headers['X-GitHub-Event'] = event.to_s + + url = service_url(data['subdomain'], ticket_id) + res = http_post(url, generate_json(:payload => payload)) + + if res.status != 201 + raise_config_error("Unexpected response code:#{res.status}") + end + end +end diff --git a/lib/services/zohoprojects.rb b/lib/services/zohoprojects.rb new file mode 100644 index 000000000..0dfc0eeba --- /dev/null +++ b/lib/services/zohoprojects.rb @@ -0,0 +1,16 @@ +class Service::ZohoProjects < Service + string :project_id + password :token + white_list :project_id + + def receive_push + res = http_post "https://projects.zoho.com/serviceHook", + :pId => data['project_id'], + :authtoken => data['token'], + :scope => "projectsapi", + :payload => generate_json(payload) + if res.status != 200 + raise_config_error + end + end +end diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 000000000..c37b09a1c --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,12 @@ +#!/bin/sh +# Usage: script/bootstrap +# Ensures all gems are in vendor/cache and installed locally. +set -e + +if [ "$(uname -s)" = "Darwin" ]; then + HOMEBREW_PREFIX="$(brew --prefix)" + bundle config --local build.eventmachine "--with-cppflags=-I$HOMEBREW_PREFIX/opt/openssl/include" +fi + +bundle install --binstubs --local --path=vendor/gems +bundle package --all diff --git a/script/cibuild b/script/cibuild new file mode 100755 index 000000000..35da41831 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,11 @@ +#!/bin/sh +# Usage: script/test +# Runs the library's CI suite. + +test -d "/usr/share/rbenv/shims" && { + export PATH=/usr/share/rbenv/shims:$PATH + export RBENV_VERSION="2.1.7-github" +} + +script/bootstrap +bundle exec rake test diff --git a/script/console b/script/console new file mode 100755 index 000000000..d63f1f4f6 --- /dev/null +++ b/script/console @@ -0,0 +1,5 @@ +#!/bin/sh +# Usage: script/console +# Starts an IRB console with this library loaded. + +exec bundle exec irb -r ./config/console diff --git a/script/deliver_payload b/script/deliver_payload deleted file mode 100755 index a0eb0975a..000000000 --- a/script/deliver_payload +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env ruby - -require "json" - -unless ARGV[0] - puts "Usage: ./script/deliver_payload [service-name]" - exit 1 -end - -payload_file = File.new("docs/github_payload") -hash = eval(payload_file.read) - -data_json = JSON.generate(hash["data"]) -payload_json = JSON.generate(hash["payload"]) - -exec "curl --data-binary 'data=#{data_json}&payload=#{payload_json}' http://localhost:8080/#{ARGV[0]}/" diff --git a/script/package b/script/package new file mode 100755 index 000000000..5851400ee --- /dev/null +++ b/script/package @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +# Usage: script/package +# Updates the gemspec and builds a new gem in the pkg directory. + +mkdir -p pkg +gem build *.gemspec +mv *.gem pkg diff --git a/script/test b/script/test new file mode 100755 index 000000000..fd1ac71df --- /dev/null +++ b/script/test @@ -0,0 +1,5 @@ +#!/bin/sh +# Usage: script/test +# Runs the library's test suite. + +bundle exec rake test diff --git a/script/update_github b/script/update_github new file mode 100755 index 000000000..945d6b117 --- /dev/null +++ b/script/update_github @@ -0,0 +1,7 @@ +#!/bin/sh +# Usage: script/update_github +# Updates the documentation for Services on GitHub.com + +# Expects github/github to be in the default Boxen location +# https://github.com/github/github-services/blob/master/Rakefile#L56-L58 +bundle exec rake services:build diff --git a/services/basecamp.rb b/services/basecamp.rb deleted file mode 100644 index 1817ade20..000000000 --- a/services/basecamp.rb +++ /dev/null @@ -1,52 +0,0 @@ -service :basecamp do |data, payload| - repository = payload['repository']['name'] - name_with_owner = File.join(payload['repository']['owner']['name'], repository) - branch = payload['ref'].split('/').last - - basecamp = Basecamp.new(data['url'], data['username'], data['password']) - project_id = basecamp.projects.select { |p| p.name.downcase == data['project'].downcase }.first.id - category_id = basecamp.message_categories(project_id).select { |category| category.name.downcase == data['category'].downcase }.first.id - - payload['commits'].each do |commit| - gitsha = commit['id'] - short_git_sha = gitsha[0..5] - timestamp = Date.parse(commit['timestamp']) - - added = commit['added'].map { |f| ['A', f] } - removed = commit['removed'].map { |f| ['R', f] } - modified = commit['modified'].map { |f| ['M', f] } - changed_paths = (added + removed + modified).sort_by { |(char, file)| file } - changed_paths = changed_paths.collect { |entry| entry * ' ' }.join("\n ") - - # Shorten the elements of the subject - commit_title = commit['message'][/^([^\n]+)/, 1] - if commit_title.length > 50 - commit_title = commit_title.slice(0,50) << '...' - end - - title = "Commit on #{name_with_owner}: #{short_git_sha}: #{commit_title}" - - body = <<-EOH -*Author:* #{commit['author']['name']} <#{commit['author']['email']}> -*Commit:* #{gitsha} -*Date:* #{timestamp} (#{timestamp.strftime('%a, %d %b %Y')}) -*Branch:* #{branch} -*Home:* #{payload['repository']['url']} - -h2. Log Message - -
#{commit['message']}
-EOH - - if changed_paths.size > 0 - body << <<-EOH - -h2. Changed paths - -
  #{changed_paths}
-EOH - end - - basecamp.post_message(project_id, :title => title, :body => body, :category_id => category_id) - end -end diff --git a/services/campfire.rb b/services/campfire.rb deleted file mode 100644 index 89c688d18..000000000 --- a/services/campfire.rb +++ /dev/null @@ -1,24 +0,0 @@ -service :campfire do |data, payload| - repository = payload['repository']['name'] - branch = payload['ref'].split('/').last - commits = payload['commits'] - campfire = Tinder::Campfire.new(data['subdomain'], :ssl => data['ssl'].to_i == 1) - play_sound = data['play_sound'].to_i == 1 - - throw(:halt, 400) unless campfire && campfire.login(data['token'], 'X') - throw(:halt, 400) unless room = campfire.find_room_by_name(data['room']) - - - if commits.size > 10 - commit = commits.last - room.speak "[#{repository}/#{branch}] #{commit['message']} (+#{commits.size - 1} more commits...) - #{commit['author']['name']} (#{commit['url']})" - else - commits.each do |commit| - room.speak "[#{repository}/#{branch}] #{commit['message']} - #{commit['author']['name']} (#{commit['url']})" - end - end - room.speak "/play rimshot" if play_sound - - room.leave - campfire.logout -end diff --git a/services/cia.rb b/services/cia.rb deleted file mode 100644 index 2919af2f6..000000000 --- a/services/cia.rb +++ /dev/null @@ -1,56 +0,0 @@ -def build_cia_commit(repository, branch, sha1, commit, size = 1) - log = commit['message'] - log << " (+#{size} more commits...)" if size > 1 - - dt = DateTime.parse(commit['timestamp']).new_offset - timestamp = Time.send(:gm, dt.year, dt.month, dt.day, dt.hour, dt.min, dt.sec).to_i - files = commit['modified'] + commit['added'] + commit['removed'] - tiny_url = shorten_url(commit['url']) - - log << " - #{tiny_url}" unless tiny_url == commit['url'] - - <<-MSG - - - github - 1 - http://www.github.com - - - #{repository} - #{branch} - - #{timestamp} - - - #{commit['author']['name']} - #{sha1[0..6]} - #{CGI.escapeHTML(log)} - #{commit['url']} - - #{files.join("\n")} - - - - - MSG -end - -service :cia do |data, payload| - server = XMLRPC::Client.new2("http://cia.navi.cx") - - repository = payload['repository']['name'] - branch = (payload['ref'] =~ /^refs\/heads\/(.+)$/ ? $1 : payload['ref']) - commits = payload['commits'] - - if commits.size > 5 - message = build_cia_commit(repository, branch, payload['after'], commits[payload['after']], commits.size - 1) - server.call("hub.deliver", message) - else - commits.each do |commit| - sha1 = commit['id'] - message = build_cia_commit(repository, branch, sha1, commit) - server.call("hub.deliver", message) - end - end -end diff --git a/services/email.rb b/services/email.rb deleted file mode 100644 index 64fbc3519..000000000 --- a/services/email.rb +++ /dev/null @@ -1,73 +0,0 @@ -email_conf = YAML.load_file(File.join(File.dirname(__FILE__), '..', 'config', 'email.yml')) - -service :email do |data, payload| - name_with_owner = File.join(payload['repository']['owner']['name'], payload['repository']['name']) - - # Should be: first_commit = payload['commits'].first - first_commit = payload['commits'].first - first_commit_sha = first_commit['id'] - - # Shorten the elements of the subject - first_commit_sha = first_commit_sha[0..5] - - first_commit_title = first_commit['message'][/^([^\n]+)/, 1] - if first_commit_title.length > 50 - first_commit_title = first_commit_title.slice(0,50) << '...' - end - - body = <<-EOH -Branch: #{payload['ref']} -Home: #{payload['repository']['url']} - -EOH - - payload['commits'].each do |commit| - gitsha = commit['id'] - added = commit['added'].map { |f| ['A', f] } - removed = commit['removed'].map { |f| ['R', f] } - modified = commit['modified'].map { |f| ['M', f] } - - changed_paths = (added + removed + modified).sort_by { |(char, file)| file } - changed_paths = changed_paths.collect { |entry| entry * ' ' }.join("\n ") - - timestamp = Date.parse(commit['timestamp']) - - body << <<-EOH -Commit: #{gitsha} - #{commit['url']} -Author: #{commit['author']['name']} <#{commit['author']['email']}> -Date: #{timestamp} (#{timestamp.strftime('%a, %d %b %Y')}) - -EOH - - if changed_paths.size > 0 - body << <<-EOH -Changed paths: - #{changed_paths} - -EOH - end - - body << <<-EOH -Log Message: ------------ -#{commit['message']} - - -EOH - end - - message = TMail::Mail.new - message.set_content_type('text', 'plain', {:charset => 'UTF-8'}) - message.to = data['address'] - message.subject = "[#{name_with_owner}] #{first_commit_sha}: #{first_commit_title}" - message.body = body - message.date = Time.now - - smtp_settings = [ email_conf['address'], (email_conf['port'] || 25), (email_conf['domain'] || 'localhost.localdomain') ] - smtp_settings += [ email_conf['user_name'], email_conf['password'], email_conf['authentication'] ] if email_conf['authentication'] - - Net::SMTP.start(*smtp_settings) do |smtp| - smtp.send_message message.to_s, "GitHub ", data['address'] - end -end diff --git a/services/fog_bugz.rb b/services/fog_bugz.rb deleted file mode 100644 index 5bc7f5f75..000000000 --- a/services/fog_bugz.rb +++ /dev/null @@ -1,46 +0,0 @@ -service :fog_bugz do |data, payload| - - repository = payload['repository']['name'] - branch = payload['ref'].split('/').last - before = payload['before'] - - payload['commits'].each do |commit| - commit_id = commit['id'] - message = commit["message"] - files = commit["removed"] | commit["added"] | commit["modified"] - - # look for a bug id in each line of the commit message - bug_list = [] - message.split("\n").each do |line| - if (line =~ /\s*Bug[zs]*\s*IDs*\s*[#:; ]+((\d+[ ,:;#]*)+)/i) - bug_list << $1.to_i - end - end - - # for each found bugzid, submit the files to fogbugz. - bug_list.each do |fb_bugzid| - files.each do |f| - fb_repo = CGI.escape("#{repository}") - fb_r1 = CGI.escape("#{before}") - fb_r2 = CGI.escape("#{commit_id}") - fb_file = CGI.escape("#{branch}/#{f}") - - # build the GET request, and send it to fogbugz - if data['fb_version'] == '7.0' - fb_url = "#{data['cvssubmit_url']}?ixBug=#{fb_bugzid}&sFile=#{fb_file}&sPrev=#{fb_r1}&sNew=#{fb_r2}&ixRepository=#{data['fb_repoid']}" - else - # FogBugz 6.1 - fb_url = "#{data['cvssubmit_url']}?ixBug=#{fb_bugzid}&sRepo=#{fb_repo}&sFile=#{fb_file}&sPrev=#{fb_r1}&sNew=#{fb_r2}" - end - url = URI.parse(fb_url) - conn = Net::HTTP.new(url.host, url.port) - conn.use_ssl = url.scheme == "https" - conn.verify_mode = OpenSSL::SSL::VERIFY_NONE - conn.start do |http| - http.get(url.path + '?' + url.query) - end - - end - end - end -end diff --git a/services/forwarding.rb b/services/forwarding.rb deleted file mode 100644 index f275a10d4..000000000 --- a/services/forwarding.rb +++ /dev/null @@ -1,3 +0,0 @@ -service :forwarding do |data, payload| - Net::HTTP.post_form(URI.parse(data['url']), payload) -end \ No newline at end of file diff --git a/services/freckle.rb b/services/freckle.rb deleted file mode 100644 index 309cf5932..000000000 --- a/services/freckle.rb +++ /dev/null @@ -1,23 +0,0 @@ -service :freckle do |data, payload| - - entries, subdomain, token, project = - [], data['subdomain'].strip, data['token'].strip, data['project'].strip - - payload['commits'].each do |commit| - minutes = (commit["message"].split(/\s/).find { |item| /^f:/ =~ item } || '')[2,100] - next unless minutes - entries << { - :date => commit["timestamp"], - :minutes => minutes, - :description => commit["message"].gsub(/(\s|^)f:.*(\s|$)/, '').strip, - :url => commit['url'], - :project_name => project, - :user => commit['author']['email'] - } - end - uri = URI.parse("http://#{data['subdomain']}.letsfreckle.com/api/entries/import") - req = Net::HTTP::Post.new(uri.path) - req.set_content_type('application/json') - req.body = { :entries => entries, :token => data['token'] }.to_json - Net::HTTP.new(uri.host, uri.port).start {|http| http.request(req) } -end diff --git a/services/friend_feed.rb b/services/friend_feed.rb deleted file mode 100644 index e582a7e03..000000000 --- a/services/friend_feed.rb +++ /dev/null @@ -1,15 +0,0 @@ -service :friend_feed do |data, payload| - repository = payload['repository']['name'] - friendfeed_url = URI.parse("http://friendfeed.com/api/share") - - payload['commits'].each do |commit| - title = "#{commit['author']['name']} just committed a change to #{repository} on GitHub" - comment = "#{commit['id']} - #{commit['message']}" - - req = Net::HTTP::Post.new(friendfeed_url.path) - req.basic_auth(data['nickname'], data['remotekey']) - req.set_form_data('title' => title, 'link' => commit['url'], 'comment' => comment, 'via' => 'github') - - Net::HTTP.new(friendfeed_url.host, friendfeed_url.port).start { |http| http.request(req) } - end -end diff --git a/services/irc.rb b/services/irc.rb deleted file mode 100644 index 1d2028dbc..000000000 --- a/services/irc.rb +++ /dev/null @@ -1,63 +0,0 @@ -service :irc do |data, payload| - repository = payload['repository']['name'] - branch = (payload['ref'] =~ /^refs\/heads\/(.+)$/ ? $1 : payload['ref']) - rooms = data['room'].gsub(",", " ").split(" ").map{|room| room[0].chr == '#' ? room : "##{room}"} - botname = data['nick'].to_s.empty? ? "GitHub#{rand(200)}" : data['nick'] - socket = nil - - begin - Timeout.timeout(2) do - socket = TCPSocket.open(data['server'], data['port']) - end - rescue Timeout::Error - throw :halt, 400 - end - - if data['ssl'].to_i == 1 - ssl_context = OpenSSL::SSL::SSLContext.new - ssl_context.verify_mode = OpenSSL::SSL::VERIFY_NONE - ssl_socket = OpenSSL::SSL::SSLSocket.new(socket, ssl_context) - ssl_socket.sync_close = true - ssl_socket.connect - irc = ssl_socket - else - irc = socket - end - - irc.puts "PASS #{data['password']}" unless data['password'].empty? - irc.puts "NICK #{botname}" - irc.puts "USER #{botname} 8 * :GitHub IRCBot" - - begin - Timeout.timeout(10) do - loop do - case irc.gets - when / 004 #{botname} / - break - when /^PING\s*:\s*(.*)$/ - irc.puts "PONG #{$1}" - end - end - end - rescue Timeout::Error - throw :halt, 400 - end - - rooms.each do |room| - room, pass = room.split("::") - irc.puts "JOIN #{room} #{pass}" - payload['commits'].each do |commit| - sha1 = commit['id'] - - tiny_url = shorten_url(commit['url']) - - irc.puts "PRIVMSG #{room} :\002#{repository}:\002 \0033#{commit['author']['name']} \00307#{branch}\0030 SHA1-\002#{sha1[0..6]}\002" - irc.puts "PRIVMSG #{room} :#{commit['message']}" - irc.puts "PRIVMSG #{room} :#{tiny_url}" - end - irc.puts "PART #{room}" - end - - irc.puts "QUIT" - irc.gets until irc.eof? -end diff --git a/services/jabber.rb b/services/jabber.rb deleted file mode 100644 index 64be62ef5..000000000 --- a/services/jabber.rb +++ /dev/null @@ -1,39 +0,0 @@ -# Jabber::Simple does some insane kind of queueing if it thinks -# we are not in their buddy list (which is always) so messages -# never get sent before we disconnect. This forces the library -# to assume the recipient is a buddy. -class Jabber::Simple - def subscribed_to?(x); true; end -end - -service :jabber do |data, payload| - repository = payload['repository']['name'] - branch = payload['ref'].split('/').last - im = Jabber::Simple.new(jabber_user, jabber_password) - - - # Accept any friend request - im.accept_subscriptions = true - - #Split multiple addresses into array, removing duplicates - recipients = data['user'].split(',').uniq.collect(&:strip) - - #Send message to each member in array (Limit to 25 members to prevent overloading something, if this is not and issue, just remove the [0..24] from recipients - recipients[0..24].each do |recipient| - # Ask recipient to be our buddy if need be - im.add(recipient) - - - payload['commits'].each do |commit| - sha1 = commit['id'] - im.deliver recipient, < - #{CGI.escapeHTML(title)} - #{CGI.escapeHTML(body)} - #{CGI.escapeHTML(diff)} - #{CGI.escapeHTML(commit['author']['name'])} - #{CGI.escapeHTML(commit_id)} - #{CGI.escapeHTML(commit['timestamp'])} - - XML - - account = "http://#{data['subdomain']}.lighthouseapp.com" - url = URI.parse('%s/projects/%d/changesets.xml' % [account, data['project_id']]) - req = Net::HTTP::Post.new(url.path) - req.basic_auth data['token'], 'x' - req.body = changeset_xml - req.set_content_type('application/xml') - Net::HTTP.new(url.host, url.port).start {|http| http.request(req) } - end -end diff --git a/services/presently.rb b/services/presently.rb deleted file mode 100644 index f6eb3b643..000000000 --- a/services/presently.rb +++ /dev/null @@ -1,34 +0,0 @@ -service :presently do |data, payload| - repository = payload['repository']['name'] - url = URI.parse("https://#{data['subdomain']}.presentlyapp.com/api/twitter/statuses/update.xml") - - prefix = (data['group_name'].nil? || data['group_name'] == '') ? '' : "b #{data['group_name']} " - - payload['commits'].each do |commit| - - status = "#{prefix}[#{repository}] #{commit['author']['name']} - #{commit['message']}" - status = status[0...137] + '...' if status.length > 140 - - paste = "\"Commit #{commit['id']}\":#{commit['url']}\n\n" - paste << "#{commit['message']}\n\n" - - %w(added modified removed).each do |kind| - commit[kind].each do |filename| - paste << "* *#{kind.capitalize}* '#{filename}'\n" - end - end - - req = Net::HTTP::Post.new(url.path) - req.basic_auth(data['username'], data['password']) - req.set_form_data( - 'status' => status, - 'source' => 'GitHub', - 'paste_format' => 'textile', - 'paste_text' => paste - ) - - net = Net::HTTP.new(url.host, 443) - net.use_ssl = true - net.start { |http| http.request(req) } - end -end diff --git a/services/rubyforge.rb b/services/rubyforge.rb deleted file mode 100644 index d042311c7..000000000 --- a/services/rubyforge.rb +++ /dev/null @@ -1,11 +0,0 @@ -service :rubyforge do |data, payload| - repository = payload['repository']['name'] - branch = payload['ref'].split('/').last - payload['commits'].each do |id, commit| - rf = RubyForge.new(data['username'], data['password']) - group_id = data['groupid'] - subject = "Commit Notification (#{repository}/#{branch}): #{id}" - body = "`#{commit['message']}`, pushed by #{commit['author']['name']} (#{commit['author']['email']}). View more details for this change at #{commit['url']}." - rf.post_news(group_id, subject, body) - end -end diff --git a/services/run_code_run.rb b/services/run_code_run.rb deleted file mode 100644 index e93464295..000000000 --- a/services/run_code_run.rb +++ /dev/null @@ -1,5 +0,0 @@ -service :run_code_run do |data, payload| - runcoderun_url = URI.parse("http://runcoderun.com/github") - Net::HTTP.post_form(runcoderun_url, :payload => JSON.generate(payload)) - "this output here to make the Sinatra happy when testing a GitHub service, biznatch!" -end diff --git a/services/trac.rb b/services/trac.rb deleted file mode 100644 index 86c424510..000000000 --- a/services/trac.rb +++ /dev/null @@ -1,7 +0,0 @@ -service :trac do |data, payload| - #The data['url'] may contain a subdirectory, so this fails - #url = URI.join(data['url'], '/github/', data['token']) - url_value = data['url'].chomp('/') - url = "#{url_value}/github/#{data['token']}" - Net::HTTP.post_form(URI.parse(url), payload) -end diff --git a/services/twitter.rb b/services/twitter.rb deleted file mode 100644 index 5b61feaa3..000000000 --- a/services/twitter.rb +++ /dev/null @@ -1,24 +0,0 @@ -service :twitter do |data, payload| - repository = payload['repository']['name'] - url = URI.parse("http://twitter.com/statuses/update.xml") - statuses = Array.new - - if data['digest'] == '1' - commit = payload['commits'][-1] - tiny_url = shorten_url(payload['repository']['url'] + '/commits/' + payload['ref'].split('/')[-1]) - statuses.push "[#{repository}] #{tiny_url} #{commit['author']['name']} - #{payload['commits'].length} commits" - else - payload['commits'].each do |commit| - tiny_url = shorten_url(commit['url']) - statuses.push "[#{repository}] #{tiny_url} #{commit['author']['name']} - #{commit['message']}" - end - end - - statuses.each do |status| - req = Net::HTTP::Post.new(url.path) - req.basic_auth(data['username'], data['password']) - req.set_form_data('status' => status, 'source' => 'github') - - Net::HTTP.new(url.host, url.port).start { |http| http.request(req) } - end -end diff --git a/spec/freckle_spec.rb b/spec/freckle_spec.rb deleted file mode 100644 index 699b4deb3..000000000 --- a/spec/freckle_spec.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'sinatra' -require 'sinatra/test/rspec' -require 'github-services' - -describe 'service freckle' do - - before(:each) do - @req = mock('req') - @req.stub!(:set_content_type) - @req.class_eval do - attr_accessor :body - end - Net::HTTP::Post.stub!(:new).and_return(@req) - Net::HTTP.stub!(:new).and_return(mock('nethttp', :start => nil)) - end - - it 'should be ok' do - do_request - @response.should be_ok - end - - it 'should post with 2 entries' do - do_request - @data['entries'].size.should == 2 - end - - it 'should include auth token' do - do_request - @data['token'].should == '12345' - end - - it 'should parse the amount of minutes from the commit message' do - do_request - @data['entries'][0]['minutes'].should == '15' - @data['entries'][1]['minutes'].should == '2hrs' - end - - it 'should strip freckle tags from description' do - do_request - @data['entries'][0]['description'].should == 'stub git call for Grit#heads test' - @data['entries'][1]['description'].should == 'clean up heads test' - end - - it 'should include project name' do - do_request - @data['entries'][0]['project_name'].should == 'Test Project' - end - - it 'should include author email as user' do - do_request - @data['entries'][0]['user'].should == 'tom@mojombo.com' - end - - it 'should include commit url' do - do_request - @data['entries'][0]['url'].should == 'http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325' - end - - it 'should include timestamp as date' do - do_request - @data['entries'][0]['date'].should == '2007-10-10T00:11:02-07:00' - end - - def do_request - post '/freckle/', :data => data.to_json, :payload => payload.to_json - @data = JSON.parse(@req.body) - end - - def data - { - "subdomain" => "abloom", - "token" => "12345", - "project" => "Test Project" - } - end - - def payload - { - "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", - "ref" => "refs/heads/master", - "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", - - "repository" => { - "name" => "grit", - "url" => "http://github.com/mojombo/grit", - "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" } - }, - - "commits" => [ - { - "removed" => [], - "message" => "stub git call for Grit#heads test f:15", - "added" => [], - "timestamp" => "2007-10-10T00:11:02-07:00", - "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], - "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", - "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, - "id" => "06f63b43050935962f84fe54473a7c5de7977325" - }, - { - "removed" => [], - "message" => "clean up heads test f:2hrs", - "added" => [], - "timestamp" => "2007-10-10T00:18:20-07:00", - "modified" => ["test/test_grit.rb"], - "url" => "http://github.com/mojombo/grit/commit/5057e76a11abd02e83b7d3d3171c4b68d9c88480", - "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, - "id" => "5057e76a11abd02e83b7d3d3171c4b68d9c88480" - }, - { - "removed" => [], - "message" => "add more comments throughout", - "added" => [], - "timestamp" => "2007-10-10T00:50:39-07:00", - "modified" => ["lib/grit.rb", "lib/grit/commit.rb", "lib/grit/grit.rb"], - "url" => "http://github.com/mojombo/grit/commit/a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", - "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, - "id" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425" - } - ] - } - end -end diff --git a/spec/spec.opts b/spec/spec.opts deleted file mode 100644 index f26ef5abe..000000000 --- a/spec/spec.opts +++ /dev/null @@ -1,2 +0,0 @@ ---color - diff --git a/test/active_collab_test.rb b/test/active_collab_test.rb new file mode 100644 index 000000000..3dc016096 --- /dev/null +++ b/test/active_collab_test.rb @@ -0,0 +1,40 @@ +require File.expand_path('../helper', __FILE__) + +class ActiveCollabTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/foo" do |env| + query = Faraday::Utils.parse_nested_query(env[:url].query) + body = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal '2', body['discussion']['milestone_id'] + assert_equal '3', body['discussion']['parent_id'] + assert_equal 'activecollab.com', env[:url].host + assert_equal "projects/1/discussions/add", query['path_info'] + assert_equal "token", query["token"] + assert_equal 'application/xml', env[:request_headers]["Accept"] + assert_match /grit/, env[:body] + [200, {}, '{}'] + end + + svc = service({ + 'url' => 'http://activecollab.com/foo', + 'token' => 'token', + 'project_id' => '1', + 'milestone_id' => '2', + 'category_id' => '3' + }, payload) + + def svc.shorten_url(*args) + 'short' + end + + svc.receive_push + end + + def service(*args) + super Service::ActiveCollab, *args + end +end diff --git a/test/acunote_test.rb b/test/acunote_test.rb new file mode 100644 index 000000000..94974bc47 --- /dev/null +++ b/test/acunote_test.rb @@ -0,0 +1,23 @@ +require File.expand_path('../helper', __FILE__) + +class AcunoteTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/source_control/github/abc" + @stubs.post url do |env| + assert_equal "payload=%22payload%22", env[:body] + [200, {}, ''] + end + + svc = service :push, {'token' => 'abc'}, 'payload' + svc.receive + end + + def service(*args) + super Service::Acunote, *args + end +end + diff --git a/test/amazon_sns_test.rb b/test/amazon_sns_test.rb new file mode 100644 index 000000000..5968003f6 --- /dev/null +++ b/test/amazon_sns_test.rb @@ -0,0 +1,95 @@ +require File.expand_path('../helper', __FILE__) + +class Hash + def except!(*keys) + keys.each { |key| delete(key) } + self + end +end + +class AmazonSNSTest < Service::TestCase + + # SNS maximum message size is 256 kilobytes. + SNS_MAX_MESSAGE_SIZE = 256 * 1024 + + # Use completely locked down IAM resource. + def data + { + 'aws_key' => 'AKIAJV3OTFPCKNH53IBQ', + 'aws_secret' => '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', + 'sns_topic' => 'arn:aws:sns:us-east-1:718656560584:github-service-hook-test', + 'sns_region' => 'us-east-1' + } + end + + def payload + { + "test" => "true" + } + end + + def large_payload + { + "test" => 0.to_s * (SNS_MAX_MESSAGE_SIZE + 1) + } + end + + def xtest_event + svc = service :push, data, payload + sns = svc.receive_event + + assert_equal data['aws_key'], svc.data['aws_key'] + assert_equal data['aws_secret'], svc.data['aws_secret'] + assert_equal data['sns_topic'], svc.data['sns_topic'] + assert_equal data['sns_region'], svc.data['sns_region'] + end + + def verify_requires(svc) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def verify_nothing_raised(svc) + assert_nothing_raised do + svc.receive_event + end + end + + def test_requires_aws_key + verify_requires(service :push, data.except!('aws_key'), payload) + end + + def test_requires_aws_secret + verify_requires(service :push, data.except!('aws_secret'), payload) + end + + def test_requires_sns_topic + verify_requires(service :push, data.except!('sns_topic'), payload) + end + + def test_requires_sns_topic + verify_requires(service :push, data.except!('sns_topic'), payload) + end + + def test_defaults_sns_region + svc = service :push, data.except!('sns_region'), payload + svc.validate_data + + assert_equal svc.data['sns_region'], data['sns_region'] + end + + def test_publish_to_sns + skip 'aws_key is outdated, and this test will fail. Consider updating/refactoring out aws credentials to re-enable this test' + verify_nothing_raised(service :push, data, payload) + end + + def test_payload_exceeds_256K + skip 'aws_key is outdated, and this test will fail. Consider updating/refactoring out aws credentials to re-enable this test' + verify_nothing_raised(service :push, data, large_payload) + end + + def service(*args) + super Service::AmazonSNS, *args + end +end diff --git a/test/apiary_test.rb b/test/apiary_test.rb new file mode 100644 index 000000000..68bce9377 --- /dev/null +++ b/test/apiary_test.rb @@ -0,0 +1,28 @@ +require File.expand_path('../helper', __FILE__) + +class ApiaryTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + options = { + 'branch' => 'master', + 'domain' => 'testvanity', + 'apiary_address' => nil } + @svc = service(options, nil) + end + + def test_push + @stubs.post "/github/service-hook" do |env| + body = Faraday::Utils.parse_query(env[:body]) + assert_equal 'api.apiary.io', env[:url].host + assert_equal @svc.payload, JSON.parse(body['payload']) + assert_equal @svc.branch, body['branch'] + assert_equal @svc.domain, body['vanity'] + [200, {}, ''] + end + @svc.receive_event + end + + def service(*args) + super Service::Apiary, *args + end +end diff --git a/test/appharbor_test.rb b/test/appharbor_test.rb new file mode 100644 index 000000000..a8e777ed0 --- /dev/null +++ b/test/appharbor_test.rb @@ -0,0 +1,47 @@ +require File.expand_path('../helper', __FILE__) + +class AppHarborTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_single_slug_push + test_push 'foo', 'bar' + end + + def test_multiple_slugs_push + test_push 'foo,bar', 'baz' + end + + def service(*args) + super Service::AppHarbor, *args + end + +private + + def test_push(application_slugs, token) + application_slugs.split(",").each do |slug| + @stubs.post "/applications/#{slug}/builds" do |env| + verify_appharbor_payload(token, env) + end + end + + svc = service({'token' => token, 'application_slug' => application_slugs}, payload) + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def verify_appharbor_payload(token, env) + assert_equal "BEARER #{token}", env[:request_headers]['authorization'] + assert_equal 'application/json', env[:request_headers]['accept'] + + branches = JSON.parse(env[:body])['branches'] + assert_equal 1, branches.size + + branch = branches[payload['ref'].sub(/\Arefs\/heads\//, '')] + refute_nil branch + assert_equal payload['after'], branch['commit_id'] + assert_equal payload['commits'].select{|c| c['id'] == payload['after']}.first['message'], branch['commit_message'] + end +end diff --git a/test/apropos_test.rb b/test/apropos_test.rb new file mode 100644 index 000000000..56e9cc22a --- /dev/null +++ b/test/apropos_test.rb @@ -0,0 +1,27 @@ +require File.expand_path('../helper', __FILE__) + +class WebTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/v1/githook/abcdefg01234" do |env| + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal 'www.apropos.io', env[:url].host + assert_equal payload, JSON.parse(env[:body]) + [200, {}, '{"message":"OK"}'] + end + + svc = service({ + 'project_id' => 'abcdefg01234', + 'content_type' => 'json' + }, payload) + svc.receive_push + end + + def service(*args) + super Service::Apropos, *args + end + +end diff --git a/test/asana_test.rb b/test/asana_test.rb new file mode 100644 index 000000000..520aae4de --- /dev/null +++ b/test/asana_test.rb @@ -0,0 +1,147 @@ +require File.expand_path('../helper', __FILE__) + +class AsanaTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def decode_body(body) + Hash[URI.decode_www_form(body)] + end + + def test_push + + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + body = decode_body(env[:body]) + assert_match /rtomayko pushed to branch master of mojombo\/grit/, body["text"] + assert_match /#1234/, body["text"] + assert_match /Basic MDAwMDo=/, env[:request_headers][:authorization] + [200, {}, ''] + end + + @stubs.post "/api/1.0/tasks/1235/stories" do |env| + body = decode_body(env[:body]) + assert_match /rtomayko pushed to branch master of mojombo\/grit/, body["text"] + assert_match /#1235/, body["text"] + assert_match /Basic MDAwMDo=/, env[:request_headers][:authorization] + [200, {}, ''] + end + + svc = service( + {'auth_token' => '0000'}, + modified_payload) + svc.receive_push + end + + def test_restricted_comment_commit_push + + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + body = decode_body(env[:body]) + assert_match /rtomayko pushed to branch master of mojombo\/grit/, body["text"] + refute_match /stub git call for Grit#heads test f:15 Case#1234/, body["text"] + assert_match /add more comments about #1235 and #1234 throughout/, body["text"] + assert_match /#1234/, body["text"] + assert_match /Basic MDAwMDo=/, env[:request_headers][:authorization] + [200, {}, ''] + end + + @stubs.post "/api/1.0/tasks/1235/stories" do |env| + body = decode_body(env[:body]) + assert_match /rtomayko pushed to branch master of mojombo\/grit/, body["text"] + refute_match /#1234 clean up heads test f:2hrs #1235/, body["text"] + assert_match /add more comments about #1235 and #1234 throughout/, body["text"] + assert_match /#1235/, body["text"] + assert_match /Basic MDAwMDo=/, env[:request_headers][:authorization] + [200, {}, ''] + end + + svc = service( + {'auth_token' => '0000',"restrict_to_last_commit" => "1"}, + modified_payload) + svc.receive_push + end + + def test_restricted_branch_commit_push + + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + body = decode_body(env[:body]) + refute_match /stub git call for Grit#heads test f:15 Case#1234/, body["text"] + [200, {}, ''] + end + + @stubs.post "/api/1.0/tasks/1235/stories" do |env| + body = decode_body(env[:body]) + refute_match /#1234 clean up heads test f:2hrs #1235/, body["text"] + [200, {}, ''] + end + + svc = service( + {'auth_token' => '0000',"restrict_to_branch" => "foo,bar"}, + modified_payload) + svc.receive_push + end + + def test_merge_pull_request_payload + @stubs.post "/api/1.0/tasks/42/stories" do |env| + [400, {}, ''] # Asana responds with 400 for unknown tasks + end + + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + body = decode_body(env[:body]) + assert_match /#1234/, body["text"] + [200, {}, ''] + end + + svc = service({'auth_token' => '0000'}, merge_payload) + assert_nothing_raised { svc.receive_push } + end + + def test_error_response + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + [401, {"Content-Type" => "application/json; charset=UTF-8"}, '{"errors":[{"message":"Not Authorized"}]}'] + end + + svc = service( {'auth_token' => 'bad-token'}, modified_payload) + + begin + svc.receive_push + rescue StandardError => e + assert_equal Service::ConfigurationError, e.class + assert_equal "Not Authorized", e.message + end + end + + def test_asana_exception + @stubs.post "/api/1.0/tasks/1234/stories" do |env| + [500, {}, 'Boom!'] + end + + svc = service( {'auth_token' => '0000'}, modified_payload) + + begin + svc.receive_push + rescue StandardError => e + assert_equal Service::ConfigurationError, e.class + assert_equal "Unexpected Error", e.message + end + end + + def service(*args) + super Service::Asana, *args + end + + def modified_payload + pay = payload + pay['commits'][0]['message'] = "stub git call for Grit#heads test f:15 Case#1234" + pay['commits'][1]['message'] = "#1234 clean up heads test f:2hrs #1235" + pay['commits'][2]['message'] = "add more comments about #1235 and #1234 throughout" + pay + end + + def merge_payload + pay = payload + pay['commits'][0]['message'] = "Merge pull request #42. Fixes Asana task #1234." + pay + end + + end diff --git a/test/auto_deploy_test.rb b/test/auto_deploy_test.rb new file mode 100644 index 000000000..fc84fb076 --- /dev/null +++ b/test/auto_deploy_test.rb @@ -0,0 +1,210 @@ +require File.expand_path('../helper', __FILE__) + +class AutoDeployTest < Service::TestCase + include Service::HttpTestMethods + + def auto_deploy_on_push_service_data + { + 'github_token' => github_token, + 'environments' => 'production', + 'deploy_on_status' => '0' + } + end + + def auto_deploy_on_status_service_data(options = { }) + auto_deploy_on_push_service_data.merge options.merge('deploy_on_status' => '1') + end + + def auto_deploy_on_push_service + service(:push, auto_deploy_on_push_service_data, push_payload) + end + + def auto_deploy_on_status_service(options = { }) + service(:status, auto_deploy_on_status_service_data(options), status_payload) + end + + def test_unsupported_deployment_events + exception = assert_raises(Service::ConfigurationError) do + service(:deployment, auto_deploy_on_push_service_data, deployment_payload).receive_event + end + + message = "The deployment event is currently unsupported." + assert_equal message, exception.message + end + + def test_push_deployment_configured_properly + stub_github_repo_deployment_access + services_sha = Service.current_sha[0..7] + + github_post_body = { + "ref" => "a47fd41f", + "payload" => {"hi"=>"haters"}, + "environment" => "production", + "description" => "Auto-Deployed on push by GitHub Services@#{services_sha} for rtomayko - master@a47fd41f", + "required_contexts" => [ ], + } + + github_deployment_path = "/repos/mojombo/grit/deployments" + + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + auto_deploy_on_push_service.receive_event + @stubs.verify_stubbed_calls + end + + def test_push_deployment_configured_for_status + stub_github_repo_deployment_access + + # successful push to default branch but configured for status deployments + service(:push, auto_deploy_on_status_service_data, status_payload).receive_event + @stubs.verify_stubbed_calls + end + + def test_status_deployment_configured_properly + stub_github_repo_deployment_access + services_sha = Service.current_sha[0..7] + + github_post_body = { + "ref" => "7b80eb10", + "payload" => {"hi"=>"haters"}, + "environment" => "production", + "description" => "Auto-Deployed on status by GitHub Services@#{services_sha} for rtomayko - master@7b80eb10", + "required_contexts" => [ ], + } + + github_deployment_path = "/repos/mojombo/grit/deployments" + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + auto_deploy_on_status_service.receive_event + @stubs.verify_stubbed_calls + end + + def test_status_deployment_configured_properly_on_enterprise + services_sha = Service.current_sha[0..7] + + github_post_body = { + "ref" => "7b80eb10", + "payload" => {"hi"=>"haters"}, + "environment" => "production", + "description" => "Auto-Deployed on status by GitHub Services@#{services_sha} for rtomayko - master@7b80eb10", + "required_contexts" => [ ], + } + + github_deployment_path = "/repos/mojombo/grit/deployments" + @stubs.post github_deployment_path do |env| + assert_equal 'enterprise.myorg.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + @stubs.get "/user" do |env| + assert_equal 'enterprise.myorg.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + [200, {}, ''] + end + + deployment_history = [{'environment' => 'staging', 'id' => 42}, + {'environment' => 'production', 'id' => 43, 'payload' => {'hi' => 'haters'}}].to_json + + @stubs.get "/repos/mojombo/grit/deployments" do |env| + assert_equal 'enterprise.myorg.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + headers = {"X-OAuth-Scopes" => "repo,deployment" } + [200, headers, deployment_history] + end + + auto_deploy_on_status_service('github_api_url' => 'https://enterprise.myorg.com').receive_event + @stubs.verify_stubbed_calls + end + + def test_status_deployment_configured_with_failure_status + stub_github_repo_deployment_access + + # don't do anything on failed states + failed_status_payload = status_payload.merge('state' => 'failure') + service(:status, auto_deploy_on_status_service_data, failed_status_payload).receive_event + @stubs.verify_stubbed_calls + end + + def test_status_deployment_configured_for_push + stub_github_repo_deployment_access + + # successful commit status but configured for push + service(:status, auto_deploy_on_push_service_data, status_payload).receive_event + @stubs.verify_stubbed_calls + end + + def test_deployment_with_bad_github_user_credentials + stub_github_user(404) + + exception = assert_raises(Service::ConfigurationError) do + auto_deploy_on_push_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to access GitHub with the provided token." + assert_equal message, exception.message + end + + def test_deployment_without_access_to_github_repo_deployments + stub_github_repo_deployment_access(404) + + exception = assert_raises(Service::ConfigurationError) do + auto_deploy_on_push_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to access the mojombo/grit repository's deployments on GitHub with the provided token." + assert_equal message, exception.message + end + + def test_slashed_payload_ref + payload = { 'ref' => 'refs/heads/slash/test' } + service = Service::AutoDeploy.new(:push, {}, payload) + assert_equal 'slash/test', service.payload_ref + end + + def service_class + Service::AutoDeploy + end + + def stub_github_user(code = 200) + @stubs.get "/user" do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + [code, {}, ''] + end + end + + def stub_github_repo_deployment_access(code = 200, scopes = "repo:deployment, user") + stub_github_user + deployment_history = [{'environment' => 'staging', 'id' => 42}, + {'environment' => 'production', 'id' => 43, 'payload' => {'hi' => 'haters'}}].to_json + + @stubs.get "/repos/mojombo/grit/deployments" do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + headers = {"X-OAuth-Scopes" => scopes } + [code, headers, deployment_history] + end + end + + def github_token + @github_token ||= SecureRandom.hex(24) + end +end diff --git a/test/aws_code_deploy_test.rb b/test/aws_code_deploy_test.rb new file mode 100644 index 000000000..411c5605c --- /dev/null +++ b/test/aws_code_deploy_test.rb @@ -0,0 +1,134 @@ +require File.expand_path('../helper', __FILE__) +ENV['CODE_DEPLOY_STUB_RESPONSES'] = 'true' + +class AwsCodeDeployDeploymentTest < Service::TestCase + include Service::HttpTestMethods + + def setup + super + end + + def test_deployment_group_sent + response = aws_service.receive_event + assert_equal sample_data['deployment_group'], response.context[:deployment_group] + end + + def test_environmental_deployment_group_sent + svc = Service::AwsCodeDeploy.new(:deployment, sample_data, environmental_payload) + + response = svc.receive_event + deployment_group = code_deploy_deployment_environments['staging']['deployment_group'] + assert_equal deployment_group, response.context[:deployment_group] + end + + def test_application_name_sent + svc = Service::AwsCodeDeploy.new(:deployment, sample_data, environmental_payload) + response = svc.receive_event + application_name = code_deploy_deployment_environments['staging']['application_name'] + assert_equal application_name, response.context[:application_name] + end + + def test_environmental_application_name_sent + svc = Service::AwsCodeDeploy.new(:deployment, sample_data, environmental_payload) + response = svc.receive_event + application_name = code_deploy_deployment_environments['staging']['application_name'] + assert_equal application_name, response.context[:application_name] + end + + def test_application_name_missing + svc = aws_service(sample_data.except('application_name')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_access_key_id_configured + config = aws_service.code_deploy_client.config + assert_equal sample_data['aws_access_key_id'], config.access_key_id + end + + def test_aws_access_key_id_missing + svc = aws_service(sample_data.except('aws_access_key_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_secret_access_key_configured + config = aws_service.code_deploy_client.config + assert_equal sample_data['aws_secret_access_key'], config.secret_access_key + end + + def test_aws_secret_access_key_missing + svc = aws_service(sample_data.except('aws_secret_access_key')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_github_deployment_status_callbacks + github_post_body = { + "state" => "success", + "target_url" => "https://console.aws.amazon.com/codedeploy/home?region=us-east-1#/deployments", + "description" => "Deployment 721 Accepted by Amazon. (github-services@#{Service.current_sha[0..7]})" + } + + github_deployment_path = "/repos/atmos/my-robot/deployments/721/statuses" + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + custom_sample_data = sample_data.merge('github_token' => 'secret') + svc = service(:deployment, custom_sample_data, environmental_payload) + response = svc.receive_event + application_name = code_deploy_deployment_environments['staging']['application_name'] + assert_equal application_name, response.context[:application_name] + + @stubs.verify_stubbed_calls + end + + def aws_service(data = sample_data, payload = sample_payload) + Service::AwsCodeDeploy.new(:deployment, data, payload) + end + + def service_class + Service::AwsCodeDeploy + end + + def sample_data + { + 'aws_access_key_id' => 'AKIA1234567890123456', + 'aws_secret_access_key' => '0123456789+0123456789+0123456789+0123456', + 'application_name' => 'testapp', + 'deployment_group_name' => 'production' + } + end + + def code_deploy_deployment_environments + { + 'staging' => { + }, + 'production' => { + } + } + end + + def environmental_payload + custom_payload = { + 'environment' => 'staging', + 'payload' => { + 'config' => { + 'aws_code_deploy' => code_deploy_deployment_environments + } + } + } + Service::DeploymentHelpers.sample_deployment_payload.merge(custom_payload) + end + + def sample_payload(branch_name = 'default-branch') + Service::DeploymentHelpers.sample_deployment_payload.merge('ref' => "refs/heads/#{branch_name}") + end +end diff --git a/test/aws_ops_works_deployment_test.rb b/test/aws_ops_works_deployment_test.rb new file mode 100644 index 000000000..c20c4d348 --- /dev/null +++ b/test/aws_ops_works_deployment_test.rb @@ -0,0 +1,148 @@ +require File.expand_path('../helper', __FILE__) + +class AwsOpsWorksDeploymentTest < Service::TestCase + include Service::HttpTestMethods + + def setup + super + AWS.stub! + end + + def test_stack_id_sent + response = aws_service.receive_event + assert_equal sample_data['stack_id'], response.request_options[:stack_id] + end + + def test_environmental_stack_id_sent + svc = Service::AwsOpsWorks.new(:deployment, sample_data, environmental_payload) + + response = svc.receive_event + stack_id = opsworks_deployment_environments['staging']['stack_id'] + assert_equal stack_id, response.request_options[:stack_id] + end + + def test_stack_id_missing + svc = aws_service(sample_data.except('stack_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_app_id_sent + response = aws_service.receive_event + assert_equal sample_data['app_id'], response.request_options[:app_id] + end + + def test_environmental_app_id_sent + svc = Service::AwsOpsWorks.new(:deployment, sample_data, environmental_payload) + response = svc.receive_event + app_id = opsworks_deployment_environments['staging']['app_id'] + assert_equal app_id, response.request_options[:app_id] + end + + def test_app_id_missing + svc = aws_service(sample_data.except('app_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_access_key_id_configured + config = aws_service.ops_works_client.config + assert_equal sample_data['aws_access_key_id'], config.access_key_id + end + + def test_aws_access_key_id_missing + svc = aws_service(sample_data.except('aws_access_key_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_secret_access_key_configured + config = aws_service.ops_works_client.config + assert_equal sample_data['aws_secret_access_key'], config.secret_access_key + end + + def test_aws_secret_access_key_missing + svc = aws_service(sample_data.except('aws_secret_access_key')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_github_deployment_status_callbacks + github_post_body = { + "state" => "success", + "target_url" => "https://console.aws.amazon.com/opsworks/home?#/stack/12345678-1234-1234-1234-123456789012/deployments", + "description" => "Deployment 721 Accepted by Amazon. (github-services@#{Service.current_sha[0..7]})" + } + + github_deployment_path = "/repos/atmos/my-robot/deployments/721/statuses" + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + custom_sample_data = sample_data.merge('github_token' => 'secret') + svc = service(:deployment, custom_sample_data, environmental_payload) + response = svc.receive_event + app_id = opsworks_deployment_environments['staging']['app_id'] + assert_equal app_id, response.request_options[:app_id] + + @stubs.verify_stubbed_calls + end + + def aws_service(data = sample_data, payload = sample_payload) + Service::AwsOpsWorks.new(:deployment, data, payload) + end + + def service_class + Service::AwsOpsWorks + end + + def sample_data + { + 'aws_access_key_id' => 'AKIA1234567890123456', + 'aws_secret_access_key' => '0123456789+0123456789+0123456789+0123456', + 'stack_id' => '12345678-1234-1234-1234-123456789012', + 'app_id' => '01234567-0123-0123-0123-012345678901', + 'branch_name' => 'default-branch' + } + end + + def opsworks_deployment_environments + { + 'staging' => { + 'app_id' => '01234567-0123-0123-0123-012345678901', + 'stack_id' => '12345678-1234-1234-1234-123456789012', + }, + 'production' => { + 'app_id' => '01234567-0123-0123-0123-012345678902', + 'stack_id' => '12345678-1234-1234-1234-123456789013', + }, + 'qa' => { + 'app_id' => '01234567-0123-0123-0123-012345678903', + 'stack_id' => '12345678-1234-1234-1234-123456789012', + } + } + end + + def environmental_payload + custom_payload = { + 'environment' => 'staging', + 'payload' => { + 'config' => { + 'opsworks' => opsworks_deployment_environments + } + } + } + Service::DeploymentHelpers.sample_deployment_payload.merge(custom_payload) + end + + def sample_payload(branch_name = 'default-branch') + Service::DeploymentHelpers.sample_deployment_payload.merge('ref' => "refs/heads/#{branch_name}") + end +end diff --git a/test/aws_ops_works_test.rb b/test/aws_ops_works_test.rb new file mode 100644 index 000000000..659bd10dc --- /dev/null +++ b/test/aws_ops_works_test.rb @@ -0,0 +1,104 @@ +require File.expand_path('../helper', __FILE__) + +class AwsOpsWorksTest < Service::TestCase + + def setup + AWS.stub! + end + + def test_stack_id_sent + response = service.receive_event + assert_equal sample_data['stack_id'], response.request_options[:stack_id] + end + + def test_stack_id_missing + svc = service(sample_data.except('stack_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_app_id_sent + response = service.receive_event + assert_equal sample_data['app_id'], response.request_options[:app_id] + end + + def test_app_id_missing + svc = service(sample_data.except('app_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_expected_branch_name_received + response = service.receive_event + refute_nil response + end + + def test_unexpected_branch_name_received + response = service(sample_data, sample_payload('another-branch')).receive_event + assert_nil response + end + + def test_branch_name_missing + svc = service(sample_data.except('branch_name')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_access_key_id_configured + config = service.ops_works_client.config + assert_equal sample_data['aws_access_key_id'], config.access_key_id + end + + def test_region_configured + config = service.ops_works_client.config + assert_equal sample_data['region'], config.ops_works_region + end + + def test_aws_access_key_id_missing + svc = service(sample_data.except('aws_access_key_id')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_aws_secret_access_key_configured + config = service.ops_works_client.config + assert_equal sample_data['aws_secret_access_key'], config.secret_access_key + end + + def test_aws_secret_access_key_missing + svc = service(sample_data.except('aws_secret_access_key')) + assert_raises Service::ConfigurationError do + svc.receive_event + end + end + + def test_region_blank + svc = service(sample_data.merge('region' => "")) + config = service.ops_works_client.config + assert_equal sample_data['region'], config.ops_works_region + end + + def service(data = sample_data, payload = sample_payload) + Service::AwsOpsWorks.new(:push, data, payload) + end + + def sample_data + { + 'aws_access_key_id' => 'AKIA1234567890123456', + 'aws_secret_access_key' => '0123456789+0123456789+0123456789+0123456', + 'stack_id' => '12345678-1234-1234-1234-123456789012', + 'app_id' => '01234567-0123-0123-0123-012345678901', + 'region' => "us-east-1", + 'branch_name' => 'default-branch' + } + end + + def sample_payload(branch_name = 'default-branch') + Service::PushHelpers.sample_payload.merge('ref' => "refs/heads/#{branch_name}") + end + +end diff --git a/test/backlog_test.rb b/test/backlog_test.rb new file mode 100644 index 000000000..dfb06884b --- /dev/null +++ b/test/backlog_test.rb @@ -0,0 +1,54 @@ +require File.expand_path('../helper', __FILE__) + +class BacklogTest < Service::TestCase + def setup + @server = FakeXMLRPC.new() + end + + def test_push + modified_payload = modify_payload(payload) + svc = service({'api_url' => 'https://demo.backlog.jp/XML-RPC', 'user_id' => 'someone', 'password' => '12345'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert @server.commented.length == 1 + assert @server.commented[0]['content'].include? '06f63b43050935962f84fe54473a7c5de7977325' + assert @server.switched.length == 2 + assert @server.switched[0]['comment'].include? '5057e76a11abd02e83b7d3d3171c4b68d9c88480' + assert @server.switched[0]['status'] == 3 + assert @server.switched[1]['comment'].include? 'a47fd41f3aa4610ea527dcc1669dfdb9c15c5425' + assert @server.switched[1]['status'] == 4 + end + + def modify_payload(payload) + modified_payload = payload.clone() + modified_payload['commits'][0]['message'] << "\nDORA-1" + modified_payload['commits'][1]['message'] << "\nDORA-2 #fixed" + modified_payload['commits'][2]['message'] << "\nDORA-3 #closed" + return modified_payload + end + + def service(*args) + super Service::Backlog, *args + end + + class FakeXMLRPC + def call(procedure, arguments) + case procedure + when 'backlog.addComment' + commented << {'key' => arguments['key'], 'content' => arguments['content']} + when 'backlog.switchStatus' + switched << { 'key' => arguments['key'], 'comment' => arguments['comment'], 'status' => arguments['statusId']} + end + end + + def commented + @commented ||= [] + end + + def switched + @switched ||= [] + end + end +end + diff --git a/test/bamboo_test.rb b/test/bamboo_test.rb new file mode 100644 index 000000000..1319205f1 --- /dev/null +++ b/test/bamboo_test.rb @@ -0,0 +1,196 @@ +require File.expand_path('../helper', __FILE__) + +class BambooTest < Service::TestCase + EXAMPLE_BASE_URL = "http://bamboo.example.com".freeze + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_triggers_build + @stubs.post "/rest/api/latest/queue/ABC" do |env| + valid_response("ABC") + end + + svc = service :push, data, payload + svc.receive + + @stubs.verify_stubbed_calls + end + + def test_triggers_compound_build + ["ABC", "A"].each do |key| + @stubs.post "/rest/api/latest/queue/#{key}" do |env| + valid_response(key) + end + end + + svc = service :push, compound_data1, payload + svc.receive + + @stubs.verify_stubbed_calls + end + + def test_triggers_build_with_context_path + @stubs.post "/context/rest/api/latest/queue/ABC" do |env| + valid_response("ABC") + end + + data = self.data.update('base_url' => "https://secure.bamboo.com/context") + svc = service :push, data, payload + svc.receive + + @stubs.verify_stubbed_calls + end + + def test_passes_build_error + @stubs.post "/rest/api/latest/queue/ABC" do |env| + error_response(500, "Configuration Error") + end + + svc = service :push, data, payload + assert_raises Service::ConfigurationError do + svc.receive + end + + @stubs.verify_stubbed_calls + end + + def test_passes_error_with_xml_parsing + @stubs.post "/rest/api/latest/queue/ABC" do |env| + error_response(404, "Plan ABC not found") + end + + svc = service :push, data, payload + assert_raises Service::ConfigurationError do + svc.receive + end + + @stubs.verify_stubbed_calls + end + + def test_requires_base_url + data = self.data.update('base_url' => '') + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_build_key + data = self.data.update('build_key' => '') + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_username + data = self.data.update('username' => '') + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_password + data = self.data.update('password' => '') + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_failed_bamboo_server + svc = service :push, data, payload + def svc.http_post(*args) + raise SocketError, "getaddrinfo: Name or service not known" + end + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_invalid_bamboo_url + @stubs.post "/rest/api/latest/queue/ABC" do + [404, {}, ''] + end + + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_branch_with_slash + data = self.data.update('build_key' => 'test/test:ABC') + payload = self.payload.update('ref' => 'test/test') + @stubs.post "/rest/api/latest/queue/ABC" do |env| + valid_response("ABC") + end + + svc = service :push, data, payload + svc.receive + + @stubs.verify_stubbed_calls + end + + def data + { + "build_key" => "ABC", + "base_url" => EXAMPLE_BASE_URL, + "username" => "admin", + "password" => 'pwd' + } + end + + def compound_data1 + { + "build_key" => "ABC,master:A,rel-1-patches:B,rel-2-patches:C", + "base_url" => EXAMPLE_BASE_URL, + "username" => "admin", + "password" => 'pwd' + } + end + + # Assert the value of the params. + # + # body - A String of form-encoded params: "a=1&b=2" + # expected - A Hash of String keys and values to match against the body. + # + # Raises Test::Unit::AssertionFailedError if the assertion doesn't match. + # Returns nothing. + def assert_params(body, expected) + params = Faraday::Utils.parse_query(body) + expected.each do |key, expected_value| + assert value = params.delete(key.to_s), "#{key} not in #{params.inspect}" + assert_equal expected_value, value, "#{key} = #{value.inspect}, not #{expected_value.inspect}" + end + + assert params.empty?, "params has other values: #{params.inspect}" + end + + def service(*args) + super Service::Bamboo, *args + end + + private + def valid_response(key) + xml = "" + + "" + + "Manual build" + + "" + [200, {}, xml] + end + def error_response(status, msg) + xml = "#{status}#{msg}" + [status, {}, xml] + end +end + diff --git a/test/basecamp_test.rb b/test/basecamp_test.rb new file mode 100644 index 000000000..58d764987 --- /dev/null +++ b/test/basecamp_test.rb @@ -0,0 +1,90 @@ +require File.expand_path('../helper', __FILE__) + +class BasecampTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @options = { + 'project_url' => 'https://basecamp.com/123/projects/456', + 'email_address' => 'a@b.com', + 'password' => 'secret' } + end + + def test_push + @stubs.post '/123/api/v1/projects/456/events.json' do |env| + assert_equal 'https', env[:url].scheme + assert_equal 'basecamp.com', env[:url].host + + assert_equal 'Basic YUBiLmNvbTpzZWNyZXQ=', env[:request_headers]['Authorization'] + + assert_match 'GitHub', env[:request_headers]['User-Agent'] + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal 'application/json', env[:request_headers]['Accept'] + + expected = { + 'service' => Service::Basecamp::SERVICE_NAME, + 'logo_url' => Service::Basecamp::LOGO_URL, + 'creator_email_address' => 'tom@mojombo.com', + 'description' => 'committed', + 'title' => 'pushed 3 new commits to master', + 'url' => 'http://github.com/mojombo/grit/compare/4c8124f...a47fd41' } + assert_equal expected, JSON.parse(env[:body]) + + [200, {}, ''] + end + + service(@options, payload).receive_push + end + + def test_pull + @stubs.post '/123/api/v1/projects/456/events.json' do |env| + expected = { + 'service' => Service::Basecamp::SERVICE_NAME, + 'logo_url' => Service::Basecamp::LOGO_URL, + 'creator_email_address' => nil, + 'description' => 'opened a pull request', + 'title' => 'booya (master..feature)', + 'url' => 'html_url' } + assert_equal expected, JSON.parse(env[:body]) + + [200, {}, ''] + end + + service(:pull_request, @options, pull_payload).receive_pull_request + end + + def test_issues + @stubs.post '/123/api/v1/projects/456/events.json' do |env| + expected = { + 'service' => Service::Basecamp::SERVICE_NAME, + 'logo_url' => Service::Basecamp::LOGO_URL, + 'creator_email_address' => nil, + 'description' => 'opened an issue', + 'title' => 'booya', + 'url' => 'html_url' } + assert_equal expected, JSON.parse(env[:body]) + + [200, {}, ''] + end + + service(:issues, @options, issues_payload).receive_issues + end + + def service(*args) + super Service::Basecamp, *args + end + + # No html_url in default payload + def pull_payload + super.tap do |payload| + payload['pull_request']['html_url'] = 'html_url' + end + end + + # No html_url in default payload + def issues_payload + super.tap do |payload| + payload['issue']['html_url'] = 'html_url' + end + end +end diff --git a/test/bugherd_test.rb b/test/bugherd_test.rb new file mode 100644 index 000000000..7e09dae9e --- /dev/null +++ b/test/bugherd_test.rb @@ -0,0 +1,47 @@ +require File.expand_path('../helper', __FILE__) + +class BugHerdTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/github_web_hook/KEY" do |env| + assert_equal 'www.bugherd.com', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + svc = service :push, {'project_key' => 'KEY'}, payload + svc.receive_push + end + + def test_issues + @stubs.post "/github_web_hook/KEY" do |env| + assert_equal 'www.bugherd.com', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + svc = service :push, {'project_key' => 'KEY'}, payload + svc.receive_issues + end + + def test_issue_comment + @stubs.post "/github_web_hook/KEY" do |env| + assert_equal 'www.bugherd.com', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + svc = service :push, {'project_key' => 'KEY'}, payload + svc.receive_issue_comment + end + + def service(*args) + super Service::BugHerd, *args + end +end diff --git a/test/bugzilla_test.rb b/test/bugzilla_test.rb new file mode 100644 index 000000000..28f4182ce --- /dev/null +++ b/test/bugzilla_test.rb @@ -0,0 +1,106 @@ +require File.expand_path('../helper', __FILE__) + +class BugzillaTest < Service::TestCase + def setup + @server = FakeXMLRPC.new() + end + + def test_push + modified_payload = modify_payload(payload) + svc = service({'server_url' => 'nowhere', 'username' => 'someone', 'password' => '12345', 'central_repository' => '0'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert !@server.bug_posts.include?(4) # fake server says this was already pushed somewhere else + assert @server.closed_bugs.length == 0 # shouldn't close any bugs because this isn't the central repository + assert @server.bug_posts[1].include? ' master at ' # check that branch name is included + assert @server.bug_posts[1].include? 'Commits' #check for plural + assert @server.bug_posts[1].include? '5057e76a11abd02e83b7d3d3171c4b68d9c88480' + assert @server.bug_posts[1].include? 'a47fd41f3aa4610ea527dcc1669dfdb9c15c5425' + assert @server.bug_posts[2].include? '5057e76a11abd02e83b7d3d3171c4b68d9c88480' + assert @server.bug_posts[3].include? '5057e76a11abd02e83b7d3d3171c4b68d9c88480' + end + + # Verify pushes will be processed on all commits if no integration branch is specified. + def test_integration_branch_is_optional + modified_payload = modify_payload(payload) + svc = service({'server_url' => 'nowhere', 'username' => 'someone', 'password' => '12345', 'central_repository' => '1'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert @server.closed_bugs.include?(1) + assert @server.bug_posts.include?(4) + end + + # Verify commits are only processed if they are in our integration branch. + def test_integration_branch + # No commits should be processed for this push because we're only listening for + # commits landing on the "master" branch. + modified_payload = modify_payload(payload).merge({'ref' => 'refs/heads/development'}) + svc = service({'server_url' => 'nowhere', 'username' => 'someone', 'password' => '12345', 'integration_branch' => 'master', 'central_repository' => '1'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert @server.closed_bugs.length == 0 + assert @server.bug_posts.length == 0 + + # This time, we should close a bug and post 4 comments because these commits were + # pushed to our integration branch. + modified_payload = modify_payload(payload).merge({'ref' => 'refs/heads/master'}) + svc = service({'server_url' => 'nowhere', 'username' => 'someone', 'password' => '12345', 'integration_branch' => 'master', 'central_repository' => '1'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert @server.closed_bugs.include?(1) + assert @server.bug_posts.include?(4) + end + + def test_central_push + #test pushing to a central repository + modified_payload = modify_payload(payload) + svc = service({'server_url' => 'nowhere', 'username' => 'someone', 'password' => '12345', 'central_repository' => '1'}, modified_payload) + svc.xmlrpc_client = @server + svc.receive_push + + assert @server.closed_bugs.include?(1) + assert @server.bug_posts.include?(4) # fake server says this was already pushed somewhere else + end + + def modify_payload(payload) + #modify payload to include some bug numbers and close a bug + modified_payload = payload.clone() + modified_payload['commits'][0]['message'] << "\nBug:4" + modified_payload['commits'][1]['message'] << "\nTracker items 1, 2 and 3" + modified_payload['commits'][2]['message'] << "\nCloses tracker item 1" + return modified_payload + end + + def service(*args) + super Service::Bugzilla, *args + end + + class FakeXMLRPC + def call(procedure, arguments) + case procedure + when 'User.login' + # Do nothing + when 'Bug.add_comment' + bug_posts[arguments['id']] = arguments['comment'] + when 'Bug.comments' + # Pretend this commit has already been pushed to another user's repository + return {'bugs'=>{"#{arguments['ids'][0]}"=>{'comments'=>[{'text'=>'06f63b43050935962f84fe54473a7c5de7977325'}]}}} + when 'Bug.update' + closed_bugs.push *arguments['ids'] + end + end + + def bug_posts + @bug_posts ||= {} + end + + def closed_bugs + @closed_bugs ||= [] + end + end +end + diff --git a/test/campfire_test.rb b/test/campfire_test.rb new file mode 100644 index 000000000..1ec58af2c --- /dev/null +++ b/test/campfire_test.rb @@ -0,0 +1,182 @@ +require File.expand_path('../helper', __FILE__) + +class CampfireTest < Service::TestCase + class MockCampfire + class Room + attr_reader :name, :lines + + def initialize(name) + @name = name + @lines = [] + end + + def speak(line) + @lines << line + end + end + + attr_reader :rooms + + def initialize(subd, options = {}) + @subdomain = subd + @rooms = [] + @options = options + @token = options[:token] + end + + attr_reader :subdomain, :token + + def find_room_by_name(name) + @rooms << (r=Room.new(name)) + r + end + end + + def test_push + svc = service({"token" => "t", "subdomain" => "s", "room" => "r"}, payload) + svc.receive_push + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 4, svc.campfire.rooms.first.lines.size # 3 + summary + assert svc.campfire.rooms.first.lines.first.match(/short/) + end + + def test_issues + svc = service(:issues, {"token" => "t", "subdomain" => "s", "room" => "r"}, issues_payload) + svc.receive_issues + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt opened issue #5: booya./i, svc.campfire.rooms.first.lines.first + end + + def test_pull + svc = service(:pull_request, {"token" => "t", "subdomain" => "s", "room" => "r"}, pull_payload) + svc.receive_pull_request + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt opened pull request #5: booya \(master...feature\)/i, svc.campfire.rooms.first.lines.first + end + + def test_public + svc = service(:public, {"token" => "t", "subdomain" => "s", "room" => "r"}, public_payload) + svc.receive_public + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt made the repository public/i, svc.campfire.rooms.first.lines.first + end + + def test_gollum + svc = service(:gollum, {"token" => "t", "subdomain" => "s", "room" => "r"}, gollum_payload) + svc.receive_public + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt created wiki page Foo/i, svc.campfire.rooms.first.lines.first + end + + def test_gollum_multiple_pages + multiple_page_payload = gollum_payload + multiple_page_payload['pages'] << multiple_page_payload['pages'][0].merge( + 'title' => 'Bar', + 'html_url' => 'https://github.com/mojombo/magik/wiki/Bar', + ) + + svc = service(:gollum, {"token" => "t", "subdomain" => "s", "room" => "r"}, multiple_page_payload) + svc.receive_public + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt created 2 wiki pages/i, svc.campfire.rooms.first.lines.first + end + + def test_gollum_multiple_actions + multiple_action_payload = gollum_payload + multiple_action_payload['pages'] << multiple_action_payload['pages'][0].merge( + 'title' => 'Bar', + 'html_url' => 'https://github.com/mojombo/magik/wiki/Bar', + 'action' => 'updated' + ) + + svc = service(:gollum, {"token" => "t", "subdomain" => "s", "room" => "r"}, multiple_action_payload) + svc.receive_public + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 1, svc.campfire.rooms.first.lines.size # 3 + summary + assert_match /\[grit\] defunkt created 1 and updated 1 wiki pages/i, svc.campfire.rooms.first.lines.first + end + + def test_full_domain + svc = service({"token" => "t", "subdomain" => "s.campfirenow.com", "room" => "r"}, payload) + svc.receive_push + assert_equal 1, svc.campfire.rooms.size + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + assert_equal 'r', svc.campfire.rooms.first.name + assert_equal 4, svc.campfire.rooms.first.lines.size # 3 + summary + assert svc.campfire.rooms.first.lines.first.match(/short/) + end + + def test_long_url + svc = service({"token" => "t", "subdomain" => "s", "room" => "r", "long_url" => "1"}, payload) + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + svc.receive_push + assert svc.campfire.rooms.first.lines.first.match(/github\.com/), "Summary url should not be shortened" + end + + def test_push_non_master_with_master_only + non_master_payload = payload + non_master_payload["ref"] = "refs/heads/non-master" + svc = service({"token" => "t", "subdomain" => "s", "room" => "r", "master_only" => 1}, non_master_payload) + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + svc.receive_push + assert_equal 0, svc.campfire.rooms.size + end + + def test_push_non_master_without_master_only + non_master_payload = payload + non_master_payload["ref"] = "refs/heads/non-master" + svc = service({"token" => "t", "subdomain" => "s", "room" => "r", "master_only" => 0}, non_master_payload) + assert_equal 's', svc.campfire.subdomain + assert_equal 't', svc.campfire.token + svc.receive_push + assert_equal 4, svc.campfire.rooms.first.lines.size # 3 + summary + end + + def setup + Service::Campfire.campfire_class = MockCampfire + end + + def teardown + Service::Campfire.campfire_class = Tinder::Campfire + end + + def service(*args) + svc = super(Service::Campfire, *args) + class << svc + def shorten_url(*args) + 'short' + end + end + + svc + end +end diff --git a/test/cia_test.rb b/test/cia_test.rb new file mode 100644 index 000000000..f42ba5949 --- /dev/null +++ b/test/cia_test.rb @@ -0,0 +1,30 @@ +require File.expand_path('../helper', __FILE__) + +class CIATest < Service::TestCase + def setup + @messages = [] + @server = lambda do |method, message| + @messages << [method, message] + end + end + + def test_push + svc = service({'project' => 'abc', 'long_url'=>1}, payload) + svc.xmlrpc_server = @server + svc.receive_push + + assert msg = @messages.shift + assert_equal 'hub.deliver', msg.first + assert_match '06f63b43050935962f84fe54473a7c5de7977325', msg.last + assert msg = @messages.shift + assert msg = @messages.shift + assert_nil @messages.shift + end + + def service(*args) + super Service::CIA, *args + end +end + + + diff --git a/test/codeclimate_test.rb b/test/codeclimate_test.rb new file mode 100644 index 000000000..b3ec40a49 --- /dev/null +++ b/test/codeclimate_test.rb @@ -0,0 +1,41 @@ +require File.expand_path('../helper', __FILE__) + +class CodeClimateTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @svc = service(data, {'commits'=>[{'id'=>'test'}]}) + end + + def test_reads_token_from_data + assert_equal "5373dd4a3648b88fa9acb8e46ebc188a", @svc.token + end + + def test_strips_whitespace_from_token + svc = service({'token' => '5373dd4a3648b88fa9acb8e46ebc188a '}, payload) + assert_equal '5373dd4a3648b88fa9acb8e46ebc188a', svc.token + end + + def test_posts_payload + @stubs.post '/github_events' do |env| + assert_equal 'https', env[:url].scheme + assert_equal 'codeclimate.com', env[:url].host + assert_equal basic_auth('github', '5373dd4a3648b88fa9acb8e46ebc188a'), + env[:request_headers]['authorization'] + assert JSON.parse(env[:body]).keys.include?("payload") + assert_equal "test", JSON.parse(env[:body])["payload"]["commits"][0]["id"] + end + + @svc.receive_event + end + +private + + def service(*args) + super Service::CodeClimate, *args + end + + def data + { 'token' => '5373dd4a3648b88fa9acb8e46ebc188a' } + end + +end diff --git a/test/codeship_test.rb b/test/codeship_test.rb new file mode 100644 index 000000000..05ff7c71e --- /dev/null +++ b/test/codeship_test.rb @@ -0,0 +1,29 @@ +require File.expand_path('../helper', __FILE__) + +class CodeshipTest < Service::TestCase + include Service::HttpTestMethods + + def test_push_event + project_uuid = '2fe6bdb0-a6db-0131-f25b-0088653824b4' + + data = { 'project_uuid' => project_uuid } + + svc = service(:push, data, payload) + + @stubs.post "/github/#{project_uuid}" do |env| + body = Faraday::Utils.parse_query env[:body] + assert_equal "https://lighthouse.codeship.io/github/#{project_uuid}", env[:url].to_s + assert_match 'application/x-www-form-urlencoded', env[:request_headers]['Content-Type'] + assert_equal 'push', env[:request_headers]['X-GitHub-Event'] + assert_equal payload, JSON.parse(body["payload"].to_s) + end + + svc.receive_event + end + + private + + def service_class + Service::Codeship + end +end diff --git a/test/commandoio_test.rb b/test/commandoio_test.rb new file mode 100644 index 000000000..ef6afa9cf --- /dev/null +++ b/test/commandoio_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../helper', __FILE__) + +class Commandoio < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "v1/recipes/_______mock_recipe_______/execute" do |env| + body = Faraday::Utils.parse_query(env[:body]) + payload = JSON.parse(body['payload']) + + assert_equal 'api.commando.io', env[:url].host + assert_equal 'https', env[:url].scheme + assert_match 'application/x-www-form-urlencoded', env[:request_headers]['content-type'] + assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload']) + assert_equal basic_auth('demo', 'skey_abcdsupersecretkey'), + env[:request_headers]['authorization'] + [200, {}, ''] + end + + svc = service :push, { + 'api_token_secret_key' => 'skey_abcdsupersecretkey', + 'account_alias' => 'demo', + 'recipe' => '_______mock_recipe_______', + 'server' => '_server_', + 'notes' => 'Test the mock recipe!' + } + svc.receive_event + end + + def service(*args) + super Service::Commandoio, *args + end +end diff --git a/test/conductor_test.rb b/test/conductor_test.rb new file mode 100644 index 000000000..0baabbdb6 --- /dev/null +++ b/test/conductor_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class ConductorTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/github/commit/abc123def456" + @stubs.post url do |env| + body = Faraday::Utils.parse_query(env[:body]) + payload = JSON.parse(body['payload']) + assert_equal payload['ref'], 'refs/heads/master' + [200, {}, ''] + end + + svc = service({'api_key' => 'abc123def456'}, payload) + svc.receive_push + end + + def service(*args) + super Service::Conductor, *args + end +end diff --git a/test/copperegg_test.rb b/test/copperegg_test.rb new file mode 100644 index 000000000..b05ede77c --- /dev/null +++ b/test/copperegg_test.rb @@ -0,0 +1,66 @@ +require File.expand_path('../helper', __FILE__) + +class CopperEggTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = { + 'url' => 'https://api.copperegg.com/custom', + 'api_key' => '134567890', + 'tag' => 'newtag', + 'master_only' => '0' + } + @payload = { + "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "http://github.com/mojombo/grit/compare/4c8124ffcf4039d292442eeccabdeca5af5c5017...a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "forced" => false, + "created" => false, + "deleted" => false, + + "repository" => { + "name" => "grit", + "url" => "http://github.com/mojombo/grit", + "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" } + }, + + "pusher" => { + "name" => "rtomayko" + }, + + "commits" => [ + { + "distinct" => true, + "removed" => [], + "message" => "[#WEB-249 status:31 resolution:1] stub git call for Grit#heads test", + "added" => [], + "timestamp" => "2007-10-10T00:11:02-07:00", + "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "06f63b43050935962f84fe54473a7c5de7977325" + } + ] + } + end + + def test_push + svc = service(@data, @payload) + assert_equal 1, @payload['commits'].size + assert_equal 'rtomayko', @payload['pusher']['name'] + assert_equal 'grit', @payload['repository']['name'] + + @stubs.post "/custom" do |env| + assert_match "Basic MTM0NTY3ODkwOlU=", env[:request_headers]["authorization"] + assert_equal "application/json", env[:request_headers]["Content-Type"] + assert_match "GitHub: rtomayko has pushed 1 commit(s) to grit", env[:body] + assert_match "newtag", env[:body] + [200, {}, ''] + end + svc.receive_push + end + + def service(*args) + super Service::CopperEgg, *args + end +end diff --git a/test/crocagile_test.rb b/test/crocagile_test.rb new file mode 100644 index 000000000..f8c33ccaf --- /dev/null +++ b/test/crocagile_test.rb @@ -0,0 +1,22 @@ +require File.expand_path('../helper', __FILE__) + +class CrocagileTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "api/integration/github" do |env| + assert_equal 'www.crocagile.com', env[:url].host + assert_equal 'application/json', env[:request_headers]['content-type'] + [200, {}, '{"status":1,"message":"GitHub Webook processed successfully."}'] + end + svc = service({'project_key'=>'foo'},payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service(*args) + super Service::Crocagile, *args + end +end diff --git a/test/deploy_hq_test.rb b/test/deploy_hq_test.rb new file mode 100644 index 000000000..364489020 --- /dev/null +++ b/test/deploy_hq_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class DeployHqTest < Service::TestCase + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post '/deploy/projectname/to/servername/serverkey' do |env| + assert_equal 'test.deployhq.com', env[:url].host + assert_equal 'https', env[:url].scheme + post_payload = JSON.parse(Faraday::Utils.parse_query(env[:body])['payload']) + + refute_nil payload['after'] + assert_equal post_payload['after'], post_payload['after'] + refute_nil post_payload['ref'] + assert_equal payload['ref'], post_payload['ref'] + refute_nil post_payload['repository']['url'] + assert_equal payload['repository']['url'], post_payload['repository']['url'] + assert_equal payload['pusher']['email'], post_payload['pusher']['email'] + + [201, [], ''] + end + + svc = service :push, { 'deploy_hook_url' => 'https://test.deployhq.com/deploy/projectname/to/servername/serverkey' }, payload + svc.receive_push + end + + def service(*args) + super Service::DeployHq, *args + end + +end diff --git a/test/deployervc_test.rb b/test/deployervc_test.rb new file mode 100644 index 000000000..0b193d074 --- /dev/null +++ b/test/deployervc_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class DeployervcTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_deployment_address = 'https://emre.deployer.vc/#/deployment/1' + test_api_token = 'this_is_a_test_token' + + data = { + 'deployment_address' => test_deployment_address, + 'api_token' => test_api_token + } + + payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post '/api/v1/deployments/deploy/1' do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, 'emre.deployer.vc' + assert_equal env[:request_headers]['X-Deployervc-Token'], test_api_token + assert_equal '', body['revision'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::Deployervc + end +end \ No newline at end of file diff --git a/test/divecloud_test.rb b/test/divecloud_test.rb new file mode 100644 index 000000000..e37716286 --- /dev/null +++ b/test/divecloud_test.rb @@ -0,0 +1,30 @@ +require File.expand_path('../helper', __FILE__) + +class DiveCloudTest < Service::TestCase + + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = { 'api_key' => 'Test_Api_Key', 'plan_id' => '833', 'creds_pass' => 'testtest', 'random_timing' => true, } + @payload = { 'status' => 'success' } + end + + def test_deployment_status + + @stubs.post "/api/v1/plans/833/run" do |env| + assert_equal "application/json", env[:request_headers]["Content-Type"] + assert_equal "Test_Api_Key", env[:request_headers]['x-api'] + [200, {}, ''] + end + + svc = service(:deployment_status, @data, @payload) + svc.receive_deployment_status + + end + + def service(*args) + super Service::DiveCloud, *args + end + + +end \ No newline at end of file diff --git a/test/djangopackages_test.rb b/test/djangopackages_test.rb new file mode 100644 index 000000000..3d9dd9d91 --- /dev/null +++ b/test/djangopackages_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class DjangoPackagesTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/packages/github-webhook/" do |env| + assert_equal 'www.djangopackages.com', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal 1, JSON.parse(data['payload'])['a'] + [200, {}, ''] + end + + svc = service({"zen" => "test", "hook_id" => "123" }, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::DjangoPackages, *args + end +end + diff --git a/test/docker_test.rb b/test/docker_test.rb new file mode 100644 index 000000000..85d438313 --- /dev/null +++ b/test/docker_test.rb @@ -0,0 +1,30 @@ +require File.expand_path('../helper', __FILE__) + +class DockerTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + data = {} + + payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post "/hooks/github" do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, "registry.hub.docker.com" + assert_equal 'test', body['payload']['commits'][0]['id'] + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::Docker + end +end diff --git a/test/email_test.rb b/test/email_test.rb new file mode 100644 index 000000000..54409fce0 --- /dev/null +++ b/test/email_test.rb @@ -0,0 +1,111 @@ +require File.expand_path('../helper', __FILE__) + +class EmailTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + svc = service( + {'address' => 'a'}, + payload) + + svc.receive_push + + msg, from, to = svc.messages.shift + assert_match "noreply@github.com", from + assert_equal 'a', to + + assert_nil svc.messages.shift + end + + def test_public + svc = service({'address' => 'a'}, basic_payload) + + svc.receive_public + + msg, from, to, subject = svc.messages.shift + assert_match "noreply@github.com", from + assert_equal 'a', to + assert_match "mojombo/grit has changed from Private to Public", subject + assert_match subject, msg + assert_match "github.com/mojombo/grit", msg + + assert_nil svc.messages.shift + end + + def test_multiple_address + svc = service( + {'address' => ' a b c'}, + payload) + + svc.receive_push + + msg, from, to = svc.messages.shift + assert_match "noreply@github.com", from + assert_equal 'a', to + + msg, from, to = svc.messages.shift + assert_match "noreply@github.com", from + assert_equal 'b', to + + # 3rd address ignored + assert_nil svc.messages.shift + end + + def test_push_from_author + svc = service( + {'address' => 'a', 'send_from_author' => '1'}, + payload) + + svc.receive_push + + msg, from, to = svc.messages.shift + assert_match 'tom@mojombo.com', from + assert_equal 'a', to + + assert_nil svc.messages.shift + end + + def test_push_from_do_not_reply + svc = service( + {'address' => 'a', 'send_from_author' => '0'}, + payload) + + svc.receive_push + + msg, from, to = svc.messages.shift + assert_match 'noreply@github.com', from + assert_equal 'a', to + + assert_nil svc.messages.shift + end + + + def test_push_from_do_not_reply_with_no_option_set + svc = service( + {'address' => 'a'}, + payload) + + svc.receive_push + + msg, from, to = svc.messages.shift + assert_match 'noreply@github.com', from + assert_equal 'a', to + + assert_nil svc.messages.shift + end + + def service(*args) + svc = super Service::Email, *args + def svc.messages + @messages ||= [] + end + + def svc.send_mail(mail) + messages << [mail.to_s, mail.from.first, mail.to.first, mail.subject] + end + svc + end +end + diff --git a/test/firebase_test.rb b/test/firebase_test.rb new file mode 100644 index 000000000..5e317df5a --- /dev/null +++ b/test/firebase_test.rb @@ -0,0 +1,85 @@ +require File.expand_path('../helper', __FILE__) + +class FirebaseTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post '/commits.json' do |env| + assert_equal 'test.firebaseio.com', env[:url].host + + compare = '' + body = JSON.parse(env[:body]) + payload['commits'].each do |commit| + if commit['id'] == body['id'] + compare = commit + end + end + + assert_equal compare, body + [200, {}, ''] + end + + svc = service :push, { + 'firebase' => 'https://test.firebaseio.com/commits' + }, payload + svc.receive_push + end + + def test_push_with_secret + @stubs.post '/commits.json' do |env| + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'auth' => '12345678abcdefgh'}, params) + end + + svc = service :push, { + 'firebase' => 'https://test.firebaseio.com/commits', + 'secret' => '12345678abcdefgh' + }, payload + svc.receive_push + end + + def test_push_with_suffix + @stubs.post '/commits.json' do |env| + assert_equal 'test.firebaseio.com', env[:url].host + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'auth' => '12345678abcdefgh'}, params) + [200, {}, ''] + end + + svc = service :push, { + 'firebase' => 'https://test.firebaseio.com/commits.json', + 'secret' => '12345678abcdefgh' + }, payload + svc.receive_push + end + + def test_without_firebase + assert_raises Service::ConfigurationError do + svc = service :push, + {'firebase' => ''}, payload + svc.receive_push + end + end + + def test_without_https + assert_raises Service::ConfigurationError do + svc = service :push, + {'firebase' => 'http://test.firebaseio.com'}, payload + svc.receive_push + end + end + + def test_invalid_scheme + assert_raises Service::ConfigurationError do + svc = service :push, + {'firebase' => 'ftp://test.firebaseio.com'}, payload + svc.receive_push + end + end + + def service(*args) + super Service::Firebase, *args + end +end diff --git a/test/fisheye_test.rb b/test/fisheye_test.rb new file mode 100644 index 000000000..fc0efbd54 --- /dev/null +++ b/test/fisheye_test.rb @@ -0,0 +1,209 @@ +require File.expand_path('../helper', __FILE__) + +class FishEyeTest < Service::TestCase + def app + Service::App + end + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def data_my_repo + { + "url_base" => "http://localhost:6060/foo", + "token" => "515848d216e3baa46e10d92f21f890f67fea1d12", + "repository_name" => "myRepo" + } + end + + def assert_headers_valid(env) + assert_equal(data_my_repo["token"], env[:request_headers]["X-Api-Key"]) + assert_equal("application/json", env[:request_headers]["Content-Type"]) + end + + def test_triggers_scanning_custom_repository + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + assert_headers_valid(env) + [200, {}] + end + + svc = service :push, data_my_repo, payload + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_url_with_slash + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + assert_headers_valid(env) + [200, {}] + end + + data = data_my_repo + data['url_base'] = "http://localhost:6060/foo/" + + svc = service :push, data, payload + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_url_without_http + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + assert_headers_valid(env) + [200, {}] + end + + data = data_my_repo + data['url_base'] = "localhost:6060/foo" + + svc = service :push, data, payload + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_github_repository + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/grit/scan" do |env| + [200, {}] + end + + data = { + "url_base" => "http://localhost:6060/foo", + "token" => "515848d216e3baa46e10d92f21f890f67fea1d12", + } + + svc = service :push, data, payload + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_empty_custom_repository + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/grit/scan" do |env| + assert_headers_valid(env) + [200, {}] + end + + data = { + "url_base" => "http://localhost:6060/foo", + "token" => "515848d216e3baa46e10d92f21f890f67fea1d12", + "repository_name" => " " + } + + svc = service :push, data, payload + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_missing_url_base + data = { + "token" => "515848d216e3baa46e10d92f21f890f67fea1d12" + } + + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_missing_token + data = { + "url_base" => "http://localhost:6060/foo" + } + + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_missing_data + svc = service :push, {}, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_missing_data_and_payload + svc = service :push, {}, {} + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_missing_payload + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + assert_headers_valid(env) + [200, {}] + end + + svc = service :push, data_my_repo, {} + assert_equal("Ok", svc.receive_push) + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_error_401 + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + [401, {}] + end + + svc = service :push, data_my_repo, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_error_404 + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + [404, {}] + end + + svc = service :push, data_my_repo, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def test_triggers_scanning_error_other + @stubs.post "/foo/rest-service-fecru/admin/repositories-v1/myRepo/scan" do |env| + [409, {}] + end + + svc = service :push, data_my_repo, payload + + assert_raises Service::ConfigurationError do + svc.receive_push + end + + @stubs.verify_stubbed_calls + end + + def service(*args) + super Service::FishEye, *args + end + +end + + diff --git a/test/flowdock_test.rb b/test/flowdock_test.rb new file mode 100644 index 000000000..a393a6f5f --- /dev/null +++ b/test/flowdock_test.rb @@ -0,0 +1,36 @@ +require File.expand_path('../helper', __FILE__) + +class FlowdockTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @tokens = "token1,token2" + end + + def test_push + @stubs.post "/v1/github/#{@tokens}" do |env| + assert_match /json/, env[:request_headers]['content-type'] + assert_equal push_payload, JSON.parse(env[:body]) + [200, {}, ''] + end + + svc = service( + {'token' => @tokens}, push_payload) + svc.receive_event + end + + def test_token_sanitization + @stubs.post "/v1/github/#{@tokens}" do |env| + assert_equal payload, JSON.parse(env[:body]) + [200, {}, ''] + end + + svc = service( + {'token' => " " + @tokens + " "}, payload) + svc.receive_event + end + + def service(*args) + super Service::Flowdock, *args + end +end + diff --git a/test/fog_bugz_test.rb b/test/fog_bugz_test.rb new file mode 100644 index 000000000..15a2de1e2 --- /dev/null +++ b/test/fog_bugz_test.rb @@ -0,0 +1,56 @@ +require File.expand_path('../helper', __FILE__) + +class FogBugzTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/fb?" + url << "ixBug=1&" + url << "ixRepository=r&" + url << "sFile=master%2Flib%2Fgrit%2Fgrit.rb&" + url << "sNew=06f63b43050935962f84fe54473a7c5de7977325&" + url << "sPrev=4c8124ffcf4039d292442eeccabdeca5af5c5017" + + @stubs.get url do |env| + [200, {}, ''] + end + + svc = service( + {'cvssubmit_url' => '/fb', 'fb_repoid' => 'r'}, + modified_payload) + svc.receive_push + end + + def test_push_for_fogbugz_6 + @stubs.get '/fb' do |env| + assert_equal '1', env[:params]['ixBug'] + assert_equal 'master/lib/grit/grit.rb', env[:params]['sFile'] + assert_equal '06f63b43050935962f84fe54473a7c5de7977325', env[:params]['sNew'] + assert_equal '4c8124ffcf4039d292442eeccabdeca5af5c5017', env[:params]['sPrev'] + assert_equal 'grit', env[:params]['sRepo'] + [200, {}, ''] + end + + svc = service( + {'cvssubmit_url' => '/fb', 'fb_repoid' => 'r', 'fb_version' => '6'}, + modified_payload) + svc.receive_push + end + + def service(*args) + super Service::FogBugz, *args + end + + def modified_payload + pay = payload + pay['commits'].pop + pay['commits'].pop + pay['commits'][0]['modified'].pop + pay['commits'][0]['modified'].pop + pay + end +end + + diff --git a/test/freckle_test.rb b/test/freckle_test.rb new file mode 100644 index 000000000..7b51eaa79 --- /dev/null +++ b/test/freckle_test.rb @@ -0,0 +1,57 @@ +require File.expand_path('../helper', __FILE__) + +class FreckleTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_subdomain = "test_subdomain" + test_token = "0123456789abcde" + test_project = "Test Project" + + data = { + 'subdomain' => test_subdomain, + 'token' => test_token, + 'project' => test_project + } + + # payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post "/api/github/commits" do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, "#{test_subdomain}.letsfreckle.com" + assert_equal env[:request_headers]['X-FreckleToken'], test_token + assert_equal env[:request_headers]['X-FreckleProject'], test_project + #3 entries + assert_equal 3, body['payload']['commits'].size + + #sends entire commit messages + assert_equal 'stub git call for Grit#heads test f:15 Case#1', body['payload']['commits'][0]['message'] + assert_equal 'clean up heads test f:2hrs', body['payload']['commits'][1]['message'] + + #commit URL valid + assert_equal 'http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325', body['payload']['commits'][0]['url'] + + #author email + assert_equal 'tom@mojombo.com', body['payload']['commits'][0]['author']['email'] + + #timestamp + assert_equal '2007-10-10T00:11:02-07:00', body['payload']['commits'][0]['timestamp'] + + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::Freckle + end +end + + diff --git a/test/gemini_test.rb b/test/gemini_test.rb new file mode 100644 index 000000000..b075e52da --- /dev/null +++ b/test/gemini_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../helper', __FILE__) + +class GeminiTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/gemini/api/github/commit" do |env| + assert_equal 'localhost', env[:url].host + assert_equal 'application/json', env[:request_headers]['content-type'] + [200, {}, ''] + end + + config = {'server_url' => 'http://localhost/gemini', + 'api_key' => '43904539-01DD-48DF-98F3-C887DE833C3H'} + + svc = service(config, payload) + svc.receive_push + end + + def service(*args) + super Service::Gemini, *args + end +end diff --git a/test/gemnasium_test.rb b/test/gemnasium_test.rb new file mode 100644 index 000000000..12cf5120d --- /dev/null +++ b/test/gemnasium_test.rb @@ -0,0 +1,50 @@ +require File.expand_path("../helper", __FILE__) + +class GemnasiumTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_stripped_user + svc = service("user" => " laserlemon ") + assert_equal "laserlemon", svc.user + end + + def test_stripped_token + svc = service("token" => " abc ") + assert_equal "abc", svc.token + end + + def test_downcased_token + svc = service("token" => "ABC") + assert_equal "abc", svc.token + end + + def test_body + svc = service({}, {"pay" => "load"}) + assert_equal '{"pay":"load"}', svc.body + end + + def test_signature + svc = service({"token" => "abc"}, {"pay" => "load"}) + assert_equal "f329edd3feef6b4504c15ee4af6cb65ba28de90ba690001e3a548c5dddf80990", svc.signature + end + + def test_push + svc = service({"user" => "laserlemon", "token" => "abc"}, {"pay" => "load"}) + + @stubs.post "/repositories/hook" do |env| + assert_equal "gemnasium.com", env[:url].host + assert_equal "application/json", env[:request_headers][:content_type] + assert_equal "Basic bGFzZXJsZW1vbjpmMzI5ZWRkM2ZlZWY2YjQ1MDRjMTVlZTRhZjZjYjY1YmEyOGRlOTBiYTY5MDAwMWUzYTU0OGM1ZGRkZjgwOTkw", env[:request_headers][:authorization] + assert_equal '{"pay":"load"}', env[:body] + end + + svc.receive_push + end + + private + def service(data, payload = payload) + super(Service::Gemnasium, data, payload) + end +end diff --git a/test/get_localization_test.rb b/test/get_localization_test.rb new file mode 100644 index 000000000..f620da189 --- /dev/null +++ b/test/get_localization_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../helper', __FILE__) + +class GetLocalizationTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + svc = service({ + 'project_name' => 'n', + 'project_token' => 't'}, 'a' => 1) + + @stubs.post "/services/github/notify/n/t/" do |env| + assert_match /payload=%7B%22a%22%3A1%7D($|\&)/, env[:body] + [200, {}, ''] + end + + svc.receive_push + end + + def service(*args) + super Service::GetLocalization, *args + end +end + diff --git a/test/gitter_test.rb b/test/gitter_test.rb new file mode 100644 index 000000000..fa845470d --- /dev/null +++ b/test/gitter_test.rb @@ -0,0 +1,62 @@ +require File.expand_path('../helper', __FILE__) + +class GitterTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + data = {'token' => "0123456789abcde"} + + svc = service :push, data, push_payload + + @stubs.post "/e/#{data['token']}" do |env| + body = JSON.parse(env[:body]) + + #assert_equal env[:url].host, "webhooks.gitter.im" + assert_equal env[:request_headers]['X-GitHub-Event'], "push" + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_mute_fork + data = {'token' => "0123456789abcde", 'mute_fork' => "1"} + + svc = service :fork, data, basic_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_watch + data = {'token' => "0123456789abcde", 'mute_watch' => "1"} + + svc = service :watch, data, basic_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_comments + data = {'token' => "0123456789abcde", 'mute_comments' => "1"} + + svc = service :issue_comment, data, issue_comment_payload + svc.receive_event + assert @stubs.empty? + end + + def test_mute_wiki + data = {'token' => "0123456789abcde", 'mute_wiki' => "1"} + + svc = service :gollum, data, gollum_payload + svc.receive_event + assert @stubs.empty? + end + + def service_class + Service::Gitter + end +end + diff --git a/test/gocd_test.rb b/test/gocd_test.rb new file mode 100644 index 000000000..d6e4fb167 --- /dev/null +++ b/test/gocd_test.rb @@ -0,0 +1,98 @@ +require File.expand_path('../helper', __FILE__) + +class GoCDTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + end + + def test_push_deleted_branch + @stubs.post "go/api/material/notify/git" do + assert false, "service should not be called for deleted branches" + end + + svc = service :push, data, { "deleted" => true } + svc.receive + end + + def test_requires_base_url + data = self.data.update("base_url" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_repository_url + data = self.data.update("repository_url" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_failed_go_server + svc = service :push, data, payload + def svc.http_post(*args) + raise SocketError, "getaddrinfo: Name or service not known" + end + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_invalid_go_url + @stubs.post "go/api/material/notify/git" do + [404, {}, ""] + end + + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_authorization_passed + @stubs.post "go/api/material/notify/git" do |env| + assert_equal basic_auth(:admin, :badger), env[:request_headers]['authorization'] + [200, {}, ""] + end + + svc = service :push, data, payload + + svc.receive + end + + def test_triggers_build + @stubs.post "go/api/material/notify/git" do |env| + assert_equal "localhost", env[:url].host + assert_equal 8153, env[:url].port + [200, {}, ""] + end + + svc = service :push, data, payload + svc.receive + + @stubs.verify_stubbed_calls + end + + def data + { + "base_url" => "http://localhost:8153", + "repository_url" => "git://github.com/gocd/gocd", + "username" => "admin", + "password" => "badger" + } + end + + def service(*args) + super Service::GoCD, *args + end +end + diff --git a/test/grove_test.rb b/test/grove_test.rb new file mode 100644 index 000000000..b37292b23 --- /dev/null +++ b/test/grove_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class GroveTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @channel_token = "test_token" + end + + def test_push + @stubs.post "/api/services/github/#{@channel_token}" do |env| + assert_equal 'grove.io', env[:url].host + [200, {}, ''] + end + + svc = service( + {'channel_token' => 'test_token'}, payload) + svc.receive_push + end + + def service(*args) + super Service::Grove, *args + end +end + diff --git a/test/habitualist_test.rb b/test/habitualist_test.rb new file mode 100644 index 000000000..f7d3aa879 --- /dev/null +++ b/test/habitualist_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class HabitualistTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/webhooks/github/" do |env| + assert_equal 'habitualist.com', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal 1, JSON.parse(data['payload'])['a'] + [200, {}, ''] + end + + svc = service({}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::Habitualist, *args + end +end + diff --git a/test/harvest_test.rb b/test/harvest_test.rb new file mode 100644 index 000000000..dfdc910b7 --- /dev/null +++ b/test/harvest_test.rb @@ -0,0 +1,58 @@ +require File.expand_path('../helper', __FILE__) + +class HarvestTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.get "/daily" do |env| + assert_equal 'sub.harvestapp.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal 'application/xml', env[:request_headers]["Content-Type"] + assert_equal 'application/xml', env[:request_headers]["Accept"] + assert_equal basic_auth(:rick, :monkey), env[:request_headers]['authorization'] + [200, {}, %( + + + + timer + + notes + 1 + + + + )] + end + + @stubs.post "/daily/update/timer" do |env| + assert_equal 'sub.harvestapp.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal 'application/xml', env[:request_headers]["Content-Type"] + assert_equal 'application/xml', env[:request_headers]["Accept"] + assert_equal basic_auth(:rick, :monkey), env[:request_headers]['authorization'] + assert_match /grit/, env[:body] + assert_match /hours>1<\/hours/, env[:body] + [200, {}, '{}'] + end + + svc = service({ + 'subdomain' => 'sub', + 'username' => 'rick', + 'ssl' => 1, + 'password' => 'monkey' + }, payload) + def svc.shorten_url(*args) + 'short' + end + + svc.receive_push + end + + def service(*args) + super Service::Harvest, *args + end +end + + diff --git a/test/helper.rb b/test/helper.rb new file mode 100644 index 000000000..b88d3d36e --- /dev/null +++ b/test/helper.rb @@ -0,0 +1,101 @@ +require 'minitest/autorun' +require 'minitest/unit' +require 'pp' +require File.expand_path('../../config/load', __FILE__) +Service.load_services + +class Service::TestCase < Minitest::Test + ALL_SERVICES = Service.services.dup + + def test_default + end + + def assert_nothing_raised(*) + yield + end + + def service(klass, event_or_data, data, payload=nil) + event = nil + if event_or_data.is_a?(Symbol) + event = event_or_data + else + payload = data + data = event_or_data + event = :push + end + + service = klass.new(event, data, payload) + service.http :adapter => [:test, @stubs] + service.delivery_guid = "guid-#{rand}" + service + end + + def basic_auth(user, pass) + "Basic " + ["#{user}:#{pass}"].pack("m*").strip + end + + def push_payload + Service::PushHelpers.sample_payload + end + alias payload push_payload + + def pull_payload + Service::PullRequestHelpers.sample_payload + end + + def pull_request_payload + Service::PullRequestHelpers.sample_payload + end + + def pull_request_review_comment_payload + Service::PullRequestReviewCommentHelpers.sample_payload + end + + def issues_payload + Service::IssueHelpers.sample_payload + end + + def issue_comment_payload + Service::IssueCommentHelpers.sample_payload + end + + def commit_comment_payload + Service::CommitCommentHelpers.sample_payload + end + + def public_payload + Service::PublicHelpers.sample_payload + end + + def gollum_payload + Service::GollumHelpers.sample_payload + end + + def basic_payload + Service::HelpersWithMeta.sample_payload + end + + def deployment_payload + Service::DeploymentHelpers.sample_deployment_payload + end + + def status_payload + Service::StatusHelpers.sample_status_payload + end +end + +module Service::HttpTestMethods + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + + def service(event_or_data, data, payload = nil) + super(service_class, event_or_data, data, payload) + end + + def service_class + raise NotImplementedError + end +end + diff --git a/test/heroku_beta_test.rb b/test/heroku_beta_test.rb new file mode 100644 index 000000000..f3347febb --- /dev/null +++ b/test/heroku_beta_test.rb @@ -0,0 +1,207 @@ +require File.expand_path('../helper', __FILE__) + +class HerokuBetaTest < Service::TestCase + include Service::HttpTestMethods + + def heroku_service + data = { + 'name' => 'my-app', + 'heroku_token' => heroku_token, + 'github_token' => github_token + } + + service(:deployment, data, deployment_payload) + end + + def test_unsupported_push_events + data = { 'name' => 'my-app' } + exception = assert_raises(Service::ConfigurationError) do + service(:push, data, push_payload).receive_event + end + + message = "The push event is currently unsupported." + assert_equal message, exception.message + end + + def test_unsupported_status_events + data = { 'name' => 'my-app' } + exception = assert_raises(Service::ConfigurationError) do + service(:status, data, push_payload).receive_event + end + + message = "The status event is currently unsupported." + assert_equal message, exception.message + end + + def test_deployment_configured_properly + stub_heroku_access + stub_github_access + + @stubs.get "/repos/atmos/my-robot/tarball/9be5c2b9" do |env| + [302, {'Location' => 'https://git.io/a'}, ''] + end + + heroku_post_body = { + "source_blob" => { + "url" => "https://git.io/a", + "version" => "master@9be5c2b9" + } + } + + heroku_build_id = SecureRandom.uuid + heroku_build_path = "/apps/my-app/activity/builds/#{heroku_build_id}" + heroku_build_url = "https://dashboard.heroku.com#{heroku_build_path}" + + @stubs.post "/apps/my-app/builds" do |env| + assert_equal 'api.heroku.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal heroku_post_body, JSON.parse(env[:body]) + [200, {}, JSON.dump({'id' => heroku_build_id}) ] + end + + github_post_body = { + "state" => "success", + "target_url" => heroku_build_url, + "description" => "Created by GitHub Services@#{Service.current_sha[0..7]}" + } + + github_deployment_path = "/repos/atmos/my-robot/deployments/721/statuses" + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [200, {}, ''] + end + + heroku_service.receive_event + @stubs.verify_stubbed_calls + end + + def test_deployment_misconfigured + stub_heroku_access + stub_github_access + + @stubs.get "/repos/atmos/my-robot/tarball/9be5c2b9" do |env| + [302, {'Location' => 'https://git.io/a'}, ''] + end + + heroku_post_body = { + "source_blob" => { + "url" => "https://git.io/a", + "version" => "master@9be5c2b9" + } + } + + heroku_build_id = SecureRandom.uuid + heroku_build_path = "/apps/my-app/activity/builds/#{heroku_build_id}" + heroku_build_url = "https://dashboard.heroku.com#{heroku_build_path}" + + @stubs.post "/apps/my-app/builds" do |env| + assert_equal 'api.heroku.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal heroku_post_body, JSON.parse(env[:body]) + [200, {}, JSON.dump({'id' => heroku_build_id}) ] + end + + github_post_body = { + "state" => "success", + "target_url" => heroku_build_url, + "description" => "Created by GitHub Services@#{Service.current_sha[0..7]}" + } + + github_deployment_path = "/repos/atmos/my-robot/deployments/721/statuses" + @stubs.post github_deployment_path do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal github_post_body, JSON.parse(env[:body]) + [404, {}, ''] + end + + exception = assert_raises(Service::ConfigurationError) do + heroku_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to update the deployment status on GitHub with the provided token." + assert_equal message, exception.message + end + + def test_deployment_heroku_misconfigured + stub_heroku_access(404) + + exception = assert_raises(Service::ConfigurationError) do + heroku_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to access my-app on heroku with the provided token." + assert_equal message, exception.message + end + + def test_deployment_with_bad_github_user_credentials + stub_heroku_access + stub_github_user(404) + + exception = assert_raises(Service::ConfigurationError) do + heroku_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to access GitHub with the provided token." + assert_equal message, exception.message + end + + def test_deployment_without_access_to_github_repo + stub_heroku_access + stub_github_access(404) + + exception = assert_raises(Service::ConfigurationError) do + heroku_service.receive_event + end + @stubs.verify_stubbed_calls + + message = "Unable to access the atmos/my-robot repository on GitHub with the provided token." + assert_equal message, exception.message + end + + def service_class + Service::HerokuBeta + end + + def stub_github_user(code = 200) + @stubs.get "/user" do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + [code, {}, ''] + end + end + + def stub_github_access(code = 200, scopes = "repo, gist, user") + stub_github_user + @stubs.get "/repos/atmos/my-robot" do |env| + assert_equal 'api.github.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal "token #{github_token}", env[:request_headers]['Authorization'] + headers = {"X-OAuth-Scopes" => scopes } + [code, headers, ''] + end + end + + def stub_heroku_access(code = 200) + @stubs.get "/apps/my-app" do |env| + assert_equal 'api.heroku.com', env[:url].host + assert_equal 'https', env[:url].scheme + assert_equal Base64.encode64(":#{heroku_token}").strip, env[:request_headers]['Authorization'] + [code, {}, ''] + end + end + + def heroku_token + @heroku_token ||= SecureRandom.hex(24) + end + + def github_token + @github_token ||= SecureRandom.hex(24) + end +end diff --git a/test/hip_chat_test.rb b/test/hip_chat_test.rb new file mode 100644 index 000000000..6a95a793d --- /dev/null +++ b/test/hip_chat_test.rb @@ -0,0 +1,142 @@ +require File.expand_path('../helper', __FILE__) + +class HipChatTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/v1/webhooks/github" do |env| + form = Faraday::Utils.parse_query(env[:body]) + assert_equal simple_payload, JSON.parse(form['payload']) + assert_equal 'a', form['auth_token'] + assert_equal 'r', form['room_id'] + assert_equal nil, form['color'] + [200, {}, ''] + end + + svc = service({'auth_token' => 'a', 'room' => 'r'}, simple_payload) + svc.receive_event + end + + def test_push_different_color + @stubs.post "/v1/webhooks/github" do |env| + form = Faraday::Utils.parse_query(env[:body]) + assert_equal 'purple', form['color'] + [200, {}, ''] + end + + params = {'auth_token' => 'a', 'room' => 'r', 'color' => 'purple'} + svc = service(params, simple_payload) + svc.receive_event + end + + def test_quiet_fork_silences_fork_events + [:fork, :fork_apply].each do |fork_event| + svc = service(fork_event, + default_data_plus('quiet_fork' => '1'), simple_payload ) + assert_nothing_raised { svc.receive_event } + end + end + + def test_quiet_fork_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_fork' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_quiet_watch_silences_watch_events + svc = service(:watch, + default_data_plus('quiet_watch' => '1'), simple_payload) + assert_nothing_raised { svc.receive_event } + end + + def test_quiet_watch_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_watch' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_quiet_comments_silences_comment_events + [:commit_comment, :issue_comment].each do |comment_event| + svc = service(comment_event, + default_data_plus('quiet_comments' => '1'), simple_payload ) + assert_nothing_raised { svc.receive_event } + end + end + + def test_quiet_comments_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_comments' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_quiet_labels_silences_comment_events + [:issue, :pull_request].each do |label_event| + svc = service(label_event, + default_data_plus('quiet_labels' => '1'), actionable_payload('labeled') ) + assert_nothing_raised { svc.receive_event } + end + end + + def test_quiet_labels_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_labels' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_quiet_assigned_silences_comment_events + [:issue, :pull_request].each do |assigned_event| + svc = service(assigned_event, + default_data_plus('quiet_assigning' => '1'), actionable_payload('assigned') ) + assert_nothing_raised { svc.receive_event } + end + end + + def test_quiet_assigned_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_assigning' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def test_quiet_wiki_silences_wiki_events + svc = service(:gollum, + default_data_plus('quiet_wiki' => '1'), simple_payload ) + assert_nothing_raised { svc.receive_event } + end + + def test_quiet_wiki_will_not_silence_other_events + stub_simple_post + svc = service(default_data_plus('quiet_wiki' => '1'), simple_payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service(*args) + super Service::HipChat, *args + end + + def simple_payload + {'a' => 1, 'ref' => 'refs/heads/master'} + end + + def actionable_payload(action = 'labeled') + {'a' => 1, 'ref' => 'refs/heads/master', 'action' => action} + end + + def stub_simple_post + @stubs.post "/v1/webhooks/github" do |env| + [200, {}, ''] + end + end + + def default_data_plus(new_data) + {'auth_token' => 'a', 'room' => 'r'}.merge(new_data) + end +end + diff --git a/test/hostedgraphite.rb b/test/hostedgraphite.rb new file mode 100644 index 000000000..a97373422 --- /dev/null +++ b/test/hostedgraphite.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class HostedGraphiteTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/integrations/github/" + @stubs.post url do |env| + params = Faraday::Utils.parse_query env[:body] + assert_equal 'payload', JSON.parse(params['payload']) + assert_equal 'test', params['api_key'] + [200, {}, ''] + end + + svc = service :push, {'api_key' => 'test'}, 'payload' + svc.receive + end + + def service(*args) + super Service::Hostedgraphite, *args + end +end diff --git a/test/http_post_test.rb b/test/http_post_test.rb new file mode 100644 index 000000000..9dcaed078 --- /dev/null +++ b/test/http_post_test.rb @@ -0,0 +1,118 @@ +require File.expand_path('../helper', __FILE__) + +class HttpPostTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + svc = service(data={ + 'url' => 'http://monkey:secret@abc.com/foo/?a=1', + 'secret' => '' + }, payload) + + @stubs.post "/foo/" do |env| + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization'] + assert_match /json/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_nil env[:url].port + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'a' => '1'}, params) + + body = JSON.parse(env[:body]) + assert_equal data, body['config'] + assert_equal 'push', body['event'] + assert_equal payload, body['payload'] + + assert_nil env[:request_headers]['X-Hub-Signature'] + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_with_ssl + svc = service(data={ + 'url' => 'https://abc.com/foo', + 'secret' => '' + }, payload) + + @stubs.post "/foo/" do |env| + assert_equal 'abc.com', env[:url].host + assert_nil env[:url].port + end + end + + def test_push_without_scheme + svc = service({ + 'url' => 'abc.com/foo/?a=1', + 'secret' => '' + }, payload) + + @stubs.post "/foo/" do |env| + assert_equal 'abc.com', env[:url].host + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_as_json + svc = service({ + 'url' => 'http://monkey:secret@abc.com/foo?a=1', + 'content_type' => 'json' + }, payload) + + @stubs.post "/foo" do |env| + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization'] + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'a' => '1'}, params) + assert_match /json/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_nil env[:request_headers]['X-Hub-Signature'] + + body = JSON.parse(env[:body]) + assert_equal payload, body['payload'] + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_as_json_with_secret + svc = service({ + 'url' => 'http://abc.com/foo', + 'secret' => 'monkey', + 'content_type' => 'json' + }, payload) + + @stubs.post "/foo" do |env| + assert_nil env[:request_headers]['authorization'] + assert_match /json/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_equal 'sha1='+OpenSSL::HMAC.hexdigest(Service::Web::HMAC_DIGEST, + 'monkey', env[:body]), + env[:request_headers]['X-Hub-Signature'] + + body = JSON.parse(env[:body]) + assert_equal payload, body['payload'] + [200, {}, ''] + end + + svc.receive_event + end + + def test_log_message + data = { + 'url' => 'http://abc.com/def', + 'secret' => 'monkey', + 'content_type' => 'json' + } + + svc = service(data, payload) + assert_match /^\[[^\]]+\] 200 #{service_class.hook_name}\/push \{/, svc.log_message(200) + end + + def service_class + Service::HttpPost + end +end + diff --git a/test/huboard_test.rb b/test/huboard_test.rb new file mode 100644 index 000000000..3e84aa9eb --- /dev/null +++ b/test/huboard_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class HuBoardTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_issues + @stubs.post "api/site/webhook/issue" do |env| + assert_equal 'huboard.com', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + service(issues_payload).receive_issues + end + + def test_comment + @stubs.post "api/site/webhook/comment" do |env| + assert_equal 'huboard.com', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + service(issue_comment_payload).receive_issue_comment + end + + def service(payload) + super Service::HuBoard, {}, payload + end +end + diff --git a/test/humbug_test.rb b/test/humbug_test.rb new file mode 100644 index 000000000..a3dae105a --- /dev/null +++ b/test/humbug_test.rb @@ -0,0 +1,45 @@ +require File.expand_path('../helper', __FILE__) + +class HumbugTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def post_checker(event) + return lambda { |env| + assert_equal "https", env[:url].scheme + assert_equal "api.zulip.com", env[:url].host + assert_match "payload=%7B%22test%22%3A%22payload%22%7D", env[:body] + assert_match "email=e", env[:body] + assert_match "api_key=a", env[:body] + assert_match "event=" + event, env[:body] + assert_match "stream=commits", env[:body] + assert_match "branches=b1%2Cb2", env[:body] + return [200, {}, ''] } + end + + def test_push + checker = post_checker "push" + @stubs.post "/v1/external/github", &checker + + svc = service(:push, + {'email' => 'e', 'api_key' => 'a', 'stream' => 'commits', 'branches' => 'b1,b2'}, + {'test' => 'payload'}) + svc.receive_event + end + + def test_pull_request + checker = post_checker "pull_request" + @stubs.post "/v1/external/github", &checker + + svc = service(:pull_request, + {'email' => 'e', 'api_key' => 'a', 'stream' => 'commits', 'branches' => 'b1,b2'}, + {'test' => 'payload'}) + svc.receive_event + end + + def service(*args) + super Service::Humbug, *args + end +end + diff --git a/test/ibm_devops_test.rb b/test/ibm_devops_test.rb new file mode 100644 index 000000000..b6b3f62fb --- /dev/null +++ b/test/ibm_devops_test.rb @@ -0,0 +1,73 @@ +require File.expand_path('../helper', __FILE__) + +class IBMDevOpsServicesTest < Service::TestCase + def setup + @stubs= Faraday::Adapter::Test::Stubs.new + @Pushes= 0 + end + + def test_push + svc = service( + {'ibm_id' => username, + 'ibm_password' => password}, + payload) + + @stubs.post "/manage/processGitHubPayload" do |env| + assert_equal 'hub.jazz.net', env[:url].host + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'auth_type' => 'ibmlogin'}, params) + @Pushes += 1 + [200, {}, ''] + end + svc.receive_push + assert_equal 1, @Pushes + end + + def test_push_empty_server_override + svc = service( + {'ibm_id' => username, + 'ibm_password' => password, + 'override_server_url' => ""}, + payload) + + @stubs.post "/manage/processGitHubPayload" do |env| + assert_equal 'hub.jazz.net', env[:url].host + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'auth_type' => 'ibmlogin'}, params) + @Pushes += 1 + [200, {}, ''] + end + svc.receive_push + assert_equal 1, @Pushes + end + + def test_push_server_override + svc = service( + {'ibm_id' => username, + 'ibm_password' => password, + 'override_server_url' => "https://test.example.org/foo"}, + payload) + + @stubs.post "/foo/processGitHubPayload" do |env| + assert_equal 'test.example.org', env[:url].host + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'auth_type' => 'ibmlogin'}, params) + @Pushes += 1 + [200, {}, ''] + end + svc.receive_push + assert_equal 1, @Pushes + end + + def username + return 'test_user' + end + + def password + return 'test_pass' + end + + def service(*args) + super Service::IBMDevOpsServices, *args + end +end diff --git a/test/icescrum_test.rb b/test/icescrum_test.rb new file mode 100644 index 000000000..c1b93806f --- /dev/null +++ b/test/icescrum_test.rb @@ -0,0 +1,127 @@ +require File.expand_path('../helper', __FILE__) + +class IceScrumTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push_valid + @stubs.post "/a/ws/p/TESTPROJ/commit" do |env| + assert_equal 'www.kagilum.com', env[:url].host + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + body = Faraday::Utils.parse_nested_query(env[:body]) + recv = JSON.parse(body['payload']) + assert_equal payload, recv + [200, {}, ''] + end + + svc = service({ + 'username' => 'u', + 'password' => 'p', + 'project_key' => 'TESTPROJ' + }, payload) + + svc.receive_push + @stubs.verify_stubbed_calls + end + + def test_push_valid_custom_url + @stubs.post "/icescrum/ws/p/TESTPROJ/commit" do |env| + assert_equal 'www.example.com', env[:url].host + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + body = Faraday::Utils.parse_nested_query(env[:body]) + recv = JSON.parse(body['payload']) + assert_equal payload, recv + [200, {}, ''] + end + + svc = service({ + 'username' => 'u', + 'password' => 'p', + 'project_key' => 'TESTPROJ', + 'base_url' => 'http://www.example.com/icescrum' + }, payload) + + svc.receive_push + @stubs.verify_stubbed_calls + end + + def test_push_lowcase_project_key + @stubs.post "/a/ws/p/TESTPROJ/commit" do |env| + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + body = Faraday::Utils.parse_nested_query(env[:body]) + recv = JSON.parse(body['payload']) + assert_equal payload, recv + [200, {}, ''] + end + + svc = service({ + 'username' => 'u', + 'password' => 'p', + 'project_key' => 'testProj' + }, payload) + + svc.receive_push + @stubs.verify_stubbed_calls + end + +def test_push_whitespace_project_key + @stubs.post "/a/ws/p/TESTPROJ/commit" do |env| + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + body = Faraday::Utils.parse_nested_query(env[:body]) + recv = JSON.parse(body['payload']) + assert_equal payload, recv + [200, {}, ''] + end + + svc = service({ + 'username' => ' u ', + 'password' => ' p ', + 'project_key' => ' TEST PROJ ' + }, payload) + + svc.receive_push + @stubs.verify_stubbed_calls + end + + def test_push_missing_username + svc = service({ + 'password' => 'p', + 'project_key' => 'TESTPROJ' + }, payload) + + assert_raises Service::ConfigurationError do + svc.receive_push + end + end + + def test_push_missing_password + svc = service({ + 'username' => 'u', + 'project_key' => 'TESTPROJ' + }, payload) + + assert_raises Service::ConfigurationError do + svc.receive_push + end + end + + def test_push_missing_project_key + svc = service({ + 'username' => 'u', + 'password' => 'p', + }, payload) + + assert_raises Service::ConfigurationError do + svc.receive_push + end + end + + def service(*args) + super Service::IceScrum, *args + end +end + + + + diff --git a/test/irc_test.rb b/test/irc_test.rb new file mode 100644 index 000000000..cd86bb88f --- /dev/null +++ b/test/irc_test.rb @@ -0,0 +1,344 @@ +require File.expand_path('../helper', __FILE__) +require 'stringio' + +class IRCTest < Service::TestCase + class FakeIRC < Service::IRC + def readable_irc + nick = data['nick'] + @readable_irc ||= StringIO.new(" 004 #{nick} \r\n:NickServ!nickserv@network.net PRIVMSG #{nick} :Successfully authenticated as #{nick}.\r\n") + end + + def writable_irc + @writable_irc ||= StringIO.new + end + + def irc_eof? + true + end + + def shorten_url(*args) + 'short' + end + end + + def test_push + expected = [ + "NICK n", + "USER n", + "JOIN #r", + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + "PART #r", + "QUIT" + ] + + svc = service({'room' => 'r', 'nick' => 'n'}, payload) + + svc.receive_push + assert_irc_commands expected, svc.writable_irc.string + assert_equal 1, svc.remote_calls.size + + svc.remote_calls.each do |text| + incoming, outgoing = split_irc_debug(text) + modified = expected.dup + modified.unshift 'IRC Log:' + + assert_irc_commands ['004 n'], incoming + assert_irc_commands modified, outgoing + end + end + + def test_push_with_password + expected = [ + "PASS pass", + "NICK n", + "USER n", + "JOIN #r", + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + "PART #r", + "QUIT" + ] + + svc = service({'room' => 'r', 'nick' => 'n', 'password' => 'pass'}, payload) + + svc.receive_push + assert_irc_commands expected, svc.writable_irc.string + assert_equal 1, svc.remote_calls.size + + svc.remote_calls.each do |text| + incoming, outgoing = split_irc_debug(text) + censored = expected.dup + censored[0] = 'PASS ****' + censored.unshift 'IRC Log:' + + assert_irc_commands ['004 n'], incoming + assert_irc_commands censored, outgoing + end + end + + def test_push_with_nickserv + expected = [ + "NICK n", + "USER n", + "PRIVMSG NICKSERV :IDENTIFY pass", + "JOIN #r", + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + /PRIVMSG #r.*grit/, + "PART #r", + "QUIT" + ] + expected_incoming = [ + '004 n', + ':NickServ!nickserv@network.net PRIVMSG n :Successfully authenticated as n.' + ] + + svc = service({'room' => 'r', 'nick' => 'n', 'nickserv_password' => 'pass'}, payload) + + svc.receive_push + assert_irc_commands expected, svc.writable_irc.string + assert_equal 1, svc.remote_calls.size + + svc.remote_calls.each do |text| + incoming, outgoing = split_irc_debug(text) + censored = expected.dup + censored[2] = "PRIVMSG NICKSERV :IDENTIFY ****" + censored.unshift 'IRC Log:' + + assert_irc_commands expected_incoming, incoming + assert_irc_commands censored, outgoing + end + end + + def test_push_with_empty_branches + svc = service({'room' => 'r', 'nick' => 'n', 'branches' => ''}, payload) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_push_with_single_matching_branches + svc = service({'room' => 'r', 'nick' => 'n', 'branches' => 'master'}, payload) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_push_with_multiple_branches + svc = service({'room' => 'r', 'nick' => 'n', 'branches' => 'master,ticket'}, payload) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_commit_comment + svc = service(:commit_comment, {'room' => 'r', 'nick' => 'n'}, commit_comment_payload) + + svc.receive_commit_comment + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_pull_request + svc = service(:pull_request, {'room' => 'r', 'nick' => 'n'}, pull_payload) + + svc.receive_pull_request + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_issues + svc = service(:issues, {'room' => 'r', 'nick' => 'n'}, issues_payload) + + svc.receive_issues + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_issue_comment + svc = service(:issue_comment, {'room' => 'r', 'nick' => 'n'}, issue_comment_payload) + + svc.receive_issue_comment + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_pull_request_review_comment + svc = service(:pull_request_review_comment, {'room' => 'r', 'nick' => 'n'}, pull_request_review_comment_payload) + + svc.receive_pull_request_review_comment + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*grit.*pull request #5 /, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_gollum + svc = service(:gollum, {'room' => 'r', 'nick' => 'n'}, gollum_payload) + + svc.receive_gollum + msgs = svc.writable_irc.string.split("\n") + assert_equal "NICK n", msgs.shift + assert_match /USER n . . :[^-]+- \w+(\/\w+)?/, msgs.shift + assert_equal "JOIN #r", msgs.shift.strip + assert_match /PRIVMSG #r.*\[grit\] defunkt created wiki page Foo/, msgs.shift + assert_equal "PART #r", msgs.shift.strip + assert_equal "QUIT", msgs.shift.strip + assert_nil msgs.shift + end + + def test_default_port_with_ssl + svc = service({'ssl' => '1'}, payload) + assert_equal 6697, svc.port + end + + def test_default_port_no_ssl + svc = service({'ssl' => '0'}, payload) + assert_equal 6667, svc.port + end + + def test_default_port_with_empty_string + svc = service({'port' => ''}, payload) + assert_equal 6667, svc.port + end + + def test_overridden_port + svc = service({'port' => '1234'}, payload) + assert_equal 1234, svc.port + end + + def test_no_colors + # Default should include color + svc = service(:pull_request, {'room' => 'r', 'nick' => 'n'}, pull_payload) + + svc.receive_pull_request + msgs = svc.writable_irc.string.split("\n") + privmsg = msgs[3] # skip NICK, USER, JOIN + assert_match /PRIVMSG #r.*grit/, privmsg + assert_match /\003/, privmsg + + # no_colors should strip color + svc = service(:pull_request, {'room' => 'r', 'nick' => 'n', 'no_colors' => '1'}, pull_payload) + + svc.receive_pull_request + msgs = svc.writable_irc.string.split("\n") + privmsg = msgs[3] # skip NICK, USER, JOIN + assert_match /PRIVMSG #r.*grit/, privmsg + refute_match /\003/, privmsg + end + + def test_public_repo_format_in_irc_realname + svc = service({'room' => 'r', 'nick' => 'n'}, payload) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + + assert_includes msgs, "USER n 8 * :GitHub IRCBot - mojombo/grit" + end + + def test_private_repo_format_in_irc_realname + payload_copy = payload + payload_copy["repository"]["private"] = true + svc = service({'room' => 'r', 'nick' => 'n'}, payload_copy) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + + assert_includes msgs, "USER n 8 * :GitHub IRCBot - mojombo" + end + + def test_nil_private_repo_format_in_irc_realname + payload_copy = payload + payload_copy["repository"]["private"] = nil + svc = service({'room' => 'r', 'nick' => 'n'}, payload_copy) + + svc.receive_push + msgs = svc.writable_irc.string.split("\n") + + assert_includes msgs, "USER n 8 * :GitHub IRCBot - mojombo" + end + + def service(*args) + super FakeIRC, *args + end + + def assert_irc_commands(expected, text) + lines = text.split("\n") + expected.each do |line| + assert_match line, lines.shift + end + assert_nil lines.shift + end + + def split_irc_debug(text) + all_lines = text.split("\n") + incoming, outgoing = all_lines.partition { |l| l =~ /^\=/ } + incoming.each { |s| s.sub!(/^\=\> /, '') } + outgoing.each { |s| s.sub!(/^\>\> /, '') } + [incoming.join("\n"), outgoing.join("\n")] + end +end diff --git a/test/irker_test.rb b/test/irker_test.rb new file mode 100644 index 000000000..1296c63cd --- /dev/null +++ b/test/irker_test.rb @@ -0,0 +1,96 @@ +require File.expand_path('../helper', __FILE__) +require 'json' + +class IrkerTest < Service::TestCase + class FakeIrkerd + def initialize + @messages = [] + end + def puts(message) + @messages << message + end + def messages + @messages + end + end + def setup + @server = FakeIrkerd.new + end + + def test_push + payload = { "repository" => "repository", "commits" => [{ "message" => "commitmsg", "author" => {"name" => "authorname"}, "id" => "8349815fed9", "modified" => ["foo", "bar", "baz"], "added" => [], "removed" => [] }] } + svc = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/##github-irker", 'project' => 'abc', 'long_url'=>1}, payload) + svc.irker_con = @server + svc.receive_push + + assert msg = @server.messages.shift + to_irker = JSON.parse(msg) + target = to_irker["to"] + if target.kind_of?(Array) then + assert_equal target.size, 1 + target = target[0] + end + assert_equal target, "irc://chat.freenode.net/##github-irker" + assert_match 'abc', to_irker["privmsg"] + assert_match 'authorname', to_irker["privmsg"] + assert_match '834981', to_irker["privmsg"] + assert_match 'commitmsg', to_irker["privmsg"] + end + + def test_channels + payload = { "repository" => "repository", "commits" => [{ "message" => "commitmsg", "author" => {"name" => "authorname"}, "id" => "8349815fed9", "modified" => ["foo", "bar", "baz"], "added" => [], "removed" => [] }] } + svc = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/#commits;irc://chat.freenode.net/#irker;irc://chat.freenode.net/testuser,isnick", 'project' => 'abc', 'long_url' => 1}, payload) + svc.irker_con = @server + svc.receive_push + + assert msg = @server.messages.shift + to_irker = JSON.parse(msg) + assert_equal to_irker["to"].sort, ["irc://chat.freenode.net/#commits", "irc://chat.freenode.net/#irker", "irc://chat.freenode.net/testuser,isnick"].sort + end + + def test_multiline + payload = { "repository" => "repository", "commits" => [{ "message" => "very\nlong\nmessage", "author" => {"name" => "authorname"}, "id" => "8349815fed9", "modified" => ["foo", "bar", "baz"], "added" => [], "removed" => [] }] } + svc_short = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/##github-irker", 'project' => 'abc', 'long_url'=>1, 'full_commits'=>0}, payload) + svc_long = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/##github-irker", 'project' => 'abc', 'long_url'=>1, 'full_commits'=>1}, payload) + svc_long.irker_con = svc_short.irker_con = @server + + svc_short.receive_push + assert_equal @server.messages.size, 1 + @server.messages.shift + assert_equal @server.messages.size, 0 + + svc_long.receive_push + assert_equal @server.messages.size, 1 + assert msg = @server.messages.shift + to_irker = JSON.parse(msg) + assert_equal to_irker["privmsg"].scan("\n").size, 3 + end + + def test_duplicates + payload = { "repository" => "repository", "commits" => [{ "message" => "msg", "author" => {"name" => "authorname"}, "id" => "3ef829ad", "modified" => ["foo", "bar"], "added" => ["foo"], "removed" => ["bar"] }] } + svc = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/#commits", 'project' => 'abc', 'long_url' => 1}, payload) + svc.irker_con = @server + svc.receive_push + + assert msg = @server.messages.shift + to_irker = JSON.parse(msg) + assert_equal to_irker["privmsg"].scan("foo").size, 1 + assert_equal to_irker["privmsg"].scan("bar").size, 1 + end + + def test_file_consolidation + payload = { "repository" => "repository", "commits" => [{ "message" => "commitmsg", "author" => {"name" => "authorname"}, "id" => "8349815fed9", "modified" => ["foo/a/bar/baz/andsomemore/filenumberone.hpp", "foo/a/bar/baz/andsomemore/filenumbertwo.hpp", "foo/b/quuuuuuuuuuuux/filenumberthree.cpp", "foo/b/quuuuuuuuuuuux/filenumberfour.cpp", "foo/b/bar/baz/andsomemore/filenumberfive.cpp", "foo/b/bar/baz/andsomemore/filenumbersix.cpp", "foo/b/filenumberseven.cpp"], "added" => [], "removed" => [] }] } + svc = service({'address' => "localhost", "channels" => "irc://chat.freenode.net/#commits;irc://chat.freenode.net/#irker;irc://chat.freenode.net/testuser,isnick", 'project' => 'abc', 'long_url' => 1}, payload) + svc.irker_con = @server + svc.receive_push + + assert msg = @server.messages.shift + end + + def service(*args) + super Service::Irker, *args + end +end + + + diff --git a/test/iron_mq_test.rb b/test/iron_mq_test.rb new file mode 100644 index 000000000..22bf9279f --- /dev/null +++ b/test/iron_mq_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../helper', __FILE__) + +class IronMQTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/v1/webhooks/github" do |env| + form = Faraday::Utils.parse_query(env[:body]) + p form + assert_equal payload, JSON.parse(form['payload']) + assert_equal 't', form['token'] + assert_equal '123', form['project_id'] + [200, {}, ''] + end + + token = 'x' + project_id = '111122223333444455556666' + svc = service( + { + 'token' => token, + 'project_id' => project_id + }, + payload) + data, payload, resp = svc.receive_event + assert_equal token, data['token'] + assert_equal project_id, data['project_id'] + assert_equal 200, resp.code + end + + def service(*args) + super Service::IronMQ, *args + end +end diff --git a/test/iron_worker_test.rb b/test/iron_worker_test.rb new file mode 100644 index 000000000..dd3004b30 --- /dev/null +++ b/test/iron_worker_test.rb @@ -0,0 +1,38 @@ +require File.expand_path('../helper', __FILE__) + +class IronWorkerTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/v1/webhooks/github" do |env| + form = Rack::Utils.parse_query(env[:body]) + p form + assert_equal payload, JSON.parse(form['payload']) + assert_equal 't', form['token'] + assert_equal '123', form['project_id'] + [200, {}, ''] + end + + token = 'x' + project_id = '111122223333444455556666' + code_name = 'fake_code_name' + svc = service( + { + 'token' => token, + 'project_id' => project_id, + 'code_name' => code_name + }, + payload) + data, payload, resp = svc.receive_event + assert_equal token, data['token'] + assert_equal project_id, data['project_id'] + assert_equal code_name, data['code_name'] + assert_equal 200, resp.code + end + + def service(*args) + super Service::IronWorker, *args + end +end diff --git a/test/jaconda_test.rb b/test/jaconda_test.rb new file mode 100644 index 000000000..ac3ac8afc --- /dev/null +++ b/test/jaconda_test.rb @@ -0,0 +1,27 @@ +require File.expand_path('../helper', __FILE__) + +class JacondaTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/v2/rooms/r/notify/github.json" do |env| + assert_equal 's.jaconda.im', env[:url].host + assert_equal basic_auth(:rt, :X), env[:request_headers]['authorization'] + assert_match /(^|\&)payload=%7B%22a%22%3A1%7D($|\&)/, env[:body] + assert_match "digest=d", env[:body] + [200, {}, ''] + end + + svc = service(:push, + { 'subdomain' => 's', 'digest' => 'd', + 'room_id' => 'r', 'room_token' => 'rt'}, 'a' => 1) + svc.receive_event + end + + def service(*args) + super Service::Jaconda, *args + end +end + diff --git a/test/jenkins_git_test.rb b/test/jenkins_git_test.rb new file mode 100644 index 000000000..ae7d5e0f1 --- /dev/null +++ b/test/jenkins_git_test.rb @@ -0,0 +1,40 @@ +require File.expand_path('../helper', __FILE__) + +class JenkinsGitTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @options = {'jenkins_url' => 'http://monkey:secret@jenkins.example.com/jenkins/'} + end + + def test_push + @stubs.get "/jenkins/git/notifyCommit" do |env| + assert_equal 'jenkins.example.com', env[:url].host + + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization'] + + params = Faraday::Utils.parse_nested_query(env[:url].query) + expected_params = { + 'url' => 'http://github.com/mojombo/grit', + 'branches' => 'master', + 'from' => 'github' + } + assert_equal(expected_params, params) + + [200, {}, ''] + end + + service(@options, payload).receive_push + + @stubs.verify_stubbed_calls + end + + def test_no_jenkins_hook_url + assert_raises Service::ConfigurationError do + service({'jenkins_url' => ''}, payload).receive_push + end + end + + def service(*args) + super Service::JenkinsGit, *args + end +end diff --git a/test/jenkins_github_test.rb b/test/jenkins_github_test.rb new file mode 100644 index 000000000..f959a79e1 --- /dev/null +++ b/test/jenkins_github_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class JenkinsGitHubTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/github-webhook/" do |env| + assert_equal 'jenkins.example.com', env[:url].host + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', + env[:request_headers]['authorization'] + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + svc = service :push, + {'jenkins_hook_url' => 'http://monkey:secret@jenkins.example.com/github-webhook/'}, payload + svc.receive_push + end + + def test_no_jenkins_hook_url + assert_raises Service::ConfigurationError do + svc = service :push, + {'jenkins_hook_url' => ''}, payload + svc.receive_push + end + end + + def service(*args) + super Service::JenkinsGitHub, *args + end +end diff --git a/test/jira_test.rb b/test/jira_test.rb new file mode 100644 index 000000000..676dbed16 --- /dev/null +++ b/test/jira_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../helper', __FILE__) + +class JIRATest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/a/rest/api/a/issue/1/transitions" do |env| + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal 'foo.com', env[:url].host + [200, {}, ''] + end + + svc = service( + {'server_url' => 'http://foo.com/a', 'username' => 'u', 'password' => 'p', + 'api_version' => 'a'}, + payload) + svc.receive_push + end + + def service(*args) + super Service::JIRA, *args + end +end diff --git a/test/kanbanery_test.rb b/test/kanbanery_test.rb new file mode 100644 index 000000000..b1a3c539d --- /dev/null +++ b/test/kanbanery_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class KanbaneryTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = '/api/v1/projects/123/git_commits' + @stubs.post url do |env| + assert_equal %({"a":1}), env[:body] + assert_equal 'a1b2c3', env[:request_headers]['X-Kanbanery-ProjectGitHubToken'] + assert_equal 'application/json', env[:request_headers]['Content-Type'] + [200, {}, ''] + end + + svc = service({'project_id' => '123', 'project_token' => 'a1b2c3'}, 'a' => 1) + svc.receive_push + end + + def service(*args) + super Service::Kanbanery, *args + end +end diff --git a/test/kanbanize_test.rb b/test/kanbanize_test.rb new file mode 100644 index 000000000..0022895eb --- /dev/null +++ b/test/kanbanize_test.rb @@ -0,0 +1,65 @@ +require File.expand_path('../helper', __FILE__) + +class KanbanizeTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = '/index.php/api/kanbanize/git_hub_event' + @stubs.post url do |env| + assert_equal 'testdomain.kanbanize.com', env[:url].host + assert_equal '/index.php/api/kanbanize/git_hub_event', env[:url].request_uri + assert_equal %({"ref":"refs/heads/master"}), env[:body] + assert_equal 'a1b2c3==', env[:request_headers]['apikey'] + assert_equal '', env[:request_headers]['branch-filter'] + assert_equal false, env[:request_headers]['last-commit'] + assert_equal false, env[:request_headers]['track-issues'] + assert_equal '', env[:request_headers]['board-id'] + [200, {}, ''] + end + + svc = service({'kanbanize_domain_name' => 'testdomain.kanbanize.com', 'kanbanize_api_key' => 'a1b2c3=='}, {'ref' => 'refs/heads/master'}) + svc.receive_event + end + + def test_push_with_restrictions + url = '/index.php/api/kanbanize/git_hub_event' + @stubs.post url do |env| + assert_equal 'testdomain.kanbanize.com', env[:url].host + assert_equal '/index.php/api/kanbanize/git_hub_event', env[:url].request_uri + assert_equal %({"ref":"refs/heads/mybranch2"}), env[:body] + assert_equal 'a1b2c3==', env[:request_headers]['apikey'] + assert_equal 'mybranch1,mybranch2', env[:request_headers]['branch-filter'] + assert_equal true, env[:request_headers]['last-commit'] + assert_equal false, env[:request_headers]['track-issues'] + assert_equal '', env[:request_headers]['board-id'] + [200, {}, ''] + end + + svc = service({'kanbanize_domain_name' => 'testdomain.kanbanize.com', 'kanbanize_api_key' => 'a1b2c3==', 'restrict_to_branch' => 'mybranch1,mybranch2', 'restrict_to_last_commit' => '1'}, {'ref' => 'refs/heads/mybranch2'}) + svc.receive_event + end + + def test_push_with_issue_tracking + url = '/index.php/api/kanbanize/git_hub_event' + @stubs.post url do |env| + assert_equal 'testdomain.kanbanize.com', env[:url].host + assert_equal '/index.php/api/kanbanize/git_hub_event', env[:url].request_uri + assert_equal %({"action":"created"}), env[:body] + assert_equal 'a1b2c3==', env[:request_headers]['apikey'] + assert_equal '', env[:request_headers]['branch-filter'] + assert_equal false, env[:request_headers]['last-commit'] + assert_equal true, env[:request_headers]['track-issues'] + assert_equal '131', env[:request_headers]['board-id'] + [200, {}, ''] + end + + svc = service(:issues, {'kanbanize_domain_name' => 'testdomain.kanbanize.com', 'kanbanize_api_key' => 'a1b2c3==', 'track_project_issues_in_kanbanize' => '1', 'project_issues_board_id' => '131'}, {'action' => 'created'}) + svc.receive_event + end + + def service(*args) + super Service::Kanbanize, *args + end +end diff --git a/test/landscape_test.rb b/test/landscape_test.rb new file mode 100644 index 000000000..a4051718f --- /dev/null +++ b/test/landscape_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class LandscapeTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + data = {} + payload = { + 'commits'=>[{'id'=>'test'}], + 'repository'=>{'id'=>'repoid'} + } + + svc = service(data, payload) + + @stubs.post "/hooks/github" do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, "landscape.io" + assert_equal 'test', body['payload']['commits'][0]['id'] + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + assert_equal 'repoid', body['payload']['repository']['id'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + def service_class + Service::Landscape + end +end + diff --git a/test/leanpub_test.rb b/test/leanpub_test.rb new file mode 100644 index 000000000..d2a336f30 --- /dev/null +++ b/test/leanpub_test.rb @@ -0,0 +1,33 @@ +require File.expand_path('../helper', __FILE__) + +class LeanpubTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_api_key = "123abc" + test_slug = "myamazingbook" + + data = { + 'api_key' => test_api_key, + 'slug' => test_slug + } + + payload = {} + svc = service(data, payload) + + @stubs.post "/#{test_slug}/preview?api_key=#{test_api_key}" do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, "leanpub.com" + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::Leanpub + end +end diff --git a/test/lighthouse_test.rb b/test/lighthouse_test.rb new file mode 100644 index 000000000..4839ea456 --- /dev/null +++ b/test/lighthouse_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class LighthouseTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/projects/1/changesets.xml" do |env| + assert_equal 'application/xml', env[:request_headers]['Content-Type'] + assert_equal 's.lighthouseapp.com', env[:url].host + [200, {}, ''] + end + + svc = service( + {'subdomain' => 's', 'project_id' => '1'}, payload) + svc.receive_push + end + + def service(*args) + super Service::Lighthouse, *args + end +end + diff --git a/test/lingohub_test.rb b/test/lingohub_test.rb new file mode 100644 index 000000000..04c767f04 --- /dev/null +++ b/test/lingohub_test.rb @@ -0,0 +1,41 @@ +require File.expand_path('../helper', __FILE__) + +class LingohubTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_http_call + @stubs.post "/github_callback" do |env| + assert_equal 'lingohub.com', env[:url].host + assert_equal 'a27f34', env[:params]['auth_token'] + + [200, {}, ''] + end + + svc = service({'project_token' => 'a27f34'}, :a => 1) + svc.receive_push + end + + def test_payload + @stubs.post "/github_callback" do |env| + + body = Faraday::Utils.parse_nested_query(env[:body]) + received_payload = JSON.parse(body['payload']) + + assert_equal payload['after'], received_payload['after'] + + [200, {}, ''] + end + + svc = service({'project_token' => 'a27f34'}, payload) + svc.receive_push + end + + + + def service(*args) + super Service::Lingohub, *args + end +end + diff --git a/test/mantis_bt_test.rb b/test/mantis_bt_test.rb new file mode 100644 index 000000000..6a76f1141 --- /dev/null +++ b/test/mantis_bt_test.rb @@ -0,0 +1,27 @@ +require File.expand_path('../helper', __FILE__) + +class MantisBTTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/abc/plugin.php" do |env| + assert_equal 'abc.com', env[:url].host + assert_equal 'Source/checkin', env[:params]['page'] + assert_equal 'key', env[:params]['api_key'] + assert_match 'payload=%7B%22a%22%3A1%7D', env[:body] + [200, {}, ''] + end + + svc = service( + {'url' => 'http://abc.com/abc/', 'api_key' => 'key'}, + :a => 1) + svc.receive_push + end + + def service(*args) + super Service::MantisBT, *args + end +end + diff --git a/test/maxcdn_test.rb b/test/maxcdn_test.rb new file mode 100644 index 000000000..fb81e5571 --- /dev/null +++ b/test/maxcdn_test.rb @@ -0,0 +1,108 @@ +require File.expand_path("../helper", __FILE__) + +# stub +require "maxcdn" +module MaxCDN + class Client + def initialize *args + @purge_calls = 0 + @fake_error = false + end + + def purge id + raise ::MaxCDN::APIException.new("test error") if @fake_error + + @purge_calls += 1 + return { "code" => "200" } + end + + def fake_error + @fake_error = true + end + end +end + +class MaxCDNTest < Service::TestCase + def setup + @arguments ||= { + "alias" => "foobar_alias", + "key" => "foobar_key", + "secret" => "foobar_secret", + "zone_id" => 123456, + "static_only" => '0' + } + + @svc = service(@arguments, dynamic_payload) + end + + def test_maxcdn + assert @svc.maxcdn + end + + def test_extensions + assert_includes @svc.extensions, :js + end + + def test_has_static? + refute @svc.has_static? + + svc = service(@arguments, static_payload) + assert svc.has_static? + end + + def test_receive_push + assert @svc.receive_push + assert_equal 1, @svc.maxcdn.instance_variable_get(:@purge_calls) + + @svc.maxcdn.fake_error + error = assert_raises ::Service::ConfigurationError do + @svc.receive_push + end + + assert_match /test error/, error.message + + arguments = @arguments.clone + arguments["static_only"] = '1' + svc = service(arguments, payload) + + refute svc.receive_push + + arguments = @arguments.clone + arguments["static_only"] = '1' + svc = service(arguments, static_payload) + + assert svc.receive_push + end + + def dynamic_payload + unless defined? @dynamic_payload + # Default payload is all .rb files and thus, a + # non-static payload. However, to be sure (should + # something change in the future) I'll ensure it. + @dynamic_payload = payload.clone + @dynamic_payload["commits"].each_index do |commit| + @dynamic_payload["commits"][commit]["modified"].each_index do |file| + @dynamic_payload["commits"][commit]["modified"][file].gsub!(/\.[a-z0-9]+$/, ".rb") + end + end + end + @dynamic_payload + end + + def static_payload + unless defined? @static_payload + # Creating a static payload, by replacing a single + # file in the payload with a static file extension. + @static_payload = payload.clone + @static_payload["commits"] + .first["modified"] + .last + .gsub!(/\.[a-z0-9]+$/, ".js") + end + @static_payload + end + + def service(*args) + super Service::MaxCDN, *args + end +end diff --git a/test/mqtt_test.rb b/test/mqtt_test.rb new file mode 100644 index 000000000..cf55cb244 --- /dev/null +++ b/test/mqtt_test.rb @@ -0,0 +1,17 @@ +require File.expand_path('../helper', __FILE__) + +class MqttPubTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + skip "Temporarily disabled as the q.m2m.io host is returning 503 errors" + svc = service :push, {'broker' => 'q.m2m.io','port' => '1883', 'id' => 'github', 'topic' => 'github/franklovecchio/github-services'}, 'payload' + svc.receive + end + + def service(*args) + super Service::MqttPub, *args + end +end diff --git a/test/myget_test.rb b/test/myget_test.rb new file mode 100644 index 000000000..440f1054a --- /dev/null +++ b/test/myget_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../helper', __FILE__) + +class MyGetTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_hook_url = "https://www.myget.org/BuildSource/Hook/feedname?identifier=guid" + test_hook_pathandquery = "/BuildSource/Hook/feedname?identifier=guid" + + data = { + 'hook_url' => test_hook_url + } + + payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post "#{test_hook_pathandquery}" do |env| + body = JSON.parse(env[:body]) + + assert_equal 'test', body['payload']['commits'][0]['id'] + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [201, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::MyGet + end +end + diff --git a/test/obs_test.rb b/test/obs_test.rb new file mode 100644 index 000000000..ecde8abc0 --- /dev/null +++ b/test/obs_test.rb @@ -0,0 +1,126 @@ +require File.expand_path('../helper', __FILE__) + +class ObsTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def single_token_data + { + # service works with all current OBS 2.5 instances + "url" => "http://api.opensuse.org:443", + "token" => "github/test/token/string", + # optional + "project" => "home:adrianSuSE", + "package" => "4github", + } + end + + def multi_token_data + { + # service works with all current OBS 2.5 instances + "url" => "http://api.opensuse.org:443", + "token" => "github/test/token/one, github/test/token/two", + # optional + "project" => "home:adrianSuSE", + "package" => "4github", + } + end + + def filter_data + { + "url" => "http://api.opensuse.org:443", + "token" => "github/test/token/string", + "project" => "home:adrianSuSE", + "package" => "4github", + "refs" => "refs/tags/version-*:refs/heads/production", + } + end + + def test_push_single_token + apicall = "/trigger/runservice" + @stubs.post apicall do |env| + assert_equal 'api.opensuse.org', env[:url].host + params = Faraday::Utils.parse_query env[:body] + assert_equal 'Token github/test/token/string', env[:request_headers]["Authorization"] + assert_equal '/trigger/runservice', env[:url].path + assert_equal 'package=4github&project=home%3AadrianSuSE', env[:url].query + [200, {}, ''] + end + + svc = service :push, single_token_data, payload + svc.receive + end + + def test_push_multi_token + apicall = "/trigger/runservice" + match = 0 + @stubs.post apicall do |env| + assert_equal 'api.opensuse.org', env[:url].host + params = Faraday::Utils.parse_query env[:body] + match=match+1 if ['Token github/test/token/one', 'Token github/test/token/two'].include? env[:request_headers]["Authorization"] + assert_equal '/trigger/runservice', env[:url].path + assert_equal 'package=4github&project=home%3AadrianSuSE', env[:url].query + [200, {}, ''] + end + + svc = service :push, multi_token_data, payload + svc.receive + # both tokens received + assert_equal match, 2 + end + + def test_filter_passed_by_tag + apicall = "/trigger/runservice" + @stubs.post apicall do |env| + assert_equal 'api.opensuse.org', env[:url].host + params = Faraday::Utils.parse_query env[:body] + assert_equal 'Token github/test/token/string', env[:request_headers]["Authorization"] + assert_equal '/trigger/runservice', env[:url].path + assert_equal 'package=4github&project=home%3AadrianSuSE', env[:url].query + [200, {}, ''] + end + + # Modify the payload to match the filter. + pay = payload + pay['ref'] = 'refs/tags/version-1.1' + + svc = service :push, filter_data, pay + assert svc.receive + @stubs.verify_stubbed_calls + end + + def test_filter_passed_by_branch + apicall = "/trigger/runservice" + @stubs.post apicall do |env| + assert_equal 'api.opensuse.org', env[:url].host + params = Faraday::Utils.parse_query env[:body] + assert_equal 'Token github/test/token/string', env[:request_headers]["Authorization"] + assert_equal '/trigger/runservice', env[:url].path + assert_equal 'package=4github&project=home%3AadrianSuSE', env[:url].query + [200, {}, ''] + end + + # Modify the payload to match the filter. + pay = payload + pay['ref'] = 'refs/heads/production' + + svc = service :push, filter_data, pay + svc.receive + @stubs.verify_stubbed_calls + end + + def test_filter_rejected + apicall = "/trigger/runservice" + @stubs.post apicall do |env| + flunk "Master branch should not trigger post request" + end + + svc = service :push, filter_data, payload + svc.receive + end + + def service(*args) + super Service::Obs, *args + end +end diff --git a/test/ontime_test.rb b/test/ontime_test.rb new file mode 100644 index 000000000..fecf4d8b2 --- /dev/null +++ b/test/ontime_test.rb @@ -0,0 +1,42 @@ +require File.expand_path('../helper', __FILE__) +require 'cgi' + +class OnTimeTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + # This tests the old api paths of OnTime. Where 11.1.0 <= Version < 12.2.0 + def test_push + @stubs.get "/api/version" do |env| + assert_equal 'www.example.com', env[:url].host + [200, {}, '{"data":{"major":12,"minor":0,"build":2}}'] + end + + @stubs.post "/api/github" do |env| + [200, {}, ''] + end + + svc = service({'ontime_url' => 'http://www.example.com/', 'api_key' => 'test_api_key'}, payload) + svc.receive_push + end + + # This tests the new api path for GitHub in OnTime Version 12.2 and later. + def test_push_v1_api + @stubs.get "/v122/api/version" do |env| + assert_equal 'www.example.com', env[:url].host + [200, {}, '{"data":{"major":12,"minor":2,"build":0}}'] + end + + @stubs.post "/v122/api/v1/github" do |env| + [200, {}, ''] + end + + svc = service({'ontime_url' => 'http://www.example.com/v122', 'api_key' => 'test_v1_api_key'}, payload) + svc.receive_push + end + + def service(*args) + super Service::OnTime, *args + end +end diff --git a/test/packagist_test.rb b/test/packagist_test.rb new file mode 100644 index 000000000..84c446078 --- /dev/null +++ b/test/packagist_test.rb @@ -0,0 +1,193 @@ +require File.expand_path('../helper', __FILE__) + +class PackagistTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @svc = service(data, payload) + end + + def test_reads_user_from_data + assert_equal 'simensen', @svc.user + end + + def test_reads_token_from_data + assert_equal "5gieo7lwcd8gww800scs", @svc.token + end + + def test_reads_domain_from_data + assert_equal "packagist.example.com", @svc.domain + end + + def test_keeps_https_scheme + svc = service(data.merge({'domain' => 'https://example.com'}), payload) + assert_equal 'https', svc.scheme + end + + def test_constructs_post_receive_url + assert_equal 'http://packagist.example.com/api/github', + @svc.packagist_url + end + + def test_posts_payload + @stubs.post '/api/github' do |env| + assert_equal 'packagist.example.com', env[:url].host + assert_equal 'simensen', Faraday::Utils.parse_query(env[:body])['username'] + assert_equal '5gieo7lwcd8gww800scs', Faraday::Utils.parse_query(env[:body])['apiToken'] + assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload']) + end + @svc.receive_push + end + + def test_strips_whitespace_from_form_values + data = { + 'user' => 'simensen ', + 'token' => '5gieo7lwcd8gww800scs ', + 'domain' => 'packagist.example.com ' + } + + svc = service(data, payload) + assert_equal 'simensen', svc.user + assert_equal '5gieo7lwcd8gww800scs', svc.token + assert_equal 'packagist.example.com', svc.domain + end + + def test_handles_blank_strings_without_errors + data = { + 'user' => '', + 'token' => '', + 'domain' => '' + } + + svc = service(data, payload) + assert_equal 'mojombo', svc.user + assert_equal '', svc.token + assert_equal 'packagist.org', svc.domain + assert_equal 'https', svc.scheme + end + + def test_detects_http_url + data = { + 'domain' => 'http://packagist.example.com/' + } + + svc = service(data, payload) + assert_equal 'packagist.example.com', svc.domain + assert_equal 'http', svc.scheme + end + + def test_detects_https_url + data = { + 'domain' => 'https://packagist.example.com/' + } + + svc = service(data, payload) + assert_equal 'packagist.example.com', svc.domain + assert_equal 'https', svc.scheme + end + + def test_strips_trailing_slash + data = { + 'domain' => 'packagist.example.com/ ' + } + + svc = service(data, payload) + assert_equal 'packagist.example.com', svc.domain + end + + def test_strips_trailing_slash_deep_path + data = { + 'domain' => 'packagist.example.com/path/to/subdirectory/ ' + } + + svc = service(data, payload) + assert_equal 'packagist.example.com/path/to/subdirectory', svc.domain + end + + def test_infers_user_from_repo_data + svc = service(data.reject{|key,v| key == 'user'}, payload) + assert_equal "mojombo", svc.user + end + + def test_defaults_to_http_scheme + assert_equal 'http', @svc.scheme + end + + def test_defaults_to_packagist_domain + svc = service(data.reject{|key,v| key == 'domain'}, payload) + assert_equal "packagist.org", svc.domain + end + + def test_packagist_forced_to_tls + data = { + 'domain' => 'http://packagist.org' + } + svc = service(data, payload) + assert_equal 'packagist.org', svc.domain + assert_equal 'https', svc.scheme + end + + def service(*args) + super Service::Packagist, *args + end + + def data + { + 'user' => 'simensen', + 'token' => '5gieo7lwcd8gww800scs', + 'domain' => 'packagist.example.com' + } + end + def payload2 + { + "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "http://github.com/mojombo/grit/compare/4c8124ffcf4039d292442eeccabdeca5af5c5017...a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "forced" => false, + "created" => false, + "deleted" => false, + + "repository" => { + "name" => "grit", + "url" => "http://github.com/mojombo/grit", + "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" } + }, + + "commits" => [ + { + "distinct" => true, + "removed" => [], + "message" => "[#WEB-249 status:31 resolution:1] stub git call for Grit#heads test", + "added" => [], + "timestamp" => "2007-10-10T00:11:02-07:00", + "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "06f63b43050935962f84fe54473a7c5de7977325" + }, + { + "distinct" => true, + "removed" => [], + "message" => "clean up heads test", + "added" => [], + "timestamp" => "2007-10-10T00:18:20-07:00", + "modified" => ["test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/5057e76a11abd02e83b7d3d3171c4b68d9c88480", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "5057e76a11abd02e83b7d3d3171c4b68d9c88480" + }, + { + "distinct" => true, + "removed" => [], + "message" => "add more comments throughout", + "added" => [], + "timestamp" => "2007-10-10T00:50:39-07:00", + "modified" => ["lib/grit.rb", "lib/grit/commit.rb", "lib/grit/grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425" + } + ] + } + end +end diff --git a/test/phraseapp_test.rb b/test/phraseapp_test.rb new file mode 100644 index 000000000..a74a0cead --- /dev/null +++ b/test/phraseapp_test.rb @@ -0,0 +1,32 @@ +require File.expand_path('../helper', __FILE__) + +class PhraseappTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_auth_token = "footoken" + + data = { + "auth_token" => test_auth_token + } + + payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post "/api/v1/hooks/github" do |env| + body = JSON.parse(env[:body]) + + assert_equal("phraseapp.com", env[:url].host) + assert_equal("post", env[:method].to_s) + [200, {}, ''] + end + + svc.receive_push + @stubs.verify_stubbed_calls + end + + def service_class + Service::Phraseapp + end +end + diff --git a/test/pivotal_tracker_test.rb b/test/pivotal_tracker_test.rb new file mode 100644 index 000000000..7c3860a32 --- /dev/null +++ b/test/pivotal_tracker_test.rb @@ -0,0 +1,59 @@ +require File.expand_path('../helper', __FILE__) + +class PivotalTrackerTest < Service::TestCase + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_mismatched_branch + svc = service({"branch" => "abc"}, payload) + assert_nothing_raised { svc.receive_push } + end + + def test_matching_branch + payload = {"ref" => "refs/heads/master"} + @stubs.post "/services/v3/github_commits" do |env| + assert_equal 'www.pivotaltracker.com', env[:url].host + assert_equal "payload=#{CGI.escape(payload.to_json)}", env[:body] + [200, {}, ''] + end + + svc = service({"branch" => "master", 'endpoint' => ''}, payload) + svc.receive_push + end + + def test_no_specified_branch + @stubs.post "/services/v3/github_commits" do |env| + assert_equal 'www.pivotaltracker.com', env[:url].host + assert_equal 'payload=%7B%22a%22%3A1%7D', env[:body] + [200, {}, ''] + end + + svc = service({}, :a => 1) + svc.receive_push + end + + def test_one_of_many_branches + payload = {"ref" => "refs/heads/longproject"} + @stubs.post "/services/v3/github_commits" do |env| + assert_equal 'www.pivotaltracker.com', env[:url].host + assert_equal "payload=#{CGI.escape(payload.to_json)}", env[:body] + [200, {}, ''] + end + + svc = service({"branch" => "longproject master"}, payload) + svc.receive_push + @stubs.verify_stubbed_calls + end + + def test_none_of_many_branches + svc = service({"branch" => "topic bad_idea"}, payload) + assert_nothing_raised { svc.receive_push } + end + + def service(*args) + super Service::PivotalTracker, *args + end +end + diff --git a/test/piwik_plugins_test.rb b/test/piwik_plugins_test.rb new file mode 100644 index 000000000..a24bfde24 --- /dev/null +++ b/test/piwik_plugins_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../helper', __FILE__) + +class PiwikPluginsTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + svc = service({}, 'a' => 1) + + @stubs.post "/postreceive-hook" do |env| + body = JSON.parse(env[:body]) + assert_equal 'plugins.piwik.org', env[:url].host + assert_equal 1, body['payload']['a'] + [200, {}, ''] + end + + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def service_class + Service::PiwikPlugins + end +end + diff --git a/test/planbox_test.rb b/test/planbox_test.rb new file mode 100644 index 000000000..4984929be --- /dev/null +++ b/test/planbox_test.rb @@ -0,0 +1,23 @@ +require File.expand_path('../helper', __FILE__) + +class PlanboxTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/github_commits" do |env| + assert_equal 'work.planbox.com', env[:url].host + assert_match 'payload=%7B%22a%22%3A1%7D', env[:body] + [200, {}, ''] + end + + svc = service({}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::Planbox, *args + end +end + diff --git a/test/planio_test.rb b/test/planio_test.rb new file mode 100644 index 000000000..e8197f6a2 --- /dev/null +++ b/test/planio_test.rb @@ -0,0 +1,26 @@ +require File.expand_path('../helper', __FILE__) + +class PlanioTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.get "/a/sys/fetch_changesets" do |env| + assert_equal 'r.com', env[:url].host + data = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 'a', env[:params]['key'] + assert_equal 'p', env[:params]['id'] + [200, {}, ''] + end + + svc = service({'address' => 'http://r.com/a/', + 'api_key' => 'a', 'project' => 'p'}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::Planio, *args + end +end + diff --git a/test/prowl_test.rb b/test/prowl_test.rb new file mode 100644 index 000000000..9ffc2122e --- /dev/null +++ b/test/prowl_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class ProwlTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/publicapi/add" do |env| + assert_equal 'api.prowlapp.com', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal 'a', data['apikey'] + [200, {}, ''] + end + + svc = service({'apikey' => 'a'}, payload) + svc.receive_push + end + + def service(*args) + super Service::Prowl, *args + end +end + diff --git a/test/push_test.rb b/test/push_test.rb new file mode 100644 index 000000000..b3876c98a --- /dev/null +++ b/test/push_test.rb @@ -0,0 +1,142 @@ +require File.expand_path('../helper', __FILE__) + +class PushTest < Service::TestCase + include Service::PushHelpers + alias :base_payload :payload + attr_reader :payload + + def setup + @payload = base_payload + end + + def test_create_tag + no_distinct_commits! + payload.merge!( + 'ref' => 'refs/tags/v1.2.3', + 'created' => true + ) + + assert_equal true, tag? + assert_equal true, created? + assert_equal 'v1.2.3', tag_name + assert_equal '[grit] rtomayko tagged v1.2.3 at a47fd41', summary_message + assert_match '/commits/v1.2.3', summary_url + end + + def test_create_tag_with_base + no_distinct_commits! + payload.merge!( + 'ref' => 'refs/tags/v2.3.4', + 'before' => '0'*40, + 'base_ref' => 'refs/heads/master' + ) + + assert_equal true, created? + assert_equal '[grit] rtomayko tagged v2.3.4 at master', summary_message + end + + def test_create_branch_with_commits + payload.merge!( + 'ref' => 'refs/heads/new-feature', + 'created' => true + ) + + assert_equal '[grit] rtomayko created new-feature (+3 new commits)', summary_message + assert_match '/compare/', summary_url + end + + def test_create_branch_without_commits + no_distinct_commits! + payload.merge!( + 'ref' => 'refs/heads/new-feature', + 'created' => true + ) + + assert_equal '[grit] rtomayko created new-feature at a47fd41', summary_message + assert_match '/commits/new-feature', summary_url + end + + def test_create_branch_from_base + one_distinct_commit! + payload.merge!( + 'ref' => 'refs/heads/new-feature', + 'base_ref' => 'refs/heads/master', + 'created' => true + ) + + assert_equal '[grit] rtomayko created new-feature from master (+1 new commit)', summary_message + end + + def test_force_push + payload.merge!( + 'ref' => 'refs/heads/production', + 'forced' => true, + 'pusher' => {'name' => 'hubot'} + ) + + assert_equal '[grit] hubot force-pushed production from 4c8124f to a47fd41', summary_message + assert_match '/commits/production', summary_url + end + + def test_delete_branch + payload.merge!( + 'ref' => 'refs/heads/legacy-code', + 'deleted' => true, + 'after' => '0'*40 + ) + + assert_equal '[grit] rtomayko deleted legacy-code at 4c8124f', summary_message + assert_match '/commit/4c8124f', summary_url + end + + def test_merge_from_base + no_distinct_commits! + payload.merge!( + 'base_ref' => 'refs/tags/refactor' + ) + + assert_equal '[grit] rtomayko merged refactor into master', summary_message + assert_match '/compare/', summary_url + end + + def test_merge_without_base + no_distinct_commits! + + assert_equal '[grit] rtomayko fast-forwarded master from 4c8124f to a47fd41', summary_message + assert_match '/compare/', summary_url + end + + def test_push_multiple_commits + assert_equal '[grit] rtomayko pushed 3 new commits to master', summary_message + assert_match '/compare/', summary_url + end + + def test_push_one_commit + one_distinct_commit! + payload.merge!( + 'ref' => 'refs/heads/posix-spawn' + ) + + assert_equal '[grit] rtomayko pushed 1 new commit to posix-spawn', summary_message + assert_match '/commit/', summary_url + end + + def test_push_without_commits + payload.merge!( + 'commits' => [] + ) + + assert_equal '[grit] rtomayko pushed nothing', summary_message + end + + private + + def no_distinct_commits! + payload['commits'].map{ |c| c['distinct'] = false } + end + + def one_distinct_commit! + no_distinct_commits! + payload['commits'].first['distinct'] = true + end +end diff --git a/test/pushbullet_test.rb b/test/pushbullet_test.rb new file mode 100644 index 000000000..73a17819f --- /dev/null +++ b/test/pushbullet_test.rb @@ -0,0 +1,48 @@ +require File.expand_path('../helper', __FILE__) + +class PushbulletTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @options = { + "api_key" => "e4f235a3851g396d801772b504898140", + "device_iden" => "udhfWdjz4gRNO0Aq" + } + end + + def test_push + stub_request "push" + service(:push, @options, payload).receive_event + end + + def test_push_no_device_iden + @options["device_iden"] = "" + stub_request "push" + service(:push, @options, payload).receive_event + end + + def test_issue + stub_request "issues" + service(:issues, @options, issues_payload).receive_event + end + + def test_pull_request + stub_request "pull_request" + service(:pull_request, @options, pull_payload).receive_event + end + + def stub_request(event) + @stubs.post "/github" do |env| + assert_equal 'https', env[:url].scheme + assert_equal "webhook.pushbullet.com", env[:url].host + body = JSON.parse(env[:body]) + assert_equal event, body['event'] + assert_equal @options, body['config'] + [200, {}, ''] + end + end + + def service(*args) + super(Service::Pushbullet, *args) + end +end diff --git a/test/pushover_test.rb b/test/pushover_test.rb new file mode 100644 index 000000000..60aa01736 --- /dev/null +++ b/test/pushover_test.rb @@ -0,0 +1,30 @@ +require File.expand_path('../helper', __FILE__) + +class PushoverTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + svc = service({"user_key" => "a", "device_name" => "hi"}, payload) + + def svc.shorten_url(*args) + "short" + end + + @stubs.post "/1/messages.json" do |env| + assert_equal "api.pushover.net", env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal "a", data["user"] + assert_equal "hi", data["device"] + [200, {}, ''] + end + + svc.receive_push + end + + def service(*args) + super Service::Pushover, *args + end +end + diff --git a/test/rally_test.rb b/test/rally_test.rb new file mode 100644 index 000000000..3256f8342 --- /dev/null +++ b/test/rally_test.rb @@ -0,0 +1,194 @@ +require File.expand_path('../helper', __FILE__) + +ART_QUERY_RESULT = + { 'S1234' => {'Results' => []}, + 'DE182' => {'Results' => [{'_ref' => 'https://x.y.z/foo/defect/543221.js', 'Name' => 'Goblins', 'FormattedID' => 'DE182'}]}, + 'DE171' => {'Results' => []}, + 'TA97' => {'Results' => []}, + 'TC3212' => {'Results' => []}, + 'TA1294' => {'Results' => []}, + 'TC1143' => {'Results' => []}, + 'DE175' => {'Results' => [{'_ref' => 'https://x.y.z/foo/defect/524175.js', 'Name' => 'Witches', 'FormattedID' => 'DE175'}]}, + 'DE166' => {'Results' => [{'_ref' => 'https://x.y.z/foo/defect/932166.js', 'Name' => 'Trollop', 'FormattedID' => 'DE166'}]} + } + + +class RallyTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + # For now, test is totally happy-path. + # In future should test for empty data values (server, username, password, workspace, repository) + # raise_config_error on bad form values(server, username, password, workspace) + # graceful failure on inability to create scmrepository, changeset, change based on Rally credentials + # test for no payload + # test for no payload repository, commits, ref + # noop if no commits + # + + def test_push + + @stubs.get '/slm/webservice/1.30/Subscription.js?fetch=Name,Workspaces,Workspace&pretty=true' do |env| + assert_equal 'crubble.rallydev.com', env[:url].host + subs = { 'Name' => "Omicron Bacan Fluffies", + 'Errors' => [], + 'Warnings' => [], + 'Workspaces' => [ {"Name" => "Chloroformer", + "_ref" => "https://crubble.rallydev.com/slm/webservice/1.30/workspace/662372755.js", + "_refObjectName" => "Chlorformer", + } + ] + } + [200, {}, JSON.generate({"Subscription" => subs})] + end + + @stubs.get '/slm/webservice/1.30/scmrepository.js' do |env| + repo = {"Errors" => [], + "Warnings" => [], + "TotalResultCount" => 1, "StartIndex" => 1, "PageSize" => 20, + "Results" => [ + { + "Name" => "Reservoir Dogs", + "_type" => "SCMRepository", + "_ref" => "https://trial.rallydev.com/slm/webservice/1.30/scmrepository/11432875342.js" + } + ] + } + [200, {}, JSON.generate({"QueryResult" => repo})] + end + + @stubs.get '/slm/webservice/1.30/hierarchicalrequirement.js' do |env| + result = artifact_query_response(env[:url]) + [200, {}, result] + end + + @stubs.get '/slm/webservice/1.30/defect.js' do |env| + result = artifact_query_response(env[:url]) + [200, {}, result] + end + + @stubs.get '/slm/webservice/1.30/task.js' do |env| + result = artifact_query_response(env[:url]) + [200, {}, result] + end + + @stubs.get '/slm/webservice/1.30/testcase.js' do |env| + result = artifact_query_response(env[:url]) + [200, {}, result] + end + + @stubs.get '/slm/webservice/1.30/user.js' do |env| + assert_equal 'crubble.rallydev.com', env[:url].host + assert_equal 'https', env[:url].scheme + user_item = { "Name" => "Romeo", + "UserName" => "romeo_must_die", + "_ref" => "https://crubble.rallydev.com/slm/webservice/1.30/user/919235435.js" + } + user_result = {"Errors" => [], "Warnings" => [], "TotalResultCount" => 1, 'Results' => [user_item]} + [200, {}, JSON.generate({'QueryResult' => user_result})] + end + + @stubs.post '/slm/webservice/1.30/scmrepository/create.js' do |env| + repo_result = {'Object' => {"_ref" => 'http://x.y.z/foo/scmrepository/4433556.js'}} + [200, {}, JSON.generate({'CreateResult' => repo_result})] + end + + @stubs.post '/slm/webservice/1.30/Changeset/create.js' do |env| + chgset_result = {"Object" => {"_ref" => 'http://x.y.z/foo/changeset/639214.js'}} + [200, {}, JSON.generate({'CreateResult' => chgset_result})] + end + + @stubs.post '/slm/webservice/1.30/Change/create.js' do |env| + chg_result = {"Object" => {"_ref" => 'http://x.y.z/foo/change/7366456.js'}} + [200, {}, JSON.generate({'CreateResult' => chg_result})] + end + + + data = { 'server' => 'crubble', + 'username' => 'romeo_must_die', + 'password' => 'Plantrachette', + 'workspace' => 'Chloroformer', + 'repository' => 'Reservoir Dogs' + } + payload = rally_test_payload() + + svc = service(data, payload) + svc.receive_push + end + + def artifact_query_response(req) + resp = {"Errors" => [], "Warnings" => [], "TotalResultCount" => 0} + if URI.decode(req.to_s.split('?')[1]) =~ /query=\(FormattedID = ([A-Z]{1,2}\d+)\)/ + art_id = $1 + resp = resp.merge(ART_QUERY_RESULT[art_id]) + resp["TotalResultCount"] = ART_QUERY_RESULT[art_id]["Results"].length + end + return JSON.generate({"QueryResult" => resp}) + end + + def rally_test_payload() + rally_payload = + { "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "https://github.com/kipster-t/powalla/compare/4c8124ffcf4039d292442eeccabdeca5af5c5017...a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "forced" => false, + "created" => false, + "deleted" => false, + + "repository" => { + "name" => "powalla", + "url" => "https://github.com/kipster-t/powalla", + "owner" => { "name" => "kipster-t", "email" => "klehman@rallydev.com" } + }, + + "pusher" => { + "name" => "YetiShaggy" + }, + + "commits" => [ + { + "id" => "06f63b43050935962f84fe54473a7c5de7977325", + "timestamp" => "2012-01-10T00:11:02-07:00", + "author" => { "name" => "Yeti", "email" => "yeti@rallydev.com" }, + "message" => "Altered S1234 and DE182, Fixed DE171 and Completed TA97. Improved layout and code cohesion", + "added" => ["bus/pricing-model.txt"], + "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], + "removed" => [], + "url" => "https://github.com/kipster-t/powalla/commit/06f63b43050935962f84fe54473a7c5de7977325", + "distinct" => true + }, + { + "id" => "5057e76a11abd02e83b7d3d3171c4b68d9c88480", + "timestamp" => "2012-01-10T00:18:20-07:00", + "author" => { "name" => "Yeti", "email" => "yeti@rallydev.com" }, + "message" => "clean up heads test, TC3212 cleared, Completed TA1294 and your mama is really mad at your 1954 Mustache.js attitude foda MUS1965 roadasster", + "added" => [], + "modified" => ["test/test_grit.rb"], + "removed" => ["test/test_grotty.rb", "test/test_joobbar.rb"], + "url" => "https://github.com/kipster-t/powalla/commit/5057e76a11abd02e83b7d3d3171c4b68d9c88480", + "distinct" => true + }, + { + "id" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "timestamp" => "2012-01-10T00:50:39-07:00", + "author" => { "name" => "Yeti", "email" => "yeti@rallydev.com" }, + "message" => "TC1143 Passed and DE175 Fixed but DE166 left behind in state of Disrepair", + "added" => ["docs/messieurs.pdf"], + "modified" => ["README", "lib/grit/commiteur.rb"], + "removed" => ["too_gritty.rb"], + "url" => "https://github.com/kipster-t/powalla/commit/a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "distinct" => true + } + ] + } + return rally_payload + end + + def service(*args) + super Service::Rally, *args + end + +end + diff --git a/test/rational_team_concert_test.rb b/test/rational_team_concert_test.rb new file mode 100644 index 000000000..2108c76b6 --- /dev/null +++ b/test/rational_team_concert_test.rb @@ -0,0 +1,185 @@ +require File.expand_path('../helper', __FILE__) + +class RationalTeamConcertTest < Service::TestCase + def setup + @stubs= Faraday::Adapter::Test::Stubs.new + @WorkitemsCreated= 0; + @WorkitemsUpdated= 0; + + @stubs.get "/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/51?oslc.properties=oslc:discussedBy" do |env| + assert_common_headers env + assert_common_oslc_headers env + [200, {}, oslc_json_response] + end + @stubs.get "/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/31?oslc.properties=oslc:discussedBy" do |env| + assert_common_headers env + assert_common_oslc_headers env + [200, {}, oslc_json_response] + end + @stubs.get "/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/1?oslc.properties=oslc:discussedBy" do |env| + assert_common_headers env + assert_common_oslc_headers env + [200, {}, oslc_json_response] + end + @stubs.post "/jazz/oslc/workitems/_UIID/rtc_cm:comments/oslc:comment" do |env| + assert_common_headers env + assert_common_oslc_headers env + @WorkitemsUpdated += 1 + [201, {}, ''] + end + @stubs.post "/jazz/oslc/contexts/_UIID/workitems/defect" do |env| + assert_common_headers env + assert_common_oslc_headers env + @WorkitemsCreated += 1 + [201, {}, oslc_json_response] + end + @stubs.post "/jazz/oslc/contexts/_UIID/workitems/enhancement" do |env| + assert_common_headers env + assert_common_oslc_headers env + @WorkitemsCreated += 1 + [201, {}, oslc_json_response] + end + @stubs.post "/jazz/oslc/contexts/_UIID/workitems/story" do |env| + assert_common_headers env + assert_common_oslc_headers env + @WorkitemsCreated += 1 + [201, {}, oslc_json_response] + end + @stubs.get "/jazz/authenticated/identity" do |env| + assert_common_headers env + cookie= env[:request_headers]['Cookie'] == nil ? cookie1 : cookie2; + [201, {"X-com-ibm-team-repository-web-auth-msg" => "authrequired", "set-cookie" => cookie}, ''] + end + @stubs.post "/jazz/authenticated/j_security_check" do |env| + assert_common_headers env + assert_equal 'application/x-www-form-urlencoded', env[:request_headers]['Content-Type'] + assert_equal cookie1, env[:request_headers]['Cookie'] + [201, {}, oslc_json_response] + end + end + + def test_basic_authentication_push_updates + + @formAuthentication= false; + modified_payload= payload.clone() + modified_payload['commits'][0]['message'] << "\n[51] Some message" + modified_payload['commits'][1]['message'] << "\n[31] clean up " + modified_payload['commits'][2]['message'] << "\n[1] Closes tracker item 1" + + svc= service( + {'server_url' => 'https://foo.com/jazz', + 'username' => username, + 'password' => password, + 'project_area_uuid' => '_UIID', + 'basic_authentication' => '1'}, + modified_payload) + svc.receive_push + + assert_equal 0, @WorkitemsCreated + assert_equal 3, @WorkitemsUpdated + end + + def test_basic_authentication_create_new + + @formAuthentication= false; + modified_payload = payload.clone() + modified_payload['commits'][0]['message'] << "\n[defect] Some message" + modified_payload['commits'][1]['message'] << "\n[enhancement] clean up " + modified_payload['commits'][2]['message'] << "\n[story] Closes tracker item 1" + + svc = service( + {'server_url' => 'https://foo.com/jazz', + 'username' => username, + 'password' => password, + 'project_area_uuid' => '_UIID', + 'basic_authentication' => '1'}, + modified_payload) + svc.receive_push + + assert_equal 3, @WorkitemsCreated + assert_equal 3, @WorkitemsUpdated + end + + def test_form_authentication_push_updates + + @formAuthentication= true; + modified_payload = payload.clone() + modified_payload['commits'][0]['message'] << "\n[51] Some message" + modified_payload['commits'][1]['message'] << "\n[31] clean up " + modified_payload['commits'][2]['message'] << "\n[1] Closes tracker item 1" + + svc = service( + {'server_url' => 'https://foo.com/jazz', + 'username' => username, + 'password' => password, + 'project_area_uuid' => '_UIID', + 'basic_authentication' => '0'}, + modified_payload) + svc.receive_push + + assert_equal 0, @WorkitemsCreated + assert_equal 3, @WorkitemsUpdated + end + + def test_form_authentication_create_new + + @formAuthentication= true; + modified_payload = payload.clone() + modified_payload['commits'][0]['message'] << "\n[defect] Some message" + modified_payload['commits'][1]['message'] << "\n[enhancement] clean up " + modified_payload['commits'][2]['message'] << "\n[story] Closes tracker item 1" + + svc = service( + {'server_url' => 'https://foo.com/jazz', + 'username' => username, + 'password' => password, + 'project_area_uuid' => '_UIID', + 'basic_authentication' => '0'}, + modified_payload) + svc.receive_push + + assert_equal 3, @WorkitemsCreated + assert_equal 3, @WorkitemsUpdated + end + + def assert_common_headers env + assert_equal username, env[:request_headers]['X-com-ibm-team-userid'] + assert_equal 'foo.com', env[:url].host + end + + def assert_common_oslc_headers env + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal 'application/json', env[:request_headers]['accept'] + assert_equal '2.0', env[:request_headers]['oslc-core-version'] + assert_equal cookie2, env[:request_headers]['Cookie'] if @formAuthentication + assert_equal "Basic " + Base64.encode64("#{username}:#{password}").gsub("\n", ""), env[:request_headers]['authorization'] if not @formAuthentication + end + + def oslc_json_response + return '{ + "oslc:discussedBy": { + "rdf:resource": "https://foo.com/jazz/oslc/workitems/_UIID/rtc_cm:comments" + } + }' + end + + def username + return 'test_user' + end + + def password + return 'test_pass' + end + + def cookie1 + return "JSESSIONID=abcd123456" + end + + def cookie2 + return "JSESSIONID=abcd12345678910" + end + def service(*args) + super Service::RationalTeamConcert, *args + end +end + diff --git a/test/rdocinfo_test.rb b/test/rdocinfo_test.rb new file mode 100644 index 000000000..7f43c9b89 --- /dev/null +++ b/test/rdocinfo_test.rb @@ -0,0 +1,27 @@ +require File.expand_path('../helper', __FILE__) + +class RDocInfoTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + @stubs.post "/checkout" do |env| + assert_equal 'www.rubydoc.info', env[:url].host + body = JSON.parse(env[:body]) + assert_equal 'push', body['event'] + assert_equal 'test', body['payload']['repository']['id'] + [200, {}, ''] + end + + payload = { 'repository' => { 'id' => 'test' }} + svc = service({}, payload) + svc.receive_event + @stubs.verify_stubbed_calls + end + + private + + def service_class + Service::RDocInfo + end +end + diff --git a/test/read_the_docs_test.rb b/test/read_the_docs_test.rb new file mode 100644 index 000000000..3e2307234 --- /dev/null +++ b/test/read_the_docs_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class ReadTheDocsTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/github" do |env| + assert_equal 'readthedocs.org', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal 1, JSON.parse(data['payload'])['a'] + [200, {}, ''] + end + + svc = service({}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::ReadTheDocs, *args + end +end + diff --git a/test/redmine_test.rb b/test/redmine_test.rb new file mode 100644 index 000000000..aed046853 --- /dev/null +++ b/test/redmine_test.rb @@ -0,0 +1,82 @@ +require File.expand_path('../helper', __FILE__) + +class RedmineTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.get "/a/sys/fetch_changesets" do |env| + assert_equal 'r.com', env[:url].host + data = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 'a', env[:params]['key'] + assert_equal 'p', env[:params]['id'] + [200, {}, ''] + end + + svc = service({'address' => 'http://r.com/a/', + 'api_key' => 'a', 'project' => 'p', 'fetch_github_commits' => true }, :a => 1) + svc.receive_push + end + + def test_update_issue_module_to_root_redmine_path + @stubs.put "/issues/1234.json" do |env| + assert_equal 'redmine.org', env[:url].host + assert_equal 'application/json', env[:request_headers]['Content-type'] + assert_equal 'API_KEY-654321', env[:request_headers]['X-Redmine-API-Key'] + assert env[:params]['issue']['notes'].include?("Author: Mahmoud") + [200, {}, ''] + end + configurations = { + 'address' => "http://redmine.org", + 'api_key' => "API_KEY-654321", + 'update_redmine_issues_about_commits' => '1' + } + payloads = { + 'commits' => [ + { 'message' => "FIX Issue #1234", + 'timestamp' => "2007-10-10T00:11:02-07:00", + 'id' => "b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33", + 'url' => "https://github.com/modsaid/github-services/commit/b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33", + 'author' => {'name' => "Mahmoud", 'email' => "modsaid@example.com"}, + 'added' => [], 'removed' => [], 'modified' => [] + } + ] + } + svc = service(configurations, payloads) + assert svc.receive_push + end + + def test_update_issue_module_to_non_root_redmine_path + @stubs.put "/a/issues/1234.json" do |env| + assert_equal 'redmine.org', env[:url].host + assert_equal 'application/json', env[:request_headers]['Content-type'] + assert_equal 'API_KEY-654321', env[:request_headers]['X-Redmine-API-Key'] + assert env[:params]['issue']['notes'].include?("Author: Mahmoud") + [200, {}, ''] + end + configurations = { + 'address' => "http://redmine.org/a", + 'api_key' => "API_KEY-654321", + 'update_redmine_issues_about_commits' => '1' + } + payloads = { + 'commits' => [ + { 'message' => "FIX Issue #1234", + 'timestamp' => "2007-10-10T00:11:02-07:00", + 'id' => "b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33", + 'url' => "https://github.com/modsaid/github-services/commit/b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33", + 'author' => {'name' => "Mahmoud", 'email' => "modsaid@example.com"}, + 'added' => [], 'removed' => [], 'modified' => [] + } + ] + } + svc = service(configurations, payloads) + assert svc.receive_push + end + + def service(*args) + super Service::Redmine, *args + end +end + diff --git a/test/schema_test.rb b/test/schema_test.rb new file mode 100644 index 000000000..f2e4bb974 --- /dev/null +++ b/test/schema_test.rb @@ -0,0 +1,171 @@ +require File.expand_path('../helper', __FILE__) + +class DefaultSchemaTest < Service::TestCase + class SchemaService < Service + end + + def setup + @svc = SchemaService + end + + def test_title + assert_equal 'SchemaService', @svc.title + end + + def test_hook_name + assert_equal 'schemaservice', @svc.hook_name + end + + def test_default_events + assert_equal [:push], @svc.default_events + end + + def test_supported_events + assert_equal [], @svc.supported_events + end + + def test_schema + assert_equal [], @svc.schema + end + + def test_white_listed_attributes + assert_equal [], @svc.white_listed + end + + def test_url + assert_nil @svc.url + end + + def test_logo_url + assert_nil @svc.logo_url + end + + def test_maintainers + assert_equal [], @svc.maintainers + end + + def test_supporters + assert_equal [], @svc.supporters + end +end + +class DefaultSchemaWithEventsTest < DefaultSchemaTest + class SchemaService < Service + def receive_push + end + + def receive_issues + end + end + + def setup + @svc = SchemaService + end + + def test_supported_events + assert_equal %w(issues push), @svc.supported_events.sort + end +end + +class DefaultSchemaWithAllEventsTest < DefaultSchemaTest + class SchemaService < Service + def receive_event + end + + def receive_push + end + + def receive_issues + end + end + + def setup + @svc = SchemaService + end + + def test_supported_events + assert_equal Service::ALL_EVENTS, @svc.supported_events.sort + end +end + +class CustomSchemaTest < DefaultSchemaTest + class SchemaService < Service + title "Custom!" + hook_name "custom" + + string :abc + password :def + boolean :ghi + + white_list :abc, :ghi + + url 'url' + logo_url 'logo' + + maintained_by :email => 'abc@def.com', + :web => 'http://def.com/support', + :github => 'abc', + :twitter => 'def' + + supported_by :email => 'abc@def.com', + :web => 'http://def.com/support', + :github => %w(abc def), + :twitter => 'def' + end + + def setup + @svc = SchemaService + end + + def test_title + assert_equal 'Custom!', @svc.title + end + + def test_hook_name + assert_equal 'custom', @svc.hook_name + end + + def test_schema + assert_equal [ + [:string, :abc], + [:password, :def], + [:boolean, :ghi]], @svc.schema + end + + def test_white_listed_attributes + assert_equal %w(abc ghi), @svc.white_listed + end + + def test_maintainers + maintainers = @svc.maintainers + assert_contributor :email, 'abc@def.com', maintainers + assert_contributor :web, 'http://def.com/support', maintainers + assert_contributor :github, 'abc', maintainers + assert_contributor :twitter, 'def', maintainers + assert_equal 4, maintainers.size + end + + def test_supporters + supporters = @svc.supporters + assert_contributor :email, 'abc@def.com', supporters + assert_contributor :web, 'http://def.com/support', supporters + assert_contributor :github, 'abc', supporters + assert_contributor :github, 'def', supporters + assert_contributor :twitter, 'def', supporters + assert_equal 5, supporters.size + end + + def test_url + assert_equal 'url', @svc.url + end + + def test_logo_url + assert_equal 'logo', @svc.logo_url + end + + def assert_contributor(contributor_type, value, contributors) + assert contributors.detect { |c| c.class.contributor_type == contributor_type && + c.value == value } + end +end + diff --git a/test/scrumdo_test.rb b/test/scrumdo_test.rb new file mode 100644 index 000000000..95967c734 --- /dev/null +++ b/test/scrumdo_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class ScrumDoTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/hooks/github/slug" do |env| + assert_equal 'www.scrumdo.com', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal 'rick', data['username'] + assert_equal 'monkey', data['password'] + assert data['payload'] + [200, {}, '{}'] + end + + svc = service({ + 'username' => 'rick', + 'password' => 'monkey', + 'project_slug' => 'slug' + }, payload) + + svc.receive_push + end + + def service(*args) + super Service::ScrumDo, *args + end +end + + + + diff --git a/test/service_test.rb b/test/service_test.rb new file mode 100644 index 000000000..160ed1450 --- /dev/null +++ b/test/service_test.rb @@ -0,0 +1,243 @@ +# encoding: utf-8 + +require File.expand_path('../helper', __FILE__) + +class ServiceTest < Service::TestCase + class TestService < Service + def receive_push + end + end + + class TestCatchAllService < Service + def receive_event + end + end + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @service = service(:push, 'data', 'payload') + end + + def test_receive_valid_event + assert TestService.receive :push, {}, {} + end + + def test_specific_event_method + assert_equal 'receive_push', TestService.new(:push, {}, {}).event_method + end + + def test_catch_all_event_method + assert_equal 'receive_event', TestCatchAllService.new(:push, {}, {}).event_method + end + + def test_missing_method + assert_equal nil, TestService.new(:issues, {}, {}).event_method + end + + def test_http_callback + @stubs.post '/' do |env| + [200, {'x-test' => 'booya'}, 'ok'] + end + + @service.http.post '/' + + @service.http_calls.each do |env| + assert_equal '/', env[:request][:url] + assert_equal '0', env[:request][:headers]['Content-Length'] + assert_equal 200, env[:response][:status] + assert_equal 'booya', env[:response][:headers]['x-test'] + assert_equal 'ok', env[:response][:body] + end + + assert_equal 1, @service.http_calls.size + end + + def test_url_shorten + url = "http://github.com" + @stubs.post "/" do |env| + assert_equal 'git.io', env[:url].host + data = Faraday::Utils.parse_query(env[:body]) + assert_equal url, data['url'] + [201, {'Location' => 'short'}, ''] + end + + assert_equal 'short', @service.shorten_url(url) + end + + def test_ssl_check + http = @service.http + def http.post + raise OpenSSL::SSL::SSLError + end + + @stubs.post "/" do |env| + raise "This stub should not be called" + end + + assert_raises Service::ConfigurationError do + @service.http_post 'http://abc' + end + end + + def test_http_only_with_prefix + ["ftp://1.1.1.1", "file:///etc/passwd"].each do |url| + http = @service.http + http.url_prefix = URI::parse(url) + + assert_raises Service::ConfigurationError do + @service.http_post "/this/is/a/url" + end + assert_raises Service::ConfigurationError do + @service.http_get "/this/is/a/url" + end + end + end + + def test_http_only_with_full_url + ["ftp://1.1.1.1", "file:///etc/passwd"].each do |url| + http = @service.http + + assert_raises Service::ConfigurationError do + @service.http_post url + end + assert_raises Service::ConfigurationError do + @service.http_get url + end + end + end + + def test_http_only_with_prefix_and_fqdn + ["ftp://1.1.1.1", "file:///etc/passwd"].each do |url| + http = @service.http + http.url_prefix = URI::parse(url) + + assert_raises Service::ConfigurationError do + @service.http_post "ftp:///this/is/a/url" + end + assert_raises Service::ConfigurationError do + @service.http_get "ftp:///this/is/a/url" + end + end + end + + def test_http_get_url_strip + stubs = Faraday::Adapter::Test::Stubs.new + stubs.get("/") { |env| [200, {}, "ok"] } + stubs.get("/ ") { |env| [200, {}, "nope"] } + + service = TestService.new(:push, "data", "payload") + service.http :adapter => [:test, stubs] + + service.http_get "https://example.com/ " + http_call = service.http_calls[0] + assert_equal "https://example.com/", http_call[:request][:url] + assert_equal "ok", http_call[:response][:body] + end + + def test_http_post_url_strip + stubs = Faraday::Adapter::Test::Stubs.new + stubs.post("/") { |env| [200, {}, "ok"] } + stubs.post("/ ") { |env| [200, {}, "nope"] } + + service = TestService.new(:push, "data", "payload") + service.http :adapter => [:test, stubs] + + service.http_post "https://example.com/ " + http_call = service.http_calls[0] + assert_equal "https://example.com/", http_call[:request][:url] + assert_equal "ok", http_call[:response][:body] + end + + def test_json_encoding + payload = {'unicodez' => "rtiaü\n\n€ý5:q"} + json = @service.generate_json(payload) + assert_equal payload, JSON.parse(json) + end + + def test_config_boolean_true_helper + svc = service(:push, "is_checked" => nil) + refute svc.config_boolean_true?("is_checked") + + svc = service(:push, "is_checked" => 0) + refute svc.config_boolean_true?("is_checked") + + svc = service(:push, "is_checked" => "0") + refute svc.config_boolean_true?("is_checked") + + svc = service(:push, "is_checked" => 1) + assert svc.config_boolean_true?("is_checked") + + svc = service(:push, "is_checked" => "1") + assert svc.config_boolean_true?("is_checked") + end + + def test_before_delivery + @service.before_delivery do |url, payload, headers, params| + headers['EDITED-IN-BEFORE-DELIVERY'] = true + payload.replace("EDITED") + end + + @stubs.post '/' do |env| + assert_equal '/', env.url.to_s + assert_equal 'EDITED', env[:body] + assert_equal true, env[:request_headers]['Edited-In-Before-Delivery'] + [200, {'X-Test' => 'success'}, 'OK'] + end + + @service.http_post('/', payload.to_s) + + @service.http_calls.each do |env| + assert_equal 200, env[:response][:status] + end + + assert_equal 1, @service.http_calls.size + end + + def test_multiple_before_delivery_callbacks + @service.before_delivery do |url, payload, headers, params| + headers['EDITED-IN-BEFORE-DELIVERY-1'] = true + end + + @service.before_delivery do |url, payload, headers, params| + headers['EDITED-IN-BEFORE-DELIVERY-2'] = true + end + + @stubs.get '/' do |env| + assert_equal true, env[:request_headers]['Edited-In-Before-Delivery-1'] + assert_equal true, env[:request_headers]['Edited-In-Before-Delivery-2'] + [200, {'X-Test' => 'success'}, 'OK'] + end + + @service.http_get('/') + + @service.http_calls.each do |env| + assert_equal 200, env[:response][:status] + end + end + + def test_reset_pre_delivery_callbacks! + @service.before_delivery do |url, payload, headers, params| + headers['EDITED-IN-BEFORE-DELIVERY'] = true + payload.replace("EDITED") + end + + @stubs.post '/' do |env| + assert_equal 'EDITED', env[:body] + assert_equal true, env[:request_headers]['Edited-In-Before-Delivery'] + [200, {'X-Test' => 'success'}, 'OK'] + end + + @service.http_post('/', "desrever") + @service.reset_pre_delivery_callbacks! + + @stubs.post '/' do |env| + refute_equal 'EDITED', env[:body] + refute_equal true, env[:request_headers]['Edited-In-Before-Delivery'] + [200, {'X-Test' => 'success'}, 'OK'] + end + end + + def service(*args) + super TestService, *args + end +end diff --git a/test/sifter_test.rb b/test/sifter_test.rb new file mode 100644 index 000000000..19943ad64 --- /dev/null +++ b/test/sifter_test.rb @@ -0,0 +1,51 @@ +require File.expand_path('../helper', __FILE__) + +class SifterTest < Service::TestCase + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @svc = service(data, payload) + end + + def test_reads_token + assert_equal token, @svc.token + end + + def test_reads_subdomain + assert_equal 'example', @svc.subdomain + end + + def test_implies_host + assert_equal "https://example.sifterapp.com/api/github", @svc.hook_url + + ENV['SIFTER_HOST'] = 'sifter.dev' + assert_equal "http://example.sifter.dev/api/github", @svc.hook_url + ENV.delete('SIFTER_HOST') + end + + def test_posts_payload + @stubs.post '/api/github' do |env| + assert_equal 'https', env[:url].scheme + assert_equal 'example.sifterapp.com', env[:url].host + assert_equal token, env[:params]['token'] + assert_equal payload, JSON.parse(env[:body]) + end + + @svc.receive_push + end + + private + + def service(*args) + super Service::Sifter, *args + end + + def data + {'token' => token + ' ' * 4, 'subdomain' => 'example'} + end + + def token + 'NTpuZXh0dXckYX4lOjE%3D' + end + +end diff --git a/test/simperium_test.rb b/test/simperium_test.rb new file mode 100644 index 000000000..748c9eace --- /dev/null +++ b/test/simperium_test.rb @@ -0,0 +1,40 @@ +require File.expand_path('../helper', __FILE__) + +class SimperiumTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + test_app_id = "sample-app-name" + test_token = "0123456789abcde" + test_bucket = "github-event" + + data = { + 'app_id' => test_app_id, + 'token' => test_token, + 'bucket' => test_bucket + } + + payload = {'commits'=>[{'id'=>'test'}]} + svc = service(data, payload) + + @stubs.post "/1/#{test_app_id}/#{test_bucket}/i/#{svc.delivery_guid}" do |env| + body = JSON.parse(env[:body]) + + assert_equal env[:url].host, "api.simperium.com" + assert_equal env[:request_headers]['Authorization'], "Token #{test_token}" + assert_equal 'test', body['payload']['commits'][0]['id'] + assert_match 'guid-', body['guid'] + assert_equal data, body['config'] + assert_equal 'push', body['event'] + [200, {}, ''] + end + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service_class + Service::Simperium + end +end + diff --git a/test/skydeskprojects_test.rb b/test/skydeskprojects_test.rb new file mode 100644 index 000000000..e1c171b52 --- /dev/null +++ b/test/skydeskprojects_test.rb @@ -0,0 +1,30 @@ +require File.expand_path('../helper', __FILE__) + +class SkyDeskProjectsTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/serviceHook" + data = { + "project_id" => "1234", + "token" => "a13d", + } + svc = service(data, payload) + @stubs.post url do |env| + assert_equal 'projects.skydesk.jp', env[:url].host + params = Faraday::Utils.parse_query(env[:body]) + assert_equal '1234', params['pId'] + assert_equal 'a13d', params['authtoken'] + assert_equal payload, JSON.parse(params['payload']) + [200, {}, ''] + + end + svc.receive + end + + def service(*args) + super Service::SkyDeskProjects, *args + end +end diff --git a/test/smartling_test.rb b/test/smartling_test.rb new file mode 100644 index 000000000..898ac8574 --- /dev/null +++ b/test/smartling_test.rb @@ -0,0 +1,159 @@ +require File.expand_path('../helper', __FILE__) + +class SmartlingTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_requires_service_url + data = self.data.update("service_url" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_project_id + data = self.data.update("project_id" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_api_key + data = self.data.update("api_key" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_config_path + data = self.data.update("config_path" => "") + svc = service :push, data, payload + + assert_raises Service::ConfigurationError do + svc.receive + end + end + + def test_requires_master_only_no_master + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def test_requires_master_only_no_branch + payload = self.payload.update("ref" => "refs/heads/branch_name") + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def test_requires_master_only_nil_master + data = self.data.update("master_only" => nil) + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def test_requires_master_only_nil_branch + data = self.data.update("master_only" => nil) + payload = self.payload.update("ref" => "refs/heads/branch_name") + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def test_requires_master_only_yes_master + data = self.data.update("master_only" => "1") + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def test_requires_master_only_yes_branch + payload = self.payload.update("ref" => "refs/heads/branch_name") + data = self.data.update("master_only" => "1") + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + begin + @stubs.verify_stubbed_calls + rescue RuntimeError + else + assert_true false + end + end + + def test_error + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + [401, {}, ''] + end + svc = service :push, data, payload + begin + svc.receive + rescue Service::ConfigurationError + else + assert_true false + end + @stubs.verify_stubbed_calls + end + + def test_ok + @stubs.post "/github" do |env| + assert_equal "capi.smatling.com", env[:url].host + body = JSON.parse(env[:body]) + assert_equal data["project_id"], body.delete("projectId") + assert_equal data["api_key"], body.delete("apiKey") + assert_equal data["config_path"], body.delete("resourceFile") + assert_equal payload, body + [200, {}, ''] + end + svc = service :push, data, payload + svc.receive + @stubs.verify_stubbed_calls + end + + def data + { + "service_url" => "http://capi.smatling.com", + "project_id" => "d86077368", + "api_key" => "2c1ad0bb-e9b6-4c20-b536-1006502644a2", + "config_path" => "smartling-config.json", + "master_only" => "0" + } + end + + def service(*args) + super Service::Smartling, *args + end +end diff --git a/test/softlayer_messaging_test.rb b/test/softlayer_messaging_test.rb new file mode 100644 index 000000000..ee6ea880c --- /dev/null +++ b/test/softlayer_messaging_test.rb @@ -0,0 +1,114 @@ +require File.expand_path('../helper', __FILE__) + +class SoftLayerMessagingTest < Service::TestCase + include Service::PushHelpers + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push_topic + svc = service({"user"=>"test_user", "key"=>"test_apikey", + "name"=>"test_topic", "account" => "test_account", "topic"=>true}, payload) + svc.client = fake_client + + svc.receive_push + + payload_json_data = JSON.generate(payload) + auth = [ "test_user", "test_apikey" ] + options = { + :fields => { + :repository => payload['repository']['name'], + :owner => payload['repository']['owner']['name'], + :email => payload['repository']['owner']['email'], + :ref => payload['ref'], + :created => payload['created'], + :forced => payload['forced'], + :deleted => payload['deleted'] + } + } + assert_equal auth, fake_client.called['client.authenticate'] + assert_equal ['test_topic'], fake_client.called['client.topic'] + assert_equal ['test_topic', payload_json_data], fake_client.called['queue.publish'][0,2] + assert_equal options, fake_client.called['queue.publish'][2] + end + + def test_push_queue + svc = service({"user"=>"test_user", "key"=>"test_apikey", + "name"=>"test_queue", "account" => "test_account", "topic"=>false}, payload) + svc.client = fake_client + + svc.receive_push + + payload_json_data = JSON.generate(payload) + auth = [ "test_user", "test_apikey" ] + options = { + :fields => { + :repository => payload['repository']['name'], + :owner => payload['repository']['owner']['name'], + :email => payload['repository']['owner']['email'], + :ref => payload['ref'], + :created => payload['created'], + :forced => payload['forced'], + :deleted => payload['deleted'] + } + } + + assert_equal auth, fake_client.called['client.authenticate'] + assert_equal ['test_queue'], fake_client.called['client.queue'] + assert_equal ['test_queue', payload_json_data], fake_client.called['queue.push'][0,2] + assert_equal options, fake_client.called['queue.push'][2] + end + + def service(*args) + super Service::SoftLayerMessaging, *args + end + + def fake_client + @fake_client ||= FakeSoftLayerClient.new + end + + class FakeSoftLayerClient + attr_reader :called + + def initialize + @called = {} + end + + def record_call(name, args) + @called[name] = args + end + + def queue(name) + record_call('client.queue', [name]) + FakeTopicQueue.new(name, self) + end + + def topic(name) + record_call('client.topic', [name]) + FakeTopicQueue.new(name, self) + end + + def authenticate(user, key) + record_call('client.authenticate', [user, key]) + end + + end + + class FakeTopicQueue + + def initialize(name, client) + @name = name + @client = client + end + + def push(payload, options) + @client.record_call('queue.push', [@name, payload, options]) + end + + def publish(payload, options) + @client.record_call('queue.publish', [@name, payload, options]) + end + end + +end diff --git a/test/sprintly_test.rb b/test/sprintly_test.rb new file mode 100644 index 000000000..c46a54a0b --- /dev/null +++ b/test/sprintly_test.rb @@ -0,0 +1,31 @@ +require File.expand_path('../helper', __FILE__) + +class SprintlyTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/integration/github/1/push/" do |env| + assert_equal 'sprint.ly', env[:url].host + assert_equal 'application/json', + env[:request_headers]['content-type'] + assert_equal basic_auth("my_user@foo.bar", "my_api_key"), + env[:request_headers]['authorization'] + [200, {}, ''] + end + + svc = service :push, { + 'email' => 'my_user@foo.bar', + 'product_id' => '1', + 'api_key' => 'my_api_key' + }, payload + + svc.receive_event + @stubs.verify_stubbed_calls + end + + def service(*args) + super Service::Sprintly, *args + end +end diff --git a/test/sqs_queue_test.rb b/test/sqs_queue_test.rb new file mode 100644 index 000000000..f3ae2f183 --- /dev/null +++ b/test/sqs_queue_test.rb @@ -0,0 +1,76 @@ +require File.expand_path('../helper', __FILE__) +ENV['SQS_STUB_REQUESTS'] = 'true' + +class SqsQueueTest < Service::TestCase + include Service::PushHelpers + + attr_reader :payload, :data + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @old_data = { + 'aws_access_key' => ' AIQPJBLDKSU8SKLZNHGLQA', + 'aws_secret_key' => 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA ', + 'sqs_queue_name' => ' testQueue ' + } + @data = { + 'aws_sqs_arn' => "arn:aws:sqs:us-west-2:1234567890:testqueue", + 'aws_access_key' => ' AIQPJBLDKSU8SKLZNHGLQA', + 'aws_secret_key' => 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA ' + } + end + + def test_strip_whitespace_from_form_data + svc = service(@old_data, payload) + assert_equal 'AIQPJBLDKSU8SKLZNHGLQA', svc.access_key + assert_equal 'jaz8OQ72kzmblq9TYY28alqp9y7Zmvlsq9iJJqAA', svc.secret_key + assert_equal 'testQueue', svc.queue_name + end + + def test_aws_key_lengths + svc = service(@old_data, payload) + assert_equal 22, svc.access_key.length + assert_equal 40, svc.secret_key.length + end + + def service(*args) + super Service::SqsQueue, *args + end + + def test_sets_queue_name_with_arn + svc = service(@data, payload) + assert_equal 'testqueue', svc.queue_name + end + + def test_sets_region_with_old_data + svc = service(@old_data, payload) + assert_equal 'us-east-1', svc.region + end + + def test_sets_region_with_new_data + svc = service(@data, payload) + assert_equal 'us-west-2', svc.region + end + + def test_notify_sqs_sends_message_attributes + svc = service(@data, payload) + client = svc.sqs_client + client.client.new_stub_for(:send_message) + queue_url_resp = client.client.stub_for(:get_queue_url) + queue_url_resp.data[:queue_url] = 'https://sqs.us-west-2.amazonaws.com/1234567890/testQueue' + + result = svc.notify_sqs(svc.access_key, svc.secret_key, '{type: ping}') + + # make sure the original params are what is expected + original_params = result.request_options + assert_equal 'https://sqs.us-west-2.amazonaws.com/1234567890/testQueue', original_params[:queue_url] + assert_equal '{type: ping}', original_params[:message_body] + expected_hash = { + 'X-GitHub-Event' => {:string_value => 'push', :data_type => 'String'} + } + assert_equal expected_hash, original_params[:message_attributes] + + end + +end diff --git a/test/statusnet_test.rb b/test/statusnet_test.rb new file mode 100644 index 000000000..f74a2a375 --- /dev/null +++ b/test/statusnet_test.rb @@ -0,0 +1,29 @@ +require File.expand_path('../helper', __FILE__) + +class StatusNetTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/statuses/update.xml" do |env| + assert_equal 's.com', env[:url].host + data = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 'github', data['source'] + [200, {}, ''] + end + + svc = service({'server' => 'http://s.com'}, payload) + + def svc.shorten_url(*args) + 'short' + end + + svc.receive_push + end + + def service(*args) + super Service::StatusNet, *args + end +end + diff --git a/test/talker_test.rb b/test/talker_test.rb new file mode 100644 index 000000000..89ebd6f97 --- /dev/null +++ b/test/talker_test.rb @@ -0,0 +1,63 @@ +require File.expand_path('../helper', __FILE__) + +class TalkerTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push_with_digest_on + stub_message_posting + + svc = service(:push, {'digest' => '1'}, push_payload) + svc.receive_push + end + + def test_push_with_digest_off_and_several_distinct_commits + stub_message_posting + + payload = push_payload + assert payload['commits'].size > 1 + + svc = service(:push, {'digest' => '0'}, payload) + svc.receive_push + end + + def test_push_with_digest_off_and_a_single_distinct_commit + stub_message_posting + + payload = push_payload + payload['commits'] = [payload['commits'].first] + + svc = service(:push, {'digest' => '0'}, payload) + svc.receive_push + end + + def test_pull_request + stub_message_posting + svc = service(:pull_request, {}, pull_payload) + svc.receive_pull_request + end + + def test_issues + stub_message_posting + svc = service(:issues, {}, issues_payload) + svc.receive_issues + end + + def service(event, options = {}, *args) + default_options = {'url' => 'https://s.talkerapp.com/room/1', 'token' => 't'} + super Service::Talker, event, default_options.merge(options), *args + end + + private + def stub_message_posting + @stubs.post "/room/1/messages.json" do |env| + assert_equal 's.talkerapp.com', env[:url].host + assert_equal 't', env[:request_headers]['x-talker-token'] + data = Faraday::Utils.parse_nested_query(env[:body]) + assert data.key?('message') + [200, {}, ''] + end + end +end + diff --git a/test/target_process_test.rb b/test/target_process_test.rb new file mode 100644 index 000000000..15c7a56fd --- /dev/null +++ b/test/target_process_test.rb @@ -0,0 +1,72 @@ +require File.expand_path('../helper', __FILE__) + +class TargetProcessTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.get "/tp/api/v1/Context" do |env| + assert_equal 'foo.com', env[:url].host + assert_equal '1000101', env[:params]['ids'] + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + [200, {}, ''] + end + + @stubs.get "/tp/api/v1/Users?where=(Email%20eq%20'jonnyfunfun@gmail.com')" do |env| + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + assert_equal "(Email eq 'jonnyfunfun@gmail.com')", env[:params]['where'] + [200, {}, 'jonnyfunfun@gmail.comfoobar@snafu.com'] + end + + @stubs.get "/tp/api/v1/Processes/OMGWTFBBQ/EntityStates?where(Name%20eq%20'fubar')%20and%20(EntityType.Name%20eq%20'Bug')" do |env| + assert_equal 'ZOMG', env[:params]['acid'] + assert_equal "(Name eq 'fubar') and (EntityType.Name eq 'Bug')", env[:params]['where'] + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + [200, {}, ''] + end + + @stubs.get "/tp/api/v1/Assignables/1783?acid=ZOMG&include=%5BEntityType%5D" do |env| + assert_equal '[EntityType]', env[:params]['include'] + assert_equal 'ZOMG', env[:params]['acid'] + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + [200, {}, ''] + end + + @stubs.post "/tp/api/v1/Comments" do |env| + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal "{General: {Id: 1783}, Description: 'stuff #1783:fubar', Owner: {Id: 31337}}", env[:body] + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + [201, {}, ''] + end + + @stubs.post "/tp/api/v1/Bugs" do |env| + assert_equal 'application/json', env[:request_headers]['Content-Type'] + assert_equal '{Id: 1783, EntityState: {Id: 21}}', env[:body] + assert_equal basic_auth('uz0r', 'p455w0rd'), env[:request_headers]['authorization'] + [200, {}, ''] + end + + svc = service( + {'base_url' => 'http://foo.com/tp/', 'username' => 'uz0r', 'password' => 'p455w0rd', + 'project_id' => '1000101'}, + payload) + svc.receive_push + end + + def service(*args) + super Service::TargetProcess, *args + end + + def payload + # Stripped down with only the information we need + { + "commits" => [ + { + "message" => "stuff #1783:fubar", + "author" => { "name" => "Jonathan Enzinna", "email" => "jonnyfunfun@gmail.com" } + } + ] + } + end +end diff --git a/test/teamcity_test.rb b/test/teamcity_test.rb new file mode 100644 index 000000000..378a3e121 --- /dev/null +++ b/test/teamcity_test.rb @@ -0,0 +1,122 @@ +require File.expand_path('../helper', __FILE__) + +class TeamCityTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/abc/httpAuth/app/rest/buildQueue" + @stubs.post url do |env| + assert_equal 'teamcity.com', env[:url].host + assert_equal '', env[:body] + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + [200, {}, ''] + end + + url2 = "abc/httpAuth/app/rest/vcs-root-instances/checkingForChangesQueue?locator=buildType:btid" + @stubs.post url2 do |env| + assert_equal 'teamcity.com', env[:url].host + assert_equal nil, env[:body] + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + [200, {}, ''] + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid', + 'username' => 'u', + 'password' => 'p', + 'check_for_changes_only' => '0' + }, 'payload') + svc.receive_push + end + + def test_push_deleted_branch + url = "/abc/httpAuth/action.html" + @stubs.post url do |env| + assert false, "service should not be called for deleted branches" + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid' + }, { + 'deleted' => true, + 'ref' => 'refs/heads/branch-name' + }) + svc.receive_push + end + + def test_push_with_branch_name + url = "/abc/httpAuth/app/rest/buildQueue" + @stubs.post url do |env| + assert_equal '', env[:body] + [200, {}, ''] + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid' + }, { + 'ref' => 'refs/heads/branch-name' + }) + svc.receive_push + end + + def test_push_with_branch_name_incl_slashes + url = "/abc/httpAuth/app/rest/buildQueue" + @stubs.post url do |env| + assert_equal '', env[:body] + [200, {}, ''] + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid' + }, { + 'ref' => 'refs/heads/branch/name' + }) + svc.receive_push + end + + def test_push_with_branch_full_ref + url = "/abc/httpAuth/app/rest/buildQueue" + @stubs.post url do |env| + assert_equal '', env[:body] + [200, {}, ''] + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid', + 'full_branch_ref' => '1' + }, { + 'ref' => 'refs/heads/branch/name' + }) + svc.receive_push + end + + def test_push_when_check_for_changes_is_true + url = "abc/httpAuth/app/rest/vcs-root-instances/checkingForChangesQueue?locator=buildType:btid" + @stubs.post url do |env| + assert_equal 'teamcity.com', env[:url].host + assert_equal "", env[:body] + [200, {}, ''] + end + + svc = service({ + 'base_url' => 'http://teamcity.com/abc', + 'build_type_id' => 'btid', + 'check_for_changes_only' => '1' + }, 'payload') + svc.receive_push + end + + + + def service(*args) + super Service::TeamCity, *args + end +end + diff --git a/test/tender_test.rb b/test/tender_test.rb new file mode 100644 index 000000000..b77a4703c --- /dev/null +++ b/test/tender_test.rb @@ -0,0 +1,60 @@ +require File.expand_path('../helper', __FILE__) + +class TenderTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @options = { + 'domain' => 'some.tenderapp.com', + 'token' => 'Aewi5ui1' + } + end + + def test_issues + @stubs.post "/tickets/github/Aewi5ui1" do |env| + body = JSON.parse(env[:body]) + + assert_equal 'https', env[:url].scheme + assert !env[:ssl][:verify] + assert_equal 'some.tenderapp.com', env[:url].host + assert_equal 'application/json', env[:request_headers]['Content-Type'] + + assert_equal body["issue"]["state"], "open" + assert_equal body["issue"]["number"], 5 + assert_equal body["repository"]["name"], "grit" + assert_equal body["repository"]["owner"]["login"], "mojombo" + + [200, {}, ''] + end + + service(:issues, @options, issues_payload).receive_issues + end + + def test_pull + @stubs.post "/tickets/github/Aewi5ui1" do |env| + puts env[:body] + body = JSON.parse(env[:body]) + + assert_equal 'https', env[:url].scheme + assert !env[:ssl][:verify] + assert_equal 'some.tenderapp.com', env[:url].host + assert_equal 'application/json', env[:request_headers]['Content-Type'] + + assert_equal body["pull_request"]["state"], "open" + assert_equal body["pull_request"]["number"], 5 + assert_equal body["repository"]["name"], "grit" + assert_equal body["repository"]["owner"]["login"], "mojombo" + + [200, {}, ''] + end + + service(:pull_request, @options, pull_payload).receive_pull_request + end + + private + + def service(*args) + super Service::Tender, *args + end + +end diff --git a/test/toggl_test.rb b/test/toggl_test.rb new file mode 100644 index 000000000..c02fef935 --- /dev/null +++ b/test/toggl_test.rb @@ -0,0 +1,27 @@ +require File.expand_path('../helper', __FILE__) + +class TogglTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + url = "/api/v8/time_entries" + @stubs.post url do |env| + assert_equal 'www.toggl.com', env[:url].host + assert_equal basic_auth(:a, :api_token), env[:request_headers]['authorization'] + assert_equal 900, JSON.parse(env[:body])['time_entry']['duration'] + [200, {}, ''] + end + + modified = payload.dup + modified['commits'].first['message'].sub! /f:/, 't:' + svc = service({'api_token' => 'a'}, modified) + svc.receive_push + end + + def service(*args) + super Service::Toggl, *args + end +end + diff --git a/test/trac_test.rb b/test/trac_test.rb new file mode 100644 index 000000000..445046d95 --- /dev/null +++ b/test/trac_test.rb @@ -0,0 +1,25 @@ +require File.expand_path('../helper', __FILE__) + +class TracTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/s/github/t" do |env| + assert_equal 's.trac.com', env[:url].host + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + data = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 1, JSON.parse(data['payload'])['a'] + [200, {}, ''] + end + + svc = service({'url' => 'http://u:p@s.trac.com/s', 'token' => 't'}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::Trac, *args + end +end + diff --git a/test/travis_test.rb b/test/travis_test.rb new file mode 100644 index 000000000..c50d49697 --- /dev/null +++ b/test/travis_test.rb @@ -0,0 +1,132 @@ +require File.expand_path('../helper', __FILE__) + +class TravisTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @svc = service(basic_config, push_payload) + @svc.delivery_guid = 'guid-123' + end + + def test_reads_user_from_config + assert_equal 'kronn', @svc.user + end + + def test_reads_token_from_config + assert_equal "5373dd4a3648b88fa9acb8e46ebc188a", @svc.token + end + + def test_reads_domain_from_config + svc = service(basic_config.merge({ 'domain' => 'http://example.com' }), payload) + assert_equal "example.com", svc.domain + end + + def test_keeps_https_scheme + svc = service(basic_config.merge({ 'domain' => 'https://example.com' }), payload) + assert_equal 'https', svc.scheme + end + + def test_reads_default_domain_when_not_in_config + assert_equal "notify.travis-ci.org", @svc.domain + end + + def test_constructs_post_receive_url + assert_equal 'http://notify.travis-ci.org', @svc.travis_url + end + + def test_posts_payload + @stubs.post '/' do |env| + assert_equal 'http://notify.travis-ci.org', env[:url].to_s + assert_equal basic_auth('kronn', '5373dd4a3648b88fa9acb8e46ebc188a'), + env[:request_headers]['authorization'] + assert_equal 'push', env[:request_headers]['x-github-event'] + assert_equal 'guid-123', env[:request_headers]['x-github-guid'] + assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload']) + end + @svc.receive_event + end + + def test_pull_request_payload + @svc = service(:pull_request, basic_config, pull_payload) + @stubs.post '/' do |env| + assert_equal 'http://notify.travis-ci.org', env[:url].to_s + assert_equal basic_auth('kronn', '5373dd4a3648b88fa9acb8e46ebc188a'), + env[:request_headers]['authorization'] + assert_equal 'pull_request', env[:request_headers]['x-github-event'] + assert_equal pull_payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload']) + end + @svc.receive_event + end + + def test_pull_request_payload_without_username + data = { + 'user' => '', + 'token' => '5373dd4a3648b88fa9acb8e46ebc188a' + } + svc = service(:pull_request, blank_user_config, pull_payload) + + assert_equal pull_payload['repository']['owner']['login'], svc.user + assert_equal '5373dd4a3648b88fa9acb8e46ebc188a', svc.token + end + + def test_strips_whitespace_from_form_values + data = { + 'user' => 'kronn ', + 'token' => '5373dd4a3648b88fa9acb8e46ebc188a ', + 'domain' => 'my-travis-ci.heroku.com ' + } + + svc = service(data, payload) + + assert_equal 'kronn', svc.user + assert_equal '5373dd4a3648b88fa9acb8e46ebc188a', svc.token + assert_equal 'my-travis-ci.heroku.com', svc.domain + end + + def test_handles_blank_strings_without_errors + data = { + 'user' => '', + 'token' => '5373dd4a3648b88fa9acb8e46ebc188a', + 'domain' => '' + } + + svc = service(data, payload) + + assert_equal 'mojombo', svc.user + assert_equal '5373dd4a3648b88fa9acb8e46ebc188a', svc.token + assert_equal 'notify.travis-ci.org', svc.domain + assert_equal 'http', svc.scheme + end + + def test_infers_user_from_repo_data + svc = service(basic_config.reject{ |key,v| key == 'user' }, payload) + assert_equal "mojombo", svc.user + end + + def test_defaults_to_http_scheme + assert_equal 'http', @svc.scheme + end + + def test_defaults_to_pings_travis_ci_domain + svc = service(basic_config.reject{ |key,v| key == 'domain' }, payload) + assert_equal "notify.travis-ci.org", svc.domain + end + + def service(*args) + super Service::Travis, *args + end + + def basic_config + { + 'user' => 'kronn', + 'token' => '5373dd4a3648b88fa9acb8e46ebc188a' + } + end + + def blank_user_config + { + 'user' => '', + 'token' => '5373dd4a3648b88fa9acb8e46ebc188a' + } + end +end + diff --git a/test/trello_test.rb b/test/trello_test.rb new file mode 100644 index 000000000..d43817e2a --- /dev/null +++ b/test/trello_test.rb @@ -0,0 +1,152 @@ +require File.expand_path('../helper', __FILE__) + +class TrelloTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = {'push_list_id' => 'abc123', 'consumer_token' => 'blarg', 'master_only' => 1} + end + + def test_push + svc = service :push, @data + + def svc.message_max_length; 4 end + + @stubs.post "/1/cards" do |env| + assert_equal 'api.trello.com', env[:url].host + assert_match 'token=blarg', env[:body] + assert_match 'idList=abc123', env[:body] + [200, {}, ''] + end + + assert_equal 'stub...', svc.send(:name_for_commit, svc.payload['commits'].first) + + assert_equal correct_description, svc.send(:desc_for_commit, svc.payload['commits'].first) + + svc.receive_push + end + + def test_backward_compatible_push_list_id + @data['list_id'] = @data['push_list_id'] + @data.delete 'push_list_id' + svc = service :push, @data + assert_cards_created svc + end + + def test_master_only_no_master + svc = service :push, + @data.update("master_only" => 1), + payload.update("ref" => "refs/heads/non-master") + + assert_no_cards_created svc + end + + def test_master_only_master + svc = service :push, @data.update("master_only" => 1) + assert_cards_created svc + end + + def test_ignore_regex + svc = service :push, @data.merge!("ignore_regex" => "Grit|throughout|heads") + assert_no_cards_created svc + end + + def test_ignore_regex_timeout + push_payload = Service::PushHelpers.sample_payload + push_payload["commits"].first.merge!("message" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaZ") + svc = service @data.merge!("ignore_regex" => "(a+)+$"), push_payload + + assert_raises(Service::TimeoutError) do + call_hook_on_service svc, :push + end + end + + def test_no_ignore_regex + svc = service :push, @data.merge!("ignore_regex" => "") + assert_cards_created svc + end + + def test_pull_request + svc = service :pull_request, @data.merge!("pull_request_list_id" => 'zxy987') + assert_cards_created svc, :pull_request + end + + def test_closed_pull_request + svc = service :pull_request, + @data.merge!("pull_request_list_id" => 'zxy987'), + pull_payload.merge!("action" => "closed") + assert_no_cards_created svc, :pull_request + end + + def test_comment_on_card + payload = { 'commits' => [{ 'message' => commit_message, + 'author' => { 'name' => 'John Doe' }, + 'url' => 'http://github.com/commit' }], + 'repository' => { 'name' => 'whatever' }, + 'ref' => 'refs/heads/master' } + svc = service :push, @data, payload + assert_commented('abc123') + assert_commented('abc456') + @stubs.post("/1/cards") { [200, {}, ''] } + svc.receive_push + @stubs.verify_stubbed_calls + end + + private + + def call_hook_on_service svc, method + case method + when :push + svc.receive_push + when :pull_request + svc.receive_pull_request + end + end + + def assert_commented(card_id) + @stubs.post "/1/cards/#{card_id}/actions/comments" do |env| + assert_equal 'api.trello.com', env[:url].host + assert_match 'text=' + CGI.escape('John Doe added commit http://github.com/commit'), env[:body] + [200, {}, ''] + end + end + + def assert_cards_created(svc, method = :push) + @stubs.post "/1/cards" do |env| + assert_equal 'api.trello.com', env[:url].host + [200, {}, ''] + end + call_hook_on_service svc, method + end + + def assert_no_cards_created(svc, method = :push) + @stubs.post "/1/cards" do + raise "This should not be called" + end + call_hook_on_service svc, method + end + + def correct_description + 'Author: Tom Preston-Werner + +http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325 + +Repo: grit + +Branch: master + +Commit Message: stub git call for Grit#heads test f:15 Case#1' + end + + def service(*args) + super Service::Trello, *args + end + + def commit_message + <<-EOT +Example message + +Fixes https://trello.com/c/abc123 +Closes https://trello.com/c/abc456/longer-url +EOT + end +end diff --git a/test/twilio_test.rb b/test/twilio_test.rb new file mode 100644 index 000000000..3b07c15d4 --- /dev/null +++ b/test/twilio_test.rb @@ -0,0 +1,117 @@ +require File.expand_path('../helper', __FILE__) + +module Twilio + module REST + class Client + def connect_and_send(request) + { + "account_sid" => "account_sid", + "api_version" => "2010-04-01", + "body" => "rtomayko has pushed 1 commit(s) to grit", + "date_created" => "Wed, 23 Oct 2011 20 =>01 =>40 +0000", + "date_sent" => nil, + "date_updated" => "Wed, 18 Aug 2010 20 =>01 =>40 +0000", + "direction" => "outbound-api", + "from" => "+12223334444", + "price" => nil, + "sid" => "SM90c6fc909d8504d45ecdb3a3d5b3556e", + "status" => "queued", + "to" => "+15556667777", + "uri" => "/2010-04-01/Accounts/account_sid/SMS/Messages.json" + } + end + end + end +end + +class TwilioTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = { + 'account_sid' => 'account_sid', + 'auth_token' => 'auth_token', + 'from_phone' => '+12223334444', + 'to_phone' => '+15556667777', + 'master_only' => '0' + } + @payload = { + "after" => "a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "ref" => "refs/heads/master", + "before" => "4c8124ffcf4039d292442eeccabdeca5af5c5017", + "compare" => "http://github.com/mojombo/grit/compare/4c8124ffcf4039d292442eeccabdeca5af5c5017...a47fd41f3aa4610ea527dcc1669dfdb9c15c5425", + "forced" => false, + "created" => false, + "deleted" => false, + + "repository" => { + "name" => "grit", + "url" => "http://github.com/mojombo/grit", + "owner" => { "name" => "mojombo", "email" => "tom@mojombo.com" } + }, + + "pusher" => { + "name" => "rtomayko" + }, + + "commits" => [ + { + "distinct" => true, + "removed" => [], + "message" => "[#WEB-249 status:31 resolution:1] stub git call for Grit#heads test", + "added" => [], + "timestamp" => "2007-10-10T00:11:02-07:00", + "modified" => ["lib/grit/grit.rb", "test/helper.rb", "test/test_grit.rb"], + "url" => "http://github.com/mojombo/grit/commit/06f63b43050935962f84fe54473a7c5de7977325", + "author" => { "name" => "Tom Preston-Werner", "email" => "tom@mojombo.com" }, + "id" => "06f63b43050935962f84fe54473a7c5de7977325" + } + ] + } + end + + def test_push + svc = service(@data, @payload) + assert_equal 1, @payload['commits'].size + assert_equal 'rtomayko', @payload['pusher']['name'] + assert_equal 'grit', @payload['repository']['name'] + + @stubs.post "/2010-04-01/Accounts/account_sid/SMS/Messages.json" do |env| + [200, {}, ''] + end + + twilio_response = svc.receive_push + assert twilio_response.is_a?(Twilio::REST::Message) + assert_equal 'rtomayko has pushed 1 commit(s) to grit', twilio_response.body + end + + def test_push_master_only_on_non_master + non_master_payload = @payload + non_master_payload["ref"] = "refs/heads/non-master" + + data_with_master_only = @data + data_with_master_only['master_only'] = 1 + + svc = service(data_with_master_only, non_master_payload) + twilio_response = svc.receive_push + assert_equal twilio_response, nil + end + + def test_push_master_only_on_master + data_with_master_only = @data + data_with_master_only['master_only'] = 1 + + @stubs.post "/2010-04-01/Accounts/account_sid/SMS/Messages.json" do |env| + [200, {}, ''] + end + + svc = service(data_with_master_only, @payload) + twilio_response = svc.receive_push + assert twilio_response.is_a?(Twilio::REST::Message) + assert_equal 'rtomayko has pushed 1 commit(s) to grit', twilio_response.body + end + + def service(*args) + super Service::Twilio, *args + end +end + diff --git a/test/twitter_test.rb b/test/twitter_test.rb new file mode 100644 index 000000000..019932a6c --- /dev/null +++ b/test/twitter_test.rb @@ -0,0 +1,155 @@ +require File.expand_path('../helper', __FILE__) + +class TwitterTest < Service::TestCase + TWITTER_SHORT_URL_LENGTH_HTTPS = 23 + + def test_push + svc = service({'token' => 't', 'secret' => 's'}, payload) + + def svc.shorten_url(*args) 'short' end + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_equal 3, svc.statuses.size + svc.statuses.each do |st| + assert_match 'grit', st + end + end + + def test_oauth_consumer + svc = service({'token' => 't', 'secret' => 's'}, payload) + + svc.secrets = {'twitter' => {'key' => 'ck', 'secret' => 'cs'}} + assert_equal 'ck', svc.consumer_key + assert_equal 'cs', svc.consumer_secret + assert svc.consumer + end + + def test_tweet_length + p = payload + p['commits'][0]['message']="This is a very long message specifically designed to test the new behaviour of the twitter service hook with extremely long tweets. As should be happening now." + svc = service({'token' => 't', 'secret' => 's'}, p) + + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + + svc.statuses.each do |st| + st = st.gsub(/http[^ ]+/, "a"*TWITTER_SHORT_URL_LENGTH_HTTPS) # replace the URL with a substitute for the shortened one + assert st.length<=140 + end + end + + # Make sure that whitespace in the original commit message is preserved + def test_whitespace + p = payload + p['commits'][0]['message']="message \nwith\n\n weird whitespace " + svc = service({'token' => 't', 'secret' => 's'}, p) + + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_match p['commits'][0]['message'], svc.statuses[0] + end + + # Make sure that asterisks in the original commit message are replaced + def test_asterisk_replace + p = payload + p['commits'][0]['message']="message * with * stars" + svc = service({'token' => 't', 'secret' => 's'}, p) + + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_match "message ﹡ with ﹡ stars", svc.statuses[0] + end + + # Make sure that GitHub @mentions are injected with a zero-width space + # so that they don't turn into (potentially unmatching) twitter @mentionds + def test_mentions + p = payload + p['commits'][0]['message']="This commit was done by @sgolemon" + p['commits'][1]['message']="@sgolemon committed this" + p['commits'][2]['message']="@sgolemon made a @ @\ttest for @kdaigle" + svc = service({'token' => 't', 'secret' => 's'}, p) + + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_equal 3, svc.statuses.size + svc.statuses.each do |st| + # Any @ which is followed by a word character is an error + assert !st.match('@(?=[[:word:]])') + # Any @ which is followed by a U+200b ZERO WIDTH SPACE but not a word + # character is an error + assert !st.match('@(?=\u200b[^[:word:]])') + end + end + + def service(*args) + super Service::Twitter, *args + end + + def test_filter_branch + svc = service({'token' => 't', 'secret' => 's', 'filter_branch' => 'tweet' }, payload) + + def svc.shorten_url(*args) 'short' end + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_equal 0, svc.statuses.size + end + + def test_filter_branch_partial + svc = service({'token' => 't', 'secret' => 's', 'filter_branch' => 'ast' }, payload) + + def svc.shorten_url(*args) 'short' end + def svc.statuses + @statuses ||= [] + end + + def svc.post(status) + statuses << status + end + + svc.receive_push + assert_equal 3, svc.statuses.size + end + +end diff --git a/test/typetalk_test.rb b/test/typetalk_test.rb new file mode 100644 index 000000000..5e09b6249 --- /dev/null +++ b/test/typetalk_test.rb @@ -0,0 +1,62 @@ +require File.expand_path('../helper', __FILE__) + +class TypetalkTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @stubs.post "/oauth2/access_token" do |env| + form = Faraday::Utils.parse_query(env[:body]) + assert_equal 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', form['client_id'] + assert_equal 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', form['client_secret'] + assert_equal 'client_credentials', form['grant_type'] + assert_equal 'topic.post', form['scope'] + [200, {}, '{ "access_token": "TestToken" }'] + end + end + + def test_push + @stubs.post "/api/v1/topics/1" do |env| + form = Faraday::Utils.parse_query(env[:body]) + headers = env[:request_headers] + assert_equal 'Bearer TestToken', headers['Authorization'] + assert_equal "dragon3 has pushed 2 commit(s) to master at dragon3/github-services\nhttps://github.com/dragon3/github-services/compare/06f63b43050935962f84fe54473a7c5de7977325...06f63b43050935962f84fe54473a7c5de7977326", form['message'] + [200, {}, ''] + end + + svc = service(:push, {'client_id' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'client_secret' => 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', + 'topic' => '1'}, payload_for_push_test) + svc.receive_push + end + + def test_pull_request + @stubs.post "/api/v1/topics/1" do |env| + form = Faraday::Utils.parse_query(env[:body]) + headers = env[:request_headers] + assert_equal 'Bearer TestToken', headers['Authorization'] + assert_equal "defunkt opened pull request #5: booya\nhttps://github.com/mojombo/magik/pulls/5", form['message'] + [200, {}, ''] + end + svc = service(:pull_request, {'client_id' => 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', + 'client_secret' => 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', + 'topic' => '1'}, pull_payload) + svc.receive_pull_request + end + + def service(*args) + super Service::Typetalk, *args + end + + def payload_for_push_test + { + 'ref' => 'refs/heads/master', + 'compare' => 'https://github.com/dragon3/github-services/compare/06f63b43050935962f84fe54473a7c5de7977325...06f63b43050935962f84fe54473a7c5de7977326', + 'pusher' => { 'name' => 'dragon3', }, + 'commits' => [ + {'id' => '06f63b43050935962f84fe54473a7c5de7977325'}, + {'id' => '06f63b43050935962f84fe54473a7c5de7977326'}], + 'repository' => {'name' => 'dragon3/github-services'}, + } + end + +end + diff --git a/test/unfuddle_test.rb b/test/unfuddle_test.rb new file mode 100644 index 000000000..7479e71c8 --- /dev/null +++ b/test/unfuddle_test.rb @@ -0,0 +1,35 @@ +require File.expand_path('../helper', __FILE__) + +class UnfuddleTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.get '/api/v1/people.json' do |env| + assert_equal 's.unfuddle.com', env[:url].host + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + [200, {}, [{:email => 'tom@mojombo.com', :account_id => 1}].to_json] + end + + @stubs.post '/api/v1/repositories/2/changesets.json' do |env| + assert_equal 's.unfuddle.com', env[:url].host + assert_equal basic_auth(:u, :p), env[:request_headers]['authorization'] + [200, {'Location' => '/abc'}, ''] + end + + @stubs.put '/abc' do + [200, {}, ''] + end + + svc = service({ + 'repo_id' => '2.0', 'subdomain' => 's', + 'username' => 'u', 'password' => 'p'}, payload) + svc.receive_push + end + + def service(*args) + super Service::Unfuddle, *args + end +end + diff --git a/test/web_test.rb b/test/web_test.rb new file mode 100644 index 000000000..deee14054 --- /dev/null +++ b/test/web_test.rb @@ -0,0 +1,138 @@ +require File.expand_path('../helper', __FILE__) + +class WebTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + svc = service({ + 'url' => 'http://monkey:secret@abc.com/foo/?a=1', + 'secret' => '' + }, payload) + + @stubs.post "/foo/" do |env| + assert_equal 'push', env[:request_headers]['x-github-event'] + assert_match /^guid\-0\.\d+$/, env[:request_headers]['x-github-delivery'] + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization'] + assert_match /form/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'a' => '1'}, params) + body = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal '1', body['a'] + recv = JSON.parse(body['payload']) + assert_equal payload, recv + assert_nil env[:request_headers]['X-Hub-Signature'] + assert_equal '1', body['a'] + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_without_scheme + svc = service({ + 'url' => 'abc.com/foo/?a=1', + 'secret' => '' + }, payload) + + @stubs.post "/foo/" do |env| + assert_equal 'abc.com', env[:url].host + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_with_secret + svc = service({ + 'url' => 'http://abc.com/foo', + 'secret' => 'monkey' + }, payload) + + @stubs.post "/foo" do |env| + assert_nil env[:request_headers]['authorization'] + assert_match /form/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_equal 'sha1='+OpenSSL::HMAC.hexdigest(Service::Web::HMAC_DIGEST, + 'monkey', env[:body]), + env[:request_headers]['X-Hub-Signature'] + body = Faraday::Utils.parse_nested_query(env[:body]) + recv = JSON.parse(body['payload']) + assert_equal payload, recv + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_as_json + svc = service({ + 'url' => 'http://monkey:secret@abc.com/foo?a=1', + 'content_type' => 'json' + }, payload) + + @stubs.post "/foo" do |env| + assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization'] + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'a' => '1'}, params) + assert_match /json/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_nil env[:request_headers]['X-Hub-Signature'] + assert_equal payload, JSON.parse(env[:body]) + [200, {}, ''] + end + + svc.receive_event + end + + def test_push_as_json_with_secret + svc = service({ + 'url' => 'http://abc.com/foo', + 'secret' => 'monkey', + 'content_type' => 'json' + }, payload) + + @stubs.post "/foo" do |env| + assert_nil env[:request_headers]['authorization'] + assert_match /json/, env[:request_headers]['content-type'] + assert_equal 'abc.com', env[:url].host + assert_equal 'sha1='+OpenSSL::HMAC.hexdigest(Service::Web::HMAC_DIGEST, + 'monkey', env[:body]), + env[:request_headers]['X-Hub-Signature'] + assert_equal payload, JSON.parse(env[:body]) + [200, {}, ''] + end + + svc.receive_event + end + + def test_log_data + data = { + 'url' => 'http://user:pass@abc.com/def', + 'secret' => 'monkey', + 'content_type' => 'json' + } + + svc = service(data, payload) + assert_equal 2, svc.log_data.size, svc.log_data.inspect + assert_equal 'http://user:********@abc.com/def', svc.log_data['url'] + assert_equal data['content_type'], svc.log_data['content_type'] + end + + def test_log_message + data = { + 'url' => 'http://abc.com/def', + 'secret' => 'monkey', + 'content_type' => 'json' + } + + svc = service(data, payload) + assert_match /^\[[^\]]+\] 200 web\/push \{/, svc.log_message(200) + end + + def service(*args) + super Service::Web, *args + end +end diff --git a/test/web_translate_it_test.rb b/test/web_translate_it_test.rb new file mode 100644 index 000000000..98593f82d --- /dev/null +++ b/test/web_translate_it_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class WebTranslateItTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/api/projects/a/refresh_files" do |env| + assert_equal 'webtranslateit.com', env[:url].host + data = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 1, JSON.parse(data['payload'])['a'] + [200, {}, ''] + end + + svc = service({'api_key' => 'a'}, :a => 1) + svc.receive_push + end + + def service(*args) + super Service::WebTranslateIt, *args + end +end + diff --git a/test/weblate_test.rb b/test/weblate_test.rb new file mode 100644 index 000000000..9d9786f5e --- /dev/null +++ b/test/weblate_test.rb @@ -0,0 +1,24 @@ +require File.expand_path('../helper', __FILE__) + +class WeblateTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def test_push + @stubs.post "/hooks/github/" do |env| + assert_equal 'weblate.example.org', env[:url].host + assert_equal 'application/x-www-form-urlencoded', + env[:request_headers]['content-type'] + [200, {}, ''] + end + + svc = service :push, + {'url' => 'weblate.example.org'}, payload + svc.receive_push + end + + def service(*args) + super Service::Weblate, *args + end +end diff --git a/test/windowsazure_test.rb b/test/windowsazure_test.rb new file mode 100644 index 000000000..7fb21288f --- /dev/null +++ b/test/windowsazure_test.rb @@ -0,0 +1,40 @@ +require File.expand_path("../helper", __FILE__) + +class WindowsAzureTest < Service::TestCase + include Service::HttpTestMethods + + def test_push + + data = { + "hostname" => "test.scm.azurewebsites.net", + "username" => "test_user", + "password" => "test_pwd" + } + + svc = service(data, payload) + + @stubs.post "/deploy?scmType=GitHub" do |env| + assert_equal 'push', env[:request_headers]['x-github-event'] + assert_equal 'Basic dGVzdF91c2VyOnRlc3RfcHdk', env[:request_headers]['authorization'] + assert_equal env[:url].host, data['hostname'] + assert_match /form/, env[:request_headers]['content-type'] + params = Faraday::Utils.parse_nested_query(env[:url].query) + assert_equal({'scmType' => 'GitHub'}, params) + body = Faraday::Utils.parse_nested_query(env[:body]) + assert_equal 'GitHub', body['scmType'] + recv = JSON.parse(body['payload']) + assert_equal payload, recv + assert_nil env[:request_headers]['X-Hub-Signature'] + assert_equal 'GitHub', body['scmType'] + [200, {}, ""] + end + + svc.receive_event + end + + def service_class + Service::WindowsAzure + end + +end + diff --git a/test/xmpp_im_test.rb b/test/xmpp_im_test.rb new file mode 100644 index 000000000..b6a85e6c7 --- /dev/null +++ b/test/xmpp_im_test.rb @@ -0,0 +1,383 @@ +class XmppImTest < Service::TestCase + class MockXmpp4r + + def send(message) + @messages = [] if @messages.nil? + @messages.push message + end + + def get_messages + @messages + end + + def connect(host, port) + @host = host + @port = port + end + + def get_host + @host + end + + def get_port + @port + end + + def close + + end + + end + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @config = { + 'JID' => 'me@example.com', + 'password' => 'password', + 'receivers' => 'bare@server full@server/resource', + 'notify_fork' => '1', + 'notify_wiki' => '1', + 'notify_comments' => '1', + 'notify_watch' => '1', + 'notify_issue' => '1', + 'notify_pull' => '1', + 'is_test' => true + } + @mock = MockXmpp4r.new() + end + + def service(*args) + xmppIm = super Service::XmppIm, *args + xmppIm.set_connection @mock + xmppIm + end + + def test_no_jid_provided + assert_raises(Service::ConfigurationError, 'JID is required') do + config = @config + config['JID'] = '' + service(config, payload).receive_event + end + end + + def test_no_password_provided + assert_raises(Service::ConfigurationError, 'Password is required') do + config = @config + config['password'] = '' + service(config, payload).receive_event + end + end + + def illegal_jid_throws_error + assert_raises(Service::ConfigurationError, 'Illegal receiver JID') do + config = @config + config['receivers'] = 'bare@server illegal@server@what?' + service(config, payload).receive_event + end + end + + def test_errors_on_bad_port + assert_raises(Service::ConfigurationError, 'XMPP port must be numeric') do + config = @config + config['port'] = 'PORT NUMBER' + service(config, payload).receive_event + end + end + + def sets_custom_port + config = @config + port = '1234' + config['port'] = port + service(config, payload).receive_event + assert_equal(Integer(port), @mock.get_port) + end + + def sets_custom_host + config = @config + host = 'github.com' + config['host'] = host + service(config, payload).receive_event + assert_equal(host, @mock.get_host) + end + + def uses_default_host + config = @config + service(config, payload).receive_event + assert_true(@mock.get_host.nil?) + end + + def uses_default_port + config = @config + service(config, payload).receive_event + assert_equal(5222, @mock.get_port) + end + + def test_returns_false_if_not_on_filtered_branch + config = @config + config['filter_branch'] = 'development' + assert_equal( + false, + service(config, payload).receive_event, + 'Should have filtered by branch' + ) + end + + def test_returns_true_if_part_matched_filtered_branch + config = @config + config['filter_branch'] = 'ast' + assert_equal( + true, + service(config, payload).receive_event, + 'Should not have filtered this branch' + ) + end + + def test_returns_false_if_fork_event_and_not_notifiying + config = @config + config['notify_fork'] = '0' + assert_equal( + false, + service(:fork, config, payload).receive_event, + 'Should not reported fork event' + ) + end + + def test_returns_false_if_watch_event_and_not_notifiying + config = @config + config['notify_watch'] = '0' + assert_equal( + false, + service(:watch, config, payload).receive_event, + 'Should not reported watch event' + ) + end + + def test_returns_false_if_comment_event_and_not_notifiying + config = @config + config['notify_comments'] = '0' + assert_equal( + false, + service(:issue_comment, config, payload).receive_event, + 'Should not reported comment event' + ) + end + + def test_returns_false_if_wiki_event_and_not_notifiying + config = @config + config['notify_wiki'] = '0' + assert_equal( + false, + service(:gollum, config, payload).receive_event, + 'Should not reported wiki event' + ) + end + + def test_returns_false_if_issue_event_and_not_notifiying + config = @config + config['notify_issue'] = '0' + assert_equal( + false, + service(:issues, config, payload).receive_event, + 'Should not reported issues event' + ) + end + + def test_returns_false_if_pull_event_and_not_notifiying + config = @config + config['notify_pull'] = '0' + assert_equal( + false, + service(:pull_request_review_comment, config, payload).receive_event, + 'Should not reported pull event' + ) + end + + def test_generates_expected_push_message + config = @config + message = '' + service(:push, config, payload).receive_event + assert_equal( + 8, + @mock.get_messages().length, + 'Expected 8 messages' + ) + assert_equal( + "[grit] @rtomayko pushed 3 new commits to master: http://github.com/mojombo/grit/compare/4c8124f...a47fd41", + @mock.get_messages()[0].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] stub git call for Grit#heads test f:15 Case#1 - Tom Preston-Werner", + @mock.get_messages()[1].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] clean up heads test f:2hrs - Tom Preston-Werner", + @mock.get_messages()[2].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] add more comments throughout - Tom Preston-Werner", + @mock.get_messages()[3].body, + 'Expected push message not received' + ) + end + + def test_generates_error_if_push_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:commit_comment, @config, {}).receive_event + end + end + + def test_sends_messages_to_expected_jids + service(:commit_comment, @config, commit_comment_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + ::Jabber::JID.new('full@server/resource'), + @mock.get_messages()[1].to + ) + assert_equal( + ::Jabber::JID.new('bare@server'), + @mock.get_messages()[0].to + ) + end + + def test_generates_expected_commit_comment_message + message = '[grit] @defunkt commented on commit 441e568: this... https://github.com/mojombo/magik/commit/441e5686a726b79bcdace639e2591a60718c9719#commitcomment-3332777' + service(:commit_comment, @config, commit_comment_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected commit comment message not received' + ) + end + + def test_generates_error_if_commit_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:commit_comment, @config, {}).receive_event + end + end + + def test_generates_expected_issue_comment_message + message = '[grit] @defunkt commented on issue #5: this... ' + service(:issue_comment, @config, issue_comment_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected issue comment message not received' + ) + end + + def test_generates_error_if_issue_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:issue_comment, @config, {}).receive_event + end + end + + def test_generates_expected_issues_message + message = '[grit] @defunkt opened issue #5: booya ' + service(:issues, @config, issues_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected issues message not received' + ) + end + + def test_generates_error_if_issues_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:issues, @config, {}).receive_event + end + end + + def test_generates_expected_pull_request_message + message = '[grit] @defunkt opened pull request #5: booya (master...feature) https://github.com/mojombo/magik/pulls/5' + service(:pull_request, @config, pull_request_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected pull request message not received' + ) + end + + def test_generates_error_if_pull_request_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + payload = pull_request_payload + payload['pull_request']['base'] = {} + service(:pull_request, @config, payload).receive_event + end + end + + def test_generates_expected_pull_request_review_comment_message + message = '[grit] @defunkt commented on pull request #5 03af7b9: very... https://github.com/mojombo/magik/pull/5#discussion_r18785396' + service(:pull_request_review_comment, @config, pull_request_review_comment_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected pull request review comment message not received' + ) + end + + def test_generates_error_if_pull_request_review_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:pull_request_review_comment, @config, {}).receive_event + end + end + + def test_generates_expected_gollum_message + message = '[grit] @defunkt modified 1 page https://github.com/mojombo/magik/wiki/Foo' + service(:gollum, @config, gollum_payload).receive_event + assert_equal( + 4, + @mock.get_messages().length, + 'Expected 4 messages' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected wiki edit summmary message not received' + ) + assert_equal( + 'User created page "Foo" https://github.com/mojombo/magik/wiki/Foo', + @mock.get_messages()[1].body, + 'Expected wiki page edit not received' + ) + end + + def test_generates_error_if_gollum_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:gollum, @config, {}).receive_event + end + end + +end diff --git a/test/xmpp_muc_test.rb b/test/xmpp_muc_test.rb new file mode 100644 index 000000000..6f0691a6a --- /dev/null +++ b/test/xmpp_muc_test.rb @@ -0,0 +1,377 @@ +class XmppMucTest < Service::TestCase + class MockXmpp4r + + def send(message) + @messages = [] if @messages.nil? + @messages.push message + end + + def get_messages + @messages + end + + def connect(host, port) + @host = host + @port = port + end + + def get_host + @host + end + + def get_port + @port + end + + def exit + + end + + end + + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + + @config = { + 'JID' => 'me@example.com', + 'password' => 'password', + 'room' => 'status', + 'server' => 'muc.example.com', + 'nickname' => 'github', + 'notify_fork' => '1', + 'notify_wiki' => '1', + 'notify_comments' => '1', + 'notify_watch' => '1', + 'notify_issue' => '1', + 'notify_pull' => '1', + 'is_test' => true + } + @mock = MockXmpp4r.new() + end + + def service(*args) + xmppMuc = super Service::XmppMuc, *args + xmppMuc.set_muc_connection @mock + xmppMuc + end + + def test_no_jid_provided + assert_raises(Service::ConfigurationError, 'JID is required') do + config = @config + config['JID'] = '' + service(config, payload).receive_event + end + end + + def test_no_password_provided + assert_raises(Service::ConfigurationError, 'Password is required') do + config = @config + config['password'] = '' + service(config, payload).receive_event + end + end + + def test_no_room_provided + assert_raises(Service::ConfigurationError, 'Room is required') do + config = @config + config['room'] = '' + service(config, payload).receive_event + end + end + + def test_no_server_provided + assert_raises(Service::ConfigurationError, 'Server is required') do + config = @config + config['server'] = '' + service(config, payload).receive_event + end + end + + def test_errors_on_bad_port + assert_raises(Service::ConfigurationError, 'XMPP port must be numeric') do + config = @config + config['port'] = 'PORT NUMBER' + service(config, payload).receive_event + end + end + + + def sets_custom_port + config = @config + port = '1234' + config['port'] = port + service(config, payload).receive_event + assert_equal(Integer(port), @mock.get_port) + end + + def sets_custom_host + config = @config + host = 'github.com' + config['host'] = host + service(config, payload).receive_event + assert_equal(host, @mock.get_host) + end + + def uses_default_host + config = @config + service(config, payload).receive_event + assert_true(@mock.get_host.nil?) + end + + def uses_default_port + config = @config + service(config, payload).receive_event + assert_equal(5222, @mock.get_port) + end + + def test_returns_false_if_not_on_filtered_branch + config = @config + config['filter_branch'] = 'development' + assert_equal( + false, + service(config, payload).receive_event, + 'Should have filtered by branch' + ) + end + + def test_returns_true_if_part_matched_filtered_branch + config = @config + config['filter_branch'] = 'ast' + assert_equal( + true, + service(config, payload).receive_event, + 'Should not have filtered this branch' + ) + end + + def test_returns_false_if_fork_event_and_not_notifiying + config = @config + config['notify_fork'] = '0' + assert_equal( + false, + service(:fork, config, payload).receive_event, + 'Should not reported fork event' + ) + end + + def test_returns_false_if_watch_event_and_not_notifiying + config = @config + config['notify_watch'] = '0' + assert_equal( + false, + service(:watch, config, payload).receive_event, + 'Should not reported watch event' + ) + end + + def test_returns_false_if_comment_event_and_not_notifiying + config = @config + config['notify_comments'] = '0' + assert_equal( + false, + service(:issue_comment, config, payload).receive_event, + 'Should not reported comment event' + ) + end + + def test_returns_false_if_wiki_event_and_not_notifiying + config = @config + config['notify_wiki'] = '0' + assert_equal( + false, + service(:gollum, config, payload).receive_event, + 'Should not reported wiki event' + ) + end + + def test_returns_false_if_issue_event_and_not_notifiying + config = @config + config['notify_issue'] = '0' + assert_equal( + false, + service(:issues, config, payload).receive_event, + 'Should not reported issues event' + ) + end + + def test_returns_false_if_pull_event_and_not_notifiying + config = @config + config['notify_pull'] = '0' + assert_equal( + false, + service(:pull_request_review_comment, config, payload).receive_event, + 'Should not reported pull event' + ) + end + + def test_generates_expected_push_message + config = @config + message = '' + service(:push, config, payload).receive_event + assert_equal( + 4, + @mock.get_messages().length, + 'Expected 4 messages' + ) + assert_equal( + "[grit] @rtomayko pushed 3 new commits to master: http://github.com/mojombo/grit/compare/4c8124f...a47fd41", + @mock.get_messages()[0].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] stub git call for Grit#heads test f:15 Case#1 - Tom Preston-Werner", + @mock.get_messages()[1].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] clean up heads test f:2hrs - Tom Preston-Werner", + @mock.get_messages()[2].body, + 'Expected push message not received' + ) + assert_equal( + "[grit/master] add more comments throughout - Tom Preston-Werner", + @mock.get_messages()[3].body, + 'Expected push message not received' + ) + end + + def test_generates_error_if_push_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:commit_comment, @config, {}).receive_event + end + end + + def test_generates_expected_commit_comment_message + message = '[grit] @defunkt commented on commit 441e568: this... https://github.com/mojombo/magik/commit/441e5686a726b79bcdace639e2591a60718c9719#commitcomment-3332777' + service(:commit_comment, @config, commit_comment_payload).receive_event + assert_equal( + 1, + @mock.get_messages().length, + 'Expected 1 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected commit comment message not received' + ) + end + + def test_generates_error_if_commit_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:commit_comment, @config, {}).receive_event + end + end + + def test_generates_expected_issue_comment_message + message = '[grit] @defunkt commented on issue #5: this... ' + service(:issue_comment, @config, issue_comment_payload).receive_event + assert_equal( + 1, + @mock.get_messages().length, + 'Expected 1 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected issue comment message not received' + ) + end + + def test_generates_error_if_issue_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:issue_comment, @config, {}).receive_event + end + end + + def test_generates_expected_issues_message + message = '[grit] @defunkt opened issue #5: booya ' + service(:issues, @config, issues_payload).receive_event + assert_equal( + 1, + @mock.get_messages().length, + 'Expected 1 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected issues message not received' + ) + end + + def test_generates_error_if_issues_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:issues, @config, {}).receive_event + end + end + + def test_generates_expected_pull_request_message + message = '[grit] @defunkt opened pull request #5: booya (master...feature) https://github.com/mojombo/magik/pulls/5' + service(:pull_request, @config, pull_request_payload).receive_event + assert_equal( + 1, + @mock.get_messages().length, + 'Expected 1 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected pull request message not received' + ) + end + + def test_generates_error_if_pull_request_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + payload = pull_request_payload + payload['pull_request']['base'] = {} + service(:pull_request, @config, payload).receive_event + end + end + + def test_generates_expected_pull_request_review_comment_message + message = '[grit] @defunkt commented on pull request #5 03af7b9: very... https://github.com/mojombo/magik/pull/5#discussion_r18785396' + service(:pull_request_review_comment, @config, pull_request_review_comment_payload).receive_event + assert_equal( + 1, + @mock.get_messages().length, + 'Expected 1 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected pull request review comment message not received' + ) + end + + def test_generates_error_if_pull_request_review_comment_message_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:pull_request_review_comment, @config, {}).receive_event + end + end + + def test_generates_expected_gollum_message + message = '[grit] @defunkt modified 1 page https://github.com/mojombo/magik/wiki/Foo' + service(:gollum, @config, gollum_payload).receive_event + assert_equal( + 2, + @mock.get_messages().length, + 'Expected 2 message' + ) + assert_equal( + message, + @mock.get_messages()[0].body, + 'Expected wiki edit summmary message not received' + ) + assert_equal( + 'User created page "Foo" https://github.com/mojombo/magik/wiki/Foo', + @mock.get_messages()[1].body, + 'Expected wiki page edit not received' + ) + end + + def test_generates_error_if_gollum_cant_be_generated + assert_raises(Service::ConfigurationError, /Unable to build message/) do + service(:gollum, @config, {}).receive_event + end + end + +end diff --git a/test/youtrack_test.rb b/test/youtrack_test.rb new file mode 100644 index 000000000..9ff62d7c1 --- /dev/null +++ b/test/youtrack_test.rb @@ -0,0 +1,173 @@ +require File.expand_path('../helper', __FILE__) + +class YouTrackTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = {'base_url' => 'http://yt.com/abc', 'committers' => 'c', + 'username' => 'u', 'password' => 'p'} + end + + def valid_process_stubs + @stubs.post "/abc/rest/user/login" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'u', env[:params]["login"] + assert_equal 'p', env[:params]["password"] + [200, {'Set-Cookie' => 'sc'}, ''] + end + + @stubs.get "/abc/rest/admin/user" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'sc', env[:request_headers]['Cookie'] + assert_equal 'tom@mojombo.com', env[:params]['q'] + assert_equal 'c', env[:params]['group'] + assert_equal '0', env[:params]['start'] + [200, {}, %()] + end + + @stubs.get "/abc/rest/admin/user/mojombo" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'sc', env[:request_headers]['Cookie'] + [200, {}, %()] + end + end + + def valid_process_stubs_case_1 + valid_process_stubs + + @stubs.post "/abc/rest/issue/case-1/execute" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'sc', env[:request_headers]['Cookie'] + assert_equal 'zomg omg', env[:params]['command'] + assert_equal 'mojombo', env[:params]['runAs'] + [200, {}, ''] + end + end + + + + def test_push + valid_process_stubs_case_1 + + hash = payload + hash['commits'].first['message'].sub! /Case#1/, '#case-1 zomg omg' + + svc = service(@data, hash) + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_push_no_command + valid_process_stubs + + @stubs.post "/abc/rest/issue/case-2/execute" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'sc', env[:request_headers]['Cookie'] + assert_equal 'comment', env[:params]['command'] + assert_equal 'mojombo', env[:params]['runAs'] + [200, {}, ''] + end + + hash = payload + hash['commits'].first['message'].sub! /Case#1/, '#case-2' + + svc = service(@data, hash) + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_branch_match + valid_process_stubs + + @stubs.post "/abc/rest/issue/case-2/execute" do |env| + assert_equal 'yt.com', env[:url].host + assert_equal 'sc', env[:request_headers]['Cookie'] + assert_equal 'comment', env[:params]['command'] + assert_equal 'mojombo', env[:params]['runAs'] + [200, {}, ''] + end + + hash = payload + hash['commits'].first['message'].sub! /Case#1/, '#case-2!! zomg omg' + hash['ref'] = 'refs/heads/master' + + svc = service(@data.merge({'branch' => 'master dev' }), hash) + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_branch_mismatch + payload = {'ref' => 'refs/heads/master'} + + svc = service({'base_url' => '', 'branch' => 'other'}, payload) + + # Missing payload settings would lead to an exception on processing. Processing + # should never happen with mismatched branches. + assert_nothing_raised { svc.receive_push } + end + + def test_process_not_distinct + valid_process_stubs_case_1 + + hash = payload + hash['commits'].each { |commit| + commit['distinct'] = false + } + hash['commits'].first['message'].sub! /Case#1/, '#case-1 zomg omg' + + svc = service(@data.merge({'process_distinct' => '0'}), hash) + + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_process_distinct + valid_process_stubs_case_1 + + hash = payload + hash['commits'].first['message'].sub! /Case#1/, '#case-1 zomg omg' + + svc = service(@data.merge({'process_distinct' => '1'}), hash) + + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_dont_process_not_distinct + + hash = payload + hash['commits'].each { |commit| + commit['distinct'] = false + } + hash['commits'].first['message'].sub! /Case#1/, '#case-1 zomg omg' + + svc = service(@data.merge({'process_distinct' => '1'}), hash) + + svc.receive_push + + @stubs.verify_stubbed_calls + end + + def test_pull_request_event + valid_process_stubs_case_1 + + hash = pull_payload + hash['action'] = 'closed' + hash['sender'] = { 'login' => 'Tom Preston-Werner', 'email' => 'tom@mojombo.com'} + hash['pull_request']['body'] = '#case-1 zomg omg' + + svc = service(@data, hash) + + svc.receive_pull_request + + @stubs.verify_stubbed_calls + end + + def service(*args) + super Service::YouTrack, *args + end +end diff --git a/test/zendesk_test.rb b/test/zendesk_test.rb new file mode 100644 index 000000000..bd10b90eb --- /dev/null +++ b/test/zendesk_test.rb @@ -0,0 +1,50 @@ +require File.expand_path("../helper", __FILE__) + +class ZendeskTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + @data = { "username" => "user", "password" => "pass", "subdomain" => "igor" } + @payload = { :message => "My name is zd#12345 what do you say?" } + end + + def test_subdomain + post + svc = service :event, @data, @payload + svc.receive_event + end + + def test_domain + post + + svc = service :event, @data.merge("subdomain" => "igor.zendesk.com"), @payload + svc.receive_event + end + + def test_unmatched_ticket + post + + svc = service :event, @data, { :message => "Nothing to match" } + svc.receive_event + + begin + @stubs.verify_stubbed_calls + rescue RuntimeError + else + assert_true false + end + end + + def post + @stubs.post "/api/v2/integrations/github?ticket_id=12345" do |env| + assert_equal "application/json", env[:request_headers]["Content-Type"] + assert_equal "igor.zendesk.com", env[:url].host + assert_equal "12345", env[:params]["ticket_id"] + assert_equal JSON.generate({ :payload => @payload }), env[:body] + [ 201, {}, "" ] + end + end + + def service(*args) + super Service::Zendesk, *args + end +end diff --git a/test/zohoprojects_test.rb b/test/zohoprojects_test.rb new file mode 100644 index 000000000..c66620fcb --- /dev/null +++ b/test/zohoprojects_test.rb @@ -0,0 +1,34 @@ +require File.expand_path('../helper', __FILE__) + +class ZohoProjectsTest < Service::TestCase + def setup + @stubs = Faraday::Adapter::Test::Stubs.new + end + + def data + { + "project_id" => "1234", + "token" => "a13d", + } + end + + def test_push + url = "/serviceHook" + @stubs.post url do |env| + assert_equal 'projects.zoho.com', env[:url].host + params = Faraday::Utils.parse_query env[:body] + assert_equal '1234', params['pId'] + assert_equal 'a13d', params['authtoken'] + assert_equal payload, JSON.parse(params['payload']) + [200, {}, ''] + end + + svc = service :push, data, payload + svc.receive + end + + def service(*args) + super Service::ZohoProjects, *args + end +end + diff --git a/vendor/activesupport-2.2.2/CHANGELOG b/vendor/activesupport-2.2.2/CHANGELOG deleted file mode 100644 index 1cd5e5846..000000000 --- a/vendor/activesupport-2.2.2/CHANGELOG +++ /dev/null @@ -1,1257 +0,0 @@ -*2.2 (November 21st, 2008)* - -* TimeZone offset tests: use current_period, to ensure TimeZone#utc_offset is up-to-date [Geoff Buesing] - -* Update bundled TZInfo to 0.3.12 [Geoff Buesing] - -* Increment the version of our altered memcache-client to prevent confusion caused when the 1.5.0 gem is installed. - -* Fixed the option merging in Array#to_xml #1126 [Rudolf Gavlas] - -* Make I18n::Backend::Simple reload its translations in development mode [DHH/Sven Fuchs] - -* TimeWithZone#freeze: preload instance variables so that we can actually freeze [Geoff Buesing] - -* Fix Brasilia timezone #1180 [Marcus Derencius, Kane] - -* Time#advance recognizes fractional days and weeks. Deprecate Durations of fractional months and years #970 [Tom Lea] - -* Add ActiveSupport::Rescuable module abstracting ActionController::Base rescue_from features. [Norbert Crombach, Pratik] - -* Switch from String#chars to String#mb_chars for the unicode proxy. [Manfred Stienstra] - - This helps with 1.8.7 compatibility and also improves performance for some operations by reducing indirection. - -* TimeWithZone #wday, #yday and #to_date avoid trip through #method_missing [Geoff Buesing] - -* Added Time, Date, DateTime and TimeWithZone #past?, #future? and #today? #720 [Clemens Kofler, Geoff Buesing] - -* Fixed Sri Jayawardenepura time zone to map to Asia/Colombo [Jamis Buck] - -* Added Inflector#parameterize for easy slug generation ("Donald E. Knuth".parameterize => "donald-e-knuth") #713 [Matt Darby] - -* Changed cache benchmarking to be reported in milliseconds [DHH] - -* Fix Ruby's Time marshaling bug in pre-1.9 versions of Ruby: utc instances are now correctly unmarshaled with a utc zone instead of the system local zone [#900 state:resolved] [Luca Guidi, Geoff Buesing] - -* Add Array#in_groups which splits or iterates over the array in specified number of groups. #579. [Adrian Mugnolo] Example: - - a = (1..10).to_a - a.in_groups(3) #=> [[1, 2, 3, 4], [5, 6, 7, nil], [8, 9, 10, nil]] - a.in_groups(3, false) #=> [[1, 2, 3, 4], [5, 6, 7], [8, 9, 10]] - -* Fix TimeWithZone unmarshaling: coerce unmarshaled Time instances to utc, because Ruby's marshaling of Time instances doesn't respect the zone [Geoff Buesing] - -* Added Memoizable mixin for caching simple lazy loaded attributes [Josh Peek] - -* Move the test related core_ext stuff out of core_ext so it's only loaded by the test helpers. [Michael Koziarski] - -* Add Inflection rules for String#humanize. #535 [dcmanges] - - ActiveSupport::Inflector.inflections do |inflect| - inflect.human(/_cnt$/i, '\1_count') - end - - 'jargon_cnt'.humanize # => 'Jargon count' - -* TimeWithZone: when crossing DST boundary, treat Durations of days, months or years as variable-length, and all other values as absolute length. A time + 24.hours will advance exactly 24 hours, but a time + 1.day will advance 23-25 hours, depending on the day. Ensure consistent behavior across all advancing methods [Geoff Buesing] - -* Added TimeZone #=~, to support matching zones by regex in time_zone_select. #195 [Ernie Miller] - -* Added Array#second through Array#fifth as aliases for Array#[1] through Array#[4] + Array#forty_two as alias for Array[41] [DHH] - -* Added test/do declaration style testing to ActiveSupport::TestCase [DHH via Jay Fields] - -* Added Object#present? which is equivalent to !Object#blank? [DHH] - -* Added Enumberable#many? to encapsulate collection.size > 1 [DHH/Damian Janowski] - -* Add more standard Hash methods to ActiveSupport::OrderedHash [Steve Purcell] - -* Namespace Inflector, Dependencies, OrderedOptions, and TimeZone under ActiveSupport [Josh Peek] - -* Added StringInquirer for doing things like StringInquirer.new("production").production? # => true and StringInquirer.new("production").development? # => false [DHH] - -* Fixed Date#end_of_quarter to not blow up on May 31st [#289 state:resolved] (Danger) - - -*2.1.0 (May 31st, 2008)* - -* TimeZone#to_s shows offset as GMT instead of UTC, because GMT will be more familiar to end users (see time zone selects used by Windows OS, google.com and yahoo.com.) Reverts [8370] [Geoff Buesing] - -* Hash.from_xml: datetime xml types overflow to Ruby DateTime class when out of range of Time. Adding tests for utc offsets [Geoff Buesing] - -* TimeWithZone #+ and #- : ensure overflow to DateTime with Numeric arg [Geoff Buesing] - -* Time#to_json: don't convert to utc before encoding. References #175 [Geoff Buesing] - -* Remove unused JSON::RESERVED_WORDS, JSON.valid_identifier? and JSON.reserved_word? methods. Resolves #164. [Cheah Chu Yeow] - -* Adding Date.current, which returns Time.zone.today if config.time_zone is set; otherwise returns Date.today [Geoff Buesing] - -* TimeWithZone: date part getter methods (#year #mon #day etc) are defined on class; no longer relying on method_missing [Geoff Buesing] - -* Time.zone.parse return nil for strings with no date information [Geoff Buesing] - -* Time.zone.parse respects offset information in string. Resolves #105. [Scott Fleckenstein, Geoff Buesing] - -* Added Ruby 1.8 implementation of Process.daemon - -* Duration #since and #ago with no argument (e.g., 5.days.ago) return TimeWithZone when config.time_zone is set. Introducing Time.current, which returns Time.zone.now if config.time_zone is set, otherwise just returns Time.now [Geoff Buesing] - -* Time#since behaves correctly when passed a Duration. Closes #11527 [kemiller] - -* Add #getutc alias for DateTime#utc [Geoff Buesing] - -* Refactor TimeWithZone: don't send #since, #ago, #+, #-, #advance through method_missing [Geoff Buesing] - -* TimeWithZone respects config.active_support.use_standard_json_time_format [Geoff Buesing] - -* Add config.active_support.escape_html_entities_in_json to allow disabling of html entity escaping. [rick] - -* Improve documentation. [Xavier Noria] - -* Modified ActiveSupport::Callbacks::Callback#call to accept multiple arguments. - -* Time #yesterday and #tomorrow behave correctly crossing DST boundary. Closes #7399 [sblackstone] - -* TimeWithZone: Adding tests for dst and leap day edge cases when advancing time [Geoff Buesing] - -* TimeWithZone#method_missing: send to utc to advance with dst correctness, otherwise send to time. Adding tests for time calculations methods [Geoff Buesing] - -* Add config.active_support.use_standard_json_time_format setting so that Times and Dates export to ISO 8601 dates. [rick] - -* TZInfo: Removing unneeded TimezoneProxy class [Geoff Buesing] - -* TZInfo: Removing unneeded TimezoneIndexDefinition, since we're not including Indexes::Timezones [Geoff Buesing] - -* Removing unnecessary uses_tzinfo helper from tests, given that TZInfo is now bundled [Geoff Buesing] - -* Bundling abbreviated version of TZInfo gem 0.3.8: only the classes and zone definitions required to support Rails time zone features are included. If a recent version of the full TZInfo gem is installed, this will take precedence over the bundled version [Geoff Buesing] - -* TimeWithZone#marshal_load does zone lookup via Time.get_zone, so that tzinfo/Olson identifiers are handled [Geoff Buesing] - -* Time.zone= accepts TZInfo::Timezone instances and Olson identifiers; wraps result in TimeZone instance [Geoff Buesing] - -* TimeWithZone time conversions don't need to be wrapped in TimeOrDateTime, because TZInfo does this internally [Geoff Buesing] - -* TimeWithZone#usec returns 0 instead of error when DateTime is wrapped [Geoff Buesing] - -* Improve documentation. [Radar, Jan De Poorter, chuyeow, xaviershay, danger, miloops, Xavier Noria, Sunny Ripert] - -* Ensure that TimeWithZone#to_yaml works when passed a YAML::Emitter. [rick] - -* Ensure correct TimeWithZone#to_date [Geoff Buesing] - -* Make TimeWithZone work with tzinfo 0.2.x: use TZInfo::Timezone#zone_identifier alias for #abbreviation, silence warnings on tests. Raise LoadError when TZInfo version is < 0.2 by sniffing for TZInfo::TimeOrDateTime constant. Move all tzinfo-dependent TimeZone tests into uses_tzinfo block [Geoff Buesing] - -* Time, DateTime and TimeWithZone #in_time_zone defaults to Time.zone. Removing now unneeded #in_current_time_zone [Geoff Buesing] - -* TZInfo caches Timezone instances in its own internal hash cache, so TimeZone::MAPPING doesn't need to cache them as well [Geoff Buesing] - -* Adding TimeZone#parse [Geoff Buesing] - -* Adding TimeZone#at and DateTime#to_f [Geoff Buesing] - -* TimeWithZone responds to Ruby 1.9 weekday-named query methods [Geoff Buesing] - -* TimeWithZone caches TZInfo::TimezonePeriod used for time conversion so that it can be reused, and enforces DST rules correctly when instance is created from a local time [Geoff Buesing] - -* Fixed that BufferedLogger should create its own directory if one doesn't already exist #11285 [lotswholetime] - -* Fix Numeric time tests broken by DST change by anchoring them to fixed times instead of Time.now. Anchor TimeZone#now DST test to time specified with Time.at instead of Time.local to work around platform differences with Time.local and DST representation [Geoff Buesing] - -* Removing unneeded #change_time_zone method from Time, DateTime and TimeWithZone [Geoff Buesing] - -* TimeZone #local and #now correctly enforce DST rules [Geoff Buesing] - -* TimeWithZone instances correctly enforce DST rules. Adding TimeZone#period_for_utc [Geoff Buesing] - -* test_time_with_datetime_fallback expects DateTime.local_offset instead of DateTime.now.offset [Geoff Buesing] - -* Adding TimeWithZone #marshal_dump and #marshal_load [Geoff Buesing] - -* Add OrderedHash#to_hash [josh] - -* Adding Time#end_of_day, _quarter, _week, and _year. #9312 [Juanjo Bazan, Tarmo Tänav, BigTitus] - -* Adding TimeWithZone#between? [Geoff Buesing] - -* Time.=== returns true for TimeWithZone instances [Geoff Buesing] - -* TimeWithZone #+ and #- behave consistently with numeric arguments regardless of whether wrapped time is a Time or DateTime; consistenty answers false to #acts_like?(:date) [Geoff Buesing] - -* Add String#squish and String#squish! to remove consecutive chunks of whitespace. #11123 [jordi, Henrik N] - -* Serialize BigDecimals as Floats when using to_yaml. #8746 [ernesto.jimenez] - -* Adding TimeWithZone #to_yaml, #to_datetime, #eql? and method aliases for duck-typing compatibility with Time [Geoff Buesing] - -* TimeWithZone #in_time_zone returns +self+ if zone argument is the same as #time_zone [Geoff Buesing] - -* Adding TimeWithZone #to_a, #to_f, #to_i, #httpdate, #rfc2822 [Geoff Buesing] - -* Pruning unneeded TimeWithZone#change_time_zone_to_current [Geoff Buesing] - -* Time#zone=, #in_time_zone and #change_time_zone accept a Duration [Geoff Buesing] - -* Time#in_time_zone handles Time.local instances correctly [Geoff Buesing] - -* Pruning unneeded Time#change_time_zone_to_current. Enhanced docs to #change_time_zone to explain the difference between this method and #in_time_zone [Geoff Buesing] - -* TimeZone#new method renamed #local; when used with Time.zone, constructor now reads: Time.zone.local() [Geoff Buesing] - -* Added Base64.encode64s to encode values in base64 without the newlines. This makes the values immediately usable as URL parameters or memcache keys without further processing [DHH] - -* Remove :nodoc: entries around the ActiveSupport test/unit assertions. #10946 [dancroak, jamesh] - -* Add Time.zone_default accessor for setting the default time zone. Rails::Configuration.time_zone sets this. #10982 [Geoff Buesing] - -* cache.fetch(key, :force => true) to force a cache miss. [Jeremy Kemper] - -* Support retrieving TimeZones with a Duration. TimeZone[-28800] == TimeZone[-480.minutes]. [rick] - -* TimeWithZone#- added, so that #- can handle a Time or TimeWithZone argument correctly [Geoff Buesing] - -* with_timezone test helper renamed with_env_tz, to distinguish between setting ENV['TZ'] and setting Time.zone in tests [Geoff Buesing] - -* Time#- coerces TimeWithZone argument to a Time instance so that difference in seconds can be calculated. Closes #10914 [Geoff Buesing, yyyc514] - -* Adding UTC zone to TimeZone; TimeWithZone no longer has to fake UTC zone with nil [Geoff Buesing] - -* Time.get_zone refactored to private method, given that the encapsulated logic is only useful internally [Geoff Buesing] - -* Time.zone uses thread-local variable for thread safety. Adding Time.use_zone, for overriding Time.zone locally inside a block. Removing unneeded Time.zone_reset! [Geoff Buesing] - -* TimeZone#to_s uses UTC rather than GMT; reapplying change that was undone in [8679]. #1689 [Cheah Chu Yeow] - -* Time.days_in_month defaults to current year if no year is supplied as argument #10799 [Radar], uses Date.gregorian_leap? to determine leap year, and uses constant lookup to determine days in month [Geoff Buesing] - -* Adding Time and DateTime #compare_with_coercion, which layers behavior on #<=> so that any combination of Time, DateTime and ActiveSupport::TimeWithZone instances can be chronologically compared [Geoff Buesing] - -* TimeZone#now returns an ActiveSupport::TimeWithZone [Geoff Buesing] - -* Time #in_current_time_zone and #change_time_zone_to_current return self when Time.zone is nil [Geoff Buesing] - -* Remove unneeded #to_datetime_default_s alias for DateTime#to_s, given that we inherit a #to_default_s from Date that does exactly the same thing [Geoff Buesing] - -* Refactor Time and DateTime #to_formatted_s: use ternary instead of nested if/else [Geoff Buesing] - -* Adding Time and DateTime #formatted_offset, for outputting +HH:MM utc offset strings with cross-platform consistency [Geoff Buesing] - -* Adding alternate_utc_string option to TimeZone#formatted_offset. Removing unneeded TimeZone#offset. [Geoff Buesing] - -* Introduce ActiveSupport::TimeWithZone, for wrapping Time instances with a TimeZone. Introduce instance methods to Time for creating TimeWithZone instances, and class methods for managing a global time zone. [Geoff Buesing] - -* Replace non-dst-aware TimeZone class with dst-aware class from tzinfo_timezone plugin. TimeZone#adjust and #unadjust are no longer available; tzinfo gem must now be present in order to perform time zone calculations, via #local_to_utc and #utc_to_local methods. [Geoff Buesing] - -* Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. #10727 [Josh Peek] - -* Introducing DateTime #utc, #utc? and #utc_offset, for duck-typing compatibility with Time. Closes #10002 [Geoff Buesing] - -* Time#to_json uses Numeric#to_utc_offset_s to output a cross-platform-consistent representation without having to convert to DateTime. References #9750 [Geoff Buesing] - -* Refactor number-to-HH:MM-string conversion logic from TimeZone#formatted_offset to a reusable Numeric#to_utc_offset_s method. [Geoff Buesing] - -* Continue evolution toward ActiveSupport::TestCase. #10679 [Josh Peek] - -* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] - -* Added ActiveSupport::Gzip.decompress/compress(source) as an easy wrapper for Zlib [Tobias Luetke] - -* Included MemCache-Client to make the improved ActiveSupport::Cache::MemCacheStore work out of the box [Bob Cottrell, Eric Hodel] - -* Added ActiveSupport::Cache::* framework as an extraction from ActionController::Caching::Fragments::* [DHH] - -* Fixed String#titleize to work for strings with 's too #10571 [trek] - -* Changed the implementation of Enumerable#group_by to use a double array approach instead of a hash such that the insert order is honored [DHH/Marcel] - -* remove multiple enumerations from ActiveSupport::JSON#convert_json_to_yaml when dealing with date/time values. [rick] - -* Hash#symbolize_keys skips keys that can't be symbolized. #10500 [Brad Greenlee] - -* Ruby 1.9 compatibility. #1689, #10466, #10468, #10554, #10594, #10632 [Cheah Chu Yeow, Pratik Naik, Jeremy Kemper, Dirkjan Bussink, fxn] - -* TimeZone#to_s uses UTC rather than GMT. #1689 [Cheah Chu Yeow] - -* Refactor of Hash#symbolize_keys! to use Hash#replace. Closes #10420 [ReinH] - -* Fix HashWithIndifferentAccess#to_options! so it doesn't clear the options hash. Closes #10419 [ReinH] - - -*2.0.1* (December 7th, 2007) - -* Added Array#from and Array#to that behaves just from String#from and String#to [DHH] - -* Fix that empty collections should be treated as empty arrays regardless of whitespace for Hash#from_xml #10255 [adamj] - -* Time#time_with_datetime_fallback, Time#to_datetime, Date#to_datetime and String#to_datetime honor Ruby's default calendar reform setting. #10201 [Geoff Buesing] - -* Change Time and DateTime #end_of_month to return last second of month instead of beginning of last day of month. Closes #10200 [Geoff Buesing] - -* Speedup String#blank? [Jeremy Kemper, Koz] - -* Add documentation for Hash#diff. Closes #9306 [Tarmo Tänav] - -* Add new superclass_delegating_accessors. Similar to class inheritable attributes but with subtly different semantics. [Koz, Tarmo Tänav] - -* Change JSON to encode %w(< > &) as 4 digit hex codes to be in compliance with the JSON spec. Closes #9975 [Josh Peek, Cheah Chu Yeow, Tim Pope] - -* Fix JSON encoding/decoding bugs dealing with /'s. Closes #9990 [Rick, theamazingrando] - -* Introduce a base class for all test cases used by rails applications. ActiveSupport::TestCase [Koz] - - The intention is to use this to reduce the amount of monkeypatching / overriding that - is done to test/unit's classes. - -* Document Enumerable and Hash #to_json. #9970 [Cheah Chu Yeow] - -* Hash#to_xml handles symbol values. #9954 [Assaf] - -* Hash#symbolize_keys behaves well with integer keys. #9890 [PotatoSalad] - -* Multibyte: String#slice supports regexp argument. #9646 [yob] - -* object.duplicable? returns true if object.dup is safe. False for nil, true, false, symbols, and numbers; true otherwise. #9333 [sur] - -* Time, Date and DateTime #advance accept :weeks option. #9866 [Geoff Buesing] - -* Fix Time#years_ago and #years_since from leap days. #9865 [Geoff Buesing] - -* Time and DateTime#advance accept :hours, :minutes, and :seconds options. #9825 [Geoff Buesing] - -* Fix Date#years_ago and #years_since from leap days. #9864 [Geoff Buesing] - -* Refactor Time and Date#months_since and #months_ago to use #advance. #9863 [Geoff Buesing] - -* Rebundle Builder 2.1.2 but prefer a newer RubyGem if available. [Jeremy Kemper] - -* Add Range#overlaps?(range), Range#include?(range), and Range#step without a block. [brandon] - -* Correct BufferedLogger#level? checks. #9806 [wildchild, Johan Sorensen] - -* String#to_xs uses Eric Wong's fast_xs extension, if available, for Builder speedup. http://bogomips.org/fast_xs/ [Jeremy Kemper] - -* Introduce BasicObject as Builder::BlankSlate for Ruby 1.9 forward compatibility. [Jeremy Kemper] - -* Unbundle Builder in favor of a gem dependency. [Jeremy Kemper] - -* Disambiguate Time, Date, and DateTime#to_json formatting. #9750 [Geoff Buesing, Cheah Chu Yeow] - -* Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. #9751 [Cheah Chu Yeow] - -* BufferedLogger#auto_flushing = N flushes the log every N messages. Buffers with an array instead of string. Disabling auto_flushing still flushes when the buffer hits a maximum size, as a failsafe against memory-gobbling. [Jeremy Kemper] - -* Fixed Date#xmlschema for dates outside the range of what can be created with Time #9744 [Geoff Buesing] - -* Fixed that La Paz was included in -25200 and -14400 offsets when it should only be in -14400 #9735 [bermi] - -* Fixed JSON encoding to use quoted keys according to the JSON standard. #8762 [choonkat, Cheah Chu Yeow] - -* Alias Object#send to send! for Ruby 1.9 forward compatibility. [Jeremy Kemper] - -* Backport Object#instance_variable_defined? for Ruby < 1.8.6. [Jeremy Kemper] - -* BufferedLogger#add converts the message to a string. #9702, #9724 [eigentone, DrMark, tomafro] - -* Added ActiveSupport::BufferedLogger as a duck-typing alternative (albeit with no formatter) to the Ruby Logger, which provides a very nice speed bump (inspired by Ezra's buffered logger) [DHH] - -* Object#instance_exec produces fewer garbage methods. [Mauricio Fernandez] - -* Decode json strings as Dates/Times if they're using a YAML-compatible format. Closes #9614 [Rick] - -* Fixed cache_page to use the request url instead of the routing options when picking a save path. #8614 [Josh Peek] - -* Object.subclasses_of includes anonymous subclasses. [Jeremy Kemper] - -* Fixed that pluralizing an empty string should return the same empty string, not "s". #7720 [Josh Peek] - -* Added call to inspect on non-string classes for the logger #8533 [codahale] - -* Deprecation: remove deprecated :mday option from Time, Date, and DateTime#change. [Jeremy Kemper] - -* Fix JSON decoder with nested quotes and commas. #9579 [zdennis] - -* Hash#to_xml doesn't double-unescape. #8806 [Ezran] - -* Added Array#rand #9170 [Norbert Crombach]. Examples: - - [].rand # => nil - ['a'].rand # => 'a' - [1,2,3].rand # => 1 or 2 or 3 - -* Deprecation: removed Reloadable. [Jeremy Kemper] - -* Make the utf-handler return the correct value for non-matching regular expressions. Closes #9049 [manfred] - -* Add ljust, rjust and center to utf8-handler. Closes #9165 [manfred] - -* Fix Time#advance bug when trying to advance a year from leap day. Closes #8655 [gbuesing] - -* Add support for []= on ActiveSupport::Multibyte::Chars. Closes #9142. [ewan, manfred] - -* Added Array#extract_options! to encapsulate the pattern of getting an options hash out of a variable number of parameters. #8759 [Norbert Crombach] - -* Let alias_attribute work with attributes with initial capital letters (legacy columns etc). Closes #8596 [mpalmer] - -* Added Hash#except which is the inverse of Hash#slice -- return the hash except the keys that are specified [DHH] - -* Added support for pluralization with a different starting letter than the singular version (cow/kine) #4929 [norri_b/hasmanyjosh] - -* Demote Hash#to_xml to use XmlSimple#xml_in_string so it can't read files or stdin. #8453 [candlerb, Jeremy Kemper] - -* Backport clean_logger changes to support ruby 1.8.2 [mislav] - -* Added proper handling of arrays #8537 [hasmanyjosh] - - Before: - Hash.from_xml '' - # => {:images => nil} - - Hash.from_xml 'foo.jpg' - # => {:images => {:image => "foo.jpg"}} - - Hash.from_xml 'foo.jpgbar.jpg' - # => {:images => {:image => ["foo.jpg", "bar.jpg"]}} - - After: - Hash.from_xml '' - # => {:images => []} - - Hash.from_xml 'foo.jpg' - # => {:images => ["foo.jpg"]} - - Hash.from_xml 'foo.jpgbar.jpg' - # => {:images => ["foo.jpg", "bar.jpg"]} - -* Improve Time and Date test coverage. #8646 [Josh Peek] - -* Add Date#since, ago, beginning_of_day, and end_of_day. Date + seconds works now. #8575 [Geoff Buesing] - -* String#to_time overflows to DateTime. Add String#to_datetime. #8572 [Geoff Buesing] - -* Date.yesterday and .tomorrow. #8571 [Geoff Buesing] - -* Readable Date and DateTime#inspect. #8570 [Geoff Buesing] - -* Move common DateTime calculations to Date. #8536 [Geoff Buesing] - -* Added Date#change (like Time#change) [DHH] - -* DateTime#to_time converts to Time unless out of range. #8512 [Geoff Buesing] - -* Date#to_datetime, #to_s(:rfc822). #8512 [Geoff Buesing] - -* Time durations use since instead of + for accuracy. #8513 [Geoff Buesing] - -* escape <'s and >'s in JSON strings. #8371 [Rick] - -* Inflections: MatrixTest -> MatrixTests instead of MatricesTest. #8496 [jbwiv] - -* Multibyte strings respond_to the String methods they proxy so they can be duck-typed. #6549 [Tuxie] - -* Array#to_xml yields the builder just like Hash and ActiveRecord::Base. #8472 [seth] - -* Date, Time, and DateTime support formatting blocks in addition to strftime strings. Introduce :long_ordinal format, e.g. "February 21st, 2005". #8191 [Coda Hale] - -* Document Object#blank?. #6491 [Chris Mear] - -* Date, Time, and DateTime#to_json. #8399 [wycats] - -* Simplify API of assert_difference by passing in an expression that is evaluated before and after the passed in block. See documenation for examples of new API. [Marcel Molina Jr.] - -* Added assert_difference and assert_no_difference to test/unit assertions [Tobias Luetke] - -* Removed breakpointer and Binding.of_caller in favor of relying on ruby-debug by Kent Sibilev since the breakpointer has been broken since Ruby 1.8.4 and will not be coming back [DHH] - -* Added parsing of file type in Hash.xml_in so you can easily do file uploads with base64 from an API [DHH] - - - David - R0lGODlhkACZAPUAAM5lcfjrtMQCG=\n - - - ...becomes: - - attributes = { :person => { :name => "David", :avatar => # } } - attributes[:person][:avatar].content_type # => "image/jpg" - attributes[:person][:avatar].original_filename # => "me.jpg" - attributes[:person][:avatar].read # => binary data of the file - - Which is duck-type compatible with the files that you get when doing multipart uploads through HTML. - -* Improved multibyte performance by relying less on exception raising #8159 [Blaine] - -* Use XSD-compatible type names for Hash#to_xml and make the converters extendable #8047 [Tim Pope] - -* Added yielding of builder in Hash#to_xml [DHH] - -* Hash#with_indifferent_access now also converts hashes kept in arrays to indifferent access (makes it easier to treat HTML and XML parameters the same) [DHH] - -* Hash#to_xml supports YAML attributes. #7502 [jonathan] - -* Refactor ActiveSupport::JSON to be less obtuse. Add support for JSON decoding by way of Syck with ActiveSupport::JSON.decode(json_string). Prevent hash keys that are JavaScript reserved words from being unquoted during encoding. [Sam Stephenson] - -* alias_method_chain preserves the original method's visibility. #7854 [Jonathan Viney] - -* Update Dependencies to ignore constants inherited from ancestors. Closes #6951. [Nicholas Seckar] - -* Array#to_query preserves its ordering. #7756 [Greg Spurrier] - -* Out-of-range Time calculations transparently overflow to DateTime. Introduce Time#to_datetime. #7706, #7715 [Geoff Buesing] - -* DateTime calculations analogous to the Date and Time extensions. #7693 [Geoff Buesing] - -* Give DateTime correct .to_s implementations, lets it play nice with ActiveRecord quoting. #7649 [Geoff Buesing] - -* Add File.atomic_write, allows you to write large files in an atomic manner, preventing users from seeing half written files. [Koz] - -* Allow users to provide custom formatters to Logger. [aeden] - -* Hash#to_query CGI-escapes its keys. [Jeremy Kemper] - -* Optimize Class Inheritable Attributes so that unnecessary hashes are not created. Closes #7472 [Bruce Perens] - -* :db format for Date#to_s [Jeremy Kemper] - Date.new(2007, 1, 27).to_s(:db) # => '2007-01-27' - -* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] - -* Added Hash#to_query to turn a hash of values into a form-encoded query string [Nicholas Seckar] - -* Increase test coverage for subclasses_of. Closes #7335. [Roman2K, Nicholas Seckar] - -* Remove unused code from Duration#inspect. Closes #7180. [Rich Collins] - -* Added test coverage for Inflector.inflections.clear. Closes #7179. [Rich Collins] - -* ActiveSupport::Multibyte::Handlers::UTF8Handler should raise when a range and an integer are passed in (just like the native implementation). Closes #7176 [Rich Collins] - -* A couple extra tests for #classify. Closes #7273. [Josh Susser] - -* Better docs for Object extensions [zackchandler, Jamis Buck] - -* Fix that Dates couldn't be subtracted from Dates after [5940]. [Sam Stephenson] - -* Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_date? to facilitate duck-typing. [Jamis Buck] - -* Make 1.months and friends accurate by introducing a Duration class. #6835 [eventualbuddha] - - -*1.4.2* (March 12th, 2007) - -* Ruby 1.8.6 and 1.9 define private Time#to_date and #to_datetime; make them -public for compatibility. [Jeremy Kemper] - -* Deprecation: warn on stderr if RAILS_DEFAULT_LOGGER isn't set yet. [Jeremy Kemper] - - -*1.4.1* (February 5th, 2007) - -* Optimize Class Inheritable Attributes so that unnecessary hashes are not created. Closes #7472 [Bruce Perens] - -* Added :instance_writer option to #mattr_writer/accessor, #cattr_writer/accessor, and #class_inheritable_writer to skip the creation of the instance writer. [Rick] - -* Full test coverage for Inflector. #7228 [Dan Kubb] - - -*1.4.0* (January 16th, 2007) - -* Document Inflector.ordinalize and merge docs from String inflections. #7023 [smeade] - -* Unbundle flexmock. [Jeremy Kemper] - -* Fix Dependencies.autoloaded? to ignore anonymous modules. Closes #6561. [Nicholas Seckar] - -* Update load once paths to prevent nested once constants from being detected and claimed by an external non-once load. [Nicholas Seckar] - -* Deprecation: silence warnings when reporting test errors. [Jeremy Kemper] - -* Hash#slice(*keys) returns a new hash with only the given keys. #slice! replaces the hash with only the given keys. Works with HashWithIndifferentAccess also. [Jeremy Kemper] - -* HashWithIndifferentAccess#to_hash converts to a Hash with String keys and the same default value. [Jeremy Kemper] - -* Fix remove_constant to correctly handle constant names of the form "::A::...". References #6720. [Nicholas Seckar] - -* Fixed Array#to_xml when it contains a series of hashes (each piece would get its own XML declaration) #6610 [thkarcher/cyu] - -* Added Time#to_s(:time) which will just return H:M, like 17:44 [DHH] - -* Add Module#attr_accessor_with_default to initialize value of attribute before setting it. Closes #6538. [Stuart Halloway, Marcel Molina Jr.] - -* Hash#to_xml handles keys with the same name as Kernel methods. #6613 [Catfish] - -* Added Time#end_of_day to get 23:59:59 of that day [DHH] - -* Don't quote hash keys in Hash#to_json if they're valid JavaScript identifiers. Disable this with ActiveSupport::JSON.unquote_hash_key_identifiers = false if you need strict JSON compliance. [Sam Stephenson] - -* Lazily load the Unicode Database in the UTF-8 Handler [Rick Olson] - -* Update dependencies to delete partially loaded constants. [Nicholas Seckar] - -* Fix unicode JSON regexp for Onigurama compatibility. #6494 [whitley] - -* update XmlSimple to 1.0.10. Closes #6532. [nicksieger] - -* Update dependencies to allow constants to be defined alongside their siblings. A common case for this is AR model classes with STI; user.rb might define User, Administrator and Guest for example. [Nicholas Seckar] - -* next_week respects DST changes. #6483, #5617, #2353, #2509, #4551 [marclove, rabiedenharn, rails@roetzel.de, jsolson@damogran.org, drbrain@segment7.net] - -* Expose methods added to Enumerable in the documentation, such as group_by. Closes #6170. [sergeykojin@gmail.com, Marcel Molina Jr.] - -* Ensure Chars#tidy_bytes only tidies broken bytes. Closes #6397 [Manfred Stienstra] - -* Add 'unloadable', a method used to mark any constant as requiring an unload after each request. [Nicholas Seckar] - -* Make core_ext/string/access.rb multibyte safe. Closes #6388 [Manfred Stienstra] - -* Make String#chars slicing behaviour consistent with String. Closes #6387 [Manfred Stienstra] - -* Pull in latest multibyte patch. Closes #6346 [Manfred Stienstra] - -* Add ActiveSupport::Multibyte. Provides String#chars which lets you deal with strings as a sequence of chars, not of bytes. Closes #6242 [Julian Tarkhanov, Manfred Stienstra, Thijs van der Vossen & Jan Behrens] - -* Fix issue with #class_inheritable_accessor saving updates to the parent class when initialized with an Array or Hash [mojombo] - -* Hash#to_xml supports Bignum and BigDecimal. #6313 [edibiase] - -* Don't undefine #class in OptionMerger [Rick] - -* Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist until Rails 2.0 [DHH] - -* alias_method_chain works with accessor= methods also. #6153 [Caio Chassot] - -* Fix loadable_constants_for_path to handle load paths that do not end with a slash. [Nicholas Seckar] - -* Fix logic error in determining what was loaded by a given file. Closes #6039. [Nicholas Seckar] - -* Equate Kernel.const_missing with Object.const_missing. Fixes #5988. [Nicholas Seckar] - -* Add ApplicationController special case to Dependencies. [Nicholas Seckar] - -* Don't pad remaining places with in_groups_of if specified padding value is false. [Marcel Molina Jr.] - -* Fix cases where empty xml nodes weren't being translated to nil in Hash.create_from_xml [Rick Olso n] - - # => { :type => 'date' } # WRONG - # => nil # RIGHT - -* Tighten rescue clauses. #5985 [james@grayproductions.net] - -* Inflections: don't singularize -ies plurals. [foamdino@gmail.com, Mark Van Holstyn] - -* Update Initializer to use load_once_paths to avoid plugin reloading. References #5852. [Nicholas Seckar] - -* Use Array#assoc in ActiveSupport::OrderedHash. [Mauricio Fernandez] - -* Greatly increased performance of String.to_json, which speeds up RJS considerably on large pages, fixes #3473 [Shugo Maeda] - -* Detect missing_constants calls from removed modules and fail accordingly. [Nicholas Seckar] - -* Stop using defined? in Dependencies.qualified_const_defined? since defined? may invoke const_missing. [Nicholas Seckar] - -* Dependencies can autoload directories of nested classes. [Jeremy Kemper] - Example: - invoice.rb class Invoice - invoice/lineitem.rb class Invoice::Lineitem - -* Add Deprecation.silence so that Reloadable does not scold itself. [Nicholas Seckar] - -* Add debugging logging to Dependencies. Currently can be enabled with Dependencies.log_activity = true; adding to Initializer and documenting is forthcoming. [Nicholas Seckar] - -* Replace Reloadable with improvements to the Dependencies mechanism. [Nicholas Seckar] - -* DateTime#to_time gives hour/minute/second resolution. #5747 [jon.evans@pobox.com] - -* attr_internal to support namespacing and deprecation. Like attr_* except backed by internally-named instance variable. Set attr_internal_naming_format to change the format from the default '@_%s'. [Jeremy Kemper] - # def foo() @foo__rofl end - # def foo=(v) @foo__rofl = v end - self.attr_internal_naming_format = '@%s__rofl' - attr_internal :foo - -* Raise fully qualified names upon name errors. #5533 [lars@pinds.com, Nicholas Seckar] - -* Add extention to obtain the missing constant from NameError instances. [Nicholas Seckar] - -* Thoroughly document inflections. #5700 [petermichaux@gmail.com] - -* Added Module#alias_attribute [Jamis/DHH]. Example: - - class Content < ActiveRecord::Base - # has a title attribute - end - - class Email < ActiveRecord::Base - alias_attribute :subject, :title - end - - e = Email.find(1) - e.title # => "Superstars" - e.subject # => "Superstars" - e.subject? # => true - e.subject = "Megastars" - e.title # => "Megastars" - -* Deprecation: easier to work with warning behavior as procs; default behaviors for each environment so users needn't update env.rb; and testing pleasure with assert_deprecated, assert_not_deprecated. [Jeremy Kemper] - By default, test prints to $stderr, dev logs, production ignores. - Provide your own per-environment in e.g. config/environments/development.rb: - ActiveSupport::Deprecation.behavior = Proc.new { |message| raise message } - -* First cut of the Rails Deprecation system. [Koz] - -* Strip boolean XML content before checking for 'true' [Rick Olson] - -* Customize default BigDecimal formatting. References #5672 [dave@pragprog.com] - -* Correctly convert to nil when using Hash.create_from_xml. [Rick] - -* Optional identity for Enumerable#sum defaults to zero. #5657 [gensym@mac.com] - -* HashWithIndifferentAccess shouldn't confuse false and nil. #5601 [shugo@ruby-lang.org] - -* Fixed HashWithIndifferentAccess#default #5586 [chris@seagul.co.uk] - -* More compatible Hash.create_from_xml. #5523 [nunemaker@gmail.com] - -* Added Enumerable#sum for calculating a sum from the elements [DHH, jonathan@daikini.com]. Examples: - - [1, 2, 3].sum - payments.sum { |p| p.price * p.tax_rate } - payments.sum(&:price) - - This is instead of payments.inject(0) { |sum, p| sum + p.price } - -* Correct and clarify Array#to_sentence docs. #5458 [brad@madriska.com] - -* alias_method_chain preserves method punctuation so foo, foo?, and foo! may be chained with the same feature. [Jeremy Kemper] - Example: - alias_method_chain :save!, :validation - is equivalent to - alias_method :save_without_validation!, :save! - alias_method :save!, :save_with_validation! - -* Enhance Symbol#to_proc so it works with list objects, such as multi-dimensional arrays. Closes #5295 [nov@yo.rim.or.jp]. Example: - - {1 => "one", 2 => "two", 3 => "three"}.sort_by(&:first).map(&:last) - #=> ["one", "two", "three"] - -* Added Hash.create_from_xml(string) which will create a hash from a XML string and even typecast if possible [DHH]. Example: - - Hash.create_from_xml <<-EOT - - This is a note - 2004-10-10 - - EOT - - ...would return: - - { :note => { :title => "This is a note", :created_at => Date.new(2004, 10, 10) } } - -* Added Jim Weirich's excellent FlexMock class to vendor (Copyright 2003, 2004 by Jim Weirich (jim@weriichhouse.org)) -- it's not automatically required, though, so require 'flexmock' is still necessary [DHH] - -* Fixed that Module#alias_method_chain should work with both foo? foo! and foo at the same time #4954 [anna@wota.jp] - -* to_xml fixes, features, and speedup: introduce :dasherize option that converts updated_at to updated-at if true (the existing default); binary columns get encoding="base64" attribute; nil values get nil="true" attribute to distinguish empty values; add type information for float columns; allow arbitrarily deep :include; include SQL type information as the type attribute. #4989 [Blair Zajac ] - -* Add OrderedHash#values. [Sam Stephenson] - -* Added Array#to_s(:db) that'll produce a comma-separated list of ids [DHH]. Example: - - Purchase.find(:all, :conditions => "product_id IN (#{shops.products.to_s(:db)})" - -* Normalize classify's argument to a String so that it plays nice with Symbols. [Marcel Molina Jr.] - -* Strip out leading schema name in classify. References #5139. [schoenm@earthlink.net] - -* Remove Enumerable#first_match since break(value) handles the use case well enough. [Nicholas Seckar] - - Enumerable#first_match was like detect, but instead of returning the matching element, the yielded value returned. For example: - - user_xml = adapters(:from => User, :to => Xml).first_match do |adapter| - adapter.adapt @user - end - - But this is just as easily done with: - - user_xml = adapters(:from => User, :to => Xml).each do - break adapter.adapt(@user) - end - -* Make Array#in_groups_of just return the grouped collection if a block isn't given. [Marcel Molina Jr.] - -* Don't destroy a HashWithIndifferentAccess if symbolize_keys! or stringify_keys! is called on it. Closes #5076. [Marcel Molina Jr., guy.naor@famundo.com] - -* Document Module::delegate. #5002 [pergesu@gmail.com] - -* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.] - -* Strip out punctuation on predicates or bang methods being aliased with alias_method_chain since target?_without_feature is not a valid method name. Add tests for Module#alias_method_chain. [Marcel Molina Jr.] - -* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.] - -* Allow default options in with_options to be overridden. Closes #4480. [murphy@cYcnus.de] - -* Added Module#alias_method_chain [Jamis Buck] - -* Updated to Builder 2.0 [DHH] - -* Add Array#split for dividing arrays into one or more subarrays by value or block. [Sam Stephenson] - -*1.3.1* (April 6th, 2006) - -* Clean paths inside of exception messages and traces. [Nicholas Seckar] - -* Add Pathname.clean_within for cleaning all the paths inside of a string. [Nicholas Seckar] - -* provide an empty Dependencies::LoadingModule.load which prints deprecation warnings. Lets 1.0 applications function with .13-style environment.rb. - - -*1.3.0* (March 27th, 2006) - -* When possible, avoid incorrectly obtaining constants from parent modules. Fixes #4221. [Nicholas Seckar] - -* Add more tests for dependencies; refactor existing cases. [Nicholas Seckar] - -* Move Module#parent and Module#as_load_path into core_ext. Add Module#parent. [Nicholas Seckar] - -* Add CachingTools::HashCaching to simplify the creation of nested, autofilling hashes. [Nicholas Seckar] - -* Remove a hack intended to avoid unloading the same class twice, but which would not work anyways. [Nicholas Seckar] - -* Update Object.subclasses_of to locate nested classes. This affects Object.remove_subclasses_of in that nested classes will now be unloaded. [Nicholas Seckar] - -* Update Object.remove_subclasses_of to use Class.remove_class, reducing duplication. [Nicholas Seckar] - -* Added Fixnum#seconds for consistency, so you can say 5.minutes + 30.seconds instead of 5.minutes + 30 #4389 [François Beausoleil] - -* Added option to String#camelize to generate lower-cased camel case by passing in :lower, like "super_man".camelize(:lower) # => "superMan" [DHH] - -* Added Hash#diff to show the difference between two hashes [Chris McGrath] - -* Added Time#advance to do precise time time calculations for cases where a month being approximated to 30 days won't do #1860 [Rick Olson] - -* Enhance Inflector.underscore to convert '-' into '_' (as the inverse of Inflector.dasherize) [Jamis Buck] - -* Switched to_xml to use the xml schema format for datetimes. This allows the encoding of time zones and should improve operability. [Koz] - -* Added a note to the documentation for the Date related Numeric extensions to indicate that they're -approximations and shouldn't be used for critical calculations. [Koz] - -* Added Hash#to_xml and Array#to_xml that makes it much easier to produce XML from basic structures [DHH]. Examples: - - { :name => "David", :street_name => "Paulina", :age => 26, :moved_on => Date.new(2005, 11, 15) }.to_xml - - ...returns: - - - Paulina - David - 26 - 2005-11-15 - - -* Moved Jim Weirich's wonderful Builder from Action Pack to Active Support (it's simply too useful to be stuck in AP) [DHH] - -* Fixed that Array#to_sentence will return "" on an empty array instead of ", and" #3842, #4031 [rubyonrails@beautifulpixel.com] - -* Add Enumerable#group_by for grouping collections based on the result of some - block. Useful, for example, for grouping records by date. - - ex. - - latest_transcripts.group_by(&:day).each do |day, transcripts| - p "#{day} -> #{transcripts.map(&:class) * ', '}" - end - "2006-03-01 -> Transcript" - "2006-02-28 -> Transcript" - "2006-02-27 -> Transcript, Transcript" - "2006-02-26 -> Transcript, Transcript" - - Add Array#in_groups_of, for iterating over an array in groups of a certain - size. - - ex. - - %w(1 2 3 4 5 6 7).in_groups_of(3) {|g| p g} - ["1", "2", "3"] - ["4", "5", "6"] - ["7", nil, nil] - - [Marcel Molina Jr., Sam Stephenson] - -* Added Kernel#daemonize to turn the current process into a daemon that can be killed with a TERM signal [DHH] - -* Add 'around' methods to Logger, to make it easy to log before and after messages for a given block as requested in #3809. [Michael Koziarski] Example: - - logger.around_info("Start rendering component (#{options.inspect}): ", - "\n\nEnd of component rendering") { yield } - -* Added Time#beginning_of_quarter #3607 [cohen.jeff@gmail.com] - -* Fix Object.subclasses_of to only return currently defined objects [Jonathan Viney ] - -* Fix constantize to properly handle names beginning with '::'. [Nicholas Seckar] - -* Make String#last return the string instead of nil when it is shorter than the limit [Scott Barron]. - -* Added delegation support to Module that allows multiple delegations at once (unlike Forwardable in the stdlib) [DHH]. Example: - - class Account < ActiveRecord::Base - has_one :subscription - delegate :free?, :paying?, :to => :subscription - delegate :overdue?, :to => "subscription.last_payment" - end - - account.free? # => account.subscription.free? - account.overdue? # => account.subscription.last_payment.overdue? - -* Fix Reloadable to handle the case where a class that has been 'removed' has not yet been garbage collected. [Nicholas Seckar] - -* Don't allow Reloadable to be included into Modules. - -* Remove LoadingModule. [Nicholas Seckar] - -* Add documentation for Reloadable::Subclasses. [Nicholas Seckar] - -* Add Reloadable::Subclasses which handles the common case where a base class should not be reloaded, but its subclasses should be. [Nicholas Seckar] - -* Further improvements to reloading code [Nicholas Seckar, Trevor Squires] - - - All classes/modules which include Reloadable can define reloadable? for fine grained control of reloading - - Class.remove_class uses Module#parent to access the parent module - - Class.remove_class expanded to handle multiple classes in a single call - - LoadingModule.clear! has been removed as it is no longer required - - Module#remove_classes_including has been removed in favor of Reloadable.reloadable_classes - -* Added reusable reloading support through the inclusion of the Relodable module that all subclasses of ActiveRecord::Base, ActiveRecord::Observer, ActiveController::Base, and ActionMailer::Base automatically gets. This means that these classes will be reloaded by the dispatcher when Dependencies.mechanism = :load. You can make your own models reloadable easily: - - class Setting - include Reloadable - end - - Reloading a class is done by removing its constant which will cause it to be loaded again on the next reference. [DHH] - -* Added auto-loading support for classes in modules, so Conductor::Migration will look for conductor/migration.rb and Conductor::Database::Settings will look for conductor/database/settings.rb [Nicholas Seckar] - -* Add Object#instance_exec, like instance_eval but passes its arguments to the block. (Active Support will not override the Ruby 1.9 implementation of this method.) [Sam Stephenson] - -* Add Proc#bind(object) for changing a proc or block's self by returning a Method bound to the given object. Based on why the lucky stiff's "cloaker" method. [Sam Stephenson] - -* Fix merge and dup for hashes with indifferent access #3404 [kenneth.miller@bitfield.net] - -* Fix the requires in option_merger_test to unbreak AS tests. [Sam Stephenson] - -* Make HashWithIndifferentAccess#update behave like Hash#update by returning the hash. #3419, #3425 [asnem@student.ethz.ch, JanPrill@blauton.de, Marcel Molina Jr.] - -* Add ActiveSupport::JSON and Object#to_json for converting Ruby objects to JSON strings. [Sam Stephenson] - -* Add Object#with_options for DRYing up multiple calls to methods having shared options. [Sam Stephenson] Example: - - ActionController::Routing::Routes.draw do |map| - # Account routes - map.with_options(:controller => 'account') do |account| - account.home '', :action => 'dashboard' - account.signup 'signup', :action => 'new' - account.logout 'logout', :action => 'logout' - end - end - -* Introduce Dependencies.warnings_on_first_load setting. If true, enables warnings on first load of a require_dependency. Otherwise, loads without warnings. Disabled (set to false) by default. [Jeremy Kemper] - -* Active Support is warnings-safe. #1792 [Eric Hodel] - -* Introduce enable_warnings counterpart to silence_warnings. Turn warnings on when loading a file for the first time if Dependencies.mechanism == :load. Common mistakes such as redefined methods will print warnings to stderr. [Jeremy Kemper] - -* Add Symbol#to_proc, which allows for, e.g. [:foo, :bar].map(&:to_s). [Marcel Molina Jr.] - -* Added the following methods [Marcel Molina Jr., Sam Stephenson]: - * Object#copy_instance_variables_from(object) to copy instance variables from one object to another - * Object#extended_by to get an instance's included/extended modules - * Object#extend_with_included_modules_from(object) to extend an instance with the modules from another instance - -*1.2.5* (December 13th, 2005) - -* Become part of Rails 1.0 - -* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.] - -*1.2.3* (November 7th, 2005) - -* Change Inflector#constantize to use eval instead of const_get. [Nicholas Seckar] - -* Fix const_missing handler to ignore the trailing '.rb' on files when comparing paths. [Nicholas Seckar] - -* Define kernel.rb methods in "class Object" instead of "module Kernel" to work around a Windows peculiarity [Sam Stephenson] - -* Fix broken tests caused by incomplete loading of active support. [Nicholas Seckar] - -* Fix status pluralization bug so status_codes doesn't get pluralized as statuses_code. #2758 [keithm@infused.org] - -* Added Kernel#silence_stderr to silence stderr for the duration of the given block [Sam Stephenson] - -* Changed Kernel#` to print a message to stderr (like Unix) instead of raising Errno::ENOENT on Win32 [Sam Stephenson] - -* Changed 0.blank? to false rather than true since it violates everyone's expectation of blankness. #2518, #2705 [rails@jeffcole.net] - -* When loading classes using const_missing, raise a NameError if and only if the file we tried to load was not present. [Nicholas Seckar] - -* Added petabytes and exebytes to numeric extensions #2397 [timct@mac.com] - -* Added Time#end_of_month to accompany Time#beginning_of_month #2514 [Jens-Christian Fischer] - - -*1.2.2* (October 26th, 2005) - -* Set Logger.silencer = false to disable Logger#silence. Useful for debugging fixtures. - -* Add title case method to String to do, e.g., 'action_web_service'.titlecase # => 'Action Web Service'. [Marcel Molina Jr.] - - -*1.2.1* (October 19th, 2005) - -* Classify generated routing code as framework code to avoid appearing in application traces. [Nicholas Seckar] - -* Show all framework frames in the framework trace. [Nicholas Seckar] - - -*1.2.0* (October 16th, 2005) - -* Update Exception extension to show the first few framework frames in an application trace. [Nicholas Seckar] - -* Added Exception extension to provide support for clean backtraces. [Nicholas Seckar] - -* Updated whiny nil to be more concise and useful. [Nicholas Seckar] - -* Added Enumerable#first_match [Nicholas Seckar] - -* Fixed that Time#change should also reset usec when also resetting minutes #2459 [ikeda@dream.big.or.jp] - -* Fix Logger compatibility for distributions that don't keep Ruby and its standard library in sync. - -* Replace '%e' from long and short time formats as Windows does not support it. #2344. [Tom Ward ] - -* Added to_s(:db) to Range, so you can get "BETWEEN '2005-12-10' AND '2005-12-12'" from Date.new(2005, 12, 10)..Date.new(2005, 12, 12) (and likewise with Times) - -* Moved require_library_or_gem into Kernel. #1992 [Michael Schuerig ] - -* Add :rfc822 as an option for Time#to_s (to get rfc822-formatted times) - -* Chain the const_missing hook to any previously existing hook so rails can play nicely with rake - -* Clean logger is compatible with both 1.8.2 and 1.8.3 Logger. #2263 [Michael Schuerig ] - -* Added native, faster implementations of .blank? for the core types #2286 [skae] - -* Fixed clean logger to work with Ruby 1.8.3 Logger class #2245 - -* Fixed memory leak with Active Record classes when Dependencies.mechanism = :load #1704 [c.r.mcgrath@gmail.com] - -* Fixed Inflector.underscore for use with acronyms, so HTML becomes html instead of htm_l #2173 [k@v2studio.com] - -* Fixed dependencies related infinite recursion bug when a controller file does not contain a controller class. Closes #1760. [rcolli2@tampabay.rr.com] - -* Fixed inflections for status, quiz, move #2056 [deirdre@deirdre.net] - -* Added Hash#reverse_merge, Hash#reverse_merge!, and Hash#reverse_update to ease the use of default options - -* Added Array#to_sentence that'll turn ['one', 'two', 'three'] into "one, two, and three" #2157 [m.stienstra@fngtps.com] - -* Added Kernel#silence_warnings to turn off warnings temporarily for the passed block - -* Added String#starts_with? and String#ends_with? #2118 [thijs@vandervossen.net] - -* Added easy extendability to the inflector through Inflector.inflections (using the Inflector::Inflections singleton class). Examples: - - Inflector.inflections do |inflect| - inflect.plural /^(ox)$/i, '\1\2en' - inflect.singular /^(ox)en/i, '\1' - - inflect.irregular 'octopus', 'octopi' - - inflect.uncountable "equipment" - end - -* Added String#at, String#from, String#to, String#first, String#last in ActiveSupport::CoreExtensions::String::Access to ease access to individual characters and substrings in a string serving basically as human names for range access. - -* Make Time#last_month work when invoked on the 31st of a month. - -* Add Time.days_in_month, and make Time#next_month work when invoked on the 31st of a month - -* Fixed that Time#midnight would have a non-zero usec on some platforms #1836 - -* Fixed inflections of "index/indices" #1766 [damn_pepe@gmail.com] - -* Added stripping of _id to String#humanize, so "employee_id" becomes "Employee" #1574 [Justin French] - -* Factor Fixnum and Bignum extensions into Integer extensions [Nicholas Seckar] - -* Hooked #ordinalize into Fixnum and Bignum classes. [Nicholas Seckar, danp] - -* Added Fixnum#ordinalize to turn 1.ordinalize to "1st", 3.ordinalize to "3rd", and 10.ordinalize to "10th" and so on #1724 [paul@cnt.org] - - -*1.1.1* (11 July, 2005) - -* Added more efficient implementation of the development mode reset of classes #1638 [Chris McGrath] - - -*1.1.0* (6 July, 2005) - -* Fixed conflict with Glue gem #1606 [Rick Olson] - -* Added new rules to the Inflector to deal with more unusual plurals mouse/louse => mice/lice, information => information, ox => oxen, virus => viri, archive => archives #1571, #1583, #1490, #1599, #1608 [foamdino@gmail.com/others] - -* Fixed memory leak with Object#remove_subclasses_of, which inflicted a Rails application running in development mode with a ~20KB leak per request #1289 [c.r.mcgrath@gmail.com] - -* Made 1.year == 365.25.days to account for leap years. This allows you to do User.find(:all, :conditions => ['birthday > ?', 50.years.ago]) without losing a lot of days. #1488 [tuxie@dekadance.se] - -* Added an exception if calling id on nil to WhinyNil #584 [kevin-temp@writesoon.com] - -* Added Fix/Bignum#multiple_of? which returns true on 14.multiple_of?(7) and false on 16.multiple_of?(7) #1464 [Thomas Fuchs] - -* Added even? and odd? to work with Bignums in addition to Fixnums #1464 [Thomas Fuchs] - -* Fixed Time#at_beginning_of_week returned the next Monday instead of the previous one when called on a Sunday #1403 [jean.helou@gmail.com] - -* Increased the speed of indifferent hash access by using Hash#default. #1436 [Nicholas Seckar] - -* Added that " " is now also blank? (using strip if available) - -* Fixed Dependencies so all modules are able to load missing constants #1173 [Nicholas Seckar] - -* Fixed the Inflector to underscore strings containing numbers, so Area51Controller becomes area51_controller #1176 [Nicholas Seckar] - -* Fixed that HashWithIndifferentAccess stringified all keys including symbols, ints, objects, and arrays #1162 [Nicholas Seckar] - -* Fixed Time#last_year to go back in time, not forward #1278 [fabien@odilat.com] - -* Fixed the pluralization of analysis to analyses #1295 [seattle@rootimage.msu.edu] - -* Fixed that Time.local(2005,12).months_since(1) would raise "ArgumentError: argument out of range" #1311 [jhahn@niveon.com] - -* Added silencing to the default Logger class - - -*1.0.4* (19th April, 2005) - -* Fixed that in some circumstances controllers outside of modules may have hidden ones inside modules. For example, admin/content might have been hidden by /content. #1075 [Nicholas Seckar] - -* Fixed inflection of perspectives and similar words #1045 [thijs@vandervossen.net] - -* Added Fixnum#even? and Fixnum#odd? - -* Fixed problem with classes being required twice. Object#const_missing now uses require_dependency to load files. It used to use require_or_load which would cause models to be loaded twice, which was not good for validations and other class methods #971 [Nicholas Seckar] - - -*1.0.3* (27th March, 2005) - -* Fixed Inflector.pluralize to handle capitalized words #932 [Jeremy Kemper] - -* Added Object#suppress which allows you to make a saner choice around with exceptions to swallow #980. Example: - - suppress(ZeroDivisionError) { 1/0 } - - ...instead of: - - 1/0 rescue nil # BAD, EVIL, DIRTY. - - -*1.0.2* (22th March, 2005) - -* Added Kernel#returning -- a Ruby-ized realization of the K combinator, courtesy of Mikael Brockman. - - def foo - returning values = [] do - values << 'bar' - values << 'baz' - end - end - - foo # => ['bar', 'baz'] - - -*1.0.1* (7th March, 2005) - -* Fixed Hash#indifferent_access to also deal with include? and fetch and nested hashes #726 [Nicholas Seckar] - -* Added Object#blank? -- see http://redhanded.hobix.com/inspect/objectBlank.html #783 [_why the lucky stiff] - -* Added inflection rules for "sh" words, like "wish" and "fish" #755 [phillip@pjbsoftware.com] - -* Fixed an exception when using Ajax based requests from Safari because Safari appends a \000 to the post body. Symbols can't have \000 in them so indifferent access would throw an exception in the constructor. Indifferent hashes now use strings internally instead. #746 [Tobias Luetke] - -* Added String#to_time and String#to_date for wrapping ParseDate - - -*1.0.0* (24th February, 2005) - -* Added TimeZone as the first of a number of value objects that among others Active Record can use rich value objects using composed_of #688 [Jamis Buck] - -* Added Date::Conversions for getting dates in different convenient string representations and other objects - -* Added Time::Conversions for getting times in different convenient string representations and other objects - -* Added Time::Calculations to ask for things like Time.now.tomorrow, Time.now.yesterday, Time.now.months_ago(4) #580 [DP|Flurin]. Examples: - - "Later today" => now.in(3.hours), - "Tomorrow morning" => now.tomorrow.change(:hour => 9), - "Tomorrow afternoon" => now.tomorrow.change(:hour => 14), - "In a couple of days" => now.tomorrow.tomorrow.change(:hour => 9), - "Next monday" => now.next_week.change(:hour => 9), - "In a month" => now.next_month.change(:hour => 9), - "In 6 months" => now.months_since(6).change(:hour => 9), - "In a year" => now.in(1.year).change(:hour => 9) - -* Upgraded to breakpoint 92 which fixes: - - * overload IRB.parse_opts(), fixes #443 - => breakpoints in tests work even when running them via rake - * untaint handlers, might fix an issue discussed on the Rails ML - * added verbose mode to breakpoint_client - * less noise caused by breakpoint_client by default - * ignored TerminateLineInput exception in signal handler - => quiet exit on Ctrl-C - -* Fixed Inflector for words like "news" and "series" that are the same in plural and singular #603 [echion], #615 [marcenuc] - -* Added Hash#stringify_keys and Hash#stringify_keys! - -* Added IndifferentAccess as a way to wrap a hash by a symbol-based store that also can be accessed by string keys - -* Added Inflector.constantize to turn "Admin::User" into a reference for the constant Admin::User - -* Added that Inflector.camelize and Inflector.underscore can deal with modules like turning "Admin::User" into "admin/user" and back - -* Added Inflector.humanize to turn attribute names like employee_salary into "Employee salary". Used by automated error reporting in AR. - -* Added availability of class inheritable attributes to the masses #477 [Jeremy Kemper] - - class Foo - class_inheritable_reader :read_me - class_inheritable_writer :write_me - class_inheritable_accessor :read_and_write_me - class_inheritable_array :read_and_concat_me - class_inheritable_hash :read_and_update_me - end - - # Bar gets a clone of (not a reference to) Foo's attributes. - class Bar < Foo - end - - Bar.read_and_write_me == Foo.read_and_write_me - Bar.read_and_write_me = 'bar' - Bar.read_and_write_me != Foo.read_and_write_me - -* Added Inflections as an extension on String, so Inflector.pluralize(Inflector.classify(name)) becomes name.classify.pluralize #476 [Jeremy Kemper] - -* Added Byte operations to Numeric, so 5.5.megabytes + 200.kilobytes #461 [Marcel Molina] - -* Fixed that Dependencies.reload can't load the same file twice #420 [Kent Sibilev] - -* Added Fixnum#ago/until, Fixnum#since/from_now #450 [Jeremy Kemper] - -* Added that Inflector now accepts Symbols and Classes by calling .to_s on the word supplied - -* Added time unit extensions to Fixnum that'll return the period in seconds, like 2.days + 4.hours. diff --git a/vendor/activesupport-2.2.2/README b/vendor/activesupport-2.2.2/README deleted file mode 100644 index 9fb9a80cb..000000000 --- a/vendor/activesupport-2.2.2/README +++ /dev/null @@ -1,43 +0,0 @@ -= Active Support -- Utility classes and standard library extensions from Rails - -Active Support is a collection of various utility classes and standard library extensions that were found useful -for Rails. All these additions have hence been collected in this bundle as way to gather all that sugar that makes -Ruby sweeter. - - -== Download - -The latest version of Active Support can be found at - -* http://rubyforge.org/project/showfiles.php?group_id=182 - -Documentation can be found at - -* http://as.rubyonrails.com - - -== Installation - -The preferred method of installing Active Support is through its GEM file. You'll need to have -RubyGems[http://rubygems.rubyforge.org/wiki/wiki.pl] installed for that, though. If you have it, -then use: - - % [sudo] gem install activesupport-1.0.0.gem - - -== License - -Active Support is released under the MIT license. - - -== Support - -The Active Support homepage is http://www.rubyonrails.com. You can find the Active Support -RubyForge page at http://rubyforge.org/projects/activesupport. And as Jim from Rake says: - - Feel free to submit commits or feature requests. If you send a patch, - remember to update the corresponding unit tests. If fact, I prefer - new feature to be submitted in the form of new unit tests. - -For other information, feel free to ask on the ruby-talk mailing list -(which is mirrored to comp.lang.ruby) or contact mailto:david@loudthinking.com. diff --git a/vendor/activesupport-2.2.2/lib/active_support.rb b/vendor/activesupport-2.2.2/lib/active_support.rb deleted file mode 100644 index d2a7df8bf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support.rb +++ /dev/null @@ -1,61 +0,0 @@ -#-- -# Copyright (c) 2005 David Heinemeier Hansson -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#++ - -require 'active_support/vendor' -require 'active_support/basic_object' -require 'active_support/inflector' -require 'active_support/callbacks' - -require 'active_support/core_ext' - -require 'active_support/buffered_logger' - -require 'active_support/gzip' -require 'active_support/cache' - -require 'active_support/dependencies' -require 'active_support/deprecation' - -require 'active_support/ordered_hash' -require 'active_support/ordered_options' -require 'active_support/option_merger' - -require 'active_support/memoizable' -require 'active_support/string_inquirer' - -require 'active_support/values/time_zone' -require 'active_support/duration' - -require 'active_support/json' - -require 'active_support/multibyte' - -require 'active_support/base64' - -require 'active_support/time_with_zone' - -require 'active_support/secure_random' - -require 'active_support/rescuable' - -I18n.load_path << File.dirname(__FILE__) + '/active_support/locale/en.yml' diff --git a/vendor/activesupport-2.2.2/lib/active_support/base64.rb b/vendor/activesupport-2.2.2/lib/active_support/base64.rb deleted file mode 100644 index acb8e5a96..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/base64.rb +++ /dev/null @@ -1,33 +0,0 @@ -begin - require 'base64' -rescue LoadError -end - -module ActiveSupport - if defined? ::Base64 - Base64 = ::Base64 - else - # Base64 provides utility methods for encoding and de-coding binary data - # using a base 64 representation. A base 64 representation of binary data - # consists entirely of printable US-ASCII characters. The Base64 module - # is included in Ruby 1.8, but has been removed in Ruby 1.9. - module Base64 - # Encodes a string to its base 64 representation. Each 60 characters of - # output is separated by a newline character. - # - # ActiveSupport::Base64.encode64("Original unencoded string") - # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==\n" - def self.encode64(data) - [data].pack("m") - end - - # Decodes a base 64 encoded string to its original representation. - # - # ActiveSupport::Base64.decode64("T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==") - # # => "Original unencoded string" - def self.decode64(data) - data.unpack("m").first - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/basic_object.rb b/vendor/activesupport-2.2.2/lib/active_support/basic_object.rb deleted file mode 100644 index 1f77209e7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/basic_object.rb +++ /dev/null @@ -1,24 +0,0 @@ -# A base class with no predefined methods that tries to behave like Builder's -# BlankSlate in Ruby 1.9. In Ruby pre-1.9, this is actually the -# Builder::BlankSlate class. -# -# Ruby 1.9 introduces BasicObject which differs slightly from Builder's -# BlankSlate that has been used so far. ActiveSupport::BasicObject provides a -# barebones base class that emulates Builder::BlankSlate while still relying on -# Ruby 1.9's BasicObject in Ruby 1.9. -module ActiveSupport - if defined? ::BasicObject - class BasicObject < ::BasicObject - undef_method :== - undef_method :equal? - - # Let ActiveSupport::BasicObject at least raise exceptions. - def raise(*args) - ::Object.send(:raise, *args) - end - end - else - require 'blankslate' - BasicObject = BlankSlate - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/buffered_logger.rb b/vendor/activesupport-2.2.2/lib/active_support/buffered_logger.rb deleted file mode 100644 index 77e0b1d33..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/buffered_logger.rb +++ /dev/null @@ -1,122 +0,0 @@ -module ActiveSupport - # Inspired by the buffered logger idea by Ezra - class BufferedLogger - module Severity - DEBUG = 0 - INFO = 1 - WARN = 2 - ERROR = 3 - FATAL = 4 - UNKNOWN = 5 - end - include Severity - - MAX_BUFFER_SIZE = 1000 - - # Set to false to disable the silencer - cattr_accessor :silencer - self.silencer = true - - # Silences the logger for the duration of the block. - def silence(temporary_level = ERROR) - if silencer - begin - old_logger_level, self.level = level, temporary_level - yield self - ensure - self.level = old_logger_level - end - else - yield self - end - end - - attr_accessor :level - attr_reader :auto_flushing - - def initialize(log, level = DEBUG) - @level = level - @buffer = {} - @auto_flushing = 1 - @guard = Mutex.new - - if log.respond_to?(:write) - @log = log - elsif File.exist?(log) - @log = open(log, (File::WRONLY | File::APPEND)) - @log.sync = true - else - FileUtils.mkdir_p(File.dirname(log)) - @log = open(log, (File::WRONLY | File::APPEND | File::CREAT)) - @log.sync = true - @log.write("# Logfile created on %s" % [Time.now.to_s]) - end - end - - def add(severity, message = nil, progname = nil, &block) - return if @level > severity - message = (message || (block && block.call) || progname).to_s - # If a newline is necessary then create a new message ending with a newline. - # Ensures that the original message is not mutated. - message = "#{message}\n" unless message[-1] == ?\n - buffer << message - auto_flush - message - end - - for severity in Severity.constants - class_eval <<-EOT, __FILE__, __LINE__ - def #{severity.downcase}(message = nil, progname = nil, &block) - add(#{severity}, message, progname, &block) - end - - def #{severity.downcase}? - #{severity} >= @level - end - EOT - end - - # Set the auto-flush period. Set to true to flush after every log message, - # to an integer to flush every N messages, or to false, nil, or zero to - # never auto-flush. If you turn auto-flushing off, be sure to regularly - # flush the log yourself -- it will eat up memory until you do. - def auto_flushing=(period) - @auto_flushing = - case period - when true; 1 - when false, nil, 0; MAX_BUFFER_SIZE - when Integer; period - else raise ArgumentError, "Unrecognized auto_flushing period: #{period.inspect}" - end - end - - def flush - @guard.synchronize do - unless buffer.empty? - old_buffer = buffer - clear_buffer - @log.write(old_buffer.join) - end - end - end - - def close - flush - @log.close if @log.respond_to?(:close) - @log = nil - end - - protected - def auto_flush - flush if buffer.size >= @auto_flushing - end - - def buffer - @buffer[Thread.current] ||= [] - end - - def clear_buffer - @buffer.delete(Thread.current) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache.rb b/vendor/activesupport-2.2.2/lib/active_support/cache.rb deleted file mode 100644 index e62cec6fc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache.rb +++ /dev/null @@ -1,223 +0,0 @@ -require 'benchmark' - -module ActiveSupport - # See ActiveSupport::Cache::Store for documentation. - module Cache - # Creates a new CacheStore object according to the given options. - # - # If no arguments are passed to this method, then a new - # ActiveSupport::Cache::MemoryStore object will be returned. - # - # If you pass a Symbol as the first argument, then a corresponding cache - # store class under the ActiveSupport::Cache namespace will be created. - # For example: - # - # ActiveSupport::Cache.lookup_store(:memory_store) - # # => returns a new ActiveSupport::Cache::MemoryStore object - # - # ActiveSupport::Cache.lookup_store(:drb_store) - # # => returns a new ActiveSupport::Cache::DRbStore object - # - # Any additional arguments will be passed to the corresponding cache store - # class's constructor: - # - # ActiveSupport::Cache.lookup_store(:file_store, "/tmp/cache") - # # => same as: ActiveSupport::Cache::FileStore.new("/tmp/cache") - # - # If the first argument is not a Symbol, then it will simply be returned: - # - # ActiveSupport::Cache.lookup_store(MyOwnCacheStore.new) - # # => returns MyOwnCacheStore.new - def self.lookup_store(*store_option) - store, *parameters = *([ store_option ].flatten) - - case store - when Symbol - store_class_name = (store == :drb_store ? "DRbStore" : store.to_s.camelize) - store_class = ActiveSupport::Cache.const_get(store_class_name) - store_class.new(*parameters) - when nil - ActiveSupport::Cache::MemoryStore.new - else - store - end - end - - def self.expand_cache_key(key, namespace = nil) - expanded_cache_key = namespace ? "#{namespace}/" : "" - - if ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"] - expanded_cache_key << "#{ENV["RAILS_CACHE_ID"] || ENV["RAILS_APP_VERSION"]}/" - end - - expanded_cache_key << case - when key.respond_to?(:cache_key) - key.cache_key - when key.is_a?(Array) - key.collect { |element| expand_cache_key(element) }.to_param - when key - key.to_param - end.to_s - - expanded_cache_key - end - - # An abstract cache store class. There are multiple cache store - # implementations, each having its own additional features. See the classes - # under the ActiveSupport::Cache module, e.g. - # ActiveSupport::Cache::MemCacheStore. MemCacheStore is currently the most - # popular cache store for large production websites. - # - # ActiveSupport::Cache::Store is meant for caching strings. Some cache - # store implementations, like MemoryStore, are able to cache arbitrary - # Ruby objects, but don't count on every cache store to be able to do that. - # - # cache = ActiveSupport::Cache::MemoryStore.new - # - # cache.read("city") # => nil - # cache.write("city", "Duckburgh") - # cache.read("city") # => "Duckburgh" - class Store - cattr_accessor :logger - - def silence! - @silence = true - self - end - - # Fetches data from the cache, using the given key. If there is data in - # the cache with the given key, then that data is returned. - # - # If there is no such data in the cache (a cache miss occurred), then - # then nil will be returned. However, if a block has been passed, then - # that block will be run in the event of a cache miss. The return value - # of the block will be written to the cache under the given cache key, - # and that return value will be returned. - # - # cache.write("today", "Monday") - # cache.fetch("today") # => "Monday" - # - # cache.fetch("city") # => nil - # cache.fetch("city") do - # "Duckburgh" - # end - # cache.fetch("city") # => "Duckburgh" - # - # You may also specify additional options via the +options+ argument. - # Setting :force => true will force a cache miss: - # - # cache.write("today", "Monday") - # cache.fetch("today", :force => true) # => nil - # - # Other options will be handled by the specific cache store implementation. - # Internally, #fetch calls #read, and calls #write on a cache miss. - # +options+ will be passed to the #read and #write calls. - # - # For example, MemCacheStore's #write method supports the +:expires_in+ - # option, which tells the memcached server to automatically expire the - # cache item after a certain period. We can use this option with #fetch - # too: - # - # cache = ActiveSupport::Cache::MemCacheStore.new - # cache.fetch("foo", :force => true, :expires_in => 5.seconds) do - # "bar" - # end - # cache.fetch("foo") # => "bar" - # sleep(6) - # cache.fetch("foo") # => nil - def fetch(key, options = {}) - @logger_off = true - if !options[:force] && value = read(key, options) - @logger_off = false - log("hit", key, options) - value - elsif block_given? - @logger_off = false - log("miss", key, options) - - value = nil - seconds = Benchmark.realtime { value = yield } - - @logger_off = true - write(key, value, options) - @logger_off = false - - log("write (will save #{'%.2f' % (seconds * 1000)}ms)", key, nil) - - value - end - end - - # Fetches data from the cache, using the given key. If there is data in - # the cache with the given key, then that data is returned. Otherwise, - # nil is returned. - # - # You may also specify additional options via the +options+ argument. - # The specific cache store implementation will decide what to do with - # +options+. - def read(key, options = nil) - log("read", key, options) - end - - # Writes the given value to the cache, with the given key. - # - # You may also specify additional options via the +options+ argument. - # The specific cache store implementation will decide what to do with - # +options+. - # - # For example, MemCacheStore supports the +:expires_in+ option, which - # tells the memcached server to automatically expire the cache item after - # a certain period: - # - # cache = ActiveSupport::Cache::MemCacheStore.new - # cache.write("foo", "bar", :expires_in => 5.seconds) - # cache.read("foo") # => "bar" - # sleep(6) - # cache.read("foo") # => nil - def write(key, value, options = nil) - log("write", key, options) - end - - def delete(key, options = nil) - log("delete", key, options) - end - - def delete_matched(matcher, options = nil) - log("delete matched", matcher.inspect, options) - end - - def exist?(key, options = nil) - log("exist?", key, options) - end - - def increment(key, amount = 1) - log("incrementing", key, amount) - if num = read(key) - write(key, num + amount) - else - nil - end - end - - def decrement(key, amount = 1) - log("decrementing", key, amount) - if num = read(key) - write(key, num - amount) - else - nil - end - end - - private - def log(operation, key, options) - logger.debug("Cache #{operation}: #{key}#{options ? " (#{options.inspect})" : ""}") if logger && !@silence && !@logger_off - end - end - end -end - -require 'active_support/cache/file_store' -require 'active_support/cache/memory_store' -require 'active_support/cache/drb_store' -require 'active_support/cache/mem_cache_store' -require 'active_support/cache/compressed_mem_cache_store' diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb deleted file mode 100644 index d87eb1733..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/compressed_mem_cache_store.rb +++ /dev/null @@ -1,20 +0,0 @@ -module ActiveSupport - module Cache - class CompressedMemCacheStore < MemCacheStore - def read(name, options = nil) - if value = super(name, (options || {}).merge(:raw => true)) - if raw?(options) - value - else - Marshal.load(ActiveSupport::Gzip.decompress(value)) - end - end - end - - def write(name, value, options = nil) - value = ActiveSupport::Gzip.compress(Marshal.dump(value)) unless raw?(options) - super(name, value, (options || {}).merge(:raw => true)) - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/drb_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/drb_store.rb deleted file mode 100644 index b80c2ee4d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/drb_store.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'drb' - -module ActiveSupport - module Cache - class DRbStore < MemoryStore #:nodoc: - attr_reader :address - - def initialize(address = 'druby://localhost:9192') - super() - @address = address - @data = DRbObject.new(nil, address) - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/file_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/file_store.rb deleted file mode 100644 index 7f34cb52a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/file_store.rb +++ /dev/null @@ -1,72 +0,0 @@ -module ActiveSupport - module Cache - # A cache store implementation which stores everything on the filesystem. - class FileStore < Store - attr_reader :cache_path - - def initialize(cache_path) - @cache_path = cache_path - end - - def read(name, options = nil) - super - File.open(real_file_path(name), 'rb') { |f| Marshal.load(f) } rescue nil - end - - def write(name, value, options = nil) - super - ensure_cache_path(File.dirname(real_file_path(name))) - File.atomic_write(real_file_path(name), cache_path) { |f| Marshal.dump(value, f) } - value - rescue => e - logger.error "Couldn't create cache directory: #{name} (#{e.message})" if logger - end - - def delete(name, options = nil) - super - File.delete(real_file_path(name)) - rescue SystemCallError => e - # If there's no cache, then there's nothing to complain about - end - - def delete_matched(matcher, options = nil) - super - search_dir(@cache_path) do |f| - if f =~ matcher - begin - File.delete(f) - rescue SystemCallError => e - # If there's no cache, then there's nothing to complain about - end - end - end - end - - def exist?(name, options = nil) - super - File.exist?(real_file_path(name)) - end - - private - def real_file_path(name) - '%s/%s.cache' % [@cache_path, name.gsub('?', '.').gsub(':', '.')] - end - - def ensure_cache_path(path) - FileUtils.makedirs(path) unless File.exist?(path) - end - - def search_dir(dir, &callback) - Dir.foreach(dir) do |d| - next if d == "." || d == ".." - name = File.join(dir, d) - if File.directory?(name) - search_dir(name, &callback) - else - callback.call name - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb deleted file mode 100644 index f9a7fb144..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/mem_cache_store.rb +++ /dev/null @@ -1,127 +0,0 @@ -require 'memcache' - -module ActiveSupport - module Cache - # A cache store implementation which stores data in Memcached: - # http://www.danga.com/memcached/ - # - # This is currently the most popular cache store for production websites. - # - # Special features: - # - Clustering and load balancing. One can specify multiple memcached servers, - # and MemCacheStore will load balance between all available servers. If a - # server goes down, then MemCacheStore will ignore it until it goes back - # online. - # - Time-based expiry support. See #write and the +:expires_in+ option. - class MemCacheStore < Store - module Response # :nodoc: - STORED = "STORED\r\n" - NOT_STORED = "NOT_STORED\r\n" - EXISTS = "EXISTS\r\n" - NOT_FOUND = "NOT_FOUND\r\n" - DELETED = "DELETED\r\n" - end - - attr_reader :addresses - - # Creates a new MemCacheStore object, with the given memcached server - # addresses. Each address is either a host name, or a host-with-port string - # in the form of "host_name:port". For example: - # - # ActiveSupport::Cache::MemCacheStore.new("localhost", "server-downstairs.localnetwork:8229") - # - # If no addresses are specified, then MemCacheStore will connect to - # localhost port 11211 (the default memcached port). - def initialize(*addresses) - addresses = addresses.flatten - options = addresses.extract_options! - addresses = ["localhost"] if addresses.empty? - @addresses = addresses - @data = MemCache.new(addresses, options) - end - - def read(key, options = nil) # :nodoc: - super - @data.get(key, raw?(options)) - rescue MemCache::MemCacheError => e - logger.error("MemCacheError (#{e}): #{e.message}") - nil - end - - # Writes a value to the cache. - # - # Possible options: - # - +:unless_exist+ - set to true if you don't want to update the cache - # if the key is already set. - # - +:expires_in+ - the number of seconds that this value may stay in - # the cache. See ActiveSupport::Cache::Store#write for an example. - def write(key, value, options = nil) - super - method = options && options[:unless_exist] ? :add : :set - # memcache-client will break the connection if you send it an integer - # in raw mode, so we convert it to a string to be sure it continues working. - value = value.to_s if raw?(options) - response = @data.send(method, key, value, expires_in(options), raw?(options)) - response == Response::STORED - rescue MemCache::MemCacheError => e - logger.error("MemCacheError (#{e}): #{e.message}") - false - end - - def delete(key, options = nil) # :nodoc: - super - response = @data.delete(key, expires_in(options)) - response == Response::DELETED - rescue MemCache::MemCacheError => e - logger.error("MemCacheError (#{e}): #{e.message}") - false - end - - def exist?(key, options = nil) # :nodoc: - # Doesn't call super, cause exist? in memcache is in fact a read - # But who cares? Reading is very fast anyway - !read(key, options).nil? - end - - def increment(key, amount = 1) # :nodoc: - log("incrementing", key, amount) - - response = @data.incr(key, amount) - response == Response::NOT_FOUND ? nil : response - rescue MemCache::MemCacheError - nil - end - - def decrement(key, amount = 1) # :nodoc: - log("decrement", key, amount) - - response = @data.decr(key, amount) - response == Response::NOT_FOUND ? nil : response - rescue MemCache::MemCacheError - nil - end - - def delete_matched(matcher, options = nil) # :nodoc: - super - raise "Not supported by Memcache" - end - - def clear - @data.flush_all - end - - def stats - @data.stats - end - - private - def expires_in(options) - (options && options[:expires_in]) || 0 - end - - def raw?(options) - options && options[:raw] - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/memory_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/memory_store.rb deleted file mode 100644 index 1b30d4915..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/memory_store.rb +++ /dev/null @@ -1,52 +0,0 @@ -module ActiveSupport - module Cache - # A cache store implementation which stores everything into memory in the - # same process. If you're running multiple Ruby on Rails server processes - # (which is the case if you're using mongrel_cluster or Phusion Passenger), - # then this means that your Rails server process instances won't be able - # to share cache data with each other. If your application never performs - # manual cache item expiry (e.g. when you're using generational cache keys), - # then using MemoryStore is ok. Otherwise, consider carefully whether you - # should be using this cache store. - # - # MemoryStore is not only able to store strings, but also arbitrary Ruby - # objects. - # - # MemoryStore is not thread-safe. Use SynchronizedMemoryStore instead - # if you need thread-safety. - class MemoryStore < Store - def initialize - @data = {} - end - - def read(name, options = nil) - super - @data[name] - end - - def write(name, value, options = nil) - super - @data[name] = value.freeze - end - - def delete(name, options = nil) - super - @data.delete(name) - end - - def delete_matched(matcher, options = nil) - super - @data.delete_if { |k,v| k =~ matcher } - end - - def exist?(name,options = nil) - super - @data.has_key?(name) - end - - def clear - @data.clear - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb b/vendor/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb deleted file mode 100644 index ea03a119c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/cache/synchronized_memory_store.rb +++ /dev/null @@ -1,47 +0,0 @@ -module ActiveSupport - module Cache - # Like MemoryStore, but thread-safe. - class SynchronizedMemoryStore < MemoryStore - def initialize - super - @guard = Monitor.new - end - - def fetch(key, options = {}) - @guard.synchronize { super } - end - - def read(name, options = nil) - @guard.synchronize { super } - end - - def write(name, value, options = nil) - @guard.synchronize { super } - end - - def delete(name, options = nil) - @guard.synchronize { super } - end - - def delete_matched(matcher, options = nil) - @guard.synchronize { super } - end - - def exist?(name,options = nil) - @guard.synchronize { super } - end - - def increment(key, amount = 1) - @guard.synchronize { super } - end - - def decrement(key, amount = 1) - @guard.synchronize { super } - end - - def clear - @guard.synchronize { super } - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/callbacks.rb b/vendor/activesupport-2.2.2/lib/active_support/callbacks.rb deleted file mode 100644 index 5cdcaf5ad..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/callbacks.rb +++ /dev/null @@ -1,280 +0,0 @@ -module ActiveSupport - # Callbacks are hooks into the lifecycle of an object that allow you to trigger logic - # before or after an alteration of the object state. - # - # Mixing in this module allows you to define callbacks in your class. - # - # Example: - # class Storage - # include ActiveSupport::Callbacks - # - # define_callbacks :before_save, :after_save - # end - # - # class ConfigStorage < Storage - # before_save :saving_message - # def saving_message - # puts "saving..." - # end - # - # after_save do |object| - # puts "saved" - # end - # - # def save - # run_callbacks(:before_save) - # puts "- save" - # run_callbacks(:after_save) - # end - # end - # - # config = ConfigStorage.new - # config.save - # - # Output: - # saving... - # - save - # saved - # - # Callbacks from parent classes are inherited. - # - # Example: - # class Storage - # include ActiveSupport::Callbacks - # - # define_callbacks :before_save, :after_save - # - # before_save :prepare - # def prepare - # puts "preparing save" - # end - # end - # - # class ConfigStorage < Storage - # before_save :saving_message - # def saving_message - # puts "saving..." - # end - # - # after_save do |object| - # puts "saved" - # end - # - # def save - # run_callbacks(:before_save) - # puts "- save" - # run_callbacks(:after_save) - # end - # end - # - # config = ConfigStorage.new - # config.save - # - # Output: - # preparing save - # saving... - # - save - # saved - module Callbacks - class CallbackChain < Array - def self.build(kind, *methods, &block) - methods, options = extract_options(*methods, &block) - methods.map! { |method| Callback.new(kind, method, options) } - new(methods) - end - - def run(object, options = {}, &terminator) - enumerator = options[:enumerator] || :each - - unless block_given? - send(enumerator) { |callback| callback.call(object) } - else - send(enumerator) do |callback| - result = callback.call(object) - break result if terminator.call(result, object) - end - end - end - - # TODO: Decompose into more Array like behavior - def replace_or_append!(chain) - if index = index(chain) - self[index] = chain - else - self << chain - end - self - end - - def find(callback, &block) - select { |c| c == callback && (!block_given? || yield(c)) }.first - end - - def delete(callback) - super(callback.is_a?(Callback) ? callback : find(callback)) - end - - private - def self.extract_options(*methods, &block) - methods.flatten! - options = methods.extract_options! - methods << block if block_given? - return methods, options - end - - def extract_options(*methods, &block) - self.class.extract_options(*methods, &block) - end - end - - class Callback - attr_reader :kind, :method, :identifier, :options - - def initialize(kind, method, options = {}) - @kind = kind - @method = method - @identifier = options[:identifier] - @options = options - end - - def ==(other) - case other - when Callback - (self.identifier && self.identifier == other.identifier) || self.method == other.method - else - (self.identifier && self.identifier == other) || self.method == other - end - end - - def eql?(other) - self == other - end - - def dup - self.class.new(@kind, @method, @options.dup) - end - - def hash - if @identifier - @identifier.hash - else - @method.hash - end - end - - def call(*args, &block) - evaluate_method(method, *args, &block) if should_run_callback?(*args) - rescue LocalJumpError - raise ArgumentError, - "Cannot yield from a Proc type filter. The Proc must take two " + - "arguments and execute #call on the second argument." - end - - private - def evaluate_method(method, *args, &block) - case method - when Symbol - object = args.shift - object.send(method, *args, &block) - when String - eval(method, args.first.instance_eval { binding }) - when Proc, Method - method.call(*args, &block) - else - if method.respond_to?(kind) - method.send(kind, *args, &block) - else - raise ArgumentError, - "Callbacks must be a symbol denoting the method to call, a string to be evaluated, " + - "a block to be invoked, or an object responding to the callback method." - end - end - end - - def should_run_callback?(*args) - if options[:if] - evaluate_method(options[:if], *args) - elsif options[:unless] - !evaluate_method(options[:unless], *args) - else - true - end - end - end - - def self.included(base) - base.extend ClassMethods - end - - module ClassMethods - def define_callbacks(*callbacks) - callbacks.each do |callback| - class_eval <<-"end_eval" - def self.#{callback}(*methods, &block) - callbacks = CallbackChain.build(:#{callback}, *methods, &block) - (@#{callback}_callbacks ||= CallbackChain.new).concat callbacks - end - - def self.#{callback}_callback_chain - @#{callback}_callbacks ||= CallbackChain.new - - if superclass.respond_to?(:#{callback}_callback_chain) - CallbackChain.new(superclass.#{callback}_callback_chain + @#{callback}_callbacks) - else - @#{callback}_callbacks - end - end - end_eval - end - end - end - - # Runs all the callbacks defined for the given options. - # - # If a block is given it will be called after each callback receiving as arguments: - # - # * the result from the callback - # * the object which has the callback - # - # If the result from the block evaluates to false, the callback chain is stopped. - # - # Example: - # class Storage - # include ActiveSupport::Callbacks - # - # define_callbacks :before_save, :after_save - # end - # - # class ConfigStorage < Storage - # before_save :pass - # before_save :pass - # before_save :stop - # before_save :pass - # - # def pass - # puts "pass" - # end - # - # def stop - # puts "stop" - # return false - # end - # - # def save - # result = run_callbacks(:before_save) { |result, object| result == false } - # puts "- save" if result - # end - # end - # - # config = ConfigStorage.new - # config.save - # - # Output: - # pass - # pass - # stop - def run_callbacks(kind, options = {}, &block) - self.class.send("#{kind}_callback_chain").run(self, options, &block) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext.rb deleted file mode 100644 index 4deef8c7a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext.rb +++ /dev/null @@ -1,4 +0,0 @@ -Dir[File.dirname(__FILE__) + "/core_ext/*.rb"].sort.each do |path| - filename = File.basename(path) - require "active_support/core_ext/#{filename}" -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array.rb deleted file mode 100644 index cc0a1ebc1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'active_support/core_ext/array/access' -require 'active_support/core_ext/array/conversions' -require 'active_support/core_ext/array/extract_options' -require 'active_support/core_ext/array/grouping' -require 'active_support/core_ext/array/random_access' - -class Array #:nodoc: - include ActiveSupport::CoreExtensions::Array::Access - include ActiveSupport::CoreExtensions::Array::Conversions - include ActiveSupport::CoreExtensions::Array::ExtractOptions - include ActiveSupport::CoreExtensions::Array::Grouping - include ActiveSupport::CoreExtensions::Array::RandomAccess -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb deleted file mode 100644 index 6de338bfc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/access.rb +++ /dev/null @@ -1,53 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - # Makes it easier to access parts of an array. - module Access - # Returns the tail of the array from +position+. - # - # %w( a b c d ).from(0) # => %w( a b c d ) - # %w( a b c d ).from(2) # => %w( c d ) - # %w( a b c d ).from(10) # => nil - # %w().from(0) # => nil - def from(position) - self[position..-1] - end - - # Returns the beginning of the array up to +position+. - # - # %w( a b c d ).to(0) # => %w( a ) - # %w( a b c d ).to(2) # => %w( a b c ) - # %w( a b c d ).to(10) # => %w( a b c d ) - # %w().to(0) # => %w() - def to(position) - self[0..position] - end - - # Equal to self[1]. - def second - self[1] - end - - # Equal to self[2]. - def third - self[2] - end - - # Equal to self[3]. - def fourth - self[3] - end - - # Equal to self[4]. - def fifth - self[4] - end - - # Equal to self[41]. Also known as accessing "the reddit". - def forty_two - self[41] - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb deleted file mode 100644 index cf3e03f62..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/conversions.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'builder' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - module Conversions - # Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options: - # * :connector - The word used to join the last element in arrays with two or more elements (default: "and") - # * :skip_last_comma - Set to true to return "a, b and c" instead of "a, b, and c". - def to_sentence(options = {}) - options.assert_valid_keys(:connector, :skip_last_comma, :locale) - - default = I18n.translate(:'support.array.sentence_connector', :locale => options[:locale]) - default_skip_last_comma = I18n.translate(:'support.array.skip_last_comma', :locale => options[:locale]) - options.reverse_merge! :connector => default, :skip_last_comma => default_skip_last_comma - options[:connector] = "#{options[:connector]} " unless options[:connector].nil? || options[:connector].strip == '' - - case length - when 0 - "" - when 1 - self[0].to_s - when 2 - "#{self[0]} #{options[:connector]}#{self[1]}" - else - "#{self[0...-1].join(', ')}#{options[:skip_last_comma] ? '' : ','} #{options[:connector]}#{self[-1]}" - end - end - - - # Calls to_param on all its elements and joins the result with - # slashes. This is used by url_for in Action Pack. - def to_param - collect { |e| e.to_param }.join '/' - end - - # Converts an array into a string suitable for use as a URL query string, - # using the given +key+ as the param name. - # - # ['Rails', 'coding'].to_query('hobbies') # => "hobbies%5B%5D=Rails&hobbies%5B%5D=coding" - def to_query(key) - prefix = "#{key}[]" - collect { |value| value.to_query(prefix) }.join '&' - end - - def self.included(base) #:nodoc: - base.class_eval do - alias_method :to_default_s, :to_s - alias_method :to_s, :to_formatted_s - end - end - - # Converts a collection of elements into a formatted string by calling - # to_s on all elements and joining them: - # - # Blog.find(:all).to_formatted_s # => "First PostSecond PostThird Post" - # - # Adding in the :db argument as the format yields a prettier - # output: - # - # Blog.find(:all).to_formatted_s(:db) # => "First Post,Second Post,Third Post" - def to_formatted_s(format = :default) - case format - when :db - if respond_to?(:empty?) && self.empty? - "null" - else - collect { |element| element.id }.join(",") - end - else - to_default_s - end - end - - # Returns a string that represents this array in XML by sending +to_xml+ - # to each element. Active Record collections delegate their representation - # in XML to this method. - # - # All elements are expected to respond to +to_xml+, if any of them does - # not an exception is raised. - # - # The root node reflects the class name of the first element in plural - # if all elements belong to the same type and that's not Hash: - # - # customer.projects.to_xml - # - # - # - # - # 20000.0 - # 1567 - # 2008-04-09 - # ... - # - # - # 57230.0 - # 1567 - # 2008-04-15 - # ... - # - # - # - # Otherwise the root element is "records": - # - # [{:foo => 1, :bar => 2}, {:baz => 3}].to_xml - # - # - # - # - # 2 - # 1 - # - # - # 3 - # - # - # - # If the collection is empty the root element is "nil-classes" by default: - # - # [].to_xml - # - # - # - # - # To ensure a meaningful root element use the :root option: - # - # customer_with_no_projects.projects.to_xml(:root => "projects") - # - # - # - # - # By default root children have as node name the one of the root - # singularized. You can change it with the :children option. - # - # The +options+ hash is passed downwards: - # - # Message.all.to_xml(:skip_types => true) - # - # - # - # - # 2008-03-07T09:58:18+01:00 - # 1 - # 1 - # 2008-03-07T09:58:18+01:00 - # 1 - # - # - # - def to_xml(options = {}) - raise "Not all elements respond to to_xml" unless all? { |e| e.respond_to? :to_xml } - - options[:root] ||= all? { |e| e.is_a?(first.class) && first.class.to_s != "Hash" } ? first.class.to_s.underscore.pluralize : "records" - options[:children] ||= options[:root].singularize - options[:indent] ||= 2 - options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent]) - - root = options.delete(:root).to_s - children = options.delete(:children) - - if !options.has_key?(:dasherize) || options[:dasherize] - root = root.dasherize - end - - options[:builder].instruct! unless options.delete(:skip_instruct) - - opts = options.merge({ :root => children }) - - xml = options[:builder] - if empty? - xml.tag!(root, options[:skip_types] ? {} : {:type => "array"}) - else - xml.tag!(root, options[:skip_types] ? {} : {:type => "array"}) { - yield xml if block_given? - each { |e| e.to_xml(opts.merge({ :skip_instruct => true })) } - } - end - end - - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb deleted file mode 100644 index eb917576d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/extract_options.rb +++ /dev/null @@ -1,20 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - module ExtractOptions - # Extracts options from a set of arguments. Removes and returns the last - # element in the array if it's a hash, otherwise returns a blank hash. - # - # def options(*args) - # args.extract_options! - # end - # - # options(1, 2) # => {} - # options(1, 2, :a => :b) # => {:a=>:b} - def extract_options! - last.is_a?(::Hash) ? pop : {} - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb deleted file mode 100644 index f782f8fac..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/grouping.rb +++ /dev/null @@ -1,106 +0,0 @@ -require 'enumerator' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - module Grouping - # Splits or iterates over the array in groups of size +number+, - # padding any remaining slots with +fill_with+ unless it is +false+. - # - # %w(1 2 3 4 5 6 7).in_groups_of(3) {|group| p group} - # ["1", "2", "3"] - # ["4", "5", "6"] - # ["7", nil, nil] - # - # %w(1 2 3).in_groups_of(2, ' ') {|group| p group} - # ["1", "2"] - # ["3", " "] - # - # %w(1 2 3).in_groups_of(2, false) {|group| p group} - # ["1", "2"] - # ["3"] - def in_groups_of(number, fill_with = nil) - if fill_with == false - collection = self - else - # size % number gives how many extra we have; - # subtracting from number gives how many to add; - # modulo number ensures we don't add group of just fill. - padding = (number - size % number) % number - collection = dup.concat([fill_with] * padding) - end - - if block_given? - collection.each_slice(number) { |slice| yield(slice) } - else - returning [] do |groups| - collection.each_slice(number) { |group| groups << group } - end - end - end - - # Splits or iterates over the array in +number+ of groups, padding any - # remaining slots with +fill_with+ unless it is +false+. - # - # %w(1 2 3 4 5 6 7 8 9 10).in_groups(3) {|group| p group} - # ["1", "2", "3", "4"] - # ["5", "6", "7", nil] - # ["8", "9", "10", nil] - # - # %w(1 2 3 4 5 6 7).in_groups(3, ' ') {|group| p group} - # ["1", "2", "3"] - # ["4", "5", " "] - # ["6", "7", " "] - # - # %w(1 2 3 4 5 6 7).in_groups(3, false) {|group| p group} - # ["1", "2", "3"] - # ["4", "5"] - # ["6", "7"] - def in_groups(number, fill_with = nil) - # size / number gives minor group size; - # size % number gives how many objects need extra accomodation; - # each group hold either division or division + 1 items. - division = size / number - modulo = size % number - - # create a new array avoiding dup - groups = [] - start = 0 - - number.times do |index| - length = division + (modulo > 0 && modulo > index ? 1 : 0) - padding = fill_with != false && - modulo > 0 && length == division ? 1 : 0 - groups << slice(start, length).concat([fill_with] * padding) - start += length - end - - if block_given? - groups.each{|g| yield(g) } - else - groups - end - end - - # Divides the array into one or more subarrays based on a delimiting +value+ - # or the result of an optional block. - # - # [1, 2, 3, 4, 5].split(3) # => [[1, 2], [4, 5]] - # (1..10).to_a.split { |i| i % 3 == 0 } # => [[1, 2], [4, 5], [7, 8], [10]] - def split(value = nil) - using_block = block_given? - - inject([[]]) do |results, element| - if (using_block && yield(element)) || (value == element) - results << [] - else - results.last << element - end - - results - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb deleted file mode 100644 index 54d17cbf3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/array/random_access.rb +++ /dev/null @@ -1,12 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Array #:nodoc: - module RandomAccess - # Returns a random element from the array. - def rand - self[Kernel.rand(length)] - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64.rb deleted file mode 100644 index 235e2edf5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'active_support/base64' -require 'active_support/core_ext/base64/encoding' - -ActiveSupport::Base64.extend ActiveSupport::CoreExtensions::Base64::Encoding diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb deleted file mode 100644 index a9656c138..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/base64/encoding.rb +++ /dev/null @@ -1,16 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Base64 #:nodoc: - module Encoding - # Encodes the value as base64 without the newline breaks. This makes the base64 encoding readily usable as URL parameters - # or memcache keys without further processing. - # - # ActiveSupport::Base64.encode64s("Original unencoded string") - # # => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==" - def encode64s(value) - encode64(value).gsub(/\n/, '') - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb deleted file mode 100644 index 79ba165e3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/benchmark.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'benchmark' - -class << Benchmark - remove_method :realtime - - def realtime - r0 = Time.now - yield - r1 = Time.now - r1.to_f - r0.to_f - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb deleted file mode 100644 index d429078c9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'bigdecimal' -require 'active_support/core_ext/bigdecimal/conversions' - -class BigDecimal#:nodoc: - include ActiveSupport::CoreExtensions::BigDecimal::Conversions -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb deleted file mode 100644 index bc9d578f3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/bigdecimal/conversions.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'yaml' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module BigDecimal #:nodoc: - module Conversions - DEFAULT_STRING_FORMAT = 'F'.freeze - YAML_TAG = 'tag:yaml.org,2002:float'.freeze - YAML_MAPPING = { 'Infinity' => '.Inf', '-Infinity' => '-.Inf', 'NaN' => '.NaN' } - - def self.included(base) #:nodoc: - base.class_eval do - alias_method :_original_to_s, :to_s - alias_method :to_s, :to_formatted_s - - yaml_as YAML_TAG - end - end - - def to_formatted_s(format = DEFAULT_STRING_FORMAT) - _original_to_s(format) - end - - # This emits the number without any scientific notation. - # This is better than self.to_f.to_s since it doesn't lose precision. - # - # Note that reconstituting YAML floats to native floats may lose precision. - def to_yaml(opts = {}) - YAML.quick_emit(nil, opts) do |out| - string = to_s - out.scalar(YAML_TAG, YAML_MAPPING[string] || string, :plain) - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/blank.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/blank.rb deleted file mode 100644 index 4f8dc4e28..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/blank.rb +++ /dev/null @@ -1,58 +0,0 @@ -class Object - # An object is blank if it's false, empty, or a whitespace string. - # For example, "", " ", +nil+, [], and {} are blank. - # - # This simplifies - # - # if !address.nil? && !address.empty? - # - # to - # - # if !address.blank? - def blank? - respond_to?(:empty?) ? empty? : !self - end - - # An object is present if it's not blank. - def present? - !blank? - end -end - -class NilClass #:nodoc: - def blank? - true - end -end - -class FalseClass #:nodoc: - def blank? - true - end -end - -class TrueClass #:nodoc: - def blank? - false - end -end - -class Array #:nodoc: - alias_method :blank?, :empty? -end - -class Hash #:nodoc: - alias_method :blank?, :empty? -end - -class String #:nodoc: - def blank? - self !~ /\S/ - end -end - -class Numeric #:nodoc: - def blank? - false - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb deleted file mode 100644 index db90e5c74..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'active_support/core_ext/cgi/escape_skipping_slashes' - -class CGI #:nodoc: - extend ActiveSupport::CoreExtensions::CGI::EscapeSkippingSlashes -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb deleted file mode 100644 index a21e98fa8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/cgi/escape_skipping_slashes.rb +++ /dev/null @@ -1,14 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module CGI #:nodoc: - module EscapeSkippingSlashes #:nodoc: - def escape_skipping_slashes(str) - str = str.join('/') if str.respond_to? :join - str.gsub(/([^ \/a-zA-Z0-9_.-])/n) do - "%#{$1.unpack('H2').first.upcase}" - end.tr(' ', '+') - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/class.rb deleted file mode 100644 index 44ad6c8c0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'active_support/core_ext/class/attribute_accessors' -require 'active_support/core_ext/class/inheritable_attributes' -require 'active_support/core_ext/class/removal' -require 'active_support/core_ext/class/delegating_attributes' diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb deleted file mode 100644 index 186ca69c0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/attribute_accessors.rb +++ /dev/null @@ -1,54 +0,0 @@ -# Extends the class object with class and instance accessors for class attributes, -# just like the native attr* accessors for instance attributes. -# -# class Person -# cattr_accessor :hair_colors -# end -# -# Person.hair_colors = [:brown, :black, :blonde, :red] -class Class - def cattr_reader(*syms) - syms.flatten.each do |sym| - next if sym.is_a?(Hash) - class_eval(<<-EOS, __FILE__, __LINE__) - unless defined? @@#{sym} - @@#{sym} = nil - end - - def self.#{sym} - @@#{sym} - end - - def #{sym} - @@#{sym} - end - EOS - end - end - - def cattr_writer(*syms) - options = syms.extract_options! - syms.flatten.each do |sym| - class_eval(<<-EOS, __FILE__, __LINE__) - unless defined? @@#{sym} - @@#{sym} = nil - end - - def self.#{sym}=(obj) - @@#{sym} = obj - end - - #{" - def #{sym}=(obj) - @@#{sym} = obj - end - " unless options[:instance_writer] == false } - EOS - end - end - - def cattr_accessor(*syms) - cattr_reader(*syms) - cattr_writer(*syms) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb deleted file mode 100644 index 368317df9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/delegating_attributes.rb +++ /dev/null @@ -1,46 +0,0 @@ -# These class attributes behave something like the class -# inheritable accessors. But instead of copying the hash over at -# the time the subclass is first defined, the accessors simply -# delegate to their superclass unless they have been given a -# specific value. This stops the strange situation where values -# set after class definition don't get applied to subclasses. -class Class - def superclass_delegating_reader(*names) - class_name_to_stop_searching_on = self.superclass.name.blank? ? "Object" : self.superclass.name - names.each do |name| - class_eval <<-EOS - def self.#{name} - if defined?(@#{name}) - @#{name} - elsif superclass < #{class_name_to_stop_searching_on} && superclass.respond_to?(:#{name}) - superclass.#{name} - end - end - def #{name} - self.class.#{name} - end - def self.#{name}? - !!#{name} - end - def #{name}? - !!#{name} - end - EOS - end - end - - def superclass_delegating_writer(*names) - names.each do |name| - class_eval <<-EOS - def self.#{name}=(value) - @#{name} = value - end - EOS - end - end - - def superclass_delegating_accessor(*names) - superclass_delegating_reader(*names) - superclass_delegating_writer(*names) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb deleted file mode 100644 index e6143a274..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/inheritable_attributes.rb +++ /dev/null @@ -1,140 +0,0 @@ -# Retain for backward compatibility. Methods are now included in Class. -module ClassInheritableAttributes # :nodoc: -end - -# Allows attributes to be shared within an inheritance hierarchy, but where each descendant gets a copy of -# their parents' attributes, instead of just a pointer to the same. This means that the child can add elements -# to, for example, an array without those additions being shared with either their parent, siblings, or -# children, which is unlike the regular class-level attributes that are shared across the entire hierarchy. -class Class # :nodoc: - def class_inheritable_reader(*syms) - syms.each do |sym| - next if sym.is_a?(Hash) - class_eval <<-EOS - def self.#{sym} - read_inheritable_attribute(:#{sym}) - end - - def #{sym} - self.class.#{sym} - end - EOS - end - end - - def class_inheritable_writer(*syms) - options = syms.extract_options! - syms.each do |sym| - class_eval <<-EOS - def self.#{sym}=(obj) - write_inheritable_attribute(:#{sym}, obj) - end - - #{" - def #{sym}=(obj) - self.class.#{sym} = obj - end - " unless options[:instance_writer] == false } - EOS - end - end - - def class_inheritable_array_writer(*syms) - options = syms.extract_options! - syms.each do |sym| - class_eval <<-EOS - def self.#{sym}=(obj) - write_inheritable_array(:#{sym}, obj) - end - - #{" - def #{sym}=(obj) - self.class.#{sym} = obj - end - " unless options[:instance_writer] == false } - EOS - end - end - - def class_inheritable_hash_writer(*syms) - options = syms.extract_options! - syms.each do |sym| - class_eval <<-EOS - def self.#{sym}=(obj) - write_inheritable_hash(:#{sym}, obj) - end - - #{" - def #{sym}=(obj) - self.class.#{sym} = obj - end - " unless options[:instance_writer] == false } - EOS - end - end - - def class_inheritable_accessor(*syms) - class_inheritable_reader(*syms) - class_inheritable_writer(*syms) - end - - def class_inheritable_array(*syms) - class_inheritable_reader(*syms) - class_inheritable_array_writer(*syms) - end - - def class_inheritable_hash(*syms) - class_inheritable_reader(*syms) - class_inheritable_hash_writer(*syms) - end - - def inheritable_attributes - @inheritable_attributes ||= EMPTY_INHERITABLE_ATTRIBUTES - end - - def write_inheritable_attribute(key, value) - if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES) - @inheritable_attributes = {} - end - inheritable_attributes[key] = value - end - - def write_inheritable_array(key, elements) - write_inheritable_attribute(key, []) if read_inheritable_attribute(key).nil? - write_inheritable_attribute(key, read_inheritable_attribute(key) + elements) - end - - def write_inheritable_hash(key, hash) - write_inheritable_attribute(key, {}) if read_inheritable_attribute(key).nil? - write_inheritable_attribute(key, read_inheritable_attribute(key).merge(hash)) - end - - def read_inheritable_attribute(key) - inheritable_attributes[key] - end - - def reset_inheritable_attributes - @inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES - end - - private - # Prevent this constant from being created multiple times - EMPTY_INHERITABLE_ATTRIBUTES = {}.freeze unless const_defined?(:EMPTY_INHERITABLE_ATTRIBUTES) - - def inherited_with_inheritable_attributes(child) - inherited_without_inheritable_attributes(child) if respond_to?(:inherited_without_inheritable_attributes) - - if inheritable_attributes.equal?(EMPTY_INHERITABLE_ATTRIBUTES) - new_inheritable_attributes = EMPTY_INHERITABLE_ATTRIBUTES - else - new_inheritable_attributes = inheritable_attributes.inject({}) do |memo, (key, value)| - memo.update(key => value.duplicable? ? value.dup : value) - end - end - - child.instance_variable_set('@inheritable_attributes', new_inheritable_attributes) - end - - alias inherited_without_inheritable_attributes inherited - alias inherited inherited_with_inheritable_attributes -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb deleted file mode 100644 index 10660edb2..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/class/removal.rb +++ /dev/null @@ -1,50 +0,0 @@ -class Class #:nodoc: - - # Unassociates the class with its subclasses and removes the subclasses - # themselves. - # - # Integer.remove_subclasses # => [Bignum, Fixnum] - # Fixnum # => NameError: uninitialized constant Fixnum - def remove_subclasses - Object.remove_subclasses_of(self) - end - - # Returns an array with the names of the subclasses of +self+ as strings. - # - # Integer.subclasses # => ["Bignum", "Fixnum"] - def subclasses - Object.subclasses_of(self).map { |o| o.to_s } - end - - # Removes the classes in +klasses+ from their parent module. - # - # Ordinary classes belong to some module via a constant. This method computes - # that constant name from the class name and removes it from the module it - # belongs to. - # - # Object.remove_class(Integer) # => [Integer] - # Integer # => NameError: uninitialized constant Integer - # - # Take into account that in general the class object could be still stored - # somewhere else. - # - # i = Integer # => Integer - # Object.remove_class(Integer) # => [Integer] - # Integer # => NameError: uninitialized constant Integer - # i.subclasses # => ["Bignum", "Fixnum"] - # Fixnum.superclass # => Integer - def remove_class(*klasses) - klasses.flatten.each do |klass| - # Skip this class if there is nothing bound to this name - next unless defined?(klass.name) - - basename = klass.to_s.split("::").last - parent = klass.parent - - # Skip this class if it does not match the current one bound to this name - next unless parent.const_defined?(basename) && klass = parent.const_get(basename) - - parent.instance_eval { remove_const basename } unless parent == klass - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date.rb deleted file mode 100644 index 3f56c560b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'date' -require 'active_support/core_ext/date/behavior' -require 'active_support/core_ext/date/calculations' -require 'active_support/core_ext/date/conversions' - -class Date#:nodoc: - include ActiveSupport::CoreExtensions::Date::Behavior - include ActiveSupport::CoreExtensions::Date::Calculations - include ActiveSupport::CoreExtensions::Date::Conversions -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb deleted file mode 100644 index bd378eb37..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/behavior.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'date' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Date #:nodoc: - module Behavior - # Enable more predictable duck-typing on Date-like classes. See - # Object#acts_like?. - def acts_like_date? - true - end - - # Date memoizes some instance methods using metaprogramming to wrap - # the methods with one that caches the result in an instance variable. - # - # If a Date is frozen but the memoized method hasn't been called, the - # first call will result in a frozen object error since the memo - # instance variable is uninitialized. - # - # Work around by eagerly memoizing before freezing. - # - # Ruby 1.9 uses a preinitialized instance variable so it's unaffected. - # This hack is as close as we can get to feature detection: - begin - ::Date.today.freeze.jd - rescue => frozen_object_error - if frozen_object_error.message =~ /frozen/ - def freeze #:nodoc: - self.class.private_instance_methods(false).each do |m| - if m.to_s =~ /\A__\d+__\Z/ - instance_variable_set(:"@#{m}", [send(m)]) - end - end - - super - end - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb deleted file mode 100644 index 43d70c701..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/calculations.rb +++ /dev/null @@ -1,230 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Date #:nodoc: - # Enables the use of time calculations within Time itself - module Calculations - def self.included(base) #:nodoc: - base.extend ClassMethods - - base.instance_eval do - alias_method :plus_without_duration, :+ - alias_method :+, :plus_with_duration - - alias_method :minus_without_duration, :- - alias_method :-, :minus_with_duration - end - end - - module ClassMethods - # Returns a new Date representing the date 1 day ago (i.e. yesterday's date). - def yesterday - ::Date.today.yesterday - end - - # Returns a new Date representing the date 1 day after today (i.e. tomorrow's date). - def tomorrow - ::Date.today.tomorrow - end - - # Returns Time.zone.today when config.time_zone is set, otherwise just returns Date.today. - def current - ::Time.zone_default ? ::Time.zone.today : ::Date.today - end - end - - # Tells whether the Date object's date lies in the past - def past? - self < ::Date.current - end - - # Tells whether the Date object's date is today - def today? - self.to_date == ::Date.current # we need the to_date because of DateTime - end - - # Tells whether the Date object's date lies in the future - def future? - self > ::Date.current - end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then subtracts the specified number of seconds - def ago(seconds) - to_time.since(-seconds) - end - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - # and then adds the specified number of seconds - def since(seconds) - to_time.since(seconds) - end - alias :in :since - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the beginning of the day (0:00) - def beginning_of_day - to_time - end - alias :midnight :beginning_of_day - alias :at_midnight :beginning_of_day - alias :at_beginning_of_day :beginning_of_day - - # Converts Date to a Time (or DateTime if necessary) with the time portion set to the end of the day (23:59:59) - def end_of_day - to_time.end_of_day - end - - def plus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - other.since(self) - else - plus_without_duration(other) - end - end - - def minus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - plus_with_duration(-other) - else - minus_without_duration(other) - end - end - - # Provides precise Date calculations for years, months, and days. The +options+ parameter takes a hash with - # any of these keys: :years, :months, :weeks, :days. - def advance(options) - d = self - d = d >> options.delete(:years) * 12 if options[:years] - d = d >> options.delete(:months) if options[:months] - d = d + options.delete(:weeks) * 7 if options[:weeks] - d = d + options.delete(:days) if options[:days] - d - end - - # Returns a new Date where one or more of the elements have been changed according to the +options+ parameter. - # - # Examples: - # - # Date.new(2007, 5, 12).change(:day => 1) # => Date.new(2007, 5, 1) - # Date.new(2007, 5, 12).change(:year => 2005, :month => 1) # => Date.new(2005, 1, 12) - def change(options) - ::Date.new( - options[:year] || self.year, - options[:month] || self.month, - options[:day] || self.day - ) - end - - # Returns a new Date/DateTime representing the time a number of specified months ago - def months_ago(months) - advance(:months => -months) - end - - # Returns a new Date/DateTime representing the time a number of specified months in the future - def months_since(months) - advance(:months => months) - end - - # Returns a new Date/DateTime representing the time a number of specified years ago - def years_ago(years) - advance(:years => -years) - end - - # Returns a new Date/DateTime representing the time a number of specified years in the future - def years_since(years) - advance(:years => years) - end - - # Short-hand for years_ago(1) - def last_year - years_ago(1) - end - - # Short-hand for years_since(1) - def next_year - years_since(1) - end - - # Short-hand for months_ago(1) - def last_month - months_ago(1) - end - - # Short-hand for months_since(1) - def next_month - months_since(1) - end - - # Returns a new Date/DateTime representing the "start" of this week (i.e, Monday; DateTime objects will have time set to 0:00) - def beginning_of_week - days_to_monday = self.wday!=0 ? self.wday-1 : 6 - result = self - days_to_monday - self.acts_like?(:time) ? result.midnight : result - end - alias :monday :beginning_of_week - alias :at_beginning_of_week :beginning_of_week - - # Returns a new Date/DateTime representing the end of this week (Sunday, DateTime objects will have time set to 23:59:59) - def end_of_week - days_to_sunday = self.wday!=0 ? 7-self.wday : 0 - result = self + days_to_sunday.days - self.acts_like?(:time) ? result.end_of_day : result - end - alias :at_end_of_week :end_of_week - - # Returns a new Date/DateTime representing the start of the given day in next week (default is Monday). - def next_week(day = :monday) - days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6} - result = (self + 7).beginning_of_week + days_into_week[day] - self.acts_like?(:time) ? result.change(:hour => 0) : result - end - - # Returns a new ; DateTime objects will have time set to 0:00DateTime representing the start of the month (1st of the month; DateTime objects will have time set to 0:00) - def beginning_of_month - self.acts_like?(:time) ? change(:day => 1,:hour => 0, :min => 0, :sec => 0) : change(:day => 1) - end - alias :at_beginning_of_month :beginning_of_month - - # Returns a new Date/DateTime representing the end of the month (last day of the month; DateTime objects will have time set to 0:00) - def end_of_month - last_day = ::Time.days_in_month( self.month, self.year ) - self.acts_like?(:time) ? change(:day => last_day, :hour => 23, :min => 59, :sec => 59) : change(:day => last_day) - end - alias :at_end_of_month :end_of_month - - # Returns a new Date/DateTime representing the start of the quarter (1st of january, april, july, october; DateTime objects will have time set to 0:00) - def beginning_of_quarter - beginning_of_month.change(:month => [10, 7, 4, 1].detect { |m| m <= self.month }) - end - alias :at_beginning_of_quarter :beginning_of_quarter - - # Returns a new Date/DateTime representing the end of the quarter (last day of march, june, september, december; DateTime objects will have time set to 23:59:59) - def end_of_quarter - beginning_of_month.change(:month => [3, 6, 9, 12].detect { |m| m >= self.month }).end_of_month - end - alias :at_end_of_quarter :end_of_quarter - - # Returns a new Date/DateTime representing the start of the year (1st of january; DateTime objects will have time set to 0:00) - def beginning_of_year - self.acts_like?(:time) ? change(:month => 1, :day => 1, :hour => 0, :min => 0, :sec => 0) : change(:month => 1, :day => 1) - end - alias :at_beginning_of_year :beginning_of_year - - # Returns a new Time representing the end of the year (31st of december; DateTime objects will have time set to 23:59:59) - def end_of_year - self.acts_like?(:time) ? change(:month => 12,:day => 31,:hour => 23, :min => 59, :sec => 59) : change(:month => 12, :day => 31) - end - alias :at_end_of_year :end_of_year - - # Convenience method which returns a new Date/DateTime representing the time 1 day ago - def yesterday - self - 1 - end - - # Convenience method which returns a new Date/DateTime representing the time 1 day since the instance time - def tomorrow - self + 1 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb deleted file mode 100644 index d2d9699d0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date/conversions.rb +++ /dev/null @@ -1,107 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Date #:nodoc: - # Converting dates to formatted strings, times, and datetimes. - module Conversions - DATE_FORMATS = { - :short => "%e %b", - :long => "%B %e, %Y", - :db => "%Y-%m-%d", - :number => "%Y%m%d", - :long_ordinal => lambda { |date| date.strftime("%B #{date.day.ordinalize}, %Y") }, # => "April 25th, 2007" - :rfc822 => "%e %b %Y" - } - - def self.included(base) #:nodoc: - base.instance_eval do - alias_method :to_default_s, :to_s - alias_method :to_s, :to_formatted_s - alias_method :default_inspect, :inspect - alias_method :inspect, :readable_inspect - - # Ruby 1.9 has Date#to_time which converts to localtime only. - remove_method :to_time if base.instance_methods.include?(:to_time) - - # Ruby 1.9 has Date#xmlschema which converts to a string without the time component. - remove_method :xmlschema if base.instance_methods.include?(:xmlschema) - end - end - - # Convert to a formatted string. See DATE_FORMATS for predefined formats. - # - # This method is aliased to to_s. - # - # ==== Examples: - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_formatted_s(:db) # => "2007-11-10" - # date.to_s(:db) # => "2007-11-10" - # - # date.to_formatted_s(:short) # => "10 Nov" - # date.to_formatted_s(:long) # => "November 10, 2007" - # date.to_formatted_s(:long_ordinal) # => "November 10th, 2007" - # date.to_formatted_s(:rfc822) # => "10 Nov 2007" - # - # == Adding your own time formats to to_formatted_s - # You can add your own formats to the Date::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a date argument as the value. - # - # # config/initializers/time_formats.rb - # Date::DATE_FORMATS[:month_and_year] = "%B %Y" - # Date::DATE_FORMATS[:short_ordinal] = lambda { |date| date.strftime("%B #{date.day.ordinalize}") } - def to_formatted_s(format = :default) - if formatter = DATE_FORMATS[format] - if formatter.respond_to?(:call) - formatter.call(self).to_s - else - strftime(formatter) - end - else - to_default_s - end - end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005" - def readable_inspect - strftime("%a, %d %b %Y") - end - - # A method to keep Time, Date and DateTime instances interchangeable on conversions. - # In this case, it simply returns +self+. - def to_date - self - end if RUBY_VERSION < '1.9' - - # Converts a Date instance to a Time, where the time is set to the beginning of the day. - # The timezone can be either :local or :utc (default :local). - # - # ==== Examples: - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_time # => Sat Nov 10 00:00:00 0800 2007 - # date.to_time(:local) # => Sat Nov 10 00:00:00 0800 2007 - # - # date.to_time(:utc) # => Sat Nov 10 00:00:00 UTC 2007 - def to_time(form = :local) - ::Time.send("#{form}_time", year, month, day) - end - - # Converts a Date instance to a DateTime, where the time is set to the beginning of the day - # and UTC offset is set to 0. - # - # ==== Example: - # date = Date.new(2007, 11, 10) # => Sat, 10 Nov 2007 - # - # date.to_datetime # => Sat, 10 Nov 2007 00:00:00 0000 - def to_datetime - ::DateTime.civil(year, month, day, 0, 0, 0, 0) - end if RUBY_VERSION < '1.9' - - def xmlschema - to_time.xmlschema - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb deleted file mode 100644 index 66a93eac4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'date' -require 'active_support/core_ext/time/behavior' -require 'active_support/core_ext/time/zones' -require 'active_support/core_ext/date_time/calculations' -require 'active_support/core_ext/date_time/conversions' - -class DateTime - include ActiveSupport::CoreExtensions::Time::Behavior - include ActiveSupport::CoreExtensions::Time::Zones - include ActiveSupport::CoreExtensions::DateTime::Calculations - include ActiveSupport::CoreExtensions::DateTime::Conversions -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb deleted file mode 100644 index 0099431e9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/calculations.rb +++ /dev/null @@ -1,126 +0,0 @@ -require 'rational' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module DateTime #:nodoc: - # Enables the use of time calculations within DateTime itself - module Calculations - def self.included(base) #:nodoc: - base.extend ClassMethods - - base.class_eval do - alias_method :compare_without_coercion, :<=> - alias_method :<=>, :compare_with_coercion - end - end - - module ClassMethods - # DateTimes aren't aware of DST rules, so use a consistent non-DST offset when creating a DateTime with an offset in the local zone - def local_offset - ::Time.local(2007).utc_offset.to_r / 86400 - end - - def current - ::Time.zone_default ? ::Time.zone.now.to_datetime : ::Time.now.to_datetime - end - end - - # Tells whether the DateTime object's datetime lies in the past - def past? - self < ::DateTime.current - end - - # Tells whether the DateTime object's datetime lies in the future - def future? - self > ::DateTime.current - end - - # Seconds since midnight: DateTime.now.seconds_since_midnight - def seconds_since_midnight - self.sec + (self.min * 60) + (self.hour * 3600) - end - - # Returns a new DateTime where one or more of the elements have been changed according to the +options+ parameter. The time options - # (hour, minute, sec) reset cascadingly, so if only the hour is passed, then minute and sec is set to 0. If the hour and - # minute is passed, then sec is set to 0. - def change(options) - ::DateTime.civil( - options[:year] || self.year, - options[:month] || self.month, - options[:day] || self.day, - options[:hour] || self.hour, - options[:min] || (options[:hour] ? 0 : self.min), - options[:sec] || ((options[:hour] || options[:min]) ? 0 : self.sec), - options[:offset] || self.offset, - options[:start] || self.start - ) - end - - # Uses Date to provide precise Time calculations for years, months, and days. - # The +options+ parameter takes a hash with any of these keys: :years, - # :months, :weeks, :days, :hours, - # :minutes, :seconds. - def advance(options) - d = to_date.advance(options) - datetime_advanced_by_date = change(:year => d.year, :month => d.month, :day => d.day) - seconds_to_advance = (options[:seconds] || 0) + (options[:minutes] || 0) * 60 + (options[:hours] || 0) * 3600 - seconds_to_advance == 0 ? datetime_advanced_by_date : datetime_advanced_by_date.since(seconds_to_advance) - end - - # Returns a new DateTime representing the time a number of seconds ago - # Do not use this method in combination with x.months, use months_ago instead! - def ago(seconds) - self.since(-seconds) - end - - # Returns a new DateTime representing the time a number of seconds since the instance time - # Do not use this method in combination with x.months, use months_since instead! - def since(seconds) - self + Rational(seconds.round, 86400) - end - alias :in :since - - # Returns a new DateTime representing the start of the day (0:00) - def beginning_of_day - change(:hour => 0) - end - alias :midnight :beginning_of_day - alias :at_midnight :beginning_of_day - alias :at_beginning_of_day :beginning_of_day - - # Returns a new DateTime representing the end of the day (23:59:59) - def end_of_day - change(:hour => 23, :min => 59, :sec => 59) - end - - # Adjusts DateTime to UTC by adding its offset value; offset is set to 0 - # - # Example: - # - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)) # => Mon, 21 Feb 2005 10:11:12 -0600 - # DateTime.civil(2005, 2, 21, 10, 11, 12, Rational(-6, 24)).utc # => Mon, 21 Feb 2005 16:11:12 +0000 - def utc - new_offset(0) - end - alias_method :getutc, :utc - - # Returns true if offset == 0 - def utc? - offset == 0 - end - - # Returns the offset value in seconds - def utc_offset - (offset * 86400).to_i - end - - # Layers additional behavior on DateTime#<=> so that Time and ActiveSupport::TimeWithZone instances can be compared with a DateTime - def compare_with_coercion(other) - other = other.comparable_time if other.respond_to?(:comparable_time) - other = other.to_datetime unless other.acts_like?(:date) - compare_without_coercion(other) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb deleted file mode 100644 index c0175a5f2..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/date_time/conversions.rb +++ /dev/null @@ -1,96 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module DateTime #:nodoc: - # Converting datetimes to formatted strings, dates, and times. - module Conversions - def self.append_features(base) #:nodoc: - base.class_eval do - alias_method :default_inspect, :inspect - alias_method :to_default_s, :to_s unless (instance_methods(false) & [:to_s, 'to_s']).empty? - - # Ruby 1.9 has DateTime#to_time which internally relies on Time. We define our own #to_time which allows - # DateTimes outside the range of what can be created with Time. - remove_method :to_time if instance_methods.include?(:to_time) - end - - super - - base.class_eval do - alias_method :to_s, :to_formatted_s - alias_method :inspect, :readable_inspect - end - end - - # Convert to a formatted string. See Time::DATE_FORMATS for predefined formats. - # - # This method is aliased to to_s. - # - # === Examples: - # datetime = DateTime.civil(2007, 12, 4, 0, 0, 0, 0) # => Tue, 04 Dec 2007 00:00:00 +0000 - # - # datetime.to_formatted_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_s(:db) # => "2007-12-04 00:00:00" - # datetime.to_s(:number) # => "20071204000000" - # datetime.to_formatted_s(:short) # => "04 Dec 00:00" - # datetime.to_formatted_s(:long) # => "December 04, 2007 00:00" - # datetime.to_formatted_s(:long_ordinal) # => "December 4th, 2007 00:00" - # datetime.to_formatted_s(:rfc822) # => "Tue, 04 Dec 2007 00:00:00 +0000" - # - # == Adding your own datetime formats to to_formatted_s - # DateTime formats are shared with Time. You can add your own to the - # Time::DATE_FORMATS hash. Use the format name as the hash key and - # either a strftime string or Proc instance that takes a time or - # datetime argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = "%B %Y" - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - def to_formatted_s(format = :default) - return to_default_s unless formatter = ::Time::DATE_FORMATS[format] - formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) - end - - # Returns the +utc_offset+ as an +HH:MM formatted string. Examples: - # - # datetime = DateTime.civil(2000, 1, 1, 0, 0, 0, Rational(-6, 24)) - # datetime.formatted_offset # => "-06:00" - # datetime.formatted_offset(false) # => "-0600" - def formatted_offset(colon = true, alternate_utc_string = nil) - utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon) - end - - # Overrides the default inspect method with a human readable one, e.g., "Mon, 21 Feb 2005 14:30:00 +0000" - def readable_inspect - to_s(:rfc822) - end - - # Converts self to a Ruby Date object; time portion is discarded - def to_date - ::Date.new(year, month, day) - end - - # Attempts to convert self to a Ruby Time object; returns self if out of range of Ruby Time class - # If self has an offset other than 0, self will just be returned unaltered, since there's no clean way to map it to a Time - def to_time - self.offset == 0 ? ::Time.utc_time(year, month, day, hour, min, sec) : self - end - - # To be able to keep Times, Dates and DateTimes interchangeable on conversions - def to_datetime - self - end - - # Converts datetime to an appropriate format for use in XML - def xmlschema - strftime("%Y-%m-%dT%H:%M:%S%Z") - end if RUBY_VERSION < '1.9' - - # Converts self to a floating-point number of seconds since the Unix epoch - def to_f - days_since_unix_epoch = self - ::DateTime.civil(1970) - (days_since_unix_epoch * 86_400).to_f - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb deleted file mode 100644 index 8f49ddfd9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/duplicable.rb +++ /dev/null @@ -1,43 +0,0 @@ -class Object - # Can you safely .dup this object? - # False for nil, false, true, symbols, and numbers; true otherwise. - def duplicable? - true - end -end - -class NilClass #:nodoc: - def duplicable? - false - end -end - -class FalseClass #:nodoc: - def duplicable? - false - end -end - -class TrueClass #:nodoc: - def duplicable? - false - end -end - -class Symbol #:nodoc: - def duplicable? - false - end -end - -class Numeric #:nodoc: - def duplicable? - false - end -end - -class Class #:nodoc: - def duplicable? - false - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb deleted file mode 100644 index 788f3a7e9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/enumerable.rb +++ /dev/null @@ -1,107 +0,0 @@ -require 'active_support/ordered_hash' - -module Enumerable - # Ruby 1.8.7 introduces group_by, but the result isn't ordered. Override it. - remove_method(:group_by) if [].respond_to?(:group_by) && RUBY_VERSION < '1.9' - - # Collect an enumerable into sets, grouped by the result of a block. Useful, - # for example, for grouping records by date. - # - # Example: - # - # latest_transcripts.group_by(&:day).each do |day, transcripts| - # p "#{day} -> #{transcripts.map(&:class).join(', ')}" - # end - # "2006-03-01 -> Transcript" - # "2006-02-28 -> Transcript" - # "2006-02-27 -> Transcript, Transcript" - # "2006-02-26 -> Transcript, Transcript" - # "2006-02-25 -> Transcript" - # "2006-02-24 -> Transcript, Transcript" - # "2006-02-23 -> Transcript" - def group_by - assoc = ActiveSupport::OrderedHash.new - - each do |element| - key = yield(element) - - if assoc.has_key?(key) - assoc[key] << element - else - assoc[key] = [element] - end - end - - assoc - end unless [].respond_to?(:group_by) - - # Calculates a sum from the elements. Examples: - # - # payments.sum { |p| p.price * p.tax_rate } - # payments.sum(&:price) - # - # The latter is a shortcut for: - # - # payments.inject { |sum, p| sum + p.price } - # - # It can also calculate the sum without the use of a block. - # - # [5, 15, 10].sum # => 30 - # ["foo", "bar"].sum # => "foobar" - # [[1, 2], [3, 1, 5]].sum => [1, 2, 3, 1, 5] - # - # The default sum of an empty list is zero. You can override this default: - # - # [].sum(Payment.new(0)) { |i| i.amount } # => Payment.new(0) - # - def sum(identity = 0, &block) - return identity unless size > 0 - - if block_given? - map(&block).sum - else - inject { |sum, element| sum + element } - end - end - - # Iterates over a collection, passing the current element *and* the - # +memo+ to the block. Handy for building up hashes or - # reducing collections down to one object. Examples: - # - # %w(foo bar).each_with_object({}) { |str, hsh| hsh[str] = str.upcase } #=> {'foo' => 'FOO', 'bar' => 'BAR'} - # - # *Note* that you can't use immutable objects like numbers, true or false as - # the memo. You would think the following returns 120, but since the memo is - # never changed, it does not. - # - # (1..5).each_with_object(1) { |value, memo| memo *= value } # => 1 - # - def each_with_object(memo, &block) - returning memo do |m| - each do |element| - block.call(element, m) - end - end - end unless [].respond_to?(:each_with_object) - - # Convert an enumerable to a hash. Examples: - # - # people.index_by(&:login) - # => { "nextangle" => , "chade-" => , ...} - # people.index_by { |person| "#{person.first_name} #{person.last_name}" } - # => { "Chade- Fowlersburg-e" => , "David Heinemeier Hansson" => , ...} - # - def index_by - inject({}) do |accum, elem| - accum[yield(elem)] = elem - accum - end - end - - # Returns true if the collection has more than 1 element. Functionally equivalent to collection.size > 1. - # Works with a block too ala any?, so people.many? { |p| p.age > 26 } # => returns true if more than 1 person is over 26. - def many?(&block) - size = block_given? ? select(&block).size : self.size - size > 1 - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/exception.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/exception.rb deleted file mode 100644 index 57c856833..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/exception.rb +++ /dev/null @@ -1,41 +0,0 @@ -module ActiveSupport - if RUBY_VERSION >= '1.9' - FrozenObjectError = RuntimeError - else - FrozenObjectError = TypeError - end -end - -class Exception # :nodoc: - def clean_message - Pathname.clean_within message - end - - TraceSubstitutions = [] - FrameworkRegexp = /generated|vendor|dispatch|ruby|script\/\w+/ - - def clean_backtrace - backtrace.collect do |line| - Pathname.clean_within(TraceSubstitutions.inject(line) do |result, (regexp, sub)| - result.gsub regexp, sub - end) - end - end - - def application_backtrace - before_application_frame = true - - trace = clean_backtrace.reject do |line| - non_app_frame = (line =~ FrameworkRegexp) - before_application_frame = false unless non_app_frame - non_app_frame && ! before_application_frame - end - - # If we didn't find any application frames, return an empty app trace. - before_application_frame ? [] : trace - end - - def framework_backtrace - clean_backtrace.grep FrameworkRegexp - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/file.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/file.rb deleted file mode 100644 index e03f8ac44..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/file.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'active_support/core_ext/file/atomic' - -class File #:nodoc: - extend ActiveSupport::CoreExtensions::File::Atomic -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb deleted file mode 100644 index f988eff3d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/file/atomic.rb +++ /dev/null @@ -1,46 +0,0 @@ -require 'tempfile' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module File #:nodoc: - module Atomic - # Write to a file atomically. Useful for situations where you don't - # want other processes or threads to see half-written files. - # - # File.atomic_write("important.file") do |file| - # file.write("hello") - # end - # - # If your temp directory is not on the same filesystem as the file you're - # trying to write, you can provide a different temporary directory. - # - # File.atomic_write("/data/something.important", "/data/tmp") do |f| - # file.write("hello") - # end - def atomic_write(file_name, temp_dir = Dir.tmpdir) - temp_file = Tempfile.new(basename(file_name), temp_dir) - yield temp_file - temp_file.close - - begin - # Get original file permissions - old_stat = stat(file_name) - rescue Errno::ENOENT - # No old permissions, write a temp file to determine the defaults - check_name = ".permissions_check.#{Thread.current.object_id}.#{Process.pid}.#{rand(1000000)}" - open(check_name, "w") { } - old_stat = stat(check_name) - unlink(check_name) - end - - # Overwrite original file with temp file - rename(temp_file.path, file_name) - - # Set correct permissions on new file - chown(old_stat.uid, old_stat.gid, file_name) - chmod(old_stat.mode, file_name) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/float.rb deleted file mode 100644 index af166aa61..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'active_support/core_ext/float/rounding' -require 'active_support/core_ext/float/time' - -class Float #:nodoc: - include ActiveSupport::CoreExtensions::Float::Rounding - include ActiveSupport::CoreExtensions::Float::Time -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb deleted file mode 100644 index 062d46683..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/rounding.rb +++ /dev/null @@ -1,24 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Float #:nodoc: - module Rounding - def self.included(base) #:nodoc: - base.class_eval do - alias_method :round_without_precision, :round - alias_method :round, :round_with_precision - end - end - - # Rounds the float with the specified precision. - # - # x = 1.337 - # x.round # => 1 - # x.round(1) # => 1.3 - # x.round(2) # => 1.34 - def round_with_precision(precision = nil) - precision.nil? ? round_without_precision : (self * (10 ** precision)).round / (10 ** precision).to_f - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb deleted file mode 100644 index 13f2e0ddc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/float/time.rb +++ /dev/null @@ -1,27 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Float #:nodoc: - module Time - # Deprication helper methods not available as core_ext is loaded first. - def years - ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:years, "Fractional years are not respected. Convert value to integer before calling #years."), caller) - years_without_deprecation - end - def months - ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:months, "Fractional months are not respected. Convert value to integer before calling #months."), caller) - months_without_deprecation - end - - def months_without_deprecation - ActiveSupport::Duration.new(self * 30.days, [[:months, self]]) - end - alias :month :months - - def years_without_deprecation - ActiveSupport::Duration.new(self * 365.25.days, [[:years, self]]) - end - alias :year :years - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash.rb deleted file mode 100644 index a6065ab48..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash.rb +++ /dev/null @@ -1,14 +0,0 @@ -%w(keys indifferent_access deep_merge reverse_merge conversions diff slice except).each do |ext| - require "active_support/core_ext/hash/#{ext}" -end - -class Hash #:nodoc: - include ActiveSupport::CoreExtensions::Hash::Keys - include ActiveSupport::CoreExtensions::Hash::IndifferentAccess - include ActiveSupport::CoreExtensions::Hash::DeepMerge - include ActiveSupport::CoreExtensions::Hash::ReverseMerge - include ActiveSupport::CoreExtensions::Hash::Conversions - include ActiveSupport::CoreExtensions::Hash::Diff - include ActiveSupport::CoreExtensions::Hash::Slice - include ActiveSupport::CoreExtensions::Hash::Except -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb deleted file mode 100644 index 50dc7c61f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/conversions.rb +++ /dev/null @@ -1,259 +0,0 @@ -require 'date' -require 'cgi' -require 'builder' -require 'xmlsimple' - -# Locked down XmlSimple#xml_in_string -class XmlSimple - # Same as xml_in but doesn't try to smartly shoot itself in the foot. - def xml_in_string(string, options = nil) - handle_options('in', options) - - @doc = parse(string) - result = collapse(@doc.root) - - if @options['keeproot'] - merge({}, @doc.root.name, result) - else - result - end - end - - def self.xml_in_string(string, options = nil) - new.xml_in_string(string, options) - end -end - -# This module exists to decorate files deserialized using Hash.from_xml with -# the original_filename and content_type methods. -module FileLike #:nodoc: - attr_writer :original_filename, :content_type - - def original_filename - @original_filename || 'untitled' - end - - def content_type - @content_type || 'application/octet-stream' - end -end - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - module Conversions - - XML_TYPE_NAMES = { - "Symbol" => "symbol", - "Fixnum" => "integer", - "Bignum" => "integer", - "BigDecimal" => "decimal", - "Float" => "float", - "Date" => "date", - "DateTime" => "datetime", - "Time" => "datetime", - "TrueClass" => "boolean", - "FalseClass" => "boolean" - } unless defined?(XML_TYPE_NAMES) - - XML_FORMATTING = { - "symbol" => Proc.new { |symbol| symbol.to_s }, - "date" => Proc.new { |date| date.to_s(:db) }, - "datetime" => Proc.new { |time| time.xmlschema }, - "binary" => Proc.new { |binary| ActiveSupport::Base64.encode64(binary) }, - "yaml" => Proc.new { |yaml| yaml.to_yaml } - } unless defined?(XML_FORMATTING) - - # TODO: use Time.xmlschema instead of Time.parse; - # use regexp instead of Date.parse - unless defined?(XML_PARSING) - XML_PARSING = { - "symbol" => Proc.new { |symbol| symbol.to_sym }, - "date" => Proc.new { |date| ::Date.parse(date) }, - "datetime" => Proc.new { |time| ::Time.parse(time).utc rescue ::DateTime.parse(time).utc }, - "integer" => Proc.new { |integer| integer.to_i }, - "float" => Proc.new { |float| float.to_f }, - "decimal" => Proc.new { |number| BigDecimal(number) }, - "boolean" => Proc.new { |boolean| %w(1 true).include?(boolean.strip) }, - "string" => Proc.new { |string| string.to_s }, - "yaml" => Proc.new { |yaml| YAML::load(yaml) rescue yaml }, - "base64Binary" => Proc.new { |bin| ActiveSupport::Base64.decode64(bin) }, - "file" => Proc.new do |file, entity| - f = StringIO.new(ActiveSupport::Base64.decode64(file)) - f.extend(FileLike) - f.original_filename = entity['name'] - f.content_type = entity['content_type'] - f - end - } - - XML_PARSING.update( - "double" => XML_PARSING["float"], - "dateTime" => XML_PARSING["datetime"] - ) - end - - def self.included(klass) - klass.extend(ClassMethods) - end - - # Converts a hash into a string suitable for use as a URL query string. An optional namespace can be - # passed to enclose the param names (see example below). - # - # ==== Example: - # { :name => 'David', :nationality => 'Danish' }.to_query # => "name=David&nationality=Danish" - # - # { :name => 'David', :nationality => 'Danish' }.to_query('user') # => "user%5Bname%5D=David&user%5Bnationality%5D=Danish" - def to_query(namespace = nil) - collect do |key, value| - value.to_query(namespace ? "#{namespace}[#{key}]" : key) - end.sort * '&' - end - - alias_method :to_param, :to_query - - def to_xml(options = {}) - options[:indent] ||= 2 - options.reverse_merge!({ :builder => Builder::XmlMarkup.new(:indent => options[:indent]), - :root => "hash" }) - options[:builder].instruct! unless options.delete(:skip_instruct) - dasherize = !options.has_key?(:dasherize) || options[:dasherize] - root = dasherize ? options[:root].to_s.dasherize : options[:root].to_s - - options[:builder].__send__(:method_missing, root) do - each do |key, value| - case value - when ::Hash - value.to_xml(options.merge({ :root => key, :skip_instruct => true })) - when ::Array - value.to_xml(options.merge({ :root => key, :children => key.to_s.singularize, :skip_instruct => true})) - when ::Method, ::Proc - # If the Method or Proc takes two arguments, then - # pass the suggested child element name. This is - # used if the Method or Proc will be operating over - # multiple records and needs to create an containing - # element that will contain the objects being - # serialized. - if 1 == value.arity - value.call(options.merge({ :root => key, :skip_instruct => true })) - else - value.call(options.merge({ :root => key, :skip_instruct => true }), key.to_s.singularize) - end - else - if value.respond_to?(:to_xml) - value.to_xml(options.merge({ :root => key, :skip_instruct => true })) - else - type_name = XML_TYPE_NAMES[value.class.name] - - key = dasherize ? key.to_s.dasherize : key.to_s - - attributes = options[:skip_types] || value.nil? || type_name.nil? ? { } : { :type => type_name } - if value.nil? - attributes[:nil] = true - end - - options[:builder].tag!(key, - XML_FORMATTING[type_name] ? XML_FORMATTING[type_name].call(value) : value, - attributes - ) - end - end - end - - yield options[:builder] if block_given? - end - - end - - module ClassMethods - def from_xml(xml) - # TODO: Refactor this into something much cleaner that doesn't rely on XmlSimple - typecast_xml_value(undasherize_keys(XmlSimple.xml_in_string(xml, - 'forcearray' => false, - 'forcecontent' => true, - 'keeproot' => true, - 'contentkey' => '__content__') - )) - end - - private - def typecast_xml_value(value) - case value.class.to_s - when 'Hash' - if value['type'] == 'array' - child_key, entries = value.detect { |k,v| k != 'type' } # child_key is throwaway - if entries.nil? || (c = value['__content__'] && c.blank?) - [] - else - case entries.class.to_s # something weird with classes not matching here. maybe singleton methods breaking is_a? - when "Array" - entries.collect { |v| typecast_xml_value(v) } - when "Hash" - [typecast_xml_value(entries)] - else - raise "can't typecast #{entries.inspect}" - end - end - elsif value.has_key?("__content__") - content = value["__content__"] - if parser = XML_PARSING[value["type"]] - if parser.arity == 2 - XML_PARSING[value["type"]].call(content, value) - else - XML_PARSING[value["type"]].call(content) - end - else - content - end - elsif value['type'] == 'string' && value['nil'] != 'true' - "" - # blank or nil parsed values are represented by nil - elsif value.blank? || value['nil'] == 'true' - nil - # If the type is the only element which makes it then - # this still makes the value nil, except if type is - # a XML node(where type['value'] is a Hash) - elsif value['type'] && value.size == 1 && !value['type'].is_a?(::Hash) - nil - else - xml_value = value.inject({}) do |h,(k,v)| - h[k] = typecast_xml_value(v) - h - end - - # Turn { :files => { :file => # } into { :files => # } so it is compatible with - # how multipart uploaded files from HTML appear - xml_value["file"].is_a?(StringIO) ? xml_value["file"] : xml_value - end - when 'Array' - value.map! { |i| typecast_xml_value(i) } - case value.length - when 0 then nil - when 1 then value.first - else value - end - when 'String' - value - else - raise "can't typecast #{value.class.name} - #{value.inspect}" - end - end - - def undasherize_keys(params) - case params.class.to_s - when "Hash" - params.inject({}) do |h,(k,v)| - h[k.to_s.tr("-", "_")] = undasherize_keys(v) - h - end - when "Array" - params.map { |v| undasherize_keys(v) } - else - params - end - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb deleted file mode 100644 index f8842ba57..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/deep_merge.rb +++ /dev/null @@ -1,23 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - # Allows for deep merging - module DeepMerge - # Returns a new hash with +self+ and +other_hash+ merged recursively. - def deep_merge(other_hash) - self.merge(other_hash) do |key, oldval, newval| - oldval = oldval.to_hash if oldval.respond_to?(:to_hash) - newval = newval.to_hash if newval.respond_to?(:to_hash) - oldval.class.to_s == 'Hash' && newval.class.to_s == 'Hash' ? oldval.deep_merge(newval) : newval - end - end - - # Returns a new hash with +self+ and +other_hash+ merged recursively. - # Modifies the receiver in place. - def deep_merge!(other_hash) - replace(deep_merge(other_hash)) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb deleted file mode 100644 index 6abd67882..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/diff.rb +++ /dev/null @@ -1,19 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - module Diff - # Returns a hash that represents the difference between two hashes. - # - # Examples: - # - # {1 => 2}.diff(1 => 2) # => {} - # {1 => 2}.diff(1 => 3) # => {1 => 2} - # {}.diff(1 => 2) # => {1 => 2} - # {1 => 2, 3 => 4}.diff(1 => 2) # => {3 => 4} - def diff(h2) - self.dup.delete_if { |k, v| h2[k] == v }.merge(h2.dup.delete_if { |k, v| self.has_key?(k) }) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb deleted file mode 100644 index 949976d74..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/except.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'set' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - # Return a hash that includes everything but the given keys. This is useful for - # limiting a set of parameters to everything but a few known toggles: - # - # @person.update_attributes(params[:person].except(:admin)) - module Except - # Returns a new hash without the given keys. - def except(*keys) - dup.except!(*keys) - end - - # Replaces the hash without the given keys. - def except!(*keys) - keys.map! { |key| convert_key(key) } if respond_to?(:convert_key) - keys.each { |key| delete(key) } - self - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb deleted file mode 100644 index c96c5160b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/indifferent_access.rb +++ /dev/null @@ -1,137 +0,0 @@ -# This class has dubious semantics and we only have it so that -# people can write params[:key] instead of params['key'] -# and they get the same value for both keys. - -class HashWithIndifferentAccess < Hash - def initialize(constructor = {}) - if constructor.is_a?(Hash) - super() - update(constructor) - else - super(constructor) - end - end - - def default(key = nil) - if key.is_a?(Symbol) && include?(key = key.to_s) - self[key] - else - super - end - end - - alias_method :regular_writer, :[]= unless method_defined?(:regular_writer) - alias_method :regular_update, :update unless method_defined?(:regular_update) - - # Assigns a new value to the hash: - # - # hash = HashWithIndifferentAccess.new - # hash[:key] = "value" - # - def []=(key, value) - regular_writer(convert_key(key), convert_value(value)) - end - - # Updates the instantized hash with values from the second: - # - # hash_1 = HashWithIndifferentAccess.new - # hash_1[:key] = "value" - # - # hash_2 = HashWithIndifferentAccess.new - # hash_2[:key] = "New Value!" - # - # hash_1.update(hash_2) # => {"key"=>"New Value!"} - # - def update(other_hash) - other_hash.each_pair { |key, value| regular_writer(convert_key(key), convert_value(value)) } - self - end - - alias_method :merge!, :update - - # Checks the hash for a key matching the argument passed in: - # - # hash = HashWithIndifferentAccess.new - # hash["key"] = "value" - # hash.key? :key # => true - # hash.key? "key" # => true - # - def key?(key) - super(convert_key(key)) - end - - alias_method :include?, :key? - alias_method :has_key?, :key? - alias_method :member?, :key? - - # Fetches the value for the specified key, same as doing hash[key] - def fetch(key, *extras) - super(convert_key(key), *extras) - end - - # Returns an array of the values at the specified indices: - # - # hash = HashWithIndifferentAccess.new - # hash[:a] = "x" - # hash[:b] = "y" - # hash.values_at("a", "b") # => ["x", "y"] - # - def values_at(*indices) - indices.collect {|key| self[convert_key(key)]} - end - - # Returns an exact copy of the hash. - def dup - HashWithIndifferentAccess.new(self) - end - - # Merges the instantized and the specified hashes together, giving precedence to the values from the second hash - # Does not overwrite the existing hash. - def merge(hash) - self.dup.update(hash) - end - - # Removes a specified key from the hash. - def delete(key) - super(convert_key(key)) - end - - def stringify_keys!; self end - def symbolize_keys!; self end - def to_options!; self end - - # Convert to a Hash with String keys. - def to_hash - Hash.new(default).merge(self) - end - - protected - def convert_key(key) - key.kind_of?(Symbol) ? key.to_s : key - end - - def convert_value(value) - case value - when Hash - value.with_indifferent_access - when Array - value.collect { |e| e.is_a?(Hash) ? e.with_indifferent_access : e } - else - value - end - end -end - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - module IndifferentAccess #:nodoc: - def with_indifferent_access - hash = HashWithIndifferentAccess.new(self) - hash.default = self.default - hash - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb deleted file mode 100644 index 7312bcb41..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/keys.rb +++ /dev/null @@ -1,52 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - module Keys - # Return a new hash with all keys converted to strings. - def stringify_keys - inject({}) do |options, (key, value)| - options[key.to_s] = value - options - end - end - - # Destructively convert all keys to strings. - def stringify_keys! - keys.each do |key| - self[key.to_s] = delete(key) - end - self - end - - # Return a new hash with all keys converted to symbols. - def symbolize_keys - inject({}) do |options, (key, value)| - options[(key.to_sym rescue key) || key] = value - options - end - end - - # Destructively convert all keys to symbols. - def symbolize_keys! - self.replace(self.symbolize_keys) - end - - alias_method :to_options, :symbolize_keys - alias_method :to_options!, :symbolize_keys! - - # Validate all keys in a hash match *valid keys, raising ArgumentError on a mismatch. - # Note that keys are NOT treated indifferently, meaning if you use strings for keys but assert symbols - # as keys, this will fail. - # - # ==== Examples: - # { :name => "Rob", :years => "28" }.assert_valid_keys(:name, :age) # => raises "ArgumentError: Unknown key(s): years" - # { :name => "Rob", :age => "28" }.assert_valid_keys("name", "age") # => raises "ArgumentError: Unknown key(s): name, age" - # { :name => "Rob", :age => "28" }.assert_valid_keys(:name, :age) # => passes, raises nothing - def assert_valid_keys(*valid_keys) - unknown_keys = keys - [valid_keys].flatten - raise(ArgumentError, "Unknown key(s): #{unknown_keys.join(", ")}") unless unknown_keys.empty? - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb deleted file mode 100644 index 546e261cc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/reverse_merge.rb +++ /dev/null @@ -1,35 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - # Allows for reverse merging two hashes where the keys in the calling hash take precedence over those - # in the other_hash. This is particularly useful for initializing an option hash with default values: - # - # def setup(options = {}) - # options.reverse_merge! :size => 25, :velocity => 10 - # end - # - # Using merge, the above example would look as follows: - # - # def setup(options = {}) - # { :size => 25, :velocity => 10 }.merge(options) - # end - # - # The default :size and :velocity are only set if the +options+ hash passed in doesn't already - # have the respective key. - module ReverseMerge - # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second. - def reverse_merge(other_hash) - other_hash.merge(self) - end - - # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second. - # Modifies the receiver in place. - def reverse_merge!(other_hash) - replace(reverse_merge(other_hash)) - end - - alias_method :reverse_update, :reverse_merge! - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb deleted file mode 100644 index 88df49a69..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/hash/slice.rb +++ /dev/null @@ -1,33 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Hash #:nodoc: - # Slice a hash to include only the given keys. This is useful for - # limiting an options hash to valid keys before passing to a method: - # - # def search(criteria = {}) - # assert_valid_keys(:mass, :velocity, :time) - # end - # - # search(options.slice(:mass, :velocity, :time)) - # - # If you have an array of keys you want to limit to, you should splat them: - # - # valid_keys = [:mass, :velocity, :time] - # search(options.slice(*valid_keys)) - module Slice - # Returns a new hash with only the given keys. - def slice(*keys) - keys = keys.map! { |key| convert_key(key) } if respond_to?(:convert_key) - hash = self.class.new - keys.each { |k| hash[k] = self[k] if has_key?(k) } - hash - end - - # Replaces the hash with only the given keys. - def slice!(*keys) - replace(slice(*keys)) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer.rb deleted file mode 100644 index 18a7a402d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'active_support/core_ext/integer/even_odd' -require 'active_support/core_ext/integer/inflections' -require 'active_support/core_ext/integer/time' - -class Integer #:nodoc: - include ActiveSupport::CoreExtensions::Integer::EvenOdd - include ActiveSupport::CoreExtensions::Integer::Inflections - include ActiveSupport::CoreExtensions::Integer::Time -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb deleted file mode 100644 index b1d1e2806..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/even_odd.rb +++ /dev/null @@ -1,29 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Integer #:nodoc: - # For checking if a fixnum is even or odd. - # - # 2.even? # => true - # 2.odd? # => false - # 1.even? # => false - # 1.odd? # => true - # 0.even? # => true - # 0.odd? # => false - # -1.even? # => false - # -1.odd? # => true - module EvenOdd - def multiple_of?(number) - self % number == 0 - end - - def even? - multiple_of? 2 - end if RUBY_VERSION < '1.9' - - def odd? - !even? - end if RUBY_VERSION < '1.9' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb deleted file mode 100644 index 804702beb..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/inflections.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'active_support/inflector' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Integer #:nodoc: - module Inflections - # Ordinalize turns a number into an ordinal string used to denote the - # position in an ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # 1.ordinalize # => "1st" - # 2.ordinalize # => "2nd" - # 1002.ordinalize # => "1002nd" - # 1003.ordinalize # => "1003rd" - def ordinalize - Inflector.ordinalize(self) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb deleted file mode 100644 index 356e145b9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/integer/time.rb +++ /dev/null @@ -1,45 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Integer #:nodoc: - # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. - # - # These methods use Time#advance for precise date calculations when using from_now, ago, etc. - # as well as adding or subtracting their results from a Time object. For example: - # - # # equivalent to Time.now.advance(:months => 1) - # 1.month.from_now - # - # # equivalent to Time.now.advance(:years => 2) - # 2.years.from_now - # - # # equivalent to Time.now.advance(:months => 4, :years => 5) - # (4.months + 5.years).from_now - # - # While these methods provide precise calculation when used as in the examples above, care - # should be taken to note that this is not true if the result of `months', `years', etc is - # converted before use: - # - # # equivalent to 30.days.to_i.from_now - # 1.month.to_i.from_now - # - # # equivalent to 365.25.days.to_f.from_now - # 1.year.to_f.from_now - # - # In such cases, Ruby's core - # Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and - # Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision - # date and time arithmetic - module Time - def months - ActiveSupport::Duration.new(self * 30.days, [[:months, self]]) - end - alias :month :months - - def years - ActiveSupport::Duration.new(self * 365.25.days, [[:years, self]]) - end - alias :year :years - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb deleted file mode 100644 index 1922d804b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'active_support/core_ext/kernel/daemonizing' -require 'active_support/core_ext/kernel/reporting' -require 'active_support/core_ext/kernel/agnostics' -require 'active_support/core_ext/kernel/requires' -require 'active_support/core_ext/kernel/debugger' diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb deleted file mode 100644 index c0cb4fb42..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/agnostics.rb +++ /dev/null @@ -1,11 +0,0 @@ -class Object - # Makes backticks behave (somewhat more) similarly on all platforms. - # On win32 `nonexistent_command` raises Errno::ENOENT; on Unix, the - # spawned shell prints a message to stderr and sets $?. We emulate - # Unix on the former but not the latter. - def `(command) #:nodoc: - super - rescue Errno::ENOENT => e - STDERR.puts "#$0: #{e}" - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb deleted file mode 100644 index ed9d1f9bf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/daemonizing.rb +++ /dev/null @@ -1,7 +0,0 @@ -module Kernel - # Turns the current script into a daemon process that detaches from the console. - # It can be shut down with a TERM signal. - def daemonize - Process.daemon - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb deleted file mode 100644 index 4007a647b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/debugger.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Kernel - unless respond_to?(:debugger) - # Starts a debugging session if ruby-debug has been loaded (call script/server --debugger to do load it). - def debugger - Rails.logger.info "\n***** Debugger requested, but was not available: Start server with --debugger to enable *****\n" - end - end - - def breakpoint - Rails.logger.info "\n***** The 'breakpoint' command has been renamed 'debugger' -- please change *****\n" - debugger - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb deleted file mode 100644 index 0f101e8fa..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/reporting.rb +++ /dev/null @@ -1,59 +0,0 @@ -module Kernel - # Sets $VERBOSE to nil for the duration of the block and back to its original value afterwards. - # - # silence_warnings do - # value = noisy_call # no warning voiced - # end - # - # noisy_call # warning voiced - def silence_warnings - old_verbose, $VERBOSE = $VERBOSE, nil - yield - ensure - $VERBOSE = old_verbose - end - - # Sets $VERBOSE to true for the duration of the block and back to its original value afterwards. - def enable_warnings - old_verbose, $VERBOSE = $VERBOSE, true - yield - ensure - $VERBOSE = old_verbose - end - - # For compatibility - def silence_stderr #:nodoc: - silence_stream(STDERR) { yield } - end - - # Silences any stream for the duration of the block. - # - # silence_stream(STDOUT) do - # puts 'This will never be seen' - # end - # - # puts 'But this will' - def silence_stream(stream) - old_stream = stream.dup - stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null') - stream.sync = true - yield - ensure - stream.reopen(old_stream) - end - - # Blocks and ignores any exception passed as argument if raised within the block. - # - # suppress(ZeroDivisionError) do - # 1/0 - # puts "This code is NOT reached" - # end - # - # puts "This code gets executed and nothing related to ZeroDivisionError was seen" - def suppress(*exception_classes) - begin yield - rescue Exception => e - raise unless exception_classes.any? { |cls| e.kind_of?(cls) } - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb deleted file mode 100644 index 323fea49f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/kernel/requires.rb +++ /dev/null @@ -1,24 +0,0 @@ -module Kernel - # Require a library with fallback to RubyGems. Warnings during library - # loading are silenced to increase signal/noise for application warnings. - def require_library_or_gem(library_name) - silence_warnings do - begin - require library_name - rescue LoadError => cannot_require - # 1. Requiring the module is unsuccessful, maybe it's a gem and nobody required rubygems yet. Try. - begin - require 'rubygems' - rescue LoadError => rubygems_not_installed - raise cannot_require - end - # 2. Rubygems is installed and loaded. Try to load the library again - begin - require library_name - rescue LoadError => gem_not_installed - raise cannot_require - end - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb deleted file mode 100644 index 6165e9544..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/load_error.rb +++ /dev/null @@ -1,38 +0,0 @@ -class MissingSourceFile < LoadError #:nodoc: - attr_reader :path - def initialize(message, path) - super(message) - @path = path - end - - def is_missing?(path) - path.gsub(/\.rb$/, '') == self.path.gsub(/\.rb$/, '') - end - - def self.from_message(message) - REGEXPS.each do |regexp, capture| - match = regexp.match(message) - return MissingSourceFile.new(message, match[capture]) unless match.nil? - end - nil - end - - REGEXPS = [ - [/^no such file to load -- (.+)$/i, 1], - [/^Missing \w+ (file\s*)?([^\s]+.rb)$/i, 2], - [/^Missing API definition file in (.+)$/i, 1] - ] unless defined?(REGEXPS) -end - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module LoadErrorExtensions #:nodoc: - module LoadErrorClassMethods #:nodoc: - def new(*args) - (self == LoadError && MissingSourceFile.from_message(args.first)) || super - end - end - ::LoadError.extend(LoadErrorClassMethods) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/logger.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/logger.rb deleted file mode 100644 index c62255486..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/logger.rb +++ /dev/null @@ -1,143 +0,0 @@ -# Adds the 'around_level' method to Logger. - -class Logger - def self.define_around_helper(level) - module_eval <<-end_eval - def around_#{level}(before_message, after_message, &block) - self.#{level}(before_message) - return_value = block.call(self) - self.#{level}(after_message) - return return_value - end - end_eval - end - [:debug, :info, :error, :fatal].each {|level| define_around_helper(level) } -end - - -require 'logger' - -# Extensions to the built in Ruby logger. -# -# If you want to use the default log formatter as defined in the Ruby core, then you -# will need to set the formatter for the logger as in: -# -# logger.formatter = Formatter.new -# -# You can then specify the datetime format, for example: -# -# logger.datetime_format = "%Y-%m-%d" -# -# Note: This logger is deprecated in favor of ActiveSupport::BufferedLogger -class Logger - # Set to false to disable the silencer - cattr_accessor :silencer - self.silencer = true - - # Silences the logger for the duration of the block. - def silence(temporary_level = Logger::ERROR) - if silencer - begin - old_logger_level, self.level = level, temporary_level - yield self - ensure - self.level = old_logger_level - end - else - yield self - end - end - - alias :old_datetime_format= :datetime_format= - # Logging date-time format (string passed to +strftime+). Ignored if the formatter - # does not respond to datetime_format=. - def datetime_format=(datetime_format) - formatter.datetime_format = datetime_format if formatter.respond_to?(:datetime_format=) - end - - alias :old_datetime_format :datetime_format - # Get the logging datetime format. Returns nil if the formatter does not support - # datetime formatting. - def datetime_format - formatter.datetime_format if formatter.respond_to?(:datetime_format) - end - - alias :old_formatter :formatter if method_defined?(:formatter) - # Get the current formatter. The default formatter is a SimpleFormatter which only - # displays the log message - def formatter - @formatter ||= SimpleFormatter.new - end - - unless const_defined? :Formatter - class Formatter - Format = "%s, [%s#%d] %5s -- %s: %s\n" - - attr_accessor :datetime_format - - def initialize - @datetime_format = nil - end - - def call(severity, time, progname, msg) - Format % [severity[0..0], format_datetime(time), $$, severity, progname, - msg2str(msg)] - end - - private - def format_datetime(time) - if @datetime_format.nil? - time.strftime("%Y-%m-%dT%H:%M:%S.") << "%06d " % time.usec - else - time.strftime(@datetime_format) - end - end - - def msg2str(msg) - case msg - when ::String - msg - when ::Exception - "#{ msg.message } (#{ msg.class })\n" << - (msg.backtrace || []).join("\n") - else - msg.inspect - end - end - end - end - - # Simple formatter which only displays the message. - class SimpleFormatter < Logger::Formatter - # This method is invoked when a log event occurs - def call(severity, timestamp, progname, msg) - "#{String === msg ? msg : msg.inspect}\n" - end - end - - private - alias old_format_message format_message - - # Ruby 1.8.3 transposed the msg and progname arguments to format_message. - # We can't test RUBY_VERSION because some distributions don't keep Ruby - # and its standard library in sync, leading to installations of Ruby 1.8.2 - # with Logger from 1.8.3 and vice versa. - if method_defined?(:formatter=) - def format_message(severity, timestamp, progname, msg) - formatter.call(severity, timestamp, progname, msg) - end - else - def format_message(severity, timestamp, msg, progname) - formatter.call(severity, timestamp, progname, msg) - end - - attr_writer :formatter - public :formatter= - - alias old_format_datetime format_datetime - def format_datetime(datetime) datetime end - - alias old_msg2str msg2str - def msg2str(msg) msg end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module.rb deleted file mode 100644 index da8d28ec1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'active_support/core_ext/module/inclusion' -require 'active_support/core_ext/module/attribute_accessors' -require 'active_support/core_ext/module/attr_internal' -require 'active_support/core_ext/module/attr_accessor_with_default' -require 'active_support/core_ext/module/delegation' -require 'active_support/core_ext/module/introspection' -require 'active_support/core_ext/module/loading' -require 'active_support/core_ext/module/aliasing' -require 'active_support/core_ext/module/model_naming' -require 'active_support/core_ext/module/synchronization' - -module ActiveSupport - module CoreExtensions - # Various extensions for the Ruby core Module class. - module Module - # Nothing here. Only defined for API documentation purposes. - end - end -end - -class Module - include ActiveSupport::CoreExtensions::Module -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb deleted file mode 100644 index e640f6452..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/aliasing.rb +++ /dev/null @@ -1,74 +0,0 @@ -module ActiveSupport - module CoreExtensions - module Module - # Encapsulates the common pattern of: - # - # alias_method :foo_without_feature, :foo - # alias_method :foo, :foo_with_feature - # - # With this, you simply do: - # - # alias_method_chain :foo, :feature - # - # And both aliases are set up for you. - # - # Query and bang methods (foo?, foo!) keep the same punctuation: - # - # alias_method_chain :foo?, :feature - # - # is equivalent to - # - # alias_method :foo_without_feature?, :foo? - # alias_method :foo?, :foo_with_feature? - # - # so you can safely chain foo, foo?, and foo! with the same feature. - def alias_method_chain(target, feature) - # Strip out punctuation on predicates or bang methods since - # e.g. target?_without_feature is not a valid method name. - aliased_target, punctuation = target.to_s.sub(/([?!=])$/, ''), $1 - yield(aliased_target, punctuation) if block_given? - - with_method, without_method = "#{aliased_target}_with_#{feature}#{punctuation}", "#{aliased_target}_without_#{feature}#{punctuation}" - - alias_method without_method, target - alias_method target, with_method - - case - when public_method_defined?(without_method) - public target - when protected_method_defined?(without_method) - protected target - when private_method_defined?(without_method) - private target - end - end - - # Allows you to make aliases for attributes, which includes - # getter, setter, and query methods. - # - # Example: - # - # class Content < ActiveRecord::Base - # # has a title attribute - # end - # - # class Email < Content - # alias_attribute :subject, :title - # end - # - # e = Email.find(1) - # e.title # => "Superstars" - # e.subject # => "Superstars" - # e.subject? # => true - # e.subject = "Megastars" - # e.title # => "Megastars" - def alias_attribute(new_name, old_name) - module_eval <<-STR, __FILE__, __LINE__+1 - def #{new_name}; self.#{old_name}; end - def #{new_name}?; self.#{old_name}?; end - def #{new_name}=(v); self.#{old_name} = v; end - STR - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb deleted file mode 100644 index 683789d85..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_accessor_with_default.rb +++ /dev/null @@ -1,31 +0,0 @@ -class Module - # Declare an attribute accessor with an initial default return value. - # - # To give attribute :age the initial value 25: - # - # class Person - # attr_accessor_with_default :age, 25 - # end - # - # some_person.age - # => 25 - # some_person.age = 26 - # some_person.age - # => 26 - # - # To give attribute :element_name a dynamic default value, evaluated - # in scope of self: - # - # attr_accessor_with_default(:element_name) { name.underscore } - # - def attr_accessor_with_default(sym, default = nil, &block) - raise 'Default value or block required' unless !default.nil? || block - define_method(sym, block_given? ? block : Proc.new { default }) - module_eval(<<-EVAL, __FILE__, __LINE__) - def #{sym}=(value) - class << self; attr_reader :#{sym} end - @#{sym} = value - end - EVAL - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb deleted file mode 100644 index b66c0d750..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attr_internal.rb +++ /dev/null @@ -1,32 +0,0 @@ -class Module - # Declares an attribute reader backed by an internally-named instance variable. - def attr_internal_reader(*attrs) - attrs.each do |attr| - module_eval "def #{attr}() #{attr_internal_ivar_name(attr)} end" - end - end - - # Declares an attribute writer backed by an internally-named instance variable. - def attr_internal_writer(*attrs) - attrs.each do |attr| - module_eval "def #{attr}=(v) #{attr_internal_ivar_name(attr)} = v end" - end - end - - # Declares an attribute reader and writer backed by an internally-named instance - # variable. - def attr_internal_accessor(*attrs) - attr_internal_reader(*attrs) - attr_internal_writer(*attrs) - end - - alias_method :attr_internal, :attr_internal_accessor - - private - mattr_accessor :attr_internal_naming_format - self.attr_internal_naming_format = '@_%s' - - def attr_internal_ivar_name(attr) - attr_internal_naming_format % attr - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb deleted file mode 100644 index 51e1c9af9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/attribute_accessors.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Extends the module object with module and instance accessors for class attributes, -# just like the native attr* accessors for instance attributes. -# -# module AppConfiguration -# mattr_accessor :google_api_key -# self.google_api_key = "123456789" -# -# mattr_accessor :paypal_url -# self.paypal_url = "www.sandbox.paypal.com" -# end -# -# AppConfiguration.google_api_key = "overriding the api key!" -class Module - def mattr_reader(*syms) - syms.each do |sym| - next if sym.is_a?(Hash) - class_eval(<<-EOS, __FILE__, __LINE__) - unless defined? @@#{sym} - @@#{sym} = nil - end - - def self.#{sym} - @@#{sym} - end - - def #{sym} - @@#{sym} - end - EOS - end - end - - def mattr_writer(*syms) - options = syms.extract_options! - syms.each do |sym| - class_eval(<<-EOS, __FILE__, __LINE__) - unless defined? @@#{sym} - @@#{sym} = nil - end - - def self.#{sym}=(obj) - @@#{sym} = obj - end - - #{" - def #{sym}=(obj) - @@#{sym} = obj - end - " unless options[:instance_writer] == false } - EOS - end - end - - def mattr_accessor(*syms) - mattr_reader(*syms) - mattr_writer(*syms) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb deleted file mode 100644 index 2905eebc8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/delegation.rb +++ /dev/null @@ -1,95 +0,0 @@ -class Module - # Provides a delegate class method to easily expose contained objects' methods - # as your own. Pass one or more methods (specified as symbols or strings) - # and the name of the target object as the final :to option (also a symbol - # or string). At least one method and the :to option are required. - # - # Delegation is particularly useful with Active Record associations: - # - # class Greeter < ActiveRecord::Base - # def hello() "hello" end - # def goodbye() "goodbye" end - # end - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, :to => :greeter - # end - # - # Foo.new.hello # => "hello" - # Foo.new.goodbye # => NoMethodError: undefined method `goodbye' for # - # - # Multiple delegates to the same target are allowed: - # - # class Foo < ActiveRecord::Base - # belongs_to :greeter - # delegate :hello, :goodbye, :to => :greeter - # end - # - # Foo.new.goodbye # => "goodbye" - # - # Methods can be delegated to instance variables, class variables, or constants - # by providing them as a symbols: - # - # class Foo - # CONSTANT_ARRAY = [0,1,2,3] - # @@class_array = [4,5,6,7] - # - # def initialize - # @instance_array = [8,9,10,11] - # end - # delegate :sum, :to => :CONSTANT_ARRAY - # delegate :min, :to => :@@class_array - # delegate :max, :to => :@instance_array - # end - # - # Foo.new.sum # => 6 - # Foo.new.min # => 4 - # Foo.new.max # => 11 - # - # Delegates can optionally be prefixed using the :prefix option. If the value - # is true, the delegate methods are prefixed with the name of the object being - # delegated to. - # - # Person = Struct.new(:name, :address) - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, :to => :client, :prefix => true - # end - # - # john_doe = Person.new("John Doe", "Vimmersvej 13") - # invoice = Invoice.new(john_doe) - # invoice.client_name # => "John Doe" - # invoice.client_address # => "Vimmersvej 13" - # - # It is also possible to supply a custom prefix. - # - # class Invoice < Struct.new(:client) - # delegate :name, :address, :to => :client, :prefix => :customer - # end - # - # invoice = Invoice.new(john_doe) - # invoice.customer_name # => "John Doe" - # invoice.customer_address # => "Vimmersvej 13" - # - def delegate(*methods) - options = methods.pop - unless options.is_a?(Hash) && to = options[:to] - raise ArgumentError, "Delegation needs a target. Supply an options hash with a :to key as the last argument (e.g. delegate :hello, :to => :greeter)." - end - - if options[:prefix] == true && options[:to].to_s =~ /^[^a-z_]/ - raise ArgumentError, "Can only automatically set the delegation prefix when delegating to a method." - end - - prefix = options[:prefix] && "#{options[:prefix] == true ? to : options[:prefix]}_" - - methods.each do |method| - module_eval(<<-EOS, "(__DELEGATION__)", 1) - def #{prefix}#{method}(*args, &block) - #{to}.__send__(#{method.inspect}, *args, &block) - end - EOS - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb deleted file mode 100644 index 4f2384164..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/inclusion.rb +++ /dev/null @@ -1,30 +0,0 @@ -class Module - # Returns the classes in the current ObjectSpace where this module has been - # mixed in according to Module#included_modules. - # - # module M - # end - # - # module N - # include M - # end - # - # class C - # include M - # end - # - # class D < C - # end - # - # p M.included_in_classes # => [C, D] - # - def included_in_classes - classes = [] - ObjectSpace.each_object(Class) { |k| classes << k if k.included_modules.include?(self) } - - classes.reverse.inject([]) do |unique_classes, klass| - unique_classes << klass unless unique_classes.collect { |k| k.to_s }.include?(klass.to_s) - unique_classes - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb deleted file mode 100644 index 8beaff4b8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/introspection.rb +++ /dev/null @@ -1,90 +0,0 @@ -module ActiveSupport - module CoreExtensions - module Module - # Returns the name of the module containing this one. - # - # p M::N.parent_name # => "M" - def parent_name - unless defined? @parent_name - @parent_name = name =~ /::[^:]+\Z/ ? $`.freeze : nil - end - @parent_name - end - - # Returns the module which contains this one according to its name. - # - # module M - # module N - # end - # end - # X = M::N - # - # p M::N.parent # => M - # p X.parent # => M - # - # The parent of top-level and anonymous modules is Object. - # - # p M.parent # => Object - # p Module.new.parent # => Object - # - def parent - parent_name ? parent_name.constantize : Object - end - - # Returns all the parents of this module according to its name, ordered from - # nested outwards. The receiver is not contained within the result. - # - # module M - # module N - # end - # end - # X = M::N - # - # p M.parents # => [Object] - # p M::N.parents # => [M, Object] - # p X.parents # => [M, Object] - # - def parents - parents = [] - if parent_name - parts = parent_name.split('::') - until parts.empty? - parents << (parts * '::').constantize - parts.pop - end - end - parents << Object unless parents.include? Object - parents - end - - if RUBY_VERSION < '1.9' - # Returns the constants that have been defined locally by this object and - # not in an ancestor. This method is exact if running under Ruby 1.9. In - # previous versions it may miss some constants if their definition in some - # ancestor is identical to their definition in the receiver. - def local_constants - inherited = {} - - ancestors.each do |anc| - next if anc == self - anc.constants.each { |const| inherited[const] = anc.const_get(const) } - end - - constants.select do |const| - !inherited.key?(const) || inherited[const].object_id != const_get(const).object_id - end - end - else - def local_constants #:nodoc: - constants(false) - end - end - - # Returns the names of the constants defined locally rather than the - # constants themselves. See local_constants. - def local_constant_names - local_constants.map { |c| c.to_s } - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb deleted file mode 100644 index 4b4b110b2..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/loading.rb +++ /dev/null @@ -1,23 +0,0 @@ -class Module - # Returns String#underscore applied to the module name minus trailing classes. - # - # ActiveRecord.as_load_path # => "active_record" - # ActiveRecord::Associations.as_load_path # => "active_record/associations" - # ActiveRecord::Base.as_load_path # => "active_record" (Base is a class) - # - # The Kernel module gives an empty string by definition. - # - # Kernel.as_load_path # => "" - # Math.as_load_path # => "math" - def as_load_path - if self == Object || self == Kernel - '' - elsif is_a? Class - parent == self ? '' : parent.as_load_path - else - name.split('::').collect do |word| - word.underscore - end * '/' - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb deleted file mode 100644 index 3ec4f3ba1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/model_naming.rb +++ /dev/null @@ -1,23 +0,0 @@ -module ActiveSupport - class ModelName < String - attr_reader :singular, :plural, :cache_key, :partial_path - - def initialize(name) - super - @singular = underscore.tr('/', '_').freeze - @plural = @singular.pluralize.freeze - @cache_key = tableize.freeze - @partial_path = "#{@cache_key}/#{demodulize.underscore}".freeze - end - end - - module CoreExtensions - module Module - # Returns an ActiveSupport::ModelName object for module. It can be - # used to retrieve all kinds of naming-related information. - def model_name - @model_name ||= ModelName.new(name) - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb deleted file mode 100644 index 251606024..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/module/synchronization.rb +++ /dev/null @@ -1,39 +0,0 @@ -class Module - # Synchronize access around a method, delegating synchronization to a - # particular mutex. A mutex (either a Mutex, or any object that responds to - # #synchronize and yields to a block) must be provided as a final :with option. - # The :with option should be a symbol or string, and can represent a method, - # constant, or instance or class variable. - # Example: - # class SharedCache - # @@lock = Mutex.new - # def expire - # ... - # end - # synchronize :expire, :with => :@@lock - # end - def synchronize(*methods) - options = methods.extract_options! - unless options.is_a?(Hash) && with = options[:with] - raise ArgumentError, "Synchronization needs a mutex. Supply an options hash with a :with key as the last argument (e.g. synchronize :hello, :with => :@mutex)." - end - - methods.each do |method| - aliased_method, punctuation = method.to_s.sub(/([?!=])$/, ''), $1 - - if method_defined?("#{aliased_method}_without_synchronization#{punctuation}") - raise ArgumentError, "#{method} is already synchronized. Double synchronization is not currently supported." - end - - module_eval(<<-EOS, __FILE__, __LINE__) - def #{aliased_method}_with_synchronization#{punctuation}(*args, &block) - #{with}.synchronize do - #{aliased_method}_without_synchronization#{punctuation}(*args, &block) - end - end - EOS - - alias_method_chain method, :synchronization - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb deleted file mode 100644 index 49176c12d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/name_error.rb +++ /dev/null @@ -1,17 +0,0 @@ -# Add a +missing_name+ method to NameError instances. -class NameError #:nodoc: - # Add a method to obtain the missing name from a NameError. - def missing_name - $1 if /((::)?([A-Z]\w*)(::[A-Z]\w*)*)$/ =~ message - end - - # Was this exception raised because the given name was missing? - def missing_name?(name) - if name.is_a? Symbol - last_name = (missing_name || '').split('::').last - last_name == name.to_s - else - missing_name == name.to_s - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb deleted file mode 100644 index 759b86b81..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'active_support/core_ext/numeric/time' -require 'active_support/core_ext/numeric/bytes' -require 'active_support/core_ext/numeric/conversions' - -class Numeric #:nodoc: - include ActiveSupport::CoreExtensions::Numeric::Time - include ActiveSupport::CoreExtensions::Numeric::Bytes - include ActiveSupport::CoreExtensions::Numeric::Conversions -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb deleted file mode 100644 index 56477673a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/bytes.rb +++ /dev/null @@ -1,44 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Numeric #:nodoc: - # Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes - module Bytes - def bytes - self - end - alias :byte :bytes - - def kilobytes - self * 1024 - end - alias :kilobyte :kilobytes - - def megabytes - self * 1024.kilobytes - end - alias :megabyte :megabytes - - def gigabytes - self * 1024.megabytes - end - alias :gigabyte :gigabytes - - def terabytes - self * 1024.gigabytes - end - alias :terabyte :terabytes - - def petabytes - self * 1024.terabytes - end - alias :petabyte :petabytes - - def exabytes - self * 1024.petabytes - end - alias :exabyte :exabytes - - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb deleted file mode 100644 index e652ae5ca..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/conversions.rb +++ /dev/null @@ -1,19 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Numeric #:nodoc: - module Conversions - # Assumes self represents an offset from UTC in seconds (as returned from Time#utc_offset) - # and turns this into an +HH:MM formatted string. Example: - # - # -21_600.to_utc_offset_s # => "-06:00" - def to_utc_offset_s(colon=true) - seconds = self - sign = (seconds < 0 ? -1 : 1) - hours = seconds.abs / 3600 - minutes = (seconds.abs % 3600) / 60 - "%+03d%s%02d" % [ hours * sign, colon ? ":" : "", minutes ] - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb deleted file mode 100644 index bc7f180cd..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/numeric/time.rb +++ /dev/null @@ -1,81 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Numeric #:nodoc: - # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years. - # - # These methods use Time#advance for precise date calculations when using from_now, ago, etc. - # as well as adding or subtracting their results from a Time object. For example: - # - # # equivalent to Time.now.advance(:months => 1) - # 1.month.from_now - # - # # equivalent to Time.now.advance(:years => 2) - # 2.years.from_now - # - # # equivalent to Time.now.advance(:months => 4, :years => 5) - # (4.months + 5.years).from_now - # - # While these methods provide precise calculation when used as in the examples above, care - # should be taken to note that this is not true if the result of `months', `years', etc is - # converted before use: - # - # # equivalent to 30.days.to_i.from_now - # 1.month.to_i.from_now - # - # # equivalent to 365.25.days.to_f.from_now - # 1.year.to_f.from_now - # - # In such cases, Ruby's core - # Date[http://stdlib.rubyonrails.org/libdoc/date/rdoc/index.html] and - # Time[http://stdlib.rubyonrails.org/libdoc/time/rdoc/index.html] should be used for precision - # date and time arithmetic - module Time - def seconds - ActiveSupport::Duration.new(self, [[:seconds, self]]) - end - alias :second :seconds - - def minutes - ActiveSupport::Duration.new(self * 60, [[:seconds, self * 60]]) - end - alias :minute :minutes - - def hours - ActiveSupport::Duration.new(self * 3600, [[:seconds, self * 3600]]) - end - alias :hour :hours - - def days - ActiveSupport::Duration.new(self * 24.hours, [[:days, self]]) - end - alias :day :days - - def weeks - ActiveSupport::Duration.new(self * 7.days, [[:days, self * 7]]) - end - alias :week :weeks - - def fortnights - ActiveSupport::Duration.new(self * 2.weeks, [[:days, self * 14]]) - end - alias :fortnight :fortnights - - # Reads best without arguments: 10.minutes.ago - def ago(time = ::Time.now) - time - self - end - - # Reads best with argument: 10.minutes.until(time) - alias :until :ago - - # Reads best with argument: 10.minutes.since(time) - def since(time = ::Time.now) - time + self - end - - # Reads best without arguments: 10.minutes.from_now - alias :from_now :since - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object.rb deleted file mode 100644 index 0796a7b71..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'active_support/core_ext/object/conversions' -require 'active_support/core_ext/object/extending' -require 'active_support/core_ext/object/instance_variables' -require 'active_support/core_ext/object/metaclass' -require 'active_support/core_ext/object/misc' diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb deleted file mode 100644 index ad752f0fc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/conversions.rb +++ /dev/null @@ -1,14 +0,0 @@ -class Object - # Alias of to_s. - def to_param - to_s - end - - # Converts an object into a string suitable for use as a URL query string, using the given key as the - # param name. - # - # Note: This method is defined as a default implementation for all Objects for Hash#to_query to work. - def to_query(key) - "#{CGI.escape(key.to_s)}=#{CGI.escape(to_param.to_s)}" - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb deleted file mode 100644 index bbf6f8563..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/extending.rb +++ /dev/null @@ -1,80 +0,0 @@ -class Object - def remove_subclasses_of(*superclasses) #:nodoc: - Class.remove_class(*subclasses_of(*superclasses)) - end - - begin - ObjectSpace.each_object(Class.new) {} - - # Exclude this class unless it's a subclass of our supers and is defined. - # We check defined? in case we find a removed class that has yet to be - # garbage collected. This also fails for anonymous classes -- please - # submit a patch if you have a workaround. - def subclasses_of(*superclasses) #:nodoc: - subclasses = [] - - superclasses.each do |sup| - ObjectSpace.each_object(class << sup; self; end) do |k| - if k != sup && (k.name.blank? || eval("defined?(::#{k}) && ::#{k}.object_id == k.object_id")) - subclasses << k - end - end - end - - subclasses - end - rescue RuntimeError - # JRuby and any implementations which cannot handle the objectspace traversal - # above fall back to this implementation - def subclasses_of(*superclasses) #:nodoc: - subclasses = [] - - superclasses.each do |sup| - ObjectSpace.each_object(Class) do |k| - if superclasses.any? { |superclass| k < superclass } && - (k.name.blank? || eval("defined?(::#{k}) && ::#{k}.object_id == k.object_id")) - subclasses << k - end - end - subclasses.uniq! - end - subclasses - end - end - - def extended_by #:nodoc: - ancestors = class << self; ancestors end - ancestors.select { |mod| mod.class == Module } - [ Object, Kernel ] - end - - def extend_with_included_modules_from(object) #:nodoc: - object.extended_by.each { |mod| extend mod } - end - - unless defined? instance_exec # 1.9 - module InstanceExecMethods #:nodoc: - end - include InstanceExecMethods - - # Evaluate the block with the given arguments within the context of - # this object, so self is set to the method receiver. - # - # From Mauricio's http://eigenclass.org/hiki/bounded+space+instance_exec - def instance_exec(*args, &block) - begin - old_critical, Thread.critical = Thread.critical, true - n = 0 - n += 1 while respond_to?(method_name = "__instance_exec#{n}") - InstanceExecMethods.module_eval { define_method(method_name, &block) } - ensure - Thread.critical = old_critical - end - - begin - send(method_name, *args) - ensure - InstanceExecMethods.module_eval { remove_method(method_name) } rescue nil - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb deleted file mode 100644 index 4ecaab3bb..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/instance_variables.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Object - # Available in 1.8.6 and later. - unless respond_to?(:instance_variable_defined?) - def instance_variable_defined?(variable) - instance_variables.include?(variable.to_s) - end - end - - # Returns a hash that maps instance variable names without "@" to their - # corresponding values. Keys are strings both in Ruby 1.8 and 1.9. - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_values # => {"x" => 0, "y" => 1} - def instance_values #:nodoc: - instance_variables.inject({}) do |values, name| - values[name.to_s[1..-1]] = instance_variable_get(name) - values - end - end - - # Returns an array of instance variable names including "@". They are strings - # both in Ruby 1.8 and 1.9. - # - # class C - # def initialize(x, y) - # @x, @y = x, y - # end - # end - # - # C.new(0, 1).instance_variable_names # => ["@y", "@x"] - if RUBY_VERSION >= '1.9' - def instance_variable_names - instance_variables.map { |var| var.to_s } - end - else - alias_method :instance_variable_names, :instance_variables - end - - # Copies the instance variables of +object+ into +self+. - # - # Instance variable names in the +exclude+ array are ignored. If +object+ - # responds to protected_instance_variables the ones returned are - # also ignored. For example, Rails controllers implement that method. - # - # In both cases strings and symbols are understood, and they have to include - # the at sign. - # - # class C - # def initialize(x, y, z) - # @x, @y, @z = x, y, z - # end - # - # def protected_instance_variables - # %w(@z) - # end - # end - # - # a = C.new(0, 1, 2) - # b = C.new(3, 4, 5) - # - # a.copy_instance_variables_from(b, [:@y]) - # # a is now: @x = 3, @y = 1, @z = 2 - def copy_instance_variables_from(object, exclude = []) #:nodoc: - exclude += object.protected_instance_variables if object.respond_to? :protected_instance_variables - - vars = object.instance_variables.map(&:to_s) - exclude.map(&:to_s) - vars.each { |name| instance_variable_set(name, object.instance_variable_get(name)) } - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb deleted file mode 100644 index 93fb0ad59..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/metaclass.rb +++ /dev/null @@ -1,13 +0,0 @@ -class Object - # Get object's meta (ghost, eigenclass, singleton) class - def metaclass - class << self - self - end - end - - # If class_eval is called on an object, add those methods to its metaclass - def class_eval(*args, &block) - metaclass.class_eval(*args, &block) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb deleted file mode 100644 index cd0a04d32..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/object/misc.rb +++ /dev/null @@ -1,74 +0,0 @@ -class Object - # Returns +value+ after yielding +value+ to the block. This simplifies the - # process of constructing an object, performing work on the object, and then - # returning the object from a method. It is a Ruby-ized realization of the K - # combinator, courtesy of Mikael Brockman. - # - # ==== Examples - # - # # Without returning - # def foo - # values = [] - # values << "bar" - # values << "baz" - # return values - # end - # - # foo # => ['bar', 'baz'] - # - # # returning with a local variable - # def foo - # returning values = [] do - # values << 'bar' - # values << 'baz' - # end - # end - # - # foo # => ['bar', 'baz'] - # - # # returning with a block argument - # def foo - # returning [] do |values| - # values << 'bar' - # values << 'baz' - # end - # end - # - # foo # => ['bar', 'baz'] - def returning(value) - yield(value) - value - end - - # An elegant way to factor duplication out of options passed to a series of - # method calls. Each method called in the block, with the block variable as - # the receiver, will have its options merged with the default +options+ hash - # provided. Each method called on the block variable must take an options - # hash as its final argument. - # - # with_options :order => 'created_at', :class_name => 'Comment' do |post| - # post.has_many :comments, :conditions => ['approved = ?', true], :dependent => :delete_all - # post.has_many :unapproved_comments, :conditions => ['approved = ?', false] - # post.has_many :all_comments - # end - # - # Can also be used with an explicit receiver: - # - # map.with_options :controller => "people" do |people| - # people.connect "/people", :action => "index" - # people.connect "/people/:id", :action => "show" - # end - # - def with_options(options) - yield ActiveSupport::OptionMerger.new(self, options) - end - - # A duck-type assistant method. For example, Active Support extends Date - # to define an acts_like_date? method, and extends Time to define - # acts_like_time?. As a result, we can do "x.acts_like?(:time)" and - # "x.acts_like?(:date)" to do duck-type-safe comparisons, since classes that - # we want to act like Time simply need to define an acts_like_time? method. - def acts_like?(duck) - respond_to? "acts_like_#{duck}?" - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb deleted file mode 100644 index 4c5318ee6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname.rb +++ /dev/null @@ -1,7 +0,0 @@ -require 'pathname' -require 'active_support/core_ext/pathname/clean_within' - -class Pathname#:nodoc: - extend ActiveSupport::CoreExtensions::Pathname::CleanWithin -end - diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb deleted file mode 100644 index ae03e1bc5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/pathname/clean_within.rb +++ /dev/null @@ -1,14 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Pathname #:nodoc: - module CleanWithin - # Clean the paths contained in the provided string. - def clean_within(string) - string.gsub(%r{[\w. ]+(/[\w. ]+)+(\.rb)?(\b|$)}) do |path| - new(path).cleanpath - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/proc.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/proc.rb deleted file mode 100644 index 2ca23f62e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/proc.rb +++ /dev/null @@ -1,12 +0,0 @@ -class Proc #:nodoc: - def bind(object) - block, time = self, Time.now - (class << object; self end).class_eval do - method_name = "__bind_#{time.to_i}_#{time.usec}" - define_method(method_name, &block) - method = instance_method(method_name) - remove_method(method_name) - method - end.bind(object) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/process.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/process.rb deleted file mode 100644 index 0b0bc6dc6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/process.rb +++ /dev/null @@ -1 +0,0 @@ -require 'active_support/core_ext/process/daemon' diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb deleted file mode 100644 index 95ad5f8a5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/process/daemon.rb +++ /dev/null @@ -1,25 +0,0 @@ -if RUBY_VERSION < "1.9" - module Process - def self.daemon(nochdir = nil, noclose = nil) - exit if fork # Parent exits, child continues. - Process.setsid # Become session leader. - exit if fork # Zap session leader. See [1]. - - unless nochdir - Dir.chdir "/" # Release old working directory. - end - - File.umask 0000 # Ensure sensible umask. Adjust as needed. - - unless noclose - STDIN.reopen "/dev/null" # Free file descriptors and - STDOUT.reopen "/dev/null", "a" # point them somewhere sensible. - STDERR.reopen '/dev/null', 'a' - end - - trap("TERM") { exit } - - return 0 - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/range.rb deleted file mode 100644 index 0d2b169e3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'active_support/core_ext/range/conversions' -require 'active_support/core_ext/range/overlaps' -require 'active_support/core_ext/range/include_range' -require 'active_support/core_ext/range/blockless_step' - -class Range #:nodoc: - include ActiveSupport::CoreExtensions::Range::Conversions - include ActiveSupport::CoreExtensions::Range::Overlaps - include ActiveSupport::CoreExtensions::Range::IncludeRange - include ActiveSupport::CoreExtensions::Range::BlocklessStep -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb deleted file mode 100644 index 6fa1eb5be..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/blockless_step.rb +++ /dev/null @@ -1,32 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Range #:nodoc: - # Return an array when step is called without a block. - module BlocklessStep - def self.included(base) #:nodoc: - base.alias_method_chain :step, :blockless - end - - if RUBY_VERSION < '1.9' - def step_with_blockless(value = 1, &block) - if block_given? - step_without_blockless(value, &block) - else - returning [] do |array| - step_without_blockless(value) { |step| array << step } - end - end - end - else - def step_with_blockless(value = 1, &block) - if block_given? - step_without_blockless(value, &block) - else - step_without_blockless(value).to_a - end - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb deleted file mode 100644 index 932bdedad..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/conversions.rb +++ /dev/null @@ -1,27 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Range #:nodoc: - # Getting ranges in different convenient string representations and other objects - module Conversions - RANGE_FORMATS = { - :db => Proc.new { |start, stop| "BETWEEN '#{start.to_s(:db)}' AND '#{stop.to_s(:db)}'" } - } - - def self.included(base) #:nodoc: - base.class_eval do - alias_method :to_default_s, :to_s - alias_method :to_s, :to_formatted_s - end - end - # Gives a human readable format of the range. - # - # ==== Example: - # - # [1..100].to_formatted_s # => "1..100" - def to_formatted_s(format = :default) - RANGE_FORMATS[format] ? RANGE_FORMATS[format].call(first, last) : to_default_s - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb deleted file mode 100644 index 9a7d23569..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/include_range.rb +++ /dev/null @@ -1,30 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Range #:nodoc: - # Check if a Range includes another Range. - module IncludeRange - def self.included(base) #:nodoc: - base.alias_method_chain :include?, :range - end - - # Extends the default Range#include? to support range comparisons. - # (1..5).include?(1..5) # => true - # (1..5).include?(2..3) # => true - # (1..5).include?(2..6) # => false - # - # The native Range#include? behavior is untouched. - # ("a".."f").include?("c") # => true - # (5..9).include?(11) # => false - def include_with_range?(value) - if value.is_a?(::Range) - operator = exclude_end? ? :< : :<= - end_value = value.exclude_end? ? last.succ : last - include?(value.first) && (value.last <=> end_value).send(operator, 0) - else - include_without_range?(value) - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb deleted file mode 100644 index 43c69453e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/range/overlaps.rb +++ /dev/null @@ -1,15 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Range #:nodoc: - # Check if Ranges overlap. - module Overlaps - # Compare two ranges and see if they overlap eachother - # (1..5).overlaps?(4..6) # => true - # (1..5).overlaps?(7..9) # => false - def overlaps?(other) - include?(other.first) || other.include?(first) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb deleted file mode 100644 index d19d75d96..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/rexml.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'rexml/document' -require 'rexml/entity' - -# Fixes the rexml vulnerability disclosed at: -# http://www.ruby-lang.org/en/news/2008/08/23/dos-vulnerability-in-rexml/ -# This fix is identical to rexml-expansion-fix version 1.0.1 - -# Earlier versions of rexml defined REXML::Version, newer ones REXML::VERSION -unless REXML::Document.respond_to?(:entity_expansion_limit=) - module REXML - class Entity < Child - undef_method :unnormalized - def unnormalized - document.record_entity_expansion! if document - v = value() - return nil if v.nil? - @unnormalized = Text::unnormalize(v, parent) - @unnormalized - end - end - class Document < Element - @@entity_expansion_limit = 10_000 - def self.entity_expansion_limit= val - @@entity_expansion_limit = val - end - - def record_entity_expansion! - @number_of_expansions ||= 0 - @number_of_expansions += 1 - if @number_of_expansions > @@entity_expansion_limit - raise "Number of entity expansions exceeded, processing aborted." - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string.rb deleted file mode 100644 index 16c544a57..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string.rb +++ /dev/null @@ -1,22 +0,0 @@ -# encoding: utf-8 - -require 'active_support/core_ext/string/inflections' -require 'active_support/core_ext/string/conversions' -require 'active_support/core_ext/string/access' -require 'active_support/core_ext/string/starts_ends_with' -require 'active_support/core_ext/string/iterators' -require 'active_support/core_ext/string/multibyte' -require 'active_support/core_ext/string/xchar' -require 'active_support/core_ext/string/filters' -require 'active_support/core_ext/string/behavior' - -class String #:nodoc: - include ActiveSupport::CoreExtensions::String::Access - include ActiveSupport::CoreExtensions::String::Conversions - include ActiveSupport::CoreExtensions::String::Filters - include ActiveSupport::CoreExtensions::String::Inflections - include ActiveSupport::CoreExtensions::String::StartsEndsWith - include ActiveSupport::CoreExtensions::String::Iterators - include ActiveSupport::CoreExtensions::String::Behavior - include ActiveSupport::CoreExtensions::String::Multibyte -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb deleted file mode 100644 index 7fb21fa4d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/access.rb +++ /dev/null @@ -1,82 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - unless '1.9'.respond_to?(:force_encoding) - # Makes it easier to access parts of a string, such as specific characters and substrings. - module Access - # Returns the character at the +position+ treating the string as an array (where 0 is the first character). - # - # Examples: - # "hello".at(0) # => "h" - # "hello".at(4) # => "o" - # "hello".at(10) # => nil - def at(position) - mb_chars[position, 1].to_s - end - - # Returns the remaining of the string from the +position+ treating the string as an array (where 0 is the first character). - # - # Examples: - # "hello".from(0) # => "hello" - # "hello".from(2) # => "llo" - # "hello".from(10) # => nil - def from(position) - mb_chars[position..-1].to_s - end - - # Returns the beginning of the string up to the +position+ treating the string as an array (where 0 is the first character). - # - # Examples: - # "hello".to(0) # => "h" - # "hello".to(2) # => "hel" - # "hello".to(10) # => "hello" - def to(position) - mb_chars[0..position].to_s - end - - # Returns the first character of the string or the first +limit+ characters. - # - # Examples: - # "hello".first # => "h" - # "hello".first(2) # => "he" - # "hello".first(10) # => "hello" - def first(limit = 1) - mb_chars[0..(limit - 1)].to_s - end - - # Returns the last character of the string or the last +limit+ characters. - # - # Examples: - # "hello".last # => "o" - # "hello".last(2) # => "lo" - # "hello".last(10) # => "hello" - def last(limit = 1) - (mb_chars[(-limit)..-1] || self).to_s - end - end - else - module Access #:nodoc: - def at(position) - self[position] - end - - def from(position) - self[position..-1] - end - - def to(position) - self[0..position] - end - - def first(limit = 1) - self[0..(limit - 1)] - end - - def last(limit = 1) - from(-limit) || self - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb deleted file mode 100644 index a93ca3027..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/behavior.rb +++ /dev/null @@ -1,13 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - module Behavior - # Enable more predictable duck-typing on String-like classes. See - # Object#acts_like?. - def acts_like_string? - true - end - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb deleted file mode 100644 index d4334dcef..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/conversions.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'date' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - # Converting strings to other objects - module Conversions - # 'a'.ord == 'a'[0] for Ruby 1.9 forward compatibility. - def ord - self[0] - end if RUBY_VERSION < '1.9' - - # Form can be either :utc (default) or :local. - def to_time(form = :utc) - ::Time.send("#{form}_time", *::Date._parse(self, false).values_at(:year, :mon, :mday, :hour, :min, :sec).map { |arg| arg || 0 }) - end - - def to_date - ::Date.new(*::Date._parse(self, false).values_at(:year, :mon, :mday)) - end - - def to_datetime - ::DateTime.civil(*::Date._parse(self, false).values_at(:year, :mon, :mday, :hour, :min, :sec).map { |arg| arg || 0 }) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb deleted file mode 100644 index 0329fbb8d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/filters.rb +++ /dev/null @@ -1,26 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - module Filters - # Returns the string, first removing all whitespace on both ends of - # the string, and then changing remaining consecutive whitespace - # groups into one space each. - # - # Examples: - # %{ Multi-line - # string }.squish # => "Multi-line string" - # " foo bar \n \t boo".squish # => "foo bar boo" - def squish - dup.squish! - end - - # Performs a destructive squish. See String#squish. - def squish! - strip! - gsub!(/\s+/, ' ') - self - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb deleted file mode 100644 index de99fe579..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/inflections.rb +++ /dev/null @@ -1,167 +0,0 @@ -require 'active_support/inflector' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - # String inflections define new methods on the String class to transform names for different purposes. - # For instance, you can figure out the name of a database from the name of a class. - # - # "ScaleScore".tableize # => "scale_scores" - module Inflections - # Returns the plural form of the word in the string. - # - # "post".pluralize # => "posts" - # "octopus".pluralize # => "octopi" - # "sheep".pluralize # => "sheep" - # "words".pluralize # => "words" - # "the blue mailman".pluralize # => "the blue mailmen" - # "CamelOctopus".pluralize # => "CamelOctopi" - def pluralize - Inflector.pluralize(self) - end - - # The reverse of +pluralize+, returns the singular form of a word in a string. - # - # "posts".singularize # => "post" - # "octopi".singularize # => "octopus" - # "sheep".singularize # => "sheep" - # "word".singularize # => "word" - # "the blue mailmen".singularize # => "the blue mailman" - # "CamelOctopi".singularize # => "CamelOctopus" - def singularize - Inflector.singularize(self) - end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to camelize - # is set to :lower then camelize produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # "active_record".camelize # => "ActiveRecord" - # "active_record".camelize(:lower) # => "activeRecord" - # "active_record/errors".camelize # => "ActiveRecord::Errors" - # "active_record/errors".camelize(:lower) # => "activeRecord::Errors" - def camelize(first_letter = :upper) - case first_letter - when :upper then Inflector.camelize(self, true) - when :lower then Inflector.camelize(self, false) - end - end - alias_method :camelcase, :camelize - - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the Rails internals. - # - # +titleize+ is also aliased as +titlecase+. - # - # "man from the boondocks".titleize # => "Man From The Boondocks" - # "x-men: the last stand".titleize # => "X Men: The Last Stand" - def titleize - Inflector.titleize(self) - end - alias_method :titlecase, :titleize - - # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. - # - # +underscore+ will also change '::' to '/' to convert namespaces to paths. - # - # "ActiveRecord".underscore # => "active_record" - # "ActiveRecord::Errors".underscore # => active_record/errors - def underscore - Inflector.underscore(self) - end - - # Replaces underscores with dashes in the string. - # - # "puni_puni" # => "puni-puni" - def dasherize - Inflector.dasherize(self) - end - - # Removes the module part from the constant expression in the string. - # - # "ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" - # "Inflections".demodulize # => "Inflections" - def demodulize - Inflector.demodulize(self) - end - - # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. - # - # ==== Examples - # - # class Person - # def to_param - # "#{id}-#{name.parameterize}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path %> - # # => Donald E. Knuth - def parameterize - Inflector.parameterize(self) - end - - # Creates the name of a table like Rails does for models to table names. This method - # uses the +pluralize+ method on the last word in the string. - # - # "RawScaledScorer".tableize # => "raw_scaled_scorers" - # "egg_and_ham".tableize # => "egg_and_hams" - # "fancyCategory".tableize # => "fancy_categories" - def tableize - Inflector.tableize(self) - end - - # Create a class name from a plural table name like Rails does for table names to models. - # Note that this returns a string and not a class. (To convert to an actual class - # follow +classify+ with +constantize+.) - # - # "egg_and_hams".classify # => "EggAndHam" - # "posts".classify # => "Post" - # - # Singular names are not handled correctly. - # - # "business".classify # => "Busines" - def classify - Inflector.classify(self) - end - - # Capitalizes the first word, turns underscores into spaces, and strips '_id'. - # Like +titleize+, this is meant for creating pretty output. - # - # "employee_salary" # => "Employee salary" - # "author_id" # => "Author" - def humanize - Inflector.humanize(self) - end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # Examples - # "Message".foreign_key # => "message_id" - # "Message".foreign_key(false) # => "messageid" - # "Admin::Post".foreign_key # => "post_id" - def foreign_key(separate_class_name_and_id_with_underscore = true) - Inflector.foreign_key(self, separate_class_name_and_id_with_underscore) - end - - # +constantize+ tries to find a declared constant with the name specified - # in the string. It raises a NameError when the name is not in CamelCase - # or is not initialized. - # - # Examples - # "Module".constantize # => Module - # "Class".constantize # => Class - def constantize - Inflector.constantize(self) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb deleted file mode 100644 index 66a08a5cd..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/iterators.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'strscan' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - # Custom string iterators - module Iterators - def self.append_features(base) - super unless '1.9'.respond_to?(:each_char) - end - - # Yields a single-character string for each character in the string. - # When $KCODE = 'UTF8', multi-byte characters are yielded appropriately. - def each_char - scanner, char = StringScanner.new(self), /./mu - loop { yield(scanner.scan(char) || break) } - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb deleted file mode 100644 index a4caa83b7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/multibyte.rb +++ /dev/null @@ -1,81 +0,0 @@ -# encoding: utf-8 - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - # Implements multibyte methods for easier access to multibyte characters in a String instance. - module Multibyte - unless '1.9'.respond_to?(:force_encoding) - # == Multibyte proxy - # - # +mb_chars+ is a multibyte safe proxy for string methods. - # - # In Ruby 1.8 and older it creates and returns an instance of the ActiveSupport::Multibyte::Chars class which - # encapsulates the original string. A Unicode safe version of all the String methods are defined on this proxy - # class. If the proxy class doesn't respond to a certain method, it's forwarded to the encapsuled string. - # - # name = 'Claus Müller' - # name.reverse #=> "rell??M sualC" - # name.length #=> 13 - # - # name.mb_chars.reverse.to_s #=> "rellüM sualC" - # name.mb_chars.length #=> 12 - # - # In Ruby 1.9 and newer +mb_chars+ returns +self+ because String is (mostly) encoding aware. This means that - # it becomes easy to run one version of your code on multiple Ruby versions. - # - # == Method chaining - # - # All the methods on the Chars proxy which normally return a string will return a Chars object. This allows - # method chaining on the result of any of these methods. - # - # name.mb_chars.reverse.length #=> 12 - # - # == Interoperability and configuration - # - # The Chars object tries to be as interchangeable with String objects as possible: sorting and comparing between - # String and Char work like expected. The bang! methods change the internal string representation in the Chars - # object. Interoperability problems can be resolved easily with a +to_s+ call. - # - # For more information about the methods defined on the Chars proxy see ActiveSupport::Multibyte::Chars. For - # information about how to change the default Multibyte behaviour see ActiveSupport::Multibyte. - def mb_chars - if ActiveSupport::Multibyte.proxy_class.wants?(self) - ActiveSupport::Multibyte.proxy_class.new(self) - else - self - end - end - - # Returns true if the string has UTF-8 semantics (a String used for purely byte resources is unlikely to have - # them), returns false otherwise. - def is_utf8? - ActiveSupport::Multibyte::Chars.consumes?(self) - end - - unless '1.8.7 and later'.respond_to?(:chars) - def chars - ActiveSupport::Deprecation.warn('String#chars has been deprecated in favor of String#mb_chars.', caller) - mb_chars - end - end - else - def mb_chars #:nodoc - self - end - - def is_utf8? #:nodoc - case encoding - when Encoding::UTF_8 - valid_encoding? - when Encoding::ASCII_8BIT, Encoding::US_ASCII - dup.force_encoding(Encoding::UTF_8).valid_encoding? - else - false - end - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb deleted file mode 100644 index 09f9a188b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/starts_ends_with.rb +++ /dev/null @@ -1,35 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module String #:nodoc: - # Additional string tests. - module StartsEndsWith - def self.append_features(base) - if '1.8.7 and up'.respond_to?(:start_with?) - base.class_eval do - alias_method :starts_with?, :start_with? - alias_method :ends_with?, :end_with? - end - else - super - base.class_eval do - alias_method :start_with?, :starts_with? - alias_method :end_with?, :ends_with? - end - end - end - - # Does the string start with the specified +prefix+? - def starts_with?(prefix) - prefix = prefix.to_s - self[0, prefix.length] == prefix - end - - # Does the string end with the specified +suffix+? - def ends_with?(suffix) - suffix = suffix.to_s - self[-suffix.length, suffix.length] == suffix - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb deleted file mode 100644 index df186e42d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/string/xchar.rb +++ /dev/null @@ -1,11 +0,0 @@ -begin - # See http://bogomips.org/fast_xs/ by Eric Wong - require 'fast_xs' - - class String - alias_method :original_xs, :to_xs if method_defined?(:to_xs) - alias_method :to_xs, :fast_xs - end -rescue LoadError - # fast_xs extension unavailable. -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb deleted file mode 100644 index e4ac44380..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/symbol.rb +++ /dev/null @@ -1,14 +0,0 @@ -unless :to_proc.respond_to?(:to_proc) - class Symbol - # Turns the symbol into a simple proc, which is especially useful for enumerations. Examples: - # - # # The same as people.collect { |p| p.name } - # people.collect(&:name) - # - # # The same as people.select { |p| p.manager? }.collect { |p| p.salary } - # people.select(&:manager?).collect(&:salary) - def to_proc - Proc.new { |*args| args.shift.__send__(self, *args) } - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/time.rb deleted file mode 100644 index 78bbfc917..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'date' -require 'time' - -class Time - # Ruby 1.8-cvs and 1.9 define private Time#to_date - %w(to_date to_datetime).each do |method| - public method if private_instance_methods.include?(method) - end - - # Pre-1.9 versions of Ruby have a bug with marshaling Time instances, where utc instances are - # unmarshaled in the local zone, instead of utc. We're layering behavior on the _dump and _load - # methods so that utc instances can be flagged on dump, and coerced back to utc on load. - if RUBY_VERSION < '1.9' - class << self - alias_method :_original_load, :_load - def _load(marshaled_time) - time = _original_load(marshaled_time) - utc = time.instance_variable_get('@marshal_with_utc_coercion') - utc ? time.utc : time - end - end - - alias_method :_original_dump, :_dump - def _dump(*args) - obj = self.frozen? ? self.dup : self - obj.instance_variable_set('@marshal_with_utc_coercion', utc?) - obj._original_dump(*args) - end - end -end - -require 'active_support/core_ext/time/behavior' -require 'active_support/core_ext/time/calculations' -require 'active_support/core_ext/time/conversions' -require 'active_support/core_ext/time/zones' - -class Time#:nodoc: - include ActiveSupport::CoreExtensions::Time::Behavior - include ActiveSupport::CoreExtensions::Time::Calculations - include ActiveSupport::CoreExtensions::Time::Conversions - include ActiveSupport::CoreExtensions::Time::Zones -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb deleted file mode 100644 index a5c0baacd..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/behavior.rb +++ /dev/null @@ -1,13 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Time #:nodoc: - module Behavior - # Enable more predictable duck-typing on Time-like classes. See - # Object#acts_like?. - def acts_like_time? - true - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb deleted file mode 100644 index 5ed750afc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/calculations.rb +++ /dev/null @@ -1,303 +0,0 @@ -require 'active_support/duration' - -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Time #:nodoc: - # Enables the use of time calculations within Time itself - module Calculations - def self.included(base) #:nodoc: - base.extend ClassMethods - - base.class_eval do - alias_method :plus_without_duration, :+ - alias_method :+, :plus_with_duration - - alias_method :minus_without_duration, :- - alias_method :-, :minus_with_duration - - alias_method :minus_without_coercion, :- - alias_method :-, :minus_with_coercion - - alias_method :compare_without_coercion, :<=> - alias_method :<=>, :compare_with_coercion - end - end - - COMMON_YEAR_DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] - - module ClassMethods - # Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances - def ===(other) - other.is_a?(::Time) - end - - # Return the number of days in the given month. - # If no year is specified, it will use the current year. - def days_in_month(month, year = now.year) - return 29 if month == 2 && ::Date.gregorian_leap?(year) - COMMON_YEAR_DAYS_IN_MONTH[month] - end - - # Returns a new Time if requested year can be accommodated by Ruby's Time class - # (i.e., if year is within either 1970..2038 or 1902..2038, depending on system architecture); - # otherwise returns a DateTime - def time_with_datetime_fallback(utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0, usec=0) - ::Time.send(utc_or_local, year, month, day, hour, min, sec, usec) - rescue - offset = utc_or_local.to_sym == :local ? ::DateTime.local_offset : 0 - ::DateTime.civil(year, month, day, hour, min, sec, offset) - end - - # Wraps class method +time_with_datetime_fallback+ with +utc_or_local+ set to :utc. - def utc_time(*args) - time_with_datetime_fallback(:utc, *args) - end - - # Wraps class method +time_with_datetime_fallback+ with +utc_or_local+ set to :local. - def local_time(*args) - time_with_datetime_fallback(:local, *args) - end - end - - # Tells whether the Time object's time lies in the past - def past? - self < ::Time.current - end - - # Tells whether the Time object's time is today - def today? - self.to_date == ::Date.current - end - - # Tells whether the Time object's time lies in the future - def future? - self > ::Time.current - end - - # Seconds since midnight: Time.now.seconds_since_midnight - def seconds_since_midnight - self.to_i - self.change(:hour => 0).to_i + (self.usec/1.0e+6) - end - - # Returns a new Time where one or more of the elements have been changed according to the +options+ parameter. The time options - # (hour, minute, sec, usec) reset cascadingly, so if only the hour is passed, then minute, sec, and usec is set to 0. If the hour and - # minute is passed, then sec and usec is set to 0. - def change(options) - ::Time.send( - self.utc? ? :utc_time : :local_time, - options[:year] || self.year, - options[:month] || self.month, - options[:day] || self.day, - options[:hour] || self.hour, - options[:min] || (options[:hour] ? 0 : self.min), - options[:sec] || ((options[:hour] || options[:min]) ? 0 : self.sec), - options[:usec] || ((options[:hour] || options[:min] || options[:sec]) ? 0 : self.usec) - ) - end - - # Uses Date to provide precise Time calculations for years, months, and days. - # The +options+ parameter takes a hash with any of these keys: :years, - # :months, :weeks, :days, :hours, - # :minutes, :seconds. - def advance(options) - unless options[:weeks].nil? - options[:weeks], partial_weeks = options[:weeks].divmod(1) - options[:days] = (options[:days] || 0) + 7 * partial_weeks - end - - unless options[:days].nil? - options[:days], partial_days = options[:days].divmod(1) - options[:hours] = (options[:hours] || 0) + 24 * partial_days - end - - d = to_date.advance(options) - time_advanced_by_date = change(:year => d.year, :month => d.month, :day => d.day) - seconds_to_advance = (options[:seconds] || 0) + (options[:minutes] || 0) * 60 + (options[:hours] || 0) * 3600 - seconds_to_advance == 0 ? time_advanced_by_date : time_advanced_by_date.since(seconds_to_advance) - end - - # Returns a new Time representing the time a number of seconds ago, this is basically a wrapper around the Numeric extension - def ago(seconds) - self.since(-seconds) - end - - # Returns a new Time representing the time a number of seconds since the instance time, this is basically a wrapper around - # the Numeric extension. - def since(seconds) - f = seconds.since(self) - if ActiveSupport::Duration === seconds - f - else - initial_dst = self.dst? ? 1 : 0 - final_dst = f.dst? ? 1 : 0 - (seconds.abs >= 86400 && initial_dst != final_dst) ? f + (initial_dst - final_dst).hours : f - end - rescue - self.to_datetime.since(seconds) - end - alias :in :since - - # Returns a new Time representing the time a number of specified months ago - def months_ago(months) - advance(:months => -months) - end - - # Returns a new Time representing the time a number of specified months in the future - def months_since(months) - advance(:months => months) - end - - # Returns a new Time representing the time a number of specified years ago - def years_ago(years) - advance(:years => -years) - end - - # Returns a new Time representing the time a number of specified years in the future - def years_since(years) - advance(:years => years) - end - - # Short-hand for years_ago(1) - def last_year - years_ago(1) - end - - # Short-hand for years_since(1) - def next_year - years_since(1) - end - - - # Short-hand for months_ago(1) - def last_month - months_ago(1) - end - - # Short-hand for months_since(1) - def next_month - months_since(1) - end - - # Returns a new Time representing the "start" of this week (Monday, 0:00) - def beginning_of_week - days_to_monday = self.wday!=0 ? self.wday-1 : 6 - (self - days_to_monday.days).midnight - end - alias :monday :beginning_of_week - alias :at_beginning_of_week :beginning_of_week - - # Returns a new Time representing the end of this week (Sunday, 23:59:59) - def end_of_week - days_to_sunday = self.wday!=0 ? 7-self.wday : 0 - (self + days_to_sunday.days).end_of_day - end - alias :at_end_of_week :end_of_week - - # Returns a new Time representing the start of the given day in next week (default is Monday). - def next_week(day = :monday) - days_into_week = { :monday => 0, :tuesday => 1, :wednesday => 2, :thursday => 3, :friday => 4, :saturday => 5, :sunday => 6} - since(1.week).beginning_of_week.since(days_into_week[day].day).change(:hour => 0) - end - - # Returns a new Time representing the start of the day (0:00) - def beginning_of_day - (self - self.seconds_since_midnight).change(:usec => 0) - end - alias :midnight :beginning_of_day - alias :at_midnight :beginning_of_day - alias :at_beginning_of_day :beginning_of_day - - # Returns a new Time representing the end of the day (23:59:59) - def end_of_day - change(:hour => 23, :min => 59, :sec => 59) - end - - # Returns a new Time representing the start of the month (1st of the month, 0:00) - def beginning_of_month - #self - ((self.mday-1).days + self.seconds_since_midnight) - change(:day => 1,:hour => 0, :min => 0, :sec => 0, :usec => 0) - end - alias :at_beginning_of_month :beginning_of_month - - # Returns a new Time representing the end of the month (last day of the month, 0:00) - def end_of_month - #self - ((self.mday-1).days + self.seconds_since_midnight) - last_day = ::Time.days_in_month( self.month, self.year ) - change(:day => last_day, :hour => 23, :min => 59, :sec => 59, :usec => 0) - end - alias :at_end_of_month :end_of_month - - # Returns a new Time representing the start of the quarter (1st of january, april, july, october, 0:00) - def beginning_of_quarter - beginning_of_month.change(:month => [10, 7, 4, 1].detect { |m| m <= self.month }) - end - alias :at_beginning_of_quarter :beginning_of_quarter - - # Returns a new Time representing the end of the quarter (last day of march, june, september, december, 23:59:59) - def end_of_quarter - beginning_of_month.change(:month => [3, 6, 9, 12].detect { |m| m >= self.month }).end_of_month - end - alias :at_end_of_quarter :end_of_quarter - - # Returns a new Time representing the start of the year (1st of january, 0:00) - def beginning_of_year - change(:month => 1,:day => 1,:hour => 0, :min => 0, :sec => 0, :usec => 0) - end - alias :at_beginning_of_year :beginning_of_year - - # Returns a new Time representing the end of the year (31st of december, 23:59:59) - def end_of_year - change(:month => 12,:day => 31,:hour => 23, :min => 59, :sec => 59) - end - alias :at_end_of_year :end_of_year - - # Convenience method which returns a new Time representing the time 1 day ago - def yesterday - advance(:days => -1) - end - - # Convenience method which returns a new Time representing the time 1 day since the instance time - def tomorrow - advance(:days => 1) - end - - def plus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - other.since(self) - else - plus_without_duration(other) - end - end - - def minus_with_duration(other) #:nodoc: - if ActiveSupport::Duration === other - other.until(self) - else - minus_without_duration(other) - end - end - - # Time#- can also be used to determine the number of seconds between two Time instances. - # We're layering on additional behavior so that ActiveSupport::TimeWithZone instances - # are coerced into values that Time#- will recognize - def minus_with_coercion(other) - other = other.comparable_time if other.respond_to?(:comparable_time) - minus_without_coercion(other) - end - - # Layers additional behavior on Time#<=> so that DateTime and ActiveSupport::TimeWithZone instances - # can be chronologically compared with a Time - def compare_with_coercion(other) - # if other is an ActiveSupport::TimeWithZone, coerce a Time instance from it so we can do <=> comparison - other = other.comparable_time if other.respond_to?(:comparable_time) - if other.acts_like?(:date) - # other is a Date/DateTime, so coerce self #to_datetime and hand off to DateTime#<=> - to_datetime.compare_without_coercion(other) - else - compare_without_coercion(other) - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb deleted file mode 100644 index f42be4677..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/conversions.rb +++ /dev/null @@ -1,90 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Time #:nodoc: - # Converting times to formatted strings, dates, and datetimes. - module Conversions - DATE_FORMATS = { - :db => "%Y-%m-%d %H:%M:%S", - :number => "%Y%m%d%H%M%S", - :time => "%H:%M", - :short => "%d %b %H:%M", - :long => "%B %d, %Y %H:%M", - :long_ordinal => lambda { |time| time.strftime("%B #{time.day.ordinalize}, %Y %H:%M") }, - :rfc822 => "%a, %d %b %Y %H:%M:%S %z" - } - - def self.included(base) #:nodoc: - base.class_eval do - alias_method :to_default_s, :to_s - alias_method :to_s, :to_formatted_s - end - end - - # Converts to a formatted string. See DATE_FORMATS for builtin formats. - # - # This method is aliased to to_s. - # - # time = Time.now # => Thu Jan 18 06:10:17 CST 2007 - # - # time.to_formatted_s(:time) # => "06:10:17" - # time.to_s(:time) # => "06:10:17" - # - # time.to_formatted_s(:db) # => "2007-01-18 06:10:17" - # time.to_formatted_s(:number) # => "20070118061017" - # time.to_formatted_s(:short) # => "18 Jan 06:10" - # time.to_formatted_s(:long) # => "January 18, 2007 06:10" - # time.to_formatted_s(:long_ordinal) # => "January 18th, 2007 06:10" - # time.to_formatted_s(:rfc822) # => "Thu, 18 Jan 2007 06:10:17 -0600" - # - # == Adding your own time formats to +to_formatted_s+ - # You can add your own formats to the Time::DATE_FORMATS hash. - # Use the format name as the hash key and either a strftime string - # or Proc instance that takes a time argument as the value. - # - # # config/initializers/time_formats.rb - # Time::DATE_FORMATS[:month_and_year] = "%B %Y" - # Time::DATE_FORMATS[:short_ordinal] = lambda { |time| time.strftime("%B #{time.day.ordinalize}") } - def to_formatted_s(format = :default) - return to_default_s unless formatter = DATE_FORMATS[format] - formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) - end - - # Returns the UTC offset as an +HH:MM formatted string. - # - # Time.local(2000).formatted_offset # => "-06:00" - # Time.local(2000).formatted_offset(false) # => "-0600" - def formatted_offset(colon = true, alternate_utc_string = nil) - utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon) - end - - # Converts a Time object to a Date, dropping hour, minute, and second precision. - # - # my_time = Time.now # => Mon Nov 12 22:59:51 -0500 2007 - # my_time.to_date # => Mon, 12 Nov 2007 - # - # your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009 - # your_time.to_date # => Tue, 13 Jan 2009 - def to_date - ::Date.new(year, month, day) - end - - # A method to keep Time, Date and DateTime instances interchangeable on conversions. - # In this case, it simply returns +self+. - def to_time - self - end - - # Converts a Time instance to a Ruby DateTime instance, preserving UTC offset. - # - # my_time = Time.now # => Mon Nov 12 23:04:21 -0500 2007 - # my_time.to_datetime # => Mon, 12 Nov 2007 23:04:21 -0500 - # - # your_time = Time.parse("1/13/2009 1:13:03 P.M.") # => Tue Jan 13 13:13:03 -0500 2009 - # your_time.to_datetime # => Tue, 13 Jan 2009 13:13:03 -0500 - def to_datetime - ::DateTime.civil(year, month, day, hour, min, sec, Rational(utc_offset, 86400)) - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb b/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb deleted file mode 100644 index 9d8eb7390..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/core_ext/time/zones.rb +++ /dev/null @@ -1,86 +0,0 @@ -module ActiveSupport #:nodoc: - module CoreExtensions #:nodoc: - module Time #:nodoc: - module Zones - def self.included(base) #:nodoc: - base.extend(ClassMethods) if base == ::Time # i.e., don't include class methods in DateTime - end - - module ClassMethods - attr_accessor :zone_default - - # Returns the TimeZone for the current request, if this has been set (via Time.zone=). - # If Time.zone has not been set for the current request, returns the TimeZone specified in config.time_zone. - def zone - Thread.current[:time_zone] || zone_default - end - - # Sets Time.zone to a TimeZone object for the current request/thread. - # - # This method accepts any of the following: - # - # * A Rails TimeZone object. - # * An identifier for a Rails TimeZone object (e.g., "Eastern Time (US & Canada)", -5.hours). - # * A TZInfo::Timezone object. - # * An identifier for a TZInfo::Timezone object (e.g., "America/New_York"). - # - # Here's an example of how you might set Time.zone on a per request basis -- current_user.time_zone - # just needs to return a string identifying the user's preferred TimeZone: - # - # class ApplicationController < ActionController::Base - # before_filter :set_time_zone - # - # def set_time_zone - # Time.zone = current_user.time_zone - # end - # end - def zone=(time_zone) - Thread.current[:time_zone] = get_zone(time_zone) - end - - # Allows override of Time.zone locally inside supplied block; resets Time.zone to existing value when done. - def use_zone(time_zone) - old_zone, ::Time.zone = ::Time.zone, get_zone(time_zone) - yield - ensure - ::Time.zone = old_zone - end - - # Returns Time.zone.now when config.time_zone is set, otherwise just returns Time.now. - def current - ::Time.zone_default ? ::Time.zone.now : ::Time.now - end - - private - def get_zone(time_zone) - return time_zone if time_zone.nil? || time_zone.is_a?(TimeZone) - # lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone) - unless time_zone.respond_to?(:period_for_local) - time_zone = TimeZone[time_zone] || TZInfo::Timezone.get(time_zone) rescue nil - end - # Return if a TimeZone instance, or wrap in a TimeZone instance if a TZInfo::Timezone - if time_zone - time_zone.is_a?(TimeZone) ? time_zone : TimeZone.create(time_zone.name, nil, time_zone) - end - end - end - - # Returns the simultaneous time in Time.zone. - # - # Time.zone = 'Hawaii' # => 'Hawaii' - # Time.utc(2000).in_time_zone # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # This method is similar to Time#localtime, except that it uses Time.zone as the local zone - # instead of the operating system's time zone. - # - # You can also pass in a TimeZone instance or string that identifies a TimeZone as an argument, - # and the conversion will be based on that zone instead of Time.zone. - # - # Time.utc(2000).in_time_zone('Alaska') # => Fri, 31 Dec 1999 15:00:00 AKST -09:00 - def in_time_zone(zone = ::Time.zone) - ActiveSupport::TimeWithZone.new(utc? ? self : getutc, ::Time.__send__(:get_zone, zone)) - end - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/dependencies.rb b/vendor/activesupport-2.2.2/lib/active_support/dependencies.rb deleted file mode 100644 index e7df2bdbe..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/dependencies.rb +++ /dev/null @@ -1,621 +0,0 @@ -module ActiveSupport #:nodoc: - module Dependencies #:nodoc: - extend self - - # Should we turn on Ruby warnings on the first load of dependent files? - mattr_accessor :warnings_on_first_load - self.warnings_on_first_load = false - - # All files ever loaded. - mattr_accessor :history - self.history = Set.new - - # All files currently loaded. - mattr_accessor :loaded - self.loaded = Set.new - - # Should we load files or require them? - mattr_accessor :mechanism - self.mechanism = :load - - # The set of directories from which we may automatically load files. Files - # under these directories will be reloaded on each request in development mode, - # unless the directory also appears in load_once_paths. - mattr_accessor :load_paths - self.load_paths = [] - - # The set of directories from which automatically loaded constants are loaded - # only once. All directories in this set must also be present in +load_paths+. - mattr_accessor :load_once_paths - self.load_once_paths = [] - - # An array of qualified constant names that have been loaded. Adding a name to - # this array will cause it to be unloaded the next time Dependencies are cleared. - mattr_accessor :autoloaded_constants - self.autoloaded_constants = [] - - # An array of constant names that need to be unloaded on every request. Used - # to allow arbitrary constants to be marked for unloading. - mattr_accessor :explicitly_unloadable_constants - self.explicitly_unloadable_constants = [] - - # The logger is used for generating information on the action run-time (including benchmarking) if available. - # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. - mattr_accessor :logger - - # Set to true to enable logging of const_missing and file loads - mattr_accessor :log_activity - self.log_activity = false - - # An internal stack used to record which constants are loaded by any block. - mattr_accessor :constant_watch_stack - self.constant_watch_stack = [] - - # Module includes this module - module ModuleConstMissing #:nodoc: - def self.included(base) #:nodoc: - base.class_eval do - unless defined? const_missing_without_dependencies - alias_method_chain :const_missing, :dependencies - end - end - end - - def self.excluded(base) #:nodoc: - base.class_eval do - if defined? const_missing_without_dependencies - undef_method :const_missing - alias_method :const_missing, :const_missing_without_dependencies - undef_method :const_missing_without_dependencies - end - end - end - - # Use const_missing to autoload associations so we don't have to - # require_association when using single-table inheritance. - def const_missing_with_dependencies(class_id) - ActiveSupport::Dependencies.load_missing_constant self, class_id - end - - def unloadable(const_desc = self) - super(const_desc) - end - end - - # Class includes this module - module ClassConstMissing #:nodoc: - def const_missing(const_name) - if [Object, Kernel].include?(self) || parent == self - super - else - begin - begin - Dependencies.load_missing_constant self, const_name - rescue NameError - parent.send :const_missing, const_name - end - rescue NameError => e - # Make sure that the name we are missing is the one that caused the error - parent_qualified_name = Dependencies.qualified_name_for parent, const_name - raise unless e.missing_name? parent_qualified_name - qualified_name = Dependencies.qualified_name_for self, const_name - raise NameError.new("uninitialized constant #{qualified_name}").copy_blame!(e) - end - end - end - end - - # Object includes this module - module Loadable #:nodoc: - def self.included(base) #:nodoc: - base.class_eval do - unless defined? load_without_new_constant_marking - alias_method_chain :load, :new_constant_marking - end - end - end - - def self.excluded(base) #:nodoc: - base.class_eval do - if defined? load_without_new_constant_marking - undef_method :load - alias_method :load, :load_without_new_constant_marking - undef_method :load_without_new_constant_marking - end - end - end - - def require_or_load(file_name) - Dependencies.require_or_load(file_name) - end - - def require_dependency(file_name) - Dependencies.depend_on(file_name) - end - - def require_association(file_name) - Dependencies.associate_with(file_name) - end - - def load_with_new_constant_marking(file, *extras) #:nodoc: - if Dependencies.load? - Dependencies.new_constants_in(Object) { load_without_new_constant_marking(file, *extras) } - else - load_without_new_constant_marking(file, *extras) - end - rescue Exception => exception # errors from loading file - exception.blame_file! file - raise - end - - def require(file, *extras) #:nodoc: - if Dependencies.load? - Dependencies.new_constants_in(Object) { super } - else - super - end - rescue Exception => exception # errors from required file - exception.blame_file! file - raise - end - - # Mark the given constant as unloadable. Unloadable constants are removed each - # time dependencies are cleared. - # - # Note that marking a constant for unloading need only be done once. Setup - # or init scripts may list each unloadable constant that may need unloading; - # each constant will be removed for every subsequent clear, as opposed to for - # the first clear. - # - # The provided constant descriptor may be a (non-anonymous) module or class, - # or a qualified constant name as a string or symbol. - # - # Returns true if the constant was not previously marked for unloading, false - # otherwise. - def unloadable(const_desc) - Dependencies.mark_for_unload const_desc - end - end - - # Exception file-blaming - module Blamable #:nodoc: - def blame_file!(file) - (@blamed_files ||= []).unshift file - end - - def blamed_files - @blamed_files ||= [] - end - - def describe_blame - return nil if blamed_files.empty? - "This error occurred while loading the following files:\n #{blamed_files.join "\n "}" - end - - def copy_blame!(exc) - @blamed_files = exc.blamed_files.clone - self - end - end - - def hook! - Object.instance_eval { include Loadable } - Module.instance_eval { include ModuleConstMissing } - Class.instance_eval { include ClassConstMissing } - Exception.instance_eval { include Blamable } - true - end - - def unhook! - ModuleConstMissing.excluded(Module) - Loadable.excluded(Object) - true - end - - def load? - mechanism == :load - end - - def depend_on(file_name, swallow_load_errors = false) - path = search_for_file(file_name) - require_or_load(path || file_name) - rescue LoadError - raise unless swallow_load_errors - end - - def associate_with(file_name) - depend_on(file_name, true) - end - - def clear - log_call - loaded.clear - remove_unloadable_constants! - end - - def require_or_load(file_name, const_path = nil) - log_call file_name, const_path - file_name = $1 if file_name =~ /^(.*)\.rb$/ - expanded = File.expand_path(file_name) - return if loaded.include?(expanded) - - # Record that we've seen this file *before* loading it to avoid an - # infinite loop with mutual dependencies. - loaded << expanded - - begin - if load? - log "loading #{file_name}" - - # Enable warnings iff this file has not been loaded before and - # warnings_on_first_load is set. - load_args = ["#{file_name}.rb"] - load_args << const_path unless const_path.nil? - - if !warnings_on_first_load or history.include?(expanded) - result = load_file(*load_args) - else - enable_warnings { result = load_file(*load_args) } - end - else - log "requiring #{file_name}" - result = require file_name - end - rescue Exception - loaded.delete expanded - raise - end - - # Record history *after* loading so first load gets warnings. - history << expanded - return result - end - - # Is the provided constant path defined? - def qualified_const_defined?(path) - raise NameError, "#{path.inspect} is not a valid constant name!" unless - /^(::)?([A-Z]\w*)(::[A-Z]\w*)*$/ =~ path - - names = path.to_s.split('::') - names.shift if names.first.empty? - - # We can't use defined? because it will invoke const_missing for the parent - # of the name we are checking. - names.inject(Object) do |mod, name| - return false unless uninherited_const_defined?(mod, name) - mod.const_get name - end - return true - end - - if Module.method(:const_defined?).arity == 1 - # Does this module define this constant? - # Wrapper to accomodate changing Module#const_defined? in Ruby 1.9 - def uninherited_const_defined?(mod, const) - mod.const_defined?(const) - end - else - def uninherited_const_defined?(mod, const) #:nodoc: - mod.const_defined?(const, false) - end - end - - # Given +path+, a filesystem path to a ruby file, return an array of constant - # paths which would cause Dependencies to attempt to load this file. - def loadable_constants_for_path(path, bases = load_paths) - path = $1 if path =~ /\A(.*)\.rb\Z/ - expanded_path = File.expand_path(path) - - bases.collect do |root| - expanded_root = File.expand_path(root) - next unless %r{\A#{Regexp.escape(expanded_root)}(/|\\)} =~ expanded_path - - nesting = expanded_path[(expanded_root.size)..-1] - nesting = nesting[1..-1] if nesting && nesting[0] == ?/ - next if nesting.blank? - nesting_camel = nesting.camelize - begin - qualified_const_defined?(nesting_camel) - rescue NameError - next - end - - [ - nesting.camelize, - # Special case: application.rb might define ApplicationControlller. - ('ApplicationController' if nesting == 'application') - ] - end.flatten.compact.uniq - end - - # Search for a file in load_paths matching the provided suffix. - def search_for_file(path_suffix) - path_suffix = path_suffix + '.rb' unless path_suffix.ends_with? '.rb' - load_paths.each do |root| - path = File.join(root, path_suffix) - return path if File.file? path - end - nil # Gee, I sure wish we had first_match ;-) - end - - # Does the provided path_suffix correspond to an autoloadable module? - # Instead of returning a boolean, the autoload base for this module is returned. - def autoloadable_module?(path_suffix) - load_paths.each do |load_path| - return load_path if File.directory? File.join(load_path, path_suffix) - end - nil - end - - def load_once_path?(path) - load_once_paths.any? { |base| path.starts_with? base } - end - - # Attempt to autoload the provided module name by searching for a directory - # matching the expect path suffix. If found, the module is created and assigned - # to +into+'s constants with the name +const_name+. Provided that the directory - # was loaded from a reloadable base path, it is added to the set of constants - # that are to be unloaded. - def autoload_module!(into, const_name, qualified_name, path_suffix) - return nil unless base_path = autoloadable_module?(path_suffix) - mod = Module.new - into.const_set const_name, mod - autoloaded_constants << qualified_name unless load_once_paths.include?(base_path) - return mod - end - - # Load the file at the provided path. +const_paths+ is a set of qualified - # constant names. When loading the file, Dependencies will watch for the - # addition of these constants. Each that is defined will be marked as - # autoloaded, and will be removed when Dependencies.clear is next called. - # - # If the second parameter is left off, then Dependencies will construct a set - # of names that the file at +path+ may define. See - # +loadable_constants_for_path+ for more details. - def load_file(path, const_paths = loadable_constants_for_path(path)) - log_call path, const_paths - const_paths = [const_paths].compact unless const_paths.is_a? Array - parent_paths = const_paths.collect { |const_path| /(.*)::[^:]+\Z/ =~ const_path ? $1 : :Object } - - result = nil - newly_defined_paths = new_constants_in(*parent_paths) do - result = load_without_new_constant_marking path - end - - autoloaded_constants.concat newly_defined_paths unless load_once_path?(path) - autoloaded_constants.uniq! - log "loading #{path} defined #{newly_defined_paths * ', '}" unless newly_defined_paths.empty? - return result - end - - # Return the constant path for the provided parent and constant name. - def qualified_name_for(mod, name) - mod_name = to_constant_name mod - (%w(Object Kernel).include? mod_name) ? name.to_s : "#{mod_name}::#{name}" - end - - # Load the constant named +const_name+ which is missing from +from_mod+. If - # it is not possible to load the constant into from_mod, try its parent module - # using const_missing. - def load_missing_constant(from_mod, const_name) - log_call from_mod, const_name - if from_mod == Kernel - if ::Object.const_defined?(const_name) - log "Returning Object::#{const_name} for Kernel::#{const_name}" - return ::Object.const_get(const_name) - else - log "Substituting Object for Kernel" - from_mod = Object - end - end - - # If we have an anonymous module, all we can do is attempt to load from Object. - from_mod = Object if from_mod.name.blank? - - unless qualified_const_defined?(from_mod.name) && from_mod.name.constantize.object_id == from_mod.object_id - raise ArgumentError, "A copy of #{from_mod} has been removed from the module tree but is still active!" - end - - raise ArgumentError, "#{from_mod} is not missing constant #{const_name}!" if uninherited_const_defined?(from_mod, const_name) - - qualified_name = qualified_name_for from_mod, const_name - path_suffix = qualified_name.underscore - name_error = NameError.new("uninitialized constant #{qualified_name}") - - file_path = search_for_file(path_suffix) - if file_path && ! loaded.include?(File.expand_path(file_path)) # We found a matching file to load - require_or_load file_path - raise LoadError, "Expected #{file_path} to define #{qualified_name}" unless uninherited_const_defined?(from_mod, const_name) - return from_mod.const_get(const_name) - elsif mod = autoload_module!(from_mod, const_name, qualified_name, path_suffix) - return mod - elsif (parent = from_mod.parent) && parent != from_mod && - ! from_mod.parents.any? { |p| uninherited_const_defined?(p, const_name) } - # If our parents do not have a constant named +const_name+ then we are free - # to attempt to load upwards. If they do have such a constant, then this - # const_missing must be due to from_mod::const_name, which should not - # return constants from from_mod's parents. - begin - return parent.const_missing(const_name) - rescue NameError => e - raise unless e.missing_name? qualified_name_for(parent, const_name) - raise name_error - end - else - raise name_error - end - end - - # Remove the constants that have been autoloaded, and those that have been - # marked for unloading. - def remove_unloadable_constants! - autoloaded_constants.each { |const| remove_constant const } - autoloaded_constants.clear - explicitly_unloadable_constants.each { |const| remove_constant const } - end - - # Determine if the given constant has been automatically loaded. - def autoloaded?(desc) - # No name => anonymous module. - return false if desc.is_a?(Module) && desc.name.blank? - name = to_constant_name desc - return false unless qualified_const_defined? name - return autoloaded_constants.include?(name) - end - - # Will the provided constant descriptor be unloaded? - def will_unload?(const_desc) - autoloaded?(const_desc) || - explicitly_unloadable_constants.include?(to_constant_name(const_desc)) - end - - # Mark the provided constant name for unloading. This constant will be - # unloaded on each request, not just the next one. - def mark_for_unload(const_desc) - name = to_constant_name const_desc - if explicitly_unloadable_constants.include? name - return false - else - explicitly_unloadable_constants << name - return true - end - end - - # Run the provided block and detect the new constants that were loaded during - # its execution. Constants may only be regarded as 'new' once -- so if the - # block calls +new_constants_in+ again, then the constants defined within the - # inner call will not be reported in this one. - # - # If the provided block does not run to completion, and instead raises an - # exception, any new constants are regarded as being only partially defined - # and will be removed immediately. - def new_constants_in(*descs) - log_call(*descs) - - # Build the watch frames. Each frame is a tuple of - # [module_name_as_string, constants_defined_elsewhere] - watch_frames = descs.collect do |desc| - if desc.is_a? Module - mod_name = desc.name - initial_constants = desc.local_constant_names - elsif desc.is_a?(String) || desc.is_a?(Symbol) - mod_name = desc.to_s - - # Handle the case where the module has yet to be defined. - initial_constants = if qualified_const_defined?(mod_name) - mod_name.constantize.local_constant_names - else - [] - end - else - raise Argument, "#{desc.inspect} does not describe a module!" - end - - [mod_name, initial_constants] - end - - constant_watch_stack.concat watch_frames - - aborting = true - begin - yield # Now yield to the code that is to define new constants. - aborting = false - ensure - # Find the new constants. - new_constants = watch_frames.collect do |mod_name, prior_constants| - # Module still doesn't exist? Treat it as if it has no constants. - next [] unless qualified_const_defined?(mod_name) - - mod = mod_name.constantize - next [] unless mod.is_a? Module - new_constants = mod.local_constant_names - prior_constants - - # Make sure no other frames takes credit for these constants. - constant_watch_stack.each do |frame_name, constants| - constants.concat new_constants if frame_name == mod_name - end - - new_constants.collect do |suffix| - mod_name == "Object" ? suffix : "#{mod_name}::#{suffix}" - end - end.flatten - - log "New constants: #{new_constants * ', '}" - - if aborting - log "Error during loading, removing partially loaded constants " - new_constants.each { |name| remove_constant name } - new_constants.clear - end - end - - return new_constants - ensure - # Remove the stack frames that we added. - if defined?(watch_frames) && ! watch_frames.blank? - frame_ids = watch_frames.collect { |frame| frame.object_id } - constant_watch_stack.delete_if do |watch_frame| - frame_ids.include? watch_frame.object_id - end - end - end - - class LoadingModule #:nodoc: - # Old style environment.rb referenced this method directly. Please note, it doesn't - # actually *do* anything any more. - def self.root(*args) - if defined?(RAILS_DEFAULT_LOGGER) - RAILS_DEFAULT_LOGGER.warn "Your environment.rb uses the old syntax, it may not continue to work in future releases." - RAILS_DEFAULT_LOGGER.warn "For upgrade instructions please see: http://manuals.rubyonrails.com/read/book/19" - end - end - end - - # Convert the provided const desc to a qualified constant name (as a string). - # A module, class, symbol, or string may be provided. - def to_constant_name(desc) #:nodoc: - name = case desc - when String then desc.starts_with?('::') ? desc[2..-1] : desc - when Symbol then desc.to_s - when Module - raise ArgumentError, "Anonymous modules have no name to be referenced by" if desc.name.blank? - desc.name - else raise TypeError, "Not a valid constant descriptor: #{desc.inspect}" - end - end - - def remove_constant(const) #:nodoc: - return false unless qualified_const_defined? const - - const = $1 if /\A::(.*)\Z/ =~ const.to_s - names = const.to_s.split('::') - if names.size == 1 # It's under Object - parent = Object - else - parent = (names[0..-2] * '::').constantize - end - - log "removing constant #{const}" - parent.instance_eval { remove_const names.last } - return true - end - - protected - def log_call(*args) - if logger && log_activity - arg_str = args.collect { |arg| arg.inspect } * ', ' - /in `([a-z_\?\!]+)'/ =~ caller(1).first - selector = $1 || '' - log "called #{selector}(#{arg_str})" - end - end - - def log(msg) - if logger && log_activity - logger.debug "Dependencies: #{msg}" - end - end - end -end - -ActiveSupport::Dependencies.hook! diff --git a/vendor/activesupport-2.2.2/lib/active_support/deprecation.rb b/vendor/activesupport-2.2.2/lib/active_support/deprecation.rb deleted file mode 100644 index b4d8f61b8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/deprecation.rb +++ /dev/null @@ -1,243 +0,0 @@ -require 'yaml' - -module ActiveSupport - module Deprecation #:nodoc: - mattr_accessor :debug - self.debug = false - - # Choose the default warn behavior according to RAILS_ENV. - # Ignore deprecation warnings in production. - DEFAULT_BEHAVIORS = { - 'test' => Proc.new { |message, callstack| - $stderr.puts(message) - $stderr.puts callstack.join("\n ") if debug - }, - 'development' => Proc.new { |message, callstack| - logger = defined?(::RAILS_DEFAULT_LOGGER) ? ::RAILS_DEFAULT_LOGGER : Logger.new($stderr) - logger.warn message - logger.debug callstack.join("\n ") if debug - } - } - - class << self - def warn(message = nil, callstack = caller) - behavior.call(deprecation_message(callstack, message), callstack) if behavior && !silenced? - end - - def default_behavior - if defined?(RAILS_ENV) - DEFAULT_BEHAVIORS[RAILS_ENV.to_s] - else - DEFAULT_BEHAVIORS['test'] - end - end - - # Have deprecations been silenced? - def silenced? - @silenced = false unless defined?(@silenced) - @silenced - end - - # Silence deprecation warnings within the block. - def silence - old_silenced, @silenced = @silenced, true - yield - ensure - @silenced = old_silenced - end - - attr_writer :silenced - - - private - def deprecation_message(callstack, message = nil) - message ||= "You are using deprecated behavior which will be removed from the next major or minor release." - "DEPRECATION WARNING: #{message}. #{deprecation_caller_message(callstack)}" - end - - def deprecation_caller_message(callstack) - file, line, method = extract_callstack(callstack) - if file - if line && method - "(called from #{method} at #{file}:#{line})" - else - "(called from #{file}:#{line})" - end - end - end - - def extract_callstack(callstack) - if md = callstack.first.match(/^(.+?):(\d+)(?::in `(.*?)')?/) - md.captures - else - callstack.first - end - end - end - - # Behavior is a block that takes a message argument. - mattr_accessor :behavior - self.behavior = default_behavior - - # Warnings are not silenced by default. - self.silenced = false - - module ClassMethods #:nodoc: - # Declare that a method has been deprecated. - def deprecate(*method_names) - options = method_names.extract_options! - method_names = method_names + options.keys - method_names.each do |method_name| - alias_method_chain(method_name, :deprecation) do |target, punctuation| - class_eval(<<-EOS, __FILE__, __LINE__) - def #{target}_with_deprecation#{punctuation}(*args, &block) - ::ActiveSupport::Deprecation.warn(self.class.deprecated_method_warning(:#{method_name}, #{options[method_name].inspect}), caller) - #{target}_without_deprecation#{punctuation}(*args, &block) - end - EOS - end - end - end - - def deprecated_method_warning(method_name, message=nil) - warning = "#{method_name} is deprecated and will be removed from Rails #{deprecation_horizon}" - case message - when Symbol then "#{warning} (use #{message} instead)" - when String then "#{warning} (#{message})" - else warning - end - end - - def deprecation_horizon - '2.3' - end - end - - module Assertions #:nodoc: - def assert_deprecated(match = nil, &block) - result, warnings = collect_deprecations(&block) - assert !warnings.empty?, "Expected a deprecation warning within the block but received none" - if match - match = Regexp.new(Regexp.escape(match)) unless match.is_a?(Regexp) - assert warnings.any? { |w| w =~ match }, "No deprecation warning matched #{match}: #{warnings.join(', ')}" - end - result - end - - def assert_not_deprecated(&block) - result, deprecations = collect_deprecations(&block) - assert deprecations.empty?, "Expected no deprecation warning within the block but received #{deprecations.size}: \n #{deprecations * "\n "}" - result - end - - private - def collect_deprecations - old_behavior = ActiveSupport::Deprecation.behavior - deprecations = [] - ActiveSupport::Deprecation.behavior = Proc.new do |message, callstack| - deprecations << message - end - result = yield - [result, deprecations] - ensure - ActiveSupport::Deprecation.behavior = old_behavior - end - end - - class DeprecationProxy #:nodoc: - silence_warnings do - instance_methods.each { |m| undef_method m unless m =~ /^__/ } - end - - # Don't give a deprecation warning on inspect since test/unit and error - # logs rely on it for diagnostics. - def inspect - target.inspect - end - - private - def method_missing(called, *args, &block) - warn caller, called, args - target.__send__(called, *args, &block) - end - end - - class DeprecatedObjectProxy < DeprecationProxy - def initialize(object, message) - @object = object - @message = message - end - - private - def target - @object - end - - def warn(callstack, called, args) - ActiveSupport::Deprecation.warn(@message, callstack) - end - end - - # Stand-in for @request, @attributes, @params, etc. - # which emits deprecation warnings on any method call (except +inspect+). - class DeprecatedInstanceVariableProxy < DeprecationProxy #:nodoc: - def initialize(instance, method, var = "@#{method}") - @instance, @method, @var = instance, method, var - end - - private - def target - @instance.__send__(@method) - end - - def warn(callstack, called, args) - ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack) - end - end - - class DeprecatedConstantProxy < DeprecationProxy #:nodoc: - def initialize(old_const, new_const) - @old_const = old_const - @new_const = new_const - end - - def class - target.class - end - - private - def target - @new_const.to_s.constantize - end - - def warn(callstack, called, args) - ActiveSupport::Deprecation.warn("#{@old_const} is deprecated! Use #{@new_const} instead.", callstack) - end - end - end -end - -class Module - include ActiveSupport::Deprecation::ClassMethods -end - -require 'test/unit/error' - -module Test - module Unit - class TestCase - include ActiveSupport::Deprecation::Assertions - end - - class Error # :nodoc: - # Silence warnings when reporting test errors. - def message_with_silenced_deprecation - ActiveSupport::Deprecation.silence do - message_without_silenced_deprecation - end - end - - alias_method_chain :message, :silenced_deprecation - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/duration.rb b/vendor/activesupport-2.2.2/lib/active_support/duration.rb deleted file mode 100644 index 8eae85d38..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/duration.rb +++ /dev/null @@ -1,96 +0,0 @@ -module ActiveSupport - # Provides accurate date and time measurements using Date#advance and - # Time#advance, respectively. It mainly supports the methods on Numeric, - # such as in this example: - # - # 1.month.ago # equivalent to Time.now.advance(:months => -1) - class Duration < BasicObject - attr_accessor :value, :parts - - def initialize(value, parts) #:nodoc: - @value, @parts = value, parts - end - - # Adds another Duration or a Numeric to this Duration. Numeric values - # are treated as seconds. - def +(other) - if Duration === other - Duration.new(value + other.value, @parts + other.parts) - else - Duration.new(value + other, @parts + [[:seconds, other]]) - end - end - - # Subtracts another Duration or a Numeric from this Duration. Numeric - # values are treated as seconds. - def -(other) - self + (-other) - end - - def -@ #:nodoc: - Duration.new(-value, parts.map { |type,number| [type, -number] }) - end - - def is_a?(klass) #:nodoc: - klass == Duration || super - end - - # Returns true if other is also a Duration instance with the - # same value, or if other == value. - def ==(other) - if Duration === other - other.value == value - else - other == value - end - end - - def self.===(other) #:nodoc: - other.is_a?(Duration) rescue super - end - - # Calculates a new Time or Date that is as far in the future - # as this Duration represents. - def since(time = ::Time.current) - sum(1, time) - end - alias :from_now :since - - # Calculates a new Time or Date that is as far in the past - # as this Duration represents. - def ago(time = ::Time.current) - sum(-1, time) - end - alias :until :ago - - def inspect #:nodoc: - consolidated = parts.inject(::Hash.new(0)) { |h,part| h[part.first] += part.last; h } - [:years, :months, :days, :minutes, :seconds].map do |length| - n = consolidated[length] - "#{n} #{n == 1 ? length.to_s.singularize : length.to_s}" if n.nonzero? - end.compact.to_sentence - end - - protected - - def sum(sign, time = ::Time.current) #:nodoc: - parts.inject(time) do |t,(type,number)| - if t.acts_like?(:time) || t.acts_like?(:date) - if type == :seconds - t.since(sign * number) - else - t.advance(type => sign * number) - end - else - raise ::ArgumentError, "expected a time or date, got #{time.inspect}" - end - end - end - - private - - def method_missing(method, *args, &block) #:nodoc: - value.send(method, *args) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/gzip.rb b/vendor/activesupport-2.2.2/lib/active_support/gzip.rb deleted file mode 100644 index 35a50e9a7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/gzip.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'zlib' -require 'stringio' - -module ActiveSupport - # A convenient wrapper for the zlib standard library that allows compression/decompression of strings with gzip. - module Gzip - class Stream < StringIO - def close; rewind; end - end - - # Decompresses a gzipped string. - def self.decompress(source) - Zlib::GzipReader.new(StringIO.new(source)).read - end - - # Compresses a string using gzip. - def self.compress(source) - output = Stream.new - gz = Zlib::GzipWriter.new(output) - gz.write(source) - gz.close - output.string - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/inflections.rb b/vendor/activesupport-2.2.2/lib/active_support/inflections.rb deleted file mode 100644 index b6d276953..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/inflections.rb +++ /dev/null @@ -1,55 +0,0 @@ -module ActiveSupport - Inflector.inflections do |inflect| - inflect.plural(/$/, 's') - inflect.plural(/s$/i, 's') - inflect.plural(/(ax|test)is$/i, '\1es') - inflect.plural(/(octop|vir)us$/i, '\1i') - inflect.plural(/(alias|status)$/i, '\1es') - inflect.plural(/(bu)s$/i, '\1ses') - inflect.plural(/(buffal|tomat)o$/i, '\1oes') - inflect.plural(/([ti])um$/i, '\1a') - inflect.plural(/sis$/i, 'ses') - inflect.plural(/(?:([^f])fe|([lr])f)$/i, '\1\2ves') - inflect.plural(/(hive)$/i, '\1s') - inflect.plural(/([^aeiouy]|qu)y$/i, '\1ies') - inflect.plural(/(x|ch|ss|sh)$/i, '\1es') - inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '\1ices') - inflect.plural(/([m|l])ouse$/i, '\1ice') - inflect.plural(/^(ox)$/i, '\1en') - inflect.plural(/(quiz)$/i, '\1zes') - - inflect.singular(/s$/i, '') - inflect.singular(/(n)ews$/i, '\1ews') - inflect.singular(/([ti])a$/i, '\1um') - inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '\1\2sis') - inflect.singular(/(^analy)ses$/i, '\1sis') - inflect.singular(/([^f])ves$/i, '\1fe') - inflect.singular(/(hive)s$/i, '\1') - inflect.singular(/(tive)s$/i, '\1') - inflect.singular(/([lr])ves$/i, '\1f') - inflect.singular(/([^aeiouy]|qu)ies$/i, '\1y') - inflect.singular(/(s)eries$/i, '\1eries') - inflect.singular(/(m)ovies$/i, '\1ovie') - inflect.singular(/(x|ch|ss|sh)es$/i, '\1') - inflect.singular(/([m|l])ice$/i, '\1ouse') - inflect.singular(/(bus)es$/i, '\1') - inflect.singular(/(o)es$/i, '\1') - inflect.singular(/(shoe)s$/i, '\1') - inflect.singular(/(cris|ax|test)es$/i, '\1is') - inflect.singular(/(octop|vir)i$/i, '\1us') - inflect.singular(/(alias|status)es$/i, '\1') - inflect.singular(/^(ox)en/i, '\1') - inflect.singular(/(vert|ind)ices$/i, '\1ex') - inflect.singular(/(matr)ices$/i, '\1ix') - inflect.singular(/(quiz)zes$/i, '\1') - - inflect.irregular('person', 'people') - inflect.irregular('man', 'men') - inflect.irregular('child', 'children') - inflect.irregular('sex', 'sexes') - inflect.irregular('move', 'moves') - inflect.irregular('cow', 'kine') - - inflect.uncountable(%w(equipment information rice money species series fish sheep)) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/inflector.rb b/vendor/activesupport-2.2.2/lib/active_support/inflector.rb deleted file mode 100644 index ad2660e6c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/inflector.rb +++ /dev/null @@ -1,397 +0,0 @@ -# encoding: utf-8 -require 'singleton' -require 'iconv' - -module ActiveSupport - # The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, - # and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept - # in inflections.rb. - # - # The Rails core team has stated patches for the inflections library will not be accepted - # in order to avoid breaking legacy applications which may be relying on errant inflections. - # If you discover an incorrect inflection and require it for your application, you'll need - # to correct it yourself (explained below). - module Inflector - extend self - - # A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional - # inflection rules. Examples: - # - # ActiveSupport::Inflector.inflections do |inflect| - # inflect.plural /^(ox)$/i, '\1\2en' - # inflect.singular /^(ox)en/i, '\1' - # - # inflect.irregular 'octopus', 'octopi' - # - # inflect.uncountable "equipment" - # end - # - # New rules are added at the top. So in the example above, the irregular rule for octopus will now be the first of the - # pluralization and singularization rules that is runs. This guarantees that your rules run before any of the rules that may - # already have been loaded. - class Inflections - include Singleton - - attr_reader :plurals, :singulars, :uncountables, :humans - - def initialize - @plurals, @singulars, @uncountables, @humans = [], [], [], [] - end - - # Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. - # The replacement should always be a string that may include references to the matched data from the rule. - def plural(rule, replacement) - @uncountables.delete(rule) if rule.is_a?(String) - @uncountables.delete(replacement) - @plurals.insert(0, [rule, replacement]) - end - - # Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. - # The replacement should always be a string that may include references to the matched data from the rule. - def singular(rule, replacement) - @uncountables.delete(rule) if rule.is_a?(String) - @uncountables.delete(replacement) - @singulars.insert(0, [rule, replacement]) - end - - # Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used - # for strings, not regular expressions. You simply pass the irregular in singular and plural form. - # - # Examples: - # irregular 'octopus', 'octopi' - # irregular 'person', 'people' - def irregular(singular, plural) - @uncountables.delete(singular) - @uncountables.delete(plural) - if singular[0,1].upcase == plural[0,1].upcase - plural(Regexp.new("(#{singular[0,1]})#{singular[1..-1]}$", "i"), '\1' + plural[1..-1]) - singular(Regexp.new("(#{plural[0,1]})#{plural[1..-1]}$", "i"), '\1' + singular[1..-1]) - else - plural(Regexp.new("#{singular[0,1].upcase}(?i)#{singular[1..-1]}$"), plural[0,1].upcase + plural[1..-1]) - plural(Regexp.new("#{singular[0,1].downcase}(?i)#{singular[1..-1]}$"), plural[0,1].downcase + plural[1..-1]) - singular(Regexp.new("#{plural[0,1].upcase}(?i)#{plural[1..-1]}$"), singular[0,1].upcase + singular[1..-1]) - singular(Regexp.new("#{plural[0,1].downcase}(?i)#{plural[1..-1]}$"), singular[0,1].downcase + singular[1..-1]) - end - end - - # Add uncountable words that shouldn't be attempted inflected. - # - # Examples: - # uncountable "money" - # uncountable "money", "information" - # uncountable %w( money information rice ) - def uncountable(*words) - (@uncountables << words).flatten! - end - - # Specifies a humanized form of a string by a regular expression rule or by a string mapping. - # When using a regular expression based replacement, the normal humanize formatting is called after the replacement. - # When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name') - # - # Examples: - # human /_cnt$/i, '\1_count' - # human "legacy_col_person_name", "Name" - def human(rule, replacement) - @humans.insert(0, [rule, replacement]) - end - - # Clears the loaded inflections within a given scope (default is :all). - # Give the scope as a symbol of the inflection type, the options are: :plurals, - # :singulars, :uncountables, :humans. - # - # Examples: - # clear :all - # clear :plurals - def clear(scope = :all) - case scope - when :all - @plurals, @singulars, @uncountables = [], [], [] - else - instance_variable_set "@#{scope}", [] - end - end - end - - # Yields a singleton instance of Inflector::Inflections so you can specify additional - # inflector rules. - # - # Example: - # ActiveSupport::Inflector.inflections do |inflect| - # inflect.uncountable "rails" - # end - def inflections - if block_given? - yield Inflections.instance - else - Inflections.instance - end - end - - # Returns the plural form of the word in the string. - # - # Examples: - # "post".pluralize # => "posts" - # "octopus".pluralize # => "octopi" - # "sheep".pluralize # => "sheep" - # "words".pluralize # => "words" - # "CamelOctopus".pluralize # => "CamelOctopi" - def pluralize(word) - result = word.to_s.dup - - if word.empty? || inflections.uncountables.include?(result.downcase) - result - else - inflections.plurals.each { |(rule, replacement)| break if result.gsub!(rule, replacement) } - result - end - end - - # The reverse of +pluralize+, returns the singular form of a word in a string. - # - # Examples: - # "posts".singularize # => "post" - # "octopi".singularize # => "octopus" - # "sheep".singluarize # => "sheep" - # "word".singularize # => "word" - # "CamelOctopi".singularize # => "CamelOctopus" - def singularize(word) - result = word.to_s.dup - - if inflections.uncountables.include?(result.downcase) - result - else - inflections.singulars.each { |(rule, replacement)| break if result.gsub!(rule, replacement) } - result - end - end - - # By default, +camelize+ converts strings to UpperCamelCase. If the argument to +camelize+ - # is set to :lower then +camelize+ produces lowerCamelCase. - # - # +camelize+ will also convert '/' to '::' which is useful for converting paths to namespaces. - # - # Examples: - # "active_record".camelize # => "ActiveRecord" - # "active_record".camelize(:lower) # => "activeRecord" - # "active_record/errors".camelize # => "ActiveRecord::Errors" - # "active_record/errors".camelize(:lower) # => "activeRecord::Errors" - def camelize(lower_case_and_underscored_word, first_letter_in_uppercase = true) - if first_letter_in_uppercase - lower_case_and_underscored_word.to_s.gsub(/\/(.?)/) { "::#{$1.upcase}" }.gsub(/(?:^|_)(.)/) { $1.upcase } - else - lower_case_and_underscored_word.first.downcase + camelize(lower_case_and_underscored_word)[1..-1] - end - end - - # Capitalizes all the words and replaces some characters in the string to create - # a nicer looking title. +titleize+ is meant for creating pretty output. It is not - # used in the Rails internals. - # - # +titleize+ is also aliased as as +titlecase+. - # - # Examples: - # "man from the boondocks".titleize # => "Man From The Boondocks" - # "x-men: the last stand".titleize # => "X Men: The Last Stand" - def titleize(word) - humanize(underscore(word)).gsub(/\b('?[a-z])/) { $1.capitalize } - end - - # The reverse of +camelize+. Makes an underscored, lowercase form from the expression in the string. - # - # Changes '::' to '/' to convert namespaces to paths. - # - # Examples: - # "ActiveRecord".underscore # => "active_record" - # "ActiveRecord::Errors".underscore # => active_record/errors - def underscore(camel_cased_word) - camel_cased_word.to_s.gsub(/::/, '/'). - gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). - gsub(/([a-z\d])([A-Z])/,'\1_\2'). - tr("-", "_"). - downcase - end - - # Replaces underscores with dashes in the string. - # - # Example: - # "puni_puni" # => "puni-puni" - def dasherize(underscored_word) - underscored_word.gsub(/_/, '-') - end - - # Capitalizes the first word and turns underscores into spaces and strips a - # trailing "_id", if any. Like +titleize+, this is meant for creating pretty output. - # - # Examples: - # "employee_salary" # => "Employee salary" - # "author_id" # => "Author" - def humanize(lower_case_and_underscored_word) - result = lower_case_and_underscored_word.to_s.dup - - inflections.humans.each { |(rule, replacement)| break if result.gsub!(rule, replacement) } - result.gsub(/_id$/, "").gsub(/_/, " ").capitalize - end - - # Removes the module part from the expression in the string. - # - # Examples: - # "ActiveRecord::CoreExtensions::String::Inflections".demodulize # => "Inflections" - # "Inflections".demodulize # => "Inflections" - def demodulize(class_name_in_module) - class_name_in_module.to_s.gsub(/^.*::/, '') - end - - # Replaces special characters in a string so that it may be used as part of a 'pretty' URL. - # - # ==== Examples - # - # class Person - # def to_param - # "#{id}-#{name.parameterize}" - # end - # end - # - # @person = Person.find(1) - # # => # - # - # <%= link_to(@person.name, person_path %> - # # => Donald E. Knuth - def parameterize(string, sep = '-') - re_sep = Regexp.escape(sep) - # replace accented chars with ther ascii equivalents - parameterized_string = transliterate(string) - # Turn unwanted chars into the seperator - parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep) - # No more than one of the separator in a row. - parameterized_string.squeeze!(sep) - # Remove leading/trailing separator. - parameterized_string.gsub!(/^#{re_sep}|#{re_sep}$/i, '') - parameterized_string.downcase - end - - - # Replaces accented characters with their ascii equivalents. - def transliterate(string) - Iconv.iconv('ascii//ignore//translit', 'utf-8', string).to_s - end - - # The iconv transliteration code doesn't function correctly - # on some platforms, but it's very fast where it does function. - if "foo" != Inflector.transliterate("föö") - undef_method :transliterate - def transliterate(string) - string.mb_chars.normalize(:kd). # Decompose accented characters - gsub(/[^\x00-\x7F]+/, '') # Remove anything non-ASCII entirely (e.g. diacritics). - end - end - - # Create the name of a table like Rails does for models to table names. This method - # uses the +pluralize+ method on the last word in the string. - # - # Examples - # "RawScaledScorer".tableize # => "raw_scaled_scorers" - # "egg_and_ham".tableize # => "egg_and_hams" - # "fancyCategory".tableize # => "fancy_categories" - def tableize(class_name) - pluralize(underscore(class_name)) - end - - # Create a class name from a plural table name like Rails does for table names to models. - # Note that this returns a string and not a Class. (To convert to an actual class - # follow +classify+ with +constantize+.) - # - # Examples: - # "egg_and_hams".classify # => "EggAndHam" - # "posts".classify # => "Post" - # - # Singular names are not handled correctly: - # "business".classify # => "Busines" - def classify(table_name) - # strip out any leading schema name - camelize(singularize(table_name.to_s.sub(/.*\./, ''))) - end - - # Creates a foreign key name from a class name. - # +separate_class_name_and_id_with_underscore+ sets whether - # the method should put '_' between the name and 'id'. - # - # Examples: - # "Message".foreign_key # => "message_id" - # "Message".foreign_key(false) # => "messageid" - # "Admin::Post".foreign_key # => "post_id" - def foreign_key(class_name, separate_class_name_and_id_with_underscore = true) - underscore(demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id") - end - - # Ruby 1.9 introduces an inherit argument for Module#const_get and - # #const_defined? and changes their default behavior. - if Module.method(:const_get).arity == 1 - # Tries to find a constant with the name specified in the argument string: - # - # "Module".constantize # => Module - # "Test::Unit".constantize # => Test::Unit - # - # The name is assumed to be the one of a top-level constant, no matter whether - # it starts with "::" or not. No lexical context is taken into account: - # - # C = 'outside' - # module M - # C = 'inside' - # C # => 'inside' - # "C".constantize # => 'outside', same as ::C - # end - # - # NameError is raised when the name is not in CamelCase or the constant is - # unknown. - def constantize(camel_cased_word) - names = camel_cased_word.split('::') - names.shift if names.empty? || names.first.empty? - - constant = Object - names.each do |name| - constant = constant.const_defined?(name) ? constant.const_get(name) : constant.const_missing(name) - end - constant - end - else - def constantize(camel_cased_word) #:nodoc: - names = camel_cased_word.split('::') - names.shift if names.empty? || names.first.empty? - - constant = Object - names.each do |name| - constant = constant.const_get(name, false) || constant.const_missing(name) - end - constant - end - end - - # Turns a number into an ordinal string used to denote the position in an - # ordered sequence such as 1st, 2nd, 3rd, 4th. - # - # Examples: - # ordinalize(1) # => "1st" - # ordinalize(2) # => "2nd" - # ordinalize(1002) # => "1002nd" - # ordinalize(1003) # => "1003rd" - def ordinalize(number) - if (11..13).include?(number.to_i % 100) - "#{number}th" - else - case number.to_i % 10 - when 1; "#{number}st" - when 2; "#{number}nd" - when 3; "#{number}rd" - else "#{number}th" - end - end - end - end -end - -# in case active_support/inflector is required without the rest of active_support -require 'active_support/inflections' -require 'active_support/core_ext/string/inflections' -unless String.included_modules.include?(ActiveSupport::CoreExtensions::String::Inflections) - String.send :include, ActiveSupport::CoreExtensions::String::Inflections -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json.rb b/vendor/activesupport-2.2.2/lib/active_support/json.rb deleted file mode 100644 index 2bdb4a7b1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json.rb +++ /dev/null @@ -1,23 +0,0 @@ -module ActiveSupport - # If true, use ISO 8601 format for dates and times. Otherwise, fall back to the Active Support legacy format. - mattr_accessor :use_standard_json_time_format - - class << self - def escape_html_entities_in_json - @escape_html_entities_in_json - end - - def escape_html_entities_in_json=(value) - ActiveSupport::JSON::Encoding.escape_regex = \ - if value - /[\010\f\n\r\t"\\><&]/ - else - /[\010\f\n\r\t"\\]/ - end - @escape_html_entities_in_json = value - end - end -end - -require 'active_support/json/encoding' -require 'active_support/json/decoding' diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/decoding.rb b/vendor/activesupport-2.2.2/lib/active_support/json/decoding.rb deleted file mode 100644 index fdb219dbf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/decoding.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'yaml' -require 'strscan' - -module ActiveSupport - module JSON - class ParseError < StandardError - end - - class << self - # Converts a JSON string into a Ruby object. - def decode(json) - YAML.load(convert_json_to_yaml(json)) - rescue ArgumentError => e - raise ParseError, "Invalid JSON string" - end - - protected - # matches YAML-formatted dates - DATE_REGEX = /^\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?$/ - - # Ensure that ":" and "," are always followed by a space - def convert_json_to_yaml(json) #:nodoc: - scanner, quoting, marks, pos, times = StringScanner.new(json), false, [], nil, [] - while scanner.scan_until(/(\\['"]|['":,\\]|\\.)/) - case char = scanner[1] - when '"', "'" - if !quoting - quoting = char - pos = scanner.pos - elsif quoting == char - if json[pos..scanner.pos-2] =~ DATE_REGEX - # found a date, track the exact positions of the quotes so we can remove them later. - # oh, and increment them for each current mark, each one is an extra padded space that bumps - # the position in the final YAML output - total_marks = marks.size - times << pos+total_marks << scanner.pos+total_marks - end - quoting = false - end - when ":","," - marks << scanner.pos - 1 unless quoting - end - end - - if marks.empty? - json.gsub(/\\\//, '/') - else - left_pos = [-1].push(*marks) - right_pos = marks << json.length - output = [] - left_pos.each_with_index do |left, i| - output << json[left.succ..right_pos[i]] - end - output = output * " " - - times.each { |i| output[i-1] = ' ' } - output.gsub!(/\\\//, '/') - output - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date.rb deleted file mode 100644 index 1fc99c466..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Date - # Returns a JSON string representing the date. If ActiveSupport.use_standard_json_time_format is set to true, the - # ISO 8601 format is used. - # - # ==== Examples: - # - # # With ActiveSupport.use_standard_json_time_format = true - # Date.new(2005,2,1).to_json - # # => "2005-02-01" - # - # # With ActiveSupport.use_standard_json_time_format = false - # Date.new(2005,2,1).to_json - # # => "2005/02/01" - def to_json(options = nil) - if ActiveSupport.use_standard_json_time_format - %("#{strftime("%Y-%m-%d")}") - else - %("#{strftime("%Y/%m/%d")}") - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb deleted file mode 100644 index e25993003..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/date_time.rb +++ /dev/null @@ -1,21 +0,0 @@ -class DateTime - # Returns a JSON string representing the datetime. If ActiveSupport.use_standard_json_time_format is set to true, the - # ISO 8601 format is used. - # - # ==== Examples: - # - # # With ActiveSupport.use_standard_json_time_format = true - # DateTime.civil(2005,2,1,15,15,10).to_json - # # => "2005-02-01T15:15:10+00:00" - # - # # With ActiveSupport.use_standard_json_time_format = false - # DateTime.civil(2005,2,1,15,15,10).to_json - # # => "2005/02/01 15:15:10 +0000" - def to_json(options = nil) - if ActiveSupport.use_standard_json_time_format - xmlschema.inspect - else - strftime('"%Y/%m/%d %H:%M:%S %z"') - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb deleted file mode 100644 index 881b1d62c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/enumerable.rb +++ /dev/null @@ -1,12 +0,0 @@ -module Enumerable - # Returns a JSON string representing the enumerable. Any +options+ - # given will be passed on to its elements. For example: - # - # users = User.find(:all) - # # => users.to_json(:only => :name) - # - # will pass the :only => :name option to each user. - def to_json(options = {}) #:nodoc: - "[#{map { |value| ActiveSupport::JSON.encode(value, options) } * ', '}]" - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb deleted file mode 100644 index bf0844334..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/false_class.rb +++ /dev/null @@ -1,5 +0,0 @@ -class FalseClass - def to_json(options = nil) #:nodoc: - 'false' - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb deleted file mode 100644 index b9bdd55fa..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/hash.rb +++ /dev/null @@ -1,47 +0,0 @@ -class Hash - # Returns a JSON string representing the hash. - # - # Without any +options+, the returned JSON string will include all - # the hash keys. For example: - # - # { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json - # # => {"name": "Konata Izumi", 1: 2, "age": 16} - # - # The keys in the JSON string are unordered due to the nature of hashes. - # - # The :only and :except options can be used to limit the - # attributes included, and will accept 1 or more hash keys to include/exclude. - # - # { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:only => [:name, 'age']) - # # => {"name": "Konata Izumi", "age": 16} - # - # { :name => "Konata Izumi", 'age' => 16, 1 => 2 }.to_json(:except => 1) - # # => {"name": "Konata Izumi", "age": 16} - # - # The +options+ also filter down to any hash values. This is particularly - # useful for converting hashes containing ActiveRecord objects or any object - # that responds to options in their to_json method. For example: - # - # users = User.find(:all) - # { :users => users, :count => users.size }.to_json(:include => :posts) - # - # would pass the :include => :posts option to users, - # allowing the posts association in the User model to be converted to JSON - # as well. - def to_json(options = {}) #:nodoc: - hash_keys = self.keys - - if options[:except] - hash_keys = hash_keys - Array(options[:except]) - elsif options[:only] - hash_keys = hash_keys & Array(options[:only]) - end - - returning result = '{' do - result << hash_keys.map do |key| - "#{ActiveSupport::JSON.encode(key)}: #{ActiveSupport::JSON.encode(self[key], options)}" - end * ', ' - result << '}' - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb deleted file mode 100644 index 4763471ac..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/nil_class.rb +++ /dev/null @@ -1,5 +0,0 @@ -class NilClass - def to_json(options = nil) #:nodoc: - 'null' - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb deleted file mode 100644 index 38713fb36..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/numeric.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Numeric - def to_json(options = nil) #:nodoc: - to_s - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/object.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/object.rb deleted file mode 100644 index ca215d496..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/object.rb +++ /dev/null @@ -1,6 +0,0 @@ -class Object - # Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info. - def to_json(options = {}) - ActiveSupport::JSON.encode(instance_values, options) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb deleted file mode 100644 index b6116b70b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/regexp.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Regexp - def to_json(options = nil) #:nodoc: - inspect - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/string.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/string.rb deleted file mode 100644 index 5ef797955..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/string.rb +++ /dev/null @@ -1,36 +0,0 @@ -module ActiveSupport - module JSON - module Encoding - mattr_accessor :escape_regex - - ESCAPED_CHARS = { - "\010" => '\b', - "\f" => '\f', - "\n" => '\n', - "\r" => '\r', - "\t" => '\t', - '"' => '\"', - '\\' => '\\\\', - '>' => '\u003E', - '<' => '\u003C', - '&' => '\u0026' - } - end - end -end - -ActiveSupport.escape_html_entities_in_json = true - -class String - def to_json(options = nil) #:nodoc: - json = '"' + gsub(ActiveSupport::JSON::Encoding.escape_regex) { |s| - ActiveSupport::JSON::Encoding::ESCAPED_CHARS[s] - } - json.force_encoding('ascii-8bit') if respond_to?(:force_encoding) - json.gsub(/([\xC0-\xDF][\x80-\xBF]| - [\xE0-\xEF][\x80-\xBF]{2}| - [\xF0-\xF7][\x80-\xBF]{3})+/nx) { |s| - s.unpack("U*").pack("n*").unpack("H*")[0].gsub(/.{4}/, '\\\\u\&') - } + '"' - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb deleted file mode 100644 index 485112f97..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/symbol.rb +++ /dev/null @@ -1,5 +0,0 @@ -class Symbol - def to_json(options = {}) #:nodoc: - ActiveSupport::JSON.encode(to_s, options) - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/time.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/time.rb deleted file mode 100644 index 09fc61488..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/time.rb +++ /dev/null @@ -1,21 +0,0 @@ -class Time - # Returns a JSON string representing the time. If ActiveSupport.use_standard_json_time_format is set to true, the - # ISO 8601 format is used. - # - # ==== Examples: - # - # # With ActiveSupport.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).to_json - # # => "2005-02-01T15:15:10Z" - # - # # With ActiveSupport.use_standard_json_time_format = false - # Time.utc(2005,2,1,15,15,10).to_json - # # => "2005/02/01 15:15:10 +0000" - def to_json(options = nil) - if ActiveSupport.use_standard_json_time_format - xmlschema.inspect - else - %("#{strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}") - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb deleted file mode 100644 index 037d812b3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoders/true_class.rb +++ /dev/null @@ -1,5 +0,0 @@ -class TrueClass - def to_json(options = nil) #:nodoc: - 'true' - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/encoding.rb b/vendor/activesupport-2.2.2/lib/active_support/json/encoding.rb deleted file mode 100644 index 8650e3422..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/encoding.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'active_support/json/variable' -require 'active_support/json/encoders/object' # Require explicitly for rdoc. -Dir["#{File.dirname(__FILE__)}/encoders/**/*.rb"].each do |file| - basename = File.basename(file, '.rb') - unless basename == 'object' - require "active_support/json/encoders/#{basename}" - end -end - -module ActiveSupport - module JSON - class CircularReferenceError < StandardError - end - - class << self - REFERENCE_STACK_VARIABLE = :json_reference_stack #:nodoc: - - # Converts a Ruby object into a JSON string. - def encode(value, options = {}) - raise_on_circular_reference(value) do - value.send(:to_json, options) - end - end - - protected - def raise_on_circular_reference(value) #:nodoc: - stack = Thread.current[REFERENCE_STACK_VARIABLE] ||= [] - raise CircularReferenceError, 'object references itself' if - stack.include? value - stack << value - yield - ensure - stack.pop - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/json/variable.rb b/vendor/activesupport-2.2.2/lib/active_support/json/variable.rb deleted file mode 100644 index 7fd23b0a9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/json/variable.rb +++ /dev/null @@ -1,10 +0,0 @@ -module ActiveSupport - module JSON - # A string that returns itself as its JSON-encoded form. - class Variable < String - def to_json(options=nil) - self - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/locale/en.yml b/vendor/activesupport-2.2.2/lib/active_support/locale/en.yml deleted file mode 100644 index 92132cacd..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/locale/en.yml +++ /dev/null @@ -1,32 +0,0 @@ -en: - date: - formats: - # Use the strftime parameters for formats. - # When no format has been given, it uses default. - # You can provide other formats here if you like! - default: "%Y-%m-%d" - short: "%b %d" - long: "%B %d, %Y" - - day_names: [Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday] - abbr_day_names: [Sun, Mon, Tue, Wed, Thu, Fri, Sat] - - # Don't forget the nil at the beginning; there's no such thing as a 0th month - month_names: [~, January, February, March, April, May, June, July, August, September, October, November, December] - abbr_month_names: [~, Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec] - # Used in date_select and datime_select. - order: [ :year, :month, :day ] - - time: - formats: - default: "%a, %d %b %Y %H:%M:%S %z" - short: "%d %b %H:%M" - long: "%B %d, %Y %H:%M" - am: "am" - pm: "pm" - -# Used in array.to_sentence. - support: - array: - sentence_connector: "and" - skip_last_comma: false diff --git a/vendor/activesupport-2.2.2/lib/active_support/memoizable.rb b/vendor/activesupport-2.2.2/lib/active_support/memoizable.rb deleted file mode 100644 index cd5c01cda..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/memoizable.rb +++ /dev/null @@ -1,82 +0,0 @@ -module ActiveSupport - module Memoizable - MEMOIZED_IVAR = Proc.new do |symbol| - "@_memoized_#{symbol.to_s.sub(/\?\Z/, '_query').sub(/!\Z/, '_bang')}".to_sym - end - - module Freezable - def self.included(base) - base.class_eval do - unless base.method_defined?(:freeze_without_memoizable) - alias_method_chain :freeze, :memoizable - end - end - end - - def freeze_with_memoizable - memoize_all unless frozen? - freeze_without_memoizable - end - - def memoize_all - methods.each do |m| - if m.to_s =~ /^_unmemoized_(.*)/ - if method(m).arity == 0 - __send__($1) - else - ivar = MEMOIZED_IVAR.call($1) - instance_variable_set(ivar, {}) - end - end - end - end - - def unmemoize_all - methods.each do |m| - if m.to_s =~ /^_unmemoized_(.*)/ - ivar = MEMOIZED_IVAR.call($1) - instance_variable_get(ivar).clear if instance_variable_defined?(ivar) - end - end - end - end - - def memoize(*symbols) - symbols.each do |symbol| - original_method = :"_unmemoized_#{symbol}" - memoized_ivar = MEMOIZED_IVAR.call(symbol) - - class_eval <<-EOS, __FILE__, __LINE__ - include Freezable - - raise "Already memoized #{symbol}" if method_defined?(:#{original_method}) - alias #{original_method} #{symbol} - - if instance_method(:#{symbol}).arity == 0 - def #{symbol}(reload = false) - if reload || !defined?(#{memoized_ivar}) || #{memoized_ivar}.empty? - #{memoized_ivar} = [#{original_method}.freeze] - end - #{memoized_ivar}[0] - end - else - def #{symbol}(*args) - #{memoized_ivar} ||= {} unless frozen? - reload = args.pop if args.last == true || args.last == :reload - - if defined?(#{memoized_ivar}) && #{memoized_ivar} - if !reload && #{memoized_ivar}.has_key?(args) - #{memoized_ivar}[args] - elsif #{memoized_ivar} - #{memoized_ivar}[args] = #{original_method}(*args).freeze - end - else - #{original_method}(*args) - end - end - end - EOS - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/multibyte.rb b/vendor/activesupport-2.2.2/lib/active_support/multibyte.rb deleted file mode 100644 index 65a96af49..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/multibyte.rb +++ /dev/null @@ -1,33 +0,0 @@ -# encoding: utf-8 - -require 'active_support/multibyte/chars' -require 'active_support/multibyte/exceptions' -require 'active_support/multibyte/unicode_database' - -module ActiveSupport #:nodoc: - module Multibyte - # A list of all available normalization forms. See http://www.unicode.org/reports/tr15/tr15-29.html for more - # information about normalization. - NORMALIZATION_FORMS = [:c, :kc, :d, :kd] - - # The Unicode version that is supported by the implementation - UNICODE_VERSION = '5.1.0' - - # The default normalization used for operations that require normalization. It can be set to any of the - # normalizations in NORMALIZATION_FORMS. - # - # Example: - # ActiveSupport::Multibyte.default_normalization_form = :c - mattr_accessor :default_normalization_form - self.default_normalization_form = :kc - - # The proxy class returned when calling mb_chars. You can use this accessor to configure your own proxy - # class so you can support other encodings. See the ActiveSupport::Multibyte::Chars implementation for - # an example how to do this. - # - # Example: - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - mattr_accessor :proxy_class - self.proxy_class = ActiveSupport::Multibyte::Chars - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/multibyte/chars.rb b/vendor/activesupport-2.2.2/lib/active_support/multibyte/chars.rb deleted file mode 100644 index be9c6d356..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/multibyte/chars.rb +++ /dev/null @@ -1,679 +0,0 @@ -# encoding: utf-8 - -module ActiveSupport #:nodoc: - module Multibyte #:nodoc: - # Chars enables you to work transparently with UTF-8 encoding in the Ruby String class without having extensive - # knowledge about the encoding. A Chars object accepts a string upon initialization and proxies String methods in an - # encoding safe manner. All the normal String methods are also implemented on the proxy. - # - # String methods are proxied through the Chars object, and can be accessed through the +mb_chars+ method. Methods - # which would normally return a String object now return a Chars object so methods can be chained. - # - # "The Perfect String ".mb_chars.downcase.strip.normalize #=> "the perfect string" - # - # Chars objects are perfectly interchangeable with String objects as long as no explicit class checks are made. - # If certain methods do explicitly check the class, call +to_s+ before you pass chars objects to them. - # - # bad.explicit_checking_method "T".mb_chars.downcase.to_s - # - # The default Chars implementation assumes that the encoding of the string is UTF-8, if you want to handle different - # encodings you can write your own multibyte string handler and configure it through - # ActiveSupport::Multibyte.proxy_class. - # - # class CharsForUTF32 - # def size - # @wrapped_string.size / 4 - # end - # - # def self.accepts?(string) - # string.length % 4 == 0 - # end - # end - # - # ActiveSupport::Multibyte.proxy_class = CharsForUTF32 - class Chars - # Hangul character boundaries and properties - HANGUL_SBASE = 0xAC00 - HANGUL_LBASE = 0x1100 - HANGUL_VBASE = 0x1161 - HANGUL_TBASE = 0x11A7 - HANGUL_LCOUNT = 19 - HANGUL_VCOUNT = 21 - HANGUL_TCOUNT = 28 - HANGUL_NCOUNT = HANGUL_VCOUNT * HANGUL_TCOUNT - HANGUL_SCOUNT = 11172 - HANGUL_SLAST = HANGUL_SBASE + HANGUL_SCOUNT - HANGUL_JAMO_FIRST = 0x1100 - HANGUL_JAMO_LAST = 0x11FF - - # All the unicode whitespace - UNICODE_WHITESPACE = [ - (0x0009..0x000D).to_a, # White_Space # Cc [5] .. - 0x0020, # White_Space # Zs SPACE - 0x0085, # White_Space # Cc - 0x00A0, # White_Space # Zs NO-BREAK SPACE - 0x1680, # White_Space # Zs OGHAM SPACE MARK - 0x180E, # White_Space # Zs MONGOLIAN VOWEL SEPARATOR - (0x2000..0x200A).to_a, # White_Space # Zs [11] EN QUAD..HAIR SPACE - 0x2028, # White_Space # Zl LINE SEPARATOR - 0x2029, # White_Space # Zp PARAGRAPH SEPARATOR - 0x202F, # White_Space # Zs NARROW NO-BREAK SPACE - 0x205F, # White_Space # Zs MEDIUM MATHEMATICAL SPACE - 0x3000, # White_Space # Zs IDEOGRAPHIC SPACE - ].flatten.freeze - - # BOM (byte order mark) can also be seen as whitespace, it's a non-rendering character used to distinguish - # between little and big endian. This is not an issue in utf-8, so it must be ignored. - UNICODE_LEADERS_AND_TRAILERS = UNICODE_WHITESPACE + [65279] # ZERO-WIDTH NO-BREAK SPACE aka BOM - - # Returns a regular expression pattern that matches the passed Unicode codepoints - def self.codepoints_to_pattern(array_of_codepoints) #:nodoc: - array_of_codepoints.collect{ |e| [e].pack 'U*' }.join('|') - end - UNICODE_TRAILERS_PAT = /(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+\Z/ - UNICODE_LEADERS_PAT = /\A(#{codepoints_to_pattern(UNICODE_LEADERS_AND_TRAILERS)})+/ - - # Borrowed from the Kconv library by Shinji KONO - (also as seen on the W3C site) - UTF8_PAT = /\A(?: - [\x00-\x7f] | - [\xc2-\xdf] [\x80-\xbf] | - \xe0 [\xa0-\xbf] [\x80-\xbf] | - [\xe1-\xef] [\x80-\xbf] [\x80-\xbf] | - \xf0 [\x90-\xbf] [\x80-\xbf] [\x80-\xbf] | - [\xf1-\xf3] [\x80-\xbf] [\x80-\xbf] [\x80-\xbf] | - \xf4 [\x80-\x8f] [\x80-\xbf] [\x80-\xbf] - )*\z/xn - - attr_reader :wrapped_string - alias to_s wrapped_string - alias to_str wrapped_string - - if '1.9'.respond_to?(:force_encoding) - # Creates a new Chars instance by wrapping _string_. - def initialize(string) - @wrapped_string = string - @wrapped_string.force_encoding(Encoding::UTF_8) unless @wrapped_string.frozen? - end - else - def initialize(string) #:nodoc: - @wrapped_string = string - end - end - - # Forward all undefined methods to the wrapped string. - def method_missing(method, *args, &block) - if method.to_s =~ /!$/ - @wrapped_string.__send__(method, *args, &block) - self - else - result = @wrapped_string.__send__(method, *args, &block) - result.kind_of?(String) ? chars(result) : result - end - end - - # Returns +true+ if _obj_ responds to the given method. Private methods are included in the search - # only if the optional second parameter evaluates to +true+. - def respond_to?(method, include_private=false) - super || @wrapped_string.respond_to?(method, include_private) || false - end - - # Enable more predictable duck-typing on String-like classes. See Object#acts_like?. - def acts_like_string? - true - end - - # Returns +true+ if the Chars class can and should act as a proxy for the string _string_. Returns - # +false+ otherwise. - def self.wants?(string) - $KCODE == 'UTF8' && consumes?(string) - end - - # Returns +true+ when the proxy class can handle the string. Returns +false+ otherwise. - def self.consumes?(string) - # Unpack is a little bit faster than regular expressions. - string.unpack('U*') - true - rescue ArgumentError - false - end - - include Comparable - - # Returns -1, 0 or +1 depending on whether the Chars object is to be sorted before, - # equal or after the object on the right side of the operation. It accepts any object that implements +to_s+. - # See String#<=> for more details. - # - # Example: - # 'é'.mb_chars <=> 'ü'.mb_chars #=> -1 - def <=>(other) - @wrapped_string <=> other.to_s - end - - # Returns a new Chars object containing the _other_ object concatenated to the string. - # - # Example: - # ('Café'.mb_chars + ' périferôl').to_s #=> "Café périferôl" - def +(other) - self << other - end - - # Like String#=~ only it returns the character offset (in codepoints) instead of the byte offset. - # - # Example: - # 'Café périferôl'.mb_chars =~ /ô/ #=> 12 - def =~(other) - translate_offset(@wrapped_string =~ other) - end - - # Works just like String#split, with the exception that the items in the resulting list are Chars - # instances instead of String. This makes chaining methods easier. - # - # Example: - # 'Café périferôl'.mb_chars.split(/é/).map { |part| part.upcase.to_s } #=> ["CAF", " P", "RIFERÔL"] - def split(*args) - @wrapped_string.split(*args).map { |i| i.mb_chars } - end - - # Inserts the passed string at specified codepoint offsets. - # - # Example: - # 'Café'.mb_chars.insert(4, ' périferôl').to_s #=> "Café périferôl" - def insert(offset, fragment) - unpacked = self.class.u_unpack(@wrapped_string) - unless offset > unpacked.length - @wrapped_string.replace( - self.class.u_unpack(@wrapped_string).insert(offset, *self.class.u_unpack(fragment)).pack('U*') - ) - else - raise IndexError, "index #{offset} out of string" - end - self - end - - # Returns +true+ if contained string contains _other_. Returns +false+ otherwise. - # - # Example: - # 'Café'.mb_chars.include?('é') #=> true - def include?(other) - # We have to redefine this method because Enumerable defines it. - @wrapped_string.include?(other) - end - - # Returns the position _needle_ in the string, counting in codepoints. Returns +nil+ if _needle_ isn't found. - # - # Example: - # 'Café périferôl'.mb_chars.index('ô') #=> 12 - # 'Café périferôl'.mb_chars.index(/\w/u) #=> 0 - def index(needle, offset=0) - index = @wrapped_string.index(needle, offset) - index ? (self.class.u_unpack(@wrapped_string.slice(0...index)).size) : nil - end - - # Like String#[]=, except instead of byte offsets you specify character offsets. - # - # Example: - # - # s = "Müller" - # s.mb_chars[2] = "e" # Replace character with offset 2 - # s - # #=> "Müeler" - # - # s = "Müller" - # s.mb_chars[1, 2] = "ö" # Replace 2 characters at character offset 1 - # s - # #=> "Möler" - def []=(*args) - replace_by = args.pop - # Indexed replace with regular expressions already works - if args.first.is_a?(Regexp) - @wrapped_string[*args] = replace_by - else - result = self.class.u_unpack(@wrapped_string) - if args[0].is_a?(Fixnum) - raise IndexError, "index #{args[0]} out of string" if args[0] >= result.length - min = args[0] - max = args[1].nil? ? min : (min + args[1] - 1) - range = Range.new(min, max) - replace_by = [replace_by].pack('U') if replace_by.is_a?(Fixnum) - elsif args.first.is_a?(Range) - raise RangeError, "#{args[0]} out of range" if args[0].min >= result.length - range = args[0] - else - needle = args[0].to_s - min = index(needle) - max = min + self.class.u_unpack(needle).length - 1 - range = Range.new(min, max) - end - result[range] = self.class.u_unpack(replace_by) - @wrapped_string.replace(result.pack('U*')) - end - end - - # Works just like String#rjust, only integer specifies characters instead of bytes. - # - # Example: - # - # "¾ cup".mb_chars.rjust(8).to_s - # #=> " ¾ cup" - # - # "¾ cup".mb_chars.rjust(8, " ").to_s # Use non-breaking whitespace - # #=> "   ¾ cup" - def rjust(integer, padstr=' ') - justify(integer, :right, padstr) - end - - # Works just like String#ljust, only integer specifies characters instead of bytes. - # - # Example: - # - # "¾ cup".mb_chars.rjust(8).to_s - # #=> "¾ cup " - # - # "¾ cup".mb_chars.rjust(8, " ").to_s # Use non-breaking whitespace - # #=> "¾ cup   " - def ljust(integer, padstr=' ') - justify(integer, :left, padstr) - end - - # Works just like String#center, only integer specifies characters instead of bytes. - # - # Example: - # - # "¾ cup".mb_chars.center(8).to_s - # #=> " ¾ cup " - # - # "¾ cup".mb_chars.center(8, " ").to_s # Use non-breaking whitespace - # #=> " ¾ cup  " - def center(integer, padstr=' ') - justify(integer, :center, padstr) - end - - # Strips entire range of Unicode whitespace from the right of the string. - def rstrip - chars(@wrapped_string.gsub(UNICODE_TRAILERS_PAT, '')) - end - - # Strips entire range of Unicode whitespace from the left of the string. - def lstrip - chars(@wrapped_string.gsub(UNICODE_LEADERS_PAT, '')) - end - - # Strips entire range of Unicode whitespace from the right and left of the string. - def strip - rstrip.lstrip - end - - # Returns the number of codepoints in the string - def size - self.class.u_unpack(@wrapped_string).size - end - alias_method :length, :size - - # Reverses all characters in the string. - # - # Example: - # 'Café'.mb_chars.reverse.to_s #=> 'éfaC' - def reverse - chars(self.class.u_unpack(@wrapped_string).reverse.pack('U*')) - end - - # Implements Unicode-aware slice with codepoints. Slicing on one point returns the codepoints for that - # character. - # - # Example: - # 'ã“ã‚“ã«ã¡ã¯'.mb_chars.slice(2..3).to_s #=> "ã«ã¡" - def slice(*args) - if args.size > 2 - raise ArgumentError, "wrong number of arguments (#{args.size} for 1)" # Do as if we were native - elsif (args.size == 2 && !(args.first.is_a?(Numeric) || args.first.is_a?(Regexp))) - raise TypeError, "cannot convert #{args.first.class} into Integer" # Do as if we were native - elsif (args.size == 2 && !args[1].is_a?(Numeric)) - raise TypeError, "cannot convert #{args[1].class} into Integer" # Do as if we were native - elsif args[0].kind_of? Range - cps = self.class.u_unpack(@wrapped_string).slice(*args) - result = cps.nil? ? nil : cps.pack('U*') - elsif args[0].kind_of? Regexp - result = @wrapped_string.slice(*args) - elsif args.size == 1 && args[0].kind_of?(Numeric) - character = self.class.u_unpack(@wrapped_string)[args[0]] - result = character.nil? ? nil : [character].pack('U') - else - result = self.class.u_unpack(@wrapped_string).slice(*args).pack('U*') - end - result.nil? ? nil : chars(result) - end - alias_method :[], :slice - - # Convert characters in the string to uppercase. - # - # Example: - # 'Laurent, òu sont les tests?'.mb_chars.upcase.to_s #=> "LAURENT, Ã’U SONT LES TESTS?" - def upcase - apply_mapping :uppercase_mapping - end - - # Convert characters in the string to lowercase. - # - # Example: - # 'VÄšDA A VÃZKUM'.mb_chars.downcase.to_s #=> "vÄ›da a výzkum" - def downcase - apply_mapping :lowercase_mapping - end - - # Converts the first character to uppercase and the remainder to lowercase. - # - # Example: - # 'über'.mb_chars.capitalize.to_s #=> "Über" - def capitalize - (slice(0) || chars('')).upcase + (slice(1..-1) || chars('')).downcase - end - - # Returns the KC normalization of the string by default. NFKC is considered the best normalization form for - # passing strings to databases and validations. - # - # * str - The string to perform normalization on. - # * form - The form you want to normalize in. Should be one of the following: - # :c, :kc, :d, or :kd. Default is - # ActiveSupport::Multibyte.default_normalization_form - def normalize(form=ActiveSupport::Multibyte.default_normalization_form) - # See http://www.unicode.org/reports/tr15, Table 1 - codepoints = self.class.u_unpack(@wrapped_string) - chars(case form - when :d - self.class.reorder_characters(self.class.decompose_codepoints(:canonical, codepoints)) - when :c - self.class.compose_codepoints(self.class.reorder_characters(self.class.decompose_codepoints(:canonical, codepoints))) - when :kd - self.class.reorder_characters(self.class.decompose_codepoints(:compatability, codepoints)) - when :kc - self.class.compose_codepoints(self.class.reorder_characters(self.class.decompose_codepoints(:compatability, codepoints))) - else - raise ArgumentError, "#{form} is not a valid normalization variant", caller - end.pack('U*')) - end - - # Performs canonical decomposition on all the characters. - # - # Example: - # 'é'.length #=> 2 - # 'é'.mb_chars.decompose.to_s.length #=> 3 - def decompose - chars(self.class.decompose_codepoints(:canonical, self.class.u_unpack(@wrapped_string)).pack('U*')) - end - - # Performs composition on all the characters. - # - # Example: - # 'é'.length #=> 3 - # 'é'.mb_chars.compose.to_s.length #=> 2 - def compose - chars(self.class.compose_codepoints(self.class.u_unpack(@wrapped_string)).pack('U*')) - end - - # Returns the number of grapheme clusters in the string. - # - # Example: - # 'कà¥à¤·à¤¿'.mb_chars.length #=> 4 - # 'कà¥à¤·à¤¿'.mb_chars.g_length #=> 3 - def g_length - self.class.g_unpack(@wrapped_string).length - end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string. - def tidy_bytes - chars(self.class.tidy_bytes(@wrapped_string)) - end - - %w(lstrip rstrip strip reverse upcase downcase slice tidy_bytes capitalize).each do |method| - define_method("#{method}!") do |*args| - unless args.nil? - @wrapped_string = send(method, *args).to_s - else - @wrapped_string = send(method).to_s - end - self - end - end - - class << self - - # Unpack the string at codepoints boundaries. Raises an EncodingError when the encoding of the string isn't - # valid UTF-8. - # - # Example: - # Chars.u_unpack('Café') #=> [67, 97, 102, 233] - def u_unpack(string) - begin - string.unpack 'U*' - rescue ArgumentError - raise EncodingError, 'malformed UTF-8 character' - end - end - - # Detect whether the codepoint is in a certain character class. Returns +true+ when it's in the specified - # character class and +false+ otherwise. Valid character classes are: :cr, :lf, :l, - # :v, :lv, :lvt and :t. - # - # Primarily used by the grapheme cluster support. - def in_char_class?(codepoint, classes) - classes.detect { |c| UCD.boundary[c] === codepoint } ? true : false - end - - # Unpack the string at grapheme boundaries. Returns a list of character lists. - # - # Example: - # Chars.g_unpack('कà¥à¤·à¤¿') #=> [[2325, 2381], [2359], [2367]] - # Chars.g_unpack('Café') #=> [[67], [97], [102], [233]] - def g_unpack(string) - codepoints = u_unpack(string) - unpacked = [] - pos = 0 - marker = 0 - eoc = codepoints.length - while(pos < eoc) - pos += 1 - previous = codepoints[pos-1] - current = codepoints[pos] - if ( - # CR X LF - one = ( previous == UCD.boundary[:cr] and current == UCD.boundary[:lf] ) or - # L X (L|V|LV|LVT) - two = ( UCD.boundary[:l] === previous and in_char_class?(current, [:l,:v,:lv,:lvt]) ) or - # (LV|V) X (V|T) - three = ( in_char_class?(previous, [:lv,:v]) and in_char_class?(current, [:v,:t]) ) or - # (LVT|T) X (T) - four = ( in_char_class?(previous, [:lvt,:t]) and UCD.boundary[:t] === current ) or - # X Extend - five = (UCD.boundary[:extend] === current) - ) - else - unpacked << codepoints[marker..pos-1] - marker = pos - end - end - unpacked - end - - # Reverse operation of g_unpack. - # - # Example: - # Chars.g_pack(Chars.g_unpack('कà¥à¤·à¤¿')) #=> 'कà¥à¤·à¤¿' - def g_pack(unpacked) - (unpacked.flatten).pack('U*') - end - - def padding(padsize, padstr=' ') #:nodoc: - if padsize != 0 - new(padstr * ((padsize / u_unpack(padstr).size) + 1)).slice(0, padsize) - else - '' - end - end - - # Re-order codepoints so the string becomes canonical. - def reorder_characters(codepoints) - length = codepoints.length- 1 - pos = 0 - while pos < length do - cp1, cp2 = UCD.codepoints[codepoints[pos]], UCD.codepoints[codepoints[pos+1]] - if (cp1.combining_class > cp2.combining_class) && (cp2.combining_class > 0) - codepoints[pos..pos+1] = cp2.code, cp1.code - pos += (pos > 0 ? -1 : 1) - else - pos += 1 - end - end - codepoints - end - - # Decompose composed characters to the decomposed form. - def decompose_codepoints(type, codepoints) - codepoints.inject([]) do |decomposed, cp| - # if it's a hangul syllable starter character - if HANGUL_SBASE <= cp and cp < HANGUL_SLAST - sindex = cp - HANGUL_SBASE - ncp = [] # new codepoints - ncp << HANGUL_LBASE + sindex / HANGUL_NCOUNT - ncp << HANGUL_VBASE + (sindex % HANGUL_NCOUNT) / HANGUL_TCOUNT - tindex = sindex % HANGUL_TCOUNT - ncp << (HANGUL_TBASE + tindex) unless tindex == 0 - decomposed.concat ncp - # if the codepoint is decomposable in with the current decomposition type - elsif (ncp = UCD.codepoints[cp].decomp_mapping) and (!UCD.codepoints[cp].decomp_type || type == :compatability) - decomposed.concat decompose_codepoints(type, ncp.dup) - else - decomposed << cp - end - end - end - - # Compose decomposed characters to the composed form. - def compose_codepoints(codepoints) - pos = 0 - eoa = codepoints.length - 1 - starter_pos = 0 - starter_char = codepoints[0] - previous_combining_class = -1 - while pos < eoa - pos += 1 - lindex = starter_char - HANGUL_LBASE - # -- Hangul - if 0 <= lindex and lindex < HANGUL_LCOUNT - vindex = codepoints[starter_pos+1] - HANGUL_VBASE rescue vindex = -1 - if 0 <= vindex and vindex < HANGUL_VCOUNT - tindex = codepoints[starter_pos+2] - HANGUL_TBASE rescue tindex = -1 - if 0 <= tindex and tindex < HANGUL_TCOUNT - j = starter_pos + 2 - eoa -= 2 - else - tindex = 0 - j = starter_pos + 1 - eoa -= 1 - end - codepoints[starter_pos..j] = (lindex * HANGUL_VCOUNT + vindex) * HANGUL_TCOUNT + tindex + HANGUL_SBASE - end - starter_pos += 1 - starter_char = codepoints[starter_pos] - # -- Other characters - else - current_char = codepoints[pos] - current = UCD.codepoints[current_char] - if current.combining_class > previous_combining_class - if ref = UCD.composition_map[starter_char] - composition = ref[current_char] - else - composition = nil - end - unless composition.nil? - codepoints[starter_pos] = composition - starter_char = composition - codepoints.delete_at pos - eoa -= 1 - pos -= 1 - previous_combining_class = -1 - else - previous_combining_class = current.combining_class - end - else - previous_combining_class = current.combining_class - end - if current.combining_class == 0 - starter_pos = pos - starter_char = codepoints[pos] - end - end - end - codepoints - end - - # Replaces all ISO-8859-1 or CP1252 characters by their UTF-8 equivalent resulting in a valid UTF-8 string. - def tidy_bytes(string) - string.split(//u).map do |c| - if !UTF8_PAT.match(c) - n = c.unpack('C')[0] - n < 128 ? n.chr : - n < 160 ? [UCD.cp1252[n] || n].pack('U') : - n < 192 ? "\xC2" + n.chr : "\xC3" + (n-64).chr - else - c - end - end.join - end - end - - protected - - def translate_offset(byte_offset) #:nodoc: - return nil if byte_offset.nil? - return 0 if @wrapped_string == '' - chunk = @wrapped_string[0..byte_offset] - begin - begin - chunk.unpack('U*').length - 1 - rescue ArgumentError => e - chunk = @wrapped_string[0..(byte_offset+=1)] - # Stop retrying at the end of the string - raise e unless byte_offset < chunk.length - # We damaged a character, retry - retry - end - # Catch the ArgumentError so we can throw our own - rescue ArgumentError - raise EncodingError, 'malformed UTF-8 character' - end - end - - def justify(integer, way, padstr=' ') #:nodoc: - raise ArgumentError, "zero width padding" if padstr.length == 0 - padsize = integer - size - padsize = padsize > 0 ? padsize : 0 - case way - when :right - result = @wrapped_string.dup.insert(0, self.class.padding(padsize, padstr)) - when :left - result = @wrapped_string.dup.insert(-1, self.class.padding(padsize, padstr)) - when :center - lpad = self.class.padding((padsize / 2.0).floor, padstr) - rpad = self.class.padding((padsize / 2.0).ceil, padstr) - result = @wrapped_string.dup.insert(0, lpad).insert(-1, rpad) - end - chars(result) - end - - def apply_mapping(mapping) #:nodoc: - chars(self.class.u_unpack(@wrapped_string).map do |codepoint| - cp = UCD.codepoints[codepoint] - if cp and (ncp = cp.send(mapping)) and ncp > 0 - ncp - else - codepoint - end - end.pack('U*')) - end - - def chars(string) #:nodoc: - self.class.new(string) - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb b/vendor/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb deleted file mode 100644 index 62066e3c7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/multibyte/exceptions.rb +++ /dev/null @@ -1,8 +0,0 @@ -# encoding: utf-8 - -module ActiveSupport #:nodoc: - module Multibyte #:nodoc: - # Raised when a problem with the encoding was found. - class EncodingError < StandardError; end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb b/vendor/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb deleted file mode 100644 index 3b8cf8f9e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/multibyte/unicode_database.rb +++ /dev/null @@ -1,71 +0,0 @@ -# encoding: utf-8 - -module ActiveSupport #:nodoc: - module Multibyte #:nodoc: - # Holds data about a codepoint in the Unicode database - class Codepoint - attr_accessor :code, :combining_class, :decomp_type, :decomp_mapping, :uppercase_mapping, :lowercase_mapping - end - - # Holds static data from the Unicode database - class UnicodeDatabase - ATTRIBUTES = :codepoints, :composition_exclusion, :composition_map, :boundary, :cp1252 - - attr_writer(*ATTRIBUTES) - - def initialize - @codepoints = Hash.new(Codepoint.new) - @composition_exclusion = [] - @composition_map = {} - @boundary = {} - @cp1252 = {} - end - - # Lazy load the Unicode database so it's only loaded when it's actually used - ATTRIBUTES.each do |attr_name| - class_eval(<<-EOS, __FILE__, __LINE__) - def #{attr_name} - load - @#{attr_name} - end - EOS - end - - # Loads the Unicode database and returns all the internal objects of UnicodeDatabase. - def load - begin - @codepoints, @composition_exclusion, @composition_map, @boundary, @cp1252 = File.open(self.class.filename, 'rb') { |f| Marshal.load f.read } - rescue Exception => e - raise IOError.new("Couldn't load the Unicode tables for UTF8Handler (#{e.message}), ActiveSupport::Multibyte is unusable") - end - - # Redefine the === method so we can write shorter rules for grapheme cluster breaks - @boundary.each do |k,_| - @boundary[k].instance_eval do - def ===(other) - detect { |i| i === other } ? true : false - end - end if @boundary[k].kind_of?(Array) - end - - # define attr_reader methods for the instance variables - class << self - attr_reader(*ATTRIBUTES) - end - end - - # Returns the directory in which the data files are stored - def self.dirname - File.dirname(__FILE__) + '/../values/' - end - - # Returns the filename for the data file for this version - def self.filename - File.expand_path File.join(dirname, "unicode_tables.dat") - end - end - - # UniCode Database - UCD = UnicodeDatabase.new - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/option_merger.rb b/vendor/activesupport-2.2.2/lib/active_support/option_merger.rb deleted file mode 100644 index b563b093e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/option_merger.rb +++ /dev/null @@ -1,17 +0,0 @@ -module ActiveSupport - class OptionMerger #:nodoc: - instance_methods.each do |method| - undef_method(method) if method !~ /^(__|instance_eval|class|object_id)/ - end - - def initialize(context, options) - @context, @options = context, options - end - - private - def method_missing(method, *arguments, &block) - arguments << (arguments.last.respond_to?(:to_hash) ? @options.deep_merge(arguments.pop) : @options.dup) - @context.__send__(method, *arguments, &block) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/ordered_hash.rb b/vendor/activesupport-2.2.2/lib/active_support/ordered_hash.rb deleted file mode 100644 index 9757054e4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/ordered_hash.rb +++ /dev/null @@ -1,58 +0,0 @@ -# OrderedHash is namespaced to prevent conflicts with other implementations -module ActiveSupport - # Hash is ordered in Ruby 1.9! - if RUBY_VERSION >= '1.9' - OrderedHash = ::Hash - else - class OrderedHash < Array #:nodoc: - def []=(key, value) - if pair = assoc(key) - pair.pop - pair << value - else - self << [key, value] - end - value - end - - def [](key) - pair = assoc(key) - pair ? pair.last : nil - end - - def delete(key) - pair = assoc(key) - pair ? array_index = index(pair) : nil - array_index ? delete_at(array_index).last : nil - end - - def keys - collect { |key, value| key } - end - - def values - collect { |key, value| value } - end - - def to_hash - returning({}) do |hash| - each { |array| hash[array[0]] = array[1] } - end - end - - def has_key?(k) - !assoc(k).nil? - end - - alias_method :key?, :has_key? - alias_method :include?, :has_key? - alias_method :member?, :has_key? - - def has_value?(v) - any? { |key, value| value == v } - end - - alias_method :value?, :has_value? - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/ordered_options.rb b/vendor/activesupport-2.2.2/lib/active_support/ordered_options.rb deleted file mode 100644 index 642045186..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/ordered_options.rb +++ /dev/null @@ -1,19 +0,0 @@ -module ActiveSupport #:nodoc: - class OrderedOptions < OrderedHash #:nodoc: - def []=(key, value) - super(key.to_sym, value) - end - - def [](key) - super(key.to_sym) - end - - def method_missing(name, *args) - if name.to_s =~ /(.*)=$/ - self[$1.to_sym] = args.first - else - self[name] - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/rescuable.rb b/vendor/activesupport-2.2.2/lib/active_support/rescuable.rb deleted file mode 100644 index c27c4ddb1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/rescuable.rb +++ /dev/null @@ -1,108 +0,0 @@ -module ActiveSupport - # Rescuable module adds support for easier exception handling. - module Rescuable - def self.included(base) # :nodoc: - base.class_inheritable_accessor :rescue_handlers - base.rescue_handlers = [] - - base.extend(ClassMethods) - end - - module ClassMethods - # Rescue exceptions raised in controller actions. - # - # rescue_from receives a series of exception classes or class - # names, and a trailing :with option with the name of a method - # or a Proc object to be called to handle them. Alternatively a block can - # be given. - # - # Handlers that take one argument will be called with the exception, so - # that the exception can be inspected when dealing with it. - # - # Handlers are inherited. They are searched from right to left, from - # bottom to top, and up the hierarchy. The handler of the first class for - # which exception.is_a?(klass) holds true is the one invoked, if - # any. - # - # class ApplicationController < ActionController::Base - # rescue_from User::NotAuthorized, :with => :deny_access # self defined exception - # rescue_from ActiveRecord::RecordInvalid, :with => :show_errors - # - # rescue_from 'MyAppError::Base' do |exception| - # render :xml => exception, :status => 500 - # end - # - # protected - # def deny_access - # ... - # end - # - # def show_errors(exception) - # exception.record.new_record? ? ... - # end - # end - def rescue_from(*klasses, &block) - options = klasses.extract_options! - - unless options.has_key?(:with) - if block_given? - options[:with] = block - else - raise ArgumentError, "Need a handler. Supply an options hash that has a :with key as the last argument." - end - end - - klasses.each do |klass| - key = if klass.is_a?(Class) && klass <= Exception - klass.name - elsif klass.is_a?(String) - klass - else - raise ArgumentError, "#{klass} is neither an Exception nor a String" - end - - # put the new handler at the end because the list is read in reverse - rescue_handlers << [key, options[:with]] - end - end - end - - # Tries to rescue the exception by looking up and calling a registered handler. - def rescue_with_handler(exception) - if handler = handler_for_rescue(exception) - handler.arity != 0 ? handler.call(exception) : handler.call - true # don't rely on the return value of the handler - end - end - - def handler_for_rescue(exception) - # We go from right to left because pairs are pushed onto rescue_handlers - # as rescue_from declarations are found. - _, rescuer = Array(rescue_handlers).reverse.detect do |klass_name, handler| - # The purpose of allowing strings in rescue_from is to support the - # declaration of handler associations for exception classes whose - # definition is yet unknown. - # - # Since this loop needs the constants it would be inconsistent to - # assume they should exist at this point. An early raised exception - # could trigger some other handler and the array could include - # precisely a string whose corresponding constant has not yet been - # seen. This is why we are tolerant to unknown constants. - # - # Note that this tolerance only matters if the exception was given as - # a string, otherwise a NameError will be raised by the interpreter - # itself when rescue_from CONSTANT is executed. - klass = self.class.const_get(klass_name) rescue nil - klass ||= klass_name.constantize rescue nil - exception.is_a?(klass) if klass - end - - case rescuer - when Symbol - method(rescuer) - when Proc - rescuer.bind(self) - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/secure_random.rb b/vendor/activesupport-2.2.2/lib/active_support/secure_random.rb deleted file mode 100644 index 97971e883..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/secure_random.rb +++ /dev/null @@ -1,197 +0,0 @@ -begin - require 'openssl' -rescue LoadError -end - -begin - require 'securerandom' -rescue LoadError -end - -module ActiveSupport - if defined?(::SecureRandom) - # Use Ruby 1.9's SecureRandom library whenever possible. - SecureRandom = ::SecureRandom # :nodoc: - else - # = Secure random number generator interface. - # - # This library is an interface for secure random number generator which is - # suitable for generating session key in HTTP cookies, etc. - # - # It supports following secure random number generators. - # - # * openssl - # * /dev/urandom - # * Win32 - # - # *Note*: This module is based on the SecureRandom library from Ruby 1.9, - # revision 18786, August 23 2008. It's 100% interface-compatible with Ruby 1.9's - # SecureRandom library. - # - # == Example - # - # # random hexadecimal string. - # p SecureRandom.hex(10) #=> "52750b30ffbc7de3b362" - # p SecureRandom.hex(10) #=> "92b15d6c8dc4beb5f559" - # p SecureRandom.hex(11) #=> "6aca1b5c58e4863e6b81b8" - # p SecureRandom.hex(12) #=> "94b2fff3e7fd9b9c391a2306" - # p SecureRandom.hex(13) #=> "39b290146bea6ce975c37cfc23" - # ... - # - # # random base64 string. - # p SecureRandom.base64(10) #=> "EcmTPZwWRAozdA==" - # p SecureRandom.base64(10) #=> "9b0nsevdwNuM/w==" - # p SecureRandom.base64(10) #=> "KO1nIU+p9DKxGg==" - # p SecureRandom.base64(11) #=> "l7XEiFja+8EKEtY=" - # p SecureRandom.base64(12) #=> "7kJSM/MzBJI+75j8" - # p SecureRandom.base64(13) #=> "vKLJ0tXBHqQOuIcSIg==" - # ... - # - # # random binary string. - # p SecureRandom.random_bytes(10) #=> "\016\t{\370g\310pbr\301" - # p SecureRandom.random_bytes(10) #=> "\323U\030TO\234\357\020\a\337" - # ... - module SecureRandom - # SecureRandom.random_bytes generates a random binary string. - # - # The argument n specifies the length of the result string. - # - # If n is not specified, 16 is assumed. - # It may be larger in future. - # - # If secure random number generator is not available, - # NotImplementedError is raised. - def self.random_bytes(n=nil) - n ||= 16 - - if defined? OpenSSL::Random - return OpenSSL::Random.random_bytes(n) - end - - if !defined?(@has_urandom) || @has_urandom - flags = File::RDONLY - flags |= File::NONBLOCK if defined? File::NONBLOCK - flags |= File::NOCTTY if defined? File::NOCTTY - flags |= File::NOFOLLOW if defined? File::NOFOLLOW - begin - File.open("/dev/urandom", flags) {|f| - unless f.stat.chardev? - raise Errno::ENOENT - end - @has_urandom = true - ret = f.readpartial(n) - if ret.length != n - raise NotImplementedError, "Unexpected partial read from random device" - end - return ret - } - rescue Errno::ENOENT - @has_urandom = false - end - end - - if !defined?(@has_win32) - begin - require 'Win32API' - - crypt_acquire_context = Win32API.new("advapi32", "CryptAcquireContext", 'PPPII', 'L') - @crypt_gen_random = Win32API.new("advapi32", "CryptGenRandom", 'LIP', 'L') - - hProvStr = " " * 4 - prov_rsa_full = 1 - crypt_verifycontext = 0xF0000000 - - if crypt_acquire_context.call(hProvStr, nil, nil, prov_rsa_full, crypt_verifycontext) == 0 - raise SystemCallError, "CryptAcquireContext failed: #{lastWin32ErrorMessage}" - end - @hProv, = hProvStr.unpack('L') - - @has_win32 = true - rescue LoadError - @has_win32 = false - end - end - if @has_win32 - bytes = " " * n - if @crypt_gen_random.call(@hProv, bytes.size, bytes) == 0 - raise SystemCallError, "CryptGenRandom failed: #{lastWin32ErrorMessage}" - end - return bytes - end - - raise NotImplementedError, "No random device" - end - - # SecureRandom.hex generates a random hex string. - # - # The argument n specifies the length of the random length. - # The length of the result string is twice of n. - # - # If n is not specified, 16 is assumed. - # It may be larger in future. - # - # If secure random number generator is not available, - # NotImplementedError is raised. - def self.hex(n=nil) - random_bytes(n).unpack("H*")[0] - end - - # SecureRandom.base64 generates a random base64 string. - # - # The argument n specifies the length of the random length. - # The length of the result string is about 4/3 of n. - # - # If n is not specified, 16 is assumed. - # It may be larger in future. - # - # If secure random number generator is not available, - # NotImplementedError is raised. - def self.base64(n=nil) - [random_bytes(n)].pack("m*").delete("\n") - end - - # SecureRandom.random_number generates a random number. - # - # If an positive integer is given as n, - # SecureRandom.random_number returns an integer: - # 0 <= SecureRandom.random_number(n) < n. - # - # If 0 is given or an argument is not given, - # SecureRandom.random_number returns an float: - # 0.0 <= SecureRandom.random_number() < 1.0. - def self.random_number(n=0) - if 0 < n - hex = n.to_s(16) - hex = '0' + hex if (hex.length & 1) == 1 - bin = [hex].pack("H*") - mask = bin[0] - mask |= mask >> 1 - mask |= mask >> 2 - mask |= mask >> 4 - begin - rnd = SecureRandom.random_bytes(bin.length) - rnd[0] = rnd[0] & mask - end until rnd < bin - rnd.unpack("H*")[0].hex - else - # assumption: Float::MANT_DIG <= 64 - i64 = SecureRandom.random_bytes(8).unpack("Q")[0] - Math.ldexp(i64 >> (64-Float::MANT_DIG), -Float::MANT_DIG) - end - end - - # Following code is based on David Garamond's GUID library for Ruby. - def self.lastWin32ErrorMessage # :nodoc: - get_last_error = Win32API.new("kernel32", "GetLastError", '', 'L') - format_message = Win32API.new("kernel32", "FormatMessageA", 'LPLLPLPPPPPPPP', 'L') - format_message_ignore_inserts = 0x00000200 - format_message_from_system = 0x00001000 - - code = get_last_error.call - msg = "\0" * 1024 - len = format_message.call(format_message_ignore_inserts + format_message_from_system, 0, code, 0, msg, 1024, nil, nil, nil, nil, nil, nil, nil, nil) - msg[0, len].tr("\r", '').chomp - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/string_inquirer.rb b/vendor/activesupport-2.2.2/lib/active_support/string_inquirer.rb deleted file mode 100644 index e6b1f3922..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/string_inquirer.rb +++ /dev/null @@ -1,21 +0,0 @@ -module ActiveSupport - # Wrapping a string in this class gives you a prettier way to test - # for equality. The value returned by Rails.env is wrapped - # in a StringInquirer object so instead of calling this: - # - # Rails.env == "production" - # - # you can call this: - # - # Rails.env.production? - # - class StringInquirer < String - def method_missing(method_name, *arguments) - if method_name.to_s[-1,1] == "?" - self == method_name.to_s[0..-2] - else - super - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/test_case.rb b/vendor/activesupport-2.2.2/lib/active_support/test_case.rb deleted file mode 100644 index 197e73b3e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/test_case.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'test/unit/testcase' -require 'active_support/testing/default' -require 'active_support/testing/core_ext/test' - - -module ActiveSupport - class TestCase < Test::Unit::TestCase - # test "verify something" do - # ... - # end - def self.test(name, &block) - test_name = "test_#{name.gsub(/\s+/,'_')}".to_sym - defined = instance_method(test_name) rescue false - raise "#{test_name} is already defined in #{self}" if defined - if block_given? - define_method(test_name, &block) - else - define_method(test_name) do - flunk "No implementation provided for #{name}" - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb b/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb deleted file mode 100644 index d3f38f0bc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test.rb +++ /dev/null @@ -1,6 +0,0 @@ -require 'active_support/testing/core_ext/test/unit/assertions' -require 'active_support/testing/setup_and_teardown' - -class Test::Unit::TestCase #:nodoc: - include ActiveSupport::Testing::SetupAndTeardown -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb b/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb deleted file mode 100644 index e5853bf82..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/testing/core_ext/test/unit/assertions.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'test/unit/assertions' -module Test - module Unit - #-- - # FIXME: no Proc#binding in Ruby 2, must change this API - #++ - module Assertions - # Test numeric difference between the return value of an expression as a result of what is evaluated - # in the yielded block. - # - # assert_difference 'Article.count' do - # post :create, :article => {...} - # end - # - # An arbitrary expression is passed in and evaluated. - # - # assert_difference 'assigns(:article).comments(:reload).size' do - # post :create, :comment => {...} - # end - # - # An arbitrary positive or negative difference can be specified. The default is +1. - # - # assert_difference 'Article.count', -1 do - # post :delete, :id => ... - # end - # - # An array of expressions can also be passed in and evaluated. - # - # assert_difference [ 'Article.count', 'Post.count' ], +2 do - # post :create, :article => {...} - # end - # - # A error message can be specified. - # - # assert_difference 'Article.count', -1, "An Article should be destroyed" do - # post :delete, :id => ... - # end - def assert_difference(expressions, difference = 1, message = nil, &block) - expression_evaluations = Array(expressions).map do |expression| - [expression, lambda do - eval(expression, block.__send__(:binding)) - end] - end - - original_values = expression_evaluations.inject([]) { |memo, expression| memo << expression[1].call } - yield - expression_evaluations.each_with_index do |expression, i| - full_message = "" - full_message << "#{message}.\n" if message - full_message << "<#{expression[0]}> was the expression that failed" - assert_equal original_values[i] + difference, expression[1].call, full_message - end - end - - # Assertion that the numeric result of evaluating an expression is not changed before and after - # invoking the passed in block. - # - # assert_no_difference 'Article.count' do - # post :create, :article => invalid_attributes - # end - # - # A error message can be specified. - # - # assert_no_difference 'Article.count', "An Article should not be destroyed" do - # post :create, :article => invalid_attributes - # end - def assert_no_difference(expressions, message = nil, &block) - assert_difference expressions, 0, message, &block - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/testing/default.rb b/vendor/activesupport-2.2.2/lib/active_support/testing/default.rb deleted file mode 100644 index a0bd6303c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/testing/default.rb +++ /dev/null @@ -1,9 +0,0 @@ -module ActiveSupport - module Testing - module Default #:nodoc: - # Placeholder so test/unit ignores test cases without any tests. - def default_test - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/testing/performance.rb b/vendor/activesupport-2.2.2/lib/active_support/testing/performance.rb deleted file mode 100644 index bd136c259..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/testing/performance.rb +++ /dev/null @@ -1,452 +0,0 @@ -require 'rubygems' -gem 'ruby-prof', '>= 0.6.1' -require 'ruby-prof' - -require 'fileutils' -require 'rails/version' - -module ActiveSupport - module Testing - module Performance - DEFAULTS = - if benchmark = ARGV.include?('--benchmark') # HAX for rake test - { :benchmark => true, - :runs => 4, - :metrics => [:process_time, :memory, :objects, :gc_runs, :gc_time], - :output => 'tmp/performance' } - else - { :benchmark => false, - :runs => 1, - :min_percent => 0.01, - :metrics => [:process_time, :memory, :objects], - :formats => [:flat, :graph_html, :call_tree], - :output => 'tmp/performance' } - end.freeze - - def self.included(base) - base.superclass_delegating_accessor :profile_options - base.profile_options = DEFAULTS - end - - def full_test_name - "#{self.class.name}##{method_name}" - end - - def run(result) - return if method_name =~ /^default_test$/ - - yield(self.class::STARTED, name) - @_result = result - - run_warmup - if profile_options && metrics = profile_options[:metrics] - metrics.each do |metric_name| - if klass = Metrics[metric_name.to_sym] - run_profile(klass.new) - result.add_run - end - end - end - - yield(self.class::FINISHED, name) - end - - def run_test(metric, mode) - run_callbacks :setup - setup - metric.send(mode) { __send__ @method_name } - rescue ::Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue StandardError, ScriptError - add_error($!) - ensure - begin - teardown - run_callbacks :teardown, :enumerator => :reverse_each - rescue ::Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue StandardError, ScriptError - add_error($!) - end - end - - protected - def run_warmup - GC.start - - time = Metrics::Time.new - run_test(time, :benchmark) - puts "%s (%s warmup)" % [full_test_name, time.format(time.total)] - - GC.start - end - - def run_profile(metric) - klass = profile_options[:benchmark] ? Benchmarker : Profiler - performer = klass.new(self, metric) - - performer.run - puts performer.report - performer.record - end - - class Performer - delegate :run_test, :profile_options, :full_test_name, :to => :@harness - - def initialize(harness, metric) - @harness, @metric = harness, metric - end - - def report - rate = @total / profile_options[:runs] - '%20s: %s' % [@metric.name, @metric.format(rate)] - end - - protected - def output_filename - "#{profile_options[:output]}/#{full_test_name}_#{@metric.name}" - end - end - - class Benchmarker < Performer - def run - profile_options[:runs].to_i.times { run_test(@metric, :benchmark) } - @total = @metric.total - end - - def record - avg = @metric.total / profile_options[:runs].to_i - now = Time.now.utc.xmlschema - with_output_file do |file| - file.puts "#{avg},#{now},#{environment}" - end - end - - def environment - unless defined? @env - app = "#{$1}.#{$2}" if File.directory?('.git') && `git branch -v` =~ /^\* (\S+)\s+(\S+)/ - - rails = Rails::VERSION::STRING - if File.directory?('vendor/rails/.git') - Dir.chdir('vendor/rails') do - rails += ".#{$1}.#{$2}" if `git branch -v` =~ /^\* (\S+)\s+(\S+)/ - end - end - - ruby = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby' - ruby += "-#{RUBY_VERSION}.#{RUBY_PATCHLEVEL}" - - @env = [app, rails, ruby, RUBY_PLATFORM] * ',' - end - - @env - end - - protected - HEADER = 'measurement,created_at,app,rails,ruby,platform' - - def with_output_file - fname = output_filename - - if new = !File.exist?(fname) - FileUtils.mkdir_p(File.dirname(fname)) - end - - File.open(fname, 'ab') do |file| - file.puts(HEADER) if new - yield file - end - end - - def output_filename - "#{super}.csv" - end - end - - class Profiler < Performer - def initialize(*args) - super - @supported = @metric.measure_mode rescue false - end - - def run - return unless @supported - - RubyProf.measure_mode = @metric.measure_mode - RubyProf.start - RubyProf.pause - profile_options[:runs].to_i.times { run_test(@metric, :profile) } - @data = RubyProf.stop - @total = @data.threads.values.sum(0) { |method_infos| method_infos.sort.last.total_time } - end - - def report - if @supported - super - else - '%20s: unsupported' % @metric.name - end - end - - def record - return unless @supported - - klasses = profile_options[:formats].map { |f| RubyProf.const_get("#{f.to_s.camelize}Printer") }.compact - - klasses.each do |klass| - fname = output_filename(klass) - FileUtils.mkdir_p(File.dirname(fname)) - File.open(fname, 'wb') do |file| - klass.new(@data).print(file, profile_options.slice(:min_percent)) - end - end - end - - protected - def output_filename(printer_class) - suffix = - case printer_class.name.demodulize - when 'FlatPrinter'; 'flat.txt' - when 'GraphPrinter'; 'graph.txt' - when 'GraphHtmlPrinter'; 'graph.html' - when 'CallTreePrinter'; 'tree.txt' - else printer_class.name.sub(/Printer$/, '').underscore - end - - "#{super()}_#{suffix}" - end - end - - module Metrics - def self.[](name) - const_get(name.to_s.camelize) - rescue NameError - nil - end - - class Base - attr_reader :total - - def initialize - @total = 0 - end - - def name - @name ||= self.class.name.demodulize.underscore - end - - def measure_mode - self.class::Mode - end - - def measure - 0 - end - - def benchmark - with_gc_stats do - before = measure - yield - @total += (measure - before) - end - end - - def profile - RubyProf.resume - yield - ensure - RubyProf.pause - end - - protected - if GC.respond_to?(:enable_stats) - def with_gc_stats - GC.enable_stats - yield - ensure - GC.disable_stats - end - elsif defined?(GC::Profiler) - def with_gc_stats - GC.start - GC.disable - GC::Profiler.enable - yield - ensure - GC::Profiler.disable - GC.enable - end - else - def with_gc_stats - yield - end - end - end - - class Time < Base - def measure - ::Time.now.to_f - end - - def format(measurement) - if measurement < 2 - '%d ms' % (measurement * 1000) - else - '%.2f sec' % measurement - end - end - end - - class ProcessTime < Time - Mode = RubyProf::PROCESS_TIME - - def measure - RubyProf.measure_process_time - end - end - - class WallTime < Time - Mode = RubyProf::WALL_TIME - - def measure - RubyProf.measure_wall_time - end - end - - class CpuTime < Time - Mode = RubyProf::CPU_TIME if RubyProf.const_defined?(:CPU_TIME) - - def initialize(*args) - # FIXME: yeah my CPU is 2.33 GHz - RubyProf.cpu_frequency = 2.33e9 - super - end - - def measure - RubyProf.measure_cpu_time - end - end - - class Memory < Base - Mode = RubyProf::MEMORY if RubyProf.const_defined?(:MEMORY) - - # ruby-prof wrapper - if RubyProf.respond_to?(:measure_memory) - def measure - RubyProf.measure_memory / 1024.0 - end - - # Ruby 1.8 + railsbench patch - elsif GC.respond_to?(:allocated_size) - def measure - GC.allocated_size / 1024.0 - end - - # Ruby 1.8 + lloyd patch - elsif GC.respond_to?(:heap_info) - def measure - GC.heap_info['heap_current_memory'] / 1024.0 - end - - # Ruby 1.9 with total_malloc_allocated_size patch - elsif GC.respond_to?(:malloc_total_allocated_size) - def measure - GC.total_malloc_allocated_size / 1024.0 - end - - # Ruby 1.9 unpatched - elsif GC.respond_to?(:malloc_allocated_size) - def measure - GC.malloc_allocated_size / 1024.0 - end - - # Ruby 1.9 + GC profiler patch - elsif defined?(GC::Profiler) - def measure - GC.enable - GC.start - kb = GC::Profiler.data.last[:HEAP_USE_SIZE] / 1024.0 - GC.disable - kb - end - end - - def format(measurement) - '%.2f KB' % measurement - end - end - - class Objects < Base - Mode = RubyProf::ALLOCATIONS if RubyProf.const_defined?(:ALLOCATIONS) - - if RubyProf.respond_to?(:measure_allocations) - def measure - RubyProf.measure_allocations - end - - # Ruby 1.8 + railsbench patch - elsif ObjectSpace.respond_to?(:allocated_objects) - def measure - ObjectSpace.allocated_objects - end - - # Ruby 1.9 + GC profiler patch - elsif defined?(GC::Profiler) - def measure - GC.enable - GC.start - last = GC::Profiler.data.last - count = last[:HEAP_LIVE_OBJECTS] + last[:HEAP_FREE_OBJECTS] - GC.disable - count - end - end - - def format(measurement) - measurement.to_i.to_s - end - end - - class GcRuns < Base - Mode = RubyProf::GC_RUNS if RubyProf.const_defined?(:GC_RUNS) - - if RubyProf.respond_to?(:measure_gc_runs) - def measure - RubyProf.measure_gc_runs - end - elsif GC.respond_to?(:collections) - def measure - GC.collections - end - elsif GC.respond_to?(:heap_info) - def measure - GC.heap_info['num_gc_passes'] - end - end - - def format(measurement) - measurement.to_i.to_s - end - end - - class GcTime < Base - Mode = RubyProf::GC_TIME if RubyProf.const_defined?(:GC_TIME) - - if RubyProf.respond_to?(:measure_gc_time) - def measure - RubyProf.measure_gc_time - end - elsif GC.respond_to?(:time) - def measure - GC.time - end - end - - def format(measurement) - '%d ms' % (measurement / 1000) - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb b/vendor/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb deleted file mode 100644 index a514b61fe..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/testing/setup_and_teardown.rb +++ /dev/null @@ -1,120 +0,0 @@ -module ActiveSupport - module Testing - module SetupAndTeardown - # For compatibility with Ruby < 1.8.6 - PASSTHROUGH_EXCEPTIONS = - if defined?(Test::Unit::TestCase::PASSTHROUGH_EXCEPTIONS) - Test::Unit::TestCase::PASSTHROUGH_EXCEPTIONS - else - [NoMemoryError, SignalException, Interrupt, SystemExit] - end - - def self.included(base) - base.class_eval do - include ActiveSupport::Callbacks - define_callbacks :setup, :teardown - - if defined?(::Mini) - undef_method :run - alias_method :run, :run_with_callbacks_and_miniunit - else - begin - require 'mocha' - undef_method :run - alias_method :run, :run_with_callbacks_and_mocha - rescue LoadError - undef_method :run - alias_method :run, :run_with_callbacks_and_testunit - end - end - end - end - - def run_with_callbacks_and_miniunit(runner) - result = '.' - begin - run_callbacks :setup - result = super - rescue Exception => e - result = runner.puke(self.class, self.name, e) - ensure - begin - teardown - run_callbacks :teardown, :enumerator => :reverse_each - rescue Exception => e - result = runner.puke(self.class, self.name, e) - end - end - result - end - - # This redefinition is unfortunate but test/unit shows us no alternative. - def run_with_callbacks_and_testunit(result) #:nodoc: - return if @method_name.to_s == "default_test" - - yield(Test::Unit::TestCase::STARTED, name) - @_result = result - begin - run_callbacks :setup - setup - __send__(@method_name) - rescue Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue *PASSTHROUGH_EXCEPTIONS - raise - rescue Exception - add_error($!) - ensure - begin - teardown - run_callbacks :teardown, :enumerator => :reverse_each - rescue Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue *PASSTHROUGH_EXCEPTIONS - raise - rescue Exception - add_error($!) - end - end - result.add_run - yield(Test::Unit::TestCase::FINISHED, name) - end - - # Doubly unfortunate: mocha does the same so we have to hax their hax. - def run_with_callbacks_and_mocha(result) - return if @method_name.to_s == "default_test" - - yield(Test::Unit::TestCase::STARTED, name) - @_result = result - begin - mocha_setup - begin - run_callbacks :setup - setup - __send__(@method_name) - mocha_verify { add_assertion } - rescue Mocha::ExpectationError => e - add_failure(e.message, e.backtrace) - rescue Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue StandardError, ScriptError - add_error($!) - ensure - begin - teardown - run_callbacks :teardown, :enumerator => :reverse_each - rescue Test::Unit::AssertionFailedError => e - add_failure(e.message, e.backtrace) - rescue StandardError, ScriptError - add_error($!) - end - end - ensure - mocha_teardown - end - result.add_run - yield(Test::Unit::TestCase::FINISHED, name) - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/time_with_zone.rb b/vendor/activesupport-2.2.2/lib/active_support/time_with_zone.rb deleted file mode 100644 index a02cd81f7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/time_with_zone.rb +++ /dev/null @@ -1,328 +0,0 @@ -require 'tzinfo' -module ActiveSupport - # A Time-like class that can represent a time in any time zone. Necessary because standard Ruby Time instances are - # limited to UTC and the system's ENV['TZ'] zone. - # - # You shouldn't ever need to create a TimeWithZone instance directly via new -- instead, Rails provides the methods - # +local+, +parse+, +at+ and +now+ on TimeZone instances, and +in_time_zone+ on Time and DateTime instances, for a more - # user-friendly syntax. Examples: - # - # Time.zone = 'Eastern Time (US & Canada)' # => 'Eastern Time (US & Canada)' - # Time.zone.local(2007, 2, 10, 15, 30, 45) # => Sat, 10 Feb 2007 15:30:45 EST -05:00 - # Time.zone.parse('2007-02-01 15:30:45') # => Sat, 10 Feb 2007 15:30:45 EST -05:00 - # Time.zone.at(1170361845) # => Sat, 10 Feb 2007 15:30:45 EST -05:00 - # Time.zone.now # => Sun, 18 May 2008 13:07:55 EDT -04:00 - # Time.utc(2007, 2, 10, 20, 30, 45).in_time_zone # => Sat, 10 Feb 2007 15:30:45 EST -05:00 - # - # See TimeZone and ActiveSupport::CoreExtensions::Time::Zones for further documentation for these methods. - # - # TimeWithZone instances implement the same API as Ruby Time instances, so that Time and TimeWithZone instances are interchangable. Examples: - # - # t = Time.zone.now # => Sun, 18 May 2008 13:27:25 EDT -04:00 - # t.hour # => 13 - # t.dst? # => true - # t.utc_offset # => -14400 - # t.zone # => "EDT" - # t.to_s(:rfc822) # => "Sun, 18 May 2008 13:27:25 -0400" - # t + 1.day # => Mon, 19 May 2008 13:27:25 EDT -04:00 - # t.beginning_of_year # => Tue, 01 Jan 2008 00:00:00 EST -05:00 - # t > Time.utc(1999) # => true - # t.is_a?(Time) # => true - # t.is_a?(ActiveSupport::TimeWithZone) # => true - class TimeWithZone - include Comparable - attr_reader :time_zone - - def initialize(utc_time, time_zone, local_time = nil, period = nil) - @utc, @time_zone, @time = utc_time, time_zone, local_time - @period = @utc ? period : get_period_and_ensure_valid_local_time - end - - # Returns a Time or DateTime instance that represents the time in +time_zone+. - def time - @time ||= period.to_local(@utc) - end - - # Returns a Time or DateTime instance that represents the time in UTC. - def utc - @utc ||= period.to_utc(@time) - end - alias_method :comparable_time, :utc - alias_method :getgm, :utc - alias_method :getutc, :utc - alias_method :gmtime, :utc - - # Returns the underlying TZInfo::TimezonePeriod. - def period - @period ||= time_zone.period_for_utc(@utc) - end - - # Returns the simultaneous time in Time.zone, or the specified zone. - def in_time_zone(new_zone = ::Time.zone) - return self if time_zone == new_zone - utc.in_time_zone(new_zone) - end - - # Returns a Time.local() instance of the simultaneous time in your system's ENV['TZ'] zone - def localtime - utc.getlocal - end - alias_method :getlocal, :localtime - - def dst? - period.dst? - end - alias_method :isdst, :dst? - - def utc? - time_zone.name == 'UTC' - end - alias_method :gmt?, :utc? - - def utc_offset - period.utc_total_offset - end - alias_method :gmt_offset, :utc_offset - alias_method :gmtoff, :utc_offset - - def formatted_offset(colon = true, alternate_utc_string = nil) - utc? && alternate_utc_string || utc_offset.to_utc_offset_s(colon) - end - - # Time uses +zone+ to display the time zone abbreviation, so we're duck-typing it. - def zone - period.zone_identifier.to_s - end - - def inspect - "#{time.strftime('%a, %d %b %Y %H:%M:%S')} #{zone} #{formatted_offset}" - end - - def xmlschema - "#{time.strftime("%Y-%m-%dT%H:%M:%S")}#{formatted_offset(true, 'Z')}" - end - alias_method :iso8601, :xmlschema - - # Returns a JSON string representing the TimeWithZone. If ActiveSupport.use_standard_json_time_format is set to - # true, the ISO 8601 format is used. - # - # ==== Examples: - # - # # With ActiveSupport.use_standard_json_time_format = true - # Time.utc(2005,2,1,15,15,10).in_time_zone.to_json - # # => "2005-02-01T15:15:10Z" - # - # # With ActiveSupport.use_standard_json_time_format = false - # Time.utc(2005,2,1,15,15,10).in_time_zone.to_json - # # => "2005/02/01 15:15:10 +0000" - def to_json(options = nil) - if ActiveSupport.use_standard_json_time_format - xmlschema.inspect - else - %("#{time.strftime("%Y/%m/%d %H:%M:%S")} #{formatted_offset(false)}") - end - end - - def to_yaml(options = {}) - if options.kind_of?(YAML::Emitter) - utc.to_yaml(options) - else - time.to_yaml(options).gsub('Z', formatted_offset(true, 'Z')) - end - end - - def httpdate - utc.httpdate - end - - def rfc2822 - to_s(:rfc822) - end - alias_method :rfc822, :rfc2822 - - # :db format outputs time in UTC; all others output time in local. - # Uses TimeWithZone's +strftime+, so %Z and %z work correctly. - def to_s(format = :default) - return utc.to_s(format) if format == :db - if formatter = ::Time::DATE_FORMATS[format] - formatter.respond_to?(:call) ? formatter.call(self).to_s : strftime(formatter) - else - "#{time.strftime("%Y-%m-%d %H:%M:%S")} #{formatted_offset(false, 'UTC')}" # mimicking Ruby 1.9 Time#to_s format - end - end - - # Replaces %Z and %z directives with +zone+ and +formatted_offset+, respectively, before passing to - # Time#strftime, so that zone information is correct - def strftime(format) - format = format.gsub('%Z', zone).gsub('%z', formatted_offset(false)) - time.strftime(format) - end - - # Use the time in UTC for comparisons. - def <=>(other) - utc <=> other - end - - def between?(min, max) - utc.between?(min, max) - end - - def past? - utc.past? - end - - def today? - time.today? - end - - def future? - utc.future? - end - - def eql?(other) - utc == other - end - - def +(other) - # If we're adding a Duration of variable length (i.e., years, months, days), move forward from #time, - # otherwise move forward from #utc, for accuracy when moving across DST boundaries - if duration_of_variable_length?(other) - method_missing(:+, other) - else - result = utc.acts_like?(:date) ? utc.since(other) : utc + other rescue utc.since(other) - result.in_time_zone(time_zone) - end - end - - def -(other) - # If we're subtracting a Duration of variable length (i.e., years, months, days), move backwards from #time, - # otherwise move backwards #utc, for accuracy when moving across DST boundaries - if other.acts_like?(:time) - utc - other - elsif duration_of_variable_length?(other) - method_missing(:-, other) - else - result = utc.acts_like?(:date) ? utc.ago(other) : utc - other rescue utc.ago(other) - result.in_time_zone(time_zone) - end - end - - def since(other) - # If we're adding a Duration of variable length (i.e., years, months, days), move forward from #time, - # otherwise move forward from #utc, for accuracy when moving across DST boundaries - if duration_of_variable_length?(other) - method_missing(:since, other) - else - utc.since(other).in_time_zone(time_zone) - end - end - - def ago(other) - since(-other) - end - - def advance(options) - # If we're advancing a value of variable length (i.e., years, weeks, months, days), advance from #time, - # otherwise advance from #utc, for accuracy when moving across DST boundaries - if options.detect {|k,v| [:years, :weeks, :months, :days].include? k} - method_missing(:advance, options) - else - utc.advance(options).in_time_zone(time_zone) - end - end - - %w(year mon month day mday wday yday hour min sec to_date).each do |method_name| - class_eval <<-EOV - def #{method_name} - time.#{method_name} - end - EOV - end - - def usec - time.respond_to?(:usec) ? time.usec : 0 - end - - def to_a - [time.sec, time.min, time.hour, time.day, time.mon, time.year, time.wday, time.yday, dst?, zone] - end - - def to_f - utc.to_f - end - - def to_i - utc.to_i - end - alias_method :hash, :to_i - alias_method :tv_sec, :to_i - - # A TimeWithZone acts like a Time, so just return +self+. - def to_time - self - end - - def to_datetime - utc.to_datetime.new_offset(Rational(utc_offset, 86_400)) - end - - # So that +self+ acts_like?(:time). - def acts_like_time? - true - end - - # Say we're a Time to thwart type checking. - def is_a?(klass) - klass == ::Time || super - end - alias_method :kind_of?, :is_a? - - def freeze - period; utc; time # preload instance variables before freezing - super - end - - def marshal_dump - [utc, time_zone.name, time] - end - - def marshal_load(variables) - initialize(variables[0].utc, ::Time.__send__(:get_zone, variables[1]), variables[2].utc) - end - - # Ensure proxy class responds to all methods that underlying time instance responds to. - def respond_to?(sym, include_priv = false) - # consistently respond false to acts_like?(:date), regardless of whether #time is a Time or DateTime - return false if sym.to_s == 'acts_like_date?' - super || time.respond_to?(sym, include_priv) - end - - # Send the missing method to +time+ instance, and wrap result in a new TimeWithZone with the existing +time_zone+. - def method_missing(sym, *args, &block) - result = time.__send__(sym, *args, &block) - result.acts_like?(:time) ? self.class.new(nil, time_zone, result) : result - end - - private - def get_period_and_ensure_valid_local_time - # we don't want a Time.local instance enforcing its own DST rules as well, - # so transfer time values to a utc constructor if necessary - @time = transfer_time_values_to_utc_constructor(@time) unless @time.utc? - begin - @time_zone.period_for_local(@time) - rescue ::TZInfo::PeriodNotFound - # time is in the "spring forward" hour gap, so we're moving the time forward one hour and trying again - @time += 1.hour - retry - end - end - - def transfer_time_values_to_utc_constructor(time) - ::Time.utc_time(time.year, time.month, time.day, time.hour, time.min, time.sec, time.respond_to?(:usec) ? time.usec : 0) - end - - def duration_of_variable_length?(obj) - ActiveSupport::Duration === obj && obj.parts.flatten.detect {|p| [:years, :months, :days].include? p } - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/values/time_zone.rb b/vendor/activesupport-2.2.2/lib/active_support/values/time_zone.rb deleted file mode 100644 index 1d87fa64b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/values/time_zone.rb +++ /dev/null @@ -1,403 +0,0 @@ -# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following: -# -# * Limit the set of zones provided by TZInfo to a meaningful subset of 142 zones. -# * Retrieve and display zones with a friendlier name (e.g., "Eastern Time (US & Canada)" instead of "America/New_York"). -# * Lazily load TZInfo::Timezone instances only when they're needed. -# * Create ActiveSupport::TimeWithZone instances via TimeZone's +local+, +parse+, +at+ and +now+ methods. -# -# If you set config.time_zone in the Rails Initializer, you can access this TimeZone object via Time.zone: -# -# # environment.rb: -# Rails::Initializer.run do |config| -# config.time_zone = "Eastern Time (US & Canada)" -# end -# -# Time.zone # => # -# Time.zone.name # => "Eastern Time (US & Canada)" -# Time.zone.now # => Sun, 18 May 2008 14:30:44 EDT -04:00 -# -# The version of TZInfo bundled with Active Support only includes the definitions necessary to support the zones -# defined by the TimeZone class. If you need to use zones that aren't defined by TimeZone, you'll need to install the TZInfo gem -# (if a recent version of the gem is installed locally, this will be used instead of the bundled version.) -module ActiveSupport - class TimeZone - unless const_defined?(:MAPPING) - # Keys are Rails TimeZone names, values are TZInfo identifiers - MAPPING = { - "International Date Line West" => "Pacific/Midway", - "Midway Island" => "Pacific/Midway", - "Samoa" => "Pacific/Pago_Pago", - "Hawaii" => "Pacific/Honolulu", - "Alaska" => "America/Juneau", - "Pacific Time (US & Canada)" => "America/Los_Angeles", - "Tijuana" => "America/Tijuana", - "Mountain Time (US & Canada)" => "America/Denver", - "Arizona" => "America/Phoenix", - "Chihuahua" => "America/Chihuahua", - "Mazatlan" => "America/Mazatlan", - "Central Time (US & Canada)" => "America/Chicago", - "Saskatchewan" => "America/Regina", - "Guadalajara" => "America/Mexico_City", - "Mexico City" => "America/Mexico_City", - "Monterrey" => "America/Monterrey", - "Central America" => "America/Guatemala", - "Eastern Time (US & Canada)" => "America/New_York", - "Indiana (East)" => "America/Indiana/Indianapolis", - "Bogota" => "America/Bogota", - "Lima" => "America/Lima", - "Quito" => "America/Lima", - "Atlantic Time (Canada)" => "America/Halifax", - "Caracas" => "America/Caracas", - "La Paz" => "America/La_Paz", - "Santiago" => "America/Santiago", - "Newfoundland" => "America/St_Johns", - "Brasilia" => "America/Sao_Paulo", - "Buenos Aires" => "America/Argentina/Buenos_Aires", - "Georgetown" => "America/Argentina/San_Juan", - "Greenland" => "America/Godthab", - "Mid-Atlantic" => "Atlantic/South_Georgia", - "Azores" => "Atlantic/Azores", - "Cape Verde Is." => "Atlantic/Cape_Verde", - "Dublin" => "Europe/Dublin", - "Edinburgh" => "Europe/Dublin", - "Lisbon" => "Europe/Lisbon", - "London" => "Europe/London", - "Casablanca" => "Africa/Casablanca", - "Monrovia" => "Africa/Monrovia", - "UTC" => "Etc/UTC", - "Belgrade" => "Europe/Belgrade", - "Bratislava" => "Europe/Bratislava", - "Budapest" => "Europe/Budapest", - "Ljubljana" => "Europe/Ljubljana", - "Prague" => "Europe/Prague", - "Sarajevo" => "Europe/Sarajevo", - "Skopje" => "Europe/Skopje", - "Warsaw" => "Europe/Warsaw", - "Zagreb" => "Europe/Zagreb", - "Brussels" => "Europe/Brussels", - "Copenhagen" => "Europe/Copenhagen", - "Madrid" => "Europe/Madrid", - "Paris" => "Europe/Paris", - "Amsterdam" => "Europe/Amsterdam", - "Berlin" => "Europe/Berlin", - "Bern" => "Europe/Berlin", - "Rome" => "Europe/Rome", - "Stockholm" => "Europe/Stockholm", - "Vienna" => "Europe/Vienna", - "West Central Africa" => "Africa/Algiers", - "Bucharest" => "Europe/Bucharest", - "Cairo" => "Africa/Cairo", - "Helsinki" => "Europe/Helsinki", - "Kyev" => "Europe/Kiev", - "Riga" => "Europe/Riga", - "Sofia" => "Europe/Sofia", - "Tallinn" => "Europe/Tallinn", - "Vilnius" => "Europe/Vilnius", - "Athens" => "Europe/Athens", - "Istanbul" => "Europe/Istanbul", - "Minsk" => "Europe/Minsk", - "Jerusalem" => "Asia/Jerusalem", - "Harare" => "Africa/Harare", - "Pretoria" => "Africa/Johannesburg", - "Moscow" => "Europe/Moscow", - "St. Petersburg" => "Europe/Moscow", - "Volgograd" => "Europe/Moscow", - "Kuwait" => "Asia/Kuwait", - "Riyadh" => "Asia/Riyadh", - "Nairobi" => "Africa/Nairobi", - "Baghdad" => "Asia/Baghdad", - "Tehran" => "Asia/Tehran", - "Abu Dhabi" => "Asia/Muscat", - "Muscat" => "Asia/Muscat", - "Baku" => "Asia/Baku", - "Tbilisi" => "Asia/Tbilisi", - "Yerevan" => "Asia/Yerevan", - "Kabul" => "Asia/Kabul", - "Ekaterinburg" => "Asia/Yekaterinburg", - "Islamabad" => "Asia/Karachi", - "Karachi" => "Asia/Karachi", - "Tashkent" => "Asia/Tashkent", - "Chennai" => "Asia/Kolkata", - "Kolkata" => "Asia/Kolkata", - "Mumbai" => "Asia/Kolkata", - "New Delhi" => "Asia/Kolkata", - "Kathmandu" => "Asia/Katmandu", - "Astana" => "Asia/Dhaka", - "Dhaka" => "Asia/Dhaka", - "Sri Jayawardenepura" => "Asia/Colombo", - "Almaty" => "Asia/Almaty", - "Novosibirsk" => "Asia/Novosibirsk", - "Rangoon" => "Asia/Rangoon", - "Bangkok" => "Asia/Bangkok", - "Hanoi" => "Asia/Bangkok", - "Jakarta" => "Asia/Jakarta", - "Krasnoyarsk" => "Asia/Krasnoyarsk", - "Beijing" => "Asia/Shanghai", - "Chongqing" => "Asia/Chongqing", - "Hong Kong" => "Asia/Hong_Kong", - "Urumqi" => "Asia/Urumqi", - "Kuala Lumpur" => "Asia/Kuala_Lumpur", - "Singapore" => "Asia/Singapore", - "Taipei" => "Asia/Taipei", - "Perth" => "Australia/Perth", - "Irkutsk" => "Asia/Irkutsk", - "Ulaan Bataar" => "Asia/Ulaanbaatar", - "Seoul" => "Asia/Seoul", - "Osaka" => "Asia/Tokyo", - "Sapporo" => "Asia/Tokyo", - "Tokyo" => "Asia/Tokyo", - "Yakutsk" => "Asia/Yakutsk", - "Darwin" => "Australia/Darwin", - "Adelaide" => "Australia/Adelaide", - "Canberra" => "Australia/Melbourne", - "Melbourne" => "Australia/Melbourne", - "Sydney" => "Australia/Sydney", - "Brisbane" => "Australia/Brisbane", - "Hobart" => "Australia/Hobart", - "Vladivostok" => "Asia/Vladivostok", - "Guam" => "Pacific/Guam", - "Port Moresby" => "Pacific/Port_Moresby", - "Magadan" => "Asia/Magadan", - "Solomon Is." => "Asia/Magadan", - "New Caledonia" => "Pacific/Noumea", - "Fiji" => "Pacific/Fiji", - "Kamchatka" => "Asia/Kamchatka", - "Marshall Is." => "Pacific/Majuro", - "Auckland" => "Pacific/Auckland", - "Wellington" => "Pacific/Auckland", - "Nuku'alofa" => "Pacific/Tongatapu" - }.each { |name, zone| name.freeze; zone.freeze } - MAPPING.freeze - end - - include Comparable - attr_reader :name - - # Create a new TimeZone object with the given name and offset. The - # offset is the number of seconds that this time zone is offset from UTC - # (GMT). Seconds were chosen as the offset unit because that is the unit that - # Ruby uses to represent time zone offsets (see Time#utc_offset). - def initialize(name, utc_offset, tzinfo = nil) - @name = name - @utc_offset = utc_offset - @tzinfo = tzinfo - end - - def utc_offset - @utc_offset ||= tzinfo.current_period.utc_offset - end - - # Returns the offset of this time zone as a formatted string, of the - # format "+HH:MM". - def formatted_offset(colon=true, alternate_utc_string = nil) - utc_offset == 0 && alternate_utc_string || utc_offset.to_utc_offset_s(colon) - end - - # Compare this time zone to the parameter. The two are comapred first on - # their offsets, and then by name. - def <=>(zone) - result = (utc_offset <=> zone.utc_offset) - result = (name <=> zone.name) if result == 0 - result - end - - # Compare #name and TZInfo identifier to a supplied regexp, returning true - # if a match is found. - def =~(re) - return true if name =~ re || MAPPING[name] =~ re - end - - # Returns a textual representation of this time zone. - def to_s - "(GMT#{formatted_offset}) #{name}" - end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone of +self+ from given values. Example: - # - # Time.zone = "Hawaii" # => "Hawaii" - # Time.zone.local(2007, 2, 1, 15, 30, 45) # => Thu, 01 Feb 2007 15:30:45 HST -10:00 - def local(*args) - time = Time.utc_time(*args) - ActiveSupport::TimeWithZone.new(nil, self, time) - end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone of +self+ from number of seconds since the Unix epoch. Example: - # - # Time.zone = "Hawaii" # => "Hawaii" - # Time.utc(2000).to_f # => 946684800.0 - # Time.zone.at(946684800.0) # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - def at(secs) - utc = Time.at(secs).utc rescue DateTime.civil(1970).since(secs) - utc.in_time_zone(self) - end - - # Method for creating new ActiveSupport::TimeWithZone instance in time zone of +self+ from parsed string. Example: - # - # Time.zone = "Hawaii" # => "Hawaii" - # Time.zone.parse('1999-12-31 14:00:00') # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # - # If upper components are missing from the string, they are supplied from TimeZone#now: - # - # Time.zone.now # => Fri, 31 Dec 1999 14:00:00 HST -10:00 - # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 - def parse(str, now=now) - date_parts = Date._parse(str) - return if date_parts.blank? - time = Time.parse(str, now) rescue DateTime.parse(str) - if date_parts[:offset].nil? - ActiveSupport::TimeWithZone.new(nil, self, time) - else - time.in_time_zone(self) - end - end - - # Returns an ActiveSupport::TimeWithZone instance representing the current time - # in the time zone represented by +self+. Example: - # - # Time.zone = 'Hawaii' # => "Hawaii" - # Time.zone.now # => Wed, 23 Jan 2008 20:24:27 HST -10:00 - def now - Time.now.utc.in_time_zone(self) - end - - # Return the current date in this time zone. - def today - tzinfo.now.to_date - end - - # Adjust the given time to the simultaneous time in the time zone represented by +self+. Returns a - # Time.utc() instance -- if you want an ActiveSupport::TimeWithZone instance, use Time#in_time_zone() instead. - def utc_to_local(time) - tzinfo.utc_to_local(time) - end - - # Adjust the given time to the simultaneous time in UTC. Returns a Time.utc() instance. - def local_to_utc(time, dst=true) - tzinfo.local_to_utc(time, dst) - end - - # Available so that TimeZone instances respond like TZInfo::Timezone instances - def period_for_utc(time) - tzinfo.period_for_utc(time) - end - - # Available so that TimeZone instances respond like TZInfo::Timezone instances - def period_for_local(time, dst=true) - tzinfo.period_for_local(time, dst) - end - - # TODO: Preload instead of lazy load for thread safety - def tzinfo - @tzinfo ||= TZInfo::Timezone.get(MAPPING[name]) - end - - unless const_defined?(:ZONES) - ZONES = [] - ZONES_MAP = {} - [[-39_600, "International Date Line West", "Midway Island", "Samoa" ], - [-36_000, "Hawaii" ], - [-32_400, "Alaska" ], - [-28_800, "Pacific Time (US & Canada)", "Tijuana" ], - [-25_200, "Mountain Time (US & Canada)", "Chihuahua", "Mazatlan", - "Arizona" ], - [-21_600, "Central Time (US & Canada)", "Saskatchewan", "Guadalajara", - "Mexico City", "Monterrey", "Central America" ], - [-18_000, "Eastern Time (US & Canada)", "Indiana (East)", "Bogota", - "Lima", "Quito" ], - [-16_200, "Caracas" ], - [-14_400, "Atlantic Time (Canada)", "La Paz", "Santiago" ], - [-12_600, "Newfoundland" ], - [-10_800, "Brasilia", "Buenos Aires", "Georgetown", "Greenland" ], - [ -7_200, "Mid-Atlantic" ], - [ -3_600, "Azores", "Cape Verde Is." ], - [ 0, "Dublin", "Edinburgh", "Lisbon", "London", "Casablanca", - "Monrovia", "UTC" ], - [ 3_600, "Belgrade", "Bratislava", "Budapest", "Ljubljana", "Prague", - "Sarajevo", "Skopje", "Warsaw", "Zagreb", "Brussels", - "Copenhagen", "Madrid", "Paris", "Amsterdam", "Berlin", - "Bern", "Rome", "Stockholm", "Vienna", - "West Central Africa" ], - [ 7_200, "Bucharest", "Cairo", "Helsinki", "Kyev", "Riga", "Sofia", - "Tallinn", "Vilnius", "Athens", "Istanbul", "Minsk", - "Jerusalem", "Harare", "Pretoria" ], - [ 10_800, "Moscow", "St. Petersburg", "Volgograd", "Kuwait", "Riyadh", - "Nairobi", "Baghdad" ], - [ 12_600, "Tehran" ], - [ 14_400, "Abu Dhabi", "Muscat", "Baku", "Tbilisi", "Yerevan" ], - [ 16_200, "Kabul" ], - [ 18_000, "Ekaterinburg", "Islamabad", "Karachi", "Tashkent" ], - [ 19_800, "Chennai", "Kolkata", "Mumbai", "New Delhi", "Sri Jayawardenepura" ], - [ 20_700, "Kathmandu" ], - [ 21_600, "Astana", "Dhaka", "Almaty", - "Novosibirsk" ], - [ 23_400, "Rangoon" ], - [ 25_200, "Bangkok", "Hanoi", "Jakarta", "Krasnoyarsk" ], - [ 28_800, "Beijing", "Chongqing", "Hong Kong", "Urumqi", - "Kuala Lumpur", "Singapore", "Taipei", "Perth", "Irkutsk", - "Ulaan Bataar" ], - [ 32_400, "Seoul", "Osaka", "Sapporo", "Tokyo", "Yakutsk" ], - [ 34_200, "Darwin", "Adelaide" ], - [ 36_000, "Canberra", "Melbourne", "Sydney", "Brisbane", "Hobart", - "Vladivostok", "Guam", "Port Moresby" ], - [ 39_600, "Magadan", "Solomon Is.", "New Caledonia" ], - [ 43_200, "Fiji", "Kamchatka", "Marshall Is.", "Auckland", - "Wellington" ], - [ 46_800, "Nuku'alofa" ]]. - each do |offset, *places| - places.each do |place| - place.freeze - zone = new(place, offset) - ZONES << zone - ZONES_MAP[place] = zone - end - end - ZONES.sort! - ZONES.freeze - ZONES_MAP.freeze - - US_ZONES = ZONES.find_all { |z| z.name =~ /US|Arizona|Indiana|Hawaii|Alaska/ } - US_ZONES.freeze - end - - class << self - alias_method :create, :new - - # Return a TimeZone instance with the given name, or +nil+ if no - # such TimeZone instance exists. (This exists to support the use of - # this class with the +composed_of+ macro.) - def new(name) - self[name] - end - - # Return an array of all TimeZone objects. There are multiple - # TimeZone objects per time zone, in many cases, to make it easier - # for users to find their own time zone. - def all - ZONES - end - - # Locate a specific time zone object. If the argument is a string, it - # is interpreted to mean the name of the timezone to locate. If it is a - # numeric value it is either the hour offset, or the second offset, of the - # timezone to find. (The first one with that offset will be returned.) - # Returns +nil+ if no such time zone is known to the system. - def [](arg) - case arg - when String - ZONES_MAP[arg] - when Numeric, ActiveSupport::Duration - arg *= 3600 if arg.abs <= 13 - all.find { |z| z.utc_offset == arg.to_i } - else - raise ArgumentError, "invalid argument to TimeZone[]: #{arg.inspect}" - end - end - - # A convenience method for returning a collection of TimeZone objects - # for time zones in the USA. - def us_zones - US_ZONES - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat b/vendor/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat deleted file mode 100644 index 74b333d41..000000000 Binary files a/vendor/activesupport-2.2.2/lib/active_support/values/unicode_tables.dat and /dev/null differ diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor.rb deleted file mode 100644 index 23ceeb135..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor.rb +++ /dev/null @@ -1,34 +0,0 @@ -# Prefer gems to the bundled libs. -require 'rubygems' - -begin - gem 'builder', '~> 2.1.2' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/builder-2.1.2" -end - -begin - gem 'xml-simple', '~> 1.0.11' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/xml-simple-1.0.11" -end - -begin - gem 'memcache-client', '~> 1.5.1' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/memcache-client-1.5.1" -end - -begin - gem 'tzinfo', '~> 0.3.12' -rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/tzinfo-0.3.12" -end - -# TODO I18n gem has not been released yet -# begin -# gem 'i18n', '~> 0.0.1' -# rescue Gem::LoadError - $:.unshift "#{File.dirname(__FILE__)}/vendor/i18n-0.0.1" - require 'i18n' -# end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb deleted file mode 100644 index da6034d9c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/blankslate.rb +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -###################################################################### -# BlankSlate provides an abstract base class with no predefined -# methods (except for \_\_send__ and \_\_id__). -# BlankSlate is useful as a base class when writing classes that -# depend upon method_missing (e.g. dynamic proxies). -# -class BlankSlate - class << self - - # Hide the method named +name+ in the BlankSlate class. Don't - # hide +instance_eval+ or any method beginning with "__". - def hide(name) - if instance_methods.include?(name.to_s) and - name !~ /^(__|instance_eval)/ - @hidden_methods ||= {} - @hidden_methods[name.to_sym] = instance_method(name) - undef_method name - end - end - - def find_hidden_method(name) - @hidden_methods ||= {} - @hidden_methods[name] || superclass.find_hidden_method(name) - end - - # Redefine a previously hidden method so that it may be called on a blank - # slate object. - def reveal(name) - bound_method = nil - unbound_method = find_hidden_method(name) - fail "Don't know how to reveal method '#{name}'" unless unbound_method - define_method(name) do |*args| - bound_method ||= unbound_method.bind(self) - bound_method.call(*args) - end - end - end - - instance_methods.each { |m| hide(m) } -end - -###################################################################### -# Since Ruby is very dynamic, methods added to the ancestors of -# BlankSlate after BlankSlate is defined will show up in the -# list of available BlankSlate methods. We handle this by defining a -# hook in the Object and Kernel classes that will hide any method -# defined after BlankSlate has been loaded. -# -module Kernel - class << self - alias_method :blank_slate_method_added, :method_added - - # Detect method additions to Kernel and remove them in the - # BlankSlate class. - def method_added(name) - result = blank_slate_method_added(name) - return result if self != Kernel - BlankSlate.hide(name) - result - end - end -end - -###################################################################### -# Same as above, except in Object. -# -class Object - class << self - alias_method :blank_slate_method_added, :method_added - - # Detect method additions to Object and remove them in the - # BlankSlate class. - def method_added(name) - result = blank_slate_method_added(name) - return result if self != Object - BlankSlate.hide(name) - result - end - - def find_hidden_method(name) - nil - end - end -end - -###################################################################### -# Also, modules included into Object need to be scanned and have their -# instance methods removed from blank slate. In theory, modules -# included into Kernel would have to be removed as well, but a -# "feature" of Ruby prevents late includes into modules from being -# exposed in the first place. -# -class Module - alias blankslate_original_append_features append_features - def append_features(mod) - result = blankslate_original_append_features(mod) - return result if mod != Object - instance_methods.each do |name| - BlankSlate.hide(name) - end - result - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb deleted file mode 100644 index 971927766..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder.rb +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env ruby - -#-- -# Copyright 2004 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'builder/xmlmarkup' -require 'builder/xmlevents' diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb deleted file mode 100644 index 2935b6f1d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/blankslate.rb +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2006 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'blankslate' - -###################################################################### -# BlankSlate has been promoted to a top level name and is now -# available as a standalone gem. We make the name available in the -# Builder namespace for compatibility. -# -module Builder - BlankSlate = ::BlankSlate -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb deleted file mode 100644 index e086a1b13..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/css.rb +++ /dev/null @@ -1,250 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org). -# Copyright 2005 by Scott Barron (scott@elitists.net). -# All rights reserved. -# -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -# -# Much of this is taken from Jim's work in xmlbase.rb and xmlmarkup.rb. -# Documentation has also been copied and pasted and modified to reflect -# that we're building CSS here instead of XML. Jim is conducting the -# orchestra here and I'm just off in the corner playing a flute. -#++ - -# Provide a flexible and easy to use Builder for creating Cascading -# Style Sheets (CSS). - - -require 'builder/blankslate' - -module Builder - - # Create a Cascading Style Sheet (CSS) using Ruby. - # - # Example usage: - # - # css = Builder::CSS.new - # - # text_color = '#7F7F7F' - # preferred_fonts = 'Helvetica, Arial, sans_serif' - # - # css.comment! 'This is our stylesheet' - # css.body { - # background_color '#FAFAFA' - # font_size 'small' - # font_family preferred_fonts - # color text_color - # } - # - # css.id!('navbar') { - # width '500px' - # } - # - # css.class!('navitem') { - # color 'red' - # } - # - # css.a :hover { - # text_decoration 'underline' - # } - # - # css.div(:id => 'menu') { - # background 'green' - # } - # - # css.div(:class => 'foo') { - # background 'red' - # } - # - # This will yield the following stylesheet: - # - # /* This is our stylesheet */ - # body { - # background_color: #FAFAFA; - # font_size: small; - # font_family: Helvetica, Arial, sans_serif; - # color: #7F7F7F; - # } - # - # #navbar { - # width: 500px; - # } - # - # .navitem { - # color: red; - # } - # - # a:hover { - # text_decoration: underline; - # } - # - # div#menu { - # background: green; - # } - # - # div.foo { - # background: red; - # } - # - class CSS < BlankSlate - - # Create a CSS builder. - # - # out:: Object receiving the markup.1 +out+ must respond to - # <<. - # indent:: Number of spaces used for indentation (0 implies no - # indentation and no line breaks). - # - def initialize(indent=2) - @indent = indent - @target = [] - @parts = [] - @library = {} - end - - def +(part) - _join_with_op! '+' - self - end - - def >>(part) - _join_with_op! '' - self - end - - def >(part) - _join_with_op! '>' - self - end - - def |(part) - _join_with_op! ',' - self - end - - # Return the target of the builder - def target! - @target * '' - end - - # Create a comment string in the output. - def comment!(comment_text) - @target << "/* #{comment_text} */\n" - end - - def id!(arg, &block) - _start_container('#'+arg.to_s, nil, block_given?) - _css_block(block) if block - _unify_block - self - end - - def class!(arg, &block) - _start_container('.'+arg.to_s, nil, block_given?) - _css_block(block) if block - _unify_block - self - end - - def store!(sym, &block) - @library[sym] = block.to_proc - end - - def group!(*args, &block) - args.each do |arg| - if arg.is_a?(Symbol) - instance_eval(&@library[arg]) - else - instance_eval(&arg) - end - _text ', ' unless arg == args.last - end - if block - _css_block(block) - _unify_block - end - end - - def method_missing(sym, *args, &block) - sym = "#{sym}:#{args.shift}" if args.first.kind_of?(Symbol) - if block - _start_container(sym, args.first) - _css_block(block) - _unify_block - elsif @in_block - _indent - _css_line(sym, *args) - _newline - return self - else - _start_container(sym, args.first, false) - _unify_block - end - self - end - - # "Cargo culted" from Jim who also "cargo culted" it. See xmlbase.rb. - def nil? - false - end - - private - def _unify_block - @target << @parts * '' - @parts = [] - end - - def _join_with_op!(op) - rhs, lhs = @target.pop, @target.pop - @target << "#{lhs} #{op} #{rhs}" - end - - def _text(text) - @parts << text - end - - def _css_block(block) - _newline - _nested_structures(block) - _end_container - _end_block - end - - def _end_block - _newline - _newline - end - - def _newline - _text "\n" - end - - def _indent - _text ' ' * @indent - end - - def _nested_structures(block) - @in_block = true - self.instance_eval(&block) - @in_block = false - end - - def _start_container(sym, atts = {}, with_bracket = true) - selector = sym.to_s - selector << ".#{atts[:class]}" if atts && atts[:class] - selector << '#' + "#{atts[:id]}" if atts && atts[:id] - @parts << "#{selector}#{with_bracket ? ' {' : ''}" - end - - def _end_container - @parts << "}" - end - - def _css_line(sym, *args) - _text("#{sym.to_s.gsub('_','-')}: #{args * ' '};") - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb deleted file mode 100644 index 8bdbd0589..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xchar.rb +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/env ruby - -# The XChar library is provided courtesy of Sam Ruby (See -# http://intertwingly.net/stories/2005/09/28/xchar.rb) - -# -------------------------------------------------------------------- - -# If the Builder::XChar module is not currently defined, fail on any -# name clashes in standard library classes. - -module Builder - def self.check_for_name_collision(klass, method_name, defined_constant=nil) - if klass.instance_methods.include?(method_name.to_s) - fail RuntimeError, - "Name Collision: Method '#{method_name}' is already defined in #{klass}" - end - end -end - -if ! defined?(Builder::XChar) - Builder.check_for_name_collision(String, "to_xs") - Builder.check_for_name_collision(Fixnum, "xchr") -end - -###################################################################### -module Builder - - #################################################################### - # XML Character converter, from Sam Ruby: - # (see http://intertwingly.net/stories/2005/09/28/xchar.rb). - # - module XChar # :nodoc: - - # See - # http://intertwingly.net/stories/2004/04/14/i18n.html#CleaningWindows - # for details. - CP1252 = { # :nodoc: - 128 => 8364, # euro sign - 130 => 8218, # single low-9 quotation mark - 131 => 402, # latin small letter f with hook - 132 => 8222, # double low-9 quotation mark - 133 => 8230, # horizontal ellipsis - 134 => 8224, # dagger - 135 => 8225, # double dagger - 136 => 710, # modifier letter circumflex accent - 137 => 8240, # per mille sign - 138 => 352, # latin capital letter s with caron - 139 => 8249, # single left-pointing angle quotation mark - 140 => 338, # latin capital ligature oe - 142 => 381, # latin capital letter z with caron - 145 => 8216, # left single quotation mark - 146 => 8217, # right single quotation mark - 147 => 8220, # left double quotation mark - 148 => 8221, # right double quotation mark - 149 => 8226, # bullet - 150 => 8211, # en dash - 151 => 8212, # em dash - 152 => 732, # small tilde - 153 => 8482, # trade mark sign - 154 => 353, # latin small letter s with caron - 155 => 8250, # single right-pointing angle quotation mark - 156 => 339, # latin small ligature oe - 158 => 382, # latin small letter z with caron - 159 => 376, # latin capital letter y with diaeresis - } - - # See http://www.w3.org/TR/REC-xml/#dt-chardata for details. - PREDEFINED = { - 38 => '&', # ampersand - 60 => '<', # left angle bracket - 62 => '>', # right angle bracket - } - - # See http://www.w3.org/TR/REC-xml/#charsets for details. - VALID = [ - 0x9, 0xA, 0xD, - (0x20..0xD7FF), - (0xE000..0xFFFD), - (0x10000..0x10FFFF) - ] - end - -end - - -###################################################################### -# Enhance the Fixnum class with a XML escaped character conversion. -# -class Fixnum - XChar = Builder::XChar if ! defined?(XChar) - - # XML escaped version of chr - def xchr - n = XChar::CP1252[self] || self - case n when *XChar::VALID - XChar::PREDEFINED[n] or (n<128 ? n.chr : "&##{n};") - else - '*' - end - end -end - - -###################################################################### -# Enhance the String class with a XML escaped character version of -# to_s. -# -class String - # XML escaped version of to_s - def to_xs - unpack('U*').map {|n| n.xchr}.join # ASCII, UTF-8 - rescue - unpack('C*').map {|n| n.xchr}.join # ISO-8859-1, WIN-1252 - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb deleted file mode 100644 index ace4b56d5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlbase.rb +++ /dev/null @@ -1,139 +0,0 @@ -#!/usr/bin/env ruby - -require 'builder/blankslate' - -module Builder - - # Generic error for builder - class IllegalBlockError < RuntimeError; end - - # XmlBase is a base class for building XML builders. See - # Builder::XmlMarkup and Builder::XmlEvents for examples. - class XmlBase < BlankSlate - - # Create an XML markup builder. - # - # out:: Object receiving the markup. +out+ must respond to - # <<. - # indent:: Number of spaces used for indentation (0 implies no - # indentation and no line breaks). - # initial:: Level of initial indentation. - # - def initialize(indent=0, initial=0) - @indent = indent - @level = initial - end - - # Create a tag named +sym+. Other than the first argument which - # is the tag name, the arguments are the same as the tags - # implemented via method_missing. - def tag!(sym, *args, &block) - method_missing(sym.to_sym, *args, &block) - end - - # Create XML markup based on the name of the method. This method - # is never invoked directly, but is called for each markup method - # in the markup block. - def method_missing(sym, *args, &block) - text = nil - attrs = nil - sym = "#{sym}:#{args.shift}" if args.first.kind_of?(Symbol) - args.each do |arg| - case arg - when Hash - attrs ||= {} - attrs.merge!(arg) - else - text ||= '' - text << arg.to_s - end - end - if block - unless text.nil? - raise ArgumentError, "XmlMarkup cannot mix a text argument with a block" - end - _indent - _start_tag(sym, attrs) - _newline - _nested_structures(block) - _indent - _end_tag(sym) - _newline - elsif text.nil? - _indent - _start_tag(sym, attrs, true) - _newline - else - _indent - _start_tag(sym, attrs) - text! text - _end_tag(sym) - _newline - end - @target - end - - # Append text to the output target. Escape any markup. May be - # used within the markup brackets as: - # - # builder.p { |b| b.br; b.text! "HI" } #=>


HI

- def text!(text) - _text(_escape(text)) - end - - # Append text to the output target without escaping any markup. - # May be used within the markup brackets as: - # - # builder.p { |x| x << "
HI" } #=>


HI

- # - # This is useful when using non-builder enabled software that - # generates strings. Just insert the string directly into the - # builder without changing the inserted markup. - # - # It is also useful for stacking builder objects. Builders only - # use << to append to the target, so by supporting this - # method/operation builders can use other builders as their - # targets. - def <<(text) - _text(text) - end - - # For some reason, nil? is sent to the XmlMarkup object. If nil? - # is not defined and method_missing is invoked, some strange kind - # of recursion happens. Since nil? won't ever be an XML tag, it - # is pretty safe to define it here. (Note: this is an example of - # cargo cult programming, - # cf. http://fishbowl.pastiche.org/2004/10/13/cargo_cult_programming). - def nil? - false - end - - private - - require 'builder/xchar' - def _escape(text) - text.to_xs - end - - def _escape_quote(text) - _escape(text).gsub(%r{"}, '"') # " WART - end - - def _newline - return if @indent == 0 - text! "\n" - end - - def _indent - return if @indent == 0 || @level == 0 - text!(" " * (@level * @indent)) - end - - def _nested_structures(block) - @level += 1 - block.call(self) - ensure - @level -= 1 - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb deleted file mode 100644 index b373e4da3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlevents.rb +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env ruby - -#-- -# Copyright 2004 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -require 'builder/xmlmarkup' - -module Builder - - # Create a series of SAX-like XML events (e.g. start_tag, end_tag) - # from the markup code. XmlEvent objects are used in a way similar - # to XmlMarkup objects, except that a series of events are generated - # and passed to a handler rather than generating character-based - # markup. - # - # Usage: - # xe = Builder::XmlEvents.new(handler) - # xe.title("HI") # Sends start_tag/end_tag/text messages to the handler. - # - # Indentation may also be selected by providing value for the - # indentation size and initial indentation level. - # - # xe = Builder::XmlEvents.new(handler, indent_size, initial_indent_level) - # - # == XML Event Handler - # - # The handler object must expect the following events. - # - # [start_tag(tag, attrs)] - # Announces that a new tag has been found. +tag+ is the name of - # the tag and +attrs+ is a hash of attributes for the tag. - # - # [end_tag(tag)] - # Announces that an end tag for +tag+ has been found. - # - # [text(text)] - # Announces that a string of characters (+text+) has been found. - # A series of characters may be broken up into more than one - # +text+ call, so the client cannot assume that a single - # callback contains all the text data. - # - class XmlEvents < XmlMarkup - def text!(text) - @target.text(text) - end - - def _start_tag(sym, attrs, end_too=false) - @target.start_tag(sym, attrs) - _end_tag(sym) if end_too - end - - def _end_tag(sym) - @target.end_tag(sym) - end - end - -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb deleted file mode 100644 index ec59dddc3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/builder-2.1.2/builder/xmlmarkup.rb +++ /dev/null @@ -1,328 +0,0 @@ -#!/usr/bin/env ruby -#-- -# Copyright 2004, 2005 by Jim Weirich (jim@weirichhouse.org). -# All rights reserved. - -# Permission is granted for use, copying, modification, distribution, -# and distribution of modified versions of this work as long as the -# above copyright notice is included. -#++ - -# Provide a flexible and easy to use Builder for creating XML markup. -# See XmlBuilder for usage details. - -require 'builder/xmlbase' - -module Builder - - # Create XML markup easily. All (well, almost all) methods sent to - # an XmlMarkup object will be translated to the equivalent XML - # markup. Any method with a block will be treated as an XML markup - # tag with nested markup in the block. - # - # Examples will demonstrate this easier than words. In the - # following, +xm+ is an +XmlMarkup+ object. - # - # xm.em("emphasized") # => emphasized - # xm.em { xmm.b("emp & bold") } # => emph & bold - # xm.a("A Link", "href"=>"http://onestepback.org") - # # => A Link - # xm.div { br } # =>

- # xm.target("name"=>"compile", "option"=>"fast") - # # => - # # NOTE: order of attributes is not specified. - # - # xm.instruct! # - # xm.html { # - # xm.head { # - # xm.title("History") # History - # } # - # xm.body { # - # xm.comment! "HI" # - # xm.h1("Header") #

Header

- # xm.p("paragraph") #

paragraph

- # } # - # } # - # - # == Notes: - # - # * The order that attributes are inserted in markup tags is - # undefined. - # - # * Sometimes you wish to insert text without enclosing tags. Use - # the text! method to accomplish this. - # - # Example: - # - # xm.div { #
- # xm.text! "line"; xm.br # line
- # xm.text! "another line"; xmbr # another line
- # } #
- # - # * The special XML characters <, >, and & are converted to <, - # > and & automatically. Use the << operation to - # insert text without modification. - # - # * Sometimes tags use special characters not allowed in ruby - # identifiers. Use the tag! method to handle these - # cases. - # - # Example: - # - # xml.tag!("SOAP:Envelope") { ... } - # - # will produce ... - # - # ... " - # - # tag! will also take text and attribute arguments (after - # the tag name) like normal markup methods. (But see the next - # bullet item for a better way to handle XML namespaces). - # - # * Direct support for XML namespaces is now available. If the - # first argument to a tag call is a symbol, it will be joined to - # the tag to produce a namespace:tag combination. It is easier to - # show this than describe it. - # - # xml.SOAP :Envelope do ... end - # - # Just put a space before the colon in a namespace to produce the - # right form for builder (e.g. "SOAP:Envelope" => - # "xml.SOAP :Envelope") - # - # * XmlMarkup builds the markup in any object (called a _target_) - # that accepts the << method. If no target is given, - # then XmlMarkup defaults to a string target. - # - # Examples: - # - # xm = Builder::XmlMarkup.new - # result = xm.title("yada") - # # result is a string containing the markup. - # - # buffer = "" - # xm = Builder::XmlMarkup.new(buffer) - # # The markup is appended to buffer (using <<) - # - # xm = Builder::XmlMarkup.new(STDOUT) - # # The markup is written to STDOUT (using <<) - # - # xm = Builder::XmlMarkup.new - # x2 = Builder::XmlMarkup.new(:target=>xm) - # # Markup written to +x2+ will be send to +xm+. - # - # * Indentation is enabled by providing the number of spaces to - # indent for each level as a second argument to XmlBuilder.new. - # Initial indentation may be specified using a third parameter. - # - # Example: - # - # xm = Builder.new(:indent=>2) - # # xm will produce nicely formatted and indented XML. - # - # xm = Builder.new(:indent=>2, :margin=>4) - # # xm will produce nicely formatted and indented XML with 2 - # # spaces per indent and an over all indentation level of 4. - # - # builder = Builder::XmlMarkup.new(:target=>$stdout, :indent=>2) - # builder.name { |b| b.first("Jim"); b.last("Weirich) } - # # prints: - # # - # # Jim - # # Weirich - # # - # - # * The instance_eval implementation which forces self to refer to - # the message receiver as self is now obsolete. We now use normal - # block calls to execute the markup block. This means that all - # markup methods must now be explicitly send to the xml builder. - # For instance, instead of - # - # xml.div { strong("text") } - # - # you need to write: - # - # xml.div { xml.strong("text") } - # - # Although more verbose, the subtle change in semantics within the - # block was found to be prone to error. To make this change a - # little less cumbersome, the markup block now gets the markup - # object sent as an argument, allowing you to use a shorter alias - # within the block. - # - # For example: - # - # xml_builder = Builder::XmlMarkup.new - # xml_builder.div { |xml| - # xml.stong("text") - # } - # - class XmlMarkup < XmlBase - - # Create an XML markup builder. Parameters are specified by an - # option hash. - # - # :target=>target_object:: - # Object receiving the markup. +out+ must respond to the - # << operator. The default is a plain string target. - # - # :indent=>indentation:: - # Number of spaces used for indentation. The default is no - # indentation and no line breaks. - # - # :margin=>initial_indentation_level:: - # Amount of initial indentation (specified in levels, not - # spaces). - # - # :escape_attrs=>OBSOLETE:: - # The :escape_attrs option is no longer supported by builder - # (and will be quietly ignored). String attribute values are - # now automatically escaped. If you need unescaped attribute - # values (perhaps you are using entities in the attribute - # values), then give the value as a Symbol. This allows much - # finer control over escaping attribute values. - # - def initialize(options={}) - indent = options[:indent] || 0 - margin = options[:margin] || 0 - super(indent, margin) - @target = options[:target] || "" - end - - # Return the target of the builder. - def target! - @target - end - - def comment!(comment_text) - _ensure_no_block block_given? - _special("", comment_text, nil) - end - - # Insert an XML declaration into the XML markup. - # - # For example: - # - # xml.declare! :ELEMENT, :blah, "yada" - # # => - def declare!(inst, *args, &block) - _indent - @target << "" - _newline - end - - # Insert a processing instruction into the XML markup. E.g. - # - # For example: - # - # xml.instruct! - # #=> - # xml.instruct! :aaa, :bbb=>"ccc" - # #=> - # - def instruct!(directive_tag=:xml, attrs={}) - _ensure_no_block block_given? - if directive_tag == :xml - a = { :version=>"1.0", :encoding=>"UTF-8" } - attrs = a.merge attrs - end - _special( - "", - nil, - attrs, - [:version, :encoding, :standalone]) - end - - # Insert a CDATA section into the XML markup. - # - # For example: - # - # xml.cdata!("text to be included in cdata") - # #=> - # - def cdata!(text) - _ensure_no_block block_given? - _special("", text, nil) - end - - private - - # NOTE: All private methods of a builder object are prefixed when - # a "_" character to avoid possible conflict with XML tag names. - - # Insert text directly in to the builder's target. - def _text(text) - @target << text - end - - # Insert special instruction. - def _special(open, close, data=nil, attrs=nil, order=[]) - _indent - @target << open - @target << data if data - _insert_attributes(attrs, order) if attrs - @target << close - _newline - end - - # Start an XML tag. If end_too is true, then the start - # tag is also the end tag (e.g.
- def _start_tag(sym, attrs, end_too=false) - @target << "<#{sym}" - _insert_attributes(attrs) - @target << "/" if end_too - @target << ">" - end - - # Insert an ending tag. - def _end_tag(sym) - @target << "" - end - - # Insert the attributes (given in the hash). - def _insert_attributes(attrs, order=[]) - return if attrs.nil? - order.each do |k| - v = attrs[k] - @target << %{ #{k}="#{_attr_value(v)}"} if v # " WART - end - attrs.each do |k, v| - @target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART - end - end - - def _attr_value(value) - case value - when Symbol - value.to_s - else - _escape_quote(value.to_s) - end - end - - def _ensure_no_block(got_block) - if got_block - fail IllegalBlockError, - "Blocks are not allowed on XML instructions" - end - end - - end - -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb deleted file mode 100755 index 2ffe3618b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n.rb +++ /dev/null @@ -1,194 +0,0 @@ -# Authors:: Matt Aimonetti (http://railsontherun.com/), -# Sven Fuchs (http://www.artweb-design.de), -# Joshua Harvey (http://www.workingwithrails.com/person/759-joshua-harvey), -# Saimon Moore (http://saimonmoore.net), -# Stephan Soller (http://www.arkanis-development.de/) -# Copyright:: Copyright (c) 2008 The Ruby i18n Team -# License:: MIT -require 'i18n/backend/simple' -require 'i18n/exceptions' - -module I18n - @@backend = nil - @@load_path = nil - @@default_locale = :'en' - @@exception_handler = :default_exception_handler - - class << self - # Returns the current backend. Defaults to +Backend::Simple+. - def backend - @@backend ||= Backend::Simple.new - end - - # Sets the current backend. Used to set a custom backend. - def backend=(backend) - @@backend = backend - end - - # Returns the current default locale. Defaults to 'en' - def default_locale - @@default_locale - end - - # Sets the current default locale. Used to set a custom default locale. - def default_locale=(locale) - @@default_locale = locale - end - - # Returns the current locale. Defaults to I18n.default_locale. - def locale - Thread.current[:locale] ||= default_locale - end - - # Sets the current locale pseudo-globally, i.e. in the Thread.current hash. - def locale=(locale) - Thread.current[:locale] = locale - end - - # Sets the exception handler. - def exception_handler=(exception_handler) - @@exception_handler = exception_handler - end - - # Allow clients to register paths providing translation data sources. The - # backend defines acceptable sources. - # - # E.g. the provided SimpleBackend accepts a list of paths to translation - # files which are either named *.rb and contain plain Ruby Hashes or are - # named *.yml and contain YAML data. So for the SimpleBackend clients may - # register translation files like this: - # I18n.load_path << 'path/to/locale/en.yml' - def load_path - @@load_path ||= [] - end - - # Sets the load path instance. Custom implementations are expected to - # behave like a Ruby Array. - def load_path=(load_path) - @@load_path = load_path - end - - # Tells the backend to reload translations. Used in situations like the - # Rails development environment. Backends can implement whatever strategy - # is useful. - def reload! - backend.reload! - end - - # Translates, pluralizes and interpolates a given key using a given locale, - # scope, and default, as well as interpolation values. - # - # *LOOKUP* - # - # Translation data is organized as a nested hash using the upper-level keys - # as namespaces. E.g., ActionView ships with the translation: - # :date => {:formats => {:short => "%b %d"}}. - # - # Translations can be looked up at any level of this hash using the key argument - # and the scope option. E.g., in this example I18n.t :date - # returns the whole translations hash {:formats => {:short => "%b %d"}}. - # - # Key can be either a single key or a dot-separated key (both Strings and Symbols - # work). E.g., the short format can be looked up using both: - # I18n.t 'date.formats.short' - # I18n.t :'date.formats.short' - # - # Scope can be either a single key, a dot-separated key or an array of keys - # or dot-separated keys. Keys and scopes can be combined freely. So these - # examples will all look up the same short date format: - # I18n.t 'date.formats.short' - # I18n.t 'formats.short', :scope => 'date' - # I18n.t 'short', :scope => 'date.formats' - # I18n.t 'short', :scope => %w(date formats) - # - # *INTERPOLATION* - # - # Translations can contain interpolation variables which will be replaced by - # values passed to #translate as part of the options hash, with the keys matching - # the interpolation variable names. - # - # E.g., with a translation :foo => "foo {{bar}}" the option - # value for the key +bar+ will be interpolated into the translation: - # I18n.t :foo, :bar => 'baz' # => 'foo baz' - # - # *PLURALIZATION* - # - # Translation data can contain pluralized translations. Pluralized translations - # are arrays of singluar/plural versions of translations like ['Foo', 'Foos']. - # - # Note that I18n::Backend::Simple only supports an algorithm for English - # pluralization rules. Other algorithms can be supported by custom backends. - # - # This returns the singular version of a pluralized translation: - # I18n.t :foo, :count => 1 # => 'Foo' - # - # These both return the plural version of a pluralized translation: - # I18n.t :foo, :count => 0 # => 'Foos' - # I18n.t :foo, :count => 2 # => 'Foos' - # - # The :count option can be used both for pluralization and interpolation. - # E.g., with the translation - # :foo => ['{{count}} foo', '{{count}} foos'], count will - # be interpolated to the pluralized translation: - # I18n.t :foo, :count => 1 # => '1 foo' - # - # *DEFAULTS* - # - # This returns the translation for :foo or default if no translation was found: - # I18n.t :foo, :default => 'default' - # - # This returns the translation for :foo or the translation for :bar if no - # translation for :foo was found: - # I18n.t :foo, :default => :bar - # - # Returns the translation for :foo or the translation for :bar - # or default if no translations for :foo and :bar were found. - # I18n.t :foo, :default => [:bar, 'default'] - # - # BULK LOOKUP - # - # This returns an array with the translations for :foo and :bar. - # I18n.t [:foo, :bar] - # - # Can be used with dot-separated nested keys: - # I18n.t [:'baz.foo', :'baz.bar'] - # - # Which is the same as using a scope option: - # I18n.t [:foo, :bar], :scope => :baz - def translate(key, options = {}) - locale = options.delete(:locale) || I18n.locale - backend.translate(locale, key, options) - rescue I18n::ArgumentError => e - raise e if options[:raise] - send(@@exception_handler, e, locale, key, options) - end - alias :t :translate - - # Localizes certain objects, such as dates and numbers to local formatting. - def localize(object, options = {}) - locale = options[:locale] || I18n.locale - format = options[:format] || :default - backend.localize(locale, object, format) - end - alias :l :localize - - protected - # Handles exceptions raised in the backend. All exceptions except for - # MissingTranslationData exceptions are re-raised. When a MissingTranslationData - # was caught and the option :raise is not set the handler returns an error - # message string containing the key/scope. - def default_exception_handler(exception, locale, key, options) - return exception.message if MissingTranslationData === exception - raise exception - end - - # Merges the given locale, key and scope into a single array of keys. - # Splits keys that contain dots into multiple keys. Makes sure all - # keys are Symbols. - def normalize_translation_keys(locale, key, scope) - keys = [locale] + Array(scope) + [key] - keys = keys.map { |k| k.to_s.split(/\./) } - keys.flatten.map { |k| k.to_sym } - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb deleted file mode 100644 index bdda55d3f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/backend/simple.rb +++ /dev/null @@ -1,216 +0,0 @@ -require 'yaml' - -module I18n - module Backend - class Simple - INTERPOLATION_RESERVED_KEYS = %w(scope default) - MATCH = /(\\\\)?\{\{([^\}]+)\}\}/ - - # Accepts a list of paths to translation files. Loads translations from - # plain Ruby (*.rb) or YAML files (*.yml). See #load_rb and #load_yml - # for details. - def load_translations(*filenames) - filenames.each { |filename| load_file(filename) } - end - - # Stores translations for the given locale in memory. - # This uses a deep merge for the translations hash, so existing - # translations will be overwritten by new ones only at the deepest - # level of the hash. - def store_translations(locale, data) - merge_translations(locale, data) - end - - def translate(locale, key, options = {}) - raise InvalidLocale.new(locale) if locale.nil? - return key.map { |k| translate(locale, k, options) } if key.is_a? Array - - reserved = :scope, :default - count, scope, default = options.values_at(:count, *reserved) - options.delete(:default) - values = options.reject { |name, value| reserved.include?(name) } - - entry = lookup(locale, key, scope) - if entry.nil? - entry = default(locale, default, options) - if entry.nil? - raise(I18n::MissingTranslationData.new(locale, key, options)) - end - end - entry = pluralize(locale, entry, count) - entry = interpolate(locale, entry, values) - entry - end - - # Acts the same as +strftime+, but returns a localized version of the - # formatted date string. Takes a key from the date/time formats - # translations as a format argument (e.g., :short in :'date.formats'). - def localize(locale, object, format = :default) - raise ArgumentError, "Object must be a Date, DateTime or Time object. #{object.inspect} given." unless object.respond_to?(:strftime) - - type = object.respond_to?(:sec) ? 'time' : 'date' - # TODO only translate these if format is a String? - formats = translate(locale, :"#{type}.formats") - format = formats[format.to_sym] if formats && formats[format.to_sym] - # TODO raise exception unless format found? - format = format.to_s.dup - - # TODO only translate these if the format string is actually present - # TODO check which format strings are present, then bulk translate then, then replace them - format.gsub!(/%a/, translate(locale, :"date.abbr_day_names")[object.wday]) - format.gsub!(/%A/, translate(locale, :"date.day_names")[object.wday]) - format.gsub!(/%b/, translate(locale, :"date.abbr_month_names")[object.mon]) - format.gsub!(/%B/, translate(locale, :"date.month_names")[object.mon]) - format.gsub!(/%p/, translate(locale, :"time.#{object.hour < 12 ? :am : :pm}")) if object.respond_to? :hour - object.strftime(format) - end - - def initialized? - @initialized ||= false - end - - def reload! - @initialized = false - @translations = nil - end - - protected - def init_translations - load_translations(*I18n.load_path) - @initialized = true - end - - def translations - @translations ||= {} - end - - # Looks up a translation from the translations hash. Returns nil if - # eiher key is nil, or locale, scope or key do not exist as a key in the - # nested translations hash. Splits keys or scopes containing dots - # into multiple keys, i.e. currency.format is regarded the same as - # %w(currency format). - def lookup(locale, key, scope = []) - return unless key - init_translations unless initialized? - keys = I18n.send(:normalize_translation_keys, locale, key, scope) - keys.inject(translations) do |result, k| - if (x = result[k.to_sym]).nil? - return nil - else - x - end - end - end - - # Evaluates a default translation. - # If the given default is a String it is used literally. If it is a Symbol - # it will be translated with the given options. If it is an Array the first - # translation yielded will be returned. - # - # I.e., default(locale, [:foo, 'default']) will return +default+ if - # translate(locale, :foo) does not yield a result. - def default(locale, default, options = {}) - case default - when String then default - when Symbol then translate locale, default, options - when Array then default.each do |obj| - result = default(locale, obj, options.dup) and return result - end and nil - end - rescue MissingTranslationData - nil - end - - # Picks a translation from an array according to English pluralization - # rules. It will pick the first translation if count is not equal to 1 - # and the second translation if it is equal to 1. Other backends can - # implement more flexible or complex pluralization rules. - def pluralize(locale, entry, count) - return entry unless entry.is_a?(Hash) and count - # raise InvalidPluralizationData.new(entry, count) unless entry.is_a?(Hash) - key = :zero if count == 0 && entry.has_key?(:zero) - key ||= count == 1 ? :one : :other - raise InvalidPluralizationData.new(entry, count) unless entry.has_key?(key) - entry[key] - end - - # Interpolates values into a given string. - # - # interpolate "file {{file}} opened by \\{{user}}", :file => 'test.txt', :user => 'Mr. X' - # # => "file test.txt opened by {{user}}" - # - # Note that you have to double escape the \\ when you want to escape - # the {{...}} key in a string (once for the string and once for the - # interpolation). - def interpolate(locale, string, values = {}) - return string unless string.is_a?(String) - - if string.respond_to?(:force_encoding) - original_encoding = string.encoding - string.force_encoding(Encoding::BINARY) - end - - result = string.gsub(MATCH) do - escaped, pattern, key = $1, $2, $2.to_sym - - if escaped - pattern - elsif INTERPOLATION_RESERVED_KEYS.include?(pattern) - raise ReservedInterpolationKey.new(pattern, string) - elsif !values.include?(key) - raise MissingInterpolationArgument.new(pattern, string) - else - values[key].to_s - end - end - - result.force_encoding(original_encoding) if original_encoding - result - end - - # Loads a single translations file by delegating to #load_rb or - # #load_yml depending on the file extension and directly merges the - # data to the existing translations. Raises I18n::UnknownFileType - # for all other file extensions. - def load_file(filename) - type = File.extname(filename).tr('.', '').downcase - raise UnknownFileType.new(type, filename) unless respond_to?(:"load_#{type}") - data = send :"load_#{type}", filename # TODO raise a meaningful exception if this does not yield a Hash - data.each { |locale, d| merge_translations(locale, d) } - end - - # Loads a plain Ruby translations file. eval'ing the file must yield - # a Hash containing translation data with locales as toplevel keys. - def load_rb(filename) - eval(IO.read(filename), binding, filename) - end - - # Loads a YAML translations file. The data must have locales as - # toplevel keys. - def load_yml(filename) - YAML::load(IO.read(filename)) - end - - # Deep merges the given translations hash with the existing translations - # for the given locale - def merge_translations(locale, data) - locale = locale.to_sym - translations[locale] ||= {} - data = deep_symbolize_keys(data) - - # deep_merge by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809 - merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 } - translations[locale].merge!(data, &merger) - end - - # Return a new hash with all keys and nested keys converted to symbols. - def deep_symbolize_keys(hash) - hash.inject({}) { |result, (key, value)| - value = deep_symbolize_keys(value) if value.is_a? Hash - result[(key.to_sym rescue key) || key] = value - result - } - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb deleted file mode 100644 index 0f3eff107..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/i18n-0.0.1/i18n/exceptions.rb +++ /dev/null @@ -1,53 +0,0 @@ -module I18n - class ArgumentError < ::ArgumentError; end - - class InvalidLocale < ArgumentError - attr_reader :locale - def initialize(locale) - @locale = locale - super "#{locale.inspect} is not a valid locale" - end - end - - class MissingTranslationData < ArgumentError - attr_reader :locale, :key, :options - def initialize(locale, key, options) - @key, @locale, @options = key, locale, options - keys = I18n.send(:normalize_translation_keys, locale, key, options[:scope]) - keys << 'no key' if keys.size < 2 - super "translation missing: #{keys.join(', ')}" - end - end - - class InvalidPluralizationData < ArgumentError - attr_reader :entry, :count - def initialize(entry, count) - @entry, @count = entry, count - super "translation data #{entry.inspect} can not be used with :count => #{count}" - end - end - - class MissingInterpolationArgument < ArgumentError - attr_reader :key, :string - def initialize(key, string) - @key, @string = key, string - super "interpolation argument #{key} missing in #{string.inspect}" - end - end - - class ReservedInterpolationKey < ArgumentError - attr_reader :key, :string - def initialize(key, string) - @key, @string = key, string - super "reserved key #{key.inspect} used in #{string.inspect}" - end - end - - class UnknownFileType < ArgumentError - attr_reader :type, :filename - def initialize(type, filename) - @type, @filename = type, filename - super "can not load translations from #{filename}, the file type #{type} is not known" - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb deleted file mode 100644 index 99c9af039..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/memcache-client-1.5.1/memcache.rb +++ /dev/null @@ -1,849 +0,0 @@ -# All original code copyright 2005, 2006, 2007 Bob Cottrell, Eric Hodel, -# The Robot Co-op. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. Neither the names of the authors nor the names of their contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS -# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE -# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -require 'socket' -require 'thread' -require 'timeout' -require 'rubygems' - -class String - - ## - # Uses the ITU-T polynomial in the CRC32 algorithm. - - def crc32_ITU_T - n = length - r = 0xFFFFFFFF - - n.times do |i| - r ^= self[i] - 8.times do - if (r & 1) != 0 then - r = (r>>1) ^ 0xEDB88320 - else - r >>= 1 - end - end - end - - r ^ 0xFFFFFFFF - end - -end - -## -# A Ruby client library for memcached. -# -# This is intended to provide access to basic memcached functionality. It -# does not attempt to be complete implementation of the entire API, but it is -# approaching a complete implementation. - -class MemCache - - ## - # The version of MemCache you are using. - - VERSION = '1.5.0' - - ## - # Default options for the cache object. - - DEFAULT_OPTIONS = { - :namespace => nil, - :readonly => false, - :multithread => false, - } - - ## - # Default memcached port. - - DEFAULT_PORT = 11211 - - ## - # Default memcached server weight. - - DEFAULT_WEIGHT = 1 - - ## - # The amount of time to wait for a response from a memcached server. If a - # response is not completed within this time, the connection to the server - # will be closed and an error will be raised. - - attr_accessor :request_timeout - - ## - # The namespace for this instance - - attr_reader :namespace - - ## - # The multithread setting for this instance - - attr_reader :multithread - - ## - # The servers this client talks to. Play at your own peril. - - attr_reader :servers - - ## - # Accepts a list of +servers+ and a list of +opts+. +servers+ may be - # omitted. See +servers=+ for acceptable server list arguments. - # - # Valid options for +opts+ are: - # - # [:namespace] Prepends this value to all keys added or retrieved. - # [:readonly] Raises an exception on cache writes when true. - # [:multithread] Wraps cache access in a Mutex for thread safety. - # - # Other options are ignored. - - def initialize(*args) - servers = [] - opts = {} - - case args.length - when 0 then # NOP - when 1 then - arg = args.shift - case arg - when Hash then opts = arg - when Array then servers = arg - when String then servers = [arg] - else raise ArgumentError, 'first argument must be Array, Hash or String' - end - when 2 then - servers, opts = args - else - raise ArgumentError, "wrong number of arguments (#{args.length} for 2)" - end - - opts = DEFAULT_OPTIONS.merge opts - @namespace = opts[:namespace] - @readonly = opts[:readonly] - @multithread = opts[:multithread] - @mutex = Mutex.new if @multithread - @buckets = [] - self.servers = servers - end - - ## - # Returns a string representation of the cache object. - - def inspect - "" % - [@servers.length, @buckets.length, @namespace, @readonly] - end - - ## - # Returns whether there is at least one active server for the object. - - def active? - not @servers.empty? - end - - ## - # Returns whether or not the cache object was created read only. - - def readonly? - @readonly - end - - ## - # Set the servers that the requests will be distributed between. Entries - # can be either strings of the form "hostname:port" or - # "hostname:port:weight" or MemCache::Server objects. - - def servers=(servers) - # Create the server objects. - @servers = servers.collect do |server| - case server - when String - host, port, weight = server.split ':', 3 - port ||= DEFAULT_PORT - weight ||= DEFAULT_WEIGHT - Server.new self, host, port, weight - when Server - if server.memcache.multithread != @multithread then - raise ArgumentError, "can't mix threaded and non-threaded servers" - end - server - else - raise TypeError, "cannot convert #{server.class} into MemCache::Server" - end - end - - # Create an array of server buckets for weight selection of servers. - @buckets = [] - @servers.each do |server| - server.weight.times { @buckets.push(server) } - end - end - - ## - # Decrements the value for +key+ by +amount+ and returns the new value. - # +key+ must already exist. If +key+ is not an integer, it is assumed to be - # 0. +key+ can not be decremented below 0. - - def decr(key, amount = 1) - server, cache_key = request_setup key - - if @multithread then - threadsafe_cache_decr server, cache_key, amount - else - cache_decr server, cache_key, amount - end - rescue TypeError, SocketError, SystemCallError, IOError => err - handle_error server, err - end - - ## - # Retrieves +key+ from memcache. If +raw+ is false, the value will be - # unmarshalled. - - def get(key, raw = false) - server, cache_key = request_setup key - - value = if @multithread then - threadsafe_cache_get server, cache_key - else - cache_get server, cache_key - end - - return nil if value.nil? - - value = Marshal.load value unless raw - - return value - rescue TypeError, SocketError, SystemCallError, IOError => err - handle_error server, err - end - - ## - # Retrieves multiple values from memcached in parallel, if possible. - # - # The memcached protocol supports the ability to retrieve multiple - # keys in a single request. Pass in an array of keys to this method - # and it will: - # - # 1. map the key to the appropriate memcached server - # 2. send a single request to each server that has one or more key values - # - # Returns a hash of values. - # - # cache["a"] = 1 - # cache["b"] = 2 - # cache.get_multi "a", "b" # => { "a" => 1, "b" => 2 } - - def get_multi(*keys) - raise MemCacheError, 'No active servers' unless active? - - keys.flatten! - key_count = keys.length - cache_keys = {} - server_keys = Hash.new { |h,k| h[k] = [] } - - # map keys to servers - keys.each do |key| - server, cache_key = request_setup key - cache_keys[cache_key] = key - server_keys[server] << cache_key - end - - results = {} - - server_keys.each do |server, keys_for_server| - keys_for_server = keys_for_server.join ' ' - values = if @multithread then - threadsafe_cache_get_multi server, keys_for_server - else - cache_get_multi server, keys_for_server - end - values.each do |key, value| - results[cache_keys[key]] = Marshal.load value - end - end - - return results - rescue TypeError, SocketError, SystemCallError, IOError => err - handle_error server, err - end - - ## - # Increments the value for +key+ by +amount+ and retruns the new value. - # +key+ must already exist. If +key+ is not an integer, it is assumed to be - # 0. - - def incr(key, amount = 1) - server, cache_key = request_setup key - - if @multithread then - threadsafe_cache_incr server, cache_key, amount - else - cache_incr server, cache_key, amount - end - rescue TypeError, SocketError, SystemCallError, IOError => err - handle_error server, err - end - - ## - # Add +key+ to the cache with value +value+ that expires in +expiry+ - # seconds. If +raw+ is true, +value+ will not be Marshalled. - # - # Warning: Readers should not call this method in the event of a cache miss; - # see MemCache#add. - - def set(key, value, expiry = 0, raw = false) - raise MemCacheError, "Update of readonly cache" if @readonly - server, cache_key = request_setup key - socket = server.socket - - value = Marshal.dump value unless raw - command = "set #{cache_key} 0 #{expiry} #{value.size}\r\n#{value}\r\n" - - begin - @mutex.lock if @multithread - socket.write command - result = socket.gets - raise_on_error_response! result - result - rescue SocketError, SystemCallError, IOError => err - server.close - raise MemCacheError, err.message - ensure - @mutex.unlock if @multithread - end - end - - ## - # Add +key+ to the cache with value +value+ that expires in +expiry+ - # seconds, but only if +key+ does not already exist in the cache. - # If +raw+ is true, +value+ will not be Marshalled. - # - # Readers should call this method in the event of a cache miss, not - # MemCache#set or MemCache#[]=. - - def add(key, value, expiry = 0, raw = false) - raise MemCacheError, "Update of readonly cache" if @readonly - server, cache_key = request_setup key - socket = server.socket - - value = Marshal.dump value unless raw - command = "add #{cache_key} 0 #{expiry} #{value.size}\r\n#{value}\r\n" - - begin - @mutex.lock if @multithread - socket.write command - result = socket.gets - raise_on_error_response! result - result - rescue SocketError, SystemCallError, IOError => err - server.close - raise MemCacheError, err.message - ensure - @mutex.unlock if @multithread - end - end - - ## - # Removes +key+ from the cache in +expiry+ seconds. - - def delete(key, expiry = 0) - @mutex.lock if @multithread - - raise MemCacheError, "No active servers" unless active? - cache_key = make_cache_key key - server = get_server_for_key cache_key - - sock = server.socket - raise MemCacheError, "No connection to server" if sock.nil? - - begin - sock.write "delete #{cache_key} #{expiry}\r\n" - result = sock.gets - raise_on_error_response! result - result - rescue SocketError, SystemCallError, IOError => err - server.close - raise MemCacheError, err.message - end - ensure - @mutex.unlock if @multithread - end - - ## - # Flush the cache from all memcache servers. - - def flush_all - raise MemCacheError, 'No active servers' unless active? - raise MemCacheError, "Update of readonly cache" if @readonly - begin - @mutex.lock if @multithread - @servers.each do |server| - begin - sock = server.socket - raise MemCacheError, "No connection to server" if sock.nil? - sock.write "flush_all\r\n" - result = sock.gets - raise_on_error_response! result - result - rescue SocketError, SystemCallError, IOError => err - server.close - raise MemCacheError, err.message - end - end - ensure - @mutex.unlock if @multithread - end - end - - ## - # Reset the connection to all memcache servers. This should be called if - # there is a problem with a cache lookup that might have left the connection - # in a corrupted state. - - def reset - @servers.each { |server| server.close } - end - - ## - # Returns statistics for each memcached server. An explanation of the - # statistics can be found in the memcached docs: - # - # http://code.sixapart.com/svn/memcached/trunk/server/doc/protocol.txt - # - # Example: - # - # >> pp CACHE.stats - # {"localhost:11211"=> - # {"bytes"=>4718, - # "pid"=>20188, - # "connection_structures"=>4, - # "time"=>1162278121, - # "pointer_size"=>32, - # "limit_maxbytes"=>67108864, - # "cmd_get"=>14532, - # "version"=>"1.2.0", - # "bytes_written"=>432583, - # "cmd_set"=>32, - # "get_misses"=>0, - # "total_connections"=>19, - # "curr_connections"=>3, - # "curr_items"=>4, - # "uptime"=>1557, - # "get_hits"=>14532, - # "total_items"=>32, - # "rusage_system"=>0.313952, - # "rusage_user"=>0.119981, - # "bytes_read"=>190619}} - # => nil - - def stats - raise MemCacheError, "No active servers" unless active? - server_stats = {} - - @servers.each do |server| - sock = server.socket - raise MemCacheError, "No connection to server" if sock.nil? - - value = nil - begin - sock.write "stats\r\n" - stats = {} - while line = sock.gets do - raise_on_error_response! line - break if line == "END\r\n" - if line =~ /\ASTAT ([\w]+) ([\w\.\:]+)/ then - name, value = $1, $2 - stats[name] = case name - when 'version' - value - when 'rusage_user', 'rusage_system' then - seconds, microseconds = value.split(/:/, 2) - microseconds ||= 0 - Float(seconds) + (Float(microseconds) / 1_000_000) - else - if value =~ /\A\d+\Z/ then - value.to_i - else - value - end - end - end - end - server_stats["#{server.host}:#{server.port}"] = stats - rescue SocketError, SystemCallError, IOError => err - server.close - raise MemCacheError, err.message - end - end - - server_stats - end - - ## - # Shortcut to get a value from the cache. - - alias [] get - - ## - # Shortcut to save a value in the cache. This method does not set an - # expiration on the entry. Use set to specify an explicit expiry. - - def []=(key, value) - set key, value - end - - protected - - ## - # Create a key for the cache, incorporating the namespace qualifier if - # requested. - - def make_cache_key(key) - if namespace.nil? then - key - else - "#{@namespace}:#{key}" - end - end - - ## - # Pick a server to handle the request based on a hash of the key. - - def get_server_for_key(key) - raise ArgumentError, "illegal character in key #{key.inspect}" if - key =~ /\s/ - raise ArgumentError, "key too long #{key.inspect}" if key.length > 250 - raise MemCacheError, "No servers available" if @servers.empty? - return @servers.first if @servers.length == 1 - - hkey = hash_for key - - 20.times do |try| - server = @buckets[hkey % @buckets.nitems] - return server if server.alive? - hkey += hash_for "#{try}#{key}" - end - - raise MemCacheError, "No servers available" - end - - ## - # Returns an interoperable hash value for +key+. (I think, docs are - # sketchy for down servers). - - def hash_for(key) - (key.crc32_ITU_T >> 16) & 0x7fff - end - - ## - # Performs a raw decr for +cache_key+ from +server+. Returns nil if not - # found. - - def cache_decr(server, cache_key, amount) - socket = server.socket - socket.write "decr #{cache_key} #{amount}\r\n" - text = socket.gets - raise_on_error_response! text - return nil if text == "NOT_FOUND\r\n" - return text.to_i - end - - ## - # Fetches the raw data for +cache_key+ from +server+. Returns nil on cache - # miss. - - def cache_get(server, cache_key) - socket = server.socket - socket.write "get #{cache_key}\r\n" - keyline = socket.gets # "VALUE \r\n" - - if keyline.nil? then - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - raise_on_error_response! keyline - return nil if keyline == "END\r\n" - - unless keyline =~ /(\d+)\r/ then - server.close - raise MemCacheError, "unexpected response #{keyline.inspect}" - end - value = socket.read $1.to_i - socket.read 2 # "\r\n" - socket.gets # "END\r\n" - return value - end - - ## - # Fetches +cache_keys+ from +server+ using a multi-get. - - def cache_get_multi(server, cache_keys) - values = {} - socket = server.socket - socket.write "get #{cache_keys}\r\n" - - while keyline = socket.gets do - return values if keyline == "END\r\n" - raise_on_error_response! keyline - - unless keyline =~ /\AVALUE (.+) (.+) (.+)/ then - server.close - raise MemCacheError, "unexpected response #{keyline.inspect}" - end - - key, data_length = $1, $3 - values[$1] = socket.read data_length.to_i - socket.read(2) # "\r\n" - end - - server.close - raise MemCacheError, "lost connection to #{server.host}:#{server.port}" - end - - ## - # Performs a raw incr for +cache_key+ from +server+. Returns nil if not - # found. - - def cache_incr(server, cache_key, amount) - socket = server.socket - socket.write "incr #{cache_key} #{amount}\r\n" - text = socket.gets - raise_on_error_response! text - return nil if text == "NOT_FOUND\r\n" - return text.to_i - end - - ## - # Handles +error+ from +server+. - - def handle_error(server, error) - server.close if server - new_error = MemCacheError.new error.message - new_error.set_backtrace error.backtrace - raise new_error - end - - ## - # Performs setup for making a request with +key+ from memcached. Returns - # the server to fetch the key from and the complete key to use. - - def request_setup(key) - raise MemCacheError, 'No active servers' unless active? - cache_key = make_cache_key key - server = get_server_for_key cache_key - raise MemCacheError, 'No connection to server' if server.socket.nil? - return server, cache_key - end - - def threadsafe_cache_decr(server, cache_key, amount) # :nodoc: - @mutex.lock - cache_decr server, cache_key, amount - ensure - @mutex.unlock - end - - def threadsafe_cache_get(server, cache_key) # :nodoc: - @mutex.lock - cache_get server, cache_key - ensure - @mutex.unlock - end - - def threadsafe_cache_get_multi(socket, cache_keys) # :nodoc: - @mutex.lock - cache_get_multi socket, cache_keys - ensure - @mutex.unlock - end - - def threadsafe_cache_incr(server, cache_key, amount) # :nodoc: - @mutex.lock - cache_incr server, cache_key, amount - ensure - @mutex.unlock - end - - def raise_on_error_response!(response) - if response =~ /\A(?:CLIENT_|SERVER_)?ERROR (.*)/ - raise MemCacheError, $1.strip - end - end - - - ## - # This class represents a memcached server instance. - - class Server - - ## - # The amount of time to wait to establish a connection with a memcached - # server. If a connection cannot be established within this time limit, - # the server will be marked as down. - - CONNECT_TIMEOUT = 0.25 - - ## - # The amount of time to wait before attempting to re-establish a - # connection with a server that is marked dead. - - RETRY_DELAY = 30.0 - - ## - # The host the memcached server is running on. - - attr_reader :host - - ## - # The port the memcached server is listening on. - - attr_reader :port - - ## - # The weight given to the server. - - attr_reader :weight - - ## - # The time of next retry if the connection is dead. - - attr_reader :retry - - ## - # A text status string describing the state of the server. - - attr_reader :status - - ## - # Create a new MemCache::Server object for the memcached instance - # listening on the given host and port, weighted by the given weight. - - def initialize(memcache, host, port = DEFAULT_PORT, weight = DEFAULT_WEIGHT) - raise ArgumentError, "No host specified" if host.nil? or host.empty? - raise ArgumentError, "No port specified" if port.nil? or port.to_i.zero? - - @memcache = memcache - @host = host - @port = port.to_i - @weight = weight.to_i - - @multithread = @memcache.multithread - @mutex = Mutex.new - - @sock = nil - @retry = nil - @status = 'NOT CONNECTED' - end - - ## - # Return a string representation of the server object. - - def inspect - "" % [@host, @port, @weight, @status] - end - - ## - # Check whether the server connection is alive. This will cause the - # socket to attempt to connect if it isn't already connected and or if - # the server was previously marked as down and the retry time has - # been exceeded. - - def alive? - !!socket - end - - ## - # Try to connect to the memcached server targeted by this object. - # Returns the connected socket object on success or nil on failure. - - def socket - @mutex.lock if @multithread - return @sock if @sock and not @sock.closed? - - @sock = nil - - # If the host was dead, don't retry for a while. - return if @retry and @retry > Time.now - - # Attempt to connect if not already connected. - begin - @sock = timeout CONNECT_TIMEOUT do - TCPSocket.new @host, @port - end - if Socket.constants.include? 'TCP_NODELAY' then - @sock.setsockopt Socket::IPPROTO_TCP, Socket::TCP_NODELAY, 1 - end - @retry = nil - @status = 'CONNECTED' - rescue SocketError, SystemCallError, IOError, Timeout::Error => err - mark_dead err.message - end - - return @sock - ensure - @mutex.unlock if @multithread - end - - ## - # Close the connection to the memcached server targeted by this - # object. The server is not considered dead. - - def close - @mutex.lock if @multithread - @sock.close if @sock && !@sock.closed? - @sock = nil - @retry = nil - @status = "NOT CONNECTED" - ensure - @mutex.unlock if @multithread - end - - private - - ## - # Mark the server as dead and close its socket. - - def mark_dead(reason = "Unknown error") - @sock.close if @sock && !@sock.closed? - @sock = nil - @retry = Time.now + RETRY_DELAY - - @status = sprintf "DEAD: %s, will retry at %s", reason, @retry - end - end - - ## - # Base MemCache exception class. - - class MemCacheError < RuntimeError; end - -end - diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb deleted file mode 100644 index c8bdbeec5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo.rb +++ /dev/null @@ -1,33 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -# Add the directory containing this file to the start of the load path if it -# isn't there already. -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) - -require 'tzinfo/timezone' -# require 'tzinfo/country' -# require 'tzinfo/tzdataparser' -# require 'tzinfo/timezone_proxy' -require 'tzinfo/data_timezone' -require 'tzinfo/linked_timezone' \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb deleted file mode 100644 index 5eccbdf0d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone.rb +++ /dev/null @@ -1,47 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - # A Timezone based on a DataTimezoneInfo. - class DataTimezone < InfoTimezone #:nodoc: - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - info.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - info.periods_for_local(local) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb deleted file mode 100644 index a45d94554..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/data_timezone_info.rb +++ /dev/null @@ -1,228 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_info' -require 'tzinfo/timezone_offset_info' -require 'tzinfo/timezone_period' -require 'tzinfo/timezone_transition_info' - -module TZInfo - # Thrown if no offsets have been defined when calling period_for_utc or - # periods_for_local. Indicates an error in the timezone data. - class NoOffsetsDefined < StandardError - end - - # Represents a (non-linked) timezone defined in a data module. - class DataTimezoneInfo < TimezoneInfo #:nodoc: - - # Constructs a new TimezoneInfo with its identifier. - def initialize(identifier) - super(identifier) - @offsets = {} - @transitions = [] - @previous_offset = nil - @transitions_index = nil - end - - # Defines a offset. The id uniquely identifies this offset within the - # timezone. utc_offset and std_offset define the offset in seconds of - # standard time from UTC and daylight savings from standard time - # respectively. abbreviation describes the timezone offset (e.g. GMT, BST, - # EST or EDT). - # - # The first offset to be defined is treated as the offset that applies - # until the first transition. This will usually be in Local Mean Time (LMT). - # - # ArgumentError will be raised if the id is already defined. - def offset(id, utc_offset, std_offset, abbreviation) - raise ArgumentError, 'Offset already defined' if @offsets.has_key?(id) - - offset = TimezoneOffsetInfo.new(utc_offset, std_offset, abbreviation) - @offsets[id] = offset - @previous_offset = offset unless @previous_offset - end - - # Defines a transition. Transitions must be defined in chronological order. - # ArgumentError will be raised if a transition is added out of order. - # offset_id refers to an id defined with offset. ArgumentError will be - # raised if the offset_id cannot be found. numerator_or_time and - # denomiator specify the time the transition occurs as. See - # TimezoneTransitionInfo for more detail about specifying times. - def transition(year, month, offset_id, numerator_or_time, denominator = nil) - offset = @offsets[offset_id] - raise ArgumentError, 'Offset not found' unless offset - - if @transitions_index - if year < @last_year || (year == @last_year && month < @last_month) - raise ArgumentError, 'Transitions must be increasing date order' - end - - # Record the position of the first transition with this index. - index = transition_index(year, month) - @transitions_index[index] ||= @transitions.length - - # Fill in any gaps - (index - 1).downto(0) do |i| - break if @transitions_index[i] - @transitions_index[i] = @transitions.length - end - else - @transitions_index = [@transitions.length] - @start_year = year - @start_month = month - end - - @transitions << TimezoneTransitionInfo.new(offset, @previous_offset, - numerator_or_time, denominator) - @last_year = year - @last_month = month - @previous_offset = offset - end - - # Returns the TimezonePeriod for the given UTC time. - # Raises NoOffsetsDefined if no offsets have been defined. - def period_for_utc(utc) - unless @transitions.empty? - utc = TimeOrDateTime.wrap(utc) - index = transition_index(utc.year, utc.mon) - - start_transition = nil - start = transition_before_end(index) - if start - start.downto(0) do |i| - if @transitions[i].at <= utc - start_transition = @transitions[i] - break - end - end - end - - end_transition = nil - start = transition_after_start(index) - if start - start.upto(@transitions.length - 1) do |i| - if @transitions[i].at > utc - end_transition = @transitions[i] - break - end - end - end - - if start_transition || end_transition - TimezonePeriod.new(start_transition, end_transition) - else - # Won't happen since there are transitions. Must always find one - # transition that is either >= or < the specified time. - raise 'No transitions found in search' - end - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - TimezonePeriod.new(nil, nil, @previous_offset) - end - end - - # Returns the set of TimezonePeriods for the given local time as an array. - # Results returned are ordered by increasing UTC start date. - # Returns an empty array if no periods are found for the given time. - # Raises NoOffsetsDefined if no offsets have been defined. - def periods_for_local(local) - unless @transitions.empty? - local = TimeOrDateTime.wrap(local) - index = transition_index(local.year, local.mon) - - result = [] - - start_index = transition_after_start(index - 1) - if start_index && @transitions[start_index].local_end > local - if start_index > 0 - if @transitions[start_index - 1].local_start <= local - result << TimezonePeriod.new(@transitions[start_index - 1], @transitions[start_index]) - end - else - result << TimezonePeriod.new(nil, @transitions[start_index]) - end - end - - end_index = transition_before_end(index + 1) - - if end_index - start_index = end_index unless start_index - - start_index.upto(transition_before_end(index + 1)) do |i| - if @transitions[i].local_start <= local - if i + 1 < @transitions.length - if @transitions[i + 1].local_end > local - result << TimezonePeriod.new(@transitions[i], @transitions[i + 1]) - end - else - result << TimezonePeriod.new(@transitions[i], nil) - end - end - end - end - - result - else - raise NoOffsetsDefined, 'No offsets have been defined' unless @previous_offset - [TimezonePeriod.new(nil, nil, @previous_offset)] - end - end - - private - # Returns the index into the @transitions_index array for a given year - # and month. - def transition_index(year, month) - index = (year - @start_year) * 2 - index += 1 if month > 6 - index -= 1 if @start_month > 6 - index - end - - # Returns the index into @transitions of the first transition that occurs - # on or after the start of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_after_start(index) - if index >= @transitions_index.length - nil - else - index = 0 if index < 0 - @transitions_index[index] - end - end - - # Returns the index into @transitions of the first transition that occurs - # before the end of the given index into @transitions_index. - # Returns nil if there are no such transitions. - def transition_before_end(index) - index = index + 1 - - if index <= 0 - nil - elsif index >= @transitions_index.length - @transitions.length - 1 - else - @transitions_index[index] - 1 - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb deleted file mode 100644 index 8c5f25577..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Algiers.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Algiers - include TimezoneDefinition - - timezone 'Africa/Algiers' do |tz| - tz.offset :o0, 732, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1891, 3, :o1, 2170625843, 900 - tz.transition 1911, 3, :o2, 69670267013, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 6, :o2, 58148699, 24 - tz.transition 1939, 9, :o3, 58308443, 24 - tz.transition 1939, 11, :o2, 4859173, 2 - tz.transition 1940, 2, :o4, 29156215, 12 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o4, 4862743, 2 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o4, 58361147, 24 - tz.transition 1946, 10, :o2, 58370411, 24 - tz.transition 1956, 1, :o4, 4871003, 2 - tz.transition 1963, 4, :o2, 58515203, 24 - tz.transition 1971, 4, :o3, 41468400 - tz.transition 1971, 9, :o2, 54774000 - tz.transition 1977, 5, :o3, 231724800 - tz.transition 1977, 10, :o4, 246236400 - tz.transition 1978, 3, :o5, 259545600 - tz.transition 1978, 9, :o4, 275274000 - tz.transition 1979, 10, :o2, 309740400 - tz.transition 1980, 4, :o3, 325468800 - tz.transition 1980, 10, :o2, 341802000 - tz.transition 1981, 5, :o4, 357523200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb deleted file mode 100644 index 6e6daf352..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Cairo.rb +++ /dev/null @@ -1,219 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Cairo - include TimezoneDefinition - - timezone 'Africa/Cairo' do |tz| - tz.offset :o0, 7500, 0, :LMT - tz.offset :o1, 7200, 0, :EET - tz.offset :o2, 7200, 3600, :EEST - - tz.transition 1900, 9, :o1, 695604503, 288 - tz.transition 1940, 7, :o2, 29157905, 12 - tz.transition 1940, 9, :o1, 19439227, 8 - tz.transition 1941, 4, :o2, 29161193, 12 - tz.transition 1941, 9, :o1, 19442027, 8 - tz.transition 1942, 3, :o2, 29165405, 12 - tz.transition 1942, 10, :o1, 19445275, 8 - tz.transition 1943, 3, :o2, 29169785, 12 - tz.transition 1943, 10, :o1, 19448235, 8 - tz.transition 1944, 3, :o2, 29174177, 12 - tz.transition 1944, 10, :o1, 19451163, 8 - tz.transition 1945, 4, :o2, 29178737, 12 - tz.transition 1945, 10, :o1, 19454083, 8 - tz.transition 1957, 5, :o2, 29231621, 12 - tz.transition 1957, 9, :o1, 19488899, 8 - tz.transition 1958, 4, :o2, 29235893, 12 - tz.transition 1958, 9, :o1, 19491819, 8 - tz.transition 1959, 4, :o2, 58480547, 24 - tz.transition 1959, 9, :o1, 4873683, 2 - tz.transition 1960, 4, :o2, 58489331, 24 - tz.transition 1960, 9, :o1, 4874415, 2 - tz.transition 1961, 4, :o2, 58498091, 24 - tz.transition 1961, 9, :o1, 4875145, 2 - tz.transition 1962, 4, :o2, 58506851, 24 - tz.transition 1962, 9, :o1, 4875875, 2 - tz.transition 1963, 4, :o2, 58515611, 24 - tz.transition 1963, 9, :o1, 4876605, 2 - tz.transition 1964, 4, :o2, 58524395, 24 - tz.transition 1964, 9, :o1, 4877337, 2 - tz.transition 1965, 4, :o2, 58533155, 24 - tz.transition 1965, 9, :o1, 4878067, 2 - tz.transition 1966, 4, :o2, 58541915, 24 - tz.transition 1966, 10, :o1, 4878799, 2 - tz.transition 1967, 4, :o2, 58550675, 24 - tz.transition 1967, 10, :o1, 4879529, 2 - tz.transition 1968, 4, :o2, 58559459, 24 - tz.transition 1968, 10, :o1, 4880261, 2 - tz.transition 1969, 4, :o2, 58568219, 24 - tz.transition 1969, 10, :o1, 4880991, 2 - tz.transition 1970, 4, :o2, 10364400 - tz.transition 1970, 10, :o1, 23587200 - tz.transition 1971, 4, :o2, 41900400 - tz.transition 1971, 10, :o1, 55123200 - tz.transition 1972, 4, :o2, 73522800 - tz.transition 1972, 10, :o1, 86745600 - tz.transition 1973, 4, :o2, 105058800 - tz.transition 1973, 10, :o1, 118281600 - tz.transition 1974, 4, :o2, 136594800 - tz.transition 1974, 10, :o1, 149817600 - tz.transition 1975, 4, :o2, 168130800 - tz.transition 1975, 10, :o1, 181353600 - tz.transition 1976, 4, :o2, 199753200 - tz.transition 1976, 10, :o1, 212976000 - tz.transition 1977, 4, :o2, 231289200 - tz.transition 1977, 10, :o1, 244512000 - tz.transition 1978, 4, :o2, 262825200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 294361200 - tz.transition 1979, 10, :o1, 307584000 - tz.transition 1980, 4, :o2, 325983600 - tz.transition 1980, 10, :o1, 339206400 - tz.transition 1981, 4, :o2, 357519600 - tz.transition 1981, 10, :o1, 370742400 - tz.transition 1982, 7, :o2, 396399600 - tz.transition 1982, 10, :o1, 402278400 - tz.transition 1983, 7, :o2, 426812400 - tz.transition 1983, 10, :o1, 433814400 - tz.transition 1984, 4, :o2, 452214000 - tz.transition 1984, 10, :o1, 465436800 - tz.transition 1985, 4, :o2, 483750000 - tz.transition 1985, 10, :o1, 496972800 - tz.transition 1986, 4, :o2, 515286000 - tz.transition 1986, 10, :o1, 528508800 - tz.transition 1987, 4, :o2, 546822000 - tz.transition 1987, 10, :o1, 560044800 - tz.transition 1988, 4, :o2, 578444400 - tz.transition 1988, 10, :o1, 591667200 - tz.transition 1989, 5, :o2, 610412400 - tz.transition 1989, 10, :o1, 623203200 - tz.transition 1990, 4, :o2, 641516400 - tz.transition 1990, 10, :o1, 654739200 - tz.transition 1991, 4, :o2, 673052400 - tz.transition 1991, 10, :o1, 686275200 - tz.transition 1992, 4, :o2, 704674800 - tz.transition 1992, 10, :o1, 717897600 - tz.transition 1993, 4, :o2, 736210800 - tz.transition 1993, 10, :o1, 749433600 - tz.transition 1994, 4, :o2, 767746800 - tz.transition 1994, 10, :o1, 780969600 - tz.transition 1995, 4, :o2, 799020000 - tz.transition 1995, 9, :o1, 812322000 - tz.transition 1996, 4, :o2, 830469600 - tz.transition 1996, 9, :o1, 843771600 - tz.transition 1997, 4, :o2, 861919200 - tz.transition 1997, 9, :o1, 875221200 - tz.transition 1998, 4, :o2, 893368800 - tz.transition 1998, 9, :o1, 906670800 - tz.transition 1999, 4, :o2, 925423200 - tz.transition 1999, 9, :o1, 938725200 - tz.transition 2000, 4, :o2, 956872800 - tz.transition 2000, 9, :o1, 970174800 - tz.transition 2001, 4, :o2, 988322400 - tz.transition 2001, 9, :o1, 1001624400 - tz.transition 2002, 4, :o2, 1019772000 - tz.transition 2002, 9, :o1, 1033074000 - tz.transition 2003, 4, :o2, 1051221600 - tz.transition 2003, 9, :o1, 1064523600 - tz.transition 2004, 4, :o2, 1083276000 - tz.transition 2004, 9, :o1, 1096578000 - tz.transition 2005, 4, :o2, 1114725600 - tz.transition 2005, 9, :o1, 1128027600 - tz.transition 2006, 4, :o2, 1146175200 - tz.transition 2006, 9, :o1, 1158872400 - tz.transition 2007, 4, :o2, 1177624800 - tz.transition 2007, 9, :o1, 1189112400 - tz.transition 2008, 4, :o2, 1209074400 - tz.transition 2008, 8, :o1, 1219957200 - tz.transition 2009, 4, :o2, 1240524000 - tz.transition 2009, 8, :o1, 1251406800 - tz.transition 2010, 4, :o2, 1272578400 - tz.transition 2010, 8, :o1, 1282856400 - tz.transition 2011, 4, :o2, 1304028000 - tz.transition 2011, 8, :o1, 1314306000 - tz.transition 2012, 4, :o2, 1335477600 - tz.transition 2012, 8, :o1, 1346360400 - tz.transition 2013, 4, :o2, 1366927200 - tz.transition 2013, 8, :o1, 1377810000 - tz.transition 2014, 4, :o2, 1398376800 - tz.transition 2014, 8, :o1, 1409259600 - tz.transition 2015, 4, :o2, 1429826400 - tz.transition 2015, 8, :o1, 1440709200 - tz.transition 2016, 4, :o2, 1461880800 - tz.transition 2016, 8, :o1, 1472158800 - tz.transition 2017, 4, :o2, 1493330400 - tz.transition 2017, 8, :o1, 1504213200 - tz.transition 2018, 4, :o2, 1524780000 - tz.transition 2018, 8, :o1, 1535662800 - tz.transition 2019, 4, :o2, 1556229600 - tz.transition 2019, 8, :o1, 1567112400 - tz.transition 2020, 4, :o2, 1587679200 - tz.transition 2020, 8, :o1, 1598562000 - tz.transition 2021, 4, :o2, 1619733600 - tz.transition 2021, 8, :o1, 1630011600 - tz.transition 2022, 4, :o2, 1651183200 - tz.transition 2022, 8, :o1, 1661461200 - tz.transition 2023, 4, :o2, 1682632800 - tz.transition 2023, 8, :o1, 1693515600 - tz.transition 2024, 4, :o2, 1714082400 - tz.transition 2024, 8, :o1, 1724965200 - tz.transition 2025, 4, :o2, 1745532000 - tz.transition 2025, 8, :o1, 1756414800 - tz.transition 2026, 4, :o2, 1776981600 - tz.transition 2026, 8, :o1, 1787864400 - tz.transition 2027, 4, :o2, 1809036000 - tz.transition 2027, 8, :o1, 1819314000 - tz.transition 2028, 4, :o2, 1840485600 - tz.transition 2028, 8, :o1, 1851368400 - tz.transition 2029, 4, :o2, 1871935200 - tz.transition 2029, 8, :o1, 1882818000 - tz.transition 2030, 4, :o2, 1903384800 - tz.transition 2030, 8, :o1, 1914267600 - tz.transition 2031, 4, :o2, 1934834400 - tz.transition 2031, 8, :o1, 1945717200 - tz.transition 2032, 4, :o2, 1966888800 - tz.transition 2032, 8, :o1, 1977166800 - tz.transition 2033, 4, :o2, 1998338400 - tz.transition 2033, 8, :o1, 2008616400 - tz.transition 2034, 4, :o2, 2029788000 - tz.transition 2034, 8, :o1, 2040670800 - tz.transition 2035, 4, :o2, 2061237600 - tz.transition 2035, 8, :o1, 2072120400 - tz.transition 2036, 4, :o2, 2092687200 - tz.transition 2036, 8, :o1, 2103570000 - tz.transition 2037, 4, :o2, 2124136800 - tz.transition 2037, 8, :o1, 2135019600 - tz.transition 2038, 4, :o2, 29586521, 12 - tz.transition 2038, 8, :o1, 19725299, 8 - tz.transition 2039, 4, :o2, 29590889, 12 - tz.transition 2039, 8, :o1, 19728211, 8 - tz.transition 2040, 4, :o2, 29595257, 12 - tz.transition 2040, 8, :o1, 19731179, 8 - tz.transition 2041, 4, :o2, 29599625, 12 - tz.transition 2041, 8, :o1, 19734091, 8 - tz.transition 2042, 4, :o2, 29603993, 12 - tz.transition 2042, 8, :o1, 19737003, 8 - tz.transition 2043, 4, :o2, 29608361, 12 - tz.transition 2043, 8, :o1, 19739915, 8 - tz.transition 2044, 4, :o2, 29612813, 12 - tz.transition 2044, 8, :o1, 19742827, 8 - tz.transition 2045, 4, :o2, 29617181, 12 - tz.transition 2045, 8, :o1, 19745795, 8 - tz.transition 2046, 4, :o2, 29621549, 12 - tz.transition 2046, 8, :o1, 19748707, 8 - tz.transition 2047, 4, :o2, 29625917, 12 - tz.transition 2047, 8, :o1, 19751619, 8 - tz.transition 2048, 4, :o2, 29630285, 12 - tz.transition 2048, 8, :o1, 19754531, 8 - tz.transition 2049, 4, :o2, 29634737, 12 - tz.transition 2049, 8, :o1, 19757443, 8 - tz.transition 2050, 4, :o2, 29639105, 12 - tz.transition 2050, 8, :o1, 19760355, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb deleted file mode 100644 index d1eb5c572..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Casablanca.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Casablanca - include TimezoneDefinition - - timezone 'Africa/Casablanca' do |tz| - tz.offset :o0, -1820, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 3600, 0, :CET - - tz.transition 1913, 10, :o1, 10454687371, 4320 - tz.transition 1939, 9, :o2, 4859037, 2 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 4859369, 2 - tz.transition 1945, 11, :o1, 58362659, 24 - tz.transition 1950, 6, :o2, 4866887, 2 - tz.transition 1950, 10, :o1, 58406003, 24 - tz.transition 1967, 6, :o2, 2439645, 1 - tz.transition 1967, 9, :o1, 58554347, 24 - tz.transition 1974, 6, :o2, 141264000 - tz.transition 1974, 8, :o1, 147222000 - tz.transition 1976, 5, :o2, 199756800 - tz.transition 1976, 7, :o1, 207702000 - tz.transition 1977, 5, :o2, 231292800 - tz.transition 1977, 9, :o1, 244249200 - tz.transition 1978, 6, :o2, 265507200 - tz.transition 1978, 8, :o1, 271033200 - tz.transition 1984, 3, :o3, 448243200 - tz.transition 1985, 12, :o1, 504918000 - tz.transition 2008, 6, :o2, 1212278400 - tz.transition 2008, 8, :o1, 1220223600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb deleted file mode 100644 index 070c95ae0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Harare.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Harare - include TimezoneDefinition - - timezone 'Africa/Harare' do |tz| - tz.offset :o0, 7452, 0, :LMT - tz.offset :o1, 7200, 0, :CAT - - tz.transition 1903, 2, :o1, 1932939531, 800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb deleted file mode 100644 index f0af0d8e3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Johannesburg.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Johannesburg - include TimezoneDefinition - - timezone 'Africa/Johannesburg' do |tz| - tz.offset :o0, 6720, 0, :LMT - tz.offset :o1, 5400, 0, :SAST - tz.offset :o2, 7200, 0, :SAST - tz.offset :o3, 7200, 3600, :SAST - - tz.transition 1892, 2, :o1, 108546139, 45 - tz.transition 1903, 2, :o2, 38658791, 16 - tz.transition 1942, 9, :o3, 4861245, 2 - tz.transition 1943, 3, :o2, 58339307, 24 - tz.transition 1943, 9, :o3, 4861973, 2 - tz.transition 1944, 3, :o2, 58348043, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb deleted file mode 100644 index 40e711fa4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Monrovia.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Monrovia - include TimezoneDefinition - - timezone 'Africa/Monrovia' do |tz| - tz.offset :o0, -2588, 0, :LMT - tz.offset :o1, -2588, 0, :MMT - tz.offset :o2, -2670, 0, :LRT - tz.offset :o3, 0, 0, :GMT - - tz.transition 1882, 1, :o1, 52022445047, 21600 - tz.transition 1919, 3, :o2, 52315600247, 21600 - tz.transition 1972, 5, :o3, 73529070 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb deleted file mode 100644 index 7b0a2f43b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Africa/Nairobi.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Africa - module Nairobi - include TimezoneDefinition - - timezone 'Africa/Nairobi' do |tz| - tz.offset :o0, 8836, 0, :LMT - tz.offset :o1, 10800, 0, :EAT - tz.offset :o2, 9000, 0, :BEAT - tz.offset :o3, 9885, 0, :BEAUT - - tz.transition 1928, 6, :o1, 52389253391, 21600 - tz.transition 1929, 12, :o2, 19407819, 8 - tz.transition 1939, 12, :o3, 116622211, 48 - tz.transition 1959, 12, :o1, 14036742061, 5760 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb deleted file mode 100644 index 8f4dd31db..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/Buenos_Aires.rb +++ /dev/null @@ -1,166 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Argentina - module Buenos_Aires - include TimezoneDefinition - - timezone 'America/Argentina/Buenos_Aires' do |tz| - tz.offset :o0, -14028, 0, :LMT - tz.offset :o1, -15408, 0, :CMT - tz.offset :o2, -14400, 0, :ART - tz.offset :o3, -14400, 3600, :ARST - tz.offset :o4, -10800, 0, :ART - tz.offset :o5, -10800, 3600, :ARST - - tz.transition 1894, 10, :o1, 17374555169, 7200 - tz.transition 1920, 5, :o2, 1453467407, 600 - tz.transition 1930, 12, :o3, 7278935, 3 - tz.transition 1931, 4, :o2, 19411461, 8 - tz.transition 1931, 10, :o3, 7279889, 3 - tz.transition 1932, 3, :o2, 19414141, 8 - tz.transition 1932, 11, :o3, 7281038, 3 - tz.transition 1933, 3, :o2, 19417061, 8 - tz.transition 1933, 11, :o3, 7282133, 3 - tz.transition 1934, 3, :o2, 19419981, 8 - tz.transition 1934, 11, :o3, 7283228, 3 - tz.transition 1935, 3, :o2, 19422901, 8 - tz.transition 1935, 11, :o3, 7284323, 3 - tz.transition 1936, 3, :o2, 19425829, 8 - tz.transition 1936, 11, :o3, 7285421, 3 - tz.transition 1937, 3, :o2, 19428749, 8 - tz.transition 1937, 11, :o3, 7286516, 3 - tz.transition 1938, 3, :o2, 19431669, 8 - tz.transition 1938, 11, :o3, 7287611, 3 - tz.transition 1939, 3, :o2, 19434589, 8 - tz.transition 1939, 11, :o3, 7288706, 3 - tz.transition 1940, 3, :o2, 19437517, 8 - tz.transition 1940, 7, :o3, 7289435, 3 - tz.transition 1941, 6, :o2, 19441285, 8 - tz.transition 1941, 10, :o3, 7290848, 3 - tz.transition 1943, 8, :o2, 19447501, 8 - tz.transition 1943, 10, :o3, 7293038, 3 - tz.transition 1946, 3, :o2, 19455045, 8 - tz.transition 1946, 10, :o3, 7296284, 3 - tz.transition 1963, 10, :o2, 19506429, 8 - tz.transition 1963, 12, :o3, 7315136, 3 - tz.transition 1964, 3, :o2, 19507645, 8 - tz.transition 1964, 10, :o3, 7316051, 3 - tz.transition 1965, 3, :o2, 19510565, 8 - tz.transition 1965, 10, :o3, 7317146, 3 - tz.transition 1966, 3, :o2, 19513485, 8 - tz.transition 1966, 10, :o3, 7318241, 3 - tz.transition 1967, 4, :o2, 19516661, 8 - tz.transition 1967, 10, :o3, 7319294, 3 - tz.transition 1968, 4, :o2, 19519629, 8 - tz.transition 1968, 10, :o3, 7320407, 3 - tz.transition 1969, 4, :o2, 19522541, 8 - tz.transition 1969, 10, :o4, 7321499, 3 - tz.transition 1974, 1, :o5, 128142000 - tz.transition 1974, 5, :o4, 136605600 - tz.transition 1988, 12, :o5, 596948400 - tz.transition 1989, 3, :o4, 605066400 - tz.transition 1989, 10, :o5, 624423600 - tz.transition 1990, 3, :o4, 636516000 - tz.transition 1990, 10, :o5, 656478000 - tz.transition 1991, 3, :o4, 667965600 - tz.transition 1991, 10, :o5, 687927600 - tz.transition 1992, 3, :o4, 699415200 - tz.transition 1992, 10, :o5, 719377200 - tz.transition 1993, 3, :o4, 731469600 - tz.transition 1999, 10, :o3, 938919600 - tz.transition 2000, 3, :o4, 952052400 - tz.transition 2007, 12, :o5, 1198983600 - tz.transition 2008, 3, :o4, 1205632800 - tz.transition 2008, 10, :o5, 1224385200 - tz.transition 2009, 3, :o4, 1237082400 - tz.transition 2009, 10, :o5, 1255834800 - tz.transition 2010, 3, :o4, 1269136800 - tz.transition 2010, 10, :o5, 1287284400 - tz.transition 2011, 3, :o4, 1300586400 - tz.transition 2011, 10, :o5, 1318734000 - tz.transition 2012, 3, :o4, 1332036000 - tz.transition 2012, 10, :o5, 1350788400 - tz.transition 2013, 3, :o4, 1363485600 - tz.transition 2013, 10, :o5, 1382238000 - tz.transition 2014, 3, :o4, 1394935200 - tz.transition 2014, 10, :o5, 1413687600 - tz.transition 2015, 3, :o4, 1426384800 - tz.transition 2015, 10, :o5, 1445137200 - tz.transition 2016, 3, :o4, 1458439200 - tz.transition 2016, 10, :o5, 1476586800 - tz.transition 2017, 3, :o4, 1489888800 - tz.transition 2017, 10, :o5, 1508036400 - tz.transition 2018, 3, :o4, 1521338400 - tz.transition 2018, 10, :o5, 1540090800 - tz.transition 2019, 3, :o4, 1552788000 - tz.transition 2019, 10, :o5, 1571540400 - tz.transition 2020, 3, :o4, 1584237600 - tz.transition 2020, 10, :o5, 1602990000 - tz.transition 2021, 3, :o4, 1616292000 - tz.transition 2021, 10, :o5, 1634439600 - tz.transition 2022, 3, :o4, 1647741600 - tz.transition 2022, 10, :o5, 1665889200 - tz.transition 2023, 3, :o4, 1679191200 - tz.transition 2023, 10, :o5, 1697338800 - tz.transition 2024, 3, :o4, 1710640800 - tz.transition 2024, 10, :o5, 1729393200 - tz.transition 2025, 3, :o4, 1742090400 - tz.transition 2025, 10, :o5, 1760842800 - tz.transition 2026, 3, :o4, 1773540000 - tz.transition 2026, 10, :o5, 1792292400 - tz.transition 2027, 3, :o4, 1805594400 - tz.transition 2027, 10, :o5, 1823742000 - tz.transition 2028, 3, :o4, 1837044000 - tz.transition 2028, 10, :o5, 1855191600 - tz.transition 2029, 3, :o4, 1868493600 - tz.transition 2029, 10, :o5, 1887246000 - tz.transition 2030, 3, :o4, 1899943200 - tz.transition 2030, 10, :o5, 1918695600 - tz.transition 2031, 3, :o4, 1931392800 - tz.transition 2031, 10, :o5, 1950145200 - tz.transition 2032, 3, :o4, 1963447200 - tz.transition 2032, 10, :o5, 1981594800 - tz.transition 2033, 3, :o4, 1994896800 - tz.transition 2033, 10, :o5, 2013044400 - tz.transition 2034, 3, :o4, 2026346400 - tz.transition 2034, 10, :o5, 2044494000 - tz.transition 2035, 3, :o4, 2057796000 - tz.transition 2035, 10, :o5, 2076548400 - tz.transition 2036, 3, :o4, 2089245600 - tz.transition 2036, 10, :o5, 2107998000 - tz.transition 2037, 3, :o4, 2120695200 - tz.transition 2037, 10, :o5, 2139447600 - tz.transition 2038, 3, :o4, 29586043, 12 - tz.transition 2038, 10, :o5, 19725709, 8 - tz.transition 2039, 3, :o4, 29590411, 12 - tz.transition 2039, 10, :o5, 19728621, 8 - tz.transition 2040, 3, :o4, 29594779, 12 - tz.transition 2040, 10, :o5, 19731589, 8 - tz.transition 2041, 3, :o4, 29599147, 12 - tz.transition 2041, 10, :o5, 19734501, 8 - tz.transition 2042, 3, :o4, 29603515, 12 - tz.transition 2042, 10, :o5, 19737413, 8 - tz.transition 2043, 3, :o4, 29607883, 12 - tz.transition 2043, 10, :o5, 19740325, 8 - tz.transition 2044, 3, :o4, 29612335, 12 - tz.transition 2044, 10, :o5, 19743237, 8 - tz.transition 2045, 3, :o4, 29616703, 12 - tz.transition 2045, 10, :o5, 19746149, 8 - tz.transition 2046, 3, :o4, 29621071, 12 - tz.transition 2046, 10, :o5, 19749117, 8 - tz.transition 2047, 3, :o4, 29625439, 12 - tz.transition 2047, 10, :o5, 19752029, 8 - tz.transition 2048, 3, :o4, 29629807, 12 - tz.transition 2048, 10, :o5, 19754941, 8 - tz.transition 2049, 3, :o4, 29634259, 12 - tz.transition 2049, 10, :o5, 19757853, 8 - tz.transition 2050, 3, :o4, 29638627, 12 - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb deleted file mode 100644 index ba8be4705..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Argentina/San_Juan.rb +++ /dev/null @@ -1,86 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Argentina - module San_Juan - include TimezoneDefinition - - timezone 'America/Argentina/San_Juan' do |tz| - tz.offset :o0, -16444, 0, :LMT - tz.offset :o1, -15408, 0, :CMT - tz.offset :o2, -14400, 0, :ART - tz.offset :o3, -14400, 3600, :ARST - tz.offset :o4, -10800, 0, :ART - tz.offset :o5, -10800, 3600, :ARST - tz.offset :o6, -14400, 0, :WART - - tz.transition 1894, 10, :o1, 52123666111, 21600 - tz.transition 1920, 5, :o2, 1453467407, 600 - tz.transition 1930, 12, :o3, 7278935, 3 - tz.transition 1931, 4, :o2, 19411461, 8 - tz.transition 1931, 10, :o3, 7279889, 3 - tz.transition 1932, 3, :o2, 19414141, 8 - tz.transition 1932, 11, :o3, 7281038, 3 - tz.transition 1933, 3, :o2, 19417061, 8 - tz.transition 1933, 11, :o3, 7282133, 3 - tz.transition 1934, 3, :o2, 19419981, 8 - tz.transition 1934, 11, :o3, 7283228, 3 - tz.transition 1935, 3, :o2, 19422901, 8 - tz.transition 1935, 11, :o3, 7284323, 3 - tz.transition 1936, 3, :o2, 19425829, 8 - tz.transition 1936, 11, :o3, 7285421, 3 - tz.transition 1937, 3, :o2, 19428749, 8 - tz.transition 1937, 11, :o3, 7286516, 3 - tz.transition 1938, 3, :o2, 19431669, 8 - tz.transition 1938, 11, :o3, 7287611, 3 - tz.transition 1939, 3, :o2, 19434589, 8 - tz.transition 1939, 11, :o3, 7288706, 3 - tz.transition 1940, 3, :o2, 19437517, 8 - tz.transition 1940, 7, :o3, 7289435, 3 - tz.transition 1941, 6, :o2, 19441285, 8 - tz.transition 1941, 10, :o3, 7290848, 3 - tz.transition 1943, 8, :o2, 19447501, 8 - tz.transition 1943, 10, :o3, 7293038, 3 - tz.transition 1946, 3, :o2, 19455045, 8 - tz.transition 1946, 10, :o3, 7296284, 3 - tz.transition 1963, 10, :o2, 19506429, 8 - tz.transition 1963, 12, :o3, 7315136, 3 - tz.transition 1964, 3, :o2, 19507645, 8 - tz.transition 1964, 10, :o3, 7316051, 3 - tz.transition 1965, 3, :o2, 19510565, 8 - tz.transition 1965, 10, :o3, 7317146, 3 - tz.transition 1966, 3, :o2, 19513485, 8 - tz.transition 1966, 10, :o3, 7318241, 3 - tz.transition 1967, 4, :o2, 19516661, 8 - tz.transition 1967, 10, :o3, 7319294, 3 - tz.transition 1968, 4, :o2, 19519629, 8 - tz.transition 1968, 10, :o3, 7320407, 3 - tz.transition 1969, 4, :o2, 19522541, 8 - tz.transition 1969, 10, :o4, 7321499, 3 - tz.transition 1974, 1, :o5, 128142000 - tz.transition 1974, 5, :o4, 136605600 - tz.transition 1988, 12, :o5, 596948400 - tz.transition 1989, 3, :o4, 605066400 - tz.transition 1989, 10, :o5, 624423600 - tz.transition 1990, 3, :o4, 636516000 - tz.transition 1990, 10, :o5, 656478000 - tz.transition 1991, 3, :o6, 667792800 - tz.transition 1991, 5, :o4, 673588800 - tz.transition 1991, 10, :o5, 687927600 - tz.transition 1992, 3, :o4, 699415200 - tz.transition 1992, 10, :o5, 719377200 - tz.transition 1993, 3, :o4, 731469600 - tz.transition 1999, 10, :o3, 938919600 - tz.transition 2000, 3, :o4, 952052400 - tz.transition 2004, 5, :o6, 1085972400 - tz.transition 2004, 7, :o4, 1090728000 - tz.transition 2007, 12, :o5, 1198983600 - tz.transition 2008, 3, :o4, 1205632800 - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb deleted file mode 100644 index ef96435c6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Bogota.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Bogota - include TimezoneDefinition - - timezone 'America/Bogota' do |tz| - tz.offset :o0, -17780, 0, :LMT - tz.offset :o1, -17780, 0, :BMT - tz.offset :o2, -18000, 0, :COT - tz.offset :o3, -18000, 3600, :COST - - tz.transition 1884, 3, :o1, 10407954409, 4320 - tz.transition 1914, 11, :o2, 10456385929, 4320 - tz.transition 1992, 5, :o3, 704869200 - tz.transition 1993, 4, :o2, 733896000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb deleted file mode 100644 index 27392a540..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Caracas.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Caracas - include TimezoneDefinition - - timezone 'America/Caracas' do |tz| - tz.offset :o0, -16064, 0, :LMT - tz.offset :o1, -16060, 0, :CMT - tz.offset :o2, -16200, 0, :VET - tz.offset :o3, -14400, 0, :VET - - tz.transition 1890, 1, :o1, 1627673863, 675 - tz.transition 1912, 2, :o2, 10452001043, 4320 - tz.transition 1965, 1, :o3, 39020187, 16 - tz.transition 2007, 12, :o2, 1197183600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb deleted file mode 100644 index 0996857cf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chicago.rb +++ /dev/null @@ -1,283 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chicago - include TimezoneDefinition - - timezone 'America/Chicago' do |tz| - tz.offset :o0, -21036, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -18000, 0, :EST - tz.offset :o4, -21600, 3600, :CWT - tz.offset :o5, -21600, 3600, :CPT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1920, 6, :o2, 14534933, 6 - tz.transition 1920, 10, :o1, 58143091, 24 - tz.transition 1921, 3, :o2, 14536655, 6 - tz.transition 1921, 10, :o1, 58151827, 24 - tz.transition 1922, 4, :o2, 14539049, 6 - tz.transition 1922, 9, :o1, 58159723, 24 - tz.transition 1923, 4, :o2, 14541233, 6 - tz.transition 1923, 9, :o1, 58168627, 24 - tz.transition 1924, 4, :o2, 14543417, 6 - tz.transition 1924, 9, :o1, 58177363, 24 - tz.transition 1925, 4, :o2, 14545601, 6 - tz.transition 1925, 9, :o1, 58186099, 24 - tz.transition 1926, 4, :o2, 14547785, 6 - tz.transition 1926, 9, :o1, 58194835, 24 - tz.transition 1927, 4, :o2, 14549969, 6 - tz.transition 1927, 9, :o1, 58203571, 24 - tz.transition 1928, 4, :o2, 14552195, 6 - tz.transition 1928, 9, :o1, 58212475, 24 - tz.transition 1929, 4, :o2, 14554379, 6 - tz.transition 1929, 9, :o1, 58221211, 24 - tz.transition 1930, 4, :o2, 14556563, 6 - tz.transition 1930, 9, :o1, 58229947, 24 - tz.transition 1931, 4, :o2, 14558747, 6 - tz.transition 1931, 9, :o1, 58238683, 24 - tz.transition 1932, 4, :o2, 14560931, 6 - tz.transition 1932, 9, :o1, 58247419, 24 - tz.transition 1933, 4, :o2, 14563157, 6 - tz.transition 1933, 9, :o1, 58256155, 24 - tz.transition 1934, 4, :o2, 14565341, 6 - tz.transition 1934, 9, :o1, 58265059, 24 - tz.transition 1935, 4, :o2, 14567525, 6 - tz.transition 1935, 9, :o1, 58273795, 24 - tz.transition 1936, 3, :o3, 14569373, 6 - tz.transition 1936, 11, :o1, 58283707, 24 - tz.transition 1937, 4, :o2, 14571893, 6 - tz.transition 1937, 9, :o1, 58291267, 24 - tz.transition 1938, 4, :o2, 14574077, 6 - tz.transition 1938, 9, :o1, 58300003, 24 - tz.transition 1939, 4, :o2, 14576303, 6 - tz.transition 1939, 9, :o1, 58308739, 24 - tz.transition 1940, 4, :o2, 14578487, 6 - tz.transition 1940, 9, :o1, 58317643, 24 - tz.transition 1941, 4, :o2, 14580671, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o4, 14582399, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o2, 14611331, 6 - tz.transition 1955, 10, :o1, 58449859, 24 - tz.transition 1956, 4, :o2, 14613557, 6 - tz.transition 1956, 10, :o1, 58458595, 24 - tz.transition 1957, 4, :o2, 14615741, 6 - tz.transition 1957, 10, :o1, 58467331, 24 - tz.transition 1958, 4, :o2, 14617925, 6 - tz.transition 1958, 10, :o1, 58476067, 24 - tz.transition 1959, 4, :o2, 14620109, 6 - tz.transition 1959, 10, :o1, 58484803, 24 - tz.transition 1960, 4, :o2, 14622293, 6 - tz.transition 1960, 10, :o1, 58493707, 24 - tz.transition 1961, 4, :o2, 14624519, 6 - tz.transition 1961, 10, :o1, 58502443, 24 - tz.transition 1962, 4, :o2, 14626703, 6 - tz.transition 1962, 10, :o1, 58511179, 24 - tz.transition 1963, 4, :o2, 14628887, 6 - tz.transition 1963, 10, :o1, 58519915, 24 - tz.transition 1964, 4, :o2, 14631071, 6 - tz.transition 1964, 10, :o1, 58528651, 24 - tz.transition 1965, 4, :o2, 14633255, 6 - tz.transition 1965, 10, :o1, 58537555, 24 - tz.transition 1966, 4, :o2, 14635439, 6 - tz.transition 1966, 10, :o1, 58546291, 24 - tz.transition 1967, 4, :o2, 14637665, 6 - tz.transition 1967, 10, :o1, 58555027, 24 - tz.transition 1968, 4, :o2, 14639849, 6 - tz.transition 1968, 10, :o1, 58563763, 24 - tz.transition 1969, 4, :o2, 14642033, 6 - tz.transition 1969, 10, :o1, 58572499, 24 - tz.transition 1970, 4, :o2, 9964800 - tz.transition 1970, 10, :o1, 25686000 - tz.transition 1971, 4, :o2, 41414400 - tz.transition 1971, 10, :o1, 57740400 - tz.transition 1972, 4, :o2, 73468800 - tz.transition 1972, 10, :o1, 89190000 - tz.transition 1973, 4, :o2, 104918400 - tz.transition 1973, 10, :o1, 120639600 - tz.transition 1974, 1, :o2, 126691200 - tz.transition 1974, 10, :o1, 152089200 - tz.transition 1975, 2, :o2, 162374400 - tz.transition 1975, 10, :o1, 183538800 - tz.transition 1976, 4, :o2, 199267200 - tz.transition 1976, 10, :o1, 215593200 - tz.transition 1977, 4, :o2, 230716800 - tz.transition 1977, 10, :o1, 247042800 - tz.transition 1978, 4, :o2, 262771200 - tz.transition 1978, 10, :o1, 278492400 - tz.transition 1979, 4, :o2, 294220800 - tz.transition 1979, 10, :o1, 309942000 - tz.transition 1980, 4, :o2, 325670400 - tz.transition 1980, 10, :o1, 341391600 - tz.transition 1981, 4, :o2, 357120000 - tz.transition 1981, 10, :o1, 372841200 - tz.transition 1982, 4, :o2, 388569600 - tz.transition 1982, 10, :o1, 404895600 - tz.transition 1983, 4, :o2, 420019200 - tz.transition 1983, 10, :o1, 436345200 - tz.transition 1984, 4, :o2, 452073600 - tz.transition 1984, 10, :o1, 467794800 - tz.transition 1985, 4, :o2, 483523200 - tz.transition 1985, 10, :o1, 499244400 - tz.transition 1986, 4, :o2, 514972800 - tz.transition 1986, 10, :o1, 530694000 - tz.transition 1987, 4, :o2, 544608000 - tz.transition 1987, 10, :o1, 562143600 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1989, 4, :o2, 607507200 - tz.transition 1989, 10, :o1, 625647600 - tz.transition 1990, 4, :o2, 638956800 - tz.transition 1990, 10, :o1, 657097200 - tz.transition 1991, 4, :o2, 671011200 - tz.transition 1991, 10, :o1, 688546800 - tz.transition 1992, 4, :o2, 702460800 - tz.transition 1992, 10, :o1, 719996400 - tz.transition 1993, 4, :o2, 733910400 - tz.transition 1993, 10, :o1, 752050800 - tz.transition 1994, 4, :o2, 765360000 - tz.transition 1994, 10, :o1, 783500400 - tz.transition 1995, 4, :o2, 796809600 - tz.transition 1995, 10, :o1, 814950000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 4, :o2, 986112000 - tz.transition 2001, 10, :o1, 1004252400 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 3, :o2, 1173600000 - tz.transition 2007, 11, :o1, 1194159600 - tz.transition 2008, 3, :o2, 1205049600 - tz.transition 2008, 11, :o1, 1225609200 - tz.transition 2009, 3, :o2, 1236499200 - tz.transition 2009, 11, :o1, 1257058800 - tz.transition 2010, 3, :o2, 1268553600 - tz.transition 2010, 11, :o1, 1289113200 - tz.transition 2011, 3, :o2, 1300003200 - tz.transition 2011, 11, :o1, 1320562800 - tz.transition 2012, 3, :o2, 1331452800 - tz.transition 2012, 11, :o1, 1352012400 - tz.transition 2013, 3, :o2, 1362902400 - tz.transition 2013, 11, :o1, 1383462000 - tz.transition 2014, 3, :o2, 1394352000 - tz.transition 2014, 11, :o1, 1414911600 - tz.transition 2015, 3, :o2, 1425801600 - tz.transition 2015, 11, :o1, 1446361200 - tz.transition 2016, 3, :o2, 1457856000 - tz.transition 2016, 11, :o1, 1478415600 - tz.transition 2017, 3, :o2, 1489305600 - tz.transition 2017, 11, :o1, 1509865200 - tz.transition 2018, 3, :o2, 1520755200 - tz.transition 2018, 11, :o1, 1541314800 - tz.transition 2019, 3, :o2, 1552204800 - tz.transition 2019, 11, :o1, 1572764400 - tz.transition 2020, 3, :o2, 1583654400 - tz.transition 2020, 11, :o1, 1604214000 - tz.transition 2021, 3, :o2, 1615708800 - tz.transition 2021, 11, :o1, 1636268400 - tz.transition 2022, 3, :o2, 1647158400 - tz.transition 2022, 11, :o1, 1667718000 - tz.transition 2023, 3, :o2, 1678608000 - tz.transition 2023, 11, :o1, 1699167600 - tz.transition 2024, 3, :o2, 1710057600 - tz.transition 2024, 11, :o1, 1730617200 - tz.transition 2025, 3, :o2, 1741507200 - tz.transition 2025, 11, :o1, 1762066800 - tz.transition 2026, 3, :o2, 1772956800 - tz.transition 2026, 11, :o1, 1793516400 - tz.transition 2027, 3, :o2, 1805011200 - tz.transition 2027, 11, :o1, 1825570800 - tz.transition 2028, 3, :o2, 1836460800 - tz.transition 2028, 11, :o1, 1857020400 - tz.transition 2029, 3, :o2, 1867910400 - tz.transition 2029, 11, :o1, 1888470000 - tz.transition 2030, 3, :o2, 1899360000 - tz.transition 2030, 11, :o1, 1919919600 - tz.transition 2031, 3, :o2, 1930809600 - tz.transition 2031, 11, :o1, 1951369200 - tz.transition 2032, 3, :o2, 1962864000 - tz.transition 2032, 11, :o1, 1983423600 - tz.transition 2033, 3, :o2, 1994313600 - tz.transition 2033, 11, :o1, 2014873200 - tz.transition 2034, 3, :o2, 2025763200 - tz.transition 2034, 11, :o1, 2046322800 - tz.transition 2035, 3, :o2, 2057212800 - tz.transition 2035, 11, :o1, 2077772400 - tz.transition 2036, 3, :o2, 2088662400 - tz.transition 2036, 11, :o1, 2109222000 - tz.transition 2037, 3, :o2, 2120112000 - tz.transition 2037, 11, :o1, 2140671600 - tz.transition 2038, 3, :o2, 14792981, 6 - tz.transition 2038, 11, :o1, 59177635, 24 - tz.transition 2039, 3, :o2, 14795165, 6 - tz.transition 2039, 11, :o1, 59186371, 24 - tz.transition 2040, 3, :o2, 14797349, 6 - tz.transition 2040, 11, :o1, 59195107, 24 - tz.transition 2041, 3, :o2, 14799533, 6 - tz.transition 2041, 11, :o1, 59203843, 24 - tz.transition 2042, 3, :o2, 14801717, 6 - tz.transition 2042, 11, :o1, 59212579, 24 - tz.transition 2043, 3, :o2, 14803901, 6 - tz.transition 2043, 11, :o1, 59221315, 24 - tz.transition 2044, 3, :o2, 14806127, 6 - tz.transition 2044, 11, :o1, 59230219, 24 - tz.transition 2045, 3, :o2, 14808311, 6 - tz.transition 2045, 11, :o1, 59238955, 24 - tz.transition 2046, 3, :o2, 14810495, 6 - tz.transition 2046, 11, :o1, 59247691, 24 - tz.transition 2047, 3, :o2, 14812679, 6 - tz.transition 2047, 11, :o1, 59256427, 24 - tz.transition 2048, 3, :o2, 14814863, 6 - tz.transition 2048, 11, :o1, 59265163, 24 - tz.transition 2049, 3, :o2, 14817089, 6 - tz.transition 2049, 11, :o1, 59274067, 24 - tz.transition 2050, 3, :o2, 14819273, 6 - tz.transition 2050, 11, :o1, 59282803, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb deleted file mode 100644 index 1710b57c7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Chihuahua.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Chihuahua - include TimezoneDefinition - - timezone 'America/Chihuahua' do |tz| - tz.offset :o0, -25460, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb deleted file mode 100644 index 1c1efb5ff..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Denver.rb +++ /dev/null @@ -1,204 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Denver - include TimezoneDefinition - - timezone 'America/Denver' do |tz| - tz.offset :o0, -25196, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1920, 3, :o2, 19379295, 8 - tz.transition 1920, 10, :o1, 14535773, 6 - tz.transition 1921, 3, :o2, 19382207, 8 - tz.transition 1921, 5, :o1, 14536991, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1965, 4, :o2, 19511007, 8 - tz.transition 1965, 10, :o1, 14634389, 6 - tz.transition 1966, 4, :o2, 19513919, 8 - tz.transition 1966, 10, :o1, 14636573, 6 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - tz.transition 1968, 4, :o2, 19519799, 8 - tz.transition 1968, 10, :o1, 14640941, 6 - tz.transition 1969, 4, :o2, 19522711, 8 - tz.transition 1969, 10, :o1, 14643125, 6 - tz.transition 1970, 4, :o2, 9968400 - tz.transition 1970, 10, :o1, 25689600 - tz.transition 1971, 4, :o2, 41418000 - tz.transition 1971, 10, :o1, 57744000 - tz.transition 1972, 4, :o2, 73472400 - tz.transition 1972, 10, :o1, 89193600 - tz.transition 1973, 4, :o2, 104922000 - tz.transition 1973, 10, :o1, 120643200 - tz.transition 1974, 1, :o2, 126694800 - tz.transition 1974, 10, :o1, 152092800 - tz.transition 1975, 2, :o2, 162378000 - tz.transition 1975, 10, :o1, 183542400 - tz.transition 1976, 4, :o2, 199270800 - tz.transition 1976, 10, :o1, 215596800 - tz.transition 1977, 4, :o2, 230720400 - tz.transition 1977, 10, :o1, 247046400 - tz.transition 1978, 4, :o2, 262774800 - tz.transition 1978, 10, :o1, 278496000 - tz.transition 1979, 4, :o2, 294224400 - tz.transition 1979, 10, :o1, 309945600 - tz.transition 1980, 4, :o2, 325674000 - tz.transition 1980, 10, :o1, 341395200 - tz.transition 1981, 4, :o2, 357123600 - tz.transition 1981, 10, :o1, 372844800 - tz.transition 1982, 4, :o2, 388573200 - tz.transition 1982, 10, :o1, 404899200 - tz.transition 1983, 4, :o2, 420022800 - tz.transition 1983, 10, :o1, 436348800 - tz.transition 1984, 4, :o2, 452077200 - tz.transition 1984, 10, :o1, 467798400 - tz.transition 1985, 4, :o2, 483526800 - tz.transition 1985, 10, :o1, 499248000 - tz.transition 1986, 4, :o2, 514976400 - tz.transition 1986, 10, :o1, 530697600 - tz.transition 1987, 4, :o2, 544611600 - tz.transition 1987, 10, :o1, 562147200 - tz.transition 1988, 4, :o2, 576061200 - tz.transition 1988, 10, :o1, 594201600 - tz.transition 1989, 4, :o2, 607510800 - tz.transition 1989, 10, :o1, 625651200 - tz.transition 1990, 4, :o2, 638960400 - tz.transition 1990, 10, :o1, 657100800 - tz.transition 1991, 4, :o2, 671014800 - tz.transition 1991, 10, :o1, 688550400 - tz.transition 1992, 4, :o2, 702464400 - tz.transition 1992, 10, :o1, 720000000 - tz.transition 1993, 4, :o2, 733914000 - tz.transition 1993, 10, :o1, 752054400 - tz.transition 1994, 4, :o2, 765363600 - tz.transition 1994, 10, :o1, 783504000 - tz.transition 1995, 4, :o2, 796813200 - tz.transition 1995, 10, :o1, 814953600 - tz.transition 1996, 4, :o2, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o2, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o2, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o2, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o2, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 4, :o2, 986115600 - tz.transition 2001, 10, :o1, 1004256000 - tz.transition 2002, 4, :o2, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o2, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o2, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o2, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o2, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 3, :o2, 1173603600 - tz.transition 2007, 11, :o1, 1194163200 - tz.transition 2008, 3, :o2, 1205053200 - tz.transition 2008, 11, :o1, 1225612800 - tz.transition 2009, 3, :o2, 1236502800 - tz.transition 2009, 11, :o1, 1257062400 - tz.transition 2010, 3, :o2, 1268557200 - tz.transition 2010, 11, :o1, 1289116800 - tz.transition 2011, 3, :o2, 1300006800 - tz.transition 2011, 11, :o1, 1320566400 - tz.transition 2012, 3, :o2, 1331456400 - tz.transition 2012, 11, :o1, 1352016000 - tz.transition 2013, 3, :o2, 1362906000 - tz.transition 2013, 11, :o1, 1383465600 - tz.transition 2014, 3, :o2, 1394355600 - tz.transition 2014, 11, :o1, 1414915200 - tz.transition 2015, 3, :o2, 1425805200 - tz.transition 2015, 11, :o1, 1446364800 - tz.transition 2016, 3, :o2, 1457859600 - tz.transition 2016, 11, :o1, 1478419200 - tz.transition 2017, 3, :o2, 1489309200 - tz.transition 2017, 11, :o1, 1509868800 - tz.transition 2018, 3, :o2, 1520758800 - tz.transition 2018, 11, :o1, 1541318400 - tz.transition 2019, 3, :o2, 1552208400 - tz.transition 2019, 11, :o1, 1572768000 - tz.transition 2020, 3, :o2, 1583658000 - tz.transition 2020, 11, :o1, 1604217600 - tz.transition 2021, 3, :o2, 1615712400 - tz.transition 2021, 11, :o1, 1636272000 - tz.transition 2022, 3, :o2, 1647162000 - tz.transition 2022, 11, :o1, 1667721600 - tz.transition 2023, 3, :o2, 1678611600 - tz.transition 2023, 11, :o1, 1699171200 - tz.transition 2024, 3, :o2, 1710061200 - tz.transition 2024, 11, :o1, 1730620800 - tz.transition 2025, 3, :o2, 1741510800 - tz.transition 2025, 11, :o1, 1762070400 - tz.transition 2026, 3, :o2, 1772960400 - tz.transition 2026, 11, :o1, 1793520000 - tz.transition 2027, 3, :o2, 1805014800 - tz.transition 2027, 11, :o1, 1825574400 - tz.transition 2028, 3, :o2, 1836464400 - tz.transition 2028, 11, :o1, 1857024000 - tz.transition 2029, 3, :o2, 1867914000 - tz.transition 2029, 11, :o1, 1888473600 - tz.transition 2030, 3, :o2, 1899363600 - tz.transition 2030, 11, :o1, 1919923200 - tz.transition 2031, 3, :o2, 1930813200 - tz.transition 2031, 11, :o1, 1951372800 - tz.transition 2032, 3, :o2, 1962867600 - tz.transition 2032, 11, :o1, 1983427200 - tz.transition 2033, 3, :o2, 1994317200 - tz.transition 2033, 11, :o1, 2014876800 - tz.transition 2034, 3, :o2, 2025766800 - tz.transition 2034, 11, :o1, 2046326400 - tz.transition 2035, 3, :o2, 2057216400 - tz.transition 2035, 11, :o1, 2077776000 - tz.transition 2036, 3, :o2, 2088666000 - tz.transition 2036, 11, :o1, 2109225600 - tz.transition 2037, 3, :o2, 2120115600 - tz.transition 2037, 11, :o1, 2140675200 - tz.transition 2038, 3, :o2, 19723975, 8 - tz.transition 2038, 11, :o1, 14794409, 6 - tz.transition 2039, 3, :o2, 19726887, 8 - tz.transition 2039, 11, :o1, 14796593, 6 - tz.transition 2040, 3, :o2, 19729799, 8 - tz.transition 2040, 11, :o1, 14798777, 6 - tz.transition 2041, 3, :o2, 19732711, 8 - tz.transition 2041, 11, :o1, 14800961, 6 - tz.transition 2042, 3, :o2, 19735623, 8 - tz.transition 2042, 11, :o1, 14803145, 6 - tz.transition 2043, 3, :o2, 19738535, 8 - tz.transition 2043, 11, :o1, 14805329, 6 - tz.transition 2044, 3, :o2, 19741503, 8 - tz.transition 2044, 11, :o1, 14807555, 6 - tz.transition 2045, 3, :o2, 19744415, 8 - tz.transition 2045, 11, :o1, 14809739, 6 - tz.transition 2046, 3, :o2, 19747327, 8 - tz.transition 2046, 11, :o1, 14811923, 6 - tz.transition 2047, 3, :o2, 19750239, 8 - tz.transition 2047, 11, :o1, 14814107, 6 - tz.transition 2048, 3, :o2, 19753151, 8 - tz.transition 2048, 11, :o1, 14816291, 6 - tz.transition 2049, 3, :o2, 19756119, 8 - tz.transition 2049, 11, :o1, 14818517, 6 - tz.transition 2050, 3, :o2, 19759031, 8 - tz.transition 2050, 11, :o1, 14820701, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb deleted file mode 100644 index 1e05518b0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Godthab.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Godthab - include TimezoneDefinition - - timezone 'America/Godthab' do |tz| - tz.offset :o0, -12416, 0, :LMT - tz.offset :o1, -10800, 0, :WGT - tz.offset :o2, -10800, 3600, :WGST - - tz.transition 1916, 7, :o1, 3268448069, 1350 - tz.transition 1980, 4, :o2, 323845200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb deleted file mode 100644 index a2bf73401..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Guatemala.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Guatemala - include TimezoneDefinition - - timezone 'America/Guatemala' do |tz| - tz.offset :o0, -21724, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1918, 10, :o1, 52312429831, 21600 - tz.transition 1973, 11, :o2, 123055200 - tz.transition 1974, 2, :o1, 130914000 - tz.transition 1983, 5, :o2, 422344800 - tz.transition 1983, 9, :o1, 433054800 - tz.transition 1991, 3, :o2, 669708000 - tz.transition 1991, 9, :o1, 684219600 - tz.transition 2006, 4, :o2, 1146376800 - tz.transition 2006, 10, :o1, 1159678800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb deleted file mode 100644 index d25ae775b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Halifax.rb +++ /dev/null @@ -1,274 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Halifax - include TimezoneDefinition - - timezone 'America/Halifax' do |tz| - tz.offset :o0, -15264, 0, :LMT - tz.offset :o1, -14400, 0, :AST - tz.offset :o2, -14400, 3600, :ADT - tz.offset :o3, -14400, 3600, :AWT - tz.offset :o4, -14400, 3600, :APT - - tz.transition 1902, 6, :o1, 724774703, 300 - tz.transition 1916, 4, :o2, 7262864, 3 - tz.transition 1916, 10, :o1, 19369101, 8 - tz.transition 1918, 4, :o2, 9686791, 4 - tz.transition 1918, 10, :o1, 58125545, 24 - tz.transition 1920, 5, :o2, 7267361, 3 - tz.transition 1920, 8, :o1, 19380525, 8 - tz.transition 1921, 5, :o2, 7268447, 3 - tz.transition 1921, 9, :o1, 19383501, 8 - tz.transition 1922, 4, :o2, 7269524, 3 - tz.transition 1922, 9, :o1, 19386421, 8 - tz.transition 1923, 5, :o2, 7270637, 3 - tz.transition 1923, 9, :o1, 19389333, 8 - tz.transition 1924, 5, :o2, 7271729, 3 - tz.transition 1924, 9, :o1, 19392349, 8 - tz.transition 1925, 5, :o2, 7272821, 3 - tz.transition 1925, 9, :o1, 19395373, 8 - tz.transition 1926, 5, :o2, 7273955, 3 - tz.transition 1926, 9, :o1, 19398173, 8 - tz.transition 1927, 5, :o2, 7275005, 3 - tz.transition 1927, 9, :o1, 19401197, 8 - tz.transition 1928, 5, :o2, 7276139, 3 - tz.transition 1928, 9, :o1, 19403989, 8 - tz.transition 1929, 5, :o2, 7277231, 3 - tz.transition 1929, 9, :o1, 19406861, 8 - tz.transition 1930, 5, :o2, 7278323, 3 - tz.transition 1930, 9, :o1, 19409877, 8 - tz.transition 1931, 5, :o2, 7279415, 3 - tz.transition 1931, 9, :o1, 19412901, 8 - tz.transition 1932, 5, :o2, 7280486, 3 - tz.transition 1932, 9, :o1, 19415813, 8 - tz.transition 1933, 4, :o2, 7281578, 3 - tz.transition 1933, 10, :o1, 19418781, 8 - tz.transition 1934, 5, :o2, 7282733, 3 - tz.transition 1934, 9, :o1, 19421573, 8 - tz.transition 1935, 6, :o2, 7283867, 3 - tz.transition 1935, 9, :o1, 19424605, 8 - tz.transition 1936, 6, :o2, 7284962, 3 - tz.transition 1936, 9, :o1, 19427405, 8 - tz.transition 1937, 5, :o2, 7285967, 3 - tz.transition 1937, 9, :o1, 19430429, 8 - tz.transition 1938, 5, :o2, 7287059, 3 - tz.transition 1938, 9, :o1, 19433341, 8 - tz.transition 1939, 5, :o2, 7288235, 3 - tz.transition 1939, 9, :o1, 19436253, 8 - tz.transition 1940, 5, :o2, 7289264, 3 - tz.transition 1940, 9, :o1, 19439221, 8 - tz.transition 1941, 5, :o2, 7290356, 3 - tz.transition 1941, 9, :o1, 19442133, 8 - tz.transition 1942, 2, :o3, 9721599, 4 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361489, 24 - tz.transition 1946, 4, :o2, 9727755, 4 - tz.transition 1946, 9, :o1, 58370225, 24 - tz.transition 1947, 4, :o2, 9729211, 4 - tz.transition 1947, 9, :o1, 58378961, 24 - tz.transition 1948, 4, :o2, 9730667, 4 - tz.transition 1948, 9, :o1, 58387697, 24 - tz.transition 1949, 4, :o2, 9732123, 4 - tz.transition 1949, 9, :o1, 58396433, 24 - tz.transition 1951, 4, :o2, 9735063, 4 - tz.transition 1951, 9, :o1, 58414073, 24 - tz.transition 1952, 4, :o2, 9736519, 4 - tz.transition 1952, 9, :o1, 58422809, 24 - tz.transition 1953, 4, :o2, 9737975, 4 - tz.transition 1953, 9, :o1, 58431545, 24 - tz.transition 1954, 4, :o2, 9739431, 4 - tz.transition 1954, 9, :o1, 58440281, 24 - tz.transition 1956, 4, :o2, 9742371, 4 - tz.transition 1956, 9, :o1, 58457921, 24 - tz.transition 1957, 4, :o2, 9743827, 4 - tz.transition 1957, 9, :o1, 58466657, 24 - tz.transition 1958, 4, :o2, 9745283, 4 - tz.transition 1958, 9, :o1, 58475393, 24 - tz.transition 1959, 4, :o2, 9746739, 4 - tz.transition 1959, 9, :o1, 58484129, 24 - tz.transition 1962, 4, :o2, 9751135, 4 - tz.transition 1962, 10, :o1, 58511177, 24 - tz.transition 1963, 4, :o2, 9752591, 4 - tz.transition 1963, 10, :o1, 58519913, 24 - tz.transition 1964, 4, :o2, 9754047, 4 - tz.transition 1964, 10, :o1, 58528649, 24 - tz.transition 1965, 4, :o2, 9755503, 4 - tz.transition 1965, 10, :o1, 58537553, 24 - tz.transition 1966, 4, :o2, 9756959, 4 - tz.transition 1966, 10, :o1, 58546289, 24 - tz.transition 1967, 4, :o2, 9758443, 4 - tz.transition 1967, 10, :o1, 58555025, 24 - tz.transition 1968, 4, :o2, 9759899, 4 - tz.transition 1968, 10, :o1, 58563761, 24 - tz.transition 1969, 4, :o2, 9761355, 4 - tz.transition 1969, 10, :o1, 58572497, 24 - tz.transition 1970, 4, :o2, 9957600 - tz.transition 1970, 10, :o1, 25678800 - tz.transition 1971, 4, :o2, 41407200 - tz.transition 1971, 10, :o1, 57733200 - tz.transition 1972, 4, :o2, 73461600 - tz.transition 1972, 10, :o1, 89182800 - tz.transition 1973, 4, :o2, 104911200 - tz.transition 1973, 10, :o1, 120632400 - tz.transition 1974, 4, :o2, 136360800 - tz.transition 1974, 10, :o1, 152082000 - tz.transition 1975, 4, :o2, 167810400 - tz.transition 1975, 10, :o1, 183531600 - tz.transition 1976, 4, :o2, 199260000 - tz.transition 1976, 10, :o1, 215586000 - tz.transition 1977, 4, :o2, 230709600 - tz.transition 1977, 10, :o1, 247035600 - tz.transition 1978, 4, :o2, 262764000 - tz.transition 1978, 10, :o1, 278485200 - tz.transition 1979, 4, :o2, 294213600 - tz.transition 1979, 10, :o1, 309934800 - tz.transition 1980, 4, :o2, 325663200 - tz.transition 1980, 10, :o1, 341384400 - tz.transition 1981, 4, :o2, 357112800 - tz.transition 1981, 10, :o1, 372834000 - tz.transition 1982, 4, :o2, 388562400 - tz.transition 1982, 10, :o1, 404888400 - tz.transition 1983, 4, :o2, 420012000 - tz.transition 1983, 10, :o1, 436338000 - tz.transition 1984, 4, :o2, 452066400 - tz.transition 1984, 10, :o1, 467787600 - tz.transition 1985, 4, :o2, 483516000 - tz.transition 1985, 10, :o1, 499237200 - tz.transition 1986, 4, :o2, 514965600 - tz.transition 1986, 10, :o1, 530686800 - tz.transition 1987, 4, :o2, 544600800 - tz.transition 1987, 10, :o1, 562136400 - tz.transition 1988, 4, :o2, 576050400 - tz.transition 1988, 10, :o1, 594190800 - tz.transition 1989, 4, :o2, 607500000 - tz.transition 1989, 10, :o1, 625640400 - tz.transition 1990, 4, :o2, 638949600 - tz.transition 1990, 10, :o1, 657090000 - tz.transition 1991, 4, :o2, 671004000 - tz.transition 1991, 10, :o1, 688539600 - tz.transition 1992, 4, :o2, 702453600 - tz.transition 1992, 10, :o1, 719989200 - tz.transition 1993, 4, :o2, 733903200 - tz.transition 1993, 10, :o1, 752043600 - tz.transition 1994, 4, :o2, 765352800 - tz.transition 1994, 10, :o1, 783493200 - tz.transition 1995, 4, :o2, 796802400 - tz.transition 1995, 10, :o1, 814942800 - tz.transition 1996, 4, :o2, 828856800 - tz.transition 1996, 10, :o1, 846392400 - tz.transition 1997, 4, :o2, 860306400 - tz.transition 1997, 10, :o1, 877842000 - tz.transition 1998, 4, :o2, 891756000 - tz.transition 1998, 10, :o1, 909291600 - tz.transition 1999, 4, :o2, 923205600 - tz.transition 1999, 10, :o1, 941346000 - tz.transition 2000, 4, :o2, 954655200 - tz.transition 2000, 10, :o1, 972795600 - tz.transition 2001, 4, :o2, 986104800 - tz.transition 2001, 10, :o1, 1004245200 - tz.transition 2002, 4, :o2, 1018159200 - tz.transition 2002, 10, :o1, 1035694800 - tz.transition 2003, 4, :o2, 1049608800 - tz.transition 2003, 10, :o1, 1067144400 - tz.transition 2004, 4, :o2, 1081058400 - tz.transition 2004, 10, :o1, 1099198800 - tz.transition 2005, 4, :o2, 1112508000 - tz.transition 2005, 10, :o1, 1130648400 - tz.transition 2006, 4, :o2, 1143957600 - tz.transition 2006, 10, :o1, 1162098000 - tz.transition 2007, 3, :o2, 1173592800 - tz.transition 2007, 11, :o1, 1194152400 - tz.transition 2008, 3, :o2, 1205042400 - tz.transition 2008, 11, :o1, 1225602000 - tz.transition 2009, 3, :o2, 1236492000 - tz.transition 2009, 11, :o1, 1257051600 - tz.transition 2010, 3, :o2, 1268546400 - tz.transition 2010, 11, :o1, 1289106000 - tz.transition 2011, 3, :o2, 1299996000 - tz.transition 2011, 11, :o1, 1320555600 - tz.transition 2012, 3, :o2, 1331445600 - tz.transition 2012, 11, :o1, 1352005200 - tz.transition 2013, 3, :o2, 1362895200 - tz.transition 2013, 11, :o1, 1383454800 - tz.transition 2014, 3, :o2, 1394344800 - tz.transition 2014, 11, :o1, 1414904400 - tz.transition 2015, 3, :o2, 1425794400 - tz.transition 2015, 11, :o1, 1446354000 - tz.transition 2016, 3, :o2, 1457848800 - tz.transition 2016, 11, :o1, 1478408400 - tz.transition 2017, 3, :o2, 1489298400 - tz.transition 2017, 11, :o1, 1509858000 - tz.transition 2018, 3, :o2, 1520748000 - tz.transition 2018, 11, :o1, 1541307600 - tz.transition 2019, 3, :o2, 1552197600 - tz.transition 2019, 11, :o1, 1572757200 - tz.transition 2020, 3, :o2, 1583647200 - tz.transition 2020, 11, :o1, 1604206800 - tz.transition 2021, 3, :o2, 1615701600 - tz.transition 2021, 11, :o1, 1636261200 - tz.transition 2022, 3, :o2, 1647151200 - tz.transition 2022, 11, :o1, 1667710800 - tz.transition 2023, 3, :o2, 1678600800 - tz.transition 2023, 11, :o1, 1699160400 - tz.transition 2024, 3, :o2, 1710050400 - tz.transition 2024, 11, :o1, 1730610000 - tz.transition 2025, 3, :o2, 1741500000 - tz.transition 2025, 11, :o1, 1762059600 - tz.transition 2026, 3, :o2, 1772949600 - tz.transition 2026, 11, :o1, 1793509200 - tz.transition 2027, 3, :o2, 1805004000 - tz.transition 2027, 11, :o1, 1825563600 - tz.transition 2028, 3, :o2, 1836453600 - tz.transition 2028, 11, :o1, 1857013200 - tz.transition 2029, 3, :o2, 1867903200 - tz.transition 2029, 11, :o1, 1888462800 - tz.transition 2030, 3, :o2, 1899352800 - tz.transition 2030, 11, :o1, 1919912400 - tz.transition 2031, 3, :o2, 1930802400 - tz.transition 2031, 11, :o1, 1951362000 - tz.transition 2032, 3, :o2, 1962856800 - tz.transition 2032, 11, :o1, 1983416400 - tz.transition 2033, 3, :o2, 1994306400 - tz.transition 2033, 11, :o1, 2014866000 - tz.transition 2034, 3, :o2, 2025756000 - tz.transition 2034, 11, :o1, 2046315600 - tz.transition 2035, 3, :o2, 2057205600 - tz.transition 2035, 11, :o1, 2077765200 - tz.transition 2036, 3, :o2, 2088655200 - tz.transition 2036, 11, :o1, 2109214800 - tz.transition 2037, 3, :o2, 2120104800 - tz.transition 2037, 11, :o1, 2140664400 - tz.transition 2038, 3, :o2, 9861987, 4 - tz.transition 2038, 11, :o1, 59177633, 24 - tz.transition 2039, 3, :o2, 9863443, 4 - tz.transition 2039, 11, :o1, 59186369, 24 - tz.transition 2040, 3, :o2, 9864899, 4 - tz.transition 2040, 11, :o1, 59195105, 24 - tz.transition 2041, 3, :o2, 9866355, 4 - tz.transition 2041, 11, :o1, 59203841, 24 - tz.transition 2042, 3, :o2, 9867811, 4 - tz.transition 2042, 11, :o1, 59212577, 24 - tz.transition 2043, 3, :o2, 9869267, 4 - tz.transition 2043, 11, :o1, 59221313, 24 - tz.transition 2044, 3, :o2, 9870751, 4 - tz.transition 2044, 11, :o1, 59230217, 24 - tz.transition 2045, 3, :o2, 9872207, 4 - tz.transition 2045, 11, :o1, 59238953, 24 - tz.transition 2046, 3, :o2, 9873663, 4 - tz.transition 2046, 11, :o1, 59247689, 24 - tz.transition 2047, 3, :o2, 9875119, 4 - tz.transition 2047, 11, :o1, 59256425, 24 - tz.transition 2048, 3, :o2, 9876575, 4 - tz.transition 2048, 11, :o1, 59265161, 24 - tz.transition 2049, 3, :o2, 9878059, 4 - tz.transition 2049, 11, :o1, 59274065, 24 - tz.transition 2050, 3, :o2, 9879515, 4 - tz.transition 2050, 11, :o1, 59282801, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb deleted file mode 100644 index f1430f6c2..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Indiana/Indianapolis.rb +++ /dev/null @@ -1,149 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Indiana - module Indianapolis - include TimezoneDefinition - - timezone 'America/Indiana/Indianapolis' do |tz| - tz.offset :o0, -20678, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - tz.offset :o3, -21600, 3600, :CWT - tz.offset :o4, -21600, 3600, :CPT - tz.offset :o5, -18000, 0, :EST - tz.offset :o6, -18000, 3600, :EDT - - tz.transition 1883, 11, :o1, 9636533, 4 - tz.transition 1918, 3, :o2, 14530103, 6 - tz.transition 1918, 10, :o1, 58125451, 24 - tz.transition 1919, 3, :o2, 14532287, 6 - tz.transition 1919, 10, :o1, 58134187, 24 - tz.transition 1941, 6, :o2, 14581007, 6 - tz.transition 1941, 9, :o1, 58326379, 24 - tz.transition 1942, 2, :o3, 14582399, 6 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 58361491, 24 - tz.transition 1946, 4, :o2, 14591633, 6 - tz.transition 1946, 9, :o1, 58370227, 24 - tz.transition 1947, 4, :o2, 14593817, 6 - tz.transition 1947, 9, :o1, 58378963, 24 - tz.transition 1948, 4, :o2, 14596001, 6 - tz.transition 1948, 9, :o1, 58387699, 24 - tz.transition 1949, 4, :o2, 14598185, 6 - tz.transition 1949, 9, :o1, 58396435, 24 - tz.transition 1950, 4, :o2, 14600411, 6 - tz.transition 1950, 9, :o1, 58405171, 24 - tz.transition 1951, 4, :o2, 14602595, 6 - tz.transition 1951, 9, :o1, 58414075, 24 - tz.transition 1952, 4, :o2, 14604779, 6 - tz.transition 1952, 9, :o1, 58422811, 24 - tz.transition 1953, 4, :o2, 14606963, 6 - tz.transition 1953, 9, :o1, 58431547, 24 - tz.transition 1954, 4, :o2, 14609147, 6 - tz.transition 1954, 9, :o1, 58440283, 24 - tz.transition 1955, 4, :o5, 14611331, 6 - tz.transition 1957, 9, :o1, 58466659, 24 - tz.transition 1958, 4, :o5, 14617925, 6 - tz.transition 1969, 4, :o6, 58568131, 24 - tz.transition 1969, 10, :o5, 9762083, 4 - tz.transition 1970, 4, :o6, 9961200 - tz.transition 1970, 10, :o5, 25682400 - tz.transition 2006, 4, :o6, 1143961200 - tz.transition 2006, 10, :o5, 1162101600 - tz.transition 2007, 3, :o6, 1173596400 - tz.transition 2007, 11, :o5, 1194156000 - tz.transition 2008, 3, :o6, 1205046000 - tz.transition 2008, 11, :o5, 1225605600 - tz.transition 2009, 3, :o6, 1236495600 - tz.transition 2009, 11, :o5, 1257055200 - tz.transition 2010, 3, :o6, 1268550000 - tz.transition 2010, 11, :o5, 1289109600 - tz.transition 2011, 3, :o6, 1299999600 - tz.transition 2011, 11, :o5, 1320559200 - tz.transition 2012, 3, :o6, 1331449200 - tz.transition 2012, 11, :o5, 1352008800 - tz.transition 2013, 3, :o6, 1362898800 - tz.transition 2013, 11, :o5, 1383458400 - tz.transition 2014, 3, :o6, 1394348400 - tz.transition 2014, 11, :o5, 1414908000 - tz.transition 2015, 3, :o6, 1425798000 - tz.transition 2015, 11, :o5, 1446357600 - tz.transition 2016, 3, :o6, 1457852400 - tz.transition 2016, 11, :o5, 1478412000 - tz.transition 2017, 3, :o6, 1489302000 - tz.transition 2017, 11, :o5, 1509861600 - tz.transition 2018, 3, :o6, 1520751600 - tz.transition 2018, 11, :o5, 1541311200 - tz.transition 2019, 3, :o6, 1552201200 - tz.transition 2019, 11, :o5, 1572760800 - tz.transition 2020, 3, :o6, 1583650800 - tz.transition 2020, 11, :o5, 1604210400 - tz.transition 2021, 3, :o6, 1615705200 - tz.transition 2021, 11, :o5, 1636264800 - tz.transition 2022, 3, :o6, 1647154800 - tz.transition 2022, 11, :o5, 1667714400 - tz.transition 2023, 3, :o6, 1678604400 - tz.transition 2023, 11, :o5, 1699164000 - tz.transition 2024, 3, :o6, 1710054000 - tz.transition 2024, 11, :o5, 1730613600 - tz.transition 2025, 3, :o6, 1741503600 - tz.transition 2025, 11, :o5, 1762063200 - tz.transition 2026, 3, :o6, 1772953200 - tz.transition 2026, 11, :o5, 1793512800 - tz.transition 2027, 3, :o6, 1805007600 - tz.transition 2027, 11, :o5, 1825567200 - tz.transition 2028, 3, :o6, 1836457200 - tz.transition 2028, 11, :o5, 1857016800 - tz.transition 2029, 3, :o6, 1867906800 - tz.transition 2029, 11, :o5, 1888466400 - tz.transition 2030, 3, :o6, 1899356400 - tz.transition 2030, 11, :o5, 1919916000 - tz.transition 2031, 3, :o6, 1930806000 - tz.transition 2031, 11, :o5, 1951365600 - tz.transition 2032, 3, :o6, 1962860400 - tz.transition 2032, 11, :o5, 1983420000 - tz.transition 2033, 3, :o6, 1994310000 - tz.transition 2033, 11, :o5, 2014869600 - tz.transition 2034, 3, :o6, 2025759600 - tz.transition 2034, 11, :o5, 2046319200 - tz.transition 2035, 3, :o6, 2057209200 - tz.transition 2035, 11, :o5, 2077768800 - tz.transition 2036, 3, :o6, 2088658800 - tz.transition 2036, 11, :o5, 2109218400 - tz.transition 2037, 3, :o6, 2120108400 - tz.transition 2037, 11, :o5, 2140668000 - tz.transition 2038, 3, :o6, 59171923, 24 - tz.transition 2038, 11, :o5, 9862939, 4 - tz.transition 2039, 3, :o6, 59180659, 24 - tz.transition 2039, 11, :o5, 9864395, 4 - tz.transition 2040, 3, :o6, 59189395, 24 - tz.transition 2040, 11, :o5, 9865851, 4 - tz.transition 2041, 3, :o6, 59198131, 24 - tz.transition 2041, 11, :o5, 9867307, 4 - tz.transition 2042, 3, :o6, 59206867, 24 - tz.transition 2042, 11, :o5, 9868763, 4 - tz.transition 2043, 3, :o6, 59215603, 24 - tz.transition 2043, 11, :o5, 9870219, 4 - tz.transition 2044, 3, :o6, 59224507, 24 - tz.transition 2044, 11, :o5, 9871703, 4 - tz.transition 2045, 3, :o6, 59233243, 24 - tz.transition 2045, 11, :o5, 9873159, 4 - tz.transition 2046, 3, :o6, 59241979, 24 - tz.transition 2046, 11, :o5, 9874615, 4 - tz.transition 2047, 3, :o6, 59250715, 24 - tz.transition 2047, 11, :o5, 9876071, 4 - tz.transition 2048, 3, :o6, 59259451, 24 - tz.transition 2048, 11, :o5, 9877527, 4 - tz.transition 2049, 3, :o6, 59268355, 24 - tz.transition 2049, 11, :o5, 9879011, 4 - tz.transition 2050, 3, :o6, 59277091, 24 - tz.transition 2050, 11, :o5, 9880467, 4 - end - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb deleted file mode 100644 index f646f3f54..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Juneau.rb +++ /dev/null @@ -1,194 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Juneau - include TimezoneDefinition - - timezone 'America/Juneau' do |tz| - tz.offset :o0, 54139, 0, :LMT - tz.offset :o1, -32261, 0, :LMT - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - tz.offset :o5, -28800, 3600, :PDT - tz.offset :o6, -32400, 0, :YST - tz.offset :o7, -32400, 0, :AKST - tz.offset :o8, -32400, 3600, :AKDT - - tz.transition 1867, 10, :o1, 207641393861, 86400 - tz.transition 1900, 8, :o2, 208677805061, 86400 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o2, 19453831, 8 - tz.transition 1969, 4, :o5, 29284067, 12 - tz.transition 1969, 10, :o2, 19524167, 8 - tz.transition 1970, 4, :o5, 9972000 - tz.transition 1970, 10, :o2, 25693200 - tz.transition 1971, 4, :o5, 41421600 - tz.transition 1971, 10, :o2, 57747600 - tz.transition 1972, 4, :o5, 73476000 - tz.transition 1972, 10, :o2, 89197200 - tz.transition 1973, 4, :o5, 104925600 - tz.transition 1973, 10, :o2, 120646800 - tz.transition 1974, 1, :o5, 126698400 - tz.transition 1974, 10, :o2, 152096400 - tz.transition 1975, 2, :o5, 162381600 - tz.transition 1975, 10, :o2, 183546000 - tz.transition 1976, 4, :o5, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o5, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o5, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o5, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o5, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o5, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o5, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o5, 420026400 - tz.transition 1983, 10, :o6, 436352400 - tz.transition 1983, 11, :o7, 439030800 - tz.transition 1984, 4, :o8, 452084400 - tz.transition 1984, 10, :o7, 467805600 - tz.transition 1985, 4, :o8, 483534000 - tz.transition 1985, 10, :o7, 499255200 - tz.transition 1986, 4, :o8, 514983600 - tz.transition 1986, 10, :o7, 530704800 - tz.transition 1987, 4, :o8, 544618800 - tz.transition 1987, 10, :o7, 562154400 - tz.transition 1988, 4, :o8, 576068400 - tz.transition 1988, 10, :o7, 594208800 - tz.transition 1989, 4, :o8, 607518000 - tz.transition 1989, 10, :o7, 625658400 - tz.transition 1990, 4, :o8, 638967600 - tz.transition 1990, 10, :o7, 657108000 - tz.transition 1991, 4, :o8, 671022000 - tz.transition 1991, 10, :o7, 688557600 - tz.transition 1992, 4, :o8, 702471600 - tz.transition 1992, 10, :o7, 720007200 - tz.transition 1993, 4, :o8, 733921200 - tz.transition 1993, 10, :o7, 752061600 - tz.transition 1994, 4, :o8, 765370800 - tz.transition 1994, 10, :o7, 783511200 - tz.transition 1995, 4, :o8, 796820400 - tz.transition 1995, 10, :o7, 814960800 - tz.transition 1996, 4, :o8, 828874800 - tz.transition 1996, 10, :o7, 846410400 - tz.transition 1997, 4, :o8, 860324400 - tz.transition 1997, 10, :o7, 877860000 - tz.transition 1998, 4, :o8, 891774000 - tz.transition 1998, 10, :o7, 909309600 - tz.transition 1999, 4, :o8, 923223600 - tz.transition 1999, 10, :o7, 941364000 - tz.transition 2000, 4, :o8, 954673200 - tz.transition 2000, 10, :o7, 972813600 - tz.transition 2001, 4, :o8, 986122800 - tz.transition 2001, 10, :o7, 1004263200 - tz.transition 2002, 4, :o8, 1018177200 - tz.transition 2002, 10, :o7, 1035712800 - tz.transition 2003, 4, :o8, 1049626800 - tz.transition 2003, 10, :o7, 1067162400 - tz.transition 2004, 4, :o8, 1081076400 - tz.transition 2004, 10, :o7, 1099216800 - tz.transition 2005, 4, :o8, 1112526000 - tz.transition 2005, 10, :o7, 1130666400 - tz.transition 2006, 4, :o8, 1143975600 - tz.transition 2006, 10, :o7, 1162116000 - tz.transition 2007, 3, :o8, 1173610800 - tz.transition 2007, 11, :o7, 1194170400 - tz.transition 2008, 3, :o8, 1205060400 - tz.transition 2008, 11, :o7, 1225620000 - tz.transition 2009, 3, :o8, 1236510000 - tz.transition 2009, 11, :o7, 1257069600 - tz.transition 2010, 3, :o8, 1268564400 - tz.transition 2010, 11, :o7, 1289124000 - tz.transition 2011, 3, :o8, 1300014000 - tz.transition 2011, 11, :o7, 1320573600 - tz.transition 2012, 3, :o8, 1331463600 - tz.transition 2012, 11, :o7, 1352023200 - tz.transition 2013, 3, :o8, 1362913200 - tz.transition 2013, 11, :o7, 1383472800 - tz.transition 2014, 3, :o8, 1394362800 - tz.transition 2014, 11, :o7, 1414922400 - tz.transition 2015, 3, :o8, 1425812400 - tz.transition 2015, 11, :o7, 1446372000 - tz.transition 2016, 3, :o8, 1457866800 - tz.transition 2016, 11, :o7, 1478426400 - tz.transition 2017, 3, :o8, 1489316400 - tz.transition 2017, 11, :o7, 1509876000 - tz.transition 2018, 3, :o8, 1520766000 - tz.transition 2018, 11, :o7, 1541325600 - tz.transition 2019, 3, :o8, 1552215600 - tz.transition 2019, 11, :o7, 1572775200 - tz.transition 2020, 3, :o8, 1583665200 - tz.transition 2020, 11, :o7, 1604224800 - tz.transition 2021, 3, :o8, 1615719600 - tz.transition 2021, 11, :o7, 1636279200 - tz.transition 2022, 3, :o8, 1647169200 - tz.transition 2022, 11, :o7, 1667728800 - tz.transition 2023, 3, :o8, 1678618800 - tz.transition 2023, 11, :o7, 1699178400 - tz.transition 2024, 3, :o8, 1710068400 - tz.transition 2024, 11, :o7, 1730628000 - tz.transition 2025, 3, :o8, 1741518000 - tz.transition 2025, 11, :o7, 1762077600 - tz.transition 2026, 3, :o8, 1772967600 - tz.transition 2026, 11, :o7, 1793527200 - tz.transition 2027, 3, :o8, 1805022000 - tz.transition 2027, 11, :o7, 1825581600 - tz.transition 2028, 3, :o8, 1836471600 - tz.transition 2028, 11, :o7, 1857031200 - tz.transition 2029, 3, :o8, 1867921200 - tz.transition 2029, 11, :o7, 1888480800 - tz.transition 2030, 3, :o8, 1899370800 - tz.transition 2030, 11, :o7, 1919930400 - tz.transition 2031, 3, :o8, 1930820400 - tz.transition 2031, 11, :o7, 1951380000 - tz.transition 2032, 3, :o8, 1962874800 - tz.transition 2032, 11, :o7, 1983434400 - tz.transition 2033, 3, :o8, 1994324400 - tz.transition 2033, 11, :o7, 2014884000 - tz.transition 2034, 3, :o8, 2025774000 - tz.transition 2034, 11, :o7, 2046333600 - tz.transition 2035, 3, :o8, 2057223600 - tz.transition 2035, 11, :o7, 2077783200 - tz.transition 2036, 3, :o8, 2088673200 - tz.transition 2036, 11, :o7, 2109232800 - tz.transition 2037, 3, :o8, 2120122800 - tz.transition 2037, 11, :o7, 2140682400 - tz.transition 2038, 3, :o8, 59171927, 24 - tz.transition 2038, 11, :o7, 29588819, 12 - tz.transition 2039, 3, :o8, 59180663, 24 - tz.transition 2039, 11, :o7, 29593187, 12 - tz.transition 2040, 3, :o8, 59189399, 24 - tz.transition 2040, 11, :o7, 29597555, 12 - tz.transition 2041, 3, :o8, 59198135, 24 - tz.transition 2041, 11, :o7, 29601923, 12 - tz.transition 2042, 3, :o8, 59206871, 24 - tz.transition 2042, 11, :o7, 29606291, 12 - tz.transition 2043, 3, :o8, 59215607, 24 - tz.transition 2043, 11, :o7, 29610659, 12 - tz.transition 2044, 3, :o8, 59224511, 24 - tz.transition 2044, 11, :o7, 29615111, 12 - tz.transition 2045, 3, :o8, 59233247, 24 - tz.transition 2045, 11, :o7, 29619479, 12 - tz.transition 2046, 3, :o8, 59241983, 24 - tz.transition 2046, 11, :o7, 29623847, 12 - tz.transition 2047, 3, :o8, 59250719, 24 - tz.transition 2047, 11, :o7, 29628215, 12 - tz.transition 2048, 3, :o8, 59259455, 24 - tz.transition 2048, 11, :o7, 29632583, 12 - tz.transition 2049, 3, :o8, 59268359, 24 - tz.transition 2049, 11, :o7, 29637035, 12 - tz.transition 2050, 3, :o8, 59277095, 24 - tz.transition 2050, 11, :o7, 29641403, 12 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb deleted file mode 100644 index 45c907899..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/La_Paz.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module La_Paz - include TimezoneDefinition - - timezone 'America/La_Paz' do |tz| - tz.offset :o0, -16356, 0, :LMT - tz.offset :o1, -16356, 0, :CMT - tz.offset :o2, -16356, 3600, :BOST - tz.offset :o3, -14400, 0, :BOT - - tz.transition 1890, 1, :o1, 17361854563, 7200 - tz.transition 1931, 10, :o2, 17471733763, 7200 - tz.transition 1932, 3, :o3, 17472871063, 7200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb deleted file mode 100644 index af68ac29f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Lima.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Lima - include TimezoneDefinition - - timezone 'America/Lima' do |tz| - tz.offset :o0, -18492, 0, :LMT - tz.offset :o1, -18516, 0, :LMT - tz.offset :o2, -18000, 0, :PET - tz.offset :o3, -18000, 3600, :PEST - - tz.transition 1890, 1, :o1, 17361854741, 7200 - tz.transition 1908, 7, :o2, 17410685143, 7200 - tz.transition 1938, 1, :o3, 58293593, 24 - tz.transition 1938, 4, :o2, 7286969, 3 - tz.transition 1938, 9, :o3, 58300001, 24 - tz.transition 1939, 3, :o2, 7288046, 3 - tz.transition 1939, 9, :o3, 58308737, 24 - tz.transition 1940, 3, :o2, 7289138, 3 - tz.transition 1986, 1, :o3, 504939600 - tz.transition 1986, 4, :o2, 512712000 - tz.transition 1987, 1, :o3, 536475600 - tz.transition 1987, 4, :o2, 544248000 - tz.transition 1990, 1, :o3, 631170000 - tz.transition 1990, 4, :o2, 638942400 - tz.transition 1994, 1, :o3, 757400400 - tz.transition 1994, 4, :o2, 765172800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb deleted file mode 100644 index 16007fd67..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Los_Angeles.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Los_Angeles - include TimezoneDefinition - - timezone 'America/Los_Angeles' do |tz| - tz.offset :o0, -28378, 0, :LMT - tz.offset :o1, -28800, 0, :PST - tz.offset :o2, -28800, 3600, :PDT - tz.offset :o3, -28800, 3600, :PWT - tz.offset :o4, -28800, 3600, :PPT - - tz.transition 1883, 11, :o1, 7227400, 3 - tz.transition 1918, 3, :o2, 29060207, 12 - tz.transition 1918, 10, :o1, 19375151, 8 - tz.transition 1919, 3, :o2, 29064575, 12 - tz.transition 1919, 10, :o1, 19378063, 8 - tz.transition 1942, 2, :o3, 29164799, 12 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 19453831, 8 - tz.transition 1948, 3, :o2, 29191499, 12 - tz.transition 1949, 1, :o1, 19463343, 8 - tz.transition 1950, 4, :o2, 29200823, 12 - tz.transition 1950, 9, :o1, 19468391, 8 - tz.transition 1951, 4, :o2, 29205191, 12 - tz.transition 1951, 9, :o1, 19471359, 8 - tz.transition 1952, 4, :o2, 29209559, 12 - tz.transition 1952, 9, :o1, 19474271, 8 - tz.transition 1953, 4, :o2, 29213927, 12 - tz.transition 1953, 9, :o1, 19477183, 8 - tz.transition 1954, 4, :o2, 29218295, 12 - tz.transition 1954, 9, :o1, 19480095, 8 - tz.transition 1955, 4, :o2, 29222663, 12 - tz.transition 1955, 9, :o1, 19483007, 8 - tz.transition 1956, 4, :o2, 29227115, 12 - tz.transition 1956, 9, :o1, 19485975, 8 - tz.transition 1957, 4, :o2, 29231483, 12 - tz.transition 1957, 9, :o1, 19488887, 8 - tz.transition 1958, 4, :o2, 29235851, 12 - tz.transition 1958, 9, :o1, 19491799, 8 - tz.transition 1959, 4, :o2, 29240219, 12 - tz.transition 1959, 9, :o1, 19494711, 8 - tz.transition 1960, 4, :o2, 29244587, 12 - tz.transition 1960, 9, :o1, 19497623, 8 - tz.transition 1961, 4, :o2, 29249039, 12 - tz.transition 1961, 9, :o1, 19500535, 8 - tz.transition 1962, 4, :o2, 29253407, 12 - tz.transition 1962, 10, :o1, 19503727, 8 - tz.transition 1963, 4, :o2, 29257775, 12 - tz.transition 1963, 10, :o1, 19506639, 8 - tz.transition 1964, 4, :o2, 29262143, 12 - tz.transition 1964, 10, :o1, 19509551, 8 - tz.transition 1965, 4, :o2, 29266511, 12 - tz.transition 1965, 10, :o1, 19512519, 8 - tz.transition 1966, 4, :o2, 29270879, 12 - tz.transition 1966, 10, :o1, 19515431, 8 - tz.transition 1967, 4, :o2, 29275331, 12 - tz.transition 1967, 10, :o1, 19518343, 8 - tz.transition 1968, 4, :o2, 29279699, 12 - tz.transition 1968, 10, :o1, 19521255, 8 - tz.transition 1969, 4, :o2, 29284067, 12 - tz.transition 1969, 10, :o1, 19524167, 8 - tz.transition 1970, 4, :o2, 9972000 - tz.transition 1970, 10, :o1, 25693200 - tz.transition 1971, 4, :o2, 41421600 - tz.transition 1971, 10, :o1, 57747600 - tz.transition 1972, 4, :o2, 73476000 - tz.transition 1972, 10, :o1, 89197200 - tz.transition 1973, 4, :o2, 104925600 - tz.transition 1973, 10, :o1, 120646800 - tz.transition 1974, 1, :o2, 126698400 - tz.transition 1974, 10, :o1, 152096400 - tz.transition 1975, 2, :o2, 162381600 - tz.transition 1975, 10, :o1, 183546000 - tz.transition 1976, 4, :o2, 199274400 - tz.transition 1976, 10, :o1, 215600400 - tz.transition 1977, 4, :o2, 230724000 - tz.transition 1977, 10, :o1, 247050000 - tz.transition 1978, 4, :o2, 262778400 - tz.transition 1978, 10, :o1, 278499600 - tz.transition 1979, 4, :o2, 294228000 - tz.transition 1979, 10, :o1, 309949200 - tz.transition 1980, 4, :o2, 325677600 - tz.transition 1980, 10, :o1, 341398800 - tz.transition 1981, 4, :o2, 357127200 - tz.transition 1981, 10, :o1, 372848400 - tz.transition 1982, 4, :o2, 388576800 - tz.transition 1982, 10, :o1, 404902800 - tz.transition 1983, 4, :o2, 420026400 - tz.transition 1983, 10, :o1, 436352400 - tz.transition 1984, 4, :o2, 452080800 - tz.transition 1984, 10, :o1, 467802000 - tz.transition 1985, 4, :o2, 483530400 - tz.transition 1985, 10, :o1, 499251600 - tz.transition 1986, 4, :o2, 514980000 - tz.transition 1986, 10, :o1, 530701200 - tz.transition 1987, 4, :o2, 544615200 - tz.transition 1987, 10, :o1, 562150800 - tz.transition 1988, 4, :o2, 576064800 - tz.transition 1988, 10, :o1, 594205200 - tz.transition 1989, 4, :o2, 607514400 - tz.transition 1989, 10, :o1, 625654800 - tz.transition 1990, 4, :o2, 638964000 - tz.transition 1990, 10, :o1, 657104400 - tz.transition 1991, 4, :o2, 671018400 - tz.transition 1991, 10, :o1, 688554000 - tz.transition 1992, 4, :o2, 702468000 - tz.transition 1992, 10, :o1, 720003600 - tz.transition 1993, 4, :o2, 733917600 - tz.transition 1993, 10, :o1, 752058000 - tz.transition 1994, 4, :o2, 765367200 - tz.transition 1994, 10, :o1, 783507600 - tz.transition 1995, 4, :o2, 796816800 - tz.transition 1995, 10, :o1, 814957200 - tz.transition 1996, 4, :o2, 828871200 - tz.transition 1996, 10, :o1, 846406800 - tz.transition 1997, 4, :o2, 860320800 - tz.transition 1997, 10, :o1, 877856400 - tz.transition 1998, 4, :o2, 891770400 - tz.transition 1998, 10, :o1, 909306000 - tz.transition 1999, 4, :o2, 923220000 - tz.transition 1999, 10, :o1, 941360400 - tz.transition 2000, 4, :o2, 954669600 - tz.transition 2000, 10, :o1, 972810000 - tz.transition 2001, 4, :o2, 986119200 - tz.transition 2001, 10, :o1, 1004259600 - tz.transition 2002, 4, :o2, 1018173600 - tz.transition 2002, 10, :o1, 1035709200 - tz.transition 2003, 4, :o2, 1049623200 - tz.transition 2003, 10, :o1, 1067158800 - tz.transition 2004, 4, :o2, 1081072800 - tz.transition 2004, 10, :o1, 1099213200 - tz.transition 2005, 4, :o2, 1112522400 - tz.transition 2005, 10, :o1, 1130662800 - tz.transition 2006, 4, :o2, 1143972000 - tz.transition 2006, 10, :o1, 1162112400 - tz.transition 2007, 3, :o2, 1173607200 - tz.transition 2007, 11, :o1, 1194166800 - tz.transition 2008, 3, :o2, 1205056800 - tz.transition 2008, 11, :o1, 1225616400 - tz.transition 2009, 3, :o2, 1236506400 - tz.transition 2009, 11, :o1, 1257066000 - tz.transition 2010, 3, :o2, 1268560800 - tz.transition 2010, 11, :o1, 1289120400 - tz.transition 2011, 3, :o2, 1300010400 - tz.transition 2011, 11, :o1, 1320570000 - tz.transition 2012, 3, :o2, 1331460000 - tz.transition 2012, 11, :o1, 1352019600 - tz.transition 2013, 3, :o2, 1362909600 - tz.transition 2013, 11, :o1, 1383469200 - tz.transition 2014, 3, :o2, 1394359200 - tz.transition 2014, 11, :o1, 1414918800 - tz.transition 2015, 3, :o2, 1425808800 - tz.transition 2015, 11, :o1, 1446368400 - tz.transition 2016, 3, :o2, 1457863200 - tz.transition 2016, 11, :o1, 1478422800 - tz.transition 2017, 3, :o2, 1489312800 - tz.transition 2017, 11, :o1, 1509872400 - tz.transition 2018, 3, :o2, 1520762400 - tz.transition 2018, 11, :o1, 1541322000 - tz.transition 2019, 3, :o2, 1552212000 - tz.transition 2019, 11, :o1, 1572771600 - tz.transition 2020, 3, :o2, 1583661600 - tz.transition 2020, 11, :o1, 1604221200 - tz.transition 2021, 3, :o2, 1615716000 - tz.transition 2021, 11, :o1, 1636275600 - tz.transition 2022, 3, :o2, 1647165600 - tz.transition 2022, 11, :o1, 1667725200 - tz.transition 2023, 3, :o2, 1678615200 - tz.transition 2023, 11, :o1, 1699174800 - tz.transition 2024, 3, :o2, 1710064800 - tz.transition 2024, 11, :o1, 1730624400 - tz.transition 2025, 3, :o2, 1741514400 - tz.transition 2025, 11, :o1, 1762074000 - tz.transition 2026, 3, :o2, 1772964000 - tz.transition 2026, 11, :o1, 1793523600 - tz.transition 2027, 3, :o2, 1805018400 - tz.transition 2027, 11, :o1, 1825578000 - tz.transition 2028, 3, :o2, 1836468000 - tz.transition 2028, 11, :o1, 1857027600 - tz.transition 2029, 3, :o2, 1867917600 - tz.transition 2029, 11, :o1, 1888477200 - tz.transition 2030, 3, :o2, 1899367200 - tz.transition 2030, 11, :o1, 1919926800 - tz.transition 2031, 3, :o2, 1930816800 - tz.transition 2031, 11, :o1, 1951376400 - tz.transition 2032, 3, :o2, 1962871200 - tz.transition 2032, 11, :o1, 1983430800 - tz.transition 2033, 3, :o2, 1994320800 - tz.transition 2033, 11, :o1, 2014880400 - tz.transition 2034, 3, :o2, 2025770400 - tz.transition 2034, 11, :o1, 2046330000 - tz.transition 2035, 3, :o2, 2057220000 - tz.transition 2035, 11, :o1, 2077779600 - tz.transition 2036, 3, :o2, 2088669600 - tz.transition 2036, 11, :o1, 2109229200 - tz.transition 2037, 3, :o2, 2120119200 - tz.transition 2037, 11, :o1, 2140678800 - tz.transition 2038, 3, :o2, 29585963, 12 - tz.transition 2038, 11, :o1, 19725879, 8 - tz.transition 2039, 3, :o2, 29590331, 12 - tz.transition 2039, 11, :o1, 19728791, 8 - tz.transition 2040, 3, :o2, 29594699, 12 - tz.transition 2040, 11, :o1, 19731703, 8 - tz.transition 2041, 3, :o2, 29599067, 12 - tz.transition 2041, 11, :o1, 19734615, 8 - tz.transition 2042, 3, :o2, 29603435, 12 - tz.transition 2042, 11, :o1, 19737527, 8 - tz.transition 2043, 3, :o2, 29607803, 12 - tz.transition 2043, 11, :o1, 19740439, 8 - tz.transition 2044, 3, :o2, 29612255, 12 - tz.transition 2044, 11, :o1, 19743407, 8 - tz.transition 2045, 3, :o2, 29616623, 12 - tz.transition 2045, 11, :o1, 19746319, 8 - tz.transition 2046, 3, :o2, 29620991, 12 - tz.transition 2046, 11, :o1, 19749231, 8 - tz.transition 2047, 3, :o2, 29625359, 12 - tz.transition 2047, 11, :o1, 19752143, 8 - tz.transition 2048, 3, :o2, 29629727, 12 - tz.transition 2048, 11, :o1, 19755055, 8 - tz.transition 2049, 3, :o2, 29634179, 12 - tz.transition 2049, 11, :o1, 19758023, 8 - tz.transition 2050, 3, :o2, 29638547, 12 - tz.transition 2050, 11, :o1, 19760935, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb deleted file mode 100644 index ba9e6efcf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mazatlan.rb +++ /dev/null @@ -1,139 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mazatlan - include TimezoneDefinition - - timezone 'America/Mazatlan' do |tz| - tz.offset :o0, -25540, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -28800, 0, :PST - tz.offset :o4, -25200, 3600, :MDT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1942, 4, :o1, 9721895, 4 - tz.transition 1949, 1, :o3, 58390339, 24 - tz.transition 1970, 1, :o1, 28800 - tz.transition 1996, 4, :o4, 828867600 - tz.transition 1996, 10, :o1, 846403200 - tz.transition 1997, 4, :o4, 860317200 - tz.transition 1997, 10, :o1, 877852800 - tz.transition 1998, 4, :o4, 891766800 - tz.transition 1998, 10, :o1, 909302400 - tz.transition 1999, 4, :o4, 923216400 - tz.transition 1999, 10, :o1, 941356800 - tz.transition 2000, 4, :o4, 954666000 - tz.transition 2000, 10, :o1, 972806400 - tz.transition 2001, 5, :o4, 989139600 - tz.transition 2001, 9, :o1, 1001836800 - tz.transition 2002, 4, :o4, 1018170000 - tz.transition 2002, 10, :o1, 1035705600 - tz.transition 2003, 4, :o4, 1049619600 - tz.transition 2003, 10, :o1, 1067155200 - tz.transition 2004, 4, :o4, 1081069200 - tz.transition 2004, 10, :o1, 1099209600 - tz.transition 2005, 4, :o4, 1112518800 - tz.transition 2005, 10, :o1, 1130659200 - tz.transition 2006, 4, :o4, 1143968400 - tz.transition 2006, 10, :o1, 1162108800 - tz.transition 2007, 4, :o4, 1175418000 - tz.transition 2007, 10, :o1, 1193558400 - tz.transition 2008, 4, :o4, 1207472400 - tz.transition 2008, 10, :o1, 1225008000 - tz.transition 2009, 4, :o4, 1238922000 - tz.transition 2009, 10, :o1, 1256457600 - tz.transition 2010, 4, :o4, 1270371600 - tz.transition 2010, 10, :o1, 1288512000 - tz.transition 2011, 4, :o4, 1301821200 - tz.transition 2011, 10, :o1, 1319961600 - tz.transition 2012, 4, :o4, 1333270800 - tz.transition 2012, 10, :o1, 1351411200 - tz.transition 2013, 4, :o4, 1365325200 - tz.transition 2013, 10, :o1, 1382860800 - tz.transition 2014, 4, :o4, 1396774800 - tz.transition 2014, 10, :o1, 1414310400 - tz.transition 2015, 4, :o4, 1428224400 - tz.transition 2015, 10, :o1, 1445760000 - tz.transition 2016, 4, :o4, 1459674000 - tz.transition 2016, 10, :o1, 1477814400 - tz.transition 2017, 4, :o4, 1491123600 - tz.transition 2017, 10, :o1, 1509264000 - tz.transition 2018, 4, :o4, 1522573200 - tz.transition 2018, 10, :o1, 1540713600 - tz.transition 2019, 4, :o4, 1554627600 - tz.transition 2019, 10, :o1, 1572163200 - tz.transition 2020, 4, :o4, 1586077200 - tz.transition 2020, 10, :o1, 1603612800 - tz.transition 2021, 4, :o4, 1617526800 - tz.transition 2021, 10, :o1, 1635667200 - tz.transition 2022, 4, :o4, 1648976400 - tz.transition 2022, 10, :o1, 1667116800 - tz.transition 2023, 4, :o4, 1680426000 - tz.transition 2023, 10, :o1, 1698566400 - tz.transition 2024, 4, :o4, 1712480400 - tz.transition 2024, 10, :o1, 1730016000 - tz.transition 2025, 4, :o4, 1743930000 - tz.transition 2025, 10, :o1, 1761465600 - tz.transition 2026, 4, :o4, 1775379600 - tz.transition 2026, 10, :o1, 1792915200 - tz.transition 2027, 4, :o4, 1806829200 - tz.transition 2027, 10, :o1, 1824969600 - tz.transition 2028, 4, :o4, 1838278800 - tz.transition 2028, 10, :o1, 1856419200 - tz.transition 2029, 4, :o4, 1869728400 - tz.transition 2029, 10, :o1, 1887868800 - tz.transition 2030, 4, :o4, 1901782800 - tz.transition 2030, 10, :o1, 1919318400 - tz.transition 2031, 4, :o4, 1933232400 - tz.transition 2031, 10, :o1, 1950768000 - tz.transition 2032, 4, :o4, 1964682000 - tz.transition 2032, 10, :o1, 1982822400 - tz.transition 2033, 4, :o4, 1996131600 - tz.transition 2033, 10, :o1, 2014272000 - tz.transition 2034, 4, :o4, 2027581200 - tz.transition 2034, 10, :o1, 2045721600 - tz.transition 2035, 4, :o4, 2059030800 - tz.transition 2035, 10, :o1, 2077171200 - tz.transition 2036, 4, :o4, 2091085200 - tz.transition 2036, 10, :o1, 2108620800 - tz.transition 2037, 4, :o4, 2122534800 - tz.transition 2037, 10, :o1, 2140070400 - tz.transition 2038, 4, :o4, 19724143, 8 - tz.transition 2038, 10, :o1, 14794367, 6 - tz.transition 2039, 4, :o4, 19727055, 8 - tz.transition 2039, 10, :o1, 14796551, 6 - tz.transition 2040, 4, :o4, 19729967, 8 - tz.transition 2040, 10, :o1, 14798735, 6 - tz.transition 2041, 4, :o4, 19732935, 8 - tz.transition 2041, 10, :o1, 14800919, 6 - tz.transition 2042, 4, :o4, 19735847, 8 - tz.transition 2042, 10, :o1, 14803103, 6 - tz.transition 2043, 4, :o4, 19738759, 8 - tz.transition 2043, 10, :o1, 14805287, 6 - tz.transition 2044, 4, :o4, 19741671, 8 - tz.transition 2044, 10, :o1, 14807513, 6 - tz.transition 2045, 4, :o4, 19744583, 8 - tz.transition 2045, 10, :o1, 14809697, 6 - tz.transition 2046, 4, :o4, 19747495, 8 - tz.transition 2046, 10, :o1, 14811881, 6 - tz.transition 2047, 4, :o4, 19750463, 8 - tz.transition 2047, 10, :o1, 14814065, 6 - tz.transition 2048, 4, :o4, 19753375, 8 - tz.transition 2048, 10, :o1, 14816249, 6 - tz.transition 2049, 4, :o4, 19756287, 8 - tz.transition 2049, 10, :o1, 14818475, 6 - tz.transition 2050, 4, :o4, 19759199, 8 - tz.transition 2050, 10, :o1, 14820659, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb deleted file mode 100644 index 2347fce64..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Mexico_City.rb +++ /dev/null @@ -1,144 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Mexico_City - include TimezoneDefinition - - timezone 'America/Mexico_City' do |tz| - tz.offset :o0, -23796, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -21600, 0, :CST - tz.offset :o3, -21600, 3600, :CDT - tz.offset :o4, -21600, 3600, :CWT - - tz.transition 1922, 1, :o1, 58153339, 24 - tz.transition 1927, 6, :o2, 9700171, 4 - tz.transition 1930, 11, :o1, 9705183, 4 - tz.transition 1931, 5, :o2, 9705855, 4 - tz.transition 1931, 10, :o1, 9706463, 4 - tz.transition 1932, 4, :o2, 58243171, 24 - tz.transition 1939, 2, :o3, 9717199, 4 - tz.transition 1939, 6, :o2, 58306553, 24 - tz.transition 1940, 12, :o3, 9719891, 4 - tz.transition 1941, 4, :o2, 58322057, 24 - tz.transition 1943, 12, :o4, 9724299, 4 - tz.transition 1944, 5, :o2, 58349081, 24 - tz.transition 1950, 2, :o3, 9733299, 4 - tz.transition 1950, 7, :o2, 58403825, 24 - tz.transition 1996, 4, :o3, 828864000 - tz.transition 1996, 10, :o2, 846399600 - tz.transition 1997, 4, :o3, 860313600 - tz.transition 1997, 10, :o2, 877849200 - tz.transition 1998, 4, :o3, 891763200 - tz.transition 1998, 10, :o2, 909298800 - tz.transition 1999, 4, :o3, 923212800 - tz.transition 1999, 10, :o2, 941353200 - tz.transition 2000, 4, :o3, 954662400 - tz.transition 2000, 10, :o2, 972802800 - tz.transition 2001, 5, :o3, 989136000 - tz.transition 2001, 9, :o2, 1001833200 - tz.transition 2002, 4, :o3, 1018166400 - tz.transition 2002, 10, :o2, 1035702000 - tz.transition 2003, 4, :o3, 1049616000 - tz.transition 2003, 10, :o2, 1067151600 - tz.transition 2004, 4, :o3, 1081065600 - tz.transition 2004, 10, :o2, 1099206000 - tz.transition 2005, 4, :o3, 1112515200 - tz.transition 2005, 10, :o2, 1130655600 - tz.transition 2006, 4, :o3, 1143964800 - tz.transition 2006, 10, :o2, 1162105200 - tz.transition 2007, 4, :o3, 1175414400 - tz.transition 2007, 10, :o2, 1193554800 - tz.transition 2008, 4, :o3, 1207468800 - tz.transition 2008, 10, :o2, 1225004400 - tz.transition 2009, 4, :o3, 1238918400 - tz.transition 2009, 10, :o2, 1256454000 - tz.transition 2010, 4, :o3, 1270368000 - tz.transition 2010, 10, :o2, 1288508400 - tz.transition 2011, 4, :o3, 1301817600 - tz.transition 2011, 10, :o2, 1319958000 - tz.transition 2012, 4, :o3, 1333267200 - tz.transition 2012, 10, :o2, 1351407600 - tz.transition 2013, 4, :o3, 1365321600 - tz.transition 2013, 10, :o2, 1382857200 - tz.transition 2014, 4, :o3, 1396771200 - tz.transition 2014, 10, :o2, 1414306800 - tz.transition 2015, 4, :o3, 1428220800 - tz.transition 2015, 10, :o2, 1445756400 - tz.transition 2016, 4, :o3, 1459670400 - tz.transition 2016, 10, :o2, 1477810800 - tz.transition 2017, 4, :o3, 1491120000 - tz.transition 2017, 10, :o2, 1509260400 - tz.transition 2018, 4, :o3, 1522569600 - tz.transition 2018, 10, :o2, 1540710000 - tz.transition 2019, 4, :o3, 1554624000 - tz.transition 2019, 10, :o2, 1572159600 - tz.transition 2020, 4, :o3, 1586073600 - tz.transition 2020, 10, :o2, 1603609200 - tz.transition 2021, 4, :o3, 1617523200 - tz.transition 2021, 10, :o2, 1635663600 - tz.transition 2022, 4, :o3, 1648972800 - tz.transition 2022, 10, :o2, 1667113200 - tz.transition 2023, 4, :o3, 1680422400 - tz.transition 2023, 10, :o2, 1698562800 - tz.transition 2024, 4, :o3, 1712476800 - tz.transition 2024, 10, :o2, 1730012400 - tz.transition 2025, 4, :o3, 1743926400 - tz.transition 2025, 10, :o2, 1761462000 - tz.transition 2026, 4, :o3, 1775376000 - tz.transition 2026, 10, :o2, 1792911600 - tz.transition 2027, 4, :o3, 1806825600 - tz.transition 2027, 10, :o2, 1824966000 - tz.transition 2028, 4, :o3, 1838275200 - tz.transition 2028, 10, :o2, 1856415600 - tz.transition 2029, 4, :o3, 1869724800 - tz.transition 2029, 10, :o2, 1887865200 - tz.transition 2030, 4, :o3, 1901779200 - tz.transition 2030, 10, :o2, 1919314800 - tz.transition 2031, 4, :o3, 1933228800 - tz.transition 2031, 10, :o2, 1950764400 - tz.transition 2032, 4, :o3, 1964678400 - tz.transition 2032, 10, :o2, 1982818800 - tz.transition 2033, 4, :o3, 1996128000 - tz.transition 2033, 10, :o2, 2014268400 - tz.transition 2034, 4, :o3, 2027577600 - tz.transition 2034, 10, :o2, 2045718000 - tz.transition 2035, 4, :o3, 2059027200 - tz.transition 2035, 10, :o2, 2077167600 - tz.transition 2036, 4, :o3, 2091081600 - tz.transition 2036, 10, :o2, 2108617200 - tz.transition 2037, 4, :o3, 2122531200 - tz.transition 2037, 10, :o2, 2140066800 - tz.transition 2038, 4, :o3, 14793107, 6 - tz.transition 2038, 10, :o2, 59177467, 24 - tz.transition 2039, 4, :o3, 14795291, 6 - tz.transition 2039, 10, :o2, 59186203, 24 - tz.transition 2040, 4, :o3, 14797475, 6 - tz.transition 2040, 10, :o2, 59194939, 24 - tz.transition 2041, 4, :o3, 14799701, 6 - tz.transition 2041, 10, :o2, 59203675, 24 - tz.transition 2042, 4, :o3, 14801885, 6 - tz.transition 2042, 10, :o2, 59212411, 24 - tz.transition 2043, 4, :o3, 14804069, 6 - tz.transition 2043, 10, :o2, 59221147, 24 - tz.transition 2044, 4, :o3, 14806253, 6 - tz.transition 2044, 10, :o2, 59230051, 24 - tz.transition 2045, 4, :o3, 14808437, 6 - tz.transition 2045, 10, :o2, 59238787, 24 - tz.transition 2046, 4, :o3, 14810621, 6 - tz.transition 2046, 10, :o2, 59247523, 24 - tz.transition 2047, 4, :o3, 14812847, 6 - tz.transition 2047, 10, :o2, 59256259, 24 - tz.transition 2048, 4, :o3, 14815031, 6 - tz.transition 2048, 10, :o2, 59264995, 24 - tz.transition 2049, 4, :o3, 14817215, 6 - tz.transition 2049, 10, :o2, 59273899, 24 - tz.transition 2050, 4, :o3, 14819399, 6 - tz.transition 2050, 10, :o2, 59282635, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb deleted file mode 100644 index 5816a9eab..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Monterrey.rb +++ /dev/null @@ -1,131 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Monterrey - include TimezoneDefinition - - timezone 'America/Monterrey' do |tz| - tz.offset :o0, -24076, 0, :LMT - tz.offset :o1, -21600, 0, :CST - tz.offset :o2, -21600, 3600, :CDT - - tz.transition 1922, 1, :o1, 9692223, 4 - tz.transition 1988, 4, :o2, 576057600 - tz.transition 1988, 10, :o1, 594198000 - tz.transition 1996, 4, :o2, 828864000 - tz.transition 1996, 10, :o1, 846399600 - tz.transition 1997, 4, :o2, 860313600 - tz.transition 1997, 10, :o1, 877849200 - tz.transition 1998, 4, :o2, 891763200 - tz.transition 1998, 10, :o1, 909298800 - tz.transition 1999, 4, :o2, 923212800 - tz.transition 1999, 10, :o1, 941353200 - tz.transition 2000, 4, :o2, 954662400 - tz.transition 2000, 10, :o1, 972802800 - tz.transition 2001, 5, :o2, 989136000 - tz.transition 2001, 9, :o1, 1001833200 - tz.transition 2002, 4, :o2, 1018166400 - tz.transition 2002, 10, :o1, 1035702000 - tz.transition 2003, 4, :o2, 1049616000 - tz.transition 2003, 10, :o1, 1067151600 - tz.transition 2004, 4, :o2, 1081065600 - tz.transition 2004, 10, :o1, 1099206000 - tz.transition 2005, 4, :o2, 1112515200 - tz.transition 2005, 10, :o1, 1130655600 - tz.transition 2006, 4, :o2, 1143964800 - tz.transition 2006, 10, :o1, 1162105200 - tz.transition 2007, 4, :o2, 1175414400 - tz.transition 2007, 10, :o1, 1193554800 - tz.transition 2008, 4, :o2, 1207468800 - tz.transition 2008, 10, :o1, 1225004400 - tz.transition 2009, 4, :o2, 1238918400 - tz.transition 2009, 10, :o1, 1256454000 - tz.transition 2010, 4, :o2, 1270368000 - tz.transition 2010, 10, :o1, 1288508400 - tz.transition 2011, 4, :o2, 1301817600 - tz.transition 2011, 10, :o1, 1319958000 - tz.transition 2012, 4, :o2, 1333267200 - tz.transition 2012, 10, :o1, 1351407600 - tz.transition 2013, 4, :o2, 1365321600 - tz.transition 2013, 10, :o1, 1382857200 - tz.transition 2014, 4, :o2, 1396771200 - tz.transition 2014, 10, :o1, 1414306800 - tz.transition 2015, 4, :o2, 1428220800 - tz.transition 2015, 10, :o1, 1445756400 - tz.transition 2016, 4, :o2, 1459670400 - tz.transition 2016, 10, :o1, 1477810800 - tz.transition 2017, 4, :o2, 1491120000 - tz.transition 2017, 10, :o1, 1509260400 - tz.transition 2018, 4, :o2, 1522569600 - tz.transition 2018, 10, :o1, 1540710000 - tz.transition 2019, 4, :o2, 1554624000 - tz.transition 2019, 10, :o1, 1572159600 - tz.transition 2020, 4, :o2, 1586073600 - tz.transition 2020, 10, :o1, 1603609200 - tz.transition 2021, 4, :o2, 1617523200 - tz.transition 2021, 10, :o1, 1635663600 - tz.transition 2022, 4, :o2, 1648972800 - tz.transition 2022, 10, :o1, 1667113200 - tz.transition 2023, 4, :o2, 1680422400 - tz.transition 2023, 10, :o1, 1698562800 - tz.transition 2024, 4, :o2, 1712476800 - tz.transition 2024, 10, :o1, 1730012400 - tz.transition 2025, 4, :o2, 1743926400 - tz.transition 2025, 10, :o1, 1761462000 - tz.transition 2026, 4, :o2, 1775376000 - tz.transition 2026, 10, :o1, 1792911600 - tz.transition 2027, 4, :o2, 1806825600 - tz.transition 2027, 10, :o1, 1824966000 - tz.transition 2028, 4, :o2, 1838275200 - tz.transition 2028, 10, :o1, 1856415600 - tz.transition 2029, 4, :o2, 1869724800 - tz.transition 2029, 10, :o1, 1887865200 - tz.transition 2030, 4, :o2, 1901779200 - tz.transition 2030, 10, :o1, 1919314800 - tz.transition 2031, 4, :o2, 1933228800 - tz.transition 2031, 10, :o1, 1950764400 - tz.transition 2032, 4, :o2, 1964678400 - tz.transition 2032, 10, :o1, 1982818800 - tz.transition 2033, 4, :o2, 1996128000 - tz.transition 2033, 10, :o1, 2014268400 - tz.transition 2034, 4, :o2, 2027577600 - tz.transition 2034, 10, :o1, 2045718000 - tz.transition 2035, 4, :o2, 2059027200 - tz.transition 2035, 10, :o1, 2077167600 - tz.transition 2036, 4, :o2, 2091081600 - tz.transition 2036, 10, :o1, 2108617200 - tz.transition 2037, 4, :o2, 2122531200 - tz.transition 2037, 10, :o1, 2140066800 - tz.transition 2038, 4, :o2, 14793107, 6 - tz.transition 2038, 10, :o1, 59177467, 24 - tz.transition 2039, 4, :o2, 14795291, 6 - tz.transition 2039, 10, :o1, 59186203, 24 - tz.transition 2040, 4, :o2, 14797475, 6 - tz.transition 2040, 10, :o1, 59194939, 24 - tz.transition 2041, 4, :o2, 14799701, 6 - tz.transition 2041, 10, :o1, 59203675, 24 - tz.transition 2042, 4, :o2, 14801885, 6 - tz.transition 2042, 10, :o1, 59212411, 24 - tz.transition 2043, 4, :o2, 14804069, 6 - tz.transition 2043, 10, :o1, 59221147, 24 - tz.transition 2044, 4, :o2, 14806253, 6 - tz.transition 2044, 10, :o1, 59230051, 24 - tz.transition 2045, 4, :o2, 14808437, 6 - tz.transition 2045, 10, :o1, 59238787, 24 - tz.transition 2046, 4, :o2, 14810621, 6 - tz.transition 2046, 10, :o1, 59247523, 24 - tz.transition 2047, 4, :o2, 14812847, 6 - tz.transition 2047, 10, :o1, 59256259, 24 - tz.transition 2048, 4, :o2, 14815031, 6 - tz.transition 2048, 10, :o1, 59264995, 24 - tz.transition 2049, 4, :o2, 14817215, 6 - tz.transition 2049, 10, :o1, 59273899, 24 - tz.transition 2050, 4, :o2, 14819399, 6 - tz.transition 2050, 10, :o1, 59282635, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb deleted file mode 100644 index 7d802bd2d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/New_York.rb +++ /dev/null @@ -1,282 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module New_York - include TimezoneDefinition - - timezone 'America/New_York' do |tz| - tz.offset :o0, -17762, 0, :LMT - tz.offset :o1, -18000, 0, :EST - tz.offset :o2, -18000, 3600, :EDT - tz.offset :o3, -18000, 3600, :EWT - tz.offset :o4, -18000, 3600, :EPT - - tz.transition 1883, 11, :o1, 57819197, 24 - tz.transition 1918, 3, :o2, 58120411, 24 - tz.transition 1918, 10, :o1, 9687575, 4 - tz.transition 1919, 3, :o2, 58129147, 24 - tz.transition 1919, 10, :o1, 9689031, 4 - tz.transition 1920, 3, :o2, 58137883, 24 - tz.transition 1920, 10, :o1, 9690515, 4 - tz.transition 1921, 4, :o2, 58147291, 24 - tz.transition 1921, 9, :o1, 9691831, 4 - tz.transition 1922, 4, :o2, 58156195, 24 - tz.transition 1922, 9, :o1, 9693287, 4 - tz.transition 1923, 4, :o2, 58164931, 24 - tz.transition 1923, 9, :o1, 9694771, 4 - tz.transition 1924, 4, :o2, 58173667, 24 - tz.transition 1924, 9, :o1, 9696227, 4 - tz.transition 1925, 4, :o2, 58182403, 24 - tz.transition 1925, 9, :o1, 9697683, 4 - tz.transition 1926, 4, :o2, 58191139, 24 - tz.transition 1926, 9, :o1, 9699139, 4 - tz.transition 1927, 4, :o2, 58199875, 24 - tz.transition 1927, 9, :o1, 9700595, 4 - tz.transition 1928, 4, :o2, 58208779, 24 - tz.transition 1928, 9, :o1, 9702079, 4 - tz.transition 1929, 4, :o2, 58217515, 24 - tz.transition 1929, 9, :o1, 9703535, 4 - tz.transition 1930, 4, :o2, 58226251, 24 - tz.transition 1930, 9, :o1, 9704991, 4 - tz.transition 1931, 4, :o2, 58234987, 24 - tz.transition 1931, 9, :o1, 9706447, 4 - tz.transition 1932, 4, :o2, 58243723, 24 - tz.transition 1932, 9, :o1, 9707903, 4 - tz.transition 1933, 4, :o2, 58252627, 24 - tz.transition 1933, 9, :o1, 9709359, 4 - tz.transition 1934, 4, :o2, 58261363, 24 - tz.transition 1934, 9, :o1, 9710843, 4 - tz.transition 1935, 4, :o2, 58270099, 24 - tz.transition 1935, 9, :o1, 9712299, 4 - tz.transition 1936, 4, :o2, 58278835, 24 - tz.transition 1936, 9, :o1, 9713755, 4 - tz.transition 1937, 4, :o2, 58287571, 24 - tz.transition 1937, 9, :o1, 9715211, 4 - tz.transition 1938, 4, :o2, 58296307, 24 - tz.transition 1938, 9, :o1, 9716667, 4 - tz.transition 1939, 4, :o2, 58305211, 24 - tz.transition 1939, 9, :o1, 9718123, 4 - tz.transition 1940, 4, :o2, 58313947, 24 - tz.transition 1940, 9, :o1, 9719607, 4 - tz.transition 1941, 4, :o2, 58322683, 24 - tz.transition 1941, 9, :o1, 9721063, 4 - tz.transition 1942, 2, :o3, 58329595, 24 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 9726915, 4 - tz.transition 1946, 4, :o2, 58366531, 24 - tz.transition 1946, 9, :o1, 9728371, 4 - tz.transition 1947, 4, :o2, 58375267, 24 - tz.transition 1947, 9, :o1, 9729827, 4 - tz.transition 1948, 4, :o2, 58384003, 24 - tz.transition 1948, 9, :o1, 9731283, 4 - tz.transition 1949, 4, :o2, 58392739, 24 - tz.transition 1949, 9, :o1, 9732739, 4 - tz.transition 1950, 4, :o2, 58401643, 24 - tz.transition 1950, 9, :o1, 9734195, 4 - tz.transition 1951, 4, :o2, 58410379, 24 - tz.transition 1951, 9, :o1, 9735679, 4 - tz.transition 1952, 4, :o2, 58419115, 24 - tz.transition 1952, 9, :o1, 9737135, 4 - tz.transition 1953, 4, :o2, 58427851, 24 - tz.transition 1953, 9, :o1, 9738591, 4 - tz.transition 1954, 4, :o2, 58436587, 24 - tz.transition 1954, 9, :o1, 9740047, 4 - tz.transition 1955, 4, :o2, 58445323, 24 - tz.transition 1955, 10, :o1, 9741643, 4 - tz.transition 1956, 4, :o2, 58454227, 24 - tz.transition 1956, 10, :o1, 9743099, 4 - tz.transition 1957, 4, :o2, 58462963, 24 - tz.transition 1957, 10, :o1, 9744555, 4 - tz.transition 1958, 4, :o2, 58471699, 24 - tz.transition 1958, 10, :o1, 9746011, 4 - tz.transition 1959, 4, :o2, 58480435, 24 - tz.transition 1959, 10, :o1, 9747467, 4 - tz.transition 1960, 4, :o2, 58489171, 24 - tz.transition 1960, 10, :o1, 9748951, 4 - tz.transition 1961, 4, :o2, 58498075, 24 - tz.transition 1961, 10, :o1, 9750407, 4 - tz.transition 1962, 4, :o2, 58506811, 24 - tz.transition 1962, 10, :o1, 9751863, 4 - tz.transition 1963, 4, :o2, 58515547, 24 - tz.transition 1963, 10, :o1, 9753319, 4 - tz.transition 1964, 4, :o2, 58524283, 24 - tz.transition 1964, 10, :o1, 9754775, 4 - tz.transition 1965, 4, :o2, 58533019, 24 - tz.transition 1965, 10, :o1, 9756259, 4 - tz.transition 1966, 4, :o2, 58541755, 24 - tz.transition 1966, 10, :o1, 9757715, 4 - tz.transition 1967, 4, :o2, 58550659, 24 - tz.transition 1967, 10, :o1, 9759171, 4 - tz.transition 1968, 4, :o2, 58559395, 24 - tz.transition 1968, 10, :o1, 9760627, 4 - tz.transition 1969, 4, :o2, 58568131, 24 - tz.transition 1969, 10, :o1, 9762083, 4 - tz.transition 1970, 4, :o2, 9961200 - tz.transition 1970, 10, :o1, 25682400 - tz.transition 1971, 4, :o2, 41410800 - tz.transition 1971, 10, :o1, 57736800 - tz.transition 1972, 4, :o2, 73465200 - tz.transition 1972, 10, :o1, 89186400 - tz.transition 1973, 4, :o2, 104914800 - tz.transition 1973, 10, :o1, 120636000 - tz.transition 1974, 1, :o2, 126687600 - tz.transition 1974, 10, :o1, 152085600 - tz.transition 1975, 2, :o2, 162370800 - tz.transition 1975, 10, :o1, 183535200 - tz.transition 1976, 4, :o2, 199263600 - tz.transition 1976, 10, :o1, 215589600 - tz.transition 1977, 4, :o2, 230713200 - tz.transition 1977, 10, :o1, 247039200 - tz.transition 1978, 4, :o2, 262767600 - tz.transition 1978, 10, :o1, 278488800 - tz.transition 1979, 4, :o2, 294217200 - tz.transition 1979, 10, :o1, 309938400 - tz.transition 1980, 4, :o2, 325666800 - tz.transition 1980, 10, :o1, 341388000 - tz.transition 1981, 4, :o2, 357116400 - tz.transition 1981, 10, :o1, 372837600 - tz.transition 1982, 4, :o2, 388566000 - tz.transition 1982, 10, :o1, 404892000 - tz.transition 1983, 4, :o2, 420015600 - tz.transition 1983, 10, :o1, 436341600 - tz.transition 1984, 4, :o2, 452070000 - tz.transition 1984, 10, :o1, 467791200 - tz.transition 1985, 4, :o2, 483519600 - tz.transition 1985, 10, :o1, 499240800 - tz.transition 1986, 4, :o2, 514969200 - tz.transition 1986, 10, :o1, 530690400 - tz.transition 1987, 4, :o2, 544604400 - tz.transition 1987, 10, :o1, 562140000 - tz.transition 1988, 4, :o2, 576054000 - tz.transition 1988, 10, :o1, 594194400 - tz.transition 1989, 4, :o2, 607503600 - tz.transition 1989, 10, :o1, 625644000 - tz.transition 1990, 4, :o2, 638953200 - tz.transition 1990, 10, :o1, 657093600 - tz.transition 1991, 4, :o2, 671007600 - tz.transition 1991, 10, :o1, 688543200 - tz.transition 1992, 4, :o2, 702457200 - tz.transition 1992, 10, :o1, 719992800 - tz.transition 1993, 4, :o2, 733906800 - tz.transition 1993, 10, :o1, 752047200 - tz.transition 1994, 4, :o2, 765356400 - tz.transition 1994, 10, :o1, 783496800 - tz.transition 1995, 4, :o2, 796806000 - tz.transition 1995, 10, :o1, 814946400 - tz.transition 1996, 4, :o2, 828860400 - tz.transition 1996, 10, :o1, 846396000 - tz.transition 1997, 4, :o2, 860310000 - tz.transition 1997, 10, :o1, 877845600 - tz.transition 1998, 4, :o2, 891759600 - tz.transition 1998, 10, :o1, 909295200 - tz.transition 1999, 4, :o2, 923209200 - tz.transition 1999, 10, :o1, 941349600 - tz.transition 2000, 4, :o2, 954658800 - tz.transition 2000, 10, :o1, 972799200 - tz.transition 2001, 4, :o2, 986108400 - tz.transition 2001, 10, :o1, 1004248800 - tz.transition 2002, 4, :o2, 1018162800 - tz.transition 2002, 10, :o1, 1035698400 - tz.transition 2003, 4, :o2, 1049612400 - tz.transition 2003, 10, :o1, 1067148000 - tz.transition 2004, 4, :o2, 1081062000 - tz.transition 2004, 10, :o1, 1099202400 - tz.transition 2005, 4, :o2, 1112511600 - tz.transition 2005, 10, :o1, 1130652000 - tz.transition 2006, 4, :o2, 1143961200 - tz.transition 2006, 10, :o1, 1162101600 - tz.transition 2007, 3, :o2, 1173596400 - tz.transition 2007, 11, :o1, 1194156000 - tz.transition 2008, 3, :o2, 1205046000 - tz.transition 2008, 11, :o1, 1225605600 - tz.transition 2009, 3, :o2, 1236495600 - tz.transition 2009, 11, :o1, 1257055200 - tz.transition 2010, 3, :o2, 1268550000 - tz.transition 2010, 11, :o1, 1289109600 - tz.transition 2011, 3, :o2, 1299999600 - tz.transition 2011, 11, :o1, 1320559200 - tz.transition 2012, 3, :o2, 1331449200 - tz.transition 2012, 11, :o1, 1352008800 - tz.transition 2013, 3, :o2, 1362898800 - tz.transition 2013, 11, :o1, 1383458400 - tz.transition 2014, 3, :o2, 1394348400 - tz.transition 2014, 11, :o1, 1414908000 - tz.transition 2015, 3, :o2, 1425798000 - tz.transition 2015, 11, :o1, 1446357600 - tz.transition 2016, 3, :o2, 1457852400 - tz.transition 2016, 11, :o1, 1478412000 - tz.transition 2017, 3, :o2, 1489302000 - tz.transition 2017, 11, :o1, 1509861600 - tz.transition 2018, 3, :o2, 1520751600 - tz.transition 2018, 11, :o1, 1541311200 - tz.transition 2019, 3, :o2, 1552201200 - tz.transition 2019, 11, :o1, 1572760800 - tz.transition 2020, 3, :o2, 1583650800 - tz.transition 2020, 11, :o1, 1604210400 - tz.transition 2021, 3, :o2, 1615705200 - tz.transition 2021, 11, :o1, 1636264800 - tz.transition 2022, 3, :o2, 1647154800 - tz.transition 2022, 11, :o1, 1667714400 - tz.transition 2023, 3, :o2, 1678604400 - tz.transition 2023, 11, :o1, 1699164000 - tz.transition 2024, 3, :o2, 1710054000 - tz.transition 2024, 11, :o1, 1730613600 - tz.transition 2025, 3, :o2, 1741503600 - tz.transition 2025, 11, :o1, 1762063200 - tz.transition 2026, 3, :o2, 1772953200 - tz.transition 2026, 11, :o1, 1793512800 - tz.transition 2027, 3, :o2, 1805007600 - tz.transition 2027, 11, :o1, 1825567200 - tz.transition 2028, 3, :o2, 1836457200 - tz.transition 2028, 11, :o1, 1857016800 - tz.transition 2029, 3, :o2, 1867906800 - tz.transition 2029, 11, :o1, 1888466400 - tz.transition 2030, 3, :o2, 1899356400 - tz.transition 2030, 11, :o1, 1919916000 - tz.transition 2031, 3, :o2, 1930806000 - tz.transition 2031, 11, :o1, 1951365600 - tz.transition 2032, 3, :o2, 1962860400 - tz.transition 2032, 11, :o1, 1983420000 - tz.transition 2033, 3, :o2, 1994310000 - tz.transition 2033, 11, :o1, 2014869600 - tz.transition 2034, 3, :o2, 2025759600 - tz.transition 2034, 11, :o1, 2046319200 - tz.transition 2035, 3, :o2, 2057209200 - tz.transition 2035, 11, :o1, 2077768800 - tz.transition 2036, 3, :o2, 2088658800 - tz.transition 2036, 11, :o1, 2109218400 - tz.transition 2037, 3, :o2, 2120108400 - tz.transition 2037, 11, :o1, 2140668000 - tz.transition 2038, 3, :o2, 59171923, 24 - tz.transition 2038, 11, :o1, 9862939, 4 - tz.transition 2039, 3, :o2, 59180659, 24 - tz.transition 2039, 11, :o1, 9864395, 4 - tz.transition 2040, 3, :o2, 59189395, 24 - tz.transition 2040, 11, :o1, 9865851, 4 - tz.transition 2041, 3, :o2, 59198131, 24 - tz.transition 2041, 11, :o1, 9867307, 4 - tz.transition 2042, 3, :o2, 59206867, 24 - tz.transition 2042, 11, :o1, 9868763, 4 - tz.transition 2043, 3, :o2, 59215603, 24 - tz.transition 2043, 11, :o1, 9870219, 4 - tz.transition 2044, 3, :o2, 59224507, 24 - tz.transition 2044, 11, :o1, 9871703, 4 - tz.transition 2045, 3, :o2, 59233243, 24 - tz.transition 2045, 11, :o1, 9873159, 4 - tz.transition 2046, 3, :o2, 59241979, 24 - tz.transition 2046, 11, :o1, 9874615, 4 - tz.transition 2047, 3, :o2, 59250715, 24 - tz.transition 2047, 11, :o1, 9876071, 4 - tz.transition 2048, 3, :o2, 59259451, 24 - tz.transition 2048, 11, :o1, 9877527, 4 - tz.transition 2049, 3, :o2, 59268355, 24 - tz.transition 2049, 11, :o1, 9879011, 4 - tz.transition 2050, 3, :o2, 59277091, 24 - tz.transition 2050, 11, :o1, 9880467, 4 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb deleted file mode 100644 index b514e0c0f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Phoenix.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Phoenix - include TimezoneDefinition - - timezone 'America/Phoenix' do |tz| - tz.offset :o0, -26898, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - - tz.transition 1883, 11, :o1, 57819199, 24 - tz.transition 1918, 3, :o2, 19373471, 8 - tz.transition 1918, 10, :o1, 14531363, 6 - tz.transition 1919, 3, :o2, 19376383, 8 - tz.transition 1919, 10, :o1, 14533547, 6 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1944, 1, :o1, 3500770681, 1440 - tz.transition 1944, 4, :o3, 3500901781, 1440 - tz.transition 1944, 10, :o1, 3501165241, 1440 - tz.transition 1967, 4, :o2, 19516887, 8 - tz.transition 1967, 10, :o1, 14638757, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb deleted file mode 100644 index ebdb68814..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Regina.rb +++ /dev/null @@ -1,74 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Regina - include TimezoneDefinition - - timezone 'America/Regina' do |tz| - tz.offset :o0, -25116, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -25200, 3600, :MDT - tz.offset :o3, -25200, 3600, :MWT - tz.offset :o4, -25200, 3600, :MPT - tz.offset :o5, -21600, 0, :CST - - tz.transition 1905, 9, :o1, 17403046493, 7200 - tz.transition 1918, 4, :o2, 19373583, 8 - tz.transition 1918, 10, :o1, 14531387, 6 - tz.transition 1930, 5, :o2, 58226419, 24 - tz.transition 1930, 10, :o1, 9705019, 4 - tz.transition 1931, 5, :o2, 58235155, 24 - tz.transition 1931, 10, :o1, 9706475, 4 - tz.transition 1932, 5, :o2, 58243891, 24 - tz.transition 1932, 10, :o1, 9707931, 4 - tz.transition 1933, 5, :o2, 58252795, 24 - tz.transition 1933, 10, :o1, 9709387, 4 - tz.transition 1934, 5, :o2, 58261531, 24 - tz.transition 1934, 10, :o1, 9710871, 4 - tz.transition 1937, 4, :o2, 58287235, 24 - tz.transition 1937, 10, :o1, 9715267, 4 - tz.transition 1938, 4, :o2, 58295971, 24 - tz.transition 1938, 10, :o1, 9716695, 4 - tz.transition 1939, 4, :o2, 58304707, 24 - tz.transition 1939, 10, :o1, 9718179, 4 - tz.transition 1940, 4, :o2, 58313611, 24 - tz.transition 1940, 10, :o1, 9719663, 4 - tz.transition 1941, 4, :o2, 58322347, 24 - tz.transition 1941, 10, :o1, 9721119, 4 - tz.transition 1942, 2, :o3, 19443199, 8 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 14590373, 6 - tz.transition 1946, 4, :o2, 19455399, 8 - tz.transition 1946, 10, :o1, 14592641, 6 - tz.transition 1947, 4, :o2, 19458423, 8 - tz.transition 1947, 9, :o1, 14594741, 6 - tz.transition 1948, 4, :o2, 19461335, 8 - tz.transition 1948, 9, :o1, 14596925, 6 - tz.transition 1949, 4, :o2, 19464247, 8 - tz.transition 1949, 9, :o1, 14599109, 6 - tz.transition 1950, 4, :o2, 19467215, 8 - tz.transition 1950, 9, :o1, 14601293, 6 - tz.transition 1951, 4, :o2, 19470127, 8 - tz.transition 1951, 9, :o1, 14603519, 6 - tz.transition 1952, 4, :o2, 19473039, 8 - tz.transition 1952, 9, :o1, 14605703, 6 - tz.transition 1953, 4, :o2, 19475951, 8 - tz.transition 1953, 9, :o1, 14607887, 6 - tz.transition 1954, 4, :o2, 19478863, 8 - tz.transition 1954, 9, :o1, 14610071, 6 - tz.transition 1955, 4, :o2, 19481775, 8 - tz.transition 1955, 9, :o1, 14612255, 6 - tz.transition 1956, 4, :o2, 19484743, 8 - tz.transition 1956, 9, :o1, 14614481, 6 - tz.transition 1957, 4, :o2, 19487655, 8 - tz.transition 1957, 9, :o1, 14616665, 6 - tz.transition 1959, 4, :o2, 19493479, 8 - tz.transition 1959, 10, :o1, 14621201, 6 - tz.transition 1960, 4, :o5, 19496391, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb deleted file mode 100644 index 0287c9ebc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Santiago.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Santiago - include TimezoneDefinition - - timezone 'America/Santiago' do |tz| - tz.offset :o0, -16966, 0, :LMT - tz.offset :o1, -16966, 0, :SMT - tz.offset :o2, -18000, 0, :CLT - tz.offset :o3, -14400, 0, :CLT - tz.offset :o4, -18000, 3600, :CLST - tz.offset :o5, -14400, 3600, :CLST - - tz.transition 1890, 1, :o1, 104171127683, 43200 - tz.transition 1910, 1, :o2, 104486660483, 43200 - tz.transition 1916, 7, :o1, 58105097, 24 - tz.transition 1918, 9, :o3, 104623388483, 43200 - tz.transition 1919, 7, :o1, 7266422, 3 - tz.transition 1927, 9, :o4, 104765386883, 43200 - tz.transition 1928, 4, :o2, 7276013, 3 - tz.transition 1928, 9, :o4, 58211777, 24 - tz.transition 1929, 4, :o2, 7277108, 3 - tz.transition 1929, 9, :o4, 58220537, 24 - tz.transition 1930, 4, :o2, 7278203, 3 - tz.transition 1930, 9, :o4, 58229297, 24 - tz.transition 1931, 4, :o2, 7279298, 3 - tz.transition 1931, 9, :o4, 58238057, 24 - tz.transition 1932, 4, :o2, 7280396, 3 - tz.transition 1932, 9, :o4, 58246841, 24 - tz.transition 1942, 6, :o2, 7291535, 3 - tz.transition 1942, 8, :o4, 58333745, 24 - tz.transition 1946, 9, :o2, 19456517, 8 - tz.transition 1947, 5, :o3, 58375865, 24 - tz.transition 1968, 11, :o5, 7320491, 3 - tz.transition 1969, 3, :o3, 19522485, 8 - tz.transition 1969, 11, :o5, 7321646, 3 - tz.transition 1970, 3, :o3, 7527600 - tz.transition 1970, 10, :o5, 24465600 - tz.transition 1971, 3, :o3, 37767600 - tz.transition 1971, 10, :o5, 55915200 - tz.transition 1972, 3, :o3, 69217200 - tz.transition 1972, 10, :o5, 87969600 - tz.transition 1973, 3, :o3, 100666800 - tz.transition 1973, 9, :o5, 118209600 - tz.transition 1974, 3, :o3, 132116400 - tz.transition 1974, 10, :o5, 150868800 - tz.transition 1975, 3, :o3, 163566000 - tz.transition 1975, 10, :o5, 182318400 - tz.transition 1976, 3, :o3, 195620400 - tz.transition 1976, 10, :o5, 213768000 - tz.transition 1977, 3, :o3, 227070000 - tz.transition 1977, 10, :o5, 245217600 - tz.transition 1978, 3, :o3, 258519600 - tz.transition 1978, 10, :o5, 277272000 - tz.transition 1979, 3, :o3, 289969200 - tz.transition 1979, 10, :o5, 308721600 - tz.transition 1980, 3, :o3, 321418800 - tz.transition 1980, 10, :o5, 340171200 - tz.transition 1981, 3, :o3, 353473200 - tz.transition 1981, 10, :o5, 371620800 - tz.transition 1982, 3, :o3, 384922800 - tz.transition 1982, 10, :o5, 403070400 - tz.transition 1983, 3, :o3, 416372400 - tz.transition 1983, 10, :o5, 434520000 - tz.transition 1984, 3, :o3, 447822000 - tz.transition 1984, 10, :o5, 466574400 - tz.transition 1985, 3, :o3, 479271600 - tz.transition 1985, 10, :o5, 498024000 - tz.transition 1986, 3, :o3, 510721200 - tz.transition 1986, 10, :o5, 529473600 - tz.transition 1987, 4, :o3, 545194800 - tz.transition 1987, 10, :o5, 560923200 - tz.transition 1988, 3, :o3, 574225200 - tz.transition 1988, 10, :o5, 591768000 - tz.transition 1989, 3, :o3, 605674800 - tz.transition 1989, 10, :o5, 624427200 - tz.transition 1990, 3, :o3, 637729200 - tz.transition 1990, 9, :o5, 653457600 - tz.transition 1991, 3, :o3, 668574000 - tz.transition 1991, 10, :o5, 687326400 - tz.transition 1992, 3, :o3, 700628400 - tz.transition 1992, 10, :o5, 718776000 - tz.transition 1993, 3, :o3, 732078000 - tz.transition 1993, 10, :o5, 750225600 - tz.transition 1994, 3, :o3, 763527600 - tz.transition 1994, 10, :o5, 781675200 - tz.transition 1995, 3, :o3, 794977200 - tz.transition 1995, 10, :o5, 813729600 - tz.transition 1996, 3, :o3, 826426800 - tz.transition 1996, 10, :o5, 845179200 - tz.transition 1997, 3, :o3, 859690800 - tz.transition 1997, 10, :o5, 876628800 - tz.transition 1998, 3, :o3, 889930800 - tz.transition 1998, 9, :o5, 906868800 - tz.transition 1999, 4, :o3, 923194800 - tz.transition 1999, 10, :o5, 939528000 - tz.transition 2000, 3, :o3, 952830000 - tz.transition 2000, 10, :o5, 971582400 - tz.transition 2001, 3, :o3, 984279600 - tz.transition 2001, 10, :o5, 1003032000 - tz.transition 2002, 3, :o3, 1015729200 - tz.transition 2002, 10, :o5, 1034481600 - tz.transition 2003, 3, :o3, 1047178800 - tz.transition 2003, 10, :o5, 1065931200 - tz.transition 2004, 3, :o3, 1079233200 - tz.transition 2004, 10, :o5, 1097380800 - tz.transition 2005, 3, :o3, 1110682800 - tz.transition 2005, 10, :o5, 1128830400 - tz.transition 2006, 3, :o3, 1142132400 - tz.transition 2006, 10, :o5, 1160884800 - tz.transition 2007, 3, :o3, 1173582000 - tz.transition 2007, 10, :o5, 1192334400 - tz.transition 2008, 3, :o3, 1206846000 - tz.transition 2008, 10, :o5, 1223784000 - tz.transition 2009, 3, :o3, 1237086000 - tz.transition 2009, 10, :o5, 1255233600 - tz.transition 2010, 3, :o3, 1268535600 - tz.transition 2010, 10, :o5, 1286683200 - tz.transition 2011, 3, :o3, 1299985200 - tz.transition 2011, 10, :o5, 1318132800 - tz.transition 2012, 3, :o3, 1331434800 - tz.transition 2012, 10, :o5, 1350187200 - tz.transition 2013, 3, :o3, 1362884400 - tz.transition 2013, 10, :o5, 1381636800 - tz.transition 2014, 3, :o3, 1394334000 - tz.transition 2014, 10, :o5, 1413086400 - tz.transition 2015, 3, :o3, 1426388400 - tz.transition 2015, 10, :o5, 1444536000 - tz.transition 2016, 3, :o3, 1457838000 - tz.transition 2016, 10, :o5, 1475985600 - tz.transition 2017, 3, :o3, 1489287600 - tz.transition 2017, 10, :o5, 1508040000 - tz.transition 2018, 3, :o3, 1520737200 - tz.transition 2018, 10, :o5, 1539489600 - tz.transition 2019, 3, :o3, 1552186800 - tz.transition 2019, 10, :o5, 1570939200 - tz.transition 2020, 3, :o3, 1584241200 - tz.transition 2020, 10, :o5, 1602388800 - tz.transition 2021, 3, :o3, 1615690800 - tz.transition 2021, 10, :o5, 1633838400 - tz.transition 2022, 3, :o3, 1647140400 - tz.transition 2022, 10, :o5, 1665288000 - tz.transition 2023, 3, :o3, 1678590000 - tz.transition 2023, 10, :o5, 1697342400 - tz.transition 2024, 3, :o3, 1710039600 - tz.transition 2024, 10, :o5, 1728792000 - tz.transition 2025, 3, :o3, 1741489200 - tz.transition 2025, 10, :o5, 1760241600 - tz.transition 2026, 3, :o3, 1773543600 - tz.transition 2026, 10, :o5, 1791691200 - tz.transition 2027, 3, :o3, 1804993200 - tz.transition 2027, 10, :o5, 1823140800 - tz.transition 2028, 3, :o3, 1836442800 - tz.transition 2028, 10, :o5, 1855195200 - tz.transition 2029, 3, :o3, 1867892400 - tz.transition 2029, 10, :o5, 1886644800 - tz.transition 2030, 3, :o3, 1899342000 - tz.transition 2030, 10, :o5, 1918094400 - tz.transition 2031, 3, :o3, 1930791600 - tz.transition 2031, 10, :o5, 1949544000 - tz.transition 2032, 3, :o3, 1962846000 - tz.transition 2032, 10, :o5, 1980993600 - tz.transition 2033, 3, :o3, 1994295600 - tz.transition 2033, 10, :o5, 2012443200 - tz.transition 2034, 3, :o3, 2025745200 - tz.transition 2034, 10, :o5, 2044497600 - tz.transition 2035, 3, :o3, 2057194800 - tz.transition 2035, 10, :o5, 2075947200 - tz.transition 2036, 3, :o3, 2088644400 - tz.transition 2036, 10, :o5, 2107396800 - tz.transition 2037, 3, :o3, 2120698800 - tz.transition 2037, 10, :o5, 2138846400 - tz.transition 2038, 3, :o3, 19723973, 8 - tz.transition 2038, 10, :o5, 7397120, 3 - tz.transition 2039, 3, :o3, 19726885, 8 - tz.transition 2039, 10, :o5, 7398212, 3 - tz.transition 2040, 3, :o3, 19729797, 8 - tz.transition 2040, 10, :o5, 7399325, 3 - tz.transition 2041, 3, :o3, 19732709, 8 - tz.transition 2041, 10, :o5, 7400417, 3 - tz.transition 2042, 3, :o3, 19735621, 8 - tz.transition 2042, 10, :o5, 7401509, 3 - tz.transition 2043, 3, :o3, 19738589, 8 - tz.transition 2043, 10, :o5, 7402601, 3 - tz.transition 2044, 3, :o3, 19741501, 8 - tz.transition 2044, 10, :o5, 7403693, 3 - tz.transition 2045, 3, :o3, 19744413, 8 - tz.transition 2045, 10, :o5, 7404806, 3 - tz.transition 2046, 3, :o3, 19747325, 8 - tz.transition 2046, 10, :o5, 7405898, 3 - tz.transition 2047, 3, :o3, 19750237, 8 - tz.transition 2047, 10, :o5, 7406990, 3 - tz.transition 2048, 3, :o3, 19753205, 8 - tz.transition 2048, 10, :o5, 7408082, 3 - tz.transition 2049, 3, :o3, 19756117, 8 - tz.transition 2049, 10, :o5, 7409174, 3 - tz.transition 2050, 3, :o3, 19759029, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb deleted file mode 100644 index 0524f81c0..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Sao_Paulo.rb +++ /dev/null @@ -1,171 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Sao_Paulo - include TimezoneDefinition - - timezone 'America/Sao_Paulo' do |tz| - tz.offset :o0, -11188, 0, :LMT - tz.offset :o1, -10800, 0, :BRT - tz.offset :o2, -10800, 3600, :BRST - - tz.transition 1914, 1, :o1, 52274886397, 21600 - tz.transition 1931, 10, :o2, 29119417, 12 - tz.transition 1932, 4, :o1, 29121583, 12 - tz.transition 1932, 10, :o2, 19415869, 8 - tz.transition 1933, 4, :o1, 29125963, 12 - tz.transition 1949, 12, :o2, 19466013, 8 - tz.transition 1950, 4, :o1, 19467101, 8 - tz.transition 1950, 12, :o2, 19468933, 8 - tz.transition 1951, 4, :o1, 29204851, 12 - tz.transition 1951, 12, :o2, 19471853, 8 - tz.transition 1952, 4, :o1, 29209243, 12 - tz.transition 1952, 12, :o2, 19474781, 8 - tz.transition 1953, 3, :o1, 29213251, 12 - tz.transition 1963, 10, :o2, 19506605, 8 - tz.transition 1964, 3, :o1, 29261467, 12 - tz.transition 1965, 1, :o2, 19510333, 8 - tz.transition 1965, 3, :o1, 29266207, 12 - tz.transition 1965, 12, :o2, 19512765, 8 - tz.transition 1966, 3, :o1, 29270227, 12 - tz.transition 1966, 11, :o2, 19515445, 8 - tz.transition 1967, 3, :o1, 29274607, 12 - tz.transition 1967, 11, :o2, 19518365, 8 - tz.transition 1968, 3, :o1, 29278999, 12 - tz.transition 1985, 11, :o2, 499748400 - tz.transition 1986, 3, :o1, 511236000 - tz.transition 1986, 10, :o2, 530593200 - tz.transition 1987, 2, :o1, 540266400 - tz.transition 1987, 10, :o2, 562129200 - tz.transition 1988, 2, :o1, 571197600 - tz.transition 1988, 10, :o2, 592974000 - tz.transition 1989, 1, :o1, 602042400 - tz.transition 1989, 10, :o2, 624423600 - tz.transition 1990, 2, :o1, 634701600 - tz.transition 1990, 10, :o2, 656478000 - tz.transition 1991, 2, :o1, 666756000 - tz.transition 1991, 10, :o2, 687927600 - tz.transition 1992, 2, :o1, 697600800 - tz.transition 1992, 10, :o2, 719982000 - tz.transition 1993, 1, :o1, 728445600 - tz.transition 1993, 10, :o2, 750826800 - tz.transition 1994, 2, :o1, 761709600 - tz.transition 1994, 10, :o2, 782276400 - tz.transition 1995, 2, :o1, 793159200 - tz.transition 1995, 10, :o2, 813726000 - tz.transition 1996, 2, :o1, 824004000 - tz.transition 1996, 10, :o2, 844570800 - tz.transition 1997, 2, :o1, 856058400 - tz.transition 1997, 10, :o2, 876106800 - tz.transition 1998, 3, :o1, 888717600 - tz.transition 1998, 10, :o2, 908074800 - tz.transition 1999, 2, :o1, 919562400 - tz.transition 1999, 10, :o2, 938919600 - tz.transition 2000, 2, :o1, 951616800 - tz.transition 2000, 10, :o2, 970974000 - tz.transition 2001, 2, :o1, 982461600 - tz.transition 2001, 10, :o2, 1003028400 - tz.transition 2002, 2, :o1, 1013911200 - tz.transition 2002, 11, :o2, 1036292400 - tz.transition 2003, 2, :o1, 1045360800 - tz.transition 2003, 10, :o2, 1066532400 - tz.transition 2004, 2, :o1, 1076810400 - tz.transition 2004, 11, :o2, 1099364400 - tz.transition 2005, 2, :o1, 1108864800 - tz.transition 2005, 10, :o2, 1129431600 - tz.transition 2006, 2, :o1, 1140314400 - tz.transition 2006, 11, :o2, 1162695600 - tz.transition 2007, 2, :o1, 1172368800 - tz.transition 2007, 10, :o2, 1192330800 - tz.transition 2008, 2, :o1, 1203213600 - tz.transition 2008, 10, :o2, 1224385200 - tz.transition 2009, 2, :o1, 1234663200 - tz.transition 2009, 10, :o2, 1255834800 - tz.transition 2010, 2, :o1, 1266717600 - tz.transition 2010, 10, :o2, 1287284400 - tz.transition 2011, 2, :o1, 1298167200 - tz.transition 2011, 10, :o2, 1318734000 - tz.transition 2012, 2, :o1, 1330221600 - tz.transition 2012, 10, :o2, 1350788400 - tz.transition 2013, 2, :o1, 1361066400 - tz.transition 2013, 10, :o2, 1382238000 - tz.transition 2014, 2, :o1, 1392516000 - tz.transition 2014, 10, :o2, 1413687600 - tz.transition 2015, 2, :o1, 1424570400 - tz.transition 2015, 10, :o2, 1445137200 - tz.transition 2016, 2, :o1, 1456020000 - tz.transition 2016, 10, :o2, 1476586800 - tz.transition 2017, 2, :o1, 1487469600 - tz.transition 2017, 10, :o2, 1508036400 - tz.transition 2018, 2, :o1, 1518919200 - tz.transition 2018, 10, :o2, 1540090800 - tz.transition 2019, 2, :o1, 1550368800 - tz.transition 2019, 10, :o2, 1571540400 - tz.transition 2020, 2, :o1, 1581818400 - tz.transition 2020, 10, :o2, 1602990000 - tz.transition 2021, 2, :o1, 1613872800 - tz.transition 2021, 10, :o2, 1634439600 - tz.transition 2022, 2, :o1, 1645322400 - tz.transition 2022, 10, :o2, 1665889200 - tz.transition 2023, 2, :o1, 1677376800 - tz.transition 2023, 10, :o2, 1697338800 - tz.transition 2024, 2, :o1, 1708221600 - tz.transition 2024, 10, :o2, 1729393200 - tz.transition 2025, 2, :o1, 1739671200 - tz.transition 2025, 10, :o2, 1760842800 - tz.transition 2026, 2, :o1, 1771725600 - tz.transition 2026, 10, :o2, 1792292400 - tz.transition 2027, 2, :o1, 1803175200 - tz.transition 2027, 10, :o2, 1823742000 - tz.transition 2028, 2, :o1, 1834624800 - tz.transition 2028, 10, :o2, 1855191600 - tz.transition 2029, 2, :o1, 1866074400 - tz.transition 2029, 10, :o2, 1887246000 - tz.transition 2030, 2, :o1, 1897524000 - tz.transition 2030, 10, :o2, 1918695600 - tz.transition 2031, 2, :o1, 1928973600 - tz.transition 2031, 10, :o2, 1950145200 - tz.transition 2032, 2, :o1, 1960423200 - tz.transition 2032, 10, :o2, 1981594800 - tz.transition 2033, 2, :o1, 1992477600 - tz.transition 2033, 10, :o2, 2013044400 - tz.transition 2034, 2, :o1, 2024532000 - tz.transition 2034, 10, :o2, 2044494000 - tz.transition 2035, 2, :o1, 2055376800 - tz.transition 2035, 10, :o2, 2076548400 - tz.transition 2036, 2, :o1, 2086826400 - tz.transition 2036, 10, :o2, 2107998000 - tz.transition 2037, 2, :o1, 2118880800 - tz.transition 2037, 10, :o2, 2139447600 - tz.transition 2038, 2, :o1, 29585707, 12 - tz.transition 2038, 10, :o2, 19725709, 8 - tz.transition 2039, 2, :o1, 29590075, 12 - tz.transition 2039, 10, :o2, 19728621, 8 - tz.transition 2040, 2, :o1, 29594443, 12 - tz.transition 2040, 10, :o2, 19731589, 8 - tz.transition 2041, 2, :o1, 29598811, 12 - tz.transition 2041, 10, :o2, 19734501, 8 - tz.transition 2042, 2, :o1, 29603179, 12 - tz.transition 2042, 10, :o2, 19737413, 8 - tz.transition 2043, 2, :o1, 29607547, 12 - tz.transition 2043, 10, :o2, 19740325, 8 - tz.transition 2044, 2, :o1, 29611999, 12 - tz.transition 2044, 10, :o2, 19743237, 8 - tz.transition 2045, 2, :o1, 29616367, 12 - tz.transition 2045, 10, :o2, 19746149, 8 - tz.transition 2046, 2, :o1, 29620735, 12 - tz.transition 2046, 10, :o2, 19749117, 8 - tz.transition 2047, 2, :o1, 29625103, 12 - tz.transition 2047, 10, :o2, 19752029, 8 - tz.transition 2048, 2, :o1, 29629471, 12 - tz.transition 2048, 10, :o2, 19754941, 8 - tz.transition 2049, 2, :o1, 29633923, 12 - tz.transition 2049, 10, :o2, 19757853, 8 - tz.transition 2050, 2, :o1, 29638291, 12 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb deleted file mode 100644 index e4a3599d3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/St_Johns.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module St_Johns - include TimezoneDefinition - - timezone 'America/St_Johns' do |tz| - tz.offset :o0, -12652, 0, :LMT - tz.offset :o1, -12652, 0, :NST - tz.offset :o2, -12652, 3600, :NDT - tz.offset :o3, -12600, 0, :NST - tz.offset :o4, -12600, 3600, :NDT - tz.offset :o5, -12600, 3600, :NWT - tz.offset :o6, -12600, 3600, :NPT - tz.offset :o7, -12600, 7200, :NDDT - - tz.transition 1884, 1, :o1, 52038215563, 21600 - tz.transition 1917, 4, :o2, 52300657363, 21600 - tz.transition 1917, 9, :o1, 52304155663, 21600 - tz.transition 1918, 4, :o2, 52308670963, 21600 - tz.transition 1918, 10, :o1, 52312990063, 21600 - tz.transition 1919, 5, :o2, 52317027463, 21600 - tz.transition 1919, 8, :o1, 52319164963, 21600 - tz.transition 1920, 5, :o2, 52324868263, 21600 - tz.transition 1920, 11, :o1, 52328798563, 21600 - tz.transition 1921, 5, :o2, 52332730663, 21600 - tz.transition 1921, 10, :o1, 52336660963, 21600 - tz.transition 1922, 5, :o2, 52340744263, 21600 - tz.transition 1922, 10, :o1, 52344523363, 21600 - tz.transition 1923, 5, :o2, 52348606663, 21600 - tz.transition 1923, 10, :o1, 52352385763, 21600 - tz.transition 1924, 5, :o2, 52356469063, 21600 - tz.transition 1924, 10, :o1, 52360248163, 21600 - tz.transition 1925, 5, :o2, 52364331463, 21600 - tz.transition 1925, 10, :o1, 52368110563, 21600 - tz.transition 1926, 5, :o2, 52372193863, 21600 - tz.transition 1926, 11, :o1, 52376124163, 21600 - tz.transition 1927, 5, :o2, 52380056263, 21600 - tz.transition 1927, 10, :o1, 52383986563, 21600 - tz.transition 1928, 5, :o2, 52388069863, 21600 - tz.transition 1928, 10, :o1, 52391848963, 21600 - tz.transition 1929, 5, :o2, 52395932263, 21600 - tz.transition 1929, 10, :o1, 52399711363, 21600 - tz.transition 1930, 5, :o2, 52403794663, 21600 - tz.transition 1930, 10, :o1, 52407573763, 21600 - tz.transition 1931, 5, :o2, 52411657063, 21600 - tz.transition 1931, 10, :o1, 52415436163, 21600 - tz.transition 1932, 5, :o2, 52419519463, 21600 - tz.transition 1932, 10, :o1, 52423449763, 21600 - tz.transition 1933, 5, :o2, 52427533063, 21600 - tz.transition 1933, 10, :o1, 52431312163, 21600 - tz.transition 1934, 5, :o2, 52435395463, 21600 - tz.transition 1934, 10, :o1, 52439174563, 21600 - tz.transition 1935, 3, :o3, 52442459563, 21600 - tz.transition 1935, 5, :o4, 116540573, 48 - tz.transition 1935, 10, :o3, 38849657, 16 - tz.transition 1936, 5, :o4, 116558383, 48 - tz.transition 1936, 10, :o3, 116565437, 48 - tz.transition 1937, 5, :o4, 116575855, 48 - tz.transition 1937, 10, :o3, 116582909, 48 - tz.transition 1938, 5, :o4, 116593327, 48 - tz.transition 1938, 10, :o3, 116600381, 48 - tz.transition 1939, 5, :o4, 116611135, 48 - tz.transition 1939, 10, :o3, 116617853, 48 - tz.transition 1940, 5, :o4, 116628607, 48 - tz.transition 1940, 10, :o3, 116635661, 48 - tz.transition 1941, 5, :o4, 116646079, 48 - tz.transition 1941, 10, :o3, 116653133, 48 - tz.transition 1942, 5, :o5, 116663551, 48 - tz.transition 1945, 8, :o6, 58360379, 24 - tz.transition 1945, 9, :o3, 38907659, 16 - tz.transition 1946, 5, :o4, 116733731, 48 - tz.transition 1946, 10, :o3, 38913595, 16 - tz.transition 1947, 5, :o4, 116751203, 48 - tz.transition 1947, 10, :o3, 38919419, 16 - tz.transition 1948, 5, :o4, 116768675, 48 - tz.transition 1948, 10, :o3, 38925243, 16 - tz.transition 1949, 5, :o4, 116786147, 48 - tz.transition 1949, 10, :o3, 38931067, 16 - tz.transition 1950, 5, :o4, 116803955, 48 - tz.transition 1950, 10, :o3, 38937003, 16 - tz.transition 1951, 4, :o4, 116820755, 48 - tz.transition 1951, 9, :o3, 38942715, 16 - tz.transition 1952, 4, :o4, 116838227, 48 - tz.transition 1952, 9, :o3, 38948539, 16 - tz.transition 1953, 4, :o4, 116855699, 48 - tz.transition 1953, 9, :o3, 38954363, 16 - tz.transition 1954, 4, :o4, 116873171, 48 - tz.transition 1954, 9, :o3, 38960187, 16 - tz.transition 1955, 4, :o4, 116890643, 48 - tz.transition 1955, 9, :o3, 38966011, 16 - tz.transition 1956, 4, :o4, 116908451, 48 - tz.transition 1956, 9, :o3, 38971947, 16 - tz.transition 1957, 4, :o4, 116925923, 48 - tz.transition 1957, 9, :o3, 38977771, 16 - tz.transition 1958, 4, :o4, 116943395, 48 - tz.transition 1958, 9, :o3, 38983595, 16 - tz.transition 1959, 4, :o4, 116960867, 48 - tz.transition 1959, 9, :o3, 38989419, 16 - tz.transition 1960, 4, :o4, 116978339, 48 - tz.transition 1960, 10, :o3, 38995803, 16 - tz.transition 1961, 4, :o4, 116996147, 48 - tz.transition 1961, 10, :o3, 39001627, 16 - tz.transition 1962, 4, :o4, 117013619, 48 - tz.transition 1962, 10, :o3, 39007451, 16 - tz.transition 1963, 4, :o4, 117031091, 48 - tz.transition 1963, 10, :o3, 39013275, 16 - tz.transition 1964, 4, :o4, 117048563, 48 - tz.transition 1964, 10, :o3, 39019099, 16 - tz.transition 1965, 4, :o4, 117066035, 48 - tz.transition 1965, 10, :o3, 39025035, 16 - tz.transition 1966, 4, :o4, 117083507, 48 - tz.transition 1966, 10, :o3, 39030859, 16 - tz.transition 1967, 4, :o4, 117101315, 48 - tz.transition 1967, 10, :o3, 39036683, 16 - tz.transition 1968, 4, :o4, 117118787, 48 - tz.transition 1968, 10, :o3, 39042507, 16 - tz.transition 1969, 4, :o4, 117136259, 48 - tz.transition 1969, 10, :o3, 39048331, 16 - tz.transition 1970, 4, :o4, 9955800 - tz.transition 1970, 10, :o3, 25677000 - tz.transition 1971, 4, :o4, 41405400 - tz.transition 1971, 10, :o3, 57731400 - tz.transition 1972, 4, :o4, 73459800 - tz.transition 1972, 10, :o3, 89181000 - tz.transition 1973, 4, :o4, 104909400 - tz.transition 1973, 10, :o3, 120630600 - tz.transition 1974, 4, :o4, 136359000 - tz.transition 1974, 10, :o3, 152080200 - tz.transition 1975, 4, :o4, 167808600 - tz.transition 1975, 10, :o3, 183529800 - tz.transition 1976, 4, :o4, 199258200 - tz.transition 1976, 10, :o3, 215584200 - tz.transition 1977, 4, :o4, 230707800 - tz.transition 1977, 10, :o3, 247033800 - tz.transition 1978, 4, :o4, 262762200 - tz.transition 1978, 10, :o3, 278483400 - tz.transition 1979, 4, :o4, 294211800 - tz.transition 1979, 10, :o3, 309933000 - tz.transition 1980, 4, :o4, 325661400 - tz.transition 1980, 10, :o3, 341382600 - tz.transition 1981, 4, :o4, 357111000 - tz.transition 1981, 10, :o3, 372832200 - tz.transition 1982, 4, :o4, 388560600 - tz.transition 1982, 10, :o3, 404886600 - tz.transition 1983, 4, :o4, 420010200 - tz.transition 1983, 10, :o3, 436336200 - tz.transition 1984, 4, :o4, 452064600 - tz.transition 1984, 10, :o3, 467785800 - tz.transition 1985, 4, :o4, 483514200 - tz.transition 1985, 10, :o3, 499235400 - tz.transition 1986, 4, :o4, 514963800 - tz.transition 1986, 10, :o3, 530685000 - tz.transition 1987, 4, :o4, 544591860 - tz.transition 1987, 10, :o3, 562127460 - tz.transition 1988, 4, :o7, 576041460 - tz.transition 1988, 10, :o3, 594178260 - tz.transition 1989, 4, :o4, 607491060 - tz.transition 1989, 10, :o3, 625631460 - tz.transition 1990, 4, :o4, 638940660 - tz.transition 1990, 10, :o3, 657081060 - tz.transition 1991, 4, :o4, 670995060 - tz.transition 1991, 10, :o3, 688530660 - tz.transition 1992, 4, :o4, 702444660 - tz.transition 1992, 10, :o3, 719980260 - tz.transition 1993, 4, :o4, 733894260 - tz.transition 1993, 10, :o3, 752034660 - tz.transition 1994, 4, :o4, 765343860 - tz.transition 1994, 10, :o3, 783484260 - tz.transition 1995, 4, :o4, 796793460 - tz.transition 1995, 10, :o3, 814933860 - tz.transition 1996, 4, :o4, 828847860 - tz.transition 1996, 10, :o3, 846383460 - tz.transition 1997, 4, :o4, 860297460 - tz.transition 1997, 10, :o3, 877833060 - tz.transition 1998, 4, :o4, 891747060 - tz.transition 1998, 10, :o3, 909282660 - tz.transition 1999, 4, :o4, 923196660 - tz.transition 1999, 10, :o3, 941337060 - tz.transition 2000, 4, :o4, 954646260 - tz.transition 2000, 10, :o3, 972786660 - tz.transition 2001, 4, :o4, 986095860 - tz.transition 2001, 10, :o3, 1004236260 - tz.transition 2002, 4, :o4, 1018150260 - tz.transition 2002, 10, :o3, 1035685860 - tz.transition 2003, 4, :o4, 1049599860 - tz.transition 2003, 10, :o3, 1067135460 - tz.transition 2004, 4, :o4, 1081049460 - tz.transition 2004, 10, :o3, 1099189860 - tz.transition 2005, 4, :o4, 1112499060 - tz.transition 2005, 10, :o3, 1130639460 - tz.transition 2006, 4, :o4, 1143948660 - tz.transition 2006, 10, :o3, 1162089060 - tz.transition 2007, 3, :o4, 1173583860 - tz.transition 2007, 11, :o3, 1194143460 - tz.transition 2008, 3, :o4, 1205033460 - tz.transition 2008, 11, :o3, 1225593060 - tz.transition 2009, 3, :o4, 1236483060 - tz.transition 2009, 11, :o3, 1257042660 - tz.transition 2010, 3, :o4, 1268537460 - tz.transition 2010, 11, :o3, 1289097060 - tz.transition 2011, 3, :o4, 1299987060 - tz.transition 2011, 11, :o3, 1320546660 - tz.transition 2012, 3, :o4, 1331436660 - tz.transition 2012, 11, :o3, 1351996260 - tz.transition 2013, 3, :o4, 1362886260 - tz.transition 2013, 11, :o3, 1383445860 - tz.transition 2014, 3, :o4, 1394335860 - tz.transition 2014, 11, :o3, 1414895460 - tz.transition 2015, 3, :o4, 1425785460 - tz.transition 2015, 11, :o3, 1446345060 - tz.transition 2016, 3, :o4, 1457839860 - tz.transition 2016, 11, :o3, 1478399460 - tz.transition 2017, 3, :o4, 1489289460 - tz.transition 2017, 11, :o3, 1509849060 - tz.transition 2018, 3, :o4, 1520739060 - tz.transition 2018, 11, :o3, 1541298660 - tz.transition 2019, 3, :o4, 1552188660 - tz.transition 2019, 11, :o3, 1572748260 - tz.transition 2020, 3, :o4, 1583638260 - tz.transition 2020, 11, :o3, 1604197860 - tz.transition 2021, 3, :o4, 1615692660 - tz.transition 2021, 11, :o3, 1636252260 - tz.transition 2022, 3, :o4, 1647142260 - tz.transition 2022, 11, :o3, 1667701860 - tz.transition 2023, 3, :o4, 1678591860 - tz.transition 2023, 11, :o3, 1699151460 - tz.transition 2024, 3, :o4, 1710041460 - tz.transition 2024, 11, :o3, 1730601060 - tz.transition 2025, 3, :o4, 1741491060 - tz.transition 2025, 11, :o3, 1762050660 - tz.transition 2026, 3, :o4, 1772940660 - tz.transition 2026, 11, :o3, 1793500260 - tz.transition 2027, 3, :o4, 1804995060 - tz.transition 2027, 11, :o3, 1825554660 - tz.transition 2028, 3, :o4, 1836444660 - tz.transition 2028, 11, :o3, 1857004260 - tz.transition 2029, 3, :o4, 1867894260 - tz.transition 2029, 11, :o3, 1888453860 - tz.transition 2030, 3, :o4, 1899343860 - tz.transition 2030, 11, :o3, 1919903460 - tz.transition 2031, 3, :o4, 1930793460 - tz.transition 2031, 11, :o3, 1951353060 - tz.transition 2032, 3, :o4, 1962847860 - tz.transition 2032, 11, :o3, 1983407460 - tz.transition 2033, 3, :o4, 1994297460 - tz.transition 2033, 11, :o3, 2014857060 - tz.transition 2034, 3, :o4, 2025747060 - tz.transition 2034, 11, :o3, 2046306660 - tz.transition 2035, 3, :o4, 2057196660 - tz.transition 2035, 11, :o3, 2077756260 - tz.transition 2036, 3, :o4, 2088646260 - tz.transition 2036, 11, :o3, 2109205860 - tz.transition 2037, 3, :o4, 2120095860 - tz.transition 2037, 11, :o3, 2140655460 - tz.transition 2038, 3, :o4, 3550315171, 1440 - tz.transition 2038, 11, :o3, 3550657831, 1440 - tz.transition 2039, 3, :o4, 3550839331, 1440 - tz.transition 2039, 11, :o3, 3551181991, 1440 - tz.transition 2040, 3, :o4, 3551363491, 1440 - tz.transition 2040, 11, :o3, 3551706151, 1440 - tz.transition 2041, 3, :o4, 3551887651, 1440 - tz.transition 2041, 11, :o3, 3552230311, 1440 - tz.transition 2042, 3, :o4, 3552411811, 1440 - tz.transition 2042, 11, :o3, 3552754471, 1440 - tz.transition 2043, 3, :o4, 3552935971, 1440 - tz.transition 2043, 11, :o3, 3553278631, 1440 - tz.transition 2044, 3, :o4, 3553470211, 1440 - tz.transition 2044, 11, :o3, 3553812871, 1440 - tz.transition 2045, 3, :o4, 3553994371, 1440 - tz.transition 2045, 11, :o3, 3554337031, 1440 - tz.transition 2046, 3, :o4, 3554518531, 1440 - tz.transition 2046, 11, :o3, 3554861191, 1440 - tz.transition 2047, 3, :o4, 3555042691, 1440 - tz.transition 2047, 11, :o3, 3555385351, 1440 - tz.transition 2048, 3, :o4, 3555566851, 1440 - tz.transition 2048, 11, :o3, 3555909511, 1440 - tz.transition 2049, 3, :o4, 3556101091, 1440 - tz.transition 2049, 11, :o3, 3556443751, 1440 - tz.transition 2050, 3, :o4, 3556625251, 1440 - tz.transition 2050, 11, :o3, 3556967911, 1440 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb deleted file mode 100644 index 423059da4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/America/Tijuana.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module America - module Tijuana - include TimezoneDefinition - - timezone 'America/Tijuana' do |tz| - tz.offset :o0, -28084, 0, :LMT - tz.offset :o1, -25200, 0, :MST - tz.offset :o2, -28800, 0, :PST - tz.offset :o3, -28800, 3600, :PDT - tz.offset :o4, -28800, 3600, :PWT - tz.offset :o5, -28800, 3600, :PPT - - tz.transition 1922, 1, :o1, 14538335, 6 - tz.transition 1924, 1, :o2, 58170859, 24 - tz.transition 1927, 6, :o1, 58201027, 24 - tz.transition 1930, 11, :o2, 58231099, 24 - tz.transition 1931, 4, :o3, 14558597, 6 - tz.transition 1931, 9, :o2, 58238755, 24 - tz.transition 1942, 4, :o4, 14582843, 6 - tz.transition 1945, 8, :o5, 58360379, 24 - tz.transition 1945, 11, :o2, 58362523, 24 - tz.transition 1948, 4, :o3, 14595881, 6 - tz.transition 1949, 1, :o2, 58390339, 24 - tz.transition 1954, 4, :o3, 29218295, 12 - tz.transition 1954, 9, :o2, 19480095, 8 - tz.transition 1955, 4, :o3, 29222663, 12 - tz.transition 1955, 9, :o2, 19483007, 8 - tz.transition 1956, 4, :o3, 29227115, 12 - tz.transition 1956, 9, :o2, 19485975, 8 - tz.transition 1957, 4, :o3, 29231483, 12 - tz.transition 1957, 9, :o2, 19488887, 8 - tz.transition 1958, 4, :o3, 29235851, 12 - tz.transition 1958, 9, :o2, 19491799, 8 - tz.transition 1959, 4, :o3, 29240219, 12 - tz.transition 1959, 9, :o2, 19494711, 8 - tz.transition 1960, 4, :o3, 29244587, 12 - tz.transition 1960, 9, :o2, 19497623, 8 - tz.transition 1976, 4, :o3, 199274400 - tz.transition 1976, 10, :o2, 215600400 - tz.transition 1977, 4, :o3, 230724000 - tz.transition 1977, 10, :o2, 247050000 - tz.transition 1978, 4, :o3, 262778400 - tz.transition 1978, 10, :o2, 278499600 - tz.transition 1979, 4, :o3, 294228000 - tz.transition 1979, 10, :o2, 309949200 - tz.transition 1980, 4, :o3, 325677600 - tz.transition 1980, 10, :o2, 341398800 - tz.transition 1981, 4, :o3, 357127200 - tz.transition 1981, 10, :o2, 372848400 - tz.transition 1982, 4, :o3, 388576800 - tz.transition 1982, 10, :o2, 404902800 - tz.transition 1983, 4, :o3, 420026400 - tz.transition 1983, 10, :o2, 436352400 - tz.transition 1984, 4, :o3, 452080800 - tz.transition 1984, 10, :o2, 467802000 - tz.transition 1985, 4, :o3, 483530400 - tz.transition 1985, 10, :o2, 499251600 - tz.transition 1986, 4, :o3, 514980000 - tz.transition 1986, 10, :o2, 530701200 - tz.transition 1987, 4, :o3, 544615200 - tz.transition 1987, 10, :o2, 562150800 - tz.transition 1988, 4, :o3, 576064800 - tz.transition 1988, 10, :o2, 594205200 - tz.transition 1989, 4, :o3, 607514400 - tz.transition 1989, 10, :o2, 625654800 - tz.transition 1990, 4, :o3, 638964000 - tz.transition 1990, 10, :o2, 657104400 - tz.transition 1991, 4, :o3, 671018400 - tz.transition 1991, 10, :o2, 688554000 - tz.transition 1992, 4, :o3, 702468000 - tz.transition 1992, 10, :o2, 720003600 - tz.transition 1993, 4, :o3, 733917600 - tz.transition 1993, 10, :o2, 752058000 - tz.transition 1994, 4, :o3, 765367200 - tz.transition 1994, 10, :o2, 783507600 - tz.transition 1995, 4, :o3, 796816800 - tz.transition 1995, 10, :o2, 814957200 - tz.transition 1996, 4, :o3, 828871200 - tz.transition 1996, 10, :o2, 846406800 - tz.transition 1997, 4, :o3, 860320800 - tz.transition 1997, 10, :o2, 877856400 - tz.transition 1998, 4, :o3, 891770400 - tz.transition 1998, 10, :o2, 909306000 - tz.transition 1999, 4, :o3, 923220000 - tz.transition 1999, 10, :o2, 941360400 - tz.transition 2000, 4, :o3, 954669600 - tz.transition 2000, 10, :o2, 972810000 - tz.transition 2001, 4, :o3, 986119200 - tz.transition 2001, 10, :o2, 1004259600 - tz.transition 2002, 4, :o3, 1018173600 - tz.transition 2002, 10, :o2, 1035709200 - tz.transition 2003, 4, :o3, 1049623200 - tz.transition 2003, 10, :o2, 1067158800 - tz.transition 2004, 4, :o3, 1081072800 - tz.transition 2004, 10, :o2, 1099213200 - tz.transition 2005, 4, :o3, 1112522400 - tz.transition 2005, 10, :o2, 1130662800 - tz.transition 2006, 4, :o3, 1143972000 - tz.transition 2006, 10, :o2, 1162112400 - tz.transition 2007, 4, :o3, 1175421600 - tz.transition 2007, 10, :o2, 1193562000 - tz.transition 2008, 4, :o3, 1207476000 - tz.transition 2008, 10, :o2, 1225011600 - tz.transition 2009, 4, :o3, 1238925600 - tz.transition 2009, 10, :o2, 1256461200 - tz.transition 2010, 4, :o3, 1270375200 - tz.transition 2010, 10, :o2, 1288515600 - tz.transition 2011, 4, :o3, 1301824800 - tz.transition 2011, 10, :o2, 1319965200 - tz.transition 2012, 4, :o3, 1333274400 - tz.transition 2012, 10, :o2, 1351414800 - tz.transition 2013, 4, :o3, 1365328800 - tz.transition 2013, 10, :o2, 1382864400 - tz.transition 2014, 4, :o3, 1396778400 - tz.transition 2014, 10, :o2, 1414314000 - tz.transition 2015, 4, :o3, 1428228000 - tz.transition 2015, 10, :o2, 1445763600 - tz.transition 2016, 4, :o3, 1459677600 - tz.transition 2016, 10, :o2, 1477818000 - tz.transition 2017, 4, :o3, 1491127200 - tz.transition 2017, 10, :o2, 1509267600 - tz.transition 2018, 4, :o3, 1522576800 - tz.transition 2018, 10, :o2, 1540717200 - tz.transition 2019, 4, :o3, 1554631200 - tz.transition 2019, 10, :o2, 1572166800 - tz.transition 2020, 4, :o3, 1586080800 - tz.transition 2020, 10, :o2, 1603616400 - tz.transition 2021, 4, :o3, 1617530400 - tz.transition 2021, 10, :o2, 1635670800 - tz.transition 2022, 4, :o3, 1648980000 - tz.transition 2022, 10, :o2, 1667120400 - tz.transition 2023, 4, :o3, 1680429600 - tz.transition 2023, 10, :o2, 1698570000 - tz.transition 2024, 4, :o3, 1712484000 - tz.transition 2024, 10, :o2, 1730019600 - tz.transition 2025, 4, :o3, 1743933600 - tz.transition 2025, 10, :o2, 1761469200 - tz.transition 2026, 4, :o3, 1775383200 - tz.transition 2026, 10, :o2, 1792918800 - tz.transition 2027, 4, :o3, 1806832800 - tz.transition 2027, 10, :o2, 1824973200 - tz.transition 2028, 4, :o3, 1838282400 - tz.transition 2028, 10, :o2, 1856422800 - tz.transition 2029, 4, :o3, 1869732000 - tz.transition 2029, 10, :o2, 1887872400 - tz.transition 2030, 4, :o3, 1901786400 - tz.transition 2030, 10, :o2, 1919322000 - tz.transition 2031, 4, :o3, 1933236000 - tz.transition 2031, 10, :o2, 1950771600 - tz.transition 2032, 4, :o3, 1964685600 - tz.transition 2032, 10, :o2, 1982826000 - tz.transition 2033, 4, :o3, 1996135200 - tz.transition 2033, 10, :o2, 2014275600 - tz.transition 2034, 4, :o3, 2027584800 - tz.transition 2034, 10, :o2, 2045725200 - tz.transition 2035, 4, :o3, 2059034400 - tz.transition 2035, 10, :o2, 2077174800 - tz.transition 2036, 4, :o3, 2091088800 - tz.transition 2036, 10, :o2, 2108624400 - tz.transition 2037, 4, :o3, 2122538400 - tz.transition 2037, 10, :o2, 2140074000 - tz.transition 2038, 4, :o3, 29586215, 12 - tz.transition 2038, 10, :o2, 19725823, 8 - tz.transition 2039, 4, :o3, 29590583, 12 - tz.transition 2039, 10, :o2, 19728735, 8 - tz.transition 2040, 4, :o3, 29594951, 12 - tz.transition 2040, 10, :o2, 19731647, 8 - tz.transition 2041, 4, :o3, 29599403, 12 - tz.transition 2041, 10, :o2, 19734559, 8 - tz.transition 2042, 4, :o3, 29603771, 12 - tz.transition 2042, 10, :o2, 19737471, 8 - tz.transition 2043, 4, :o3, 29608139, 12 - tz.transition 2043, 10, :o2, 19740383, 8 - tz.transition 2044, 4, :o3, 29612507, 12 - tz.transition 2044, 10, :o2, 19743351, 8 - tz.transition 2045, 4, :o3, 29616875, 12 - tz.transition 2045, 10, :o2, 19746263, 8 - tz.transition 2046, 4, :o3, 29621243, 12 - tz.transition 2046, 10, :o2, 19749175, 8 - tz.transition 2047, 4, :o3, 29625695, 12 - tz.transition 2047, 10, :o2, 19752087, 8 - tz.transition 2048, 4, :o3, 29630063, 12 - tz.transition 2048, 10, :o2, 19754999, 8 - tz.transition 2049, 4, :o3, 29634431, 12 - tz.transition 2049, 10, :o2, 19757967, 8 - tz.transition 2050, 4, :o3, 29638799, 12 - tz.transition 2050, 10, :o2, 19760879, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb deleted file mode 100644 index 9ee18970f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Almaty.rb +++ /dev/null @@ -1,67 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Almaty - include TimezoneDefinition - - timezone 'Asia/Almaty' do |tz| - tz.offset :o0, 18468, 0, :LMT - tz.offset :o1, 18000, 0, :ALMT - tz.offset :o2, 21600, 0, :ALMT - tz.offset :o3, 21600, 3600, :ALMST - - tz.transition 1924, 5, :o1, 1939125829, 800 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1992, 3, :o3, 701802000 - tz.transition 1992, 9, :o2, 717523200 - tz.transition 1993, 3, :o3, 733262400 - tz.transition 1993, 9, :o2, 748987200 - tz.transition 1994, 3, :o3, 764712000 - tz.transition 1994, 9, :o2, 780436800 - tz.transition 1995, 3, :o3, 796161600 - tz.transition 1995, 9, :o2, 811886400 - tz.transition 1996, 3, :o3, 828216000 - tz.transition 1996, 10, :o2, 846360000 - tz.transition 1997, 3, :o3, 859665600 - tz.transition 1997, 10, :o2, 877809600 - tz.transition 1998, 3, :o3, 891115200 - tz.transition 1998, 10, :o2, 909259200 - tz.transition 1999, 3, :o3, 922564800 - tz.transition 1999, 10, :o2, 941313600 - tz.transition 2000, 3, :o3, 954014400 - tz.transition 2000, 10, :o2, 972763200 - tz.transition 2001, 3, :o3, 985464000 - tz.transition 2001, 10, :o2, 1004212800 - tz.transition 2002, 3, :o3, 1017518400 - tz.transition 2002, 10, :o2, 1035662400 - tz.transition 2003, 3, :o3, 1048968000 - tz.transition 2003, 10, :o2, 1067112000 - tz.transition 2004, 3, :o3, 1080417600 - tz.transition 2004, 10, :o2, 1099166400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb deleted file mode 100644 index 774dca158..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baghdad.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baghdad - include TimezoneDefinition - - timezone 'Asia/Baghdad' do |tz| - tz.offset :o0, 10660, 0, :LMT - tz.offset :o1, 10656, 0, :BMT - tz.offset :o2, 10800, 0, :AST - tz.offset :o3, 10800, 3600, :ADT - - tz.transition 1889, 12, :o1, 10417111387, 4320 - tz.transition 1917, 12, :o2, 726478313, 300 - tz.transition 1982, 4, :o3, 389048400 - tz.transition 1982, 9, :o2, 402264000 - tz.transition 1983, 3, :o3, 417906000 - tz.transition 1983, 9, :o2, 433800000 - tz.transition 1984, 3, :o3, 449614800 - tz.transition 1984, 9, :o2, 465422400 - tz.transition 1985, 3, :o3, 481150800 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 4, :o3, 670464000 - tz.transition 1991, 10, :o2, 686275200 - tz.transition 1992, 4, :o3, 702086400 - tz.transition 1992, 10, :o2, 717897600 - tz.transition 1993, 4, :o3, 733622400 - tz.transition 1993, 10, :o2, 749433600 - tz.transition 1994, 4, :o3, 765158400 - tz.transition 1994, 10, :o2, 780969600 - tz.transition 1995, 4, :o3, 796694400 - tz.transition 1995, 10, :o2, 812505600 - tz.transition 1996, 4, :o3, 828316800 - tz.transition 1996, 10, :o2, 844128000 - tz.transition 1997, 4, :o3, 859852800 - tz.transition 1997, 10, :o2, 875664000 - tz.transition 1998, 4, :o3, 891388800 - tz.transition 1998, 10, :o2, 907200000 - tz.transition 1999, 4, :o3, 922924800 - tz.transition 1999, 10, :o2, 938736000 - tz.transition 2000, 4, :o3, 954547200 - tz.transition 2000, 10, :o2, 970358400 - tz.transition 2001, 4, :o3, 986083200 - tz.transition 2001, 10, :o2, 1001894400 - tz.transition 2002, 4, :o3, 1017619200 - tz.transition 2002, 10, :o2, 1033430400 - tz.transition 2003, 4, :o3, 1049155200 - tz.transition 2003, 10, :o2, 1064966400 - tz.transition 2004, 4, :o3, 1080777600 - tz.transition 2004, 10, :o2, 1096588800 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128124800 - tz.transition 2006, 4, :o3, 1143849600 - tz.transition 2006, 10, :o2, 1159660800 - tz.transition 2007, 4, :o3, 1175385600 - tz.transition 2007, 10, :o2, 1191196800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb deleted file mode 100644 index e86340ebf..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Baku.rb +++ /dev/null @@ -1,161 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Baku - include TimezoneDefinition - - timezone 'Asia/Baku' do |tz| - tz.offset :o0, 11964, 0, :LMT - tz.offset :o1, 10800, 0, :BAKT - tz.offset :o2, 14400, 0, :BAKT - tz.offset :o3, 14400, 3600, :BAKST - tz.offset :o4, 10800, 3600, :BAKST - tz.offset :o5, 10800, 3600, :AZST - tz.offset :o6, 10800, 0, :AZT - tz.offset :o7, 14400, 0, :AZT - tz.offset :o8, 14400, 3600, :AZST - - tz.transition 1924, 5, :o1, 17452133003, 7200 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 8, :o5, 683496000 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o7, 717534000 - tz.transition 1996, 3, :o8, 828234000 - tz.transition 1996, 10, :o7, 846378000 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o7, 877824000 - tz.transition 1998, 3, :o8, 891129600 - tz.transition 1998, 10, :o7, 909273600 - tz.transition 1999, 3, :o8, 922579200 - tz.transition 1999, 10, :o7, 941328000 - tz.transition 2000, 3, :o8, 954028800 - tz.transition 2000, 10, :o7, 972777600 - tz.transition 2001, 3, :o8, 985478400 - tz.transition 2001, 10, :o7, 1004227200 - tz.transition 2002, 3, :o8, 1017532800 - tz.transition 2002, 10, :o7, 1035676800 - tz.transition 2003, 3, :o8, 1048982400 - tz.transition 2003, 10, :o7, 1067126400 - tz.transition 2004, 3, :o8, 1080432000 - tz.transition 2004, 10, :o7, 1099180800 - tz.transition 2005, 3, :o8, 1111881600 - tz.transition 2005, 10, :o7, 1130630400 - tz.transition 2006, 3, :o8, 1143331200 - tz.transition 2006, 10, :o7, 1162080000 - tz.transition 2007, 3, :o8, 1174780800 - tz.transition 2007, 10, :o7, 1193529600 - tz.transition 2008, 3, :o8, 1206835200 - tz.transition 2008, 10, :o7, 1224979200 - tz.transition 2009, 3, :o8, 1238284800 - tz.transition 2009, 10, :o7, 1256428800 - tz.transition 2010, 3, :o8, 1269734400 - tz.transition 2010, 10, :o7, 1288483200 - tz.transition 2011, 3, :o8, 1301184000 - tz.transition 2011, 10, :o7, 1319932800 - tz.transition 2012, 3, :o8, 1332633600 - tz.transition 2012, 10, :o7, 1351382400 - tz.transition 2013, 3, :o8, 1364688000 - tz.transition 2013, 10, :o7, 1382832000 - tz.transition 2014, 3, :o8, 1396137600 - tz.transition 2014, 10, :o7, 1414281600 - tz.transition 2015, 3, :o8, 1427587200 - tz.transition 2015, 10, :o7, 1445731200 - tz.transition 2016, 3, :o8, 1459036800 - tz.transition 2016, 10, :o7, 1477785600 - tz.transition 2017, 3, :o8, 1490486400 - tz.transition 2017, 10, :o7, 1509235200 - tz.transition 2018, 3, :o8, 1521936000 - tz.transition 2018, 10, :o7, 1540684800 - tz.transition 2019, 3, :o8, 1553990400 - tz.transition 2019, 10, :o7, 1572134400 - tz.transition 2020, 3, :o8, 1585440000 - tz.transition 2020, 10, :o7, 1603584000 - tz.transition 2021, 3, :o8, 1616889600 - tz.transition 2021, 10, :o7, 1635638400 - tz.transition 2022, 3, :o8, 1648339200 - tz.transition 2022, 10, :o7, 1667088000 - tz.transition 2023, 3, :o8, 1679788800 - tz.transition 2023, 10, :o7, 1698537600 - tz.transition 2024, 3, :o8, 1711843200 - tz.transition 2024, 10, :o7, 1729987200 - tz.transition 2025, 3, :o8, 1743292800 - tz.transition 2025, 10, :o7, 1761436800 - tz.transition 2026, 3, :o8, 1774742400 - tz.transition 2026, 10, :o7, 1792886400 - tz.transition 2027, 3, :o8, 1806192000 - tz.transition 2027, 10, :o7, 1824940800 - tz.transition 2028, 3, :o8, 1837641600 - tz.transition 2028, 10, :o7, 1856390400 - tz.transition 2029, 3, :o8, 1869091200 - tz.transition 2029, 10, :o7, 1887840000 - tz.transition 2030, 3, :o8, 1901145600 - tz.transition 2030, 10, :o7, 1919289600 - tz.transition 2031, 3, :o8, 1932595200 - tz.transition 2031, 10, :o7, 1950739200 - tz.transition 2032, 3, :o8, 1964044800 - tz.transition 2032, 10, :o7, 1982793600 - tz.transition 2033, 3, :o8, 1995494400 - tz.transition 2033, 10, :o7, 2014243200 - tz.transition 2034, 3, :o8, 2026944000 - tz.transition 2034, 10, :o7, 2045692800 - tz.transition 2035, 3, :o8, 2058393600 - tz.transition 2035, 10, :o7, 2077142400 - tz.transition 2036, 3, :o8, 2090448000 - tz.transition 2036, 10, :o7, 2108592000 - tz.transition 2037, 3, :o8, 2121897600 - tz.transition 2037, 10, :o7, 2140041600 - tz.transition 2038, 3, :o8, 4931021, 2 - tz.transition 2038, 10, :o7, 4931455, 2 - tz.transition 2039, 3, :o8, 4931749, 2 - tz.transition 2039, 10, :o7, 4932183, 2 - tz.transition 2040, 3, :o8, 4932477, 2 - tz.transition 2040, 10, :o7, 4932911, 2 - tz.transition 2041, 3, :o8, 4933219, 2 - tz.transition 2041, 10, :o7, 4933639, 2 - tz.transition 2042, 3, :o8, 4933947, 2 - tz.transition 2042, 10, :o7, 4934367, 2 - tz.transition 2043, 3, :o8, 4934675, 2 - tz.transition 2043, 10, :o7, 4935095, 2 - tz.transition 2044, 3, :o8, 4935403, 2 - tz.transition 2044, 10, :o7, 4935837, 2 - tz.transition 2045, 3, :o8, 4936131, 2 - tz.transition 2045, 10, :o7, 4936565, 2 - tz.transition 2046, 3, :o8, 4936859, 2 - tz.transition 2046, 10, :o7, 4937293, 2 - tz.transition 2047, 3, :o8, 4937601, 2 - tz.transition 2047, 10, :o7, 4938021, 2 - tz.transition 2048, 3, :o8, 4938329, 2 - tz.transition 2048, 10, :o7, 4938749, 2 - tz.transition 2049, 3, :o8, 4939057, 2 - tz.transition 2049, 10, :o7, 4939491, 2 - tz.transition 2050, 3, :o8, 4939785, 2 - tz.transition 2050, 10, :o7, 4940219, 2 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb deleted file mode 100644 index 139194e5e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Bangkok.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Bangkok - include TimezoneDefinition - - timezone 'Asia/Bangkok' do |tz| - tz.offset :o0, 24124, 0, :LMT - tz.offset :o1, 24124, 0, :BMT - tz.offset :o2, 25200, 0, :ICT - - tz.transition 1879, 12, :o1, 52006648769, 21600 - tz.transition 1920, 3, :o2, 52324168769, 21600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb deleted file mode 100644 index 8c94b4ba8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Chongqing.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Chongqing - include TimezoneDefinition - - timezone 'Asia/Chongqing' do |tz| - tz.offset :o0, 25580, 0, :LMT - tz.offset :o1, 25200, 0, :LONT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063601, 4320 - tz.transition 1980, 4, :o2, 325962000 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb deleted file mode 100644 index f6531fa81..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Colombo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Colombo - include TimezoneDefinition - - timezone 'Asia/Colombo' do |tz| - tz.offset :o0, 19164, 0, :LMT - tz.offset :o1, 19172, 0, :MMT - tz.offset :o2, 19800, 0, :IST - tz.offset :o3, 19800, 1800, :IHST - tz.offset :o4, 19800, 3600, :IST - tz.offset :o5, 23400, 0, :LKT - tz.offset :o6, 21600, 0, :LKT - - tz.transition 1879, 12, :o1, 17335550003, 7200 - tz.transition 1905, 12, :o2, 52211763607, 21600 - tz.transition 1942, 1, :o3, 116657485, 48 - tz.transition 1942, 8, :o4, 9722413, 4 - tz.transition 1945, 10, :o2, 38907909, 16 - tz.transition 1996, 5, :o5, 832962600 - tz.transition 1996, 10, :o6, 846266400 - tz.transition 2006, 4, :o2, 1145039400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb deleted file mode 100644 index ccd026550..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Dhaka.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Dhaka - include TimezoneDefinition - - timezone 'Asia/Dhaka' do |tz| - tz.offset :o0, 21700, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 21600, 0, :DACT - tz.offset :o5, 21600, 0, :BDT - - tz.transition 1889, 12, :o1, 2083422167, 864 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1951, 9, :o4, 116828123, 48 - tz.transition 1971, 3, :o5, 38772000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb deleted file mode 100644 index f1edd75ac..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Hong_Kong.rb +++ /dev/null @@ -1,87 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Hong_Kong - include TimezoneDefinition - - timezone 'Asia/Hong_Kong' do |tz| - tz.offset :o0, 27396, 0, :LMT - tz.offset :o1, 28800, 0, :HKT - tz.offset :o2, 28800, 3600, :HKST - - tz.transition 1904, 10, :o1, 5800279639, 2400 - tz.transition 1946, 4, :o2, 38910885, 16 - tz.transition 1946, 11, :o1, 116743453, 48 - tz.transition 1947, 4, :o2, 38916613, 16 - tz.transition 1947, 12, :o1, 116762365, 48 - tz.transition 1948, 5, :o2, 38922773, 16 - tz.transition 1948, 10, :o1, 116777053, 48 - tz.transition 1949, 4, :o2, 38928149, 16 - tz.transition 1949, 10, :o1, 116794525, 48 - tz.transition 1950, 4, :o2, 38933973, 16 - tz.transition 1950, 10, :o1, 116811997, 48 - tz.transition 1951, 3, :o2, 38939797, 16 - tz.transition 1951, 10, :o1, 116829469, 48 - tz.transition 1952, 4, :o2, 38945733, 16 - tz.transition 1952, 10, :o1, 116846941, 48 - tz.transition 1953, 4, :o2, 38951557, 16 - tz.transition 1953, 10, :o1, 116864749, 48 - tz.transition 1954, 3, :o2, 38957157, 16 - tz.transition 1954, 10, :o1, 116882221, 48 - tz.transition 1955, 3, :o2, 38962981, 16 - tz.transition 1955, 11, :o1, 116900029, 48 - tz.transition 1956, 3, :o2, 38968805, 16 - tz.transition 1956, 11, :o1, 116917501, 48 - tz.transition 1957, 3, :o2, 38974741, 16 - tz.transition 1957, 11, :o1, 116934973, 48 - tz.transition 1958, 3, :o2, 38980565, 16 - tz.transition 1958, 11, :o1, 116952445, 48 - tz.transition 1959, 3, :o2, 38986389, 16 - tz.transition 1959, 10, :o1, 116969917, 48 - tz.transition 1960, 3, :o2, 38992213, 16 - tz.transition 1960, 11, :o1, 116987725, 48 - tz.transition 1961, 3, :o2, 38998037, 16 - tz.transition 1961, 11, :o1, 117005197, 48 - tz.transition 1962, 3, :o2, 39003861, 16 - tz.transition 1962, 11, :o1, 117022669, 48 - tz.transition 1963, 3, :o2, 39009797, 16 - tz.transition 1963, 11, :o1, 117040141, 48 - tz.transition 1964, 3, :o2, 39015621, 16 - tz.transition 1964, 10, :o1, 117057613, 48 - tz.transition 1965, 4, :o2, 39021893, 16 - tz.transition 1965, 10, :o1, 117074413, 48 - tz.transition 1966, 4, :o2, 39027717, 16 - tz.transition 1966, 10, :o1, 117091885, 48 - tz.transition 1967, 4, :o2, 39033541, 16 - tz.transition 1967, 10, :o1, 117109693, 48 - tz.transition 1968, 4, :o2, 39039477, 16 - tz.transition 1968, 10, :o1, 117127165, 48 - tz.transition 1969, 4, :o2, 39045301, 16 - tz.transition 1969, 10, :o1, 117144637, 48 - tz.transition 1970, 4, :o2, 9315000 - tz.transition 1970, 10, :o1, 25036200 - tz.transition 1971, 4, :o2, 40764600 - tz.transition 1971, 10, :o1, 56485800 - tz.transition 1972, 4, :o2, 72214200 - tz.transition 1972, 10, :o1, 88540200 - tz.transition 1973, 4, :o2, 104268600 - tz.transition 1973, 10, :o1, 119989800 - tz.transition 1974, 4, :o2, 135718200 - tz.transition 1974, 10, :o1, 151439400 - tz.transition 1975, 4, :o2, 167167800 - tz.transition 1975, 10, :o1, 182889000 - tz.transition 1976, 4, :o2, 198617400 - tz.transition 1976, 10, :o1, 214338600 - tz.transition 1977, 4, :o2, 230067000 - tz.transition 1977, 10, :o1, 245788200 - tz.transition 1979, 5, :o2, 295385400 - tz.transition 1979, 10, :o1, 309292200 - tz.transition 1980, 5, :o2, 326835000 - tz.transition 1980, 10, :o1, 340741800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb deleted file mode 100644 index 2d47d9580..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Irkutsk.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Irkutsk - include TimezoneDefinition - - timezone 'Asia/Irkutsk' do |tz| - tz.offset :o0, 25040, 0, :LMT - tz.offset :o1, 25040, 0, :IMT - tz.offset :o2, 25200, 0, :IRKT - tz.offset :o3, 28800, 0, :IRKT - tz.offset :o4, 28800, 3600, :IRKST - tz.offset :o5, 25200, 3600, :IRKST - - tz.transition 1879, 12, :o1, 2600332427, 1080 - tz.transition 1920, 1, :o2, 2616136067, 1080 - tz.transition 1930, 6, :o3, 58227557, 24 - tz.transition 1981, 3, :o4, 354902400 - tz.transition 1981, 9, :o3, 370710000 - tz.transition 1982, 3, :o4, 386438400 - tz.transition 1982, 9, :o3, 402246000 - tz.transition 1983, 3, :o4, 417974400 - tz.transition 1983, 9, :o3, 433782000 - tz.transition 1984, 3, :o4, 449596800 - tz.transition 1984, 9, :o3, 465328800 - tz.transition 1985, 3, :o4, 481053600 - tz.transition 1985, 9, :o3, 496778400 - tz.transition 1986, 3, :o4, 512503200 - tz.transition 1986, 9, :o3, 528228000 - tz.transition 1987, 3, :o4, 543952800 - tz.transition 1987, 9, :o3, 559677600 - tz.transition 1988, 3, :o4, 575402400 - tz.transition 1988, 9, :o3, 591127200 - tz.transition 1989, 3, :o4, 606852000 - tz.transition 1989, 9, :o3, 622576800 - tz.transition 1990, 3, :o4, 638301600 - tz.transition 1990, 9, :o3, 654631200 - tz.transition 1991, 3, :o5, 670356000 - tz.transition 1991, 9, :o2, 686084400 - tz.transition 1992, 1, :o3, 695761200 - tz.transition 1992, 3, :o4, 701794800 - tz.transition 1992, 9, :o3, 717516000 - tz.transition 1993, 3, :o4, 733255200 - tz.transition 1993, 9, :o3, 748980000 - tz.transition 1994, 3, :o4, 764704800 - tz.transition 1994, 9, :o3, 780429600 - tz.transition 1995, 3, :o4, 796154400 - tz.transition 1995, 9, :o3, 811879200 - tz.transition 1996, 3, :o4, 828208800 - tz.transition 1996, 10, :o3, 846352800 - tz.transition 1997, 3, :o4, 859658400 - tz.transition 1997, 10, :o3, 877802400 - tz.transition 1998, 3, :o4, 891108000 - tz.transition 1998, 10, :o3, 909252000 - tz.transition 1999, 3, :o4, 922557600 - tz.transition 1999, 10, :o3, 941306400 - tz.transition 2000, 3, :o4, 954007200 - tz.transition 2000, 10, :o3, 972756000 - tz.transition 2001, 3, :o4, 985456800 - tz.transition 2001, 10, :o3, 1004205600 - tz.transition 2002, 3, :o4, 1017511200 - tz.transition 2002, 10, :o3, 1035655200 - tz.transition 2003, 3, :o4, 1048960800 - tz.transition 2003, 10, :o3, 1067104800 - tz.transition 2004, 3, :o4, 1080410400 - tz.transition 2004, 10, :o3, 1099159200 - tz.transition 2005, 3, :o4, 1111860000 - tz.transition 2005, 10, :o3, 1130608800 - tz.transition 2006, 3, :o4, 1143309600 - tz.transition 2006, 10, :o3, 1162058400 - tz.transition 2007, 3, :o4, 1174759200 - tz.transition 2007, 10, :o3, 1193508000 - tz.transition 2008, 3, :o4, 1206813600 - tz.transition 2008, 10, :o3, 1224957600 - tz.transition 2009, 3, :o4, 1238263200 - tz.transition 2009, 10, :o3, 1256407200 - tz.transition 2010, 3, :o4, 1269712800 - tz.transition 2010, 10, :o3, 1288461600 - tz.transition 2011, 3, :o4, 1301162400 - tz.transition 2011, 10, :o3, 1319911200 - tz.transition 2012, 3, :o4, 1332612000 - tz.transition 2012, 10, :o3, 1351360800 - tz.transition 2013, 3, :o4, 1364666400 - tz.transition 2013, 10, :o3, 1382810400 - tz.transition 2014, 3, :o4, 1396116000 - tz.transition 2014, 10, :o3, 1414260000 - tz.transition 2015, 3, :o4, 1427565600 - tz.transition 2015, 10, :o3, 1445709600 - tz.transition 2016, 3, :o4, 1459015200 - tz.transition 2016, 10, :o3, 1477764000 - tz.transition 2017, 3, :o4, 1490464800 - tz.transition 2017, 10, :o3, 1509213600 - tz.transition 2018, 3, :o4, 1521914400 - tz.transition 2018, 10, :o3, 1540663200 - tz.transition 2019, 3, :o4, 1553968800 - tz.transition 2019, 10, :o3, 1572112800 - tz.transition 2020, 3, :o4, 1585418400 - tz.transition 2020, 10, :o3, 1603562400 - tz.transition 2021, 3, :o4, 1616868000 - tz.transition 2021, 10, :o3, 1635616800 - tz.transition 2022, 3, :o4, 1648317600 - tz.transition 2022, 10, :o3, 1667066400 - tz.transition 2023, 3, :o4, 1679767200 - tz.transition 2023, 10, :o3, 1698516000 - tz.transition 2024, 3, :o4, 1711821600 - tz.transition 2024, 10, :o3, 1729965600 - tz.transition 2025, 3, :o4, 1743271200 - tz.transition 2025, 10, :o3, 1761415200 - tz.transition 2026, 3, :o4, 1774720800 - tz.transition 2026, 10, :o3, 1792864800 - tz.transition 2027, 3, :o4, 1806170400 - tz.transition 2027, 10, :o3, 1824919200 - tz.transition 2028, 3, :o4, 1837620000 - tz.transition 2028, 10, :o3, 1856368800 - tz.transition 2029, 3, :o4, 1869069600 - tz.transition 2029, 10, :o3, 1887818400 - tz.transition 2030, 3, :o4, 1901124000 - tz.transition 2030, 10, :o3, 1919268000 - tz.transition 2031, 3, :o4, 1932573600 - tz.transition 2031, 10, :o3, 1950717600 - tz.transition 2032, 3, :o4, 1964023200 - tz.transition 2032, 10, :o3, 1982772000 - tz.transition 2033, 3, :o4, 1995472800 - tz.transition 2033, 10, :o3, 2014221600 - tz.transition 2034, 3, :o4, 2026922400 - tz.transition 2034, 10, :o3, 2045671200 - tz.transition 2035, 3, :o4, 2058372000 - tz.transition 2035, 10, :o3, 2077120800 - tz.transition 2036, 3, :o4, 2090426400 - tz.transition 2036, 10, :o3, 2108570400 - tz.transition 2037, 3, :o4, 2121876000 - tz.transition 2037, 10, :o3, 2140020000 - tz.transition 2038, 3, :o4, 9862041, 4 - tz.transition 2038, 10, :o3, 9862909, 4 - tz.transition 2039, 3, :o4, 9863497, 4 - tz.transition 2039, 10, :o3, 9864365, 4 - tz.transition 2040, 3, :o4, 9864953, 4 - tz.transition 2040, 10, :o3, 9865821, 4 - tz.transition 2041, 3, :o4, 9866437, 4 - tz.transition 2041, 10, :o3, 9867277, 4 - tz.transition 2042, 3, :o4, 9867893, 4 - tz.transition 2042, 10, :o3, 9868733, 4 - tz.transition 2043, 3, :o4, 9869349, 4 - tz.transition 2043, 10, :o3, 9870189, 4 - tz.transition 2044, 3, :o4, 9870805, 4 - tz.transition 2044, 10, :o3, 9871673, 4 - tz.transition 2045, 3, :o4, 9872261, 4 - tz.transition 2045, 10, :o3, 9873129, 4 - tz.transition 2046, 3, :o4, 9873717, 4 - tz.transition 2046, 10, :o3, 9874585, 4 - tz.transition 2047, 3, :o4, 9875201, 4 - tz.transition 2047, 10, :o3, 9876041, 4 - tz.transition 2048, 3, :o4, 9876657, 4 - tz.transition 2048, 10, :o3, 9877497, 4 - tz.transition 2049, 3, :o4, 9878113, 4 - tz.transition 2049, 10, :o3, 9878981, 4 - tz.transition 2050, 3, :o4, 9879569, 4 - tz.transition 2050, 10, :o3, 9880437, 4 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb deleted file mode 100644 index cc58fa173..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jakarta.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jakarta - include TimezoneDefinition - - timezone 'Asia/Jakarta' do |tz| - tz.offset :o0, 25632, 0, :LMT - tz.offset :o1, 25632, 0, :JMT - tz.offset :o2, 26400, 0, :JAVT - tz.offset :o3, 27000, 0, :WIT - tz.offset :o4, 32400, 0, :JST - tz.offset :o5, 28800, 0, :WIT - tz.offset :o6, 25200, 0, :WIT - - tz.transition 1867, 8, :o1, 720956461, 300 - tz.transition 1923, 12, :o2, 87256267, 36 - tz.transition 1932, 10, :o3, 87372439, 36 - tz.transition 1942, 3, :o4, 38887059, 16 - tz.transition 1945, 9, :o3, 19453769, 8 - tz.transition 1948, 4, :o5, 38922755, 16 - tz.transition 1950, 4, :o3, 14600413, 6 - tz.transition 1963, 12, :o6, 39014323, 16 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb deleted file mode 100644 index 9b737b899..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Jerusalem.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Jerusalem - include TimezoneDefinition - - timezone 'Asia/Jerusalem' do |tz| - tz.offset :o0, 8456, 0, :LMT - tz.offset :o1, 8440, 0, :JMT - tz.offset :o2, 7200, 0, :IST - tz.offset :o3, 7200, 3600, :IDT - tz.offset :o4, 7200, 7200, :IDDT - - tz.transition 1879, 12, :o1, 26003326343, 10800 - tz.transition 1917, 12, :o2, 5230643909, 2160 - tz.transition 1940, 5, :o3, 29157377, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1943, 4, :o3, 4861631, 2 - tz.transition 1943, 10, :o2, 19448235, 8 - tz.transition 1944, 3, :o3, 29174177, 12 - tz.transition 1944, 10, :o2, 19451163, 8 - tz.transition 1945, 4, :o3, 29178737, 12 - tz.transition 1945, 10, :o2, 58362251, 24 - tz.transition 1946, 4, :o3, 4863853, 2 - tz.transition 1946, 10, :o2, 19457003, 8 - tz.transition 1948, 5, :o4, 29192333, 12 - tz.transition 1948, 8, :o3, 7298386, 3 - tz.transition 1948, 10, :o2, 58388555, 24 - tz.transition 1949, 4, :o3, 29196449, 12 - tz.transition 1949, 10, :o2, 58397315, 24 - tz.transition 1950, 4, :o3, 29200649, 12 - tz.transition 1950, 9, :o2, 4867079, 2 - tz.transition 1951, 3, :o3, 29204849, 12 - tz.transition 1951, 11, :o2, 4867923, 2 - tz.transition 1952, 4, :o3, 4868245, 2 - tz.transition 1952, 10, :o2, 4868609, 2 - tz.transition 1953, 4, :o3, 4868959, 2 - tz.transition 1953, 9, :o2, 4869267, 2 - tz.transition 1954, 6, :o3, 29218877, 12 - tz.transition 1954, 9, :o2, 19479979, 8 - tz.transition 1955, 6, :o3, 4870539, 2 - tz.transition 1955, 9, :o2, 19482891, 8 - tz.transition 1956, 6, :o3, 29227529, 12 - tz.transition 1956, 9, :o2, 4871493, 2 - tz.transition 1957, 4, :o3, 4871915, 2 - tz.transition 1957, 9, :o2, 19488827, 8 - tz.transition 1974, 7, :o3, 142380000 - tz.transition 1974, 10, :o2, 150843600 - tz.transition 1975, 4, :o3, 167176800 - tz.transition 1975, 8, :o2, 178664400 - tz.transition 1985, 4, :o3, 482277600 - tz.transition 1985, 9, :o2, 495579600 - tz.transition 1986, 5, :o3, 516751200 - tz.transition 1986, 9, :o2, 526424400 - tz.transition 1987, 4, :o3, 545436000 - tz.transition 1987, 9, :o2, 558478800 - tz.transition 1988, 4, :o3, 576540000 - tz.transition 1988, 9, :o2, 589237200 - tz.transition 1989, 4, :o3, 609890400 - tz.transition 1989, 9, :o2, 620773200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 8, :o2, 651618000 - tz.transition 1991, 3, :o3, 669765600 - tz.transition 1991, 8, :o2, 683672400 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 715726800 - tz.transition 1993, 4, :o3, 733701600 - tz.transition 1993, 9, :o2, 747176400 - tz.transition 1994, 3, :o3, 765151200 - tz.transition 1994, 8, :o2, 778021200 - tz.transition 1995, 3, :o3, 796600800 - tz.transition 1995, 9, :o2, 810075600 - tz.transition 1996, 3, :o3, 826840800 - tz.transition 1996, 9, :o2, 842821200 - tz.transition 1997, 3, :o3, 858895200 - tz.transition 1997, 9, :o2, 874184400 - tz.transition 1998, 3, :o3, 890344800 - tz.transition 1998, 9, :o2, 905029200 - tz.transition 1999, 4, :o3, 923011200 - tz.transition 1999, 9, :o2, 936313200 - tz.transition 2000, 4, :o3, 955670400 - tz.transition 2000, 10, :o2, 970783200 - tz.transition 2001, 4, :o3, 986770800 - tz.transition 2001, 9, :o2, 1001282400 - tz.transition 2002, 3, :o3, 1017356400 - tz.transition 2002, 10, :o2, 1033941600 - tz.transition 2003, 3, :o3, 1048806000 - tz.transition 2003, 10, :o2, 1065132000 - tz.transition 2004, 4, :o3, 1081292400 - tz.transition 2004, 9, :o2, 1095804000 - tz.transition 2005, 4, :o3, 1112313600 - tz.transition 2005, 10, :o2, 1128812400 - tz.transition 2006, 3, :o3, 1143763200 - tz.transition 2006, 9, :o2, 1159657200 - tz.transition 2007, 3, :o3, 1175212800 - tz.transition 2007, 9, :o2, 1189897200 - tz.transition 2008, 3, :o3, 1206662400 - tz.transition 2008, 10, :o2, 1223161200 - tz.transition 2009, 3, :o3, 1238112000 - tz.transition 2009, 9, :o2, 1254006000 - tz.transition 2010, 3, :o3, 1269561600 - tz.transition 2010, 9, :o2, 1284246000 - tz.transition 2011, 4, :o3, 1301616000 - tz.transition 2011, 10, :o2, 1317510000 - tz.transition 2012, 3, :o3, 1333065600 - tz.transition 2012, 9, :o2, 1348354800 - tz.transition 2013, 3, :o3, 1364515200 - tz.transition 2013, 9, :o2, 1378594800 - tz.transition 2014, 3, :o3, 1395964800 - tz.transition 2014, 9, :o2, 1411858800 - tz.transition 2015, 3, :o3, 1427414400 - tz.transition 2015, 9, :o2, 1442703600 - tz.transition 2016, 4, :o3, 1459468800 - tz.transition 2016, 10, :o2, 1475967600 - tz.transition 2017, 3, :o3, 1490918400 - tz.transition 2017, 9, :o2, 1506207600 - tz.transition 2018, 3, :o3, 1522368000 - tz.transition 2018, 9, :o2, 1537052400 - tz.transition 2019, 3, :o3, 1553817600 - tz.transition 2019, 10, :o2, 1570316400 - tz.transition 2020, 3, :o3, 1585267200 - tz.transition 2020, 9, :o2, 1601161200 - tz.transition 2021, 3, :o3, 1616716800 - tz.transition 2021, 9, :o2, 1631401200 - tz.transition 2022, 4, :o3, 1648771200 - tz.transition 2022, 10, :o2, 1664665200 - tz.transition 2023, 3, :o3, 1680220800 - tz.transition 2023, 9, :o2, 1695510000 - tz.transition 2024, 3, :o3, 1711670400 - tz.transition 2024, 10, :o2, 1728169200 - tz.transition 2025, 3, :o3, 1743120000 - tz.transition 2025, 9, :o2, 1759014000 - tz.transition 2026, 3, :o3, 1774569600 - tz.transition 2026, 9, :o2, 1789858800 - tz.transition 2027, 3, :o3, 1806019200 - tz.transition 2027, 10, :o2, 1823122800 - tz.transition 2028, 3, :o3, 1838073600 - tz.transition 2028, 9, :o2, 1853362800 - tz.transition 2029, 3, :o3, 1869523200 - tz.transition 2029, 9, :o2, 1884207600 - tz.transition 2030, 3, :o3, 1900972800 - tz.transition 2030, 10, :o2, 1917471600 - tz.transition 2031, 3, :o3, 1932422400 - tz.transition 2031, 9, :o2, 1947711600 - tz.transition 2032, 3, :o3, 1963872000 - tz.transition 2032, 9, :o2, 1978556400 - tz.transition 2033, 4, :o3, 1995926400 - tz.transition 2033, 10, :o2, 2011820400 - tz.transition 2034, 3, :o3, 2027376000 - tz.transition 2034, 9, :o2, 2042060400 - tz.transition 2035, 3, :o3, 2058825600 - tz.transition 2035, 10, :o2, 2075324400 - tz.transition 2036, 3, :o3, 2090275200 - tz.transition 2036, 9, :o2, 2106169200 - tz.transition 2037, 3, :o3, 2121724800 - tz.transition 2037, 9, :o2, 2136409200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb deleted file mode 100644 index 669c09790..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kabul.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kabul - include TimezoneDefinition - - timezone 'Asia/Kabul' do |tz| - tz.offset :o0, 16608, 0, :LMT - tz.offset :o1, 14400, 0, :AFT - tz.offset :o2, 16200, 0, :AFT - - tz.transition 1889, 12, :o1, 2170231477, 900 - tz.transition 1944, 12, :o2, 7294369, 3 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb deleted file mode 100644 index 2f1690b3a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kamchatka.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kamchatka - include TimezoneDefinition - - timezone 'Asia/Kamchatka' do |tz| - tz.offset :o0, 38076, 0, :LMT - tz.offset :o1, 39600, 0, :PETT - tz.offset :o2, 43200, 0, :PETT - tz.offset :o3, 43200, 3600, :PETST - tz.offset :o4, 39600, 3600, :PETST - - tz.transition 1922, 11, :o1, 17448250027, 7200 - tz.transition 1930, 6, :o2, 58227553, 24 - tz.transition 1981, 3, :o3, 354888000 - tz.transition 1981, 9, :o2, 370695600 - tz.transition 1982, 3, :o3, 386424000 - tz.transition 1982, 9, :o2, 402231600 - tz.transition 1983, 3, :o3, 417960000 - tz.transition 1983, 9, :o2, 433767600 - tz.transition 1984, 3, :o3, 449582400 - tz.transition 1984, 9, :o2, 465314400 - tz.transition 1985, 3, :o3, 481039200 - tz.transition 1985, 9, :o2, 496764000 - tz.transition 1986, 3, :o3, 512488800 - tz.transition 1986, 9, :o2, 528213600 - tz.transition 1987, 3, :o3, 543938400 - tz.transition 1987, 9, :o2, 559663200 - tz.transition 1988, 3, :o3, 575388000 - tz.transition 1988, 9, :o2, 591112800 - tz.transition 1989, 3, :o3, 606837600 - tz.transition 1989, 9, :o2, 622562400 - tz.transition 1990, 3, :o3, 638287200 - tz.transition 1990, 9, :o2, 654616800 - tz.transition 1991, 3, :o4, 670341600 - tz.transition 1991, 9, :o1, 686070000 - tz.transition 1992, 1, :o2, 695746800 - tz.transition 1992, 3, :o3, 701780400 - tz.transition 1992, 9, :o2, 717501600 - tz.transition 1993, 3, :o3, 733240800 - tz.transition 1993, 9, :o2, 748965600 - tz.transition 1994, 3, :o3, 764690400 - tz.transition 1994, 9, :o2, 780415200 - tz.transition 1995, 3, :o3, 796140000 - tz.transition 1995, 9, :o2, 811864800 - tz.transition 1996, 3, :o3, 828194400 - tz.transition 1996, 10, :o2, 846338400 - tz.transition 1997, 3, :o3, 859644000 - tz.transition 1997, 10, :o2, 877788000 - tz.transition 1998, 3, :o3, 891093600 - tz.transition 1998, 10, :o2, 909237600 - tz.transition 1999, 3, :o3, 922543200 - tz.transition 1999, 10, :o2, 941292000 - tz.transition 2000, 3, :o3, 953992800 - tz.transition 2000, 10, :o2, 972741600 - tz.transition 2001, 3, :o3, 985442400 - tz.transition 2001, 10, :o2, 1004191200 - tz.transition 2002, 3, :o3, 1017496800 - tz.transition 2002, 10, :o2, 1035640800 - tz.transition 2003, 3, :o3, 1048946400 - tz.transition 2003, 10, :o2, 1067090400 - tz.transition 2004, 3, :o3, 1080396000 - tz.transition 2004, 10, :o2, 1099144800 - tz.transition 2005, 3, :o3, 1111845600 - tz.transition 2005, 10, :o2, 1130594400 - tz.transition 2006, 3, :o3, 1143295200 - tz.transition 2006, 10, :o2, 1162044000 - tz.transition 2007, 3, :o3, 1174744800 - tz.transition 2007, 10, :o2, 1193493600 - tz.transition 2008, 3, :o3, 1206799200 - tz.transition 2008, 10, :o2, 1224943200 - tz.transition 2009, 3, :o3, 1238248800 - tz.transition 2009, 10, :o2, 1256392800 - tz.transition 2010, 3, :o3, 1269698400 - tz.transition 2010, 10, :o2, 1288447200 - tz.transition 2011, 3, :o3, 1301148000 - tz.transition 2011, 10, :o2, 1319896800 - tz.transition 2012, 3, :o3, 1332597600 - tz.transition 2012, 10, :o2, 1351346400 - tz.transition 2013, 3, :o3, 1364652000 - tz.transition 2013, 10, :o2, 1382796000 - tz.transition 2014, 3, :o3, 1396101600 - tz.transition 2014, 10, :o2, 1414245600 - tz.transition 2015, 3, :o3, 1427551200 - tz.transition 2015, 10, :o2, 1445695200 - tz.transition 2016, 3, :o3, 1459000800 - tz.transition 2016, 10, :o2, 1477749600 - tz.transition 2017, 3, :o3, 1490450400 - tz.transition 2017, 10, :o2, 1509199200 - tz.transition 2018, 3, :o3, 1521900000 - tz.transition 2018, 10, :o2, 1540648800 - tz.transition 2019, 3, :o3, 1553954400 - tz.transition 2019, 10, :o2, 1572098400 - tz.transition 2020, 3, :o3, 1585404000 - tz.transition 2020, 10, :o2, 1603548000 - tz.transition 2021, 3, :o3, 1616853600 - tz.transition 2021, 10, :o2, 1635602400 - tz.transition 2022, 3, :o3, 1648303200 - tz.transition 2022, 10, :o2, 1667052000 - tz.transition 2023, 3, :o3, 1679752800 - tz.transition 2023, 10, :o2, 1698501600 - tz.transition 2024, 3, :o3, 1711807200 - tz.transition 2024, 10, :o2, 1729951200 - tz.transition 2025, 3, :o3, 1743256800 - tz.transition 2025, 10, :o2, 1761400800 - tz.transition 2026, 3, :o3, 1774706400 - tz.transition 2026, 10, :o2, 1792850400 - tz.transition 2027, 3, :o3, 1806156000 - tz.transition 2027, 10, :o2, 1824904800 - tz.transition 2028, 3, :o3, 1837605600 - tz.transition 2028, 10, :o2, 1856354400 - tz.transition 2029, 3, :o3, 1869055200 - tz.transition 2029, 10, :o2, 1887804000 - tz.transition 2030, 3, :o3, 1901109600 - tz.transition 2030, 10, :o2, 1919253600 - tz.transition 2031, 3, :o3, 1932559200 - tz.transition 2031, 10, :o2, 1950703200 - tz.transition 2032, 3, :o3, 1964008800 - tz.transition 2032, 10, :o2, 1982757600 - tz.transition 2033, 3, :o3, 1995458400 - tz.transition 2033, 10, :o2, 2014207200 - tz.transition 2034, 3, :o3, 2026908000 - tz.transition 2034, 10, :o2, 2045656800 - tz.transition 2035, 3, :o3, 2058357600 - tz.transition 2035, 10, :o2, 2077106400 - tz.transition 2036, 3, :o3, 2090412000 - tz.transition 2036, 10, :o2, 2108556000 - tz.transition 2037, 3, :o3, 2121861600 - tz.transition 2037, 10, :o2, 2140005600 - tz.transition 2038, 3, :o3, 29586121, 12 - tz.transition 2038, 10, :o2, 29588725, 12 - tz.transition 2039, 3, :o3, 29590489, 12 - tz.transition 2039, 10, :o2, 29593093, 12 - tz.transition 2040, 3, :o3, 29594857, 12 - tz.transition 2040, 10, :o2, 29597461, 12 - tz.transition 2041, 3, :o3, 29599309, 12 - tz.transition 2041, 10, :o2, 29601829, 12 - tz.transition 2042, 3, :o3, 29603677, 12 - tz.transition 2042, 10, :o2, 29606197, 12 - tz.transition 2043, 3, :o3, 29608045, 12 - tz.transition 2043, 10, :o2, 29610565, 12 - tz.transition 2044, 3, :o3, 29612413, 12 - tz.transition 2044, 10, :o2, 29615017, 12 - tz.transition 2045, 3, :o3, 29616781, 12 - tz.transition 2045, 10, :o2, 29619385, 12 - tz.transition 2046, 3, :o3, 29621149, 12 - tz.transition 2046, 10, :o2, 29623753, 12 - tz.transition 2047, 3, :o3, 29625601, 12 - tz.transition 2047, 10, :o2, 29628121, 12 - tz.transition 2048, 3, :o3, 29629969, 12 - tz.transition 2048, 10, :o2, 29632489, 12 - tz.transition 2049, 3, :o3, 29634337, 12 - tz.transition 2049, 10, :o2, 29636941, 12 - tz.transition 2050, 3, :o3, 29638705, 12 - tz.transition 2050, 10, :o2, 29641309, 12 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb deleted file mode 100644 index b906cc989..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Karachi.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Karachi - include TimezoneDefinition - - timezone 'Asia/Karachi' do |tz| - tz.offset :o0, 16092, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 19800, 3600, :IST - tz.offset :o3, 18000, 0, :KART - tz.offset :o4, 18000, 0, :PKT - tz.offset :o5, 18000, 3600, :PKST - - tz.transition 1906, 12, :o1, 1934061051, 800 - tz.transition 1942, 8, :o2, 116668957, 48 - tz.transition 1945, 10, :o1, 116723675, 48 - tz.transition 1951, 9, :o3, 116828125, 48 - tz.transition 1971, 3, :o4, 38775600 - tz.transition 2002, 4, :o5, 1018119660 - tz.transition 2002, 10, :o4, 1033840860 - tz.transition 2008, 5, :o5, 1212260400 - tz.transition 2008, 10, :o4, 1225476000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb deleted file mode 100644 index 37dbea1f4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Katmandu.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Katmandu - include TimezoneDefinition - - timezone 'Asia/Katmandu' do |tz| - tz.offset :o0, 20476, 0, :LMT - tz.offset :o1, 19800, 0, :IST - tz.offset :o2, 20700, 0, :NPT - - tz.transition 1919, 12, :o1, 52322204081, 21600 - tz.transition 1985, 12, :o2, 504901800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb deleted file mode 100644 index 1b6ffbd59..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kolkata.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kolkata - include TimezoneDefinition - - timezone 'Asia/Kolkata' do |tz| - tz.offset :o0, 21208, 0, :LMT - tz.offset :o1, 21200, 0, :HMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 19800, 0, :IST - tz.offset :o4, 19800, 3600, :IST - - tz.transition 1879, 12, :o1, 26003324749, 10800 - tz.transition 1941, 9, :o2, 524937943, 216 - tz.transition 1942, 5, :o3, 116663723, 48 - tz.transition 1942, 8, :o4, 116668957, 48 - tz.transition 1945, 10, :o3, 116723675, 48 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb deleted file mode 100644 index d6c503c15..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Krasnoyarsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Krasnoyarsk - include TimezoneDefinition - - timezone 'Asia/Krasnoyarsk' do |tz| - tz.offset :o0, 22280, 0, :LMT - tz.offset :o1, 21600, 0, :KRAT - tz.offset :o2, 25200, 0, :KRAT - tz.offset :o3, 25200, 3600, :KRAST - tz.offset :o4, 21600, 3600, :KRAST - - tz.transition 1920, 1, :o1, 5232231163, 2160 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 9, :o2, 748983600 - tz.transition 1994, 3, :o3, 764708400 - tz.transition 1994, 9, :o2, 780433200 - tz.transition 1995, 3, :o3, 796158000 - tz.transition 1995, 9, :o2, 811882800 - tz.transition 1996, 3, :o3, 828212400 - tz.transition 1996, 10, :o2, 846356400 - tz.transition 1997, 3, :o3, 859662000 - tz.transition 1997, 10, :o2, 877806000 - tz.transition 1998, 3, :o3, 891111600 - tz.transition 1998, 10, :o2, 909255600 - tz.transition 1999, 3, :o3, 922561200 - tz.transition 1999, 10, :o2, 941310000 - tz.transition 2000, 3, :o3, 954010800 - tz.transition 2000, 10, :o2, 972759600 - tz.transition 2001, 3, :o3, 985460400 - tz.transition 2001, 10, :o2, 1004209200 - tz.transition 2002, 3, :o3, 1017514800 - tz.transition 2002, 10, :o2, 1035658800 - tz.transition 2003, 3, :o3, 1048964400 - tz.transition 2003, 10, :o2, 1067108400 - tz.transition 2004, 3, :o3, 1080414000 - tz.transition 2004, 10, :o2, 1099162800 - tz.transition 2005, 3, :o3, 1111863600 - tz.transition 2005, 10, :o2, 1130612400 - tz.transition 2006, 3, :o3, 1143313200 - tz.transition 2006, 10, :o2, 1162062000 - tz.transition 2007, 3, :o3, 1174762800 - tz.transition 2007, 10, :o2, 1193511600 - tz.transition 2008, 3, :o3, 1206817200 - tz.transition 2008, 10, :o2, 1224961200 - tz.transition 2009, 3, :o3, 1238266800 - tz.transition 2009, 10, :o2, 1256410800 - tz.transition 2010, 3, :o3, 1269716400 - tz.transition 2010, 10, :o2, 1288465200 - tz.transition 2011, 3, :o3, 1301166000 - tz.transition 2011, 10, :o2, 1319914800 - tz.transition 2012, 3, :o3, 1332615600 - tz.transition 2012, 10, :o2, 1351364400 - tz.transition 2013, 3, :o3, 1364670000 - tz.transition 2013, 10, :o2, 1382814000 - tz.transition 2014, 3, :o3, 1396119600 - tz.transition 2014, 10, :o2, 1414263600 - tz.transition 2015, 3, :o3, 1427569200 - tz.transition 2015, 10, :o2, 1445713200 - tz.transition 2016, 3, :o3, 1459018800 - tz.transition 2016, 10, :o2, 1477767600 - tz.transition 2017, 3, :o3, 1490468400 - tz.transition 2017, 10, :o2, 1509217200 - tz.transition 2018, 3, :o3, 1521918000 - tz.transition 2018, 10, :o2, 1540666800 - tz.transition 2019, 3, :o3, 1553972400 - tz.transition 2019, 10, :o2, 1572116400 - tz.transition 2020, 3, :o3, 1585422000 - tz.transition 2020, 10, :o2, 1603566000 - tz.transition 2021, 3, :o3, 1616871600 - tz.transition 2021, 10, :o2, 1635620400 - tz.transition 2022, 3, :o3, 1648321200 - tz.transition 2022, 10, :o2, 1667070000 - tz.transition 2023, 3, :o3, 1679770800 - tz.transition 2023, 10, :o2, 1698519600 - tz.transition 2024, 3, :o3, 1711825200 - tz.transition 2024, 10, :o2, 1729969200 - tz.transition 2025, 3, :o3, 1743274800 - tz.transition 2025, 10, :o2, 1761418800 - tz.transition 2026, 3, :o3, 1774724400 - tz.transition 2026, 10, :o2, 1792868400 - tz.transition 2027, 3, :o3, 1806174000 - tz.transition 2027, 10, :o2, 1824922800 - tz.transition 2028, 3, :o3, 1837623600 - tz.transition 2028, 10, :o2, 1856372400 - tz.transition 2029, 3, :o3, 1869073200 - tz.transition 2029, 10, :o2, 1887822000 - tz.transition 2030, 3, :o3, 1901127600 - tz.transition 2030, 10, :o2, 1919271600 - tz.transition 2031, 3, :o3, 1932577200 - tz.transition 2031, 10, :o2, 1950721200 - tz.transition 2032, 3, :o3, 1964026800 - tz.transition 2032, 10, :o2, 1982775600 - tz.transition 2033, 3, :o3, 1995476400 - tz.transition 2033, 10, :o2, 2014225200 - tz.transition 2034, 3, :o3, 2026926000 - tz.transition 2034, 10, :o2, 2045674800 - tz.transition 2035, 3, :o3, 2058375600 - tz.transition 2035, 10, :o2, 2077124400 - tz.transition 2036, 3, :o3, 2090430000 - tz.transition 2036, 10, :o2, 2108574000 - tz.transition 2037, 3, :o3, 2121879600 - tz.transition 2037, 10, :o2, 2140023600 - tz.transition 2038, 3, :o3, 59172247, 24 - tz.transition 2038, 10, :o2, 59177455, 24 - tz.transition 2039, 3, :o3, 59180983, 24 - tz.transition 2039, 10, :o2, 59186191, 24 - tz.transition 2040, 3, :o3, 59189719, 24 - tz.transition 2040, 10, :o2, 59194927, 24 - tz.transition 2041, 3, :o3, 59198623, 24 - tz.transition 2041, 10, :o2, 59203663, 24 - tz.transition 2042, 3, :o3, 59207359, 24 - tz.transition 2042, 10, :o2, 59212399, 24 - tz.transition 2043, 3, :o3, 59216095, 24 - tz.transition 2043, 10, :o2, 59221135, 24 - tz.transition 2044, 3, :o3, 59224831, 24 - tz.transition 2044, 10, :o2, 59230039, 24 - tz.transition 2045, 3, :o3, 59233567, 24 - tz.transition 2045, 10, :o2, 59238775, 24 - tz.transition 2046, 3, :o3, 59242303, 24 - tz.transition 2046, 10, :o2, 59247511, 24 - tz.transition 2047, 3, :o3, 59251207, 24 - tz.transition 2047, 10, :o2, 59256247, 24 - tz.transition 2048, 3, :o3, 59259943, 24 - tz.transition 2048, 10, :o2, 59264983, 24 - tz.transition 2049, 3, :o3, 59268679, 24 - tz.transition 2049, 10, :o2, 59273887, 24 - tz.transition 2050, 3, :o3, 59277415, 24 - tz.transition 2050, 10, :o2, 59282623, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb deleted file mode 100644 index 77a0c206f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuala_Lumpur.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuala_Lumpur - include TimezoneDefinition - - timezone 'Asia/Kuala_Lumpur' do |tz| - tz.offset :o0, 24406, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 28800, 0, :MYT - - tz.transition 1900, 12, :o1, 104344641397, 43200 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1981, 12, :o7, 378664200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb deleted file mode 100644 index 5bd528319..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Kuwait.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Kuwait - include TimezoneDefinition - - timezone 'Asia/Kuwait' do |tz| - tz.offset :o0, 11516, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899121, 21600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb deleted file mode 100644 index 302093693..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Magadan.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Magadan - include TimezoneDefinition - - timezone 'Asia/Magadan' do |tz| - tz.offset :o0, 36192, 0, :LMT - tz.offset :o1, 36000, 0, :MAGT - tz.offset :o2, 39600, 0, :MAGT - tz.offset :o3, 39600, 3600, :MAGST - tz.offset :o4, 36000, 3600, :MAGST - - tz.transition 1924, 5, :o1, 2181516373, 900 - tz.transition 1930, 6, :o2, 29113777, 12 - tz.transition 1981, 3, :o3, 354891600 - tz.transition 1981, 9, :o2, 370699200 - tz.transition 1982, 3, :o3, 386427600 - tz.transition 1982, 9, :o2, 402235200 - tz.transition 1983, 3, :o3, 417963600 - tz.transition 1983, 9, :o2, 433771200 - tz.transition 1984, 3, :o3, 449586000 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481042800 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512492400 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543942000 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575391600 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606841200 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638290800 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o4, 670345200 - tz.transition 1991, 9, :o1, 686073600 - tz.transition 1992, 1, :o2, 695750400 - tz.transition 1992, 3, :o3, 701784000 - tz.transition 1992, 9, :o2, 717505200 - tz.transition 1993, 3, :o3, 733244400 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764694000 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796143600 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828198000 - tz.transition 1996, 10, :o2, 846342000 - tz.transition 1997, 3, :o3, 859647600 - tz.transition 1997, 10, :o2, 877791600 - tz.transition 1998, 3, :o3, 891097200 - tz.transition 1998, 10, :o2, 909241200 - tz.transition 1999, 3, :o3, 922546800 - tz.transition 1999, 10, :o2, 941295600 - tz.transition 2000, 3, :o3, 953996400 - tz.transition 2000, 10, :o2, 972745200 - tz.transition 2001, 3, :o3, 985446000 - tz.transition 2001, 10, :o2, 1004194800 - tz.transition 2002, 3, :o3, 1017500400 - tz.transition 2002, 10, :o2, 1035644400 - tz.transition 2003, 3, :o3, 1048950000 - tz.transition 2003, 10, :o2, 1067094000 - tz.transition 2004, 3, :o3, 1080399600 - tz.transition 2004, 10, :o2, 1099148400 - tz.transition 2005, 3, :o3, 1111849200 - tz.transition 2005, 10, :o2, 1130598000 - tz.transition 2006, 3, :o3, 1143298800 - tz.transition 2006, 10, :o2, 1162047600 - tz.transition 2007, 3, :o3, 1174748400 - tz.transition 2007, 10, :o2, 1193497200 - tz.transition 2008, 3, :o3, 1206802800 - tz.transition 2008, 10, :o2, 1224946800 - tz.transition 2009, 3, :o3, 1238252400 - tz.transition 2009, 10, :o2, 1256396400 - tz.transition 2010, 3, :o3, 1269702000 - tz.transition 2010, 10, :o2, 1288450800 - tz.transition 2011, 3, :o3, 1301151600 - tz.transition 2011, 10, :o2, 1319900400 - tz.transition 2012, 3, :o3, 1332601200 - tz.transition 2012, 10, :o2, 1351350000 - tz.transition 2013, 3, :o3, 1364655600 - tz.transition 2013, 10, :o2, 1382799600 - tz.transition 2014, 3, :o3, 1396105200 - tz.transition 2014, 10, :o2, 1414249200 - tz.transition 2015, 3, :o3, 1427554800 - tz.transition 2015, 10, :o2, 1445698800 - tz.transition 2016, 3, :o3, 1459004400 - tz.transition 2016, 10, :o2, 1477753200 - tz.transition 2017, 3, :o3, 1490454000 - tz.transition 2017, 10, :o2, 1509202800 - tz.transition 2018, 3, :o3, 1521903600 - tz.transition 2018, 10, :o2, 1540652400 - tz.transition 2019, 3, :o3, 1553958000 - tz.transition 2019, 10, :o2, 1572102000 - tz.transition 2020, 3, :o3, 1585407600 - tz.transition 2020, 10, :o2, 1603551600 - tz.transition 2021, 3, :o3, 1616857200 - tz.transition 2021, 10, :o2, 1635606000 - tz.transition 2022, 3, :o3, 1648306800 - tz.transition 2022, 10, :o2, 1667055600 - tz.transition 2023, 3, :o3, 1679756400 - tz.transition 2023, 10, :o2, 1698505200 - tz.transition 2024, 3, :o3, 1711810800 - tz.transition 2024, 10, :o2, 1729954800 - tz.transition 2025, 3, :o3, 1743260400 - tz.transition 2025, 10, :o2, 1761404400 - tz.transition 2026, 3, :o3, 1774710000 - tz.transition 2026, 10, :o2, 1792854000 - tz.transition 2027, 3, :o3, 1806159600 - tz.transition 2027, 10, :o2, 1824908400 - tz.transition 2028, 3, :o3, 1837609200 - tz.transition 2028, 10, :o2, 1856358000 - tz.transition 2029, 3, :o3, 1869058800 - tz.transition 2029, 10, :o2, 1887807600 - tz.transition 2030, 3, :o3, 1901113200 - tz.transition 2030, 10, :o2, 1919257200 - tz.transition 2031, 3, :o3, 1932562800 - tz.transition 2031, 10, :o2, 1950706800 - tz.transition 2032, 3, :o3, 1964012400 - tz.transition 2032, 10, :o2, 1982761200 - tz.transition 2033, 3, :o3, 1995462000 - tz.transition 2033, 10, :o2, 2014210800 - tz.transition 2034, 3, :o3, 2026911600 - tz.transition 2034, 10, :o2, 2045660400 - tz.transition 2035, 3, :o3, 2058361200 - tz.transition 2035, 10, :o2, 2077110000 - tz.transition 2036, 3, :o3, 2090415600 - tz.transition 2036, 10, :o2, 2108559600 - tz.transition 2037, 3, :o3, 2121865200 - tz.transition 2037, 10, :o2, 2140009200 - tz.transition 2038, 3, :o3, 19724081, 8 - tz.transition 2038, 10, :o2, 19725817, 8 - tz.transition 2039, 3, :o3, 19726993, 8 - tz.transition 2039, 10, :o2, 19728729, 8 - tz.transition 2040, 3, :o3, 19729905, 8 - tz.transition 2040, 10, :o2, 19731641, 8 - tz.transition 2041, 3, :o3, 19732873, 8 - tz.transition 2041, 10, :o2, 19734553, 8 - tz.transition 2042, 3, :o3, 19735785, 8 - tz.transition 2042, 10, :o2, 19737465, 8 - tz.transition 2043, 3, :o3, 19738697, 8 - tz.transition 2043, 10, :o2, 19740377, 8 - tz.transition 2044, 3, :o3, 19741609, 8 - tz.transition 2044, 10, :o2, 19743345, 8 - tz.transition 2045, 3, :o3, 19744521, 8 - tz.transition 2045, 10, :o2, 19746257, 8 - tz.transition 2046, 3, :o3, 19747433, 8 - tz.transition 2046, 10, :o2, 19749169, 8 - tz.transition 2047, 3, :o3, 19750401, 8 - tz.transition 2047, 10, :o2, 19752081, 8 - tz.transition 2048, 3, :o3, 19753313, 8 - tz.transition 2048, 10, :o2, 19754993, 8 - tz.transition 2049, 3, :o3, 19756225, 8 - tz.transition 2049, 10, :o2, 19757961, 8 - tz.transition 2050, 3, :o3, 19759137, 8 - tz.transition 2050, 10, :o2, 19760873, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb deleted file mode 100644 index 604f651df..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Muscat.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Muscat - include TimezoneDefinition - - timezone 'Asia/Muscat' do |tz| - tz.offset :o0, 14060, 0, :LMT - tz.offset :o1, 14400, 0, :GST - - tz.transition 1919, 12, :o1, 10464441137, 4320 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb deleted file mode 100644 index a4e7796e7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Novosibirsk.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Novosibirsk - include TimezoneDefinition - - timezone 'Asia/Novosibirsk' do |tz| - tz.offset :o0, 19900, 0, :LMT - tz.offset :o1, 21600, 0, :NOVT - tz.offset :o2, 25200, 0, :NOVT - tz.offset :o3, 25200, 3600, :NOVST - tz.offset :o4, 21600, 3600, :NOVST - - tz.transition 1919, 12, :o1, 2092872833, 864 - tz.transition 1930, 6, :o2, 9704593, 4 - tz.transition 1981, 3, :o3, 354906000 - tz.transition 1981, 9, :o2, 370713600 - tz.transition 1982, 3, :o3, 386442000 - tz.transition 1982, 9, :o2, 402249600 - tz.transition 1983, 3, :o3, 417978000 - tz.transition 1983, 9, :o2, 433785600 - tz.transition 1984, 3, :o3, 449600400 - tz.transition 1984, 9, :o2, 465332400 - tz.transition 1985, 3, :o3, 481057200 - tz.transition 1985, 9, :o2, 496782000 - tz.transition 1986, 3, :o3, 512506800 - tz.transition 1986, 9, :o2, 528231600 - tz.transition 1987, 3, :o3, 543956400 - tz.transition 1987, 9, :o2, 559681200 - tz.transition 1988, 3, :o3, 575406000 - tz.transition 1988, 9, :o2, 591130800 - tz.transition 1989, 3, :o3, 606855600 - tz.transition 1989, 9, :o2, 622580400 - tz.transition 1990, 3, :o3, 638305200 - tz.transition 1990, 9, :o2, 654634800 - tz.transition 1991, 3, :o4, 670359600 - tz.transition 1991, 9, :o1, 686088000 - tz.transition 1992, 1, :o2, 695764800 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733258800 - tz.transition 1993, 5, :o4, 738086400 - tz.transition 1993, 9, :o1, 748987200 - tz.transition 1994, 3, :o4, 764712000 - tz.transition 1994, 9, :o1, 780436800 - tz.transition 1995, 3, :o4, 796161600 - tz.transition 1995, 9, :o1, 811886400 - tz.transition 1996, 3, :o4, 828216000 - tz.transition 1996, 10, :o1, 846360000 - tz.transition 1997, 3, :o4, 859665600 - tz.transition 1997, 10, :o1, 877809600 - tz.transition 1998, 3, :o4, 891115200 - tz.transition 1998, 10, :o1, 909259200 - tz.transition 1999, 3, :o4, 922564800 - tz.transition 1999, 10, :o1, 941313600 - tz.transition 2000, 3, :o4, 954014400 - tz.transition 2000, 10, :o1, 972763200 - tz.transition 2001, 3, :o4, 985464000 - tz.transition 2001, 10, :o1, 1004212800 - tz.transition 2002, 3, :o4, 1017518400 - tz.transition 2002, 10, :o1, 1035662400 - tz.transition 2003, 3, :o4, 1048968000 - tz.transition 2003, 10, :o1, 1067112000 - tz.transition 2004, 3, :o4, 1080417600 - tz.transition 2004, 10, :o1, 1099166400 - tz.transition 2005, 3, :o4, 1111867200 - tz.transition 2005, 10, :o1, 1130616000 - tz.transition 2006, 3, :o4, 1143316800 - tz.transition 2006, 10, :o1, 1162065600 - tz.transition 2007, 3, :o4, 1174766400 - tz.transition 2007, 10, :o1, 1193515200 - tz.transition 2008, 3, :o4, 1206820800 - tz.transition 2008, 10, :o1, 1224964800 - tz.transition 2009, 3, :o4, 1238270400 - tz.transition 2009, 10, :o1, 1256414400 - tz.transition 2010, 3, :o4, 1269720000 - tz.transition 2010, 10, :o1, 1288468800 - tz.transition 2011, 3, :o4, 1301169600 - tz.transition 2011, 10, :o1, 1319918400 - tz.transition 2012, 3, :o4, 1332619200 - tz.transition 2012, 10, :o1, 1351368000 - tz.transition 2013, 3, :o4, 1364673600 - tz.transition 2013, 10, :o1, 1382817600 - tz.transition 2014, 3, :o4, 1396123200 - tz.transition 2014, 10, :o1, 1414267200 - tz.transition 2015, 3, :o4, 1427572800 - tz.transition 2015, 10, :o1, 1445716800 - tz.transition 2016, 3, :o4, 1459022400 - tz.transition 2016, 10, :o1, 1477771200 - tz.transition 2017, 3, :o4, 1490472000 - tz.transition 2017, 10, :o1, 1509220800 - tz.transition 2018, 3, :o4, 1521921600 - tz.transition 2018, 10, :o1, 1540670400 - tz.transition 2019, 3, :o4, 1553976000 - tz.transition 2019, 10, :o1, 1572120000 - tz.transition 2020, 3, :o4, 1585425600 - tz.transition 2020, 10, :o1, 1603569600 - tz.transition 2021, 3, :o4, 1616875200 - tz.transition 2021, 10, :o1, 1635624000 - tz.transition 2022, 3, :o4, 1648324800 - tz.transition 2022, 10, :o1, 1667073600 - tz.transition 2023, 3, :o4, 1679774400 - tz.transition 2023, 10, :o1, 1698523200 - tz.transition 2024, 3, :o4, 1711828800 - tz.transition 2024, 10, :o1, 1729972800 - tz.transition 2025, 3, :o4, 1743278400 - tz.transition 2025, 10, :o1, 1761422400 - tz.transition 2026, 3, :o4, 1774728000 - tz.transition 2026, 10, :o1, 1792872000 - tz.transition 2027, 3, :o4, 1806177600 - tz.transition 2027, 10, :o1, 1824926400 - tz.transition 2028, 3, :o4, 1837627200 - tz.transition 2028, 10, :o1, 1856376000 - tz.transition 2029, 3, :o4, 1869076800 - tz.transition 2029, 10, :o1, 1887825600 - tz.transition 2030, 3, :o4, 1901131200 - tz.transition 2030, 10, :o1, 1919275200 - tz.transition 2031, 3, :o4, 1932580800 - tz.transition 2031, 10, :o1, 1950724800 - tz.transition 2032, 3, :o4, 1964030400 - tz.transition 2032, 10, :o1, 1982779200 - tz.transition 2033, 3, :o4, 1995480000 - tz.transition 2033, 10, :o1, 2014228800 - tz.transition 2034, 3, :o4, 2026929600 - tz.transition 2034, 10, :o1, 2045678400 - tz.transition 2035, 3, :o4, 2058379200 - tz.transition 2035, 10, :o1, 2077128000 - tz.transition 2036, 3, :o4, 2090433600 - tz.transition 2036, 10, :o1, 2108577600 - tz.transition 2037, 3, :o4, 2121883200 - tz.transition 2037, 10, :o1, 2140027200 - tz.transition 2038, 3, :o4, 7396531, 3 - tz.transition 2038, 10, :o1, 7397182, 3 - tz.transition 2039, 3, :o4, 7397623, 3 - tz.transition 2039, 10, :o1, 7398274, 3 - tz.transition 2040, 3, :o4, 7398715, 3 - tz.transition 2040, 10, :o1, 7399366, 3 - tz.transition 2041, 3, :o4, 7399828, 3 - tz.transition 2041, 10, :o1, 7400458, 3 - tz.transition 2042, 3, :o4, 7400920, 3 - tz.transition 2042, 10, :o1, 7401550, 3 - tz.transition 2043, 3, :o4, 7402012, 3 - tz.transition 2043, 10, :o1, 7402642, 3 - tz.transition 2044, 3, :o4, 7403104, 3 - tz.transition 2044, 10, :o1, 7403755, 3 - tz.transition 2045, 3, :o4, 7404196, 3 - tz.transition 2045, 10, :o1, 7404847, 3 - tz.transition 2046, 3, :o4, 7405288, 3 - tz.transition 2046, 10, :o1, 7405939, 3 - tz.transition 2047, 3, :o4, 7406401, 3 - tz.transition 2047, 10, :o1, 7407031, 3 - tz.transition 2048, 3, :o4, 7407493, 3 - tz.transition 2048, 10, :o1, 7408123, 3 - tz.transition 2049, 3, :o4, 7408585, 3 - tz.transition 2049, 10, :o1, 7409236, 3 - tz.transition 2050, 3, :o4, 7409677, 3 - tz.transition 2050, 10, :o1, 7410328, 3 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb deleted file mode 100644 index 759b82d77..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Rangoon.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Rangoon - include TimezoneDefinition - - timezone 'Asia/Rangoon' do |tz| - tz.offset :o0, 23080, 0, :LMT - tz.offset :o1, 23076, 0, :RMT - tz.offset :o2, 23400, 0, :BURT - tz.offset :o3, 32400, 0, :JST - tz.offset :o4, 23400, 0, :MMT - - tz.transition 1879, 12, :o1, 5200664903, 2160 - tz.transition 1919, 12, :o2, 5813578159, 2400 - tz.transition 1942, 4, :o3, 116663051, 48 - tz.transition 1945, 5, :o4, 19452625, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb deleted file mode 100644 index 7add41062..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Riyadh.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Riyadh - include TimezoneDefinition - - timezone 'Asia/Riyadh' do |tz| - tz.offset :o0, 11212, 0, :LMT - tz.offset :o1, 10800, 0, :AST - - tz.transition 1949, 12, :o1, 52558899197, 21600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb deleted file mode 100644 index 795d2a75d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Seoul.rb +++ /dev/null @@ -1,34 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Seoul - include TimezoneDefinition - - timezone 'Asia/Seoul' do |tz| - tz.offset :o0, 30472, 0, :LMT - tz.offset :o1, 30600, 0, :KST - tz.offset :o2, 32400, 0, :KST - tz.offset :o3, 28800, 0, :KST - tz.offset :o4, 28800, 3600, :KDT - tz.offset :o5, 32400, 3600, :KDT - - tz.transition 1889, 12, :o1, 26042775991, 10800 - tz.transition 1904, 11, :o2, 116007127, 48 - tz.transition 1927, 12, :o1, 19401969, 8 - tz.transition 1931, 12, :o2, 116481943, 48 - tz.transition 1954, 3, :o3, 19478577, 8 - tz.transition 1960, 5, :o4, 14622415, 6 - tz.transition 1960, 9, :o3, 19497521, 8 - tz.transition 1961, 8, :o1, 14625127, 6 - tz.transition 1968, 9, :o2, 117126247, 48 - tz.transition 1987, 5, :o5, 547570800 - tz.transition 1987, 10, :o2, 560872800 - tz.transition 1988, 5, :o5, 579020400 - tz.transition 1988, 10, :o2, 592322400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb deleted file mode 100644 index 34b13d59a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Shanghai.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Shanghai - include TimezoneDefinition - - timezone 'Asia/Shanghai' do |tz| - tz.offset :o0, 29152, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 6548164639, 2700 - tz.transition 1940, 6, :o2, 14578699, 6 - tz.transition 1940, 9, :o1, 19439225, 8 - tz.transition 1941, 3, :o2, 14580415, 6 - tz.transition 1941, 9, :o1, 19442145, 8 - tz.transition 1986, 5, :o2, 515520000 - tz.transition 1986, 9, :o1, 527007600 - tz.transition 1987, 4, :o2, 545155200 - tz.transition 1987, 9, :o1, 558457200 - tz.transition 1988, 4, :o2, 576604800 - tz.transition 1988, 9, :o1, 589906800 - tz.transition 1989, 4, :o2, 608659200 - tz.transition 1989, 9, :o1, 621961200 - tz.transition 1990, 4, :o2, 640108800 - tz.transition 1990, 9, :o1, 653410800 - tz.transition 1991, 4, :o2, 671558400 - tz.transition 1991, 9, :o1, 684860400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb deleted file mode 100644 index b323a78f7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Singapore.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Singapore - include TimezoneDefinition - - timezone 'Asia/Singapore' do |tz| - tz.offset :o0, 24925, 0, :LMT - tz.offset :o1, 24925, 0, :SMT - tz.offset :o2, 25200, 0, :MALT - tz.offset :o3, 25200, 1200, :MALST - tz.offset :o4, 26400, 0, :MALT - tz.offset :o5, 27000, 0, :MALT - tz.offset :o6, 32400, 0, :JST - tz.offset :o7, 27000, 0, :SGT - tz.offset :o8, 28800, 0, :SGT - - tz.transition 1900, 12, :o1, 8347571291, 3456 - tz.transition 1905, 5, :o2, 8353142363, 3456 - tz.transition 1932, 12, :o3, 58249757, 24 - tz.transition 1935, 12, :o4, 87414055, 36 - tz.transition 1941, 8, :o5, 87488575, 36 - tz.transition 1942, 2, :o6, 38886499, 16 - tz.transition 1945, 9, :o5, 19453681, 8 - tz.transition 1965, 8, :o7, 39023699, 16 - tz.transition 1981, 12, :o8, 378664200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb deleted file mode 100644 index 3ba12108f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Taipei.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Taipei - include TimezoneDefinition - - timezone 'Asia/Taipei' do |tz| - tz.offset :o0, 29160, 0, :LMT - tz.offset :o1, 28800, 0, :CST - tz.offset :o2, 28800, 3600, :CDT - - tz.transition 1895, 12, :o1, 193084733, 80 - tz.transition 1945, 4, :o2, 14589457, 6 - tz.transition 1945, 9, :o1, 19453833, 8 - tz.transition 1946, 4, :o2, 14591647, 6 - tz.transition 1946, 9, :o1, 19456753, 8 - tz.transition 1947, 4, :o2, 14593837, 6 - tz.transition 1947, 9, :o1, 19459673, 8 - tz.transition 1948, 4, :o2, 14596033, 6 - tz.transition 1948, 9, :o1, 19462601, 8 - tz.transition 1949, 4, :o2, 14598223, 6 - tz.transition 1949, 9, :o1, 19465521, 8 - tz.transition 1950, 4, :o2, 14600413, 6 - tz.transition 1950, 9, :o1, 19468441, 8 - tz.transition 1951, 4, :o2, 14602603, 6 - tz.transition 1951, 9, :o1, 19471361, 8 - tz.transition 1952, 2, :o2, 14604433, 6 - tz.transition 1952, 10, :o1, 19474537, 8 - tz.transition 1953, 3, :o2, 14606809, 6 - tz.transition 1953, 10, :o1, 19477457, 8 - tz.transition 1954, 3, :o2, 14608999, 6 - tz.transition 1954, 10, :o1, 19480377, 8 - tz.transition 1955, 3, :o2, 14611189, 6 - tz.transition 1955, 9, :o1, 19483049, 8 - tz.transition 1956, 3, :o2, 14613385, 6 - tz.transition 1956, 9, :o1, 19485977, 8 - tz.transition 1957, 3, :o2, 14615575, 6 - tz.transition 1957, 9, :o1, 19488897, 8 - tz.transition 1958, 3, :o2, 14617765, 6 - tz.transition 1958, 9, :o1, 19491817, 8 - tz.transition 1959, 3, :o2, 14619955, 6 - tz.transition 1959, 9, :o1, 19494737, 8 - tz.transition 1960, 5, :o2, 14622517, 6 - tz.transition 1960, 9, :o1, 19497665, 8 - tz.transition 1961, 5, :o2, 14624707, 6 - tz.transition 1961, 9, :o1, 19500585, 8 - tz.transition 1974, 3, :o2, 133977600 - tz.transition 1974, 9, :o1, 149785200 - tz.transition 1975, 3, :o2, 165513600 - tz.transition 1975, 9, :o1, 181321200 - tz.transition 1980, 6, :o2, 331142400 - tz.transition 1980, 9, :o1, 339087600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb deleted file mode 100644 index c205c7934..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tashkent.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tashkent - include TimezoneDefinition - - timezone 'Asia/Tashkent' do |tz| - tz.offset :o0, 16632, 0, :LMT - tz.offset :o1, 18000, 0, :TAST - tz.offset :o2, 21600, 0, :TAST - tz.offset :o3, 21600, 3600, :TASST - tz.offset :o4, 18000, 3600, :TASST - tz.offset :o5, 18000, 3600, :UZST - tz.offset :o6, 18000, 0, :UZT - - tz.transition 1924, 5, :o1, 969562923, 400 - tz.transition 1930, 6, :o2, 58227559, 24 - tz.transition 1981, 3, :o3, 354909600 - tz.transition 1981, 9, :o2, 370717200 - tz.transition 1982, 3, :o3, 386445600 - tz.transition 1982, 9, :o2, 402253200 - tz.transition 1983, 3, :o3, 417981600 - tz.transition 1983, 9, :o2, 433789200 - tz.transition 1984, 3, :o3, 449604000 - tz.transition 1984, 9, :o2, 465336000 - tz.transition 1985, 3, :o3, 481060800 - tz.transition 1985, 9, :o2, 496785600 - tz.transition 1986, 3, :o3, 512510400 - tz.transition 1986, 9, :o2, 528235200 - tz.transition 1987, 3, :o3, 543960000 - tz.transition 1987, 9, :o2, 559684800 - tz.transition 1988, 3, :o3, 575409600 - tz.transition 1988, 9, :o2, 591134400 - tz.transition 1989, 3, :o3, 606859200 - tz.transition 1989, 9, :o2, 622584000 - tz.transition 1990, 3, :o3, 638308800 - tz.transition 1990, 9, :o2, 654638400 - tz.transition 1991, 3, :o4, 670363200 - tz.transition 1991, 8, :o5, 683661600 - tz.transition 1991, 9, :o6, 686091600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb deleted file mode 100644 index 15792a565..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tbilisi.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tbilisi - include TimezoneDefinition - - timezone 'Asia/Tbilisi' do |tz| - tz.offset :o0, 10756, 0, :LMT - tz.offset :o1, 10756, 0, :TBMT - tz.offset :o2, 10800, 0, :TBIT - tz.offset :o3, 14400, 0, :TBIT - tz.offset :o4, 14400, 3600, :TBIST - tz.offset :o5, 10800, 3600, :TBIST - tz.offset :o6, 10800, 3600, :GEST - tz.offset :o7, 10800, 0, :GET - tz.offset :o8, 14400, 0, :GET - tz.offset :o9, 14400, 3600, :GEST - - tz.transition 1879, 12, :o1, 52006652111, 21600 - tz.transition 1924, 5, :o2, 52356399311, 21600 - tz.transition 1957, 2, :o3, 19487187, 8 - tz.transition 1981, 3, :o4, 354916800 - tz.transition 1981, 9, :o3, 370724400 - tz.transition 1982, 3, :o4, 386452800 - tz.transition 1982, 9, :o3, 402260400 - tz.transition 1983, 3, :o4, 417988800 - tz.transition 1983, 9, :o3, 433796400 - tz.transition 1984, 3, :o4, 449611200 - tz.transition 1984, 9, :o3, 465343200 - tz.transition 1985, 3, :o4, 481068000 - tz.transition 1985, 9, :o3, 496792800 - tz.transition 1986, 3, :o4, 512517600 - tz.transition 1986, 9, :o3, 528242400 - tz.transition 1987, 3, :o4, 543967200 - tz.transition 1987, 9, :o3, 559692000 - tz.transition 1988, 3, :o4, 575416800 - tz.transition 1988, 9, :o3, 591141600 - tz.transition 1989, 3, :o4, 606866400 - tz.transition 1989, 9, :o3, 622591200 - tz.transition 1990, 3, :o4, 638316000 - tz.transition 1990, 9, :o3, 654645600 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 4, :o6, 671140800 - tz.transition 1991, 9, :o7, 686098800 - tz.transition 1992, 3, :o6, 701816400 - tz.transition 1992, 9, :o7, 717537600 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o7, 748987200 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o8, 780436800 - tz.transition 1995, 3, :o9, 796161600 - tz.transition 1995, 9, :o8, 811882800 - tz.transition 1996, 3, :o9, 828216000 - tz.transition 1997, 3, :o9, 859662000 - tz.transition 1997, 10, :o8, 877806000 - tz.transition 1998, 3, :o9, 891115200 - tz.transition 1998, 10, :o8, 909255600 - tz.transition 1999, 3, :o9, 922564800 - tz.transition 1999, 10, :o8, 941310000 - tz.transition 2000, 3, :o9, 954014400 - tz.transition 2000, 10, :o8, 972759600 - tz.transition 2001, 3, :o9, 985464000 - tz.transition 2001, 10, :o8, 1004209200 - tz.transition 2002, 3, :o9, 1017518400 - tz.transition 2002, 10, :o8, 1035658800 - tz.transition 2003, 3, :o9, 1048968000 - tz.transition 2003, 10, :o8, 1067108400 - tz.transition 2004, 3, :o9, 1080417600 - tz.transition 2004, 6, :o6, 1088276400 - tz.transition 2004, 10, :o7, 1099177200 - tz.transition 2005, 3, :o8, 1111878000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb deleted file mode 100644 index d8df964a4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tehran.rb +++ /dev/null @@ -1,121 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tehran - include TimezoneDefinition - - timezone 'Asia/Tehran' do |tz| - tz.offset :o0, 12344, 0, :LMT - tz.offset :o1, 12344, 0, :TMT - tz.offset :o2, 12600, 0, :IRST - tz.offset :o3, 14400, 0, :IRST - tz.offset :o4, 14400, 3600, :IRDT - tz.offset :o5, 12600, 3600, :IRDT - - tz.transition 1915, 12, :o1, 26145324257, 10800 - tz.transition 1945, 12, :o2, 26263670657, 10800 - tz.transition 1977, 10, :o3, 247177800 - tz.transition 1978, 3, :o4, 259272000 - tz.transition 1978, 10, :o3, 277758000 - tz.transition 1978, 12, :o2, 283982400 - tz.transition 1979, 3, :o5, 290809800 - tz.transition 1979, 9, :o2, 306531000 - tz.transition 1980, 3, :o5, 322432200 - tz.transition 1980, 9, :o2, 338499000 - tz.transition 1991, 5, :o5, 673216200 - tz.transition 1991, 9, :o2, 685481400 - tz.transition 1992, 3, :o5, 701209800 - tz.transition 1992, 9, :o2, 717103800 - tz.transition 1993, 3, :o5, 732745800 - tz.transition 1993, 9, :o2, 748639800 - tz.transition 1994, 3, :o5, 764281800 - tz.transition 1994, 9, :o2, 780175800 - tz.transition 1995, 3, :o5, 795817800 - tz.transition 1995, 9, :o2, 811711800 - tz.transition 1996, 3, :o5, 827353800 - tz.transition 1996, 9, :o2, 843247800 - tz.transition 1997, 3, :o5, 858976200 - tz.transition 1997, 9, :o2, 874870200 - tz.transition 1998, 3, :o5, 890512200 - tz.transition 1998, 9, :o2, 906406200 - tz.transition 1999, 3, :o5, 922048200 - tz.transition 1999, 9, :o2, 937942200 - tz.transition 2000, 3, :o5, 953584200 - tz.transition 2000, 9, :o2, 969478200 - tz.transition 2001, 3, :o5, 985206600 - tz.transition 2001, 9, :o2, 1001100600 - tz.transition 2002, 3, :o5, 1016742600 - tz.transition 2002, 9, :o2, 1032636600 - tz.transition 2003, 3, :o5, 1048278600 - tz.transition 2003, 9, :o2, 1064172600 - tz.transition 2004, 3, :o5, 1079814600 - tz.transition 2004, 9, :o2, 1095708600 - tz.transition 2005, 3, :o5, 1111437000 - tz.transition 2005, 9, :o2, 1127331000 - tz.transition 2008, 3, :o5, 1206045000 - tz.transition 2008, 9, :o2, 1221939000 - tz.transition 2009, 3, :o5, 1237667400 - tz.transition 2009, 9, :o2, 1253561400 - tz.transition 2010, 3, :o5, 1269203400 - tz.transition 2010, 9, :o2, 1285097400 - tz.transition 2011, 3, :o5, 1300739400 - tz.transition 2011, 9, :o2, 1316633400 - tz.transition 2012, 3, :o5, 1332275400 - tz.transition 2012, 9, :o2, 1348169400 - tz.transition 2013, 3, :o5, 1363897800 - tz.transition 2013, 9, :o2, 1379791800 - tz.transition 2014, 3, :o5, 1395433800 - tz.transition 2014, 9, :o2, 1411327800 - tz.transition 2015, 3, :o5, 1426969800 - tz.transition 2015, 9, :o2, 1442863800 - tz.transition 2016, 3, :o5, 1458505800 - tz.transition 2016, 9, :o2, 1474399800 - tz.transition 2017, 3, :o5, 1490128200 - tz.transition 2017, 9, :o2, 1506022200 - tz.transition 2018, 3, :o5, 1521664200 - tz.transition 2018, 9, :o2, 1537558200 - tz.transition 2019, 3, :o5, 1553200200 - tz.transition 2019, 9, :o2, 1569094200 - tz.transition 2020, 3, :o5, 1584736200 - tz.transition 2020, 9, :o2, 1600630200 - tz.transition 2021, 3, :o5, 1616358600 - tz.transition 2021, 9, :o2, 1632252600 - tz.transition 2022, 3, :o5, 1647894600 - tz.transition 2022, 9, :o2, 1663788600 - tz.transition 2023, 3, :o5, 1679430600 - tz.transition 2023, 9, :o2, 1695324600 - tz.transition 2024, 3, :o5, 1710966600 - tz.transition 2024, 9, :o2, 1726860600 - tz.transition 2025, 3, :o5, 1742589000 - tz.transition 2025, 9, :o2, 1758483000 - tz.transition 2026, 3, :o5, 1774125000 - tz.transition 2026, 9, :o2, 1790019000 - tz.transition 2027, 3, :o5, 1805661000 - tz.transition 2027, 9, :o2, 1821555000 - tz.transition 2028, 3, :o5, 1837197000 - tz.transition 2028, 9, :o2, 1853091000 - tz.transition 2029, 3, :o5, 1868733000 - tz.transition 2029, 9, :o2, 1884627000 - tz.transition 2030, 3, :o5, 1900355400 - tz.transition 2030, 9, :o2, 1916249400 - tz.transition 2031, 3, :o5, 1931891400 - tz.transition 2031, 9, :o2, 1947785400 - tz.transition 2032, 3, :o5, 1963427400 - tz.transition 2032, 9, :o2, 1979321400 - tz.transition 2033, 3, :o5, 1994963400 - tz.transition 2033, 9, :o2, 2010857400 - tz.transition 2034, 3, :o5, 2026585800 - tz.transition 2034, 9, :o2, 2042479800 - tz.transition 2035, 3, :o5, 2058121800 - tz.transition 2035, 9, :o2, 2074015800 - tz.transition 2036, 3, :o5, 2089657800 - tz.transition 2036, 9, :o2, 2105551800 - tz.transition 2037, 3, :o5, 2121193800 - tz.transition 2037, 9, :o2, 2137087800 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb deleted file mode 100644 index 51c9e1642..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Tokyo.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Tokyo - include TimezoneDefinition - - timezone 'Asia/Tokyo' do |tz| - tz.offset :o0, 33539, 0, :LMT - tz.offset :o1, 32400, 0, :JST - tz.offset :o2, 32400, 0, :CJT - tz.offset :o3, 32400, 3600, :JDT - - tz.transition 1887, 12, :o1, 19285097, 8 - tz.transition 1895, 12, :o2, 19308473, 8 - tz.transition 1937, 12, :o1, 19431193, 8 - tz.transition 1948, 5, :o3, 58384157, 24 - tz.transition 1948, 9, :o1, 14596831, 6 - tz.transition 1949, 4, :o3, 58392221, 24 - tz.transition 1949, 9, :o1, 14599015, 6 - tz.transition 1950, 5, :o3, 58401797, 24 - tz.transition 1950, 9, :o1, 14601199, 6 - tz.transition 1951, 5, :o3, 58410533, 24 - tz.transition 1951, 9, :o1, 14603383, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb deleted file mode 100644 index 2854f5c5f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Ulaanbaatar.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Ulaanbaatar - include TimezoneDefinition - - timezone 'Asia/Ulaanbaatar' do |tz| - tz.offset :o0, 25652, 0, :LMT - tz.offset :o1, 25200, 0, :ULAT - tz.offset :o2, 28800, 0, :ULAT - tz.offset :o3, 28800, 3600, :ULAST - - tz.transition 1905, 7, :o1, 52208457187, 21600 - tz.transition 1977, 12, :o2, 252435600 - tz.transition 1983, 3, :o3, 417974400 - tz.transition 1983, 9, :o2, 433782000 - tz.transition 1984, 3, :o3, 449596800 - tz.transition 1984, 9, :o2, 465318000 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496767600 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528217200 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559666800 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591116400 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622566000 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654620400 - tz.transition 1991, 3, :o3, 670348800 - tz.transition 1991, 9, :o2, 686070000 - tz.transition 1992, 3, :o3, 701798400 - tz.transition 1992, 9, :o2, 717519600 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748969200 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780418800 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811868400 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 9, :o2, 843922800 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 9, :o2, 875372400 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 9, :o2, 906822000 - tz.transition 2001, 4, :o3, 988394400 - tz.transition 2001, 9, :o2, 1001696400 - tz.transition 2002, 3, :o3, 1017424800 - tz.transition 2002, 9, :o2, 1033146000 - tz.transition 2003, 3, :o3, 1048874400 - tz.transition 2003, 9, :o2, 1064595600 - tz.transition 2004, 3, :o3, 1080324000 - tz.transition 2004, 9, :o2, 1096045200 - tz.transition 2005, 3, :o3, 1111773600 - tz.transition 2005, 9, :o2, 1127494800 - tz.transition 2006, 3, :o3, 1143223200 - tz.transition 2006, 9, :o2, 1159549200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb deleted file mode 100644 index d793ff134..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Urumqi.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Urumqi - include TimezoneDefinition - - timezone 'Asia/Urumqi' do |tz| - tz.offset :o0, 21020, 0, :LMT - tz.offset :o1, 21600, 0, :URUT - tz.offset :o2, 28800, 0, :CST - tz.offset :o3, 28800, 3600, :CDT - - tz.transition 1927, 12, :o1, 10477063829, 4320 - tz.transition 1980, 4, :o2, 325965600 - tz.transition 1986, 5, :o3, 515520000 - tz.transition 1986, 9, :o2, 527007600 - tz.transition 1987, 4, :o3, 545155200 - tz.transition 1987, 9, :o2, 558457200 - tz.transition 1988, 4, :o3, 576604800 - tz.transition 1988, 9, :o2, 589906800 - tz.transition 1989, 4, :o3, 608659200 - tz.transition 1989, 9, :o2, 621961200 - tz.transition 1990, 4, :o3, 640108800 - tz.transition 1990, 9, :o2, 653410800 - tz.transition 1991, 4, :o3, 671558400 - tz.transition 1991, 9, :o2, 684860400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb deleted file mode 100644 index bd9e3d60e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Vladivostok.rb +++ /dev/null @@ -1,164 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Vladivostok - include TimezoneDefinition - - timezone 'Asia/Vladivostok' do |tz| - tz.offset :o0, 31664, 0, :LMT - tz.offset :o1, 32400, 0, :VLAT - tz.offset :o2, 36000, 0, :VLAT - tz.offset :o3, 36000, 3600, :VLAST - tz.offset :o4, 32400, 3600, :VLASST - tz.offset :o5, 32400, 0, :VLAST - - tz.transition 1922, 11, :o1, 13086214921, 5400 - tz.transition 1930, 6, :o2, 19409185, 8 - tz.transition 1981, 3, :o3, 354895200 - tz.transition 1981, 9, :o2, 370702800 - tz.transition 1982, 3, :o3, 386431200 - tz.transition 1982, 9, :o2, 402238800 - tz.transition 1983, 3, :o3, 417967200 - tz.transition 1983, 9, :o2, 433774800 - tz.transition 1984, 3, :o3, 449589600 - tz.transition 1984, 9, :o2, 465321600 - tz.transition 1985, 3, :o3, 481046400 - tz.transition 1985, 9, :o2, 496771200 - tz.transition 1986, 3, :o3, 512496000 - tz.transition 1986, 9, :o2, 528220800 - tz.transition 1987, 3, :o3, 543945600 - tz.transition 1987, 9, :o2, 559670400 - tz.transition 1988, 3, :o3, 575395200 - tz.transition 1988, 9, :o2, 591120000 - tz.transition 1989, 3, :o3, 606844800 - tz.transition 1989, 9, :o2, 622569600 - tz.transition 1990, 3, :o3, 638294400 - tz.transition 1990, 9, :o2, 654624000 - tz.transition 1991, 3, :o4, 670348800 - tz.transition 1991, 9, :o5, 686077200 - tz.transition 1992, 1, :o2, 695754000 - tz.transition 1992, 3, :o3, 701787600 - tz.transition 1992, 9, :o2, 717508800 - tz.transition 1993, 3, :o3, 733248000 - tz.transition 1993, 9, :o2, 748972800 - tz.transition 1994, 3, :o3, 764697600 - tz.transition 1994, 9, :o2, 780422400 - tz.transition 1995, 3, :o3, 796147200 - tz.transition 1995, 9, :o2, 811872000 - tz.transition 1996, 3, :o3, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o3, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o3, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o3, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o3, 954000000 - tz.transition 2000, 10, :o2, 972748800 - tz.transition 2001, 3, :o3, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o3, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o3, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o3, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o3, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 3, :o3, 1143302400 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o3, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 3, :o3, 1206806400 - tz.transition 2008, 10, :o2, 1224950400 - tz.transition 2009, 3, :o3, 1238256000 - tz.transition 2009, 10, :o2, 1256400000 - tz.transition 2010, 3, :o3, 1269705600 - tz.transition 2010, 10, :o2, 1288454400 - tz.transition 2011, 3, :o3, 1301155200 - tz.transition 2011, 10, :o2, 1319904000 - tz.transition 2012, 3, :o3, 1332604800 - tz.transition 2012, 10, :o2, 1351353600 - tz.transition 2013, 3, :o3, 1364659200 - tz.transition 2013, 10, :o2, 1382803200 - tz.transition 2014, 3, :o3, 1396108800 - tz.transition 2014, 10, :o2, 1414252800 - tz.transition 2015, 3, :o3, 1427558400 - tz.transition 2015, 10, :o2, 1445702400 - tz.transition 2016, 3, :o3, 1459008000 - tz.transition 2016, 10, :o2, 1477756800 - tz.transition 2017, 3, :o3, 1490457600 - tz.transition 2017, 10, :o2, 1509206400 - tz.transition 2018, 3, :o3, 1521907200 - tz.transition 2018, 10, :o2, 1540656000 - tz.transition 2019, 3, :o3, 1553961600 - tz.transition 2019, 10, :o2, 1572105600 - tz.transition 2020, 3, :o3, 1585411200 - tz.transition 2020, 10, :o2, 1603555200 - tz.transition 2021, 3, :o3, 1616860800 - tz.transition 2021, 10, :o2, 1635609600 - tz.transition 2022, 3, :o3, 1648310400 - tz.transition 2022, 10, :o2, 1667059200 - tz.transition 2023, 3, :o3, 1679760000 - tz.transition 2023, 10, :o2, 1698508800 - tz.transition 2024, 3, :o3, 1711814400 - tz.transition 2024, 10, :o2, 1729958400 - tz.transition 2025, 3, :o3, 1743264000 - tz.transition 2025, 10, :o2, 1761408000 - tz.transition 2026, 3, :o3, 1774713600 - tz.transition 2026, 10, :o2, 1792857600 - tz.transition 2027, 3, :o3, 1806163200 - tz.transition 2027, 10, :o2, 1824912000 - tz.transition 2028, 3, :o3, 1837612800 - tz.transition 2028, 10, :o2, 1856361600 - tz.transition 2029, 3, :o3, 1869062400 - tz.transition 2029, 10, :o2, 1887811200 - tz.transition 2030, 3, :o3, 1901116800 - tz.transition 2030, 10, :o2, 1919260800 - tz.transition 2031, 3, :o3, 1932566400 - tz.transition 2031, 10, :o2, 1950710400 - tz.transition 2032, 3, :o3, 1964016000 - tz.transition 2032, 10, :o2, 1982764800 - tz.transition 2033, 3, :o3, 1995465600 - tz.transition 2033, 10, :o2, 2014214400 - tz.transition 2034, 3, :o3, 2026915200 - tz.transition 2034, 10, :o2, 2045664000 - tz.transition 2035, 3, :o3, 2058364800 - tz.transition 2035, 10, :o2, 2077113600 - tz.transition 2036, 3, :o3, 2090419200 - tz.transition 2036, 10, :o2, 2108563200 - tz.transition 2037, 3, :o3, 2121868800 - tz.transition 2037, 10, :o2, 2140012800 - tz.transition 2038, 3, :o3, 14793061, 6 - tz.transition 2038, 10, :o2, 14794363, 6 - tz.transition 2039, 3, :o3, 14795245, 6 - tz.transition 2039, 10, :o2, 14796547, 6 - tz.transition 2040, 3, :o3, 14797429, 6 - tz.transition 2040, 10, :o2, 14798731, 6 - tz.transition 2041, 3, :o3, 14799655, 6 - tz.transition 2041, 10, :o2, 14800915, 6 - tz.transition 2042, 3, :o3, 14801839, 6 - tz.transition 2042, 10, :o2, 14803099, 6 - tz.transition 2043, 3, :o3, 14804023, 6 - tz.transition 2043, 10, :o2, 14805283, 6 - tz.transition 2044, 3, :o3, 14806207, 6 - tz.transition 2044, 10, :o2, 14807509, 6 - tz.transition 2045, 3, :o3, 14808391, 6 - tz.transition 2045, 10, :o2, 14809693, 6 - tz.transition 2046, 3, :o3, 14810575, 6 - tz.transition 2046, 10, :o2, 14811877, 6 - tz.transition 2047, 3, :o3, 14812801, 6 - tz.transition 2047, 10, :o2, 14814061, 6 - tz.transition 2048, 3, :o3, 14814985, 6 - tz.transition 2048, 10, :o2, 14816245, 6 - tz.transition 2049, 3, :o3, 14817169, 6 - tz.transition 2049, 10, :o2, 14818471, 6 - tz.transition 2050, 3, :o3, 14819353, 6 - tz.transition 2050, 10, :o2, 14820655, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb deleted file mode 100644 index 56435a788..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yakutsk.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yakutsk - include TimezoneDefinition - - timezone 'Asia/Yakutsk' do |tz| - tz.offset :o0, 31120, 0, :LMT - tz.offset :o1, 28800, 0, :YAKT - tz.offset :o2, 32400, 0, :YAKT - tz.offset :o3, 32400, 3600, :YAKST - tz.offset :o4, 28800, 3600, :YAKST - - tz.transition 1919, 12, :o1, 2616091711, 1080 - tz.transition 1930, 6, :o2, 14556889, 6 - tz.transition 1981, 3, :o3, 354898800 - tz.transition 1981, 9, :o2, 370706400 - tz.transition 1982, 3, :o3, 386434800 - tz.transition 1982, 9, :o2, 402242400 - tz.transition 1983, 3, :o3, 417970800 - tz.transition 1983, 9, :o2, 433778400 - tz.transition 1984, 3, :o3, 449593200 - tz.transition 1984, 9, :o2, 465325200 - tz.transition 1985, 3, :o3, 481050000 - tz.transition 1985, 9, :o2, 496774800 - tz.transition 1986, 3, :o3, 512499600 - tz.transition 1986, 9, :o2, 528224400 - tz.transition 1987, 3, :o3, 543949200 - tz.transition 1987, 9, :o2, 559674000 - tz.transition 1988, 3, :o3, 575398800 - tz.transition 1988, 9, :o2, 591123600 - tz.transition 1989, 3, :o3, 606848400 - tz.transition 1989, 9, :o2, 622573200 - tz.transition 1990, 3, :o3, 638298000 - tz.transition 1990, 9, :o2, 654627600 - tz.transition 1991, 3, :o4, 670352400 - tz.transition 1991, 9, :o1, 686080800 - tz.transition 1992, 1, :o2, 695757600 - tz.transition 1992, 3, :o3, 701791200 - tz.transition 1992, 9, :o2, 717512400 - tz.transition 1993, 3, :o3, 733251600 - tz.transition 1993, 9, :o2, 748976400 - tz.transition 1994, 3, :o3, 764701200 - tz.transition 1994, 9, :o2, 780426000 - tz.transition 1995, 3, :o3, 796150800 - tz.transition 1995, 9, :o2, 811875600 - tz.transition 1996, 3, :o3, 828205200 - tz.transition 1996, 10, :o2, 846349200 - tz.transition 1997, 3, :o3, 859654800 - tz.transition 1997, 10, :o2, 877798800 - tz.transition 1998, 3, :o3, 891104400 - tz.transition 1998, 10, :o2, 909248400 - tz.transition 1999, 3, :o3, 922554000 - tz.transition 1999, 10, :o2, 941302800 - tz.transition 2000, 3, :o3, 954003600 - tz.transition 2000, 10, :o2, 972752400 - tz.transition 2001, 3, :o3, 985453200 - tz.transition 2001, 10, :o2, 1004202000 - tz.transition 2002, 3, :o3, 1017507600 - tz.transition 2002, 10, :o2, 1035651600 - tz.transition 2003, 3, :o3, 1048957200 - tz.transition 2003, 10, :o2, 1067101200 - tz.transition 2004, 3, :o3, 1080406800 - tz.transition 2004, 10, :o2, 1099155600 - tz.transition 2005, 3, :o3, 1111856400 - tz.transition 2005, 10, :o2, 1130605200 - tz.transition 2006, 3, :o3, 1143306000 - tz.transition 2006, 10, :o2, 1162054800 - tz.transition 2007, 3, :o3, 1174755600 - tz.transition 2007, 10, :o2, 1193504400 - tz.transition 2008, 3, :o3, 1206810000 - tz.transition 2008, 10, :o2, 1224954000 - tz.transition 2009, 3, :o3, 1238259600 - tz.transition 2009, 10, :o2, 1256403600 - tz.transition 2010, 3, :o3, 1269709200 - tz.transition 2010, 10, :o2, 1288458000 - tz.transition 2011, 3, :o3, 1301158800 - tz.transition 2011, 10, :o2, 1319907600 - tz.transition 2012, 3, :o3, 1332608400 - tz.transition 2012, 10, :o2, 1351357200 - tz.transition 2013, 3, :o3, 1364662800 - tz.transition 2013, 10, :o2, 1382806800 - tz.transition 2014, 3, :o3, 1396112400 - tz.transition 2014, 10, :o2, 1414256400 - tz.transition 2015, 3, :o3, 1427562000 - tz.transition 2015, 10, :o2, 1445706000 - tz.transition 2016, 3, :o3, 1459011600 - tz.transition 2016, 10, :o2, 1477760400 - tz.transition 2017, 3, :o3, 1490461200 - tz.transition 2017, 10, :o2, 1509210000 - tz.transition 2018, 3, :o3, 1521910800 - tz.transition 2018, 10, :o2, 1540659600 - tz.transition 2019, 3, :o3, 1553965200 - tz.transition 2019, 10, :o2, 1572109200 - tz.transition 2020, 3, :o3, 1585414800 - tz.transition 2020, 10, :o2, 1603558800 - tz.transition 2021, 3, :o3, 1616864400 - tz.transition 2021, 10, :o2, 1635613200 - tz.transition 2022, 3, :o3, 1648314000 - tz.transition 2022, 10, :o2, 1667062800 - tz.transition 2023, 3, :o3, 1679763600 - tz.transition 2023, 10, :o2, 1698512400 - tz.transition 2024, 3, :o3, 1711818000 - tz.transition 2024, 10, :o2, 1729962000 - tz.transition 2025, 3, :o3, 1743267600 - tz.transition 2025, 10, :o2, 1761411600 - tz.transition 2026, 3, :o3, 1774717200 - tz.transition 2026, 10, :o2, 1792861200 - tz.transition 2027, 3, :o3, 1806166800 - tz.transition 2027, 10, :o2, 1824915600 - tz.transition 2028, 3, :o3, 1837616400 - tz.transition 2028, 10, :o2, 1856365200 - tz.transition 2029, 3, :o3, 1869066000 - tz.transition 2029, 10, :o2, 1887814800 - tz.transition 2030, 3, :o3, 1901120400 - tz.transition 2030, 10, :o2, 1919264400 - tz.transition 2031, 3, :o3, 1932570000 - tz.transition 2031, 10, :o2, 1950714000 - tz.transition 2032, 3, :o3, 1964019600 - tz.transition 2032, 10, :o2, 1982768400 - tz.transition 2033, 3, :o3, 1995469200 - tz.transition 2033, 10, :o2, 2014218000 - tz.transition 2034, 3, :o3, 2026918800 - tz.transition 2034, 10, :o2, 2045667600 - tz.transition 2035, 3, :o3, 2058368400 - tz.transition 2035, 10, :o2, 2077117200 - tz.transition 2036, 3, :o3, 2090422800 - tz.transition 2036, 10, :o2, 2108566800 - tz.transition 2037, 3, :o3, 2121872400 - tz.transition 2037, 10, :o2, 2140016400 - tz.transition 2038, 3, :o3, 59172245, 24 - tz.transition 2038, 10, :o2, 59177453, 24 - tz.transition 2039, 3, :o3, 59180981, 24 - tz.transition 2039, 10, :o2, 59186189, 24 - tz.transition 2040, 3, :o3, 59189717, 24 - tz.transition 2040, 10, :o2, 59194925, 24 - tz.transition 2041, 3, :o3, 59198621, 24 - tz.transition 2041, 10, :o2, 59203661, 24 - tz.transition 2042, 3, :o3, 59207357, 24 - tz.transition 2042, 10, :o2, 59212397, 24 - tz.transition 2043, 3, :o3, 59216093, 24 - tz.transition 2043, 10, :o2, 59221133, 24 - tz.transition 2044, 3, :o3, 59224829, 24 - tz.transition 2044, 10, :o2, 59230037, 24 - tz.transition 2045, 3, :o3, 59233565, 24 - tz.transition 2045, 10, :o2, 59238773, 24 - tz.transition 2046, 3, :o3, 59242301, 24 - tz.transition 2046, 10, :o2, 59247509, 24 - tz.transition 2047, 3, :o3, 59251205, 24 - tz.transition 2047, 10, :o2, 59256245, 24 - tz.transition 2048, 3, :o3, 59259941, 24 - tz.transition 2048, 10, :o2, 59264981, 24 - tz.transition 2049, 3, :o3, 59268677, 24 - tz.transition 2049, 10, :o2, 59273885, 24 - tz.transition 2050, 3, :o3, 59277413, 24 - tz.transition 2050, 10, :o2, 59282621, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb deleted file mode 100644 index 8ef8df4a4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yekaterinburg.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yekaterinburg - include TimezoneDefinition - - timezone 'Asia/Yekaterinburg' do |tz| - tz.offset :o0, 14544, 0, :LMT - tz.offset :o1, 14400, 0, :SVET - tz.offset :o2, 18000, 0, :SVET - tz.offset :o3, 18000, 3600, :SVEST - tz.offset :o4, 14400, 3600, :SVEST - tz.offset :o5, 18000, 0, :YEKT - tz.offset :o6, 18000, 3600, :YEKST - - tz.transition 1919, 7, :o1, 1453292699, 600 - tz.transition 1930, 6, :o2, 7278445, 3 - tz.transition 1981, 3, :o3, 354913200 - tz.transition 1981, 9, :o2, 370720800 - tz.transition 1982, 3, :o3, 386449200 - tz.transition 1982, 9, :o2, 402256800 - tz.transition 1983, 3, :o3, 417985200 - tz.transition 1983, 9, :o2, 433792800 - tz.transition 1984, 3, :o3, 449607600 - tz.transition 1984, 9, :o2, 465339600 - tz.transition 1985, 3, :o3, 481064400 - tz.transition 1985, 9, :o2, 496789200 - tz.transition 1986, 3, :o3, 512514000 - tz.transition 1986, 9, :o2, 528238800 - tz.transition 1987, 3, :o3, 543963600 - tz.transition 1987, 9, :o2, 559688400 - tz.transition 1988, 3, :o3, 575413200 - tz.transition 1988, 9, :o2, 591138000 - tz.transition 1989, 3, :o3, 606862800 - tz.transition 1989, 9, :o2, 622587600 - tz.transition 1990, 3, :o3, 638312400 - tz.transition 1990, 9, :o2, 654642000 - tz.transition 1991, 3, :o4, 670366800 - tz.transition 1991, 9, :o1, 686095200 - tz.transition 1992, 1, :o5, 695772000 - tz.transition 1992, 3, :o6, 701805600 - tz.transition 1992, 9, :o5, 717526800 - tz.transition 1993, 3, :o6, 733266000 - tz.transition 1993, 9, :o5, 748990800 - tz.transition 1994, 3, :o6, 764715600 - tz.transition 1994, 9, :o5, 780440400 - tz.transition 1995, 3, :o6, 796165200 - tz.transition 1995, 9, :o5, 811890000 - tz.transition 1996, 3, :o6, 828219600 - tz.transition 1996, 10, :o5, 846363600 - tz.transition 1997, 3, :o6, 859669200 - tz.transition 1997, 10, :o5, 877813200 - tz.transition 1998, 3, :o6, 891118800 - tz.transition 1998, 10, :o5, 909262800 - tz.transition 1999, 3, :o6, 922568400 - tz.transition 1999, 10, :o5, 941317200 - tz.transition 2000, 3, :o6, 954018000 - tz.transition 2000, 10, :o5, 972766800 - tz.transition 2001, 3, :o6, 985467600 - tz.transition 2001, 10, :o5, 1004216400 - tz.transition 2002, 3, :o6, 1017522000 - tz.transition 2002, 10, :o5, 1035666000 - tz.transition 2003, 3, :o6, 1048971600 - tz.transition 2003, 10, :o5, 1067115600 - tz.transition 2004, 3, :o6, 1080421200 - tz.transition 2004, 10, :o5, 1099170000 - tz.transition 2005, 3, :o6, 1111870800 - tz.transition 2005, 10, :o5, 1130619600 - tz.transition 2006, 3, :o6, 1143320400 - tz.transition 2006, 10, :o5, 1162069200 - tz.transition 2007, 3, :o6, 1174770000 - tz.transition 2007, 10, :o5, 1193518800 - tz.transition 2008, 3, :o6, 1206824400 - tz.transition 2008, 10, :o5, 1224968400 - tz.transition 2009, 3, :o6, 1238274000 - tz.transition 2009, 10, :o5, 1256418000 - tz.transition 2010, 3, :o6, 1269723600 - tz.transition 2010, 10, :o5, 1288472400 - tz.transition 2011, 3, :o6, 1301173200 - tz.transition 2011, 10, :o5, 1319922000 - tz.transition 2012, 3, :o6, 1332622800 - tz.transition 2012, 10, :o5, 1351371600 - tz.transition 2013, 3, :o6, 1364677200 - tz.transition 2013, 10, :o5, 1382821200 - tz.transition 2014, 3, :o6, 1396126800 - tz.transition 2014, 10, :o5, 1414270800 - tz.transition 2015, 3, :o6, 1427576400 - tz.transition 2015, 10, :o5, 1445720400 - tz.transition 2016, 3, :o6, 1459026000 - tz.transition 2016, 10, :o5, 1477774800 - tz.transition 2017, 3, :o6, 1490475600 - tz.transition 2017, 10, :o5, 1509224400 - tz.transition 2018, 3, :o6, 1521925200 - tz.transition 2018, 10, :o5, 1540674000 - tz.transition 2019, 3, :o6, 1553979600 - tz.transition 2019, 10, :o5, 1572123600 - tz.transition 2020, 3, :o6, 1585429200 - tz.transition 2020, 10, :o5, 1603573200 - tz.transition 2021, 3, :o6, 1616878800 - tz.transition 2021, 10, :o5, 1635627600 - tz.transition 2022, 3, :o6, 1648328400 - tz.transition 2022, 10, :o5, 1667077200 - tz.transition 2023, 3, :o6, 1679778000 - tz.transition 2023, 10, :o5, 1698526800 - tz.transition 2024, 3, :o6, 1711832400 - tz.transition 2024, 10, :o5, 1729976400 - tz.transition 2025, 3, :o6, 1743282000 - tz.transition 2025, 10, :o5, 1761426000 - tz.transition 2026, 3, :o6, 1774731600 - tz.transition 2026, 10, :o5, 1792875600 - tz.transition 2027, 3, :o6, 1806181200 - tz.transition 2027, 10, :o5, 1824930000 - tz.transition 2028, 3, :o6, 1837630800 - tz.transition 2028, 10, :o5, 1856379600 - tz.transition 2029, 3, :o6, 1869080400 - tz.transition 2029, 10, :o5, 1887829200 - tz.transition 2030, 3, :o6, 1901134800 - tz.transition 2030, 10, :o5, 1919278800 - tz.transition 2031, 3, :o6, 1932584400 - tz.transition 2031, 10, :o5, 1950728400 - tz.transition 2032, 3, :o6, 1964034000 - tz.transition 2032, 10, :o5, 1982782800 - tz.transition 2033, 3, :o6, 1995483600 - tz.transition 2033, 10, :o5, 2014232400 - tz.transition 2034, 3, :o6, 2026933200 - tz.transition 2034, 10, :o5, 2045682000 - tz.transition 2035, 3, :o6, 2058382800 - tz.transition 2035, 10, :o5, 2077131600 - tz.transition 2036, 3, :o6, 2090437200 - tz.transition 2036, 10, :o5, 2108581200 - tz.transition 2037, 3, :o6, 2121886800 - tz.transition 2037, 10, :o5, 2140030800 - tz.transition 2038, 3, :o6, 19724083, 8 - tz.transition 2038, 10, :o5, 19725819, 8 - tz.transition 2039, 3, :o6, 19726995, 8 - tz.transition 2039, 10, :o5, 19728731, 8 - tz.transition 2040, 3, :o6, 19729907, 8 - tz.transition 2040, 10, :o5, 19731643, 8 - tz.transition 2041, 3, :o6, 19732875, 8 - tz.transition 2041, 10, :o5, 19734555, 8 - tz.transition 2042, 3, :o6, 19735787, 8 - tz.transition 2042, 10, :o5, 19737467, 8 - tz.transition 2043, 3, :o6, 19738699, 8 - tz.transition 2043, 10, :o5, 19740379, 8 - tz.transition 2044, 3, :o6, 19741611, 8 - tz.transition 2044, 10, :o5, 19743347, 8 - tz.transition 2045, 3, :o6, 19744523, 8 - tz.transition 2045, 10, :o5, 19746259, 8 - tz.transition 2046, 3, :o6, 19747435, 8 - tz.transition 2046, 10, :o5, 19749171, 8 - tz.transition 2047, 3, :o6, 19750403, 8 - tz.transition 2047, 10, :o5, 19752083, 8 - tz.transition 2048, 3, :o6, 19753315, 8 - tz.transition 2048, 10, :o5, 19754995, 8 - tz.transition 2049, 3, :o6, 19756227, 8 - tz.transition 2049, 10, :o5, 19757963, 8 - tz.transition 2050, 3, :o6, 19759139, 8 - tz.transition 2050, 10, :o5, 19760875, 8 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb deleted file mode 100644 index e7f160861..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Asia/Yerevan.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Asia - module Yerevan - include TimezoneDefinition - - timezone 'Asia/Yerevan' do |tz| - tz.offset :o0, 10680, 0, :LMT - tz.offset :o1, 10800, 0, :YERT - tz.offset :o2, 14400, 0, :YERT - tz.offset :o3, 14400, 3600, :YERST - tz.offset :o4, 10800, 3600, :YERST - tz.offset :o5, 10800, 3600, :AMST - tz.offset :o6, 10800, 0, :AMT - tz.offset :o7, 14400, 0, :AMT - tz.offset :o8, 14400, 3600, :AMST - - tz.transition 1924, 5, :o1, 1745213311, 720 - tz.transition 1957, 2, :o2, 19487187, 8 - tz.transition 1981, 3, :o3, 354916800 - tz.transition 1981, 9, :o2, 370724400 - tz.transition 1982, 3, :o3, 386452800 - tz.transition 1982, 9, :o2, 402260400 - tz.transition 1983, 3, :o3, 417988800 - tz.transition 1983, 9, :o2, 433796400 - tz.transition 1984, 3, :o3, 449611200 - tz.transition 1984, 9, :o2, 465343200 - tz.transition 1985, 3, :o3, 481068000 - tz.transition 1985, 9, :o2, 496792800 - tz.transition 1986, 3, :o3, 512517600 - tz.transition 1986, 9, :o2, 528242400 - tz.transition 1987, 3, :o3, 543967200 - tz.transition 1987, 9, :o2, 559692000 - tz.transition 1988, 3, :o3, 575416800 - tz.transition 1988, 9, :o2, 591141600 - tz.transition 1989, 3, :o3, 606866400 - tz.transition 1989, 9, :o2, 622591200 - tz.transition 1990, 3, :o3, 638316000 - tz.transition 1990, 9, :o2, 654645600 - tz.transition 1991, 3, :o4, 670370400 - tz.transition 1991, 9, :o5, 685569600 - tz.transition 1991, 9, :o6, 686098800 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o7, 811897200 - tz.transition 1997, 3, :o8, 859672800 - tz.transition 1997, 10, :o7, 877816800 - tz.transition 1998, 3, :o8, 891122400 - tz.transition 1998, 10, :o7, 909266400 - tz.transition 1999, 3, :o8, 922572000 - tz.transition 1999, 10, :o7, 941320800 - tz.transition 2000, 3, :o8, 954021600 - tz.transition 2000, 10, :o7, 972770400 - tz.transition 2001, 3, :o8, 985471200 - tz.transition 2001, 10, :o7, 1004220000 - tz.transition 2002, 3, :o8, 1017525600 - tz.transition 2002, 10, :o7, 1035669600 - tz.transition 2003, 3, :o8, 1048975200 - tz.transition 2003, 10, :o7, 1067119200 - tz.transition 2004, 3, :o8, 1080424800 - tz.transition 2004, 10, :o7, 1099173600 - tz.transition 2005, 3, :o8, 1111874400 - tz.transition 2005, 10, :o7, 1130623200 - tz.transition 2006, 3, :o8, 1143324000 - tz.transition 2006, 10, :o7, 1162072800 - tz.transition 2007, 3, :o8, 1174773600 - tz.transition 2007, 10, :o7, 1193522400 - tz.transition 2008, 3, :o8, 1206828000 - tz.transition 2008, 10, :o7, 1224972000 - tz.transition 2009, 3, :o8, 1238277600 - tz.transition 2009, 10, :o7, 1256421600 - tz.transition 2010, 3, :o8, 1269727200 - tz.transition 2010, 10, :o7, 1288476000 - tz.transition 2011, 3, :o8, 1301176800 - tz.transition 2011, 10, :o7, 1319925600 - tz.transition 2012, 3, :o8, 1332626400 - tz.transition 2012, 10, :o7, 1351375200 - tz.transition 2013, 3, :o8, 1364680800 - tz.transition 2013, 10, :o7, 1382824800 - tz.transition 2014, 3, :o8, 1396130400 - tz.transition 2014, 10, :o7, 1414274400 - tz.transition 2015, 3, :o8, 1427580000 - tz.transition 2015, 10, :o7, 1445724000 - tz.transition 2016, 3, :o8, 1459029600 - tz.transition 2016, 10, :o7, 1477778400 - tz.transition 2017, 3, :o8, 1490479200 - tz.transition 2017, 10, :o7, 1509228000 - tz.transition 2018, 3, :o8, 1521928800 - tz.transition 2018, 10, :o7, 1540677600 - tz.transition 2019, 3, :o8, 1553983200 - tz.transition 2019, 10, :o7, 1572127200 - tz.transition 2020, 3, :o8, 1585432800 - tz.transition 2020, 10, :o7, 1603576800 - tz.transition 2021, 3, :o8, 1616882400 - tz.transition 2021, 10, :o7, 1635631200 - tz.transition 2022, 3, :o8, 1648332000 - tz.transition 2022, 10, :o7, 1667080800 - tz.transition 2023, 3, :o8, 1679781600 - tz.transition 2023, 10, :o7, 1698530400 - tz.transition 2024, 3, :o8, 1711836000 - tz.transition 2024, 10, :o7, 1729980000 - tz.transition 2025, 3, :o8, 1743285600 - tz.transition 2025, 10, :o7, 1761429600 - tz.transition 2026, 3, :o8, 1774735200 - tz.transition 2026, 10, :o7, 1792879200 - tz.transition 2027, 3, :o8, 1806184800 - tz.transition 2027, 10, :o7, 1824933600 - tz.transition 2028, 3, :o8, 1837634400 - tz.transition 2028, 10, :o7, 1856383200 - tz.transition 2029, 3, :o8, 1869084000 - tz.transition 2029, 10, :o7, 1887832800 - tz.transition 2030, 3, :o8, 1901138400 - tz.transition 2030, 10, :o7, 1919282400 - tz.transition 2031, 3, :o8, 1932588000 - tz.transition 2031, 10, :o7, 1950732000 - tz.transition 2032, 3, :o8, 1964037600 - tz.transition 2032, 10, :o7, 1982786400 - tz.transition 2033, 3, :o8, 1995487200 - tz.transition 2033, 10, :o7, 2014236000 - tz.transition 2034, 3, :o8, 2026936800 - tz.transition 2034, 10, :o7, 2045685600 - tz.transition 2035, 3, :o8, 2058386400 - tz.transition 2035, 10, :o7, 2077135200 - tz.transition 2036, 3, :o8, 2090440800 - tz.transition 2036, 10, :o7, 2108584800 - tz.transition 2037, 3, :o8, 2121890400 - tz.transition 2037, 10, :o7, 2140034400 - tz.transition 2038, 3, :o8, 29586125, 12 - tz.transition 2038, 10, :o7, 29588729, 12 - tz.transition 2039, 3, :o8, 29590493, 12 - tz.transition 2039, 10, :o7, 29593097, 12 - tz.transition 2040, 3, :o8, 29594861, 12 - tz.transition 2040, 10, :o7, 29597465, 12 - tz.transition 2041, 3, :o8, 29599313, 12 - tz.transition 2041, 10, :o7, 29601833, 12 - tz.transition 2042, 3, :o8, 29603681, 12 - tz.transition 2042, 10, :o7, 29606201, 12 - tz.transition 2043, 3, :o8, 29608049, 12 - tz.transition 2043, 10, :o7, 29610569, 12 - tz.transition 2044, 3, :o8, 29612417, 12 - tz.transition 2044, 10, :o7, 29615021, 12 - tz.transition 2045, 3, :o8, 29616785, 12 - tz.transition 2045, 10, :o7, 29619389, 12 - tz.transition 2046, 3, :o8, 29621153, 12 - tz.transition 2046, 10, :o7, 29623757, 12 - tz.transition 2047, 3, :o8, 29625605, 12 - tz.transition 2047, 10, :o7, 29628125, 12 - tz.transition 2048, 3, :o8, 29629973, 12 - tz.transition 2048, 10, :o7, 29632493, 12 - tz.transition 2049, 3, :o8, 29634341, 12 - tz.transition 2049, 10, :o7, 29636945, 12 - tz.transition 2050, 3, :o8, 29638709, 12 - tz.transition 2050, 10, :o7, 29641313, 12 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb deleted file mode 100644 index 1bd16a75a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Azores.rb +++ /dev/null @@ -1,270 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Azores - include TimezoneDefinition - - timezone 'Atlantic/Azores' do |tz| - tz.offset :o0, -6160, 0, :LMT - tz.offset :o1, -6872, 0, :HMT - tz.offset :o2, -7200, 0, :AZOT - tz.offset :o3, -7200, 3600, :AZOST - tz.offset :o4, -7200, 7200, :AZOMT - tz.offset :o5, -3600, 0, :AZOT - tz.offset :o6, -3600, 3600, :AZOST - tz.offset :o7, 0, 0, :WET - - tz.transition 1884, 1, :o1, 2601910697, 1080 - tz.transition 1911, 5, :o2, 26127150259, 10800 - tz.transition 1916, 6, :o3, 58104781, 24 - tz.transition 1916, 11, :o2, 29054023, 12 - tz.transition 1917, 3, :o3, 58110925, 24 - tz.transition 1917, 10, :o2, 58116397, 24 - tz.transition 1918, 3, :o3, 58119709, 24 - tz.transition 1918, 10, :o2, 58125157, 24 - tz.transition 1919, 3, :o3, 58128445, 24 - tz.transition 1919, 10, :o2, 58133917, 24 - tz.transition 1920, 3, :o3, 58137229, 24 - tz.transition 1920, 10, :o2, 58142701, 24 - tz.transition 1921, 3, :o3, 58145989, 24 - tz.transition 1921, 10, :o2, 58151461, 24 - tz.transition 1924, 4, :o3, 58173421, 24 - tz.transition 1924, 10, :o2, 58177765, 24 - tz.transition 1926, 4, :o3, 58190965, 24 - tz.transition 1926, 10, :o2, 58194997, 24 - tz.transition 1927, 4, :o3, 58199533, 24 - tz.transition 1927, 10, :o2, 58203733, 24 - tz.transition 1928, 4, :o3, 58208437, 24 - tz.transition 1928, 10, :o2, 58212637, 24 - tz.transition 1929, 4, :o3, 58217341, 24 - tz.transition 1929, 10, :o2, 58221373, 24 - tz.transition 1931, 4, :o3, 58234813, 24 - tz.transition 1931, 10, :o2, 58238845, 24 - tz.transition 1932, 4, :o3, 58243213, 24 - tz.transition 1932, 10, :o2, 58247581, 24 - tz.transition 1934, 4, :o3, 58260853, 24 - tz.transition 1934, 10, :o2, 58265221, 24 - tz.transition 1935, 3, :o3, 58269421, 24 - tz.transition 1935, 10, :o2, 58273957, 24 - tz.transition 1936, 4, :o3, 58278661, 24 - tz.transition 1936, 10, :o2, 58282693, 24 - tz.transition 1937, 4, :o3, 58287061, 24 - tz.transition 1937, 10, :o2, 58291429, 24 - tz.transition 1938, 3, :o3, 58295629, 24 - tz.transition 1938, 10, :o2, 58300165, 24 - tz.transition 1939, 4, :o3, 58304869, 24 - tz.transition 1939, 11, :o2, 58310077, 24 - tz.transition 1940, 2, :o3, 58312429, 24 - tz.transition 1940, 10, :o2, 58317805, 24 - tz.transition 1941, 4, :o3, 58322173, 24 - tz.transition 1941, 10, :o2, 58326565, 24 - tz.transition 1942, 3, :o3, 58330405, 24 - tz.transition 1942, 4, :o4, 4860951, 2 - tz.transition 1942, 8, :o3, 4861175, 2 - tz.transition 1942, 10, :o2, 58335781, 24 - tz.transition 1943, 3, :o3, 58339141, 24 - tz.transition 1943, 4, :o4, 4861665, 2 - tz.transition 1943, 8, :o3, 4861931, 2 - tz.transition 1943, 10, :o2, 58344685, 24 - tz.transition 1944, 3, :o3, 58347877, 24 - tz.transition 1944, 4, :o4, 4862407, 2 - tz.transition 1944, 8, :o3, 4862659, 2 - tz.transition 1944, 10, :o2, 58353421, 24 - tz.transition 1945, 3, :o3, 58356613, 24 - tz.transition 1945, 4, :o4, 4863135, 2 - tz.transition 1945, 8, :o3, 4863387, 2 - tz.transition 1945, 10, :o2, 58362157, 24 - tz.transition 1946, 4, :o3, 58366021, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 7296845, 3 - tz.transition 1947, 10, :o2, 7297391, 3 - tz.transition 1948, 4, :o3, 7297937, 3 - tz.transition 1948, 10, :o2, 7298483, 3 - tz.transition 1949, 4, :o3, 7299029, 3 - tz.transition 1949, 10, :o2, 7299575, 3 - tz.transition 1951, 4, :o3, 7301213, 3 - tz.transition 1951, 10, :o2, 7301780, 3 - tz.transition 1952, 4, :o3, 7302326, 3 - tz.transition 1952, 10, :o2, 7302872, 3 - tz.transition 1953, 4, :o3, 7303418, 3 - tz.transition 1953, 10, :o2, 7303964, 3 - tz.transition 1954, 4, :o3, 7304510, 3 - tz.transition 1954, 10, :o2, 7305056, 3 - tz.transition 1955, 4, :o3, 7305602, 3 - tz.transition 1955, 10, :o2, 7306148, 3 - tz.transition 1956, 4, :o3, 7306694, 3 - tz.transition 1956, 10, :o2, 7307261, 3 - tz.transition 1957, 4, :o3, 7307807, 3 - tz.transition 1957, 10, :o2, 7308353, 3 - tz.transition 1958, 4, :o3, 7308899, 3 - tz.transition 1958, 10, :o2, 7309445, 3 - tz.transition 1959, 4, :o3, 7309991, 3 - tz.transition 1959, 10, :o2, 7310537, 3 - tz.transition 1960, 4, :o3, 7311083, 3 - tz.transition 1960, 10, :o2, 7311629, 3 - tz.transition 1961, 4, :o3, 7312175, 3 - tz.transition 1961, 10, :o2, 7312721, 3 - tz.transition 1962, 4, :o3, 7313267, 3 - tz.transition 1962, 10, :o2, 7313834, 3 - tz.transition 1963, 4, :o3, 7314380, 3 - tz.transition 1963, 10, :o2, 7314926, 3 - tz.transition 1964, 4, :o3, 7315472, 3 - tz.transition 1964, 10, :o2, 7316018, 3 - tz.transition 1965, 4, :o3, 7316564, 3 - tz.transition 1965, 10, :o2, 7317110, 3 - tz.transition 1966, 4, :o5, 7317656, 3 - tz.transition 1977, 3, :o6, 228272400 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o6, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o6, 291776400 - tz.transition 1979, 9, :o5, 307504800 - tz.transition 1980, 3, :o6, 323226000 - tz.transition 1980, 9, :o5, 338954400 - tz.transition 1981, 3, :o6, 354679200 - tz.transition 1981, 9, :o5, 370404000 - tz.transition 1982, 3, :o6, 386128800 - tz.transition 1982, 9, :o5, 401853600 - tz.transition 1983, 3, :o6, 417582000 - tz.transition 1983, 9, :o5, 433303200 - tz.transition 1984, 3, :o6, 449028000 - tz.transition 1984, 9, :o5, 465357600 - tz.transition 1985, 3, :o6, 481082400 - tz.transition 1985, 9, :o5, 496807200 - tz.transition 1986, 3, :o6, 512532000 - tz.transition 1986, 9, :o5, 528256800 - tz.transition 1987, 3, :o6, 543981600 - tz.transition 1987, 9, :o5, 559706400 - tz.transition 1988, 3, :o6, 575431200 - tz.transition 1988, 9, :o5, 591156000 - tz.transition 1989, 3, :o6, 606880800 - tz.transition 1989, 9, :o5, 622605600 - tz.transition 1990, 3, :o6, 638330400 - tz.transition 1990, 9, :o5, 654660000 - tz.transition 1991, 3, :o6, 670384800 - tz.transition 1991, 9, :o5, 686109600 - tz.transition 1992, 3, :o6, 701834400 - tz.transition 1992, 9, :o7, 717559200 - tz.transition 1993, 3, :o6, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o6, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o6, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o6, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o6, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o6, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o6, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o6, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o6, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o6, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o6, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o6, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o6, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o6, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o6, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o6, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o6, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o6, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o6, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o6, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o6, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o6, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o6, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o6, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o6, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o6, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o6, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o6, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o6, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o6, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o6, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o6, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o6, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o6, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o6, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o6, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o6, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o6, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o6, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o6, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o6, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o6, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o6, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o6, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o6, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o6, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o6, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o6, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o6, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o6, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o6, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o6, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o6, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o6, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o6, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o6, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb deleted file mode 100644 index 61c8c1504..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/Cape_Verde.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module Cape_Verde - include TimezoneDefinition - - timezone 'Atlantic/Cape_Verde' do |tz| - tz.offset :o0, -5644, 0, :LMT - tz.offset :o1, -7200, 0, :CVT - tz.offset :o2, -7200, 3600, :CVST - tz.offset :o3, -3600, 0, :CVT - - tz.transition 1907, 1, :o1, 52219653811, 21600 - tz.transition 1942, 9, :o2, 29167243, 12 - tz.transition 1945, 10, :o1, 58361845, 24 - tz.transition 1975, 11, :o3, 186120000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb deleted file mode 100644 index 6a4cbafb9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Atlantic/South_Georgia.rb +++ /dev/null @@ -1,18 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Atlantic - module South_Georgia - include TimezoneDefinition - - timezone 'Atlantic/South_Georgia' do |tz| - tz.offset :o0, -8768, 0, :LMT - tz.offset :o1, -7200, 0, :GST - - tz.transition 1890, 1, :o1, 1627673806, 675 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb deleted file mode 100644 index c5d561cc1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Adelaide.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Adelaide - include TimezoneDefinition - - timezone 'Australia/Adelaide' do |tz| - tz.offset :o0, 33260, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 10425132497, 4320 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - tz.transition 1971, 10, :o3, 57688200 - tz.transition 1972, 2, :o2, 67969800 - tz.transition 1972, 10, :o3, 89137800 - tz.transition 1973, 3, :o2, 100024200 - tz.transition 1973, 10, :o3, 120587400 - tz.transition 1974, 3, :o2, 131473800 - tz.transition 1974, 10, :o3, 152037000 - tz.transition 1975, 3, :o2, 162923400 - tz.transition 1975, 10, :o3, 183486600 - tz.transition 1976, 3, :o2, 194977800 - tz.transition 1976, 10, :o3, 215541000 - tz.transition 1977, 3, :o2, 226427400 - tz.transition 1977, 10, :o3, 246990600 - tz.transition 1978, 3, :o2, 257877000 - tz.transition 1978, 10, :o3, 278440200 - tz.transition 1979, 3, :o2, 289326600 - tz.transition 1979, 10, :o3, 309889800 - tz.transition 1980, 3, :o2, 320776200 - tz.transition 1980, 10, :o3, 341339400 - tz.transition 1981, 2, :o2, 352225800 - tz.transition 1981, 10, :o3, 372789000 - tz.transition 1982, 3, :o2, 384280200 - tz.transition 1982, 10, :o3, 404843400 - tz.transition 1983, 3, :o2, 415729800 - tz.transition 1983, 10, :o3, 436293000 - tz.transition 1984, 3, :o2, 447179400 - tz.transition 1984, 10, :o3, 467742600 - tz.transition 1985, 3, :o2, 478629000 - tz.transition 1985, 10, :o3, 499192200 - tz.transition 1986, 3, :o2, 511288200 - tz.transition 1986, 10, :o3, 530037000 - tz.transition 1987, 3, :o2, 542737800 - tz.transition 1987, 10, :o3, 562091400 - tz.transition 1988, 3, :o2, 574792200 - tz.transition 1988, 10, :o3, 594145800 - tz.transition 1989, 3, :o2, 606241800 - tz.transition 1989, 10, :o3, 625595400 - tz.transition 1990, 3, :o2, 637691400 - tz.transition 1990, 10, :o3, 657045000 - tz.transition 1991, 3, :o2, 667931400 - tz.transition 1991, 10, :o3, 688494600 - tz.transition 1992, 3, :o2, 701195400 - tz.transition 1992, 10, :o3, 719944200 - tz.transition 1993, 3, :o2, 731435400 - tz.transition 1993, 10, :o3, 751998600 - tz.transition 1994, 3, :o2, 764094600 - tz.transition 1994, 10, :o3, 783448200 - tz.transition 1995, 3, :o2, 796149000 - tz.transition 1995, 10, :o3, 814897800 - tz.transition 1996, 3, :o2, 828203400 - tz.transition 1996, 10, :o3, 846347400 - tz.transition 1997, 3, :o2, 859653000 - tz.transition 1997, 10, :o3, 877797000 - tz.transition 1998, 3, :o2, 891102600 - tz.transition 1998, 10, :o3, 909246600 - tz.transition 1999, 3, :o2, 922552200 - tz.transition 1999, 10, :o3, 941301000 - tz.transition 2000, 3, :o2, 954001800 - tz.transition 2000, 10, :o3, 972750600 - tz.transition 2001, 3, :o2, 985451400 - tz.transition 2001, 10, :o3, 1004200200 - tz.transition 2002, 3, :o2, 1017505800 - tz.transition 2002, 10, :o3, 1035649800 - tz.transition 2003, 3, :o2, 1048955400 - tz.transition 2003, 10, :o3, 1067099400 - tz.transition 2004, 3, :o2, 1080405000 - tz.transition 2004, 10, :o3, 1099153800 - tz.transition 2005, 3, :o2, 1111854600 - tz.transition 2005, 10, :o3, 1130603400 - tz.transition 2006, 4, :o2, 1143909000 - tz.transition 2006, 10, :o3, 1162053000 - tz.transition 2007, 3, :o2, 1174753800 - tz.transition 2007, 10, :o3, 1193502600 - tz.transition 2008, 4, :o2, 1207413000 - tz.transition 2008, 10, :o3, 1223137800 - tz.transition 2009, 4, :o2, 1238862600 - tz.transition 2009, 10, :o3, 1254587400 - tz.transition 2010, 4, :o2, 1270312200 - tz.transition 2010, 10, :o3, 1286037000 - tz.transition 2011, 4, :o2, 1301761800 - tz.transition 2011, 10, :o3, 1317486600 - tz.transition 2012, 3, :o2, 1333211400 - tz.transition 2012, 10, :o3, 1349541000 - tz.transition 2013, 4, :o2, 1365265800 - tz.transition 2013, 10, :o3, 1380990600 - tz.transition 2014, 4, :o2, 1396715400 - tz.transition 2014, 10, :o3, 1412440200 - tz.transition 2015, 4, :o2, 1428165000 - tz.transition 2015, 10, :o3, 1443889800 - tz.transition 2016, 4, :o2, 1459614600 - tz.transition 2016, 10, :o3, 1475339400 - tz.transition 2017, 4, :o2, 1491064200 - tz.transition 2017, 9, :o3, 1506789000 - tz.transition 2018, 3, :o2, 1522513800 - tz.transition 2018, 10, :o3, 1538843400 - tz.transition 2019, 4, :o2, 1554568200 - tz.transition 2019, 10, :o3, 1570293000 - tz.transition 2020, 4, :o2, 1586017800 - tz.transition 2020, 10, :o3, 1601742600 - tz.transition 2021, 4, :o2, 1617467400 - tz.transition 2021, 10, :o3, 1633192200 - tz.transition 2022, 4, :o2, 1648917000 - tz.transition 2022, 10, :o3, 1664641800 - tz.transition 2023, 4, :o2, 1680366600 - tz.transition 2023, 9, :o3, 1696091400 - tz.transition 2024, 4, :o2, 1712421000 - tz.transition 2024, 10, :o3, 1728145800 - tz.transition 2025, 4, :o2, 1743870600 - tz.transition 2025, 10, :o3, 1759595400 - tz.transition 2026, 4, :o2, 1775320200 - tz.transition 2026, 10, :o3, 1791045000 - tz.transition 2027, 4, :o2, 1806769800 - tz.transition 2027, 10, :o3, 1822494600 - tz.transition 2028, 4, :o2, 1838219400 - tz.transition 2028, 9, :o3, 1853944200 - tz.transition 2029, 3, :o2, 1869669000 - tz.transition 2029, 10, :o3, 1885998600 - tz.transition 2030, 4, :o2, 1901723400 - tz.transition 2030, 10, :o3, 1917448200 - tz.transition 2031, 4, :o2, 1933173000 - tz.transition 2031, 10, :o3, 1948897800 - tz.transition 2032, 4, :o2, 1964622600 - tz.transition 2032, 10, :o3, 1980347400 - tz.transition 2033, 4, :o2, 1996072200 - tz.transition 2033, 10, :o3, 2011797000 - tz.transition 2034, 4, :o2, 2027521800 - tz.transition 2034, 9, :o3, 2043246600 - tz.transition 2035, 3, :o2, 2058971400 - tz.transition 2035, 10, :o3, 2075301000 - tz.transition 2036, 4, :o2, 2091025800 - tz.transition 2036, 10, :o3, 2106750600 - tz.transition 2037, 4, :o2, 2122475400 - tz.transition 2037, 10, :o3, 2138200200 - tz.transition 2038, 4, :o2, 39448275, 16 - tz.transition 2038, 10, :o3, 39451187, 16 - tz.transition 2039, 4, :o2, 39454099, 16 - tz.transition 2039, 10, :o3, 39457011, 16 - tz.transition 2040, 3, :o2, 39459923, 16 - tz.transition 2040, 10, :o3, 39462947, 16 - tz.transition 2041, 4, :o2, 39465859, 16 - tz.transition 2041, 10, :o3, 39468771, 16 - tz.transition 2042, 4, :o2, 39471683, 16 - tz.transition 2042, 10, :o3, 39474595, 16 - tz.transition 2043, 4, :o2, 39477507, 16 - tz.transition 2043, 10, :o3, 39480419, 16 - tz.transition 2044, 4, :o2, 39483331, 16 - tz.transition 2044, 10, :o3, 39486243, 16 - tz.transition 2045, 4, :o2, 39489155, 16 - tz.transition 2045, 9, :o3, 39492067, 16 - tz.transition 2046, 3, :o2, 39494979, 16 - tz.transition 2046, 10, :o3, 39498003, 16 - tz.transition 2047, 4, :o2, 39500915, 16 - tz.transition 2047, 10, :o3, 39503827, 16 - tz.transition 2048, 4, :o2, 39506739, 16 - tz.transition 2048, 10, :o3, 39509651, 16 - tz.transition 2049, 4, :o2, 39512563, 16 - tz.transition 2049, 10, :o3, 39515475, 16 - tz.transition 2050, 4, :o2, 39518387, 16 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb deleted file mode 100644 index dd85ddae9..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Brisbane.rb +++ /dev/null @@ -1,35 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Brisbane - include TimezoneDefinition - - timezone 'Australia/Brisbane' do |tz| - tz.offset :o0, 36728, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1894, 12, :o1, 26062496009, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb deleted file mode 100644 index 17de88124..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Darwin.rb +++ /dev/null @@ -1,29 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Darwin - include TimezoneDefinition - - timezone 'Australia/Darwin' do |tz| - tz.offset :o0, 31400, 0, :LMT - tz.offset :o1, 32400, 0, :CST - tz.offset :o2, 34200, 0, :CST - tz.offset :o3, 34200, 3600, :CST - - tz.transition 1895, 1, :o1, 1042513259, 432 - tz.transition 1899, 4, :o2, 19318201, 8 - tz.transition 1916, 12, :o3, 3486569911, 1440 - tz.transition 1917, 3, :o2, 116222983, 48 - tz.transition 1941, 12, :o3, 38885763, 16 - tz.transition 1942, 3, :o2, 116661463, 48 - tz.transition 1942, 9, :o3, 38890067, 16 - tz.transition 1943, 3, :o2, 116678935, 48 - tz.transition 1943, 10, :o3, 38896003, 16 - tz.transition 1944, 3, :o2, 116696407, 48 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb deleted file mode 100644 index 11384b984..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Hobart.rb +++ /dev/null @@ -1,193 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Hobart - include TimezoneDefinition - - timezone 'Australia/Hobart' do |tz| - tz.offset :o0, 35356, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 8, :o1, 52130241161, 21600 - tz.transition 1916, 9, :o2, 14526823, 6 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1967, 9, :o2, 14638585, 6 - tz.transition 1968, 3, :o1, 14639677, 6 - tz.transition 1968, 10, :o2, 14640937, 6 - tz.transition 1969, 3, :o1, 14641735, 6 - tz.transition 1969, 10, :o2, 14643121, 6 - tz.transition 1970, 3, :o1, 5673600 - tz.transition 1970, 10, :o2, 25632000 - tz.transition 1971, 3, :o1, 37728000 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 386092800 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 417542400 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 510076800 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 670348800 - tz.transition 1991, 10, :o2, 686678400 - tz.transition 1992, 3, :o1, 701798400 - tz.transition 1992, 10, :o2, 718128000 - tz.transition 1993, 3, :o1, 733248000 - tz.transition 1993, 10, :o2, 749577600 - tz.transition 1994, 3, :o1, 764697600 - tz.transition 1994, 10, :o2, 781027200 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 9, :o2, 812476800 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 844531200 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 875980800 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 907430400 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 938880000 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1002384000 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1033833600 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1065283200 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1096732800 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1128182400 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 9, :o2, 1159632000 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1191686400 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb deleted file mode 100644 index c1304488e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Melbourne.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Melbourne - include TimezoneDefinition - - timezone 'Australia/Melbourne' do |tz| - tz.offset :o0, 34792, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 26062831051, 10800 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 3, :o1, 384278400 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 561484800 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 637689600 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 796147200 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb deleted file mode 100644 index d9e66f14a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Perth.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Perth - include TimezoneDefinition - - timezone 'Australia/Perth' do |tz| - tz.offset :o0, 27804, 0, :LMT - tz.offset :o1, 28800, 0, :WST - tz.offset :o2, 28800, 3600, :WST - - tz.transition 1895, 11, :o1, 17377402883, 7200 - tz.transition 1916, 12, :o2, 3486570001, 1440 - tz.transition 1917, 3, :o1, 58111493, 24 - tz.transition 1941, 12, :o2, 9721441, 4 - tz.transition 1942, 3, :o1, 58330733, 24 - tz.transition 1942, 9, :o2, 9722517, 4 - tz.transition 1943, 3, :o1, 58339469, 24 - tz.transition 1974, 10, :o2, 152042400 - tz.transition 1975, 3, :o1, 162928800 - tz.transition 1983, 10, :o2, 436298400 - tz.transition 1984, 3, :o1, 447184800 - tz.transition 1991, 11, :o2, 690314400 - tz.transition 1992, 2, :o1, 699386400 - tz.transition 2006, 12, :o2, 1165082400 - tz.transition 2007, 3, :o1, 1174759200 - tz.transition 2007, 10, :o2, 1193508000 - tz.transition 2008, 3, :o1, 1206813600 - tz.transition 2008, 10, :o2, 1224957600 - tz.transition 2009, 3, :o1, 1238263200 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb deleted file mode 100644 index 9062bd7c3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Australia/Sydney.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Australia - module Sydney - include TimezoneDefinition - - timezone 'Australia/Sydney' do |tz| - tz.offset :o0, 36292, 0, :LMT - tz.offset :o1, 36000, 0, :EST - tz.offset :o2, 36000, 3600, :EST - - tz.transition 1895, 1, :o1, 52125661727, 21600 - tz.transition 1916, 12, :o2, 3486569881, 1440 - tz.transition 1917, 3, :o1, 19370497, 8 - tz.transition 1941, 12, :o2, 14582161, 6 - tz.transition 1942, 3, :o1, 19443577, 8 - tz.transition 1942, 9, :o2, 14583775, 6 - tz.transition 1943, 3, :o1, 19446489, 8 - tz.transition 1943, 10, :o2, 14586001, 6 - tz.transition 1944, 3, :o1, 19449401, 8 - tz.transition 1971, 10, :o2, 57686400 - tz.transition 1972, 2, :o1, 67968000 - tz.transition 1972, 10, :o2, 89136000 - tz.transition 1973, 3, :o1, 100022400 - tz.transition 1973, 10, :o2, 120585600 - tz.transition 1974, 3, :o1, 131472000 - tz.transition 1974, 10, :o2, 152035200 - tz.transition 1975, 3, :o1, 162921600 - tz.transition 1975, 10, :o2, 183484800 - tz.transition 1976, 3, :o1, 194976000 - tz.transition 1976, 10, :o2, 215539200 - tz.transition 1977, 3, :o1, 226425600 - tz.transition 1977, 10, :o2, 246988800 - tz.transition 1978, 3, :o1, 257875200 - tz.transition 1978, 10, :o2, 278438400 - tz.transition 1979, 3, :o1, 289324800 - tz.transition 1979, 10, :o2, 309888000 - tz.transition 1980, 3, :o1, 320774400 - tz.transition 1980, 10, :o2, 341337600 - tz.transition 1981, 2, :o1, 352224000 - tz.transition 1981, 10, :o2, 372787200 - tz.transition 1982, 4, :o1, 386697600 - tz.transition 1982, 10, :o2, 404841600 - tz.transition 1983, 3, :o1, 415728000 - tz.transition 1983, 10, :o2, 436291200 - tz.transition 1984, 3, :o1, 447177600 - tz.transition 1984, 10, :o2, 467740800 - tz.transition 1985, 3, :o1, 478627200 - tz.transition 1985, 10, :o2, 499190400 - tz.transition 1986, 3, :o1, 511286400 - tz.transition 1986, 10, :o2, 530035200 - tz.transition 1987, 3, :o1, 542736000 - tz.transition 1987, 10, :o2, 562089600 - tz.transition 1988, 3, :o1, 574790400 - tz.transition 1988, 10, :o2, 594144000 - tz.transition 1989, 3, :o1, 606240000 - tz.transition 1989, 10, :o2, 625593600 - tz.transition 1990, 3, :o1, 636480000 - tz.transition 1990, 10, :o2, 657043200 - tz.transition 1991, 3, :o1, 667929600 - tz.transition 1991, 10, :o2, 688492800 - tz.transition 1992, 2, :o1, 699379200 - tz.transition 1992, 10, :o2, 719942400 - tz.transition 1993, 3, :o1, 731433600 - tz.transition 1993, 10, :o2, 751996800 - tz.transition 1994, 3, :o1, 762883200 - tz.transition 1994, 10, :o2, 783446400 - tz.transition 1995, 3, :o1, 794332800 - tz.transition 1995, 10, :o2, 814896000 - tz.transition 1996, 3, :o1, 828201600 - tz.transition 1996, 10, :o2, 846345600 - tz.transition 1997, 3, :o1, 859651200 - tz.transition 1997, 10, :o2, 877795200 - tz.transition 1998, 3, :o1, 891100800 - tz.transition 1998, 10, :o2, 909244800 - tz.transition 1999, 3, :o1, 922550400 - tz.transition 1999, 10, :o2, 941299200 - tz.transition 2000, 3, :o1, 954000000 - tz.transition 2000, 8, :o2, 967305600 - tz.transition 2001, 3, :o1, 985449600 - tz.transition 2001, 10, :o2, 1004198400 - tz.transition 2002, 3, :o1, 1017504000 - tz.transition 2002, 10, :o2, 1035648000 - tz.transition 2003, 3, :o1, 1048953600 - tz.transition 2003, 10, :o2, 1067097600 - tz.transition 2004, 3, :o1, 1080403200 - tz.transition 2004, 10, :o2, 1099152000 - tz.transition 2005, 3, :o1, 1111852800 - tz.transition 2005, 10, :o2, 1130601600 - tz.transition 2006, 4, :o1, 1143907200 - tz.transition 2006, 10, :o2, 1162051200 - tz.transition 2007, 3, :o1, 1174752000 - tz.transition 2007, 10, :o2, 1193500800 - tz.transition 2008, 4, :o1, 1207411200 - tz.transition 2008, 10, :o2, 1223136000 - tz.transition 2009, 4, :o1, 1238860800 - tz.transition 2009, 10, :o2, 1254585600 - tz.transition 2010, 4, :o1, 1270310400 - tz.transition 2010, 10, :o2, 1286035200 - tz.transition 2011, 4, :o1, 1301760000 - tz.transition 2011, 10, :o2, 1317484800 - tz.transition 2012, 3, :o1, 1333209600 - tz.transition 2012, 10, :o2, 1349539200 - tz.transition 2013, 4, :o1, 1365264000 - tz.transition 2013, 10, :o2, 1380988800 - tz.transition 2014, 4, :o1, 1396713600 - tz.transition 2014, 10, :o2, 1412438400 - tz.transition 2015, 4, :o1, 1428163200 - tz.transition 2015, 10, :o2, 1443888000 - tz.transition 2016, 4, :o1, 1459612800 - tz.transition 2016, 10, :o2, 1475337600 - tz.transition 2017, 4, :o1, 1491062400 - tz.transition 2017, 9, :o2, 1506787200 - tz.transition 2018, 3, :o1, 1522512000 - tz.transition 2018, 10, :o2, 1538841600 - tz.transition 2019, 4, :o1, 1554566400 - tz.transition 2019, 10, :o2, 1570291200 - tz.transition 2020, 4, :o1, 1586016000 - tz.transition 2020, 10, :o2, 1601740800 - tz.transition 2021, 4, :o1, 1617465600 - tz.transition 2021, 10, :o2, 1633190400 - tz.transition 2022, 4, :o1, 1648915200 - tz.transition 2022, 10, :o2, 1664640000 - tz.transition 2023, 4, :o1, 1680364800 - tz.transition 2023, 9, :o2, 1696089600 - tz.transition 2024, 4, :o1, 1712419200 - tz.transition 2024, 10, :o2, 1728144000 - tz.transition 2025, 4, :o1, 1743868800 - tz.transition 2025, 10, :o2, 1759593600 - tz.transition 2026, 4, :o1, 1775318400 - tz.transition 2026, 10, :o2, 1791043200 - tz.transition 2027, 4, :o1, 1806768000 - tz.transition 2027, 10, :o2, 1822492800 - tz.transition 2028, 4, :o1, 1838217600 - tz.transition 2028, 9, :o2, 1853942400 - tz.transition 2029, 3, :o1, 1869667200 - tz.transition 2029, 10, :o2, 1885996800 - tz.transition 2030, 4, :o1, 1901721600 - tz.transition 2030, 10, :o2, 1917446400 - tz.transition 2031, 4, :o1, 1933171200 - tz.transition 2031, 10, :o2, 1948896000 - tz.transition 2032, 4, :o1, 1964620800 - tz.transition 2032, 10, :o2, 1980345600 - tz.transition 2033, 4, :o1, 1996070400 - tz.transition 2033, 10, :o2, 2011795200 - tz.transition 2034, 4, :o1, 2027520000 - tz.transition 2034, 9, :o2, 2043244800 - tz.transition 2035, 3, :o1, 2058969600 - tz.transition 2035, 10, :o2, 2075299200 - tz.transition 2036, 4, :o1, 2091024000 - tz.transition 2036, 10, :o2, 2106748800 - tz.transition 2037, 4, :o1, 2122473600 - tz.transition 2037, 10, :o2, 2138198400 - tz.transition 2038, 4, :o1, 14793103, 6 - tz.transition 2038, 10, :o2, 14794195, 6 - tz.transition 2039, 4, :o1, 14795287, 6 - tz.transition 2039, 10, :o2, 14796379, 6 - tz.transition 2040, 3, :o1, 14797471, 6 - tz.transition 2040, 10, :o2, 14798605, 6 - tz.transition 2041, 4, :o1, 14799697, 6 - tz.transition 2041, 10, :o2, 14800789, 6 - tz.transition 2042, 4, :o1, 14801881, 6 - tz.transition 2042, 10, :o2, 14802973, 6 - tz.transition 2043, 4, :o1, 14804065, 6 - tz.transition 2043, 10, :o2, 14805157, 6 - tz.transition 2044, 4, :o1, 14806249, 6 - tz.transition 2044, 10, :o2, 14807341, 6 - tz.transition 2045, 4, :o1, 14808433, 6 - tz.transition 2045, 9, :o2, 14809525, 6 - tz.transition 2046, 3, :o1, 14810617, 6 - tz.transition 2046, 10, :o2, 14811751, 6 - tz.transition 2047, 4, :o1, 14812843, 6 - tz.transition 2047, 10, :o2, 14813935, 6 - tz.transition 2048, 4, :o1, 14815027, 6 - tz.transition 2048, 10, :o2, 14816119, 6 - tz.transition 2049, 4, :o1, 14817211, 6 - tz.transition 2049, 10, :o2, 14818303, 6 - tz.transition 2050, 4, :o1, 14819395, 6 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb deleted file mode 100644 index 28b2c6a04..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Etc/UTC.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Etc - module UTC - include TimezoneDefinition - - timezone 'Etc/UTC' do |tz| - tz.offset :o0, 0, 0, :UTC - - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb deleted file mode 100644 index 2d0c95c4b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Amsterdam.rb +++ /dev/null @@ -1,228 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Amsterdam - include TimezoneDefinition - - timezone 'Europe/Amsterdam' do |tz| - tz.offset :o0, 1172, 0, :LMT - tz.offset :o1, 1172, 0, :AMT - tz.offset :o2, 1172, 3600, :NST - tz.offset :o3, 1200, 3600, :NEST - tz.offset :o4, 1200, 0, :NET - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - - tz.transition 1834, 12, :o1, 51651636907, 21600 - tz.transition 1916, 4, :o2, 52293264907, 21600 - tz.transition 1916, 9, :o1, 52296568807, 21600 - tz.transition 1917, 4, :o2, 52300826707, 21600 - tz.transition 1917, 9, :o1, 52304153107, 21600 - tz.transition 1918, 4, :o2, 52308386707, 21600 - tz.transition 1918, 9, :o1, 52312317907, 21600 - tz.transition 1919, 4, :o2, 52316400307, 21600 - tz.transition 1919, 9, :o1, 52320180307, 21600 - tz.transition 1920, 4, :o2, 52324262707, 21600 - tz.transition 1920, 9, :o1, 52328042707, 21600 - tz.transition 1921, 4, :o2, 52332125107, 21600 - tz.transition 1921, 9, :o1, 52335905107, 21600 - tz.transition 1922, 3, :o2, 52339814707, 21600 - tz.transition 1922, 10, :o1, 52344048307, 21600 - tz.transition 1923, 6, :o2, 52349145907, 21600 - tz.transition 1923, 10, :o1, 52351910707, 21600 - tz.transition 1924, 3, :o2, 52355690707, 21600 - tz.transition 1924, 10, :o1, 52359773107, 21600 - tz.transition 1925, 6, :o2, 52365021907, 21600 - tz.transition 1925, 10, :o1, 52367635507, 21600 - tz.transition 1926, 5, :o2, 52372452307, 21600 - tz.transition 1926, 10, :o1, 52375497907, 21600 - tz.transition 1927, 5, :o2, 52380336307, 21600 - tz.transition 1927, 10, :o1, 52383360307, 21600 - tz.transition 1928, 5, :o2, 52388241907, 21600 - tz.transition 1928, 10, :o1, 52391373907, 21600 - tz.transition 1929, 5, :o2, 52396125907, 21600 - tz.transition 1929, 10, :o1, 52399236307, 21600 - tz.transition 1930, 5, :o2, 52404009907, 21600 - tz.transition 1930, 10, :o1, 52407098707, 21600 - tz.transition 1931, 5, :o2, 52411893907, 21600 - tz.transition 1931, 10, :o1, 52414961107, 21600 - tz.transition 1932, 5, :o2, 52419950707, 21600 - tz.transition 1932, 10, :o1, 52422823507, 21600 - tz.transition 1933, 5, :o2, 52427683507, 21600 - tz.transition 1933, 10, :o1, 52430837107, 21600 - tz.transition 1934, 5, :o2, 52435567507, 21600 - tz.transition 1934, 10, :o1, 52438699507, 21600 - tz.transition 1935, 5, :o2, 52443451507, 21600 - tz.transition 1935, 10, :o1, 52446561907, 21600 - tz.transition 1936, 5, :o2, 52451357107, 21600 - tz.transition 1936, 10, :o1, 52454424307, 21600 - tz.transition 1937, 5, :o2, 52459392307, 21600 - tz.transition 1937, 6, :o3, 52460253607, 21600 - tz.transition 1937, 10, :o4, 174874289, 72 - tz.transition 1938, 5, :o3, 174890417, 72 - tz.transition 1938, 10, :o4, 174900497, 72 - tz.transition 1939, 5, :o3, 174916697, 72 - tz.transition 1939, 10, :o4, 174927209, 72 - tz.transition 1940, 5, :o5, 174943115, 72 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1945, 4, :o5, 58357141, 24 - tz.transition 1945, 9, :o6, 58361149, 24 - tz.transition 1977, 4, :o5, 228877200 - tz.transition 1977, 9, :o6, 243997200 - tz.transition 1978, 4, :o5, 260326800 - tz.transition 1978, 10, :o6, 276051600 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o6, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o6, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o6, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o6, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o6, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o6, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o6, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o6, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o6, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o6, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o6, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o6, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o6, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o6, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o6, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o6, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o6, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o6, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o6, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o6, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o6, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o6, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o6, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o6, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o6, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o6, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o6, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o6, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o6, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o6, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o6, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o6, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o6, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o6, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o6, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o6, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o6, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o6, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o6, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o6, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o6, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o6, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o6, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o6, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o6, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o6, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o6, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o6, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o6, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o6, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o6, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o6, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o6, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o6, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o6, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o6, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o6, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o6, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o6, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o6, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o6, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o6, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o6, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o6, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o6, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o6, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o6, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o6, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o6, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o6, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o6, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o6, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb deleted file mode 100644 index 4e21e535c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Athens.rb +++ /dev/null @@ -1,185 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Athens - include TimezoneDefinition - - timezone 'Europe/Athens' do |tz| - tz.offset :o0, 5692, 0, :LMT - tz.offset :o1, 5692, 0, :AMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - - tz.transition 1895, 9, :o1, 52130529377, 21600 - tz.transition 1916, 7, :o2, 3268447787, 1350 - tz.transition 1932, 7, :o3, 29122745, 12 - tz.transition 1932, 8, :o2, 19415611, 8 - tz.transition 1941, 4, :o3, 29161097, 12 - tz.transition 1941, 4, :o4, 19440915, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339523, 24 - tz.transition 1943, 10, :o5, 29172017, 12 - tz.transition 1944, 4, :o2, 58348427, 24 - tz.transition 1952, 6, :o3, 29210333, 12 - tz.transition 1952, 11, :o2, 19474547, 8 - tz.transition 1975, 4, :o3, 166485600 - tz.transition 1975, 11, :o2, 186184800 - tz.transition 1976, 4, :o3, 198028800 - tz.transition 1976, 10, :o2, 213753600 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 244080000 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 9, :o2, 275446800 - tz.transition 1979, 4, :o3, 291798000 - tz.transition 1979, 9, :o2, 307407600 - tz.transition 1980, 3, :o3, 323388000 - tz.transition 1980, 9, :o2, 338936400 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb deleted file mode 100644 index 4dbd893d7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Belgrade.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Belgrade - include TimezoneDefinition - - timezone 'Europe/Belgrade' do |tz| - tz.offset :o0, 4920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1883, 12, :o1, 1734607039, 720 - tz.transition 1941, 4, :o2, 29161241, 12 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 58358005, 24 - tz.transition 1945, 9, :o1, 58361149, 24 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb deleted file mode 100644 index 721054236..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Berlin.rb +++ /dev/null @@ -1,188 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Berlin - include TimezoneDefinition - - timezone 'Europe/Berlin' do |tz| - tz.offset :o0, 3208, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - tz.offset :o3, 3600, 7200, :CEMT - - tz.transition 1893, 3, :o1, 26055588199, 10800 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 5, :o3, 4863199, 2 - tz.transition 1945, 9, :o2, 4863445, 2 - tz.transition 1945, 11, :o1, 58362661, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370413, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 5, :o3, 58375597, 24 - tz.transition 1947, 6, :o2, 4864731, 2 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1980, 4, :o2, 323830800 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb deleted file mode 100644 index 7a731a0b6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bratislava.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bratislava - include TimezoneDefinition - - linked_timezone 'Europe/Bratislava', 'Europe/Prague' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb deleted file mode 100644 index 6b0a24294..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Brussels.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Brussels - include TimezoneDefinition - - timezone 'Europe/Brussels' do |tz| - tz.offset :o0, 1050, 0, :LMT - tz.offset :o1, 1050, 0, :BMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 0, 3600, :WEST - - tz.transition 1879, 12, :o1, 1386844121, 576 - tz.transition 1892, 5, :o2, 1389438713, 576 - tz.transition 1914, 11, :o3, 4840889, 2 - tz.transition 1916, 4, :o4, 58103627, 24 - tz.transition 1916, 9, :o3, 58107299, 24 - tz.transition 1917, 4, :o4, 58112029, 24 - tz.transition 1917, 9, :o3, 58115725, 24 - tz.transition 1918, 4, :o4, 58120765, 24 - tz.transition 1918, 9, :o3, 58124461, 24 - tz.transition 1918, 11, :o2, 58125815, 24 - tz.transition 1919, 3, :o5, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 2, :o5, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o5, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o5, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 4, :o5, 58164755, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o5, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o5, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o5, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o5, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o5, 58208435, 24 - tz.transition 1928, 10, :o2, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o2, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o2, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o2, 29119423, 12 - tz.transition 1932, 4, :o5, 29121607, 12 - tz.transition 1932, 10, :o2, 29123791, 12 - tz.transition 1933, 3, :o5, 29125891, 12 - tz.transition 1933, 10, :o2, 29128243, 12 - tz.transition 1934, 4, :o5, 29130427, 12 - tz.transition 1934, 10, :o2, 29132611, 12 - tz.transition 1935, 3, :o5, 29134711, 12 - tz.transition 1935, 10, :o2, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o2, 29141347, 12 - tz.transition 1937, 4, :o5, 29143531, 12 - tz.transition 1937, 10, :o2, 29145715, 12 - tz.transition 1938, 3, :o5, 29147815, 12 - tz.transition 1938, 10, :o2, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o2, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1940, 5, :o4, 29157235, 12 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 9, :o3, 58352413, 24 - tz.transition 1945, 4, :o4, 58357141, 24 - tz.transition 1945, 9, :o3, 58361149, 24 - tz.transition 1946, 5, :o4, 58367029, 24 - tz.transition 1946, 10, :o3, 58370413, 24 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o3, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o3, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o3, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o3, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o3, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o3, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o3, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o3, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o3, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o3, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o3, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o3, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o3, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o3, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o3, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o3, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o3, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o3, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o3, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb deleted file mode 100644 index 521c3c932..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Bucharest.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Bucharest - include TimezoneDefinition - - timezone 'Europe/Bucharest' do |tz| - tz.offset :o0, 6264, 0, :LMT - tz.offset :o1, 6264, 0, :BMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1891, 9, :o1, 964802571, 400 - tz.transition 1931, 7, :o2, 970618571, 400 - tz.transition 1932, 5, :o3, 29122181, 12 - tz.transition 1932, 10, :o2, 29123789, 12 - tz.transition 1933, 4, :o3, 29125973, 12 - tz.transition 1933, 9, :o2, 29128157, 12 - tz.transition 1934, 4, :o3, 29130425, 12 - tz.transition 1934, 10, :o2, 29132609, 12 - tz.transition 1935, 4, :o3, 29134793, 12 - tz.transition 1935, 10, :o2, 29136977, 12 - tz.transition 1936, 4, :o3, 29139161, 12 - tz.transition 1936, 10, :o2, 29141345, 12 - tz.transition 1937, 4, :o3, 29143529, 12 - tz.transition 1937, 10, :o2, 29145713, 12 - tz.transition 1938, 4, :o3, 29147897, 12 - tz.transition 1938, 10, :o2, 29150081, 12 - tz.transition 1939, 4, :o3, 29152265, 12 - tz.transition 1939, 9, :o2, 29154449, 12 - tz.transition 1979, 5, :o3, 296604000 - tz.transition 1979, 9, :o2, 307486800 - tz.transition 1980, 4, :o3, 323816400 - tz.transition 1980, 9, :o2, 338940000 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670370400 - tz.transition 1991, 9, :o2, 686095200 - tz.transition 1992, 3, :o3, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o3, 733269600 - tz.transition 1993, 9, :o2, 748994400 - tz.transition 1994, 3, :o3, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o3, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o3, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb deleted file mode 100644 index 1f3a9738b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Budapest.rb +++ /dev/null @@ -1,197 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Budapest - include TimezoneDefinition - - timezone 'Europe/Budapest' do |tz| - tz.offset :o0, 4580, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1890, 9, :o1, 10418291051, 4320 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 29060215, 12 - tz.transition 1918, 9, :o1, 58124773, 24 - tz.transition 1919, 4, :o2, 29064763, 12 - tz.transition 1919, 9, :o1, 58133197, 24 - tz.transition 1920, 4, :o2, 29069035, 12 - tz.transition 1920, 9, :o1, 58142341, 24 - tz.transition 1941, 4, :o2, 58322173, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 5, :o2, 29178929, 12 - tz.transition 1945, 11, :o1, 29181149, 12 - tz.transition 1946, 3, :o2, 58365853, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383493, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1949, 4, :o2, 58392397, 24 - tz.transition 1949, 10, :o1, 58396597, 24 - tz.transition 1950, 4, :o2, 58401325, 24 - tz.transition 1950, 10, :o1, 58405861, 24 - tz.transition 1954, 5, :o2, 58437251, 24 - tz.transition 1954, 10, :o1, 29220221, 12 - tz.transition 1955, 5, :o2, 58446011, 24 - tz.transition 1955, 10, :o1, 29224601, 12 - tz.transition 1956, 6, :o2, 58455059, 24 - tz.transition 1956, 9, :o1, 29228957, 12 - tz.transition 1957, 6, :o2, 4871983, 2 - tz.transition 1957, 9, :o1, 58466653, 24 - tz.transition 1980, 4, :o2, 323827200 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb deleted file mode 100644 index 47cbaf14a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Copenhagen.rb +++ /dev/null @@ -1,179 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Copenhagen - include TimezoneDefinition - - timezone 'Europe/Copenhagen' do |tz| - tz.offset :o0, 3020, 0, :LMT - tz.offset :o1, 3020, 0, :CMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1889, 12, :o1, 10417111769, 4320 - tz.transition 1893, 12, :o2, 10423423289, 4320 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1940, 5, :o3, 58314347, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 58352773, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 8, :o2, 58360381, 24 - tz.transition 1946, 5, :o3, 58366597, 24 - tz.transition 1946, 9, :o2, 58369549, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1948, 5, :o3, 58384333, 24 - tz.transition 1948, 8, :o2, 58386517, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb deleted file mode 100644 index 0560bb543..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Dublin.rb +++ /dev/null @@ -1,276 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Dublin - include TimezoneDefinition - - timezone 'Europe/Dublin' do |tz| - tz.offset :o0, -1500, 0, :LMT - tz.offset :o1, -1521, 0, :DMT - tz.offset :o2, -1521, 3600, :IST - tz.offset :o3, 0, 0, :GMT - tz.offset :o4, 0, 3600, :BST - tz.offset :o5, 0, 3600, :IST - tz.offset :o6, 3600, 0, :IST - - tz.transition 1880, 8, :o1, 693483701, 288 - tz.transition 1916, 5, :o2, 7747214723, 3200 - tz.transition 1916, 10, :o3, 7747640323, 3200 - tz.transition 1917, 4, :o4, 29055919, 12 - tz.transition 1917, 9, :o3, 29057863, 12 - tz.transition 1918, 3, :o4, 29060119, 12 - tz.transition 1918, 9, :o3, 29062399, 12 - tz.transition 1919, 3, :o4, 29064571, 12 - tz.transition 1919, 9, :o3, 29066767, 12 - tz.transition 1920, 3, :o4, 29068939, 12 - tz.transition 1920, 10, :o3, 29071471, 12 - tz.transition 1921, 4, :o4, 29073391, 12 - tz.transition 1921, 10, :o3, 29075587, 12 - tz.transition 1922, 3, :o5, 29077675, 12 - tz.transition 1922, 10, :o3, 29080027, 12 - tz.transition 1923, 4, :o5, 29082379, 12 - tz.transition 1923, 9, :o3, 29084143, 12 - tz.transition 1924, 4, :o5, 29086663, 12 - tz.transition 1924, 9, :o3, 29088595, 12 - tz.transition 1925, 4, :o5, 29091115, 12 - tz.transition 1925, 10, :o3, 29093131, 12 - tz.transition 1926, 4, :o5, 29095483, 12 - tz.transition 1926, 10, :o3, 29097499, 12 - tz.transition 1927, 4, :o5, 29099767, 12 - tz.transition 1927, 10, :o3, 29101867, 12 - tz.transition 1928, 4, :o5, 29104303, 12 - tz.transition 1928, 10, :o3, 29106319, 12 - tz.transition 1929, 4, :o5, 29108671, 12 - tz.transition 1929, 10, :o3, 29110687, 12 - tz.transition 1930, 4, :o5, 29112955, 12 - tz.transition 1930, 10, :o3, 29115055, 12 - tz.transition 1931, 4, :o5, 29117407, 12 - tz.transition 1931, 10, :o3, 29119423, 12 - tz.transition 1932, 4, :o5, 29121775, 12 - tz.transition 1932, 10, :o3, 29123791, 12 - tz.transition 1933, 4, :o5, 29126059, 12 - tz.transition 1933, 10, :o3, 29128243, 12 - tz.transition 1934, 4, :o5, 29130595, 12 - tz.transition 1934, 10, :o3, 29132611, 12 - tz.transition 1935, 4, :o5, 29134879, 12 - tz.transition 1935, 10, :o3, 29136979, 12 - tz.transition 1936, 4, :o5, 29139331, 12 - tz.transition 1936, 10, :o3, 29141347, 12 - tz.transition 1937, 4, :o5, 29143699, 12 - tz.transition 1937, 10, :o3, 29145715, 12 - tz.transition 1938, 4, :o5, 29147983, 12 - tz.transition 1938, 10, :o3, 29150083, 12 - tz.transition 1939, 4, :o5, 29152435, 12 - tz.transition 1939, 11, :o3, 29155039, 12 - tz.transition 1940, 2, :o5, 29156215, 12 - tz.transition 1946, 10, :o3, 58370389, 24 - tz.transition 1947, 3, :o5, 29187127, 12 - tz.transition 1947, 11, :o3, 58379797, 24 - tz.transition 1948, 4, :o5, 29191915, 12 - tz.transition 1948, 10, :o3, 29194267, 12 - tz.transition 1949, 4, :o5, 29196115, 12 - tz.transition 1949, 10, :o3, 29198635, 12 - tz.transition 1950, 4, :o5, 29200651, 12 - tz.transition 1950, 10, :o3, 29202919, 12 - tz.transition 1951, 4, :o5, 29205019, 12 - tz.transition 1951, 10, :o3, 29207287, 12 - tz.transition 1952, 4, :o5, 29209471, 12 - tz.transition 1952, 10, :o3, 29211739, 12 - tz.transition 1953, 4, :o5, 29213839, 12 - tz.transition 1953, 10, :o3, 29215855, 12 - tz.transition 1954, 4, :o5, 29218123, 12 - tz.transition 1954, 10, :o3, 29220223, 12 - tz.transition 1955, 4, :o5, 29222575, 12 - tz.transition 1955, 10, :o3, 29224591, 12 - tz.transition 1956, 4, :o5, 29227027, 12 - tz.transition 1956, 10, :o3, 29229043, 12 - tz.transition 1957, 4, :o5, 29231311, 12 - tz.transition 1957, 10, :o3, 29233411, 12 - tz.transition 1958, 4, :o5, 29235763, 12 - tz.transition 1958, 10, :o3, 29237779, 12 - tz.transition 1959, 4, :o5, 29240131, 12 - tz.transition 1959, 10, :o3, 29242147, 12 - tz.transition 1960, 4, :o5, 29244415, 12 - tz.transition 1960, 10, :o3, 29246515, 12 - tz.transition 1961, 3, :o5, 29248615, 12 - tz.transition 1961, 10, :o3, 29251219, 12 - tz.transition 1962, 3, :o5, 29252983, 12 - tz.transition 1962, 10, :o3, 29255587, 12 - tz.transition 1963, 3, :o5, 29257435, 12 - tz.transition 1963, 10, :o3, 29259955, 12 - tz.transition 1964, 3, :o5, 29261719, 12 - tz.transition 1964, 10, :o3, 29264323, 12 - tz.transition 1965, 3, :o5, 29266087, 12 - tz.transition 1965, 10, :o3, 29268691, 12 - tz.transition 1966, 3, :o5, 29270455, 12 - tz.transition 1966, 10, :o3, 29273059, 12 - tz.transition 1967, 3, :o5, 29274823, 12 - tz.transition 1967, 10, :o3, 29277511, 12 - tz.transition 1968, 2, :o5, 29278855, 12 - tz.transition 1968, 10, :o6, 58563755, 24 - tz.transition 1971, 10, :o3, 57722400 - tz.transition 1972, 3, :o5, 69818400 - tz.transition 1972, 10, :o3, 89172000 - tz.transition 1973, 3, :o5, 101268000 - tz.transition 1973, 10, :o3, 120621600 - tz.transition 1974, 3, :o5, 132717600 - tz.transition 1974, 10, :o3, 152071200 - tz.transition 1975, 3, :o5, 164167200 - tz.transition 1975, 10, :o3, 183520800 - tz.transition 1976, 3, :o5, 196221600 - tz.transition 1976, 10, :o3, 214970400 - tz.transition 1977, 3, :o5, 227671200 - tz.transition 1977, 10, :o3, 246420000 - tz.transition 1978, 3, :o5, 259120800 - tz.transition 1978, 10, :o3, 278474400 - tz.transition 1979, 3, :o5, 290570400 - tz.transition 1979, 10, :o3, 309924000 - tz.transition 1980, 3, :o5, 322020000 - tz.transition 1980, 10, :o3, 341373600 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 10, :o3, 372819600 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 10, :o3, 404269200 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 10, :o3, 435718800 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 10, :o3, 467773200 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 10, :o3, 499222800 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 10, :o3, 530672400 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 10, :o3, 562122000 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 10, :o3, 593571600 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 10, :o3, 625626000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 10, :o3, 657075600 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 10, :o3, 688525200 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 10, :o3, 719974800 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 10, :o3, 751424400 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 10, :o3, 782874000 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 10, :o3, 814323600 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o3, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o3, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb deleted file mode 100644 index 13a806bcc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Helsinki.rb +++ /dev/null @@ -1,163 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Helsinki - include TimezoneDefinition - - timezone 'Europe/Helsinki' do |tz| - tz.offset :o0, 5992, 0, :LMT - tz.offset :o1, 5992, 0, :HMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - - tz.transition 1878, 5, :o1, 25997062651, 10800 - tz.transition 1921, 4, :o2, 26166352651, 10800 - tz.transition 1942, 4, :o3, 29165429, 12 - tz.transition 1942, 10, :o2, 19445083, 8 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb deleted file mode 100644 index 8306c4753..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Istanbul.rb +++ /dev/null @@ -1,218 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Istanbul - include TimezoneDefinition - - timezone 'Europe/Istanbul' do |tz| - tz.offset :o0, 6952, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 7200, 3600, :EEST - tz.offset :o4, 10800, 3600, :TRST - tz.offset :o5, 10800, 0, :TRT - - tz.transition 1879, 12, :o1, 26003326531, 10800 - tz.transition 1910, 9, :o2, 26124610523, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 19369099, 8 - tz.transition 1920, 3, :o3, 29068937, 12 - tz.transition 1920, 10, :o2, 19380979, 8 - tz.transition 1921, 4, :o3, 29073389, 12 - tz.transition 1921, 10, :o2, 19383723, 8 - tz.transition 1922, 3, :o3, 29077673, 12 - tz.transition 1922, 10, :o2, 19386683, 8 - tz.transition 1924, 5, :o3, 29087021, 12 - tz.transition 1924, 9, :o2, 19392475, 8 - tz.transition 1925, 4, :o3, 29091257, 12 - tz.transition 1925, 9, :o2, 19395395, 8 - tz.transition 1940, 6, :o3, 29157725, 12 - tz.transition 1940, 10, :o2, 19439259, 8 - tz.transition 1940, 11, :o3, 29159573, 12 - tz.transition 1941, 9, :o2, 19442067, 8 - tz.transition 1942, 3, :o3, 29165405, 12 - tz.transition 1942, 10, :o2, 19445315, 8 - tz.transition 1945, 4, :o3, 29178569, 12 - tz.transition 1945, 10, :o2, 19453891, 8 - tz.transition 1946, 5, :o3, 29183669, 12 - tz.transition 1946, 9, :o2, 19456755, 8 - tz.transition 1947, 4, :o3, 29187545, 12 - tz.transition 1947, 10, :o2, 19459707, 8 - tz.transition 1948, 4, :o3, 29191913, 12 - tz.transition 1948, 10, :o2, 19462619, 8 - tz.transition 1949, 4, :o3, 29196197, 12 - tz.transition 1949, 10, :o2, 19465531, 8 - tz.transition 1950, 4, :o3, 29200685, 12 - tz.transition 1950, 10, :o2, 19468499, 8 - tz.transition 1951, 4, :o3, 29205101, 12 - tz.transition 1951, 10, :o2, 19471419, 8 - tz.transition 1962, 7, :o3, 29254325, 12 - tz.transition 1962, 10, :o2, 19503563, 8 - tz.transition 1964, 5, :o3, 29262365, 12 - tz.transition 1964, 9, :o2, 19509355, 8 - tz.transition 1970, 5, :o3, 10533600 - tz.transition 1970, 10, :o2, 23835600 - tz.transition 1971, 5, :o3, 41983200 - tz.transition 1971, 10, :o2, 55285200 - tz.transition 1972, 5, :o3, 74037600 - tz.transition 1972, 10, :o2, 87339600 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 11, :o2, 121219200 - tz.transition 1974, 3, :o3, 133920000 - tz.transition 1974, 11, :o2, 152676000 - tz.transition 1975, 3, :o3, 165362400 - tz.transition 1975, 10, :o2, 183502800 - tz.transition 1976, 5, :o3, 202428000 - tz.transition 1976, 10, :o2, 215557200 - tz.transition 1977, 4, :o3, 228866400 - tz.transition 1977, 10, :o2, 245797200 - tz.transition 1978, 4, :o3, 260316000 - tz.transition 1978, 10, :o4, 277246800 - tz.transition 1979, 10, :o5, 308779200 - tz.transition 1980, 4, :o4, 323827200 - tz.transition 1980, 10, :o5, 340228800 - tz.transition 1981, 3, :o4, 354672000 - tz.transition 1981, 10, :o5, 371678400 - tz.transition 1982, 3, :o4, 386121600 - tz.transition 1982, 10, :o5, 403128000 - tz.transition 1983, 7, :o4, 428446800 - tz.transition 1983, 10, :o5, 433886400 - tz.transition 1985, 4, :o3, 482792400 - tz.transition 1985, 9, :o2, 496702800 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o3, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o3, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o3, 670374000 - tz.transition 1991, 9, :o2, 686098800 - tz.transition 1992, 3, :o3, 701823600 - tz.transition 1992, 9, :o2, 717548400 - tz.transition 1993, 3, :o3, 733273200 - tz.transition 1993, 9, :o2, 748998000 - tz.transition 1994, 3, :o3, 764722800 - tz.transition 1994, 9, :o2, 780447600 - tz.transition 1995, 3, :o3, 796172400 - tz.transition 1995, 9, :o2, 811897200 - tz.transition 1996, 3, :o3, 828226800 - tz.transition 1996, 10, :o2, 846370800 - tz.transition 1997, 3, :o3, 859676400 - tz.transition 1997, 10, :o2, 877820400 - tz.transition 1998, 3, :o3, 891126000 - tz.transition 1998, 10, :o2, 909270000 - tz.transition 1999, 3, :o3, 922575600 - tz.transition 1999, 10, :o2, 941324400 - tz.transition 2000, 3, :o3, 954025200 - tz.transition 2000, 10, :o2, 972774000 - tz.transition 2001, 3, :o3, 985474800 - tz.transition 2001, 10, :o2, 1004223600 - tz.transition 2002, 3, :o3, 1017529200 - tz.transition 2002, 10, :o2, 1035673200 - tz.transition 2003, 3, :o3, 1048978800 - tz.transition 2003, 10, :o2, 1067122800 - tz.transition 2004, 3, :o3, 1080428400 - tz.transition 2004, 10, :o2, 1099177200 - tz.transition 2005, 3, :o3, 1111878000 - tz.transition 2005, 10, :o2, 1130626800 - tz.transition 2006, 3, :o3, 1143327600 - tz.transition 2006, 10, :o2, 1162076400 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb deleted file mode 100644 index 513d3308b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Kiev.rb +++ /dev/null @@ -1,168 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Kiev - include TimezoneDefinition - - timezone 'Europe/Kiev' do |tz| - tz.offset :o0, 7324, 0, :LMT - tz.offset :o1, 7324, 0, :KMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006652969, 21600 - tz.transition 1924, 5, :o2, 52356400169, 21600 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 9, :o4, 19442059, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1943, 11, :o3, 58344827, 24 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1990, 6, :o2, 646786800 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o7, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o7, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o7, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o7, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o7, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o7, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o7, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o7, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb deleted file mode 100644 index 1c6d2a3d3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Lisbon.rb +++ /dev/null @@ -1,268 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Lisbon - include TimezoneDefinition - - timezone 'Europe/Lisbon' do |tz| - tz.offset :o0, -2192, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1912, 1, :o1, 13064773637, 5400 - tz.transition 1916, 6, :o2, 58104779, 24 - tz.transition 1916, 11, :o1, 4842337, 2 - tz.transition 1917, 2, :o2, 58110923, 24 - tz.transition 1917, 10, :o1, 58116395, 24 - tz.transition 1918, 3, :o2, 58119707, 24 - tz.transition 1918, 10, :o1, 58125155, 24 - tz.transition 1919, 2, :o2, 58128443, 24 - tz.transition 1919, 10, :o1, 58133915, 24 - tz.transition 1920, 2, :o2, 58137227, 24 - tz.transition 1920, 10, :o1, 58142699, 24 - tz.transition 1921, 2, :o2, 58145987, 24 - tz.transition 1921, 10, :o1, 58151459, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177763, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1931, 4, :o2, 58234811, 24 - tz.transition 1931, 10, :o1, 58238843, 24 - tz.transition 1932, 4, :o2, 58243211, 24 - tz.transition 1932, 10, :o1, 58247579, 24 - tz.transition 1934, 4, :o2, 58260851, 24 - tz.transition 1934, 10, :o1, 58265219, 24 - tz.transition 1935, 3, :o2, 58269419, 24 - tz.transition 1935, 10, :o1, 58273955, 24 - tz.transition 1936, 4, :o2, 58278659, 24 - tz.transition 1936, 10, :o1, 58282691, 24 - tz.transition 1937, 4, :o2, 58287059, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295627, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 11, :o1, 58310075, 24 - tz.transition 1940, 2, :o2, 58312427, 24 - tz.transition 1940, 10, :o1, 58317803, 24 - tz.transition 1941, 4, :o2, 58322171, 24 - tz.transition 1941, 10, :o1, 58326563, 24 - tz.transition 1942, 3, :o2, 58330403, 24 - tz.transition 1942, 4, :o3, 29165705, 12 - tz.transition 1942, 8, :o2, 29167049, 12 - tz.transition 1942, 10, :o1, 58335779, 24 - tz.transition 1943, 3, :o2, 58339139, 24 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 8, :o2, 29171585, 12 - tz.transition 1943, 10, :o1, 58344683, 24 - tz.transition 1944, 3, :o2, 58347875, 24 - tz.transition 1944, 4, :o3, 29174441, 12 - tz.transition 1944, 8, :o2, 29175953, 12 - tz.transition 1944, 10, :o1, 58353419, 24 - tz.transition 1945, 3, :o2, 58356611, 24 - tz.transition 1945, 4, :o3, 29178809, 12 - tz.transition 1945, 8, :o2, 29180321, 12 - tz.transition 1945, 10, :o1, 58362155, 24 - tz.transition 1946, 4, :o2, 58366019, 24 - tz.transition 1946, 10, :o1, 58370387, 24 - tz.transition 1947, 4, :o2, 29187379, 12 - tz.transition 1947, 10, :o1, 29189563, 12 - tz.transition 1948, 4, :o2, 29191747, 12 - tz.transition 1948, 10, :o1, 29193931, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198299, 12 - tz.transition 1951, 4, :o2, 29204851, 12 - tz.transition 1951, 10, :o1, 29207119, 12 - tz.transition 1952, 4, :o2, 29209303, 12 - tz.transition 1952, 10, :o1, 29211487, 12 - tz.transition 1953, 4, :o2, 29213671, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218039, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222407, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29226775, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231227, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235595, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29239963, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244331, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 4, :o2, 29248699, 12 - tz.transition 1961, 10, :o1, 29250883, 12 - tz.transition 1962, 4, :o2, 29253067, 12 - tz.transition 1962, 10, :o1, 29255335, 12 - tz.transition 1963, 4, :o2, 29257519, 12 - tz.transition 1963, 10, :o1, 29259703, 12 - tz.transition 1964, 4, :o2, 29261887, 12 - tz.transition 1964, 10, :o1, 29264071, 12 - tz.transition 1965, 4, :o2, 29266255, 12 - tz.transition 1965, 10, :o1, 29268439, 12 - tz.transition 1966, 4, :o4, 29270623, 12 - tz.transition 1976, 9, :o1, 212544000 - tz.transition 1977, 3, :o2, 228268800 - tz.transition 1977, 9, :o1, 243993600 - tz.transition 1978, 4, :o2, 260323200 - tz.transition 1978, 10, :o1, 276048000 - tz.transition 1979, 4, :o2, 291772800 - tz.transition 1979, 9, :o1, 307501200 - tz.transition 1980, 3, :o2, 323222400 - tz.transition 1980, 9, :o1, 338950800 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417578400 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb deleted file mode 100644 index a9828e6ef..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Ljubljana.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Ljubljana - include TimezoneDefinition - - linked_timezone 'Europe/Ljubljana', 'Europe/Belgrade' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb deleted file mode 100644 index 64ce41e90..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/London.rb +++ /dev/null @@ -1,288 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module London - include TimezoneDefinition - - timezone 'Europe/London' do |tz| - tz.offset :o0, -75, 0, :LMT - tz.offset :o1, 0, 0, :GMT - tz.offset :o2, 0, 3600, :BST - tz.offset :o3, 0, 7200, :BDST - tz.offset :o4, 3600, 0, :BST - - tz.transition 1847, 12, :o1, 2760187969, 1152 - tz.transition 1916, 5, :o2, 29052055, 12 - tz.transition 1916, 10, :o1, 29053651, 12 - tz.transition 1917, 4, :o2, 29055919, 12 - tz.transition 1917, 9, :o1, 29057863, 12 - tz.transition 1918, 3, :o2, 29060119, 12 - tz.transition 1918, 9, :o1, 29062399, 12 - tz.transition 1919, 3, :o2, 29064571, 12 - tz.transition 1919, 9, :o1, 29066767, 12 - tz.transition 1920, 3, :o2, 29068939, 12 - tz.transition 1920, 10, :o1, 29071471, 12 - tz.transition 1921, 4, :o2, 29073391, 12 - tz.transition 1921, 10, :o1, 29075587, 12 - tz.transition 1922, 3, :o2, 29077675, 12 - tz.transition 1922, 10, :o1, 29080027, 12 - tz.transition 1923, 4, :o2, 29082379, 12 - tz.transition 1923, 9, :o1, 29084143, 12 - tz.transition 1924, 4, :o2, 29086663, 12 - tz.transition 1924, 9, :o1, 29088595, 12 - tz.transition 1925, 4, :o2, 29091115, 12 - tz.transition 1925, 10, :o1, 29093131, 12 - tz.transition 1926, 4, :o2, 29095483, 12 - tz.transition 1926, 10, :o1, 29097499, 12 - tz.transition 1927, 4, :o2, 29099767, 12 - tz.transition 1927, 10, :o1, 29101867, 12 - tz.transition 1928, 4, :o2, 29104303, 12 - tz.transition 1928, 10, :o1, 29106319, 12 - tz.transition 1929, 4, :o2, 29108671, 12 - tz.transition 1929, 10, :o1, 29110687, 12 - tz.transition 1930, 4, :o2, 29112955, 12 - tz.transition 1930, 10, :o1, 29115055, 12 - tz.transition 1931, 4, :o2, 29117407, 12 - tz.transition 1931, 10, :o1, 29119423, 12 - tz.transition 1932, 4, :o2, 29121775, 12 - tz.transition 1932, 10, :o1, 29123791, 12 - tz.transition 1933, 4, :o2, 29126059, 12 - tz.transition 1933, 10, :o1, 29128243, 12 - tz.transition 1934, 4, :o2, 29130595, 12 - tz.transition 1934, 10, :o1, 29132611, 12 - tz.transition 1935, 4, :o2, 29134879, 12 - tz.transition 1935, 10, :o1, 29136979, 12 - tz.transition 1936, 4, :o2, 29139331, 12 - tz.transition 1936, 10, :o1, 29141347, 12 - tz.transition 1937, 4, :o2, 29143699, 12 - tz.transition 1937, 10, :o1, 29145715, 12 - tz.transition 1938, 4, :o2, 29147983, 12 - tz.transition 1938, 10, :o1, 29150083, 12 - tz.transition 1939, 4, :o2, 29152435, 12 - tz.transition 1939, 11, :o1, 29155039, 12 - tz.transition 1940, 2, :o2, 29156215, 12 - tz.transition 1941, 5, :o3, 58322845, 24 - tz.transition 1941, 8, :o2, 58325197, 24 - tz.transition 1942, 4, :o3, 58330909, 24 - tz.transition 1942, 8, :o2, 58333933, 24 - tz.transition 1943, 4, :o3, 58339645, 24 - tz.transition 1943, 8, :o2, 58342837, 24 - tz.transition 1944, 4, :o3, 58348381, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 7, :o2, 58359637, 24 - tz.transition 1945, 10, :o1, 29180827, 12 - tz.transition 1946, 4, :o2, 29183095, 12 - tz.transition 1946, 10, :o1, 29185195, 12 - tz.transition 1947, 3, :o2, 29187127, 12 - tz.transition 1947, 4, :o3, 58374925, 24 - tz.transition 1947, 8, :o2, 58377781, 24 - tz.transition 1947, 11, :o1, 29189899, 12 - tz.transition 1948, 3, :o2, 29191495, 12 - tz.transition 1948, 10, :o1, 29194267, 12 - tz.transition 1949, 4, :o2, 29196115, 12 - tz.transition 1949, 10, :o1, 29198635, 12 - tz.transition 1950, 4, :o2, 29200651, 12 - tz.transition 1950, 10, :o1, 29202919, 12 - tz.transition 1951, 4, :o2, 29205019, 12 - tz.transition 1951, 10, :o1, 29207287, 12 - tz.transition 1952, 4, :o2, 29209471, 12 - tz.transition 1952, 10, :o1, 29211739, 12 - tz.transition 1953, 4, :o2, 29213839, 12 - tz.transition 1953, 10, :o1, 29215855, 12 - tz.transition 1954, 4, :o2, 29218123, 12 - tz.transition 1954, 10, :o1, 29220223, 12 - tz.transition 1955, 4, :o2, 29222575, 12 - tz.transition 1955, 10, :o1, 29224591, 12 - tz.transition 1956, 4, :o2, 29227027, 12 - tz.transition 1956, 10, :o1, 29229043, 12 - tz.transition 1957, 4, :o2, 29231311, 12 - tz.transition 1957, 10, :o1, 29233411, 12 - tz.transition 1958, 4, :o2, 29235763, 12 - tz.transition 1958, 10, :o1, 29237779, 12 - tz.transition 1959, 4, :o2, 29240131, 12 - tz.transition 1959, 10, :o1, 29242147, 12 - tz.transition 1960, 4, :o2, 29244415, 12 - tz.transition 1960, 10, :o1, 29246515, 12 - tz.transition 1961, 3, :o2, 29248615, 12 - tz.transition 1961, 10, :o1, 29251219, 12 - tz.transition 1962, 3, :o2, 29252983, 12 - tz.transition 1962, 10, :o1, 29255587, 12 - tz.transition 1963, 3, :o2, 29257435, 12 - tz.transition 1963, 10, :o1, 29259955, 12 - tz.transition 1964, 3, :o2, 29261719, 12 - tz.transition 1964, 10, :o1, 29264323, 12 - tz.transition 1965, 3, :o2, 29266087, 12 - tz.transition 1965, 10, :o1, 29268691, 12 - tz.transition 1966, 3, :o2, 29270455, 12 - tz.transition 1966, 10, :o1, 29273059, 12 - tz.transition 1967, 3, :o2, 29274823, 12 - tz.transition 1967, 10, :o1, 29277511, 12 - tz.transition 1968, 2, :o2, 29278855, 12 - tz.transition 1968, 10, :o4, 58563755, 24 - tz.transition 1971, 10, :o1, 57722400 - tz.transition 1972, 3, :o2, 69818400 - tz.transition 1972, 10, :o1, 89172000 - tz.transition 1973, 3, :o2, 101268000 - tz.transition 1973, 10, :o1, 120621600 - tz.transition 1974, 3, :o2, 132717600 - tz.transition 1974, 10, :o1, 152071200 - tz.transition 1975, 3, :o2, 164167200 - tz.transition 1975, 10, :o1, 183520800 - tz.transition 1976, 3, :o2, 196221600 - tz.transition 1976, 10, :o1, 214970400 - tz.transition 1977, 3, :o2, 227671200 - tz.transition 1977, 10, :o1, 246420000 - tz.transition 1978, 3, :o2, 259120800 - tz.transition 1978, 10, :o1, 278474400 - tz.transition 1979, 3, :o2, 290570400 - tz.transition 1979, 10, :o1, 309924000 - tz.transition 1980, 3, :o2, 322020000 - tz.transition 1980, 10, :o1, 341373600 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 10, :o1, 372819600 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 10, :o1, 404269200 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 10, :o1, 435718800 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 10, :o1, 467773200 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 10, :o1, 499222800 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 10, :o1, 530672400 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 10, :o1, 562122000 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 10, :o1, 593571600 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 10, :o1, 625626000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 10, :o1, 657075600 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 10, :o1, 688525200 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 10, :o1, 719974800 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 10, :o1, 751424400 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 10, :o1, 782874000 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 10, :o1, 814323600 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb deleted file mode 100644 index 1fb568239..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Madrid.rb +++ /dev/null @@ -1,211 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Madrid - include TimezoneDefinition - - timezone 'Europe/Madrid' do |tz| - tz.offset :o0, -884, 0, :LMT - tz.offset :o1, 0, 0, :WET - tz.offset :o2, 0, 3600, :WEST - tz.offset :o3, 0, 7200, :WEMT - tz.offset :o4, 3600, 0, :CET - tz.offset :o5, 3600, 3600, :CEST - - tz.transition 1901, 1, :o1, 52172327021, 21600 - tz.transition 1917, 5, :o2, 58112507, 24 - tz.transition 1917, 10, :o1, 58116203, 24 - tz.transition 1918, 4, :o2, 58120787, 24 - tz.transition 1918, 10, :o1, 58124963, 24 - tz.transition 1919, 4, :o2, 58129307, 24 - tz.transition 1919, 10, :o1, 58133723, 24 - tz.transition 1924, 4, :o2, 58173419, 24 - tz.transition 1924, 10, :o1, 58177523, 24 - tz.transition 1926, 4, :o2, 58190963, 24 - tz.transition 1926, 10, :o1, 58194995, 24 - tz.transition 1927, 4, :o2, 58199531, 24 - tz.transition 1927, 10, :o1, 58203731, 24 - tz.transition 1928, 4, :o2, 58208435, 24 - tz.transition 1928, 10, :o1, 58212635, 24 - tz.transition 1929, 4, :o2, 58217339, 24 - tz.transition 1929, 10, :o1, 58221371, 24 - tz.transition 1937, 5, :o2, 58288235, 24 - tz.transition 1937, 10, :o1, 58291427, 24 - tz.transition 1938, 3, :o2, 58295531, 24 - tz.transition 1938, 10, :o1, 58300163, 24 - tz.transition 1939, 4, :o2, 58304867, 24 - tz.transition 1939, 10, :o1, 58309067, 24 - tz.transition 1940, 3, :o2, 58312931, 24 - tz.transition 1942, 5, :o3, 29165789, 12 - tz.transition 1942, 9, :o2, 29167253, 12 - tz.transition 1943, 4, :o3, 29169989, 12 - tz.transition 1943, 10, :o2, 29172017, 12 - tz.transition 1944, 4, :o3, 29174357, 12 - tz.transition 1944, 10, :o2, 29176493, 12 - tz.transition 1945, 4, :o3, 29178725, 12 - tz.transition 1945, 9, :o2, 58361483, 24 - tz.transition 1946, 4, :o3, 29183093, 12 - tz.transition 1946, 9, :o4, 29185121, 12 - tz.transition 1949, 4, :o5, 29196449, 12 - tz.transition 1949, 9, :o4, 58396547, 24 - tz.transition 1974, 4, :o5, 135122400 - tz.transition 1974, 10, :o4, 150246000 - tz.transition 1975, 4, :o5, 167176800 - tz.transition 1975, 10, :o4, 181695600 - tz.transition 1976, 3, :o5, 196812000 - tz.transition 1976, 9, :o4, 212540400 - tz.transition 1977, 4, :o5, 228866400 - tz.transition 1977, 9, :o4, 243990000 - tz.transition 1978, 4, :o5, 260402400 - tz.transition 1978, 9, :o4, 276044400 - tz.transition 1979, 4, :o5, 291776400 - tz.transition 1979, 9, :o4, 307501200 - tz.transition 1980, 4, :o5, 323830800 - tz.transition 1980, 9, :o4, 338950800 - tz.transition 1981, 3, :o5, 354675600 - tz.transition 1981, 9, :o4, 370400400 - tz.transition 1982, 3, :o5, 386125200 - tz.transition 1982, 9, :o4, 401850000 - tz.transition 1983, 3, :o5, 417574800 - tz.transition 1983, 9, :o4, 433299600 - tz.transition 1984, 3, :o5, 449024400 - tz.transition 1984, 9, :o4, 465354000 - tz.transition 1985, 3, :o5, 481078800 - tz.transition 1985, 9, :o4, 496803600 - tz.transition 1986, 3, :o5, 512528400 - tz.transition 1986, 9, :o4, 528253200 - tz.transition 1987, 3, :o5, 543978000 - tz.transition 1987, 9, :o4, 559702800 - tz.transition 1988, 3, :o5, 575427600 - tz.transition 1988, 9, :o4, 591152400 - tz.transition 1989, 3, :o5, 606877200 - tz.transition 1989, 9, :o4, 622602000 - tz.transition 1990, 3, :o5, 638326800 - tz.transition 1990, 9, :o4, 654656400 - tz.transition 1991, 3, :o5, 670381200 - tz.transition 1991, 9, :o4, 686106000 - tz.transition 1992, 3, :o5, 701830800 - tz.transition 1992, 9, :o4, 717555600 - tz.transition 1993, 3, :o5, 733280400 - tz.transition 1993, 9, :o4, 749005200 - tz.transition 1994, 3, :o5, 764730000 - tz.transition 1994, 9, :o4, 780454800 - tz.transition 1995, 3, :o5, 796179600 - tz.transition 1995, 9, :o4, 811904400 - tz.transition 1996, 3, :o5, 828234000 - tz.transition 1996, 10, :o4, 846378000 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o4, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o4, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o4, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb deleted file mode 100644 index fa15816cc..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Minsk.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Minsk - include TimezoneDefinition - - timezone 'Europe/Minsk' do |tz| - tz.offset :o0, 6616, 0, :LMT - tz.offset :o1, 6600, 0, :MMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 10800, 0, :MSK - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 26003326573, 10800 - tz.transition 1924, 5, :o2, 349042669, 144 - tz.transition 1930, 6, :o3, 29113781, 12 - tz.transition 1941, 6, :o4, 19441387, 8 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 7, :o3, 29175293, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o3, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o3, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o3, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o3, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o3, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o3, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o3, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o3, 591145200 - tz.transition 1989, 3, :o6, 606870000 - tz.transition 1989, 9, :o3, 622594800 - tz.transition 1991, 3, :o7, 670374000 - tz.transition 1991, 9, :o2, 686102400 - tz.transition 1992, 3, :o7, 701820000 - tz.transition 1992, 9, :o2, 717544800 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o2, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o2, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o2, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o2, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o2, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o2, 909273600 - tz.transition 1999, 3, :o7, 922579200 - tz.transition 1999, 10, :o2, 941328000 - tz.transition 2000, 3, :o7, 954028800 - tz.transition 2000, 10, :o2, 972777600 - tz.transition 2001, 3, :o7, 985478400 - tz.transition 2001, 10, :o2, 1004227200 - tz.transition 2002, 3, :o7, 1017532800 - tz.transition 2002, 10, :o2, 1035676800 - tz.transition 2003, 3, :o7, 1048982400 - tz.transition 2003, 10, :o2, 1067126400 - tz.transition 2004, 3, :o7, 1080432000 - tz.transition 2004, 10, :o2, 1099180800 - tz.transition 2005, 3, :o7, 1111881600 - tz.transition 2005, 10, :o2, 1130630400 - tz.transition 2006, 3, :o7, 1143331200 - tz.transition 2006, 10, :o2, 1162080000 - tz.transition 2007, 3, :o7, 1174780800 - tz.transition 2007, 10, :o2, 1193529600 - tz.transition 2008, 3, :o7, 1206835200 - tz.transition 2008, 10, :o2, 1224979200 - tz.transition 2009, 3, :o7, 1238284800 - tz.transition 2009, 10, :o2, 1256428800 - tz.transition 2010, 3, :o7, 1269734400 - tz.transition 2010, 10, :o2, 1288483200 - tz.transition 2011, 3, :o7, 1301184000 - tz.transition 2011, 10, :o2, 1319932800 - tz.transition 2012, 3, :o7, 1332633600 - tz.transition 2012, 10, :o2, 1351382400 - tz.transition 2013, 3, :o7, 1364688000 - tz.transition 2013, 10, :o2, 1382832000 - tz.transition 2014, 3, :o7, 1396137600 - tz.transition 2014, 10, :o2, 1414281600 - tz.transition 2015, 3, :o7, 1427587200 - tz.transition 2015, 10, :o2, 1445731200 - tz.transition 2016, 3, :o7, 1459036800 - tz.transition 2016, 10, :o2, 1477785600 - tz.transition 2017, 3, :o7, 1490486400 - tz.transition 2017, 10, :o2, 1509235200 - tz.transition 2018, 3, :o7, 1521936000 - tz.transition 2018, 10, :o2, 1540684800 - tz.transition 2019, 3, :o7, 1553990400 - tz.transition 2019, 10, :o2, 1572134400 - tz.transition 2020, 3, :o7, 1585440000 - tz.transition 2020, 10, :o2, 1603584000 - tz.transition 2021, 3, :o7, 1616889600 - tz.transition 2021, 10, :o2, 1635638400 - tz.transition 2022, 3, :o7, 1648339200 - tz.transition 2022, 10, :o2, 1667088000 - tz.transition 2023, 3, :o7, 1679788800 - tz.transition 2023, 10, :o2, 1698537600 - tz.transition 2024, 3, :o7, 1711843200 - tz.transition 2024, 10, :o2, 1729987200 - tz.transition 2025, 3, :o7, 1743292800 - tz.transition 2025, 10, :o2, 1761436800 - tz.transition 2026, 3, :o7, 1774742400 - tz.transition 2026, 10, :o2, 1792886400 - tz.transition 2027, 3, :o7, 1806192000 - tz.transition 2027, 10, :o2, 1824940800 - tz.transition 2028, 3, :o7, 1837641600 - tz.transition 2028, 10, :o2, 1856390400 - tz.transition 2029, 3, :o7, 1869091200 - tz.transition 2029, 10, :o2, 1887840000 - tz.transition 2030, 3, :o7, 1901145600 - tz.transition 2030, 10, :o2, 1919289600 - tz.transition 2031, 3, :o7, 1932595200 - tz.transition 2031, 10, :o2, 1950739200 - tz.transition 2032, 3, :o7, 1964044800 - tz.transition 2032, 10, :o2, 1982793600 - tz.transition 2033, 3, :o7, 1995494400 - tz.transition 2033, 10, :o2, 2014243200 - tz.transition 2034, 3, :o7, 2026944000 - tz.transition 2034, 10, :o2, 2045692800 - tz.transition 2035, 3, :o7, 2058393600 - tz.transition 2035, 10, :o2, 2077142400 - tz.transition 2036, 3, :o7, 2090448000 - tz.transition 2036, 10, :o2, 2108592000 - tz.transition 2037, 3, :o7, 2121897600 - tz.transition 2037, 10, :o2, 2140041600 - tz.transition 2038, 3, :o7, 4931021, 2 - tz.transition 2038, 10, :o2, 4931455, 2 - tz.transition 2039, 3, :o7, 4931749, 2 - tz.transition 2039, 10, :o2, 4932183, 2 - tz.transition 2040, 3, :o7, 4932477, 2 - tz.transition 2040, 10, :o2, 4932911, 2 - tz.transition 2041, 3, :o7, 4933219, 2 - tz.transition 2041, 10, :o2, 4933639, 2 - tz.transition 2042, 3, :o7, 4933947, 2 - tz.transition 2042, 10, :o2, 4934367, 2 - tz.transition 2043, 3, :o7, 4934675, 2 - tz.transition 2043, 10, :o2, 4935095, 2 - tz.transition 2044, 3, :o7, 4935403, 2 - tz.transition 2044, 10, :o2, 4935837, 2 - tz.transition 2045, 3, :o7, 4936131, 2 - tz.transition 2045, 10, :o2, 4936565, 2 - tz.transition 2046, 3, :o7, 4936859, 2 - tz.transition 2046, 10, :o2, 4937293, 2 - tz.transition 2047, 3, :o7, 4937601, 2 - tz.transition 2047, 10, :o2, 4938021, 2 - tz.transition 2048, 3, :o7, 4938329, 2 - tz.transition 2048, 10, :o2, 4938749, 2 - tz.transition 2049, 3, :o7, 4939057, 2 - tz.transition 2049, 10, :o2, 4939491, 2 - tz.transition 2050, 3, :o7, 4939785, 2 - tz.transition 2050, 10, :o2, 4940219, 2 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb deleted file mode 100644 index ef269b675..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Moscow.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Moscow - include TimezoneDefinition - - timezone 'Europe/Moscow' do |tz| - tz.offset :o0, 9020, 0, :LMT - tz.offset :o1, 9000, 0, :MMT - tz.offset :o2, 9048, 0, :MMT - tz.offset :o3, 9048, 3600, :MST - tz.offset :o4, 9048, 7200, :MDST - tz.offset :o5, 10800, 3600, :MSD - tz.offset :o6, 10800, 0, :MSK - tz.offset :o7, 10800, 7200, :MSD - tz.offset :o8, 7200, 0, :EET - tz.offset :o9, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 10401330509, 4320 - tz.transition 1916, 7, :o2, 116210275, 48 - tz.transition 1917, 7, :o3, 8717080873, 3600 - tz.transition 1917, 12, :o2, 8717725273, 3600 - tz.transition 1918, 5, :o4, 8718283123, 3600 - tz.transition 1918, 9, :o3, 8718668473, 3600 - tz.transition 1919, 5, :o4, 8719597123, 3600 - tz.transition 1919, 6, :o5, 8719705423, 3600 - tz.transition 1919, 8, :o6, 7266559, 3 - tz.transition 1921, 2, :o5, 7268206, 3 - tz.transition 1921, 3, :o7, 58146463, 24 - tz.transition 1921, 8, :o5, 58150399, 24 - tz.transition 1921, 9, :o6, 7268890, 3 - tz.transition 1922, 9, :o8, 19386627, 8 - tz.transition 1930, 6, :o6, 29113781, 12 - tz.transition 1981, 3, :o5, 354920400 - tz.transition 1981, 9, :o6, 370728000 - tz.transition 1982, 3, :o5, 386456400 - tz.transition 1982, 9, :o6, 402264000 - tz.transition 1983, 3, :o5, 417992400 - tz.transition 1983, 9, :o6, 433800000 - tz.transition 1984, 3, :o5, 449614800 - tz.transition 1984, 9, :o6, 465346800 - tz.transition 1985, 3, :o5, 481071600 - tz.transition 1985, 9, :o6, 496796400 - tz.transition 1986, 3, :o5, 512521200 - tz.transition 1986, 9, :o6, 528246000 - tz.transition 1987, 3, :o5, 543970800 - tz.transition 1987, 9, :o6, 559695600 - tz.transition 1988, 3, :o5, 575420400 - tz.transition 1988, 9, :o6, 591145200 - tz.transition 1989, 3, :o5, 606870000 - tz.transition 1989, 9, :o6, 622594800 - tz.transition 1990, 3, :o5, 638319600 - tz.transition 1990, 9, :o6, 654649200 - tz.transition 1991, 3, :o9, 670374000 - tz.transition 1991, 9, :o8, 686102400 - tz.transition 1992, 1, :o6, 695779200 - tz.transition 1992, 3, :o5, 701812800 - tz.transition 1992, 9, :o6, 717534000 - tz.transition 1993, 3, :o5, 733273200 - tz.transition 1993, 9, :o6, 748998000 - tz.transition 1994, 3, :o5, 764722800 - tz.transition 1994, 9, :o6, 780447600 - tz.transition 1995, 3, :o5, 796172400 - tz.transition 1995, 9, :o6, 811897200 - tz.transition 1996, 3, :o5, 828226800 - tz.transition 1996, 10, :o6, 846370800 - tz.transition 1997, 3, :o5, 859676400 - tz.transition 1997, 10, :o6, 877820400 - tz.transition 1998, 3, :o5, 891126000 - tz.transition 1998, 10, :o6, 909270000 - tz.transition 1999, 3, :o5, 922575600 - tz.transition 1999, 10, :o6, 941324400 - tz.transition 2000, 3, :o5, 954025200 - tz.transition 2000, 10, :o6, 972774000 - tz.transition 2001, 3, :o5, 985474800 - tz.transition 2001, 10, :o6, 1004223600 - tz.transition 2002, 3, :o5, 1017529200 - tz.transition 2002, 10, :o6, 1035673200 - tz.transition 2003, 3, :o5, 1048978800 - tz.transition 2003, 10, :o6, 1067122800 - tz.transition 2004, 3, :o5, 1080428400 - tz.transition 2004, 10, :o6, 1099177200 - tz.transition 2005, 3, :o5, 1111878000 - tz.transition 2005, 10, :o6, 1130626800 - tz.transition 2006, 3, :o5, 1143327600 - tz.transition 2006, 10, :o6, 1162076400 - tz.transition 2007, 3, :o5, 1174777200 - tz.transition 2007, 10, :o6, 1193526000 - tz.transition 2008, 3, :o5, 1206831600 - tz.transition 2008, 10, :o6, 1224975600 - tz.transition 2009, 3, :o5, 1238281200 - tz.transition 2009, 10, :o6, 1256425200 - tz.transition 2010, 3, :o5, 1269730800 - tz.transition 2010, 10, :o6, 1288479600 - tz.transition 2011, 3, :o5, 1301180400 - tz.transition 2011, 10, :o6, 1319929200 - tz.transition 2012, 3, :o5, 1332630000 - tz.transition 2012, 10, :o6, 1351378800 - tz.transition 2013, 3, :o5, 1364684400 - tz.transition 2013, 10, :o6, 1382828400 - tz.transition 2014, 3, :o5, 1396134000 - tz.transition 2014, 10, :o6, 1414278000 - tz.transition 2015, 3, :o5, 1427583600 - tz.transition 2015, 10, :o6, 1445727600 - tz.transition 2016, 3, :o5, 1459033200 - tz.transition 2016, 10, :o6, 1477782000 - tz.transition 2017, 3, :o5, 1490482800 - tz.transition 2017, 10, :o6, 1509231600 - tz.transition 2018, 3, :o5, 1521932400 - tz.transition 2018, 10, :o6, 1540681200 - tz.transition 2019, 3, :o5, 1553986800 - tz.transition 2019, 10, :o6, 1572130800 - tz.transition 2020, 3, :o5, 1585436400 - tz.transition 2020, 10, :o6, 1603580400 - tz.transition 2021, 3, :o5, 1616886000 - tz.transition 2021, 10, :o6, 1635634800 - tz.transition 2022, 3, :o5, 1648335600 - tz.transition 2022, 10, :o6, 1667084400 - tz.transition 2023, 3, :o5, 1679785200 - tz.transition 2023, 10, :o6, 1698534000 - tz.transition 2024, 3, :o5, 1711839600 - tz.transition 2024, 10, :o6, 1729983600 - tz.transition 2025, 3, :o5, 1743289200 - tz.transition 2025, 10, :o6, 1761433200 - tz.transition 2026, 3, :o5, 1774738800 - tz.transition 2026, 10, :o6, 1792882800 - tz.transition 2027, 3, :o5, 1806188400 - tz.transition 2027, 10, :o6, 1824937200 - tz.transition 2028, 3, :o5, 1837638000 - tz.transition 2028, 10, :o6, 1856386800 - tz.transition 2029, 3, :o5, 1869087600 - tz.transition 2029, 10, :o6, 1887836400 - tz.transition 2030, 3, :o5, 1901142000 - tz.transition 2030, 10, :o6, 1919286000 - tz.transition 2031, 3, :o5, 1932591600 - tz.transition 2031, 10, :o6, 1950735600 - tz.transition 2032, 3, :o5, 1964041200 - tz.transition 2032, 10, :o6, 1982790000 - tz.transition 2033, 3, :o5, 1995490800 - tz.transition 2033, 10, :o6, 2014239600 - tz.transition 2034, 3, :o5, 2026940400 - tz.transition 2034, 10, :o6, 2045689200 - tz.transition 2035, 3, :o5, 2058390000 - tz.transition 2035, 10, :o6, 2077138800 - tz.transition 2036, 3, :o5, 2090444400 - tz.transition 2036, 10, :o6, 2108588400 - tz.transition 2037, 3, :o5, 2121894000 - tz.transition 2037, 10, :o6, 2140038000 - tz.transition 2038, 3, :o5, 59172251, 24 - tz.transition 2038, 10, :o6, 59177459, 24 - tz.transition 2039, 3, :o5, 59180987, 24 - tz.transition 2039, 10, :o6, 59186195, 24 - tz.transition 2040, 3, :o5, 59189723, 24 - tz.transition 2040, 10, :o6, 59194931, 24 - tz.transition 2041, 3, :o5, 59198627, 24 - tz.transition 2041, 10, :o6, 59203667, 24 - tz.transition 2042, 3, :o5, 59207363, 24 - tz.transition 2042, 10, :o6, 59212403, 24 - tz.transition 2043, 3, :o5, 59216099, 24 - tz.transition 2043, 10, :o6, 59221139, 24 - tz.transition 2044, 3, :o5, 59224835, 24 - tz.transition 2044, 10, :o6, 59230043, 24 - tz.transition 2045, 3, :o5, 59233571, 24 - tz.transition 2045, 10, :o6, 59238779, 24 - tz.transition 2046, 3, :o5, 59242307, 24 - tz.transition 2046, 10, :o6, 59247515, 24 - tz.transition 2047, 3, :o5, 59251211, 24 - tz.transition 2047, 10, :o6, 59256251, 24 - tz.transition 2048, 3, :o5, 59259947, 24 - tz.transition 2048, 10, :o6, 59264987, 24 - tz.transition 2049, 3, :o5, 59268683, 24 - tz.transition 2049, 10, :o6, 59273891, 24 - tz.transition 2050, 3, :o5, 59277419, 24 - tz.transition 2050, 10, :o6, 59282627, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb deleted file mode 100644 index e3236c0ba..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Paris.rb +++ /dev/null @@ -1,232 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Paris - include TimezoneDefinition - - timezone 'Europe/Paris' do |tz| - tz.offset :o0, 561, 0, :LMT - tz.offset :o1, 561, 0, :PMT - tz.offset :o2, 0, 0, :WET - tz.offset :o3, 0, 3600, :WEST - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 3600, 0, :CET - tz.offset :o6, 0, 7200, :WEMT - - tz.transition 1891, 3, :o1, 69460027033, 28800 - tz.transition 1911, 3, :o2, 69670267033, 28800 - tz.transition 1916, 6, :o3, 58104707, 24 - tz.transition 1916, 10, :o2, 58107323, 24 - tz.transition 1917, 3, :o3, 58111499, 24 - tz.transition 1917, 10, :o2, 58116227, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124963, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133699, 24 - tz.transition 1920, 2, :o3, 58136867, 24 - tz.transition 1920, 10, :o2, 58142915, 24 - tz.transition 1921, 3, :o3, 58146323, 24 - tz.transition 1921, 10, :o2, 58151723, 24 - tz.transition 1922, 3, :o3, 58155347, 24 - tz.transition 1922, 10, :o2, 58160051, 24 - tz.transition 1923, 5, :o3, 58165595, 24 - tz.transition 1923, 10, :o2, 58168787, 24 - tz.transition 1924, 3, :o3, 58172987, 24 - tz.transition 1924, 10, :o2, 58177523, 24 - tz.transition 1925, 4, :o3, 58181891, 24 - tz.transition 1925, 10, :o2, 58186259, 24 - tz.transition 1926, 4, :o3, 58190963, 24 - tz.transition 1926, 10, :o2, 58194995, 24 - tz.transition 1927, 4, :o3, 58199531, 24 - tz.transition 1927, 10, :o2, 58203731, 24 - tz.transition 1928, 4, :o3, 58208435, 24 - tz.transition 1928, 10, :o2, 58212635, 24 - tz.transition 1929, 4, :o3, 58217339, 24 - tz.transition 1929, 10, :o2, 58221371, 24 - tz.transition 1930, 4, :o3, 58225907, 24 - tz.transition 1930, 10, :o2, 58230107, 24 - tz.transition 1931, 4, :o3, 58234811, 24 - tz.transition 1931, 10, :o2, 58238843, 24 - tz.transition 1932, 4, :o3, 58243211, 24 - tz.transition 1932, 10, :o2, 58247579, 24 - tz.transition 1933, 3, :o3, 58251779, 24 - tz.transition 1933, 10, :o2, 58256483, 24 - tz.transition 1934, 4, :o3, 58260851, 24 - tz.transition 1934, 10, :o2, 58265219, 24 - tz.transition 1935, 3, :o3, 58269419, 24 - tz.transition 1935, 10, :o2, 58273955, 24 - tz.transition 1936, 4, :o3, 58278659, 24 - tz.transition 1936, 10, :o2, 58282691, 24 - tz.transition 1937, 4, :o3, 58287059, 24 - tz.transition 1937, 10, :o2, 58291427, 24 - tz.transition 1938, 3, :o3, 58295627, 24 - tz.transition 1938, 10, :o2, 58300163, 24 - tz.transition 1939, 4, :o3, 58304867, 24 - tz.transition 1939, 11, :o2, 58310075, 24 - tz.transition 1940, 2, :o3, 29156215, 12 - tz.transition 1940, 6, :o4, 29157545, 12 - tz.transition 1942, 11, :o5, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o5, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 8, :o6, 29175929, 12 - tz.transition 1944, 10, :o3, 58352915, 24 - tz.transition 1945, 4, :o6, 58357141, 24 - tz.transition 1945, 9, :o5, 58361149, 24 - tz.transition 1976, 3, :o4, 196819200 - tz.transition 1976, 9, :o5, 212540400 - tz.transition 1977, 4, :o4, 228877200 - tz.transition 1977, 9, :o5, 243997200 - tz.transition 1978, 4, :o4, 260326800 - tz.transition 1978, 10, :o5, 276051600 - tz.transition 1979, 4, :o4, 291776400 - tz.transition 1979, 9, :o5, 307501200 - tz.transition 1980, 4, :o4, 323830800 - tz.transition 1980, 9, :o5, 338950800 - tz.transition 1981, 3, :o4, 354675600 - tz.transition 1981, 9, :o5, 370400400 - tz.transition 1982, 3, :o4, 386125200 - tz.transition 1982, 9, :o5, 401850000 - tz.transition 1983, 3, :o4, 417574800 - tz.transition 1983, 9, :o5, 433299600 - tz.transition 1984, 3, :o4, 449024400 - tz.transition 1984, 9, :o5, 465354000 - tz.transition 1985, 3, :o4, 481078800 - tz.transition 1985, 9, :o5, 496803600 - tz.transition 1986, 3, :o4, 512528400 - tz.transition 1986, 9, :o5, 528253200 - tz.transition 1987, 3, :o4, 543978000 - tz.transition 1987, 9, :o5, 559702800 - tz.transition 1988, 3, :o4, 575427600 - tz.transition 1988, 9, :o5, 591152400 - tz.transition 1989, 3, :o4, 606877200 - tz.transition 1989, 9, :o5, 622602000 - tz.transition 1990, 3, :o4, 638326800 - tz.transition 1990, 9, :o5, 654656400 - tz.transition 1991, 3, :o4, 670381200 - tz.transition 1991, 9, :o5, 686106000 - tz.transition 1992, 3, :o4, 701830800 - tz.transition 1992, 9, :o5, 717555600 - tz.transition 1993, 3, :o4, 733280400 - tz.transition 1993, 9, :o5, 749005200 - tz.transition 1994, 3, :o4, 764730000 - tz.transition 1994, 9, :o5, 780454800 - tz.transition 1995, 3, :o4, 796179600 - tz.transition 1995, 9, :o5, 811904400 - tz.transition 1996, 3, :o4, 828234000 - tz.transition 1996, 10, :o5, 846378000 - tz.transition 1997, 3, :o4, 859683600 - tz.transition 1997, 10, :o5, 877827600 - tz.transition 1998, 3, :o4, 891133200 - tz.transition 1998, 10, :o5, 909277200 - tz.transition 1999, 3, :o4, 922582800 - tz.transition 1999, 10, :o5, 941331600 - tz.transition 2000, 3, :o4, 954032400 - tz.transition 2000, 10, :o5, 972781200 - tz.transition 2001, 3, :o4, 985482000 - tz.transition 2001, 10, :o5, 1004230800 - tz.transition 2002, 3, :o4, 1017536400 - tz.transition 2002, 10, :o5, 1035680400 - tz.transition 2003, 3, :o4, 1048986000 - tz.transition 2003, 10, :o5, 1067130000 - tz.transition 2004, 3, :o4, 1080435600 - tz.transition 2004, 10, :o5, 1099184400 - tz.transition 2005, 3, :o4, 1111885200 - tz.transition 2005, 10, :o5, 1130634000 - tz.transition 2006, 3, :o4, 1143334800 - tz.transition 2006, 10, :o5, 1162083600 - tz.transition 2007, 3, :o4, 1174784400 - tz.transition 2007, 10, :o5, 1193533200 - tz.transition 2008, 3, :o4, 1206838800 - tz.transition 2008, 10, :o5, 1224982800 - tz.transition 2009, 3, :o4, 1238288400 - tz.transition 2009, 10, :o5, 1256432400 - tz.transition 2010, 3, :o4, 1269738000 - tz.transition 2010, 10, :o5, 1288486800 - tz.transition 2011, 3, :o4, 1301187600 - tz.transition 2011, 10, :o5, 1319936400 - tz.transition 2012, 3, :o4, 1332637200 - tz.transition 2012, 10, :o5, 1351386000 - tz.transition 2013, 3, :o4, 1364691600 - tz.transition 2013, 10, :o5, 1382835600 - tz.transition 2014, 3, :o4, 1396141200 - tz.transition 2014, 10, :o5, 1414285200 - tz.transition 2015, 3, :o4, 1427590800 - tz.transition 2015, 10, :o5, 1445734800 - tz.transition 2016, 3, :o4, 1459040400 - tz.transition 2016, 10, :o5, 1477789200 - tz.transition 2017, 3, :o4, 1490490000 - tz.transition 2017, 10, :o5, 1509238800 - tz.transition 2018, 3, :o4, 1521939600 - tz.transition 2018, 10, :o5, 1540688400 - tz.transition 2019, 3, :o4, 1553994000 - tz.transition 2019, 10, :o5, 1572138000 - tz.transition 2020, 3, :o4, 1585443600 - tz.transition 2020, 10, :o5, 1603587600 - tz.transition 2021, 3, :o4, 1616893200 - tz.transition 2021, 10, :o5, 1635642000 - tz.transition 2022, 3, :o4, 1648342800 - tz.transition 2022, 10, :o5, 1667091600 - tz.transition 2023, 3, :o4, 1679792400 - tz.transition 2023, 10, :o5, 1698541200 - tz.transition 2024, 3, :o4, 1711846800 - tz.transition 2024, 10, :o5, 1729990800 - tz.transition 2025, 3, :o4, 1743296400 - tz.transition 2025, 10, :o5, 1761440400 - tz.transition 2026, 3, :o4, 1774746000 - tz.transition 2026, 10, :o5, 1792890000 - tz.transition 2027, 3, :o4, 1806195600 - tz.transition 2027, 10, :o5, 1824944400 - tz.transition 2028, 3, :o4, 1837645200 - tz.transition 2028, 10, :o5, 1856394000 - tz.transition 2029, 3, :o4, 1869094800 - tz.transition 2029, 10, :o5, 1887843600 - tz.transition 2030, 3, :o4, 1901149200 - tz.transition 2030, 10, :o5, 1919293200 - tz.transition 2031, 3, :o4, 1932598800 - tz.transition 2031, 10, :o5, 1950742800 - tz.transition 2032, 3, :o4, 1964048400 - tz.transition 2032, 10, :o5, 1982797200 - tz.transition 2033, 3, :o4, 1995498000 - tz.transition 2033, 10, :o5, 2014246800 - tz.transition 2034, 3, :o4, 2026947600 - tz.transition 2034, 10, :o5, 2045696400 - tz.transition 2035, 3, :o4, 2058397200 - tz.transition 2035, 10, :o5, 2077146000 - tz.transition 2036, 3, :o4, 2090451600 - tz.transition 2036, 10, :o5, 2108595600 - tz.transition 2037, 3, :o4, 2121901200 - tz.transition 2037, 10, :o5, 2140045200 - tz.transition 2038, 3, :o4, 59172253, 24 - tz.transition 2038, 10, :o5, 59177461, 24 - tz.transition 2039, 3, :o4, 59180989, 24 - tz.transition 2039, 10, :o5, 59186197, 24 - tz.transition 2040, 3, :o4, 59189725, 24 - tz.transition 2040, 10, :o5, 59194933, 24 - tz.transition 2041, 3, :o4, 59198629, 24 - tz.transition 2041, 10, :o5, 59203669, 24 - tz.transition 2042, 3, :o4, 59207365, 24 - tz.transition 2042, 10, :o5, 59212405, 24 - tz.transition 2043, 3, :o4, 59216101, 24 - tz.transition 2043, 10, :o5, 59221141, 24 - tz.transition 2044, 3, :o4, 59224837, 24 - tz.transition 2044, 10, :o5, 59230045, 24 - tz.transition 2045, 3, :o4, 59233573, 24 - tz.transition 2045, 10, :o5, 59238781, 24 - tz.transition 2046, 3, :o4, 59242309, 24 - tz.transition 2046, 10, :o5, 59247517, 24 - tz.transition 2047, 3, :o4, 59251213, 24 - tz.transition 2047, 10, :o5, 59256253, 24 - tz.transition 2048, 3, :o4, 59259949, 24 - tz.transition 2048, 10, :o5, 59264989, 24 - tz.transition 2049, 3, :o4, 59268685, 24 - tz.transition 2049, 10, :o5, 59273893, 24 - tz.transition 2050, 3, :o4, 59277421, 24 - tz.transition 2050, 10, :o5, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb deleted file mode 100644 index bcabee96c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Prague.rb +++ /dev/null @@ -1,187 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Prague - include TimezoneDefinition - - timezone 'Europe/Prague' do |tz| - tz.offset :o0, 3464, 0, :LMT - tz.offset :o1, 3464, 0, :PMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1849, 12, :o1, 25884991367, 10800 - tz.transition 1891, 9, :o2, 26049669767, 10800 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1940, 4, :o3, 58313293, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352413, 24 - tz.transition 1945, 4, :o3, 58357285, 24 - tz.transition 1945, 11, :o2, 58362661, 24 - tz.transition 1946, 5, :o3, 58366717, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 4, :o3, 58375093, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392373, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1979, 4, :o3, 291776400 - tz.transition 1979, 9, :o2, 307501200 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb deleted file mode 100644 index 784837f75..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Riga.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Riga - include TimezoneDefinition - - timezone 'Europe/Riga' do |tz| - tz.offset :o0, 5784, 0, :LMT - tz.offset :o1, 5784, 0, :RMT - tz.offset :o2, 5784, 3600, :LST - tz.offset :o3, 7200, 0, :EET - tz.offset :o4, 10800, 0, :MSK - tz.offset :o5, 3600, 3600, :CEST - tz.offset :o6, 3600, 0, :CET - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 8667775559, 3600 - tz.transition 1918, 4, :o2, 8718114659, 3600 - tz.transition 1918, 9, :o1, 8718669059, 3600 - tz.transition 1919, 4, :o2, 8719378259, 3600 - tz.transition 1919, 5, :o1, 8719561859, 3600 - tz.transition 1926, 5, :o3, 8728727159, 3600 - tz.transition 1940, 8, :o4, 29158157, 12 - tz.transition 1941, 6, :o5, 19441411, 8 - tz.transition 1942, 11, :o6, 58335973, 24 - tz.transition 1943, 3, :o5, 58339501, 24 - tz.transition 1943, 10, :o6, 58344037, 24 - tz.transition 1944, 4, :o5, 58348405, 24 - tz.transition 1944, 10, :o6, 58352773, 24 - tz.transition 1944, 10, :o4, 58353035, 24 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o4, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o4, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o4, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o4, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o4, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o4, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o4, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o4, 591145200 - tz.transition 1989, 3, :o8, 606870000 - tz.transition 1989, 9, :o3, 622598400 - tz.transition 1990, 3, :o8, 638323200 - tz.transition 1990, 9, :o3, 654652800 - tz.transition 1991, 3, :o8, 670377600 - tz.transition 1991, 9, :o3, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o3, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o3, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o3, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o3, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 9, :o3, 843955200 - tz.transition 1997, 3, :o8, 859683600 - tz.transition 1997, 10, :o3, 877827600 - tz.transition 1998, 3, :o8, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o8, 922582800 - tz.transition 1999, 10, :o3, 941331600 - tz.transition 2001, 3, :o8, 985482000 - tz.transition 2001, 10, :o3, 1004230800 - tz.transition 2002, 3, :o8, 1017536400 - tz.transition 2002, 10, :o3, 1035680400 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o3, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o3, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o3, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o3, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o3, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o3, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o3, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o3, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o3, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o3, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o3, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o3, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o3, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o3, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o3, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o3, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o3, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o3, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o3, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o3, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o3, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o3, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o3, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o3, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o3, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o3, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o3, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o3, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o3, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o3, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o3, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o3, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o3, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o3, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o3, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o3, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o3, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o3, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o3, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o3, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o3, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o3, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o3, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o3, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o3, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o3, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o3, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o3, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb deleted file mode 100644 index aa7b43d9d..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Rome.rb +++ /dev/null @@ -1,215 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Rome - include TimezoneDefinition - - timezone 'Europe/Rome' do |tz| - tz.offset :o0, 2996, 0, :LMT - tz.offset :o1, 2996, 0, :RMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1866, 9, :o1, 51901915651, 21600 - tz.transition 1893, 10, :o2, 52115798851, 21600 - tz.transition 1916, 6, :o3, 58104419, 24 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 3, :o3, 58111667, 24 - tz.transition 1917, 9, :o2, 58116035, 24 - tz.transition 1918, 3, :o3, 58119899, 24 - tz.transition 1918, 10, :o2, 58124939, 24 - tz.transition 1919, 3, :o3, 58128467, 24 - tz.transition 1919, 10, :o2, 58133675, 24 - tz.transition 1920, 3, :o3, 58137707, 24 - tz.transition 1920, 9, :o2, 58142075, 24 - tz.transition 1940, 6, :o3, 58315091, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o2, 58352411, 24 - tz.transition 1945, 4, :o3, 58357141, 24 - tz.transition 1945, 9, :o2, 58361123, 24 - tz.transition 1946, 3, :o3, 58365517, 24 - tz.transition 1946, 10, :o2, 58370389, 24 - tz.transition 1947, 3, :o3, 58374251, 24 - tz.transition 1947, 10, :o2, 58379123, 24 - tz.transition 1948, 2, :o3, 58382653, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1966, 5, :o3, 58542419, 24 - tz.transition 1966, 9, :o2, 29272721, 12 - tz.transition 1967, 5, :o3, 58551323, 24 - tz.transition 1967, 9, :o2, 29277089, 12 - tz.transition 1968, 5, :o3, 58560059, 24 - tz.transition 1968, 9, :o2, 29281457, 12 - tz.transition 1969, 5, :o3, 58568963, 24 - tz.transition 1969, 9, :o2, 29285909, 12 - tz.transition 1970, 5, :o3, 12956400 - tz.transition 1970, 9, :o2, 23234400 - tz.transition 1971, 5, :o3, 43801200 - tz.transition 1971, 9, :o2, 54687600 - tz.transition 1972, 5, :o3, 75855600 - tz.transition 1972, 9, :o2, 86738400 - tz.transition 1973, 6, :o3, 107910000 - tz.transition 1973, 9, :o2, 118188000 - tz.transition 1974, 5, :o3, 138754800 - tz.transition 1974, 9, :o2, 149637600 - tz.transition 1975, 5, :o3, 170809200 - tz.transition 1975, 9, :o2, 181090800 - tz.transition 1976, 5, :o3, 202258800 - tz.transition 1976, 9, :o2, 212540400 - tz.transition 1977, 5, :o3, 233103600 - tz.transition 1977, 9, :o2, 243990000 - tz.transition 1978, 5, :o3, 265158000 - tz.transition 1978, 9, :o2, 276044400 - tz.transition 1979, 5, :o3, 296607600 - tz.transition 1979, 9, :o2, 307494000 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb deleted file mode 100644 index 068c5fe6a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sarajevo.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sarajevo - include TimezoneDefinition - - linked_timezone 'Europe/Sarajevo', 'Europe/Belgrade' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb deleted file mode 100644 index 10b71f285..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Skopje.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Skopje - include TimezoneDefinition - - linked_timezone 'Europe/Skopje', 'Europe/Belgrade' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb deleted file mode 100644 index 38a70eceb..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Sofia.rb +++ /dev/null @@ -1,173 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Sofia - include TimezoneDefinition - - timezone 'Europe/Sofia' do |tz| - tz.offset :o0, 5596, 0, :LMT - tz.offset :o1, 7016, 0, :IMT - tz.offset :o2, 7200, 0, :EET - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 3600, 3600, :CEST - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653401, 21600 - tz.transition 1894, 11, :o2, 26062154123, 10800 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o4, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o4, 58348405, 24 - tz.transition 1944, 10, :o3, 58352773, 24 - tz.transition 1945, 4, :o2, 29178571, 12 - tz.transition 1979, 3, :o5, 291762000 - tz.transition 1979, 9, :o2, 307576800 - tz.transition 1980, 4, :o5, 323816400 - tz.transition 1980, 9, :o2, 339026400 - tz.transition 1981, 4, :o5, 355266000 - tz.transition 1981, 9, :o2, 370393200 - tz.transition 1982, 4, :o5, 386715600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o5, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o5, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o5, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o5, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o5, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o5, 575424000 - tz.transition 1988, 9, :o2, 591148800 - tz.transition 1989, 3, :o5, 606873600 - tz.transition 1989, 9, :o2, 622598400 - tz.transition 1990, 3, :o5, 638323200 - tz.transition 1990, 9, :o2, 654652800 - tz.transition 1991, 3, :o5, 670370400 - tz.transition 1991, 9, :o2, 686091600 - tz.transition 1992, 3, :o5, 701820000 - tz.transition 1992, 9, :o2, 717541200 - tz.transition 1993, 3, :o5, 733269600 - tz.transition 1993, 9, :o2, 748990800 - tz.transition 1994, 3, :o5, 764719200 - tz.transition 1994, 9, :o2, 780440400 - tz.transition 1995, 3, :o5, 796168800 - tz.transition 1995, 9, :o2, 811890000 - tz.transition 1996, 3, :o5, 828223200 - tz.transition 1996, 10, :o2, 846363600 - tz.transition 1997, 3, :o5, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o5, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o5, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o5, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o5, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o5, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o5, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o5, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o5, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o5, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o5, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o5, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o5, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o5, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o5, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o5, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o5, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o5, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o5, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o5, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o5, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o5, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o5, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o5, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o5, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o5, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o5, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o5, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o5, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o5, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o5, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o5, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o5, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o5, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o5, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o5, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o5, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o5, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o5, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o5, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o5, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o5, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o5, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o5, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o5, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o5, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o5, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o5, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o5, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o5, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o5, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o5, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o5, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o5, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb deleted file mode 100644 index 43db70fa6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Stockholm.rb +++ /dev/null @@ -1,165 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Stockholm - include TimezoneDefinition - - timezone 'Europe/Stockholm' do |tz| - tz.offset :o0, 4332, 0, :LMT - tz.offset :o1, 3614, 0, :SET - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - - tz.transition 1878, 12, :o1, 17332923239, 7200 - tz.transition 1899, 12, :o2, 104328883793, 43200 - tz.transition 1916, 5, :o3, 29051981, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1980, 4, :o3, 323830800 - tz.transition 1980, 9, :o2, 338950800 - tz.transition 1981, 3, :o3, 354675600 - tz.transition 1981, 9, :o2, 370400400 - tz.transition 1982, 3, :o3, 386125200 - tz.transition 1982, 9, :o2, 401850000 - tz.transition 1983, 3, :o3, 417574800 - tz.transition 1983, 9, :o2, 433299600 - tz.transition 1984, 3, :o3, 449024400 - tz.transition 1984, 9, :o2, 465354000 - tz.transition 1985, 3, :o3, 481078800 - tz.transition 1985, 9, :o2, 496803600 - tz.transition 1986, 3, :o3, 512528400 - tz.transition 1986, 9, :o2, 528253200 - tz.transition 1987, 3, :o3, 543978000 - tz.transition 1987, 9, :o2, 559702800 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb deleted file mode 100644 index de5a8569f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Tallinn.rb +++ /dev/null @@ -1,172 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Tallinn - include TimezoneDefinition - - timezone 'Europe/Tallinn' do |tz| - tz.offset :o0, 5940, 0, :LMT - tz.offset :o1, 5940, 0, :TMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 10800, 3600, :MSD - tz.offset :o7, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 385234469, 160 - tz.transition 1918, 1, :o2, 387460069, 160 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o2, 58124461, 24 - tz.transition 1919, 6, :o1, 58131371, 24 - tz.transition 1921, 4, :o4, 387649669, 160 - tz.transition 1940, 8, :o5, 29158169, 12 - tz.transition 1941, 9, :o3, 19442019, 8 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 9, :o5, 29176265, 12 - tz.transition 1981, 3, :o6, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o6, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o6, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o6, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o6, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o6, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o6, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o6, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o4, 622598400 - tz.transition 1990, 3, :o7, 638323200 - tz.transition 1990, 9, :o4, 654652800 - tz.transition 1991, 3, :o7, 670377600 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o7, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o7, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o7, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o7, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o7, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o7, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o7, 891129600 - tz.transition 1998, 10, :o4, 909277200 - tz.transition 1999, 3, :o7, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2002, 3, :o7, 1017536400 - tz.transition 2002, 10, :o4, 1035680400 - tz.transition 2003, 3, :o7, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o7, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o7, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o7, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o7, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o7, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o7, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o7, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o7, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o7, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o7, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o7, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o7, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o7, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o7, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o7, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o7, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o7, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o7, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o7, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o7, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o7, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o7, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o7, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o7, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o7, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o7, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o7, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o7, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o7, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o7, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o7, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o7, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o7, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o7, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o7, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o7, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o7, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o7, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o7, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o7, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o7, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o7, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o7, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o7, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o7, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o7, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o7, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb deleted file mode 100644 index 990aabab6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vienna.rb +++ /dev/null @@ -1,183 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vienna - include TimezoneDefinition - - timezone 'Europe/Vienna' do |tz| - tz.offset :o0, 3920, 0, :LMT - tz.offset :o1, 3600, 0, :CET - tz.offset :o2, 3600, 3600, :CEST - - tz.transition 1893, 3, :o1, 2605558811, 1080 - tz.transition 1916, 4, :o2, 29051813, 12 - tz.transition 1916, 9, :o1, 58107299, 24 - tz.transition 1917, 4, :o2, 58112029, 24 - tz.transition 1917, 9, :o1, 58115725, 24 - tz.transition 1918, 4, :o2, 58120765, 24 - tz.transition 1918, 9, :o1, 58124461, 24 - tz.transition 1920, 4, :o2, 58138069, 24 - tz.transition 1920, 9, :o1, 58141933, 24 - tz.transition 1940, 4, :o2, 58313293, 24 - tz.transition 1942, 11, :o1, 58335973, 24 - tz.transition 1943, 3, :o2, 58339501, 24 - tz.transition 1943, 10, :o1, 58344037, 24 - tz.transition 1944, 4, :o2, 58348405, 24 - tz.transition 1944, 10, :o1, 58352773, 24 - tz.transition 1945, 4, :o2, 58357141, 24 - tz.transition 1945, 4, :o1, 58357381, 24 - tz.transition 1946, 4, :o2, 58366189, 24 - tz.transition 1946, 10, :o1, 58370389, 24 - tz.transition 1947, 4, :o2, 58374757, 24 - tz.transition 1947, 10, :o1, 58379125, 24 - tz.transition 1948, 4, :o2, 58383829, 24 - tz.transition 1948, 10, :o1, 58387861, 24 - tz.transition 1980, 4, :o2, 323823600 - tz.transition 1980, 9, :o1, 338940000 - tz.transition 1981, 3, :o2, 354675600 - tz.transition 1981, 9, :o1, 370400400 - tz.transition 1982, 3, :o2, 386125200 - tz.transition 1982, 9, :o1, 401850000 - tz.transition 1983, 3, :o2, 417574800 - tz.transition 1983, 9, :o1, 433299600 - tz.transition 1984, 3, :o2, 449024400 - tz.transition 1984, 9, :o1, 465354000 - tz.transition 1985, 3, :o2, 481078800 - tz.transition 1985, 9, :o1, 496803600 - tz.transition 1986, 3, :o2, 512528400 - tz.transition 1986, 9, :o1, 528253200 - tz.transition 1987, 3, :o2, 543978000 - tz.transition 1987, 9, :o1, 559702800 - tz.transition 1988, 3, :o2, 575427600 - tz.transition 1988, 9, :o1, 591152400 - tz.transition 1989, 3, :o2, 606877200 - tz.transition 1989, 9, :o1, 622602000 - tz.transition 1990, 3, :o2, 638326800 - tz.transition 1990, 9, :o1, 654656400 - tz.transition 1991, 3, :o2, 670381200 - tz.transition 1991, 9, :o1, 686106000 - tz.transition 1992, 3, :o2, 701830800 - tz.transition 1992, 9, :o1, 717555600 - tz.transition 1993, 3, :o2, 733280400 - tz.transition 1993, 9, :o1, 749005200 - tz.transition 1994, 3, :o2, 764730000 - tz.transition 1994, 9, :o1, 780454800 - tz.transition 1995, 3, :o2, 796179600 - tz.transition 1995, 9, :o1, 811904400 - tz.transition 1996, 3, :o2, 828234000 - tz.transition 1996, 10, :o1, 846378000 - tz.transition 1997, 3, :o2, 859683600 - tz.transition 1997, 10, :o1, 877827600 - tz.transition 1998, 3, :o2, 891133200 - tz.transition 1998, 10, :o1, 909277200 - tz.transition 1999, 3, :o2, 922582800 - tz.transition 1999, 10, :o1, 941331600 - tz.transition 2000, 3, :o2, 954032400 - tz.transition 2000, 10, :o1, 972781200 - tz.transition 2001, 3, :o2, 985482000 - tz.transition 2001, 10, :o1, 1004230800 - tz.transition 2002, 3, :o2, 1017536400 - tz.transition 2002, 10, :o1, 1035680400 - tz.transition 2003, 3, :o2, 1048986000 - tz.transition 2003, 10, :o1, 1067130000 - tz.transition 2004, 3, :o2, 1080435600 - tz.transition 2004, 10, :o1, 1099184400 - tz.transition 2005, 3, :o2, 1111885200 - tz.transition 2005, 10, :o1, 1130634000 - tz.transition 2006, 3, :o2, 1143334800 - tz.transition 2006, 10, :o1, 1162083600 - tz.transition 2007, 3, :o2, 1174784400 - tz.transition 2007, 10, :o1, 1193533200 - tz.transition 2008, 3, :o2, 1206838800 - tz.transition 2008, 10, :o1, 1224982800 - tz.transition 2009, 3, :o2, 1238288400 - tz.transition 2009, 10, :o1, 1256432400 - tz.transition 2010, 3, :o2, 1269738000 - tz.transition 2010, 10, :o1, 1288486800 - tz.transition 2011, 3, :o2, 1301187600 - tz.transition 2011, 10, :o1, 1319936400 - tz.transition 2012, 3, :o2, 1332637200 - tz.transition 2012, 10, :o1, 1351386000 - tz.transition 2013, 3, :o2, 1364691600 - tz.transition 2013, 10, :o1, 1382835600 - tz.transition 2014, 3, :o2, 1396141200 - tz.transition 2014, 10, :o1, 1414285200 - tz.transition 2015, 3, :o2, 1427590800 - tz.transition 2015, 10, :o1, 1445734800 - tz.transition 2016, 3, :o2, 1459040400 - tz.transition 2016, 10, :o1, 1477789200 - tz.transition 2017, 3, :o2, 1490490000 - tz.transition 2017, 10, :o1, 1509238800 - tz.transition 2018, 3, :o2, 1521939600 - tz.transition 2018, 10, :o1, 1540688400 - tz.transition 2019, 3, :o2, 1553994000 - tz.transition 2019, 10, :o1, 1572138000 - tz.transition 2020, 3, :o2, 1585443600 - tz.transition 2020, 10, :o1, 1603587600 - tz.transition 2021, 3, :o2, 1616893200 - tz.transition 2021, 10, :o1, 1635642000 - tz.transition 2022, 3, :o2, 1648342800 - tz.transition 2022, 10, :o1, 1667091600 - tz.transition 2023, 3, :o2, 1679792400 - tz.transition 2023, 10, :o1, 1698541200 - tz.transition 2024, 3, :o2, 1711846800 - tz.transition 2024, 10, :o1, 1729990800 - tz.transition 2025, 3, :o2, 1743296400 - tz.transition 2025, 10, :o1, 1761440400 - tz.transition 2026, 3, :o2, 1774746000 - tz.transition 2026, 10, :o1, 1792890000 - tz.transition 2027, 3, :o2, 1806195600 - tz.transition 2027, 10, :o1, 1824944400 - tz.transition 2028, 3, :o2, 1837645200 - tz.transition 2028, 10, :o1, 1856394000 - tz.transition 2029, 3, :o2, 1869094800 - tz.transition 2029, 10, :o1, 1887843600 - tz.transition 2030, 3, :o2, 1901149200 - tz.transition 2030, 10, :o1, 1919293200 - tz.transition 2031, 3, :o2, 1932598800 - tz.transition 2031, 10, :o1, 1950742800 - tz.transition 2032, 3, :o2, 1964048400 - tz.transition 2032, 10, :o1, 1982797200 - tz.transition 2033, 3, :o2, 1995498000 - tz.transition 2033, 10, :o1, 2014246800 - tz.transition 2034, 3, :o2, 2026947600 - tz.transition 2034, 10, :o1, 2045696400 - tz.transition 2035, 3, :o2, 2058397200 - tz.transition 2035, 10, :o1, 2077146000 - tz.transition 2036, 3, :o2, 2090451600 - tz.transition 2036, 10, :o1, 2108595600 - tz.transition 2037, 3, :o2, 2121901200 - tz.transition 2037, 10, :o1, 2140045200 - tz.transition 2038, 3, :o2, 59172253, 24 - tz.transition 2038, 10, :o1, 59177461, 24 - tz.transition 2039, 3, :o2, 59180989, 24 - tz.transition 2039, 10, :o1, 59186197, 24 - tz.transition 2040, 3, :o2, 59189725, 24 - tz.transition 2040, 10, :o1, 59194933, 24 - tz.transition 2041, 3, :o2, 59198629, 24 - tz.transition 2041, 10, :o1, 59203669, 24 - tz.transition 2042, 3, :o2, 59207365, 24 - tz.transition 2042, 10, :o1, 59212405, 24 - tz.transition 2043, 3, :o2, 59216101, 24 - tz.transition 2043, 10, :o1, 59221141, 24 - tz.transition 2044, 3, :o2, 59224837, 24 - tz.transition 2044, 10, :o1, 59230045, 24 - tz.transition 2045, 3, :o2, 59233573, 24 - tz.transition 2045, 10, :o1, 59238781, 24 - tz.transition 2046, 3, :o2, 59242309, 24 - tz.transition 2046, 10, :o1, 59247517, 24 - tz.transition 2047, 3, :o2, 59251213, 24 - tz.transition 2047, 10, :o1, 59256253, 24 - tz.transition 2048, 3, :o2, 59259949, 24 - tz.transition 2048, 10, :o1, 59264989, 24 - tz.transition 2049, 3, :o2, 59268685, 24 - tz.transition 2049, 10, :o1, 59273893, 24 - tz.transition 2050, 3, :o2, 59277421, 24 - tz.transition 2050, 10, :o1, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb deleted file mode 100644 index d89d095a7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Vilnius.rb +++ /dev/null @@ -1,170 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Vilnius - include TimezoneDefinition - - timezone 'Europe/Vilnius' do |tz| - tz.offset :o0, 6076, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 5736, 0, :KMT - tz.offset :o3, 3600, 0, :CET - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 10800, 0, :MSK - tz.offset :o6, 3600, 3600, :CEST - tz.offset :o7, 10800, 3600, :MSD - tz.offset :o8, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 52006653281, 21600 - tz.transition 1916, 12, :o2, 290547533, 120 - tz.transition 1919, 10, :o3, 8720069161, 3600 - tz.transition 1920, 7, :o4, 58140419, 24 - tz.transition 1920, 10, :o3, 29071277, 12 - tz.transition 1940, 8, :o5, 58316267, 24 - tz.transition 1941, 6, :o6, 19441355, 8 - tz.transition 1942, 11, :o3, 58335973, 24 - tz.transition 1943, 3, :o6, 58339501, 24 - tz.transition 1943, 10, :o3, 58344037, 24 - tz.transition 1944, 4, :o6, 58348405, 24 - tz.transition 1944, 7, :o5, 29175641, 12 - tz.transition 1981, 3, :o7, 354920400 - tz.transition 1981, 9, :o5, 370728000 - tz.transition 1982, 3, :o7, 386456400 - tz.transition 1982, 9, :o5, 402264000 - tz.transition 1983, 3, :o7, 417992400 - tz.transition 1983, 9, :o5, 433800000 - tz.transition 1984, 3, :o7, 449614800 - tz.transition 1984, 9, :o5, 465346800 - tz.transition 1985, 3, :o7, 481071600 - tz.transition 1985, 9, :o5, 496796400 - tz.transition 1986, 3, :o7, 512521200 - tz.transition 1986, 9, :o5, 528246000 - tz.transition 1987, 3, :o7, 543970800 - tz.transition 1987, 9, :o5, 559695600 - tz.transition 1988, 3, :o7, 575420400 - tz.transition 1988, 9, :o5, 591145200 - tz.transition 1989, 3, :o7, 606870000 - tz.transition 1989, 9, :o5, 622594800 - tz.transition 1990, 3, :o7, 638319600 - tz.transition 1990, 9, :o5, 654649200 - tz.transition 1991, 3, :o8, 670374000 - tz.transition 1991, 9, :o4, 686102400 - tz.transition 1992, 3, :o8, 701827200 - tz.transition 1992, 9, :o4, 717552000 - tz.transition 1993, 3, :o8, 733276800 - tz.transition 1993, 9, :o4, 749001600 - tz.transition 1994, 3, :o8, 764726400 - tz.transition 1994, 9, :o4, 780451200 - tz.transition 1995, 3, :o8, 796176000 - tz.transition 1995, 9, :o4, 811900800 - tz.transition 1996, 3, :o8, 828230400 - tz.transition 1996, 10, :o4, 846374400 - tz.transition 1997, 3, :o8, 859680000 - tz.transition 1997, 10, :o4, 877824000 - tz.transition 1998, 3, :o6, 891133200 - tz.transition 1998, 10, :o3, 909277200 - tz.transition 1999, 3, :o6, 922582800 - tz.transition 1999, 10, :o4, 941331600 - tz.transition 2003, 3, :o8, 1048986000 - tz.transition 2003, 10, :o4, 1067130000 - tz.transition 2004, 3, :o8, 1080435600 - tz.transition 2004, 10, :o4, 1099184400 - tz.transition 2005, 3, :o8, 1111885200 - tz.transition 2005, 10, :o4, 1130634000 - tz.transition 2006, 3, :o8, 1143334800 - tz.transition 2006, 10, :o4, 1162083600 - tz.transition 2007, 3, :o8, 1174784400 - tz.transition 2007, 10, :o4, 1193533200 - tz.transition 2008, 3, :o8, 1206838800 - tz.transition 2008, 10, :o4, 1224982800 - tz.transition 2009, 3, :o8, 1238288400 - tz.transition 2009, 10, :o4, 1256432400 - tz.transition 2010, 3, :o8, 1269738000 - tz.transition 2010, 10, :o4, 1288486800 - tz.transition 2011, 3, :o8, 1301187600 - tz.transition 2011, 10, :o4, 1319936400 - tz.transition 2012, 3, :o8, 1332637200 - tz.transition 2012, 10, :o4, 1351386000 - tz.transition 2013, 3, :o8, 1364691600 - tz.transition 2013, 10, :o4, 1382835600 - tz.transition 2014, 3, :o8, 1396141200 - tz.transition 2014, 10, :o4, 1414285200 - tz.transition 2015, 3, :o8, 1427590800 - tz.transition 2015, 10, :o4, 1445734800 - tz.transition 2016, 3, :o8, 1459040400 - tz.transition 2016, 10, :o4, 1477789200 - tz.transition 2017, 3, :o8, 1490490000 - tz.transition 2017, 10, :o4, 1509238800 - tz.transition 2018, 3, :o8, 1521939600 - tz.transition 2018, 10, :o4, 1540688400 - tz.transition 2019, 3, :o8, 1553994000 - tz.transition 2019, 10, :o4, 1572138000 - tz.transition 2020, 3, :o8, 1585443600 - tz.transition 2020, 10, :o4, 1603587600 - tz.transition 2021, 3, :o8, 1616893200 - tz.transition 2021, 10, :o4, 1635642000 - tz.transition 2022, 3, :o8, 1648342800 - tz.transition 2022, 10, :o4, 1667091600 - tz.transition 2023, 3, :o8, 1679792400 - tz.transition 2023, 10, :o4, 1698541200 - tz.transition 2024, 3, :o8, 1711846800 - tz.transition 2024, 10, :o4, 1729990800 - tz.transition 2025, 3, :o8, 1743296400 - tz.transition 2025, 10, :o4, 1761440400 - tz.transition 2026, 3, :o8, 1774746000 - tz.transition 2026, 10, :o4, 1792890000 - tz.transition 2027, 3, :o8, 1806195600 - tz.transition 2027, 10, :o4, 1824944400 - tz.transition 2028, 3, :o8, 1837645200 - tz.transition 2028, 10, :o4, 1856394000 - tz.transition 2029, 3, :o8, 1869094800 - tz.transition 2029, 10, :o4, 1887843600 - tz.transition 2030, 3, :o8, 1901149200 - tz.transition 2030, 10, :o4, 1919293200 - tz.transition 2031, 3, :o8, 1932598800 - tz.transition 2031, 10, :o4, 1950742800 - tz.transition 2032, 3, :o8, 1964048400 - tz.transition 2032, 10, :o4, 1982797200 - tz.transition 2033, 3, :o8, 1995498000 - tz.transition 2033, 10, :o4, 2014246800 - tz.transition 2034, 3, :o8, 2026947600 - tz.transition 2034, 10, :o4, 2045696400 - tz.transition 2035, 3, :o8, 2058397200 - tz.transition 2035, 10, :o4, 2077146000 - tz.transition 2036, 3, :o8, 2090451600 - tz.transition 2036, 10, :o4, 2108595600 - tz.transition 2037, 3, :o8, 2121901200 - tz.transition 2037, 10, :o4, 2140045200 - tz.transition 2038, 3, :o8, 59172253, 24 - tz.transition 2038, 10, :o4, 59177461, 24 - tz.transition 2039, 3, :o8, 59180989, 24 - tz.transition 2039, 10, :o4, 59186197, 24 - tz.transition 2040, 3, :o8, 59189725, 24 - tz.transition 2040, 10, :o4, 59194933, 24 - tz.transition 2041, 3, :o8, 59198629, 24 - tz.transition 2041, 10, :o4, 59203669, 24 - tz.transition 2042, 3, :o8, 59207365, 24 - tz.transition 2042, 10, :o4, 59212405, 24 - tz.transition 2043, 3, :o8, 59216101, 24 - tz.transition 2043, 10, :o4, 59221141, 24 - tz.transition 2044, 3, :o8, 59224837, 24 - tz.transition 2044, 10, :o4, 59230045, 24 - tz.transition 2045, 3, :o8, 59233573, 24 - tz.transition 2045, 10, :o4, 59238781, 24 - tz.transition 2046, 3, :o8, 59242309, 24 - tz.transition 2046, 10, :o4, 59247517, 24 - tz.transition 2047, 3, :o8, 59251213, 24 - tz.transition 2047, 10, :o4, 59256253, 24 - tz.transition 2048, 3, :o8, 59259949, 24 - tz.transition 2048, 10, :o4, 59264989, 24 - tz.transition 2049, 3, :o8, 59268685, 24 - tz.transition 2049, 10, :o4, 59273893, 24 - tz.transition 2050, 3, :o8, 59277421, 24 - tz.transition 2050, 10, :o4, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb deleted file mode 100644 index 7fa51c269..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Warsaw.rb +++ /dev/null @@ -1,212 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Warsaw - include TimezoneDefinition - - timezone 'Europe/Warsaw' do |tz| - tz.offset :o0, 5040, 0, :LMT - tz.offset :o1, 5040, 0, :WMT - tz.offset :o2, 3600, 0, :CET - tz.offset :o3, 3600, 3600, :CEST - tz.offset :o4, 7200, 0, :EET - tz.offset :o5, 7200, 3600, :EEST - - tz.transition 1879, 12, :o1, 288925853, 120 - tz.transition 1915, 8, :o2, 290485733, 120 - tz.transition 1916, 4, :o3, 29051813, 12 - tz.transition 1916, 9, :o2, 58107299, 24 - tz.transition 1917, 4, :o3, 58112029, 24 - tz.transition 1917, 9, :o2, 58115725, 24 - tz.transition 1918, 4, :o3, 58120765, 24 - tz.transition 1918, 9, :o4, 58124461, 24 - tz.transition 1919, 4, :o5, 4844127, 2 - tz.transition 1919, 9, :o4, 4844435, 2 - tz.transition 1922, 5, :o2, 29078477, 12 - tz.transition 1940, 6, :o3, 58315285, 24 - tz.transition 1942, 11, :o2, 58335973, 24 - tz.transition 1943, 3, :o3, 58339501, 24 - tz.transition 1943, 10, :o2, 58344037, 24 - tz.transition 1944, 4, :o3, 58348405, 24 - tz.transition 1944, 10, :o2, 4862735, 2 - tz.transition 1945, 4, :o3, 58357787, 24 - tz.transition 1945, 10, :o2, 29181125, 12 - tz.transition 1946, 4, :o3, 58366187, 24 - tz.transition 1946, 10, :o2, 58370413, 24 - tz.transition 1947, 5, :o3, 58375429, 24 - tz.transition 1947, 10, :o2, 58379125, 24 - tz.transition 1948, 4, :o3, 58383829, 24 - tz.transition 1948, 10, :o2, 58387861, 24 - tz.transition 1949, 4, :o3, 58392397, 24 - tz.transition 1949, 10, :o2, 58396597, 24 - tz.transition 1957, 6, :o3, 4871983, 2 - tz.transition 1957, 9, :o2, 4872221, 2 - tz.transition 1958, 3, :o3, 4872585, 2 - tz.transition 1958, 9, :o2, 4872949, 2 - tz.transition 1959, 5, :o3, 4873439, 2 - tz.transition 1959, 10, :o2, 4873691, 2 - tz.transition 1960, 4, :o3, 4874055, 2 - tz.transition 1960, 10, :o2, 4874419, 2 - tz.transition 1961, 5, :o3, 4874895, 2 - tz.transition 1961, 10, :o2, 4875147, 2 - tz.transition 1962, 5, :o3, 4875623, 2 - tz.transition 1962, 9, :o2, 4875875, 2 - tz.transition 1963, 5, :o3, 4876351, 2 - tz.transition 1963, 9, :o2, 4876603, 2 - tz.transition 1964, 5, :o3, 4877093, 2 - tz.transition 1964, 9, :o2, 4877331, 2 - tz.transition 1977, 4, :o3, 228873600 - tz.transition 1977, 9, :o2, 243993600 - tz.transition 1978, 4, :o3, 260323200 - tz.transition 1978, 10, :o2, 276048000 - tz.transition 1979, 4, :o3, 291772800 - tz.transition 1979, 9, :o2, 307497600 - tz.transition 1980, 4, :o3, 323827200 - tz.transition 1980, 9, :o2, 338947200 - tz.transition 1981, 3, :o3, 354672000 - tz.transition 1981, 9, :o2, 370396800 - tz.transition 1982, 3, :o3, 386121600 - tz.transition 1982, 9, :o2, 401846400 - tz.transition 1983, 3, :o3, 417571200 - tz.transition 1983, 9, :o2, 433296000 - tz.transition 1984, 3, :o3, 449020800 - tz.transition 1984, 9, :o2, 465350400 - tz.transition 1985, 3, :o3, 481075200 - tz.transition 1985, 9, :o2, 496800000 - tz.transition 1986, 3, :o3, 512524800 - tz.transition 1986, 9, :o2, 528249600 - tz.transition 1987, 3, :o3, 543974400 - tz.transition 1987, 9, :o2, 559699200 - tz.transition 1988, 3, :o3, 575427600 - tz.transition 1988, 9, :o2, 591152400 - tz.transition 1989, 3, :o3, 606877200 - tz.transition 1989, 9, :o2, 622602000 - tz.transition 1990, 3, :o3, 638326800 - tz.transition 1990, 9, :o2, 654656400 - tz.transition 1991, 3, :o3, 670381200 - tz.transition 1991, 9, :o2, 686106000 - tz.transition 1992, 3, :o3, 701830800 - tz.transition 1992, 9, :o2, 717555600 - tz.transition 1993, 3, :o3, 733280400 - tz.transition 1993, 9, :o2, 749005200 - tz.transition 1994, 3, :o3, 764730000 - tz.transition 1994, 9, :o2, 780454800 - tz.transition 1995, 3, :o3, 796179600 - tz.transition 1995, 9, :o2, 811904400 - tz.transition 1996, 3, :o3, 828234000 - tz.transition 1996, 10, :o2, 846378000 - tz.transition 1997, 3, :o3, 859683600 - tz.transition 1997, 10, :o2, 877827600 - tz.transition 1998, 3, :o3, 891133200 - tz.transition 1998, 10, :o2, 909277200 - tz.transition 1999, 3, :o3, 922582800 - tz.transition 1999, 10, :o2, 941331600 - tz.transition 2000, 3, :o3, 954032400 - tz.transition 2000, 10, :o2, 972781200 - tz.transition 2001, 3, :o3, 985482000 - tz.transition 2001, 10, :o2, 1004230800 - tz.transition 2002, 3, :o3, 1017536400 - tz.transition 2002, 10, :o2, 1035680400 - tz.transition 2003, 3, :o3, 1048986000 - tz.transition 2003, 10, :o2, 1067130000 - tz.transition 2004, 3, :o3, 1080435600 - tz.transition 2004, 10, :o2, 1099184400 - tz.transition 2005, 3, :o3, 1111885200 - tz.transition 2005, 10, :o2, 1130634000 - tz.transition 2006, 3, :o3, 1143334800 - tz.transition 2006, 10, :o2, 1162083600 - tz.transition 2007, 3, :o3, 1174784400 - tz.transition 2007, 10, :o2, 1193533200 - tz.transition 2008, 3, :o3, 1206838800 - tz.transition 2008, 10, :o2, 1224982800 - tz.transition 2009, 3, :o3, 1238288400 - tz.transition 2009, 10, :o2, 1256432400 - tz.transition 2010, 3, :o3, 1269738000 - tz.transition 2010, 10, :o2, 1288486800 - tz.transition 2011, 3, :o3, 1301187600 - tz.transition 2011, 10, :o2, 1319936400 - tz.transition 2012, 3, :o3, 1332637200 - tz.transition 2012, 10, :o2, 1351386000 - tz.transition 2013, 3, :o3, 1364691600 - tz.transition 2013, 10, :o2, 1382835600 - tz.transition 2014, 3, :o3, 1396141200 - tz.transition 2014, 10, :o2, 1414285200 - tz.transition 2015, 3, :o3, 1427590800 - tz.transition 2015, 10, :o2, 1445734800 - tz.transition 2016, 3, :o3, 1459040400 - tz.transition 2016, 10, :o2, 1477789200 - tz.transition 2017, 3, :o3, 1490490000 - tz.transition 2017, 10, :o2, 1509238800 - tz.transition 2018, 3, :o3, 1521939600 - tz.transition 2018, 10, :o2, 1540688400 - tz.transition 2019, 3, :o3, 1553994000 - tz.transition 2019, 10, :o2, 1572138000 - tz.transition 2020, 3, :o3, 1585443600 - tz.transition 2020, 10, :o2, 1603587600 - tz.transition 2021, 3, :o3, 1616893200 - tz.transition 2021, 10, :o2, 1635642000 - tz.transition 2022, 3, :o3, 1648342800 - tz.transition 2022, 10, :o2, 1667091600 - tz.transition 2023, 3, :o3, 1679792400 - tz.transition 2023, 10, :o2, 1698541200 - tz.transition 2024, 3, :o3, 1711846800 - tz.transition 2024, 10, :o2, 1729990800 - tz.transition 2025, 3, :o3, 1743296400 - tz.transition 2025, 10, :o2, 1761440400 - tz.transition 2026, 3, :o3, 1774746000 - tz.transition 2026, 10, :o2, 1792890000 - tz.transition 2027, 3, :o3, 1806195600 - tz.transition 2027, 10, :o2, 1824944400 - tz.transition 2028, 3, :o3, 1837645200 - tz.transition 2028, 10, :o2, 1856394000 - tz.transition 2029, 3, :o3, 1869094800 - tz.transition 2029, 10, :o2, 1887843600 - tz.transition 2030, 3, :o3, 1901149200 - tz.transition 2030, 10, :o2, 1919293200 - tz.transition 2031, 3, :o3, 1932598800 - tz.transition 2031, 10, :o2, 1950742800 - tz.transition 2032, 3, :o3, 1964048400 - tz.transition 2032, 10, :o2, 1982797200 - tz.transition 2033, 3, :o3, 1995498000 - tz.transition 2033, 10, :o2, 2014246800 - tz.transition 2034, 3, :o3, 2026947600 - tz.transition 2034, 10, :o2, 2045696400 - tz.transition 2035, 3, :o3, 2058397200 - tz.transition 2035, 10, :o2, 2077146000 - tz.transition 2036, 3, :o3, 2090451600 - tz.transition 2036, 10, :o2, 2108595600 - tz.transition 2037, 3, :o3, 2121901200 - tz.transition 2037, 10, :o2, 2140045200 - tz.transition 2038, 3, :o3, 59172253, 24 - tz.transition 2038, 10, :o2, 59177461, 24 - tz.transition 2039, 3, :o3, 59180989, 24 - tz.transition 2039, 10, :o2, 59186197, 24 - tz.transition 2040, 3, :o3, 59189725, 24 - tz.transition 2040, 10, :o2, 59194933, 24 - tz.transition 2041, 3, :o3, 59198629, 24 - tz.transition 2041, 10, :o2, 59203669, 24 - tz.transition 2042, 3, :o3, 59207365, 24 - tz.transition 2042, 10, :o2, 59212405, 24 - tz.transition 2043, 3, :o3, 59216101, 24 - tz.transition 2043, 10, :o2, 59221141, 24 - tz.transition 2044, 3, :o3, 59224837, 24 - tz.transition 2044, 10, :o2, 59230045, 24 - tz.transition 2045, 3, :o3, 59233573, 24 - tz.transition 2045, 10, :o2, 59238781, 24 - tz.transition 2046, 3, :o3, 59242309, 24 - tz.transition 2046, 10, :o2, 59247517, 24 - tz.transition 2047, 3, :o3, 59251213, 24 - tz.transition 2047, 10, :o2, 59256253, 24 - tz.transition 2048, 3, :o3, 59259949, 24 - tz.transition 2048, 10, :o2, 59264989, 24 - tz.transition 2049, 3, :o3, 59268685, 24 - tz.transition 2049, 10, :o2, 59273893, 24 - tz.transition 2050, 3, :o3, 59277421, 24 - tz.transition 2050, 10, :o2, 59282629, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb deleted file mode 100644 index ecdd903d2..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Europe/Zagreb.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Europe - module Zagreb - include TimezoneDefinition - - linked_timezone 'Europe/Zagreb', 'Europe/Belgrade' - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb deleted file mode 100644 index a524fd6b6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Auckland.rb +++ /dev/null @@ -1,202 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Auckland - include TimezoneDefinition - - timezone 'Pacific/Auckland' do |tz| - tz.offset :o0, 41944, 0, :LMT - tz.offset :o1, 41400, 0, :NZMT - tz.offset :o2, 41400, 3600, :NZST - tz.offset :o3, 41400, 1800, :NZST - tz.offset :o4, 43200, 0, :NZST - tz.offset :o5, 43200, 3600, :NZDT - - tz.transition 1868, 11, :o1, 25959290557, 10800 - tz.transition 1927, 11, :o2, 116409125, 48 - tz.transition 1928, 3, :o1, 38804945, 16 - tz.transition 1928, 10, :o3, 116425589, 48 - tz.transition 1929, 3, :o1, 29108245, 12 - tz.transition 1929, 10, :o3, 116443061, 48 - tz.transition 1930, 3, :o1, 29112613, 12 - tz.transition 1930, 10, :o3, 116460533, 48 - tz.transition 1931, 3, :o1, 29116981, 12 - tz.transition 1931, 10, :o3, 116478005, 48 - tz.transition 1932, 3, :o1, 29121433, 12 - tz.transition 1932, 10, :o3, 116495477, 48 - tz.transition 1933, 3, :o1, 29125801, 12 - tz.transition 1933, 10, :o3, 116512949, 48 - tz.transition 1934, 4, :o1, 29130673, 12 - tz.transition 1934, 9, :o3, 116530085, 48 - tz.transition 1935, 4, :o1, 29135041, 12 - tz.transition 1935, 9, :o3, 116547557, 48 - tz.transition 1936, 4, :o1, 29139409, 12 - tz.transition 1936, 9, :o3, 116565029, 48 - tz.transition 1937, 4, :o1, 29143777, 12 - tz.transition 1937, 9, :o3, 116582501, 48 - tz.transition 1938, 4, :o1, 29148145, 12 - tz.transition 1938, 9, :o3, 116599973, 48 - tz.transition 1939, 4, :o1, 29152597, 12 - tz.transition 1939, 9, :o3, 116617445, 48 - tz.transition 1940, 4, :o1, 29156965, 12 - tz.transition 1940, 9, :o3, 116635253, 48 - tz.transition 1945, 12, :o4, 2431821, 1 - tz.transition 1974, 11, :o5, 152632800 - tz.transition 1975, 2, :o4, 162309600 - tz.transition 1975, 10, :o5, 183477600 - tz.transition 1976, 3, :o4, 194968800 - tz.transition 1976, 10, :o5, 215532000 - tz.transition 1977, 3, :o4, 226418400 - tz.transition 1977, 10, :o5, 246981600 - tz.transition 1978, 3, :o4, 257868000 - tz.transition 1978, 10, :o5, 278431200 - tz.transition 1979, 3, :o4, 289317600 - tz.transition 1979, 10, :o5, 309880800 - tz.transition 1980, 3, :o4, 320767200 - tz.transition 1980, 10, :o5, 341330400 - tz.transition 1981, 2, :o4, 352216800 - tz.transition 1981, 10, :o5, 372780000 - tz.transition 1982, 3, :o4, 384271200 - tz.transition 1982, 10, :o5, 404834400 - tz.transition 1983, 3, :o4, 415720800 - tz.transition 1983, 10, :o5, 436284000 - tz.transition 1984, 3, :o4, 447170400 - tz.transition 1984, 10, :o5, 467733600 - tz.transition 1985, 3, :o4, 478620000 - tz.transition 1985, 10, :o5, 499183200 - tz.transition 1986, 3, :o4, 510069600 - tz.transition 1986, 10, :o5, 530632800 - tz.transition 1987, 2, :o4, 541519200 - tz.transition 1987, 10, :o5, 562082400 - tz.transition 1988, 3, :o4, 573573600 - tz.transition 1988, 10, :o5, 594136800 - tz.transition 1989, 3, :o4, 605023200 - tz.transition 1989, 10, :o5, 623772000 - tz.transition 1990, 3, :o4, 637682400 - tz.transition 1990, 10, :o5, 655221600 - tz.transition 1991, 3, :o4, 669132000 - tz.transition 1991, 10, :o5, 686671200 - tz.transition 1992, 3, :o4, 700581600 - tz.transition 1992, 10, :o5, 718120800 - tz.transition 1993, 3, :o4, 732636000 - tz.transition 1993, 10, :o5, 749570400 - tz.transition 1994, 3, :o4, 764085600 - tz.transition 1994, 10, :o5, 781020000 - tz.transition 1995, 3, :o4, 795535200 - tz.transition 1995, 9, :o5, 812469600 - tz.transition 1996, 3, :o4, 826984800 - tz.transition 1996, 10, :o5, 844524000 - tz.transition 1997, 3, :o4, 858434400 - tz.transition 1997, 10, :o5, 875973600 - tz.transition 1998, 3, :o4, 889884000 - tz.transition 1998, 10, :o5, 907423200 - tz.transition 1999, 3, :o4, 921938400 - tz.transition 1999, 10, :o5, 938872800 - tz.transition 2000, 3, :o4, 953388000 - tz.transition 2000, 9, :o5, 970322400 - tz.transition 2001, 3, :o4, 984837600 - tz.transition 2001, 10, :o5, 1002376800 - tz.transition 2002, 3, :o4, 1016287200 - tz.transition 2002, 10, :o5, 1033826400 - tz.transition 2003, 3, :o4, 1047736800 - tz.transition 2003, 10, :o5, 1065276000 - tz.transition 2004, 3, :o4, 1079791200 - tz.transition 2004, 10, :o5, 1096725600 - tz.transition 2005, 3, :o4, 1111240800 - tz.transition 2005, 10, :o5, 1128175200 - tz.transition 2006, 3, :o4, 1142690400 - tz.transition 2006, 9, :o5, 1159624800 - tz.transition 2007, 3, :o4, 1174140000 - tz.transition 2007, 9, :o5, 1191074400 - tz.transition 2008, 4, :o4, 1207404000 - tz.transition 2008, 9, :o5, 1222524000 - tz.transition 2009, 4, :o4, 1238853600 - tz.transition 2009, 9, :o5, 1253973600 - tz.transition 2010, 4, :o4, 1270303200 - tz.transition 2010, 9, :o5, 1285423200 - tz.transition 2011, 4, :o4, 1301752800 - tz.transition 2011, 9, :o5, 1316872800 - tz.transition 2012, 3, :o4, 1333202400 - tz.transition 2012, 9, :o5, 1348927200 - tz.transition 2013, 4, :o4, 1365256800 - tz.transition 2013, 9, :o5, 1380376800 - tz.transition 2014, 4, :o4, 1396706400 - tz.transition 2014, 9, :o5, 1411826400 - tz.transition 2015, 4, :o4, 1428156000 - tz.transition 2015, 9, :o5, 1443276000 - tz.transition 2016, 4, :o4, 1459605600 - tz.transition 2016, 9, :o5, 1474725600 - tz.transition 2017, 4, :o4, 1491055200 - tz.transition 2017, 9, :o5, 1506175200 - tz.transition 2018, 3, :o4, 1522504800 - tz.transition 2018, 9, :o5, 1538229600 - tz.transition 2019, 4, :o4, 1554559200 - tz.transition 2019, 9, :o5, 1569679200 - tz.transition 2020, 4, :o4, 1586008800 - tz.transition 2020, 9, :o5, 1601128800 - tz.transition 2021, 4, :o4, 1617458400 - tz.transition 2021, 9, :o5, 1632578400 - tz.transition 2022, 4, :o4, 1648908000 - tz.transition 2022, 9, :o5, 1664028000 - tz.transition 2023, 4, :o4, 1680357600 - tz.transition 2023, 9, :o5, 1695477600 - tz.transition 2024, 4, :o4, 1712412000 - tz.transition 2024, 9, :o5, 1727532000 - tz.transition 2025, 4, :o4, 1743861600 - tz.transition 2025, 9, :o5, 1758981600 - tz.transition 2026, 4, :o4, 1775311200 - tz.transition 2026, 9, :o5, 1790431200 - tz.transition 2027, 4, :o4, 1806760800 - tz.transition 2027, 9, :o5, 1821880800 - tz.transition 2028, 4, :o4, 1838210400 - tz.transition 2028, 9, :o5, 1853330400 - tz.transition 2029, 3, :o4, 1869660000 - tz.transition 2029, 9, :o5, 1885384800 - tz.transition 2030, 4, :o4, 1901714400 - tz.transition 2030, 9, :o5, 1916834400 - tz.transition 2031, 4, :o4, 1933164000 - tz.transition 2031, 9, :o5, 1948284000 - tz.transition 2032, 4, :o4, 1964613600 - tz.transition 2032, 9, :o5, 1979733600 - tz.transition 2033, 4, :o4, 1996063200 - tz.transition 2033, 9, :o5, 2011183200 - tz.transition 2034, 4, :o4, 2027512800 - tz.transition 2034, 9, :o5, 2042632800 - tz.transition 2035, 3, :o4, 2058962400 - tz.transition 2035, 9, :o5, 2074687200 - tz.transition 2036, 4, :o4, 2091016800 - tz.transition 2036, 9, :o5, 2106136800 - tz.transition 2037, 4, :o4, 2122466400 - tz.transition 2037, 9, :o5, 2137586400 - tz.transition 2038, 4, :o4, 29586205, 12 - tz.transition 2038, 9, :o5, 29588305, 12 - tz.transition 2039, 4, :o4, 29590573, 12 - tz.transition 2039, 9, :o5, 29592673, 12 - tz.transition 2040, 3, :o4, 29594941, 12 - tz.transition 2040, 9, :o5, 29597125, 12 - tz.transition 2041, 4, :o4, 29599393, 12 - tz.transition 2041, 9, :o5, 29601493, 12 - tz.transition 2042, 4, :o4, 29603761, 12 - tz.transition 2042, 9, :o5, 29605861, 12 - tz.transition 2043, 4, :o4, 29608129, 12 - tz.transition 2043, 9, :o5, 29610229, 12 - tz.transition 2044, 4, :o4, 29612497, 12 - tz.transition 2044, 9, :o5, 29614597, 12 - tz.transition 2045, 4, :o4, 29616865, 12 - tz.transition 2045, 9, :o5, 29618965, 12 - tz.transition 2046, 3, :o4, 29621233, 12 - tz.transition 2046, 9, :o5, 29623417, 12 - tz.transition 2047, 4, :o4, 29625685, 12 - tz.transition 2047, 9, :o5, 29627785, 12 - tz.transition 2048, 4, :o4, 29630053, 12 - tz.transition 2048, 9, :o5, 29632153, 12 - tz.transition 2049, 4, :o4, 29634421, 12 - tz.transition 2049, 9, :o5, 29636521, 12 - tz.transition 2050, 4, :o4, 29638789, 12 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb deleted file mode 100644 index 5fe9bbd9a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Fiji.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Fiji - include TimezoneDefinition - - timezone 'Pacific/Fiji' do |tz| - tz.offset :o0, 42820, 0, :LMT - tz.offset :o1, 43200, 0, :FJT - tz.offset :o2, 43200, 3600, :FJST - - tz.transition 1915, 10, :o1, 10457838739, 4320 - tz.transition 1998, 10, :o2, 909842400 - tz.transition 1999, 2, :o1, 920124000 - tz.transition 1999, 11, :o2, 941896800 - tz.transition 2000, 2, :o1, 951573600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb deleted file mode 100644 index d4c1a0a68..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Guam.rb +++ /dev/null @@ -1,22 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Guam - include TimezoneDefinition - - timezone 'Pacific/Guam' do |tz| - tz.offset :o0, -51660, 0, :LMT - tz.offset :o1, 34740, 0, :LMT - tz.offset :o2, 36000, 0, :GST - tz.offset :o3, 36000, 0, :ChST - - tz.transition 1844, 12, :o1, 1149567407, 480 - tz.transition 1900, 12, :o2, 1159384847, 480 - tz.transition 2000, 12, :o3, 977493600 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb deleted file mode 100644 index 204b22653..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Honolulu.rb +++ /dev/null @@ -1,28 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Honolulu - include TimezoneDefinition - - timezone 'Pacific/Honolulu' do |tz| - tz.offset :o0, -37886, 0, :LMT - tz.offset :o1, -37800, 0, :HST - tz.offset :o2, -37800, 3600, :HDT - tz.offset :o3, -37800, 3600, :HWT - tz.offset :o4, -37800, 3600, :HPT - tz.offset :o5, -36000, 0, :HST - - tz.transition 1900, 1, :o1, 104328926143, 43200 - tz.transition 1933, 4, :o2, 116505265, 48 - tz.transition 1933, 5, :o1, 116506271, 48 - tz.transition 1942, 2, :o3, 116659201, 48 - tz.transition 1945, 8, :o4, 58360379, 24 - tz.transition 1945, 9, :o1, 116722991, 48 - tz.transition 1947, 6, :o5, 116752561, 48 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb deleted file mode 100644 index 32adad92c..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Majuro.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Majuro - include TimezoneDefinition - - timezone 'Pacific/Majuro' do |tz| - tz.offset :o0, 41088, 0, :LMT - tz.offset :o1, 39600, 0, :MHT - tz.offset :o2, 43200, 0, :MHT - - tz.transition 1900, 12, :o1, 1086923261, 450 - tz.transition 1969, 9, :o2, 58571881, 24 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb deleted file mode 100644 index 97784fcc1..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Midway.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Midway - include TimezoneDefinition - - timezone 'Pacific/Midway' do |tz| - tz.offset :o0, -42568, 0, :LMT - tz.offset :o1, -39600, 0, :NST - tz.offset :o2, -39600, 3600, :NDT - tz.offset :o3, -39600, 0, :BST - tz.offset :o4, -39600, 0, :SST - - tz.transition 1901, 1, :o1, 26086168721, 10800 - tz.transition 1956, 6, :o2, 58455071, 24 - tz.transition 1956, 9, :o1, 29228627, 12 - tz.transition 1967, 4, :o3, 58549967, 24 - tz.transition 1983, 11, :o4, 439038000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb deleted file mode 100644 index 70173db8a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Noumea.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Noumea - include TimezoneDefinition - - timezone 'Pacific/Noumea' do |tz| - tz.offset :o0, 39948, 0, :LMT - tz.offset :o1, 39600, 0, :NCT - tz.offset :o2, 39600, 3600, :NCST - - tz.transition 1912, 1, :o1, 17419781071, 7200 - tz.transition 1977, 12, :o2, 250002000 - tz.transition 1978, 2, :o1, 257342400 - tz.transition 1978, 12, :o2, 281451600 - tz.transition 1979, 2, :o1, 288878400 - tz.transition 1996, 11, :o2, 849366000 - tz.transition 1997, 3, :o1, 857228400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb deleted file mode 100644 index c8fcd7d52..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Pago_Pago.rb +++ /dev/null @@ -1,26 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Pago_Pago - include TimezoneDefinition - - timezone 'Pacific/Pago_Pago' do |tz| - tz.offset :o0, 45432, 0, :LMT - tz.offset :o1, -40968, 0, :LMT - tz.offset :o2, -41400, 0, :SAMT - tz.offset :o3, -39600, 0, :NST - tz.offset :o4, -39600, 0, :BST - tz.offset :o5, -39600, 0, :SST - - tz.transition 1879, 7, :o1, 2889041969, 1200 - tz.transition 1911, 1, :o2, 2902845569, 1200 - tz.transition 1950, 1, :o3, 116797583, 48 - tz.transition 1967, 4, :o4, 58549967, 24 - tz.transition 1983, 11, :o5, 439038000 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb deleted file mode 100644 index f06cf6d54..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Port_Moresby.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Port_Moresby - include TimezoneDefinition - - timezone 'Pacific/Port_Moresby' do |tz| - tz.offset :o0, 35320, 0, :LMT - tz.offset :o1, 35312, 0, :PMMT - tz.offset :o2, 36000, 0, :PGT - - tz.transition 1879, 12, :o1, 5200664597, 2160 - tz.transition 1894, 12, :o2, 13031248093, 5400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb deleted file mode 100644 index 7578d92f3..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/definitions/Pacific/Tongatapu.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'tzinfo/timezone_definition' - -module TZInfo - module Definitions - module Pacific - module Tongatapu - include TimezoneDefinition - - timezone 'Pacific/Tongatapu' do |tz| - tz.offset :o0, 44360, 0, :LMT - tz.offset :o1, 44400, 0, :TOT - tz.offset :o2, 46800, 0, :TOT - tz.offset :o3, 46800, 3600, :TOST - - tz.transition 1900, 12, :o1, 5217231571, 2160 - tz.transition 1940, 12, :o2, 174959639, 72 - tz.transition 1999, 10, :o3, 939214800 - tz.transition 2000, 3, :o2, 953384400 - tz.transition 2000, 11, :o3, 973342800 - tz.transition 2001, 1, :o2, 980596800 - tz.transition 2001, 11, :o3, 1004792400 - tz.transition 2002, 1, :o2, 1012046400 - end - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb deleted file mode 100644 index 001303c59..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/info_timezone.rb +++ /dev/null @@ -1,52 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone' - -module TZInfo - - # A Timezone based on a TimezoneInfo. - class InfoTimezone < Timezone #:nodoc: - - # Constructs a new InfoTimezone with a TimezoneInfo instance. - def self.new(info) - tz = super() - tz.send(:setup, info) - tz - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - @info.identifier - end - - protected - # The TimezoneInfo for this Timezone. - def info - @info - end - - def setup(info) - @info = info - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb deleted file mode 100644 index f8ec4fca8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone.rb +++ /dev/null @@ -1,51 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/info_timezone' - -module TZInfo - - class LinkedTimezone < InfoTimezone #:nodoc: - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - # - # If no TimezonePeriod could be found, PeriodNotFound is raised. - def period_for_utc(utc) - @linked_timezone.period_for_utc(utc) - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how abiguities should be resolved. - # Raises PeriodNotFound if no periods are found for the given time. - def periods_for_local(local) - @linked_timezone.periods_for_local(local) - end - - protected - def setup(info) - super(info) - @linked_timezone = Timezone.get(info.link_to_identifier) - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb deleted file mode 100644 index 8197ff3e8..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/linked_timezone_info.rb +++ /dev/null @@ -1,44 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/timezone_info' - -module TZInfo - # Represents a linked timezone defined in a data module. - class LinkedTimezoneInfo < TimezoneInfo #:nodoc: - - # The zone that provides the data (that this zone is an alias for). - attr_reader :link_to_identifier - - # Constructs a new TimezoneInfo with an identifier and the identifier - # of the zone linked to. - def initialize(identifier, link_to_identifier) - super(identifier) - @link_to_identifier = link_to_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier,#@link_to_identifier>" - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb deleted file mode 100644 index b1f10b2b6..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/offset_rationals.rb +++ /dev/null @@ -1,98 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'rational' -require 'tzinfo/ruby_core_support' - -module TZInfo - - # Provides a method for getting Rationals for a timezone offset in seconds. - # Pre-reduced rationals are returned for all the half-hour intervals between - # -14 and +14 hours to avoid having to call gcd at runtime. - module OffsetRationals #:nodoc: - @@rational_cache = { - -50400 => RubyCoreSupport.rational_new!(-7,12), - -48600 => RubyCoreSupport.rational_new!(-9,16), - -46800 => RubyCoreSupport.rational_new!(-13,24), - -45000 => RubyCoreSupport.rational_new!(-25,48), - -43200 => RubyCoreSupport.rational_new!(-1,2), - -41400 => RubyCoreSupport.rational_new!(-23,48), - -39600 => RubyCoreSupport.rational_new!(-11,24), - -37800 => RubyCoreSupport.rational_new!(-7,16), - -36000 => RubyCoreSupport.rational_new!(-5,12), - -34200 => RubyCoreSupport.rational_new!(-19,48), - -32400 => RubyCoreSupport.rational_new!(-3,8), - -30600 => RubyCoreSupport.rational_new!(-17,48), - -28800 => RubyCoreSupport.rational_new!(-1,3), - -27000 => RubyCoreSupport.rational_new!(-5,16), - -25200 => RubyCoreSupport.rational_new!(-7,24), - -23400 => RubyCoreSupport.rational_new!(-13,48), - -21600 => RubyCoreSupport.rational_new!(-1,4), - -19800 => RubyCoreSupport.rational_new!(-11,48), - -18000 => RubyCoreSupport.rational_new!(-5,24), - -16200 => RubyCoreSupport.rational_new!(-3,16), - -14400 => RubyCoreSupport.rational_new!(-1,6), - -12600 => RubyCoreSupport.rational_new!(-7,48), - -10800 => RubyCoreSupport.rational_new!(-1,8), - -9000 => RubyCoreSupport.rational_new!(-5,48), - -7200 => RubyCoreSupport.rational_new!(-1,12), - -5400 => RubyCoreSupport.rational_new!(-1,16), - -3600 => RubyCoreSupport.rational_new!(-1,24), - -1800 => RubyCoreSupport.rational_new!(-1,48), - 0 => RubyCoreSupport.rational_new!(0,1), - 1800 => RubyCoreSupport.rational_new!(1,48), - 3600 => RubyCoreSupport.rational_new!(1,24), - 5400 => RubyCoreSupport.rational_new!(1,16), - 7200 => RubyCoreSupport.rational_new!(1,12), - 9000 => RubyCoreSupport.rational_new!(5,48), - 10800 => RubyCoreSupport.rational_new!(1,8), - 12600 => RubyCoreSupport.rational_new!(7,48), - 14400 => RubyCoreSupport.rational_new!(1,6), - 16200 => RubyCoreSupport.rational_new!(3,16), - 18000 => RubyCoreSupport.rational_new!(5,24), - 19800 => RubyCoreSupport.rational_new!(11,48), - 21600 => RubyCoreSupport.rational_new!(1,4), - 23400 => RubyCoreSupport.rational_new!(13,48), - 25200 => RubyCoreSupport.rational_new!(7,24), - 27000 => RubyCoreSupport.rational_new!(5,16), - 28800 => RubyCoreSupport.rational_new!(1,3), - 30600 => RubyCoreSupport.rational_new!(17,48), - 32400 => RubyCoreSupport.rational_new!(3,8), - 34200 => RubyCoreSupport.rational_new!(19,48), - 36000 => RubyCoreSupport.rational_new!(5,12), - 37800 => RubyCoreSupport.rational_new!(7,16), - 39600 => RubyCoreSupport.rational_new!(11,24), - 41400 => RubyCoreSupport.rational_new!(23,48), - 43200 => RubyCoreSupport.rational_new!(1,2), - 45000 => RubyCoreSupport.rational_new!(25,48), - 46800 => RubyCoreSupport.rational_new!(13,24), - 48600 => RubyCoreSupport.rational_new!(9,16), - 50400 => RubyCoreSupport.rational_new!(7,12)} - - # Returns a Rational expressing the fraction of a day that offset in - # seconds represents (i.e. equivalent to Rational(offset, 86400)). - def rational_for_offset(offset) - @@rational_cache[offset] || Rational(offset, 86400) - end - module_function :rational_for_offset - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb deleted file mode 100644 index 9a0441206..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/ruby_core_support.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2008 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'rational' - -module TZInfo - - # Methods to support different versions of Ruby. - module RubyCoreSupport #:nodoc: - - # Use Rational.new! for performance reasons in Ruby 1.8. - # This has been removed from 1.9, but Rational performs better. - if Rational.respond_to? :new! - def self.rational_new!(numerator, denominator = 1) - Rational.new!(numerator, denominator) - end - else - def self.rational_new!(numerator, denominator = 1) - Rational(numerator, denominator) - end - end - - # Ruby 1.8.6 introduced new! and deprecated new0. - # Ruby 1.9.0 removed new0. - # We still need to support new0 for older versions of Ruby. - if DateTime.respond_to? :new! - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new!(ajd, of, sg) - end - else - def self.datetime_new!(ajd = 0, of = 0, sg = Date::ITALY) - DateTime.new0(ajd, of, sg) - end - end - end -end \ No newline at end of file diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb deleted file mode 100644 index 264517f3e..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/time_or_datetime.rb +++ /dev/null @@ -1,292 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'time' -require 'tzinfo/offset_rationals' - -module TZInfo - # Used by TZInfo internally to represent either a Time, DateTime or integer - # timestamp (seconds since 1970-01-01 00:00:00). - class TimeOrDateTime #:nodoc: - include Comparable - - # Constructs a new TimeOrDateTime. timeOrDateTime can be a Time, DateTime - # or an integer. If using a Time or DateTime, any time zone information is - # ignored. - def initialize(timeOrDateTime) - @time = nil - @datetime = nil - @timestamp = nil - - if timeOrDateTime.is_a?(Time) - @time = timeOrDateTime - @time = Time.utc(@time.year, @time.mon, @time.mday, @time.hour, @time.min, @time.sec) unless @time.zone == 'UTC' - @orig = @time - elsif timeOrDateTime.is_a?(DateTime) - @datetime = timeOrDateTime - @datetime = @datetime.new_offset(0) unless @datetime.offset == 0 - @orig = @datetime - else - @timestamp = timeOrDateTime.to_i - @orig = @timestamp - end - end - - # Returns the time as a Time. - def to_time - unless @time - if @timestamp - @time = Time.at(@timestamp).utc - else - @time = Time.utc(year, mon, mday, hour, min, sec) - end - end - - @time - end - - # Returns the time as a DateTime. - def to_datetime - unless @datetime - @datetime = DateTime.new(year, mon, mday, hour, min, sec) - end - - @datetime - end - - # Returns the time as an integer timestamp. - def to_i - unless @timestamp - @timestamp = to_time.to_i - end - - @timestamp - end - - # Returns the time as the original time passed to new. - def to_orig - @orig - end - - # Returns a string representation of the TimeOrDateTime. - def to_s - if @orig.is_a?(Time) - "Time: #{@orig.to_s}" - elsif @orig.is_a?(DateTime) - "DateTime: #{@orig.to_s}" - else - "Timestamp: #{@orig.to_s}" - end - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{@orig.inspect}>" - end - - # Returns the year. - def year - if @time - @time.year - elsif @datetime - @datetime.year - else - to_time.year - end - end - - # Returns the month of the year (1..12). - def mon - if @time - @time.mon - elsif @datetime - @datetime.mon - else - to_time.mon - end - end - alias :month :mon - - # Returns the day of the month (1..n). - def mday - if @time - @time.mday - elsif @datetime - @datetime.mday - else - to_time.mday - end - end - alias :day :mday - - # Returns the hour of the day (0..23). - def hour - if @time - @time.hour - elsif @datetime - @datetime.hour - else - to_time.hour - end - end - - # Returns the minute of the hour (0..59). - def min - if @time - @time.min - elsif @datetime - @datetime.min - else - to_time.min - end - end - - # Returns the second of the minute (0..60). (60 for a leap second). - def sec - if @time - @time.sec - elsif @datetime - @datetime.sec - else - to_time.sec - end - end - - # Compares this TimeOrDateTime with another Time, DateTime, integer - # timestamp or TimeOrDateTime. Returns -1, 0 or +1 depending whether the - # receiver is less than, equal to, or greater than timeOrDateTime. - # - # Milliseconds and smaller units are ignored in the comparison. - def <=>(timeOrDateTime) - if timeOrDateTime.is_a?(TimeOrDateTime) - orig = timeOrDateTime.to_orig - - if @orig.is_a?(DateTime) || orig.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> timeOrDateTime.to_datetime - elsif orig.is_a?(Time) - to_time <=> timeOrDateTime.to_time - else - to_i <=> timeOrDateTime.to_i - end - elsif @orig.is_a?(DateTime) || timeOrDateTime.is_a?(DateTime) - # If either is a DateTime, assume it is there for a reason - # (i.e. for range). - to_datetime <=> TimeOrDateTime.wrap(timeOrDateTime).to_datetime - elsif timeOrDateTime.is_a?(Time) - to_time <=> timeOrDateTime - else - to_i <=> timeOrDateTime.to_i - end - end - - # Adds a number of seconds to the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def +(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # + defined for Time and integer timestamps - TimeOrDateTime.new(@orig + seconds) - end - end - end - - # Subtracts a number of seconds from the TimeOrDateTime. Returns a new - # TimeOrDateTime, preserving what the original constructed type was. - # If the original type is a Time and the resulting calculation goes out of - # range for Times, then an exception will be raised by the Time class. - def -(seconds) - self + (-seconds) - end - - # Similar to the + operator, but for cases where adding would cause a - # timestamp or time to go out of the allowed range, converts to a DateTime - # based TimeOrDateTime. - def add_with_convert(seconds) - if seconds == 0 - self - else - if @orig.is_a?(DateTime) - TimeOrDateTime.new(@orig + OffsetRationals.rational_for_offset(seconds)) - else - # A Time or timestamp. - result = to_i + seconds - - if result < 0 || result > 2147483647 - result = TimeOrDateTime.new(to_datetime + OffsetRationals.rational_for_offset(seconds)) - else - result = TimeOrDateTime.new(@orig + seconds) - end - end - end - end - - # Returns true if todt represents the same time and was originally - # constructed with the same type (DateTime, Time or timestamp) as this - # TimeOrDateTime. - def eql?(todt) - todt.respond_to?(:to_orig) && to_orig.eql?(todt.to_orig) - end - - # Returns a hash of this TimeOrDateTime. - def hash - @orig.hash - end - - # If no block is given, returns a TimeOrDateTime wrapping the given - # timeOrDateTime. If a block is specified, a TimeOrDateTime is constructed - # and passed to the block. The result of the block must be a TimeOrDateTime. - # to_orig will be called on the result and the result of to_orig will be - # returned. - # - # timeOrDateTime can be a Time, DateTime, integer timestamp or TimeOrDateTime. - # If a TimeOrDateTime is passed in, no new TimeOrDateTime will be constructed, - # the passed in value will be used. - def self.wrap(timeOrDateTime) - t = timeOrDateTime.is_a?(TimeOrDateTime) ? timeOrDateTime : TimeOrDateTime.new(timeOrDateTime) - - if block_given? - t = yield t - - if timeOrDateTime.is_a?(TimeOrDateTime) - t - elsif timeOrDateTime.is_a?(Time) - t.to_time - elsif timeOrDateTime.is_a?(DateTime) - t.to_datetime - else - t.to_i - end - else - t - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb deleted file mode 100644 index f87fb6fb7..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone.rb +++ /dev/null @@ -1,508 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -# require 'tzinfo/country' -require 'tzinfo/time_or_datetime' -require 'tzinfo/timezone_period' - -module TZInfo - # Indicate a specified time in a local timezone has more than one - # possible time in UTC. This happens when switching from daylight savings time - # to normal time where the clocks are rolled back. Thrown by period_for_local - # and local_to_utc when using an ambiguous time and not specifying any - # means to resolve the ambiguity. - class AmbiguousTime < StandardError - end - - # Thrown to indicate that no TimezonePeriod matching a given time could be found. - class PeriodNotFound < StandardError - end - - # Thrown by Timezone#get if the identifier given is not valid. - class InvalidTimezoneIdentifier < StandardError - end - - # Thrown if an attempt is made to use a timezone created with Timezone.new(nil). - class UnknownTimezone < StandardError - end - - # Timezone is the base class of all timezones. It provides a factory method - # get to access timezones by identifier. Once a specific Timezone has been - # retrieved, DateTimes, Times and timestamps can be converted between the UTC - # and the local time for the zone. For example: - # - # tz = TZInfo::Timezone.get('America/New_York') - # puts tz.utc_to_local(DateTime.new(2005,8,29,15,35,0)).to_s - # puts tz.local_to_utc(Time.utc(2005,8,29,11,35,0)).to_s - # puts tz.utc_to_local(1125315300).to_s - # - # Each time conversion method returns an object of the same type it was - # passed. - # - # The timezone information all comes from the tz database - # (see http://www.twinsun.com/tz/tz-link.htm) - class Timezone - include Comparable - - # Cache of loaded zones by identifier to avoid using require if a zone - # has already been loaded. - @@loaded_zones = {} - - # Whether the timezones index has been loaded yet. - @@index_loaded = false - - # Returns a timezone by its identifier (e.g. "Europe/London", - # "America/Chicago" or "UTC"). - # - # Raises InvalidTimezoneIdentifier if the timezone couldn't be found. - def self.get(identifier) - instance = @@loaded_zones[identifier] - unless instance - raise InvalidTimezoneIdentifier, 'Invalid identifier' if identifier !~ /^[A-z0-9\+\-_]+(\/[A-z0-9\+\-_]+)*$/ - identifier = identifier.gsub(/-/, '__m__').gsub(/\+/, '__p__') - begin - # Use a temporary variable to avoid an rdoc warning - file = "tzinfo/definitions/#{identifier}" - require file - - m = Definitions - identifier.split(/\//).each {|part| - m = m.const_get(part) - } - - info = m.get - - # Could make Timezone subclasses register an interest in an info - # type. Since there are currently only two however, there isn't - # much point. - if info.kind_of?(DataTimezoneInfo) - instance = DataTimezone.new(info) - elsif info.kind_of?(LinkedTimezoneInfo) - instance = LinkedTimezone.new(info) - else - raise InvalidTimezoneIdentifier, "No handler for info type #{info.class}" - end - - @@loaded_zones[instance.identifier] = instance - rescue LoadError, NameError => e - raise InvalidTimezoneIdentifier, e.message - end - end - - instance - end - - # Returns a proxy for the Timezone with the given identifier. The proxy - # will cause the real timezone to be loaded when an attempt is made to - # find a period or convert a time. get_proxy will not validate the - # identifier. If an invalid identifier is specified, no exception will be - # raised until the proxy is used. - def self.get_proxy(identifier) - TimezoneProxy.new(identifier) - end - - # If identifier is nil calls super(), otherwise calls get. An identfier - # should always be passed in when called externally. - def self.new(identifier = nil) - if identifier - get(identifier) - else - super() - end - end - - # Returns an array containing all the available Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all - get_proxies(all_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones. - def self.all_identifiers - load_index - Indexes::Timezones.timezones - end - - # Returns an array containing all the available Timezones that are based - # on data (are not links to other Timezones). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_data_zones - get_proxies(all_data_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are based on data (are not links to other Timezones).. - def self.all_data_zone_identifiers - load_index - Indexes::Timezones.data_timezones - end - - # Returns an array containing all the available Timezones that are links - # to other Timezones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_linked_zones - get_proxies(all_linked_zone_identifiers) - end - - # Returns an array containing the identifiers of all the available - # Timezones that are links to other Timezones. - def self.all_linked_zone_identifiers - load_index - Indexes::Timezones.linked_timezones - end - - # Returns all the Timezones defined for all Countries. This is not the - # complete set of Timezones as some are not country specific (e.g. - # 'Etc/GMT'). - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.all_country_zones - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zones - } - end - - # Returns all the zone identifiers defined for all Countries. This is not the - # complete set of zone identifiers as some are not country specific (e.g. - # 'Etc/GMT'). You can obtain a Timezone instance for a given identifier - # with the get method. - def self.all_country_zone_identifiers - Country.all_codes.inject([]) {|zones,country| - zones += Country.get(country).zone_identifiers - } - end - - # Returns all US Timezone instances. A shortcut for - # TZInfo::Country.get('US').zones. - # - # Returns TimezoneProxy objects to avoid the overhead of loading Timezone - # definitions until a conversion is actually required. - def self.us_zones - Country.get('US').zones - end - - # Returns all US zone identifiers. A shortcut for - # TZInfo::Country.get('US').zone_identifiers. - def self.us_zone_identifiers - Country.get('US').zone_identifiers - end - - # The identifier of the timezone, e.g. "Europe/Paris". - def identifier - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # An alias for identifier. - def name - # Don't use alias, as identifier gets overridden. - identifier - end - - # Returns a friendlier version of the identifier. - def to_s - friendly_identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{identifier}>" - end - - # Returns a friendlier version of the identifier. Set skip_first_part to - # omit the first part of the identifier (typically a region name) where - # there is more than one part. - # - # For example: - # - # Timezone.get('Europe/Paris').friendly_identifier(false) #=> "Europe - Paris" - # Timezone.get('Europe/Paris').friendly_identifier(true) #=> "Paris" - # Timezone.get('America/Indiana/Knox').friendly_identifier(false) #=> "America - Knox, Indiana" - # Timezone.get('America/Indiana/Knox').friendly_identifier(true) #=> "Knox, Indiana" - def friendly_identifier(skip_first_part = false) - parts = identifier.split('/') - if parts.empty? - # shouldn't happen - identifier - elsif parts.length == 1 - parts[0] - else - if skip_first_part - result = '' - else - result = parts[0] + ' - ' - end - - parts[1, parts.length - 1].reverse_each {|part| - part.gsub!(/_/, ' ') - - if part.index(/[a-z]/) - # Missing a space if a lower case followed by an upper case and the - # name isn't McXxxx. - part.gsub!(/([^M][a-z])([A-Z])/, '\1 \2') - part.gsub!(/([M][a-bd-z])([A-Z])/, '\1 \2') - - # Missing an apostrophe if two consecutive upper case characters. - part.gsub!(/([A-Z])([A-Z])/, '\1\'\2') - end - - result << part - result << ', ' - } - - result.slice!(result.length - 2, 2) - result - end - end - - # Returns the TimezonePeriod for the given UTC time. utc can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in utc is ignored (it is treated as a UTC time). - def period_for_utc(utc) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the set of TimezonePeriod instances that are valid for the given - # local time as an array. If you just want a single period, use - # period_for_local instead and specify how ambiguities should be resolved. - # Returns an empty array if no periods are found for the given time. - def periods_for_local(local) - raise UnknownTimezone, 'TZInfo::Timezone constructed directly' - end - - # Returns the TimezonePeriod for the given local time. local can either be - # a DateTime, Time or integer timestamp (Time.to_i). Any timezone - # information in local is ignored (it is treated as a time in the current - # timezone). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').period_for_local(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would the daylight savings period from April to - # October 2004. Specifying dst=false would return the standard period - # from October 2004 to April 2005. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can select and - # return a single period or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def period_for_local(local, dst = nil) - results = periods_for_local(local) - - if results.empty? - raise PeriodNotFound - elsif results.size < 2 - results.first - else - # ambiguous result try to resolve - - if !dst.nil? - matches = results.find_all {|period| period.dst? == dst} - results = matches if !matches.empty? - end - - if results.size < 2 - results.first - else - # still ambiguous, try the block - - if block_given? - results = yield results - end - - if results.is_a?(TimezonePeriod) - results - elsif results && results.size == 1 - results.first - else - raise AmbiguousTime, "#{local} is an ambiguous local time." - end - end - end - end - - # Converts a time in UTC to the local timezone. utc can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as utc. Any timezone information in utc is ignored (it is treated as - # a UTC time). - def utc_to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - period_for_utc(wrapped).to_local(wrapped) - } - end - - # Converts a time in the local timezone to UTC. local can either be - # a DateTime, Time or timestamp (Time.to_i). The returned time has the same - # type as local. Any timezone information in local is ignored (it is treated - # as a local time). - # - # Warning: There are local times that have no equivalent UTC times (e.g. - # in the transition from standard time to daylight savings time). There are - # also local times that have more than one UTC equivalent (e.g. in the - # transition from daylight savings time to standard time). - # - # In the first case (no equivalent UTC time), a PeriodNotFound exception - # will be raised. - # - # In the second case (more than one equivalent UTC time), an AmbiguousTime - # exception will be raised unless the optional dst parameter or block - # handles the ambiguity. - # - # If the ambiguity is due to a transition from daylight savings time to - # standard time, the dst parameter can be used to select whether the - # daylight savings time or local time is used. For example, - # - # Timezone.get('America/New_York').local_to_utc(DateTime.new(2004,10,31,1,30,0)) - # - # would raise an AmbiguousTime exception. - # - # Specifying dst=true would return 2004-10-31 5:30:00. Specifying dst=false - # would return 2004-10-31 6:30:00. - # - # If the dst parameter does not resolve the ambiguity, and a block is - # specified, it is called. The block must take a single parameter - an - # array of the periods that need to be resolved. The block can return a - # single period to use to convert the time or return nil or an empty array - # to cause an AmbiguousTime exception to be raised. - def local_to_utc(local, dst = nil) - TimeOrDateTime.wrap(local) {|wrapped| - if block_given? - period = period_for_local(wrapped, dst) {|periods| yield periods } - else - period = period_for_local(wrapped, dst) - end - - period.to_utc(wrapped) - } - end - - # Returns the current time in the timezone as a Time. - def now - utc_to_local(Time.now.utc) - end - - # Returns the TimezonePeriod for the current time. - def current_period - period_for_utc(Time.now.utc) - end - - # Returns the current Time and TimezonePeriod as an array. The first element - # is the time, the second element is the period. - def current_period_and_time - utc = Time.now.utc - period = period_for_utc(utc) - [period.to_local(utc), period] - end - - alias :current_time_and_period :current_period_and_time - - # Converts a time in UTC to local time and returns it as a string - # according to the given format. The formatting is identical to - # Time.strftime and DateTime.strftime, except %Z is replaced with the - # timezone abbreviation for the specified time (for example, EST or EDT). - def strftime(format, utc = Time.now.utc) - period = period_for_utc(utc) - local = period.to_local(utc) - local = Time.at(local).utc unless local.kind_of?(Time) || local.kind_of?(DateTime) - abbreviation = period.abbreviation.to_s.gsub(/%/, '%%') - - format = format.gsub(/(.?)%Z/) do - if $1 == '%' - # return %%Z so the real strftime treats it as a literal %Z too - '%%Z' - else - "#$1#{abbreviation}" - end - end - - local.strftime(format) - end - - # Compares two Timezones based on their identifier. Returns -1 if tz is less - # than self, 0 if tz is equal to self and +1 if tz is greater than self. - def <=>(tz) - identifier <=> tz.identifier - end - - # Returns true if and only if the identifier of tz is equal to the - # identifier of this Timezone. - def eql?(tz) - self == tz - end - - # Returns a hash of this Timezone. - def hash - identifier.hash - end - - # Dumps this Timezone for marshalling. - def _dump(limit) - identifier - end - - # Loads a marshalled Timezone. - def self._load(data) - Timezone.get(data) - end - - private - # Loads in the index of timezones if it hasn't already been loaded. - def self.load_index - unless @@index_loaded - require 'tzinfo/indexes/timezones' - @@index_loaded = true - end - end - - # Returns an array of proxies corresponding to the given array of - # identifiers. - def self.get_proxies(identifiers) - identifiers.collect {|identifier| get_proxy(identifier)} - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb deleted file mode 100644 index 39ca8bfa5..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_definition.rb +++ /dev/null @@ -1,56 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/data_timezone_info' -require 'tzinfo/linked_timezone_info' - -module TZInfo - - # TimezoneDefinition is included into Timezone definition modules. - # TimezoneDefinition provides the methods for defining timezones. - module TimezoneDefinition #:nodoc: - # Add class methods to the includee. - def self.append_features(base) - super - base.extend(ClassMethods) - end - - # Class methods for inclusion. - module ClassMethods #:nodoc: - # Returns and yields a DataTimezoneInfo object to define a timezone. - def timezone(identifier) - yield @timezone = DataTimezoneInfo.new(identifier) - end - - # Defines a linked timezone. - def linked_timezone(identifier, link_to_identifier) - @timezone = LinkedTimezoneInfo.new(identifier, link_to_identifier) - end - - # Returns the last TimezoneInfo to be defined with timezone or - # linked_timezone. - def get - @timezone - end - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb deleted file mode 100644 index 68e38c35f..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_info.rb +++ /dev/null @@ -1,40 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents a timezone defined in a data module. - class TimezoneInfo #:nodoc: - - # The timezone identifier. - attr_reader :identifier - - # Constructs a new TimezoneInfo with an identifier. - def initialize(identifier) - @identifier = identifier - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@identifier>" - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb deleted file mode 100644 index 6a0bbca46..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_offset_info.rb +++ /dev/null @@ -1,94 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneOffsetInfo #:nodoc: - # The base offset of the timezone from UTC in seconds. - attr_reader :utc_offset - - # The offset from standard time for the zone in seconds (i.e. non-zero if - # daylight savings is being observed). - attr_reader :std_offset - - # The total offset of this observance from UTC in seconds - # (utc_offset + std_offset). - attr_reader :utc_total_offset - - # The abbreviation that identifies this observance, e.g. "GMT" - # (Greenwich Mean Time) or "BST" (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - attr_reader :abbreviation - - # Constructs a new TimezoneOffsetInfo. utc_offset and std_offset are - # specified in seconds. - def initialize(utc_offset, std_offset, abbreviation) - @utc_offset = utc_offset - @std_offset = std_offset - @abbreviation = abbreviation - - @utc_total_offset = @utc_offset + @std_offset - end - - # True if std_offset is non-zero. - def dst? - @std_offset != 0 - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - TimeOrDateTime.wrap(utc) {|wrapped| - wrapped + @utc_total_offset - } - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - TimeOrDateTime.wrap(local) {|wrapped| - wrapped - @utc_total_offset - } - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def ==(toi) - toi.respond_to?(:utc_offset) && toi.respond_to?(:std_offset) && toi.respond_to?(:abbreviation) && - utc_offset == toi.utc_offset && std_offset == toi.std_offset && abbreviation == toi.abbreviation - end - - # Returns true if and only if toi has the same utc_offset, std_offset - # and abbreviation as this TimezoneOffsetInfo. - def eql?(toi) - self == toi - end - - # Returns a hash of this TimezoneOffsetInfo. - def hash - utc_offset.hash ^ std_offset.hash ^ abbreviation.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #@utc_offset,#@std_offset,#@abbreviation>" - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb deleted file mode 100644 index 00888fcfd..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_period.rb +++ /dev/null @@ -1,198 +0,0 @@ -#-- -# Copyright (c) 2005-2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'tzinfo/offset_rationals' -require 'tzinfo/time_or_datetime' - -module TZInfo - # A period of time in a timezone where the same offset from UTC applies. - # - # All the methods that take times accept instances of Time, DateTime or - # integer timestamps. - class TimezonePeriod - # The TimezoneTransitionInfo that defines the start of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :start_transition - - # The TimezoneTransitionInfo that defines the end of this TimezonePeriod - # (may be nil if unbounded). - attr_reader :end_transition - - # The TimezoneOffsetInfo for this period. - attr_reader :offset - - # Initializes a new TimezonePeriod. - def initialize(start_transition, end_transition, offset = nil) - @start_transition = start_transition - @end_transition = end_transition - - if offset - raise ArgumentError, 'Offset specified with transitions' if @start_transition || @end_transition - @offset = offset - else - if @start_transition - @offset = @start_transition.offset - elsif @end_transition - @offset = @end_transition.previous_offset - else - raise ArgumentError, 'No offset specified and no transitions to determine it from' - end - end - - @utc_total_offset_rational = nil - end - - # Base offset of the timezone from UTC (seconds). - def utc_offset - @offset.utc_offset - end - - # Offset from the local time where daylight savings is in effect (seconds). - # E.g.: utc_offset could be -5 hours. Normally, std_offset would be 0. - # During daylight savings, std_offset would typically become +1 hours. - def std_offset - @offset.std_offset - end - - # The identifier of this period, e.g. "GMT" (Greenwich Mean Time) or "BST" - # (British Summer Time) for "Europe/London". The returned identifier is a - # symbol. - def abbreviation - @offset.abbreviation - end - alias :zone_identifier :abbreviation - - # Total offset from UTC (seconds). Equal to utc_offset + std_offset. - def utc_total_offset - @offset.utc_total_offset - end - - # Total offset from UTC (days). Result is a Rational. - def utc_total_offset_rational - unless @utc_total_offset_rational - @utc_total_offset_rational = OffsetRationals.rational_for_offset(utc_total_offset) - end - @utc_total_offset_rational - end - - # The start time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_start - @start_transition ? @start_transition.at.to_datetime : nil - end - - # The end time of the period in UTC as a DateTime. May be nil if unbounded. - def utc_end - @end_transition ? @end_transition.at.to_datetime : nil - end - - # The start time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_start - @start_transition ? @start_transition.local_start.to_datetime : nil - end - - # The end time of the period in local time as a DateTime. May be nil if - # unbounded. - def local_end - @end_transition ? @end_transition.local_end.to_datetime : nil - end - - # true if daylight savings is in effect for this period; otherwise false. - def dst? - @offset.dst? - end - - # true if this period is valid for the given UTC DateTime; otherwise false. - def valid_for_utc?(utc) - utc_after_start?(utc) && utc_before_end?(utc) - end - - # true if the given UTC DateTime is after the start of the period - # (inclusive); otherwise false. - def utc_after_start?(utc) - !@start_transition || @start_transition.at <= utc - end - - # true if the given UTC DateTime is before the end of the period - # (exclusive); otherwise false. - def utc_before_end?(utc) - !@end_transition || @end_transition.at > utc - end - - # true if this period is valid for the given local DateTime; otherwise false. - def valid_for_local?(local) - local_after_start?(local) && local_before_end?(local) - end - - # true if the given local DateTime is after the start of the period - # (inclusive); otherwise false. - def local_after_start?(local) - !@start_transition || @start_transition.local_start <= local - end - - # true if the given local DateTime is before the end of the period - # (exclusive); otherwise false. - def local_before_end?(local) - !@end_transition || @end_transition.local_end > local - end - - # Converts a UTC DateTime to local time based on the offset of this period. - def to_local(utc) - @offset.to_local(utc) - end - - # Converts a local DateTime to UTC based on the offset of this period. - def to_utc(local) - @offset.to_utc(local) - end - - # Returns true if this TimezonePeriod is equal to p. This compares the - # start_transition, end_transition and offset using ==. - def ==(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition == p.start_transition && - end_transition == p.end_transition && offset == p.offset - end - - # Returns true if this TimezonePeriods is equal to p. This compares the - # start_transition, end_transition and offset using eql? - def eql?(p) - p.respond_to?(:start_transition) && p.respond_to?(:end_transition) && - p.respond_to?(:offset) && start_transition.eql?(p.start_transition) && - end_transition.eql?(p.end_transition) && offset.eql?(p.offset) - end - - # Returns a hash of this TimezonePeriod. - def hash - result = @start_transition.hash ^ @end_transition.hash - result ^= @offset.hash unless @start_transition || @end_transition - result - end - - # Returns internal object state as a programmer-readable string. - def inspect - result = "#<#{self.class}: #{@start_transition.inspect},#{@end_transition.inspect}" - result << ",#{@offset.inspect}>" unless @start_transition || @end_transition - result + '>' - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb deleted file mode 100644 index 6b0669cc4..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/tzinfo-0.3.12/tzinfo/timezone_transition_info.rb +++ /dev/null @@ -1,129 +0,0 @@ -#-- -# Copyright (c) 2006 Philip Ross -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. -#++ - -require 'date' -require 'tzinfo/time_or_datetime' - -module TZInfo - # Represents an offset defined in a Timezone data file. - class TimezoneTransitionInfo #:nodoc: - # The offset this transition changes to (a TimezoneOffsetInfo instance). - attr_reader :offset - - # The offset this transition changes from (a TimezoneOffsetInfo instance). - attr_reader :previous_offset - - # The numerator of the DateTime if the transition time is defined as a - # DateTime, otherwise the transition time as a timestamp. - attr_reader :numerator_or_time - protected :numerator_or_time - - # Either the denominotor of the DateTime if the transition time is defined - # as a DateTime, otherwise nil. - attr_reader :denominator - protected :denominator - - # Creates a new TimezoneTransitionInfo with the given offset, - # previous_offset (both TimezoneOffsetInfo instances) and UTC time. - # if denominator is nil, numerator_or_time is treated as a number of - # seconds since the epoch. If denominator is specified numerator_or_time - # and denominator are used to create a DateTime as follows: - # - # DateTime.new!(Rational.send(:new!, numerator_or_time, denominator), 0, Date::ITALY) - # - # For performance reasons, the numerator and denominator must be specified - # in their lowest form. - def initialize(offset, previous_offset, numerator_or_time, denominator = nil) - @offset = offset - @previous_offset = previous_offset - @numerator_or_time = numerator_or_time - @denominator = denominator - - @at = nil - @local_end = nil - @local_start = nil - end - - # A TimeOrDateTime instance representing the UTC time when this transition - # occurs. - def at - unless @at - unless @denominator - @at = TimeOrDateTime.new(@numerator_or_time) - else - r = RubyCoreSupport.rational_new!(@numerator_or_time, @denominator) - dt = RubyCoreSupport.datetime_new!(r, 0, Date::ITALY) - @at = TimeOrDateTime.new(dt) - end - end - - @at - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the previous observance to end (calculated from at using - # previous_offset). - def local_end - @local_end = at.add_with_convert(@previous_offset.utc_total_offset) unless @local_end - @local_end - end - - # A TimeOrDateTime instance representing the local time when this transition - # causes the next observance to start (calculated from at using offset). - def local_start - @local_start = at.add_with_convert(@offset.utc_total_offset) unless @local_start - @local_start - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by == if offset, previous_offset and at are all - # equal. - def ==(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && tti.respond_to?(:at) && - offset == tti.offset && previous_offset == tti.previous_offset && at == tti.at - end - - # Returns true if this TimezoneTransitionInfo is equal to the given - # TimezoneTransitionInfo. Two TimezoneTransitionInfo instances are - # considered to be equal by eql? if offset, previous_offset, - # numerator_or_time and denominator are all equal. This is stronger than ==, - # which just requires the at times to be equal regardless of how they were - # originally specified. - def eql?(tti) - tti.respond_to?(:offset) && tti.respond_to?(:previous_offset) && - tti.respond_to?(:numerator_or_time) && tti.respond_to?(:denominator) && - offset == tti.offset && previous_offset == tti.previous_offset && - numerator_or_time == tti.numerator_or_time && denominator == tti.denominator - end - - # Returns a hash of this TimezoneTransitionInfo instance. - def hash - @offset.hash ^ @previous_offset.hash ^ @numerator_or_time.hash ^ @denominator.hash - end - - # Returns internal object state as a programmer-readable string. - def inspect - "#<#{self.class}: #{at.inspect},#{@offset.inspect}>" - end - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb b/vendor/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb deleted file mode 100644 index ec6dab513..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/vendor/xml-simple-1.0.11/xmlsimple.rb +++ /dev/null @@ -1,1021 +0,0 @@ -# = XmlSimple -# -# Author:: Maik Schmidt -# Copyright:: Copyright (c) 2003-2006 Maik Schmidt -# License:: Distributes under the same terms as Ruby. -# -require 'rexml/document' -require 'stringio' - -# Easy API to maintain XML (especially configuration files). -class XmlSimple - include REXML - - @@VERSION = '1.0.11' - - # A simple cache for XML documents that were already transformed - # by xml_in. - class Cache - # Creates and initializes a new Cache object. - def initialize - @mem_share_cache = {} - @mem_copy_cache = {} - end - - # Saves a data structure into a file. - # - # data:: - # Data structure to be saved. - # filename:: - # Name of the file belonging to the data structure. - def save_storable(data, filename) - cache_file = get_cache_filename(filename) - File.open(cache_file, "w+") { |f| Marshal.dump(data, f) } - end - - # Restores a data structure from a file. If restoring the data - # structure failed for any reason, nil will be returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_storable(filename) - cache_file = get_cache_filename(filename) - return nil unless File::exist?(cache_file) - return nil unless File::mtime(cache_file).to_i > File::mtime(filename).to_i - data = nil - File.open(cache_file) { |f| data = Marshal.load(f) } - data - end - - # Saves a data structure in a shared memory cache. - # - # data:: - # Data structure to be saved. - # filename:: - # Name of the file belonging to the data structure. - def save_mem_share(data, filename) - @mem_share_cache[filename] = [Time::now.to_i, data] - end - - # Restores a data structure from a shared memory cache. You - # should consider these elements as "read only". If restoring - # the data structure failed for any reason, nil will be - # returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_mem_share(filename) - get_from_memory_cache(filename, @mem_share_cache) - end - - # Copies a data structure to a memory cache. - # - # data:: - # Data structure to be copied. - # filename:: - # Name of the file belonging to the data structure. - def save_mem_copy(data, filename) - @mem_share_cache[filename] = [Time::now.to_i, Marshal.dump(data)] - end - - # Restores a data structure from a memory cache. If restoring - # the data structure failed for any reason, nil will be - # returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_mem_copy(filename) - data = get_from_memory_cache(filename, @mem_share_cache) - data = Marshal.load(data) unless data.nil? - data - end - - private - - # Returns the "cache filename" belonging to a filename, i.e. - # the extension '.xml' in the original filename will be replaced - # by '.stor'. If filename does not have this extension, '.stor' - # will be appended. - # - # filename:: - # Filename to get "cache filename" for. - def get_cache_filename(filename) - filename.sub(/(\.xml)?$/, '.stor') - end - - # Returns a cache entry from a memory cache belonging to a - # certain filename. If no entry could be found for any reason, - # nil will be returned. - # - # filename:: - # Name of the file the cache entry belongs to. - # cache:: - # Memory cache to get entry from. - def get_from_memory_cache(filename, cache) - return nil unless cache[filename] - return nil unless cache[filename][0] > File::mtime(filename).to_i - return cache[filename][1] - end - end - - # Create a "global" cache. - @@cache = Cache.new - - # Creates and initializes a new XmlSimple object. - # - # defaults:: - # Default values for options. - def initialize(defaults = nil) - unless defaults.nil? || defaults.instance_of?(Hash) - raise ArgumentError, "Options have to be a Hash." - end - @default_options = normalize_option_names(defaults, (KNOWN_OPTIONS['in'] + KNOWN_OPTIONS['out']).uniq) - @options = Hash.new - @_var_values = nil - end - - # Converts an XML document in the same way as the Perl module XML::Simple. - # - # string:: - # XML source. Could be one of the following: - # - # - nil: Tries to load and parse '.xml'. - # - filename: Tries to load and parse filename. - # - IO object: Reads from object until EOF is detected and parses result. - # - XML string: Parses string. - # - # options:: - # Options to be used. - def xml_in(string = nil, options = nil) - handle_options('in', options) - - # If no XML string or filename was supplied look for scriptname.xml. - if string.nil? - string = File::basename($0) - string.sub!(/\.[^.]+$/, '') - string += '.xml' - - directory = File::dirname($0) - @options['searchpath'].unshift(directory) unless directory.nil? - end - - if string.instance_of?(String) - if string =~ /<.*?>/m - @doc = parse(string) - elsif string == '-' - @doc = parse($stdin.readlines.to_s) - else - filename = find_xml_file(string, @options['searchpath']) - - if @options.has_key?('cache') - @options['cache'].each { |scheme| - case(scheme) - when 'storable' - content = @@cache.restore_storable(filename) - when 'mem_share' - content = @@cache.restore_mem_share(filename) - when 'mem_copy' - content = @@cache.restore_mem_copy(filename) - else - raise ArgumentError, "Unsupported caching scheme: <#{scheme}>." - end - return content if content - } - end - - @doc = load_xml_file(filename) - end - elsif string.kind_of?(IO) || string.kind_of?(StringIO) - @doc = parse(string.readlines.to_s) - else - raise ArgumentError, "Could not parse object of type: <#{string.type}>." - end - - result = collapse(@doc.root) - result = @options['keeproot'] ? merge({}, @doc.root.name, result) : result - put_into_cache(result, filename) - result - end - - # This is the functional version of the instance method xml_in. - def XmlSimple.xml_in(string = nil, options = nil) - xml_simple = XmlSimple.new - xml_simple.xml_in(string, options) - end - - # Converts a data structure into an XML document. - # - # ref:: - # Reference to data structure to be converted into XML. - # options:: - # Options to be used. - def xml_out(ref, options = nil) - handle_options('out', options) - if ref.instance_of?(Array) - ref = { @options['anonymoustag'] => ref } - end - - if @options['keeproot'] - keys = ref.keys - if keys.size == 1 - ref = ref[keys[0]] - @options['rootname'] = keys[0] - end - elsif @options['rootname'] == '' - if ref.instance_of?(Hash) - refsave = ref - ref = {} - refsave.each { |key, value| - if !scalar(value) - ref[key] = value - else - ref[key] = [ value.to_s ] - end - } - end - end - - @ancestors = [] - xml = value_to_xml(ref, @options['rootname'], '') - @ancestors = nil - - if @options['xmldeclaration'] - xml = @options['xmldeclaration'] + "\n" + xml - end - - if @options.has_key?('outputfile') - if @options['outputfile'].kind_of?(IO) - return @options['outputfile'].write(xml) - else - File.open(@options['outputfile'], "w") { |file| file.write(xml) } - end - end - xml - end - - # This is the functional version of the instance method xml_out. - def XmlSimple.xml_out(hash, options = nil) - xml_simple = XmlSimple.new - xml_simple.xml_out(hash, options) - end - - private - - # Declare options that are valid for xml_in and xml_out. - KNOWN_OPTIONS = { - 'in' => %w( - keyattr keeproot forcecontent contentkey noattr - searchpath forcearray suppressempty anonymoustag - cache grouptags normalisespace normalizespace - variables varattr keytosymbol - ), - 'out' => %w( - keyattr keeproot contentkey noattr rootname - xmldeclaration outputfile noescape suppressempty - anonymoustag indent grouptags noindent - ) - } - - # Define some reasonable defaults. - DEF_KEY_ATTRIBUTES = [] - DEF_ROOT_NAME = 'opt' - DEF_CONTENT_KEY = 'content' - DEF_XML_DECLARATION = "" - DEF_ANONYMOUS_TAG = 'anon' - DEF_FORCE_ARRAY = true - DEF_INDENTATION = ' ' - DEF_KEY_TO_SYMBOL = false - - # Normalizes option names in a hash, i.e., turns all - # characters to lower case and removes all underscores. - # Additionally, this method checks, if an unknown option - # was used and raises an according exception. - # - # options:: - # Hash to be normalized. - # known_options:: - # List of known options. - def normalize_option_names(options, known_options) - return nil if options.nil? - result = Hash.new - options.each { |key, value| - lkey = key.downcase - lkey.gsub!(/_/, '') - if !known_options.member?(lkey) - raise ArgumentError, "Unrecognised option: #{lkey}." - end - result[lkey] = value - } - result - end - - # Merges a set of options with the default options. - # - # direction:: - # 'in': If options should be handled for xml_in. - # 'out': If options should be handled for xml_out. - # options:: - # Options to be merged with the default options. - def handle_options(direction, options) - @options = options || Hash.new - - raise ArgumentError, "Options must be a Hash!" unless @options.instance_of?(Hash) - - unless KNOWN_OPTIONS.has_key?(direction) - raise ArgumentError, "Unknown direction: <#{direction}>." - end - - known_options = KNOWN_OPTIONS[direction] - @options = normalize_option_names(@options, known_options) - - unless @default_options.nil? - known_options.each { |option| - unless @options.has_key?(option) - if @default_options.has_key?(option) - @options[option] = @default_options[option] - end - end - } - end - - unless @options.has_key?('noattr') - @options['noattr'] = false - end - - if @options.has_key?('rootname') - @options['rootname'] = '' if @options['rootname'].nil? - else - @options['rootname'] = DEF_ROOT_NAME - end - - if @options.has_key?('xmldeclaration') && @options['xmldeclaration'] == true - @options['xmldeclaration'] = DEF_XML_DECLARATION - end - - @options['keytosymbol'] = DEF_KEY_TO_SYMBOL unless @options.has_key?('keytosymbol') - - if @options.has_key?('contentkey') - if @options['contentkey'] =~ /^-(.*)$/ - @options['contentkey'] = $1 - @options['collapseagain'] = true - end - else - @options['contentkey'] = DEF_CONTENT_KEY - end - - unless @options.has_key?('normalisespace') - @options['normalisespace'] = @options['normalizespace'] - end - @options['normalisespace'] = 0 if @options['normalisespace'].nil? - - if @options.has_key?('searchpath') - unless @options['searchpath'].instance_of?(Array) - @options['searchpath'] = [ @options['searchpath'] ] - end - else - @options['searchpath'] = [] - end - - if @options.has_key?('cache') && scalar(@options['cache']) - @options['cache'] = [ @options['cache'] ] - end - - @options['anonymoustag'] = DEF_ANONYMOUS_TAG unless @options.has_key?('anonymoustag') - - if !@options.has_key?('indent') || @options['indent'].nil? - @options['indent'] = DEF_INDENTATION - end - - @options['indent'] = '' if @options.has_key?('noindent') - - # Special cleanup for 'keyattr' which could be an array or - # a hash or left to default to array. - if @options.has_key?('keyattr') - if !scalar(@options['keyattr']) - # Convert keyattr => { elem => '+attr' } - # to keyattr => { elem => ['attr', '+'] } - if @options['keyattr'].instance_of?(Hash) - @options['keyattr'].each { |key, value| - if value =~ /^([-+])?(.*)$/ - @options['keyattr'][key] = [$2, $1 ? $1 : ''] - end - } - elsif !@options['keyattr'].instance_of?(Array) - raise ArgumentError, "'keyattr' must be String, Hash, or Array!" - end - else - @options['keyattr'] = [ @options['keyattr'] ] - end - else - @options['keyattr'] = DEF_KEY_ATTRIBUTES - end - - if @options.has_key?('forcearray') - if @options['forcearray'].instance_of?(Regexp) - @options['forcearray'] = [ @options['forcearray'] ] - end - - if @options['forcearray'].instance_of?(Array) - force_list = @options['forcearray'] - unless force_list.empty? - @options['forcearray'] = {} - force_list.each { |tag| - if tag.instance_of?(Regexp) - unless @options['forcearray']['_regex'].instance_of?(Array) - @options['forcearray']['_regex'] = [] - end - @options['forcearray']['_regex'] << tag - else - @options['forcearray'][tag] = true - end - } - else - @options['forcearray'] = false - end - else - @options['forcearray'] = @options['forcearray'] ? true : false - end - else - @options['forcearray'] = DEF_FORCE_ARRAY - end - - if @options.has_key?('grouptags') && !@options['grouptags'].instance_of?(Hash) - raise ArgumentError, "Illegal value for 'GroupTags' option - expected a Hash." - end - - if @options.has_key?('variables') && !@options['variables'].instance_of?(Hash) - raise ArgumentError, "Illegal value for 'Variables' option - expected a Hash." - end - - if @options.has_key?('variables') - @_var_values = @options['variables'] - elsif @options.has_key?('varattr') - @_var_values = {} - end - end - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - def collapse(element) - result = @options['noattr'] ? {} : get_attributes(element) - - if @options['normalisespace'] == 2 - result.each { |k, v| result[k] = normalise_space(v) } - end - - if element.has_elements? - element.each_element { |child| - value = collapse(child) - if empty(value) && (element.attributes.empty? || @options['noattr']) - next if @options.has_key?('suppressempty') && @options['suppressempty'] == true - end - result = merge(result, child.name, value) - } - if has_mixed_content?(element) - # normalisespace? - content = element.texts.map { |x| x.to_s } - content = content[0] if content.size == 1 - result[@options['contentkey']] = content - end - elsif element.has_text? # i.e. it has only text. - return collapse_text_node(result, element) - end - - # Turn Arrays into Hashes if key fields present. - count = fold_arrays(result) - - # Disintermediate grouped tags. - if @options.has_key?('grouptags') - result.each { |key, value| - next unless (value.instance_of?(Hash) && (value.size == 1)) - child_key, child_value = value.to_a[0] - if @options['grouptags'][key] == child_key - result[key] = child_value - end - } - end - - # Fold Hashes containing a single anonymous Array up into just the Array. - if count == 1 - anonymoustag = @options['anonymoustag'] - if result.has_key?(anonymoustag) && result[anonymoustag].instance_of?(Array) - return result[anonymoustag] - end - end - - if result.empty? && @options.has_key?('suppressempty') - return @options['suppressempty'] == '' ? '' : nil - end - - result - end - - # Collapses a text node and merges it with an existing Hash, if - # possible. - # Thanks to Curtis Schofield for reporting a subtle bug. - # - # hash:: - # Hash to merge text node value with, if possible. - # element:: - # Text node to be collapsed. - def collapse_text_node(hash, element) - value = node_to_text(element) - if empty(value) && !element.has_attributes? - return {} - end - - if element.has_attributes? && !@options['noattr'] - return merge(hash, @options['contentkey'], value) - else - if @options['forcecontent'] - return merge(hash, @options['contentkey'], value) - else - return value - end - end - end - - # Folds all arrays in a Hash. - # - # hash:: - # Hash to be folded. - def fold_arrays(hash) - fold_amount = 0 - keyattr = @options['keyattr'] - if (keyattr.instance_of?(Array) || keyattr.instance_of?(Hash)) - hash.each { |key, value| - if value.instance_of?(Array) - if keyattr.instance_of?(Array) - hash[key] = fold_array(value) - else - hash[key] = fold_array_by_name(key, value) - end - fold_amount += 1 - end - } - end - fold_amount - end - - # Folds an Array to a Hash, if possible. Folding happens - # according to the content of keyattr, which has to be - # an array. - # - # array:: - # Array to be folded. - def fold_array(array) - hash = Hash.new - array.each { |x| - return array unless x.instance_of?(Hash) - key_matched = false - @options['keyattr'].each { |key| - if x.has_key?(key) - key_matched = true - value = x[key] - return array if value.instance_of?(Hash) || value.instance_of?(Array) - value = normalise_space(value) if @options['normalisespace'] == 1 - x.delete(key) - hash[value] = x - break - end - } - return array unless key_matched - } - hash = collapse_content(hash) if @options['collapseagain'] - hash - end - - # Folds an Array to a Hash, if possible. Folding happens - # according to the content of keyattr, which has to be - # a Hash. - # - # name:: - # Name of the attribute to be folded upon. - # array:: - # Array to be folded. - def fold_array_by_name(name, array) - return array unless @options['keyattr'].has_key?(name) - key, flag = @options['keyattr'][name] - - hash = Hash.new - array.each { |x| - if x.instance_of?(Hash) && x.has_key?(key) - value = x[key] - return array if value.instance_of?(Hash) || value.instance_of?(Array) - value = normalise_space(value) if @options['normalisespace'] == 1 - hash[value] = x - hash[value]["-#{key}"] = hash[value][key] if flag == '-' - hash[value].delete(key) unless flag == '+' - else - $stderr.puts("Warning: <#{name}> element has no '#{key}' attribute.") - return array - end - } - hash = collapse_content(hash) if @options['collapseagain'] - hash - end - - # Tries to collapse a Hash even more ;-) - # - # hash:: - # Hash to be collapsed again. - def collapse_content(hash) - content_key = @options['contentkey'] - hash.each_value { |value| - return hash unless value.instance_of?(Hash) && value.size == 1 && value.has_key?(content_key) - hash.each_key { |key| hash[key] = hash[key][content_key] } - } - hash - end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # does already exist and the existing value associated with key is not - # an Array, it will be converted into an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - def merge(hash, key, value) - if value.instance_of?(String) - value = normalise_space(value) if @options['normalisespace'] == 2 - - # do variable substitutions - unless @_var_values.nil? || @_var_values.empty? - value.gsub!(/\$\{(\w+)\}/) { |x| get_var($1) } - end - - # look for variable definitions - if @options.has_key?('varattr') - varattr = @options['varattr'] - if hash.has_key?(varattr) - set_var(hash[varattr], value) - end - end - end - - #patch for converting keys to symbols - if @options.has_key?('keytosymbol') - if @options['keytosymbol'] == true - key = key.to_s.downcase.to_sym - end - end - - if hash.has_key?(key) - if hash[key].instance_of?(Array) - hash[key] << value - else - hash[key] = [ hash[key], value ] - end - elsif value.instance_of?(Array) # Handle anonymous arrays. - hash[key] = [ value ] - else - if force_array?(key) - hash[key] = [ value ] - else - hash[key] = value - end - end - hash - end - - # Checks, if the 'forcearray' option has to be used for - # a certain key. - def force_array?(key) - return false if key == @options['contentkey'] - return true if @options['forcearray'] == true - forcearray = @options['forcearray'] - if forcearray.instance_of?(Hash) - return true if forcearray.has_key?(key) - return false unless forcearray.has_key?('_regex') - forcearray['_regex'].each { |x| return true if key =~ x } - end - return false - end - - # Converts the attributes array of a document node into a Hash. - # Returns an empty Hash, if node has no attributes. - # - # node:: - # Document node to extract attributes from. - def get_attributes(node) - attributes = {} - node.attributes.each { |n,v| attributes[n] = v } - attributes - end - - # Determines, if a document element has mixed content. - # - # element:: - # Document element to be checked. - def has_mixed_content?(element) - if element.has_text? && element.has_elements? - return true if element.texts.join('') !~ /^\s*$/s - end - false - end - - # Called when a variable definition is encountered in the XML. - # A variable definition looks like - # value - # where attrname matches the varattr setting. - def set_var(name, value) - @_var_values[name] = value - end - - # Called during variable substitution to get the value for the - # named variable. - def get_var(name) - if @_var_values.has_key?(name) - return @_var_values[name] - else - return "${#{name}}" - end - end - - # Recurses through a data structure building up and returning an - # XML representation of that structure as a string. - # - # ref:: - # Reference to the data structure to be encoded. - # name:: - # The XML tag name to be used for this item. - # indent:: - # A string of spaces for use as the current indent level. - def value_to_xml(ref, name, indent) - named = !name.nil? && name != '' - nl = @options.has_key?('noindent') ? '' : "\n" - - if !scalar(ref) - if @ancestors.member?(ref) - raise ArgumentError, "Circular data structures not supported!" - end - @ancestors << ref - else - if named - return [indent, '<', name, '>', @options['noescape'] ? ref.to_s : escape_value(ref.to_s), '', nl].join('') - else - return ref.to_s + nl - end - end - - # Unfold hash to array if possible. - if ref.instance_of?(Hash) && !ref.empty? && !@options['keyattr'].empty? && indent != '' - ref = hash_to_array(name, ref) - end - - result = [] - if ref.instance_of?(Hash) - # Reintermediate grouped values if applicable. - if @options.has_key?('grouptags') - ref.each { |key, value| - if @options['grouptags'].has_key?(key) - ref[key] = { @options['grouptags'][key] => value } - end - } - end - - nested = [] - text_content = nil - if named - result << indent << '<' << name - end - - if !ref.empty? - ref.each { |key, value| - next if !key.nil? && key[0, 1] == '-' - if value.nil? - unless @options.has_key?('suppressempty') && @options['suppressempty'].nil? - raise ArgumentError, "Use of uninitialized value!" - end - value = {} - end - - if !scalar(value) || @options['noattr'] - nested << value_to_xml(value, key, indent + @options['indent']) - else - value = value.to_s - value = escape_value(value) unless @options['noescape'] - if key == @options['contentkey'] - text_content = value - else - result << ' ' << key << '="' << value << '"' - end - end - } - else - text_content = '' - end - - if !nested.empty? || !text_content.nil? - if named - result << '>' - if !text_content.nil? - result << text_content - nested[0].sub!(/^\s+/, '') if !nested.empty? - else - result << nl - end - if !nested.empty? - result << nested << indent - end - result << '' << nl - else - result << nested - end - else - result << ' />' << nl - end - elsif ref.instance_of?(Array) - ref.each { |value| - if scalar(value) - result << indent << '<' << name << '>' - result << (@options['noescape'] ? value.to_s : escape_value(value.to_s)) - result << '' << nl - elsif value.instance_of?(Hash) - result << value_to_xml(value, name, indent) - else - result << indent << '<' << name << '>' << nl - result << value_to_xml(value, @options['anonymoustag'], indent + @options['indent']) - result << indent << '' << nl - end - } - else - # Probably, this is obsolete. - raise ArgumentError, "Can't encode a value of type: #{ref.type}." - end - @ancestors.pop if !scalar(ref) - result.join('') - end - - # Checks, if a certain value is a "scalar" value. Whatever - # that will be in Ruby ... ;-) - # - # value:: - # Value to be checked. - def scalar(value) - return false if value.instance_of?(Hash) || value.instance_of?(Array) - return true - end - - # Attempts to unfold a hash of hashes into an array of hashes. Returns - # a reference to th array on success or the original hash, if unfolding - # is not possible. - # - # parent:: - # - # hashref:: - # Reference to the hash to be unfolded. - def hash_to_array(parent, hashref) - arrayref = [] - hashref.each { |key, value| - return hashref unless value.instance_of?(Hash) - - if @options['keyattr'].instance_of?(Hash) - return hashref unless @options['keyattr'].has_key?(parent) - arrayref << { @options['keyattr'][parent][0] => key }.update(value) - else - arrayref << { @options['keyattr'][0] => key }.update(value) - end - } - arrayref - end - - # Replaces XML markup characters by their external entities. - # - # data:: - # The string to be escaped. - def escape_value(data) - Text::normalize(data) - end - - # Removes leading and trailing whitespace and sequences of - # whitespaces from a string. - # - # text:: - # String to be normalised. - def normalise_space(text) - text.strip.gsub(/\s\s+/, ' ') - end - - # Checks, if an object is nil, an empty String or an empty Hash. - # Thanks to Norbert Gawor for a bugfix. - # - # value:: - # Value to be checked for emptiness. - def empty(value) - case value - when Hash - return value.empty? - when String - return value !~ /\S/m - else - return value.nil? - end - end - - # Converts a document node into a String. - # If the node could not be converted into a String - # for any reason, default will be returned. - # - # node:: - # Document node to be converted. - # default:: - # Value to be returned, if node could not be converted. - def node_to_text(node, default = nil) - if node.instance_of?(REXML::Element) - node.texts.map { |t| t.value }.join('') - elsif node.instance_of?(REXML::Attribute) - node.value.nil? ? default : node.value.strip - elsif node.instance_of?(REXML::Text) - node.value.strip - else - default - end - end - - # Parses an XML string and returns the according document. - # - # xml_string:: - # XML string to be parsed. - # - # The following exception may be raised: - # - # REXML::ParseException:: - # If the specified file is not wellformed. - def parse(xml_string) - Document.new(xml_string) - end - - # Searches in a list of paths for a certain file. Returns - # the full path to the file, if it could be found. Otherwise, - # an exception will be raised. - # - # filename:: - # Name of the file to search for. - # searchpath:: - # List of paths to search in. - def find_xml_file(file, searchpath) - filename = File::basename(file) - - if filename != file - return file if File::file?(file) - else - searchpath.each { |path| - full_path = File::join(path, filename) - return full_path if File::file?(full_path) - } - end - - if searchpath.empty? - return file if File::file?(file) - raise ArgumentError, "File does not exist: #{file}." - end - raise ArgumentError, "Could not find <#{filename}> in <#{searchpath.join(':')}>" - end - - # Loads and parses an XML configuration file. - # - # filename:: - # Name of the configuration file to be loaded. - # - # The following exceptions may be raised: - # - # Errno::ENOENT:: - # If the specified file does not exist. - # REXML::ParseException:: - # If the specified file is not wellformed. - def load_xml_file(filename) - parse(File.readlines(filename).to_s) - end - - # Caches the data belonging to a certain file. - # - # data:: - # Data to be cached. - # filename:: - # Name of file the data was read from. - def put_into_cache(data, filename) - if @options.has_key?('cache') - @options['cache'].each { |scheme| - case(scheme) - when 'storable' - @@cache.save_storable(data, filename) - when 'mem_share' - @@cache.save_mem_share(data, filename) - when 'mem_copy' - @@cache.save_mem_copy(data, filename) - else - raise ArgumentError, "Unsupported caching scheme: <#{scheme}>." - end - } - end - end -end - -# vim:sw=2 diff --git a/vendor/activesupport-2.2.2/lib/active_support/version.rb b/vendor/activesupport-2.2.2/lib/active_support/version.rb deleted file mode 100644 index 07273598a..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/version.rb +++ /dev/null @@ -1,9 +0,0 @@ -module ActiveSupport - module VERSION #:nodoc: - MAJOR = 2 - MINOR = 2 - TINY = 2 - - STRING = [MAJOR, MINOR, TINY].join('.') - end -end diff --git a/vendor/activesupport-2.2.2/lib/active_support/whiny_nil.rb b/vendor/activesupport-2.2.2/lib/active_support/whiny_nil.rb deleted file mode 100644 index 36fe9510b..000000000 --- a/vendor/activesupport-2.2.2/lib/active_support/whiny_nil.rb +++ /dev/null @@ -1,58 +0,0 @@ -# Extensions to +nil+ which allow for more helpful error messages for people who -# are new to Rails. -# -# Ruby raises NoMethodError if you invoke a method on an object that does not -# respond to it: -# -# $ ruby -e nil.destroy -# -e:1: undefined method `destroy' for nil:NilClass (NoMethodError) -# -# With these extensions, if the method belongs to the public interface of the -# classes in NilClass::WHINERS the error message suggests which could be the -# actual intended class: -# -# $ script/runner nil.destroy -# ... -# You might have expected an instance of ActiveRecord::Base. -# ... -# -# NilClass#id exists in Ruby 1.8 (though it is deprecated). Since +id+ is a fundamental -# method of Active Record models NilClass#id is redefined as well to raise a RuntimeError -# and warn the user. She probably wanted a model database identifier and the 4 -# returned by the original method could result in obscure bugs. -# -# The flag config.whiny_nils determines whether this feature is enabled. -# By default it is on in development and test modes, and it is off in production -# mode. -class NilClass - WHINERS = [::Array] - WHINERS << ::ActiveRecord::Base if defined? ::ActiveRecord - - METHOD_CLASS_MAP = Hash.new - - WHINERS.each do |klass| - methods = klass.public_instance_methods - public_instance_methods - class_name = klass.name - methods.each { |method| METHOD_CLASS_MAP[method.to_sym] = class_name } - end - - # Raises a RuntimeError when you attempt to call +id+ on +nil+. - def id - raise RuntimeError, "Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id", caller - end - - private - def method_missing(method, *args, &block) - raise_nil_warning_for METHOD_CLASS_MAP[method], method, caller - end - - # Raises a NoMethodError when you attempt to call a method on +nil+. - def raise_nil_warning_for(class_name = nil, selector = nil, with_caller = nil) - message = "You have a nil object when you didn't expect it!" - message << "\nYou might have expected an instance of #{class_name}." if class_name - message << "\nThe error occurred while evaluating nil.#{selector}" if selector - - raise NoMethodError, message, with_caller || caller - end -end - diff --git a/vendor/activesupport-2.2.2/lib/activesupport.rb b/vendor/activesupport-2.2.2/lib/activesupport.rb deleted file mode 100644 index 69f36f793..000000000 --- a/vendor/activesupport-2.2.2/lib/activesupport.rb +++ /dev/null @@ -1 +0,0 @@ -require 'active_support' diff --git a/vendor/basecamp/lib/basecamp.rb b/vendor/basecamp/lib/basecamp.rb deleted file mode 100644 index 75e40f84b..000000000 --- a/vendor/basecamp/lib/basecamp.rb +++ /dev/null @@ -1,491 +0,0 @@ -# the following are all standard ruby libraries -require 'net/https' -require 'yaml' -require 'date' -require 'time' - -begin - require 'xmlsimple' -rescue LoadError - begin - require 'rubygems' - gem 'xml-simple' - rescue LoadError - abort <<-ERROR -The 'xml-simple' library could not be loaded. If you have RubyGems installed -you can install xml-simple by doing "gem install xml-simple". -ERROR - end -end - -# An interface to the Basecamp web-services API. Usage is straightforward: -# -# session = Basecamp.new('your.basecamp.com', 'username', 'password') -# puts "projects: #{session.projects.length}" -class Basecamp - - # A wrapper to encapsulate the data returned by Basecamp, for easier access. - class Record #:nodoc: - attr_reader :type - - def initialize(type, hash) - @type = type - @hash = hash - end - - def [](name) - name = dashify(name) - case @hash[name] - when Hash then - @hash[name] = (@hash[name].keys.length == 1 && Array === @hash[name].values.first) ? - @hash[name].values.first.map { |v| Record.new(@hash[name].keys.first, v) } : - Record.new(name, @hash[name]) - else @hash[name] - end - end - - def id - @hash["id"] - end - - def attributes - @hash.keys - end - - def respond_to?(sym) - super || @hash.has_key?(dashify(sym)) - end - - def method_missing(sym, *args) - if args.empty? && !block_given? && respond_to?(sym) - self[sym] - else - super - end - end - - def to_s - "\#" - end - - def inspect - to_s - end - - private - - def dashify(name) - name.to_s.tr("_", "-") - end - end - - # A wrapper to represent a file that should be uploaded. This is used so that - # the form/multi-part encoder knows when to encode a field as a file, versus - # when to encode it as a simple field. - class FileUpload - attr_reader :filename, :content - - def initialize(filename, content) - @filename = filename - @content = content - end - end - - attr_accessor :use_xml - - # Connects - def initialize(url, user_name, password, use_ssl = false) - @use_xml = false - @user_name, @password = user_name, password - connect!(url, use_ssl) - end - - # Return the list of all accessible projects. - def projects - records "project", "/project/list" - end - - # Returns the list of message categories for the given project - def message_categories(project_id) - records "post-category", "/projects/#{project_id}/post_categories" - end - - # Returns the list of file categories for the given project - def file_categories(project_id) - records "attachment-category", "/projects/#{project_id}/attachment_categories" - end - - # Return information for the company with the given id - def company(id) - record "/contacts/company/#{id}" - end - - # Return an array of the people in the given company. If the project-id is - # given, only people who have access to the given project will be returned. - def people(company_id, project_id=nil) - url = project_id ? "/projects/#{project_id}" : "" - url << "/contacts/people/#{company_id}" - records "person", url - end - - # Return information about the person with the given id - def person(id) - record "/contacts/person/#{id}" - end - - # Return information about the message(s) with the given id(s). The API - # limits you to requesting 25 messages at a time, so if you need to get more - # than that, you'll need to do it in multiple requests. - def message(*ids) - result = records("post", "/msg/get/#{ids.join(",")}") - result.length == 1 ? result.first : result - end - - # Returns a summary of all messages in the given project (and category, if - # specified). The summary is simply the title and category of the message, - # as well as the number of attachments (if any). - def message_list(project_id, category_id=nil) - url = "/projects/#{project_id}/msg" - url << "/cat/#{category_id}" if category_id - url << "/archive" - - records "post", url - end - - # Create a new message in the given project. The +message+ parameter should - # be a hash. The +email_to+ parameter must be an array of person-id's that - # should be notified of the post. - # - # If you want to add attachments to the message, the +attachments+ parameter - # should be an array of hashes, where each has has a :name key (optional), - # and a :file key (required). The :file key must refer to a Basecamp::FileUpload - # instance. - # - # msg = session.post_message(158141, - # { :title => "Requirements", - # :body => "Here are the requirements documents you asked for.", - # :category_id => 2301121 }, - # [john.id, martha.id], - # [ { :name => "Primary Requirements", - # :file => Basecamp::FileUpload.new('primary.doc", File.read('primary.doc')) }, - # { :file => Basecamp::FileUpload.new('other.doc', File.read('other.doc')) } ]) - def post_message(project_id, message, notify=[], attachments=[]) - prepare_attachments(attachments) - record "/projects/#{project_id}/msg/create", - :post => message, - :notify => notify, - :attachments => attachments - end - - # Edit the message with the given id. The +message+ parameter should - # be a hash. The +email_to+ parameter must be an array of person-id's that - # should be notified of the post. - # - # The +attachments+ parameter, if used, should be the same as described for - # #post_message. - def update_message(id, message, notify=[], attachments=[]) - prepare_attachments(attachments) - record "/msg/update/#{id}", - :post => message, - :notify => notify, - :attachments => attachments - end - - # Deletes the message with the given id, and returns it. - def delete_message(id) - record "/msg/delete/#{id}" - end - - # Return a list of the comments for the specified message. - def comments(post_id) - records "comment", "/msg/comments/#{post_id}" - end - - # Retrieve a specific comment - def comment(id) - record "/msg/comment/#{id}" - end - - # Add a new comment to a message. +comment+ must be a hash describing the - # comment. You can add attachments to the comment, too, by giving them in - # an array. See the #post_message method for a description of how to do that. - def create_comment(post_id, comment, attachments=[]) - prepare_attachments(attachments) - record "/msg/create_comment", :comment => comment.merge(:post_id => post_id), - :attachments => attachments - end - - # Update the given comment. Attachments follow the same format as #post_message. - def update_comment(id, comment, attachments=[]) - prepare_attachments(attachments) - record "/msg/update_comment", :comment_id => id, - :comment => comment, :attachments => attachments - end - - # Deletes (and returns) the given comment. - def delete_comment(id) - record "/msg/delete_comment/#{id}" - end - - # ========================================================================= - # TODO LISTS AND ITEMS - # ========================================================================= - - # Marks the given item completed. - def complete_item(id) - record "/todos/complete_item/#{id}" - end - - # Marks the given item uncompleted. - def uncomplete_item(id) - record "/todos/uncomplete_item/#{id}" - end - - # Creates a new to-do item. - def create_item(list_id, content, responsible_party=nil, notify=true) - record "/todos/create_item/#{list_id}", - :content => content, :responsible_party => responsible_party, - :notify => notify - end - - # Creates a new list using the given hash of list metadata. - def create_list(project_id, list) - record "/projects/#{project_id}/todos/create_list", list - end - - # Deletes the given item from it's parent list. - def delete_item(id) - record "/todos/delete_item/#{id}" - end - - # Deletes the given list and all of its items. - def delete_list(id) - record "/todos/delete_list/#{id}" - end - - # Retrieves the specified list, and all of its items. - def get_list(id) - record "/todos/list/#{id}" - end - - # Return all lists for a project. If complete is true, only completed lists - # are returned. If complete is false, only uncompleted lists are returned. - def lists(project_id, complete=nil) - records "todo-list", "/projects/#{project_id}/todos/lists", :complete => complete - end - - # Repositions an item to be at the given position in its list - def move_item(id, to) - record "/todos/move_item/#{id}", :to => to - end - - # Repositions a list to be at the given position in its project - def move_list(id, to) - record "/todos/move_list/#{id}", :to => to - end - - # Updates the given item - def update_item(id, content, responsible_party=nil, notify=true) - record "/todos/update_item/#{id}", - :item => { :content => content }, :responsible_party => responsible_party, - :notify => notify - end - - # Updates the given list's metadata - def update_list(id, list) - record "/todos/update_list/#{id}", :list => list - end - - # ========================================================================= - # MILESTONES - # ========================================================================= - - # Complete the milestone with the given id - def complete_milestone(id) - record "/milestones/complete/#{id}" - end - - # Create a new milestone for the given project. +data+ must be hash of the - # values to set, including +title+, +deadline+, +responsible_party+, and - # +notify+. - def create_milestone(project_id, data) - create_milestones(project_id, [data]).first - end - - # As #create_milestone, but can create multiple milestones in a single - # request. The +milestones+ parameter must be an array of milestone values as - # descrbed in #create_milestone. - def create_milestones(project_id, milestones) - records "milestone", "/projects/#{project_id}/milestones/create", :milestone => milestones - end - - # Destroys the milestone with the given id. - def delete_milestone(id) - record "/milestones/delete/#{id}" - end - - # Returns a list of all milestones for the given project, optionally filtered - # by whether they are completed, late, or upcoming. - def milestones(project_id, find="all") - records "milestone", "/projects/#{project_id}/milestones/list", :find => find - end - - # Uncomplete the milestone with the given id - def uncomplete_milestone(id) - record "/milestones/uncomplete/#{id}" - end - - # Updates an existing milestone. - def update_milestone(id, data, move=false, move_off_weekends=false) - record "/milestones/update/#{id}", :milestone => data, - :move_upcoming_milestones => move, - :move_upcoming_milestones_off_weekends => move_off_weekends - end - - # Make a raw web-service request to Basecamp. This will return a Hash of - # Arrays of the response, and may seem a little odd to the uninitiated. - def request(path, parameters = {}, second_try = false) - response = post(path, convert_body(parameters), "Content-Type" => content_type) - - if response.code.to_i / 100 == 2 - result = XmlSimple.xml_in(response.body, 'keeproot' => true, - 'contentkey' => '__content__', 'forcecontent' => true) - typecast_value(result) - elsif response.code == "302" && !second_try - connect!(@url, !@use_ssl) - request(path, parameters, true) - else - raise "#{response.message} (#{response.code})" - end - end - - # A convenience method for wrapping the result of a query in a Record - # object. This assumes that the result is a singleton, not a collection. - def record(path, parameters={}) - result = request(path, parameters) - (result && !result.empty?) ? Record.new(result.keys.first, result.values.first) : nil - end - - # A convenience method for wrapping the result of a query in Record - # objects. This assumes that the result is a collection--any singleton - # result will be wrapped in an array. - def records(node, path, parameters={}) - result = request(path, parameters).values.first or return [] - result = result[node] or return [] - result = [result] unless Array === result - result.map { |row| Record.new(node, row) } - end - - private - - def connect!(url, use_ssl) - url = url.sub(/https?:\/\//, '').chomp('/') - @use_ssl = use_ssl - @url = url - @connection = Net::HTTP.new(url, use_ssl ? 443 : 80) - @connection.use_ssl = @use_ssl - @connection.verify_mode = OpenSSL::SSL::VERIFY_NONE if @use_ssl - end - - def convert_body(body) - body = use_xml ? body.to_xml : body.to_yaml - end - - def content_type - use_xml ? "application/xml" : "application/x-yaml" - end - - def post(path, body, header={}) - request = Net::HTTP::Post.new(path, header.merge('Accept' => 'application/xml')) - request.basic_auth(@user_name, @password) - @connection.request(request, body) - end - - def store_file(contents) - response = post("/upload", contents, 'Content-Type' => 'application/octet-stream', - 'Accept' => 'application/xml') - - if response.code == "200" - result = XmlSimple.xml_in(response.body, 'keeproot' => true, 'forcearray' => false) - return result["upload"]["id"] - else - raise "Could not store file: #{response.message} (#{response.code})" - end - end - - def typecast_value(value) - case value - when Hash - if value.has_key?("__content__") - content = translate_entities(value["__content__"]).strip - case value["type"] - when "integer" then content.to_i - when "boolean" then content == "true" - when "datetime" then Time.parse(content) - when "date" then Date.parse(content) - else content - end - # a special case to work-around a bug in XmlSimple. When you have an empty - # tag that has an attribute, XmlSimple will not add the __content__ key - # to the returned hash. Thus, we check for the presense of the 'type' - # attribute to look for empty, typed tags, and simply return nil for - # their value. - elsif value.keys == %w(type) - nil - elsif value["nil"] == "true" - nil - # another special case, introduced by the latest rails, where an array - # type now exists. This is parsed by XmlSimple as a two-key hash, where - # one key is 'type' and the other is the actual array value. - elsif value.keys.length == 2 && value["type"] == "array" - value.delete("type") - typecast_value(value) - else - value.empty? ? nil : value.inject({}) do |h,(k,v)| - h[k] = typecast_value(v) - h - end - end - when Array - value.map! { |i| typecast_value(i) } - case value.length - when 0 then nil - when 1 then value.first - else value - end - else - raise "can't typecast #{value.inspect}" - end - end - - def translate_entities(value) - value.gsub(/</, "<"). - gsub(/>/, ">"). - gsub(/"/, '"'). - gsub(/'/, "'"). - gsub(/&/, "&") - end - - def prepare_attachments(list) - (list || []).each do |data| - upload = data[:file] - id = store_file(upload.content) - data[:file] = { :file => id, - :content_type => "application/octet-stream", - :original_filename => upload.filename } - end - end -end - -# A minor hack to let Xml-Simple serialize symbolic keys in hashes -class Symbol - def [](*args) - to_s[*args] - end -end - -class Hash - def to_xml - XmlSimple.xml_out({:request => self}, 'keeproot' => true, 'noattr' => true) - end -end diff --git a/vendor/cache/activemodel-4.2.10.gem b/vendor/cache/activemodel-4.2.10.gem new file mode 100644 index 000000000..4c3ba99f5 Binary files /dev/null and b/vendor/cache/activemodel-4.2.10.gem differ diff --git a/vendor/cache/activeresource-4.0.0.gem b/vendor/cache/activeresource-4.0.0.gem new file mode 100644 index 000000000..cae16efd6 Binary files /dev/null and b/vendor/cache/activeresource-4.0.0.gem differ diff --git a/vendor/cache/activesupport-4.2.10.gem b/vendor/cache/activesupport-4.2.10.gem new file mode 100644 index 000000000..addf8b408 Binary files /dev/null and b/vendor/cache/activesupport-4.2.10.gem differ diff --git a/vendor/cache/addressable-2.5.2.gem b/vendor/cache/addressable-2.5.2.gem new file mode 100644 index 000000000..3e53ea0e4 Binary files /dev/null and b/vendor/cache/addressable-2.5.2.gem differ diff --git a/vendor/cache/aws-sdk-1.67.0.gem b/vendor/cache/aws-sdk-1.67.0.gem new file mode 100644 index 000000000..9302695e6 Binary files /dev/null and b/vendor/cache/aws-sdk-1.67.0.gem differ diff --git a/vendor/cache/aws-sdk-core-2.0.48.gem b/vendor/cache/aws-sdk-core-2.0.48.gem new file mode 100644 index 000000000..41bc6e4a1 Binary files /dev/null and b/vendor/cache/aws-sdk-core-2.0.48.gem differ diff --git a/vendor/cache/aws-sdk-v1-1.67.0.gem b/vendor/cache/aws-sdk-v1-1.67.0.gem new file mode 100644 index 000000000..21548704c Binary files /dev/null and b/vendor/cache/aws-sdk-v1-1.67.0.gem differ diff --git a/vendor/cache/builder-3.2.3.gem b/vendor/cache/builder-3.2.3.gem new file mode 100644 index 000000000..3500c8043 Binary files /dev/null and b/vendor/cache/builder-3.2.3.gem differ diff --git a/vendor/cache/concurrent-ruby-1.0.5.gem b/vendor/cache/concurrent-ruby-1.0.5.gem new file mode 100644 index 000000000..4119d3aaf Binary files /dev/null and b/vendor/cache/concurrent-ruby-1.0.5.gem differ diff --git a/vendor/cache/domain_name-0.5.20170404.gem b/vendor/cache/domain_name-0.5.20170404.gem new file mode 100644 index 000000000..e7235dd10 Binary files /dev/null and b/vendor/cache/domain_name-0.5.20170404.gem differ diff --git a/vendor/cache/eventmachine-1.2.5.gem b/vendor/cache/eventmachine-1.2.5.gem new file mode 100644 index 000000000..26c18a8e0 Binary files /dev/null and b/vendor/cache/eventmachine-1.2.5.gem differ diff --git a/vendor/cache/faraday-0.9.0.gem b/vendor/cache/faraday-0.9.0.gem new file mode 100644 index 000000000..0b00e52ff Binary files /dev/null and b/vendor/cache/faraday-0.9.0.gem differ diff --git a/vendor/cache/faraday_middleware-0.12.2.gem b/vendor/cache/faraday_middleware-0.12.2.gem new file mode 100644 index 000000000..24c9f2567 Binary files /dev/null and b/vendor/cache/faraday_middleware-0.12.2.gem differ diff --git a/vendor/cache/hashie-2.1.2.gem b/vendor/cache/hashie-2.1.2.gem new file mode 100644 index 000000000..39f47dcbd Binary files /dev/null and b/vendor/cache/hashie-2.1.2.gem differ diff --git a/vendor/cache/http-cookie-1.0.3.gem b/vendor/cache/http-cookie-1.0.3.gem new file mode 100644 index 000000000..f02ecaf77 Binary files /dev/null and b/vendor/cache/http-cookie-1.0.3.gem differ diff --git a/vendor/cache/http_parser.rb-0.5.3.gem b/vendor/cache/http_parser.rb-0.5.3.gem new file mode 100644 index 000000000..ec812a489 Binary files /dev/null and b/vendor/cache/http_parser.rb-0.5.3.gem differ diff --git a/vendor/cache/i18n-0.9.1.gem b/vendor/cache/i18n-0.9.1.gem new file mode 100644 index 000000000..c8cb0dc54 Binary files /dev/null and b/vendor/cache/i18n-0.9.1.gem differ diff --git a/vendor/cache/jmespath-1.3.1.gem b/vendor/cache/jmespath-1.3.1.gem new file mode 100644 index 000000000..deba3208e Binary files /dev/null and b/vendor/cache/jmespath-1.3.1.gem differ diff --git a/vendor/cache/json-1.8.6.gem b/vendor/cache/json-1.8.6.gem new file mode 100644 index 000000000..2a7d6648e Binary files /dev/null and b/vendor/cache/json-1.8.6.gem differ diff --git a/vendor/cache/jwt-2.1.0.gem b/vendor/cache/jwt-2.1.0.gem new file mode 100644 index 000000000..ebfe13720 Binary files /dev/null and b/vendor/cache/jwt-2.1.0.gem differ diff --git a/vendor/cache/mail-2.7.0.gem b/vendor/cache/mail-2.7.0.gem new file mode 100644 index 000000000..8db385adf Binary files /dev/null and b/vendor/cache/mail-2.7.0.gem differ diff --git a/vendor/cache/mash-0.1.1.gem b/vendor/cache/mash-0.1.1.gem new file mode 100644 index 000000000..9bb1f0e2f Binary files /dev/null and b/vendor/cache/mash-0.1.1.gem differ diff --git a/vendor/cache/maxcdn-0.3.2.gem b/vendor/cache/maxcdn-0.3.2.gem new file mode 100644 index 000000000..30a3696ca Binary files /dev/null and b/vendor/cache/maxcdn-0.3.2.gem differ diff --git a/vendor/cache/mime-types-1.25.1.gem b/vendor/cache/mime-types-1.25.1.gem new file mode 100644 index 000000000..877d8a97f Binary files /dev/null and b/vendor/cache/mime-types-1.25.1.gem differ diff --git a/vendor/cache/mini_mime-1.0.0.gem b/vendor/cache/mini_mime-1.0.0.gem new file mode 100644 index 000000000..cd814c59c Binary files /dev/null and b/vendor/cache/mini_mime-1.0.0.gem differ diff --git a/vendor/cache/mini_portile2-2.3.0.gem b/vendor/cache/mini_portile2-2.3.0.gem new file mode 100644 index 000000000..341a956b2 Binary files /dev/null and b/vendor/cache/mini_portile2-2.3.0.gem differ diff --git a/vendor/cache/minitest-5.10.3.gem b/vendor/cache/minitest-5.10.3.gem new file mode 100644 index 000000000..082361c26 Binary files /dev/null and b/vendor/cache/minitest-5.10.3.gem differ diff --git a/vendor/cache/mqtt-0.0.8.gem b/vendor/cache/mqtt-0.0.8.gem new file mode 100644 index 000000000..3297c913f Binary files /dev/null and b/vendor/cache/mqtt-0.0.8.gem differ diff --git a/vendor/cache/multi_json-1.12.2.gem b/vendor/cache/multi_json-1.12.2.gem new file mode 100644 index 000000000..af3c0b462 Binary files /dev/null and b/vendor/cache/multi_json-1.12.2.gem differ diff --git a/vendor/cache/multipart-post-2.0.0.gem b/vendor/cache/multipart-post-2.0.0.gem new file mode 100644 index 000000000..abfff3d20 Binary files /dev/null and b/vendor/cache/multipart-post-2.0.0.gem differ diff --git a/vendor/cache/net-http-persistent-2.9.4.gem b/vendor/cache/net-http-persistent-2.9.4.gem new file mode 100644 index 000000000..73f16a79f Binary files /dev/null and b/vendor/cache/net-http-persistent-2.9.4.gem differ diff --git a/vendor/cache/netrc-0.11.0.gem b/vendor/cache/netrc-0.11.0.gem new file mode 100644 index 000000000..78226f365 Binary files /dev/null and b/vendor/cache/netrc-0.11.0.gem differ diff --git a/vendor/cache/nokogiri-1.8.1.gem b/vendor/cache/nokogiri-1.8.1.gem new file mode 100644 index 000000000..970507ca4 Binary files /dev/null and b/vendor/cache/nokogiri-1.8.1.gem differ diff --git a/vendor/cache/oauth-0.4.4.gem b/vendor/cache/oauth-0.4.4.gem new file mode 100644 index 000000000..d821bb7f2 Binary files /dev/null and b/vendor/cache/oauth-0.4.4.gem differ diff --git a/vendor/cache/public_suffix-3.0.1.gem b/vendor/cache/public_suffix-3.0.1.gem new file mode 100644 index 000000000..e8fc0478e Binary files /dev/null and b/vendor/cache/public_suffix-3.0.1.gem differ diff --git a/vendor/cache/rails-observers-0.1.5.gem b/vendor/cache/rails-observers-0.1.5.gem new file mode 100644 index 000000000..c673b989a Binary files /dev/null and b/vendor/cache/rails-observers-0.1.5.gem differ diff --git a/vendor/cache/rake-10.0.3.gem b/vendor/cache/rake-10.0.3.gem new file mode 100644 index 000000000..f645fa9ff Binary files /dev/null and b/vendor/cache/rake-10.0.3.gem differ diff --git a/vendor/cache/rest-client-2.0.2.gem b/vendor/cache/rest-client-2.0.2.gem new file mode 100644 index 000000000..3369c0a08 Binary files /dev/null and b/vendor/cache/rest-client-2.0.2.gem differ diff --git a/vendor/cache/ruby-hmac-0.4.0.gem b/vendor/cache/ruby-hmac-0.4.0.gem new file mode 100644 index 000000000..5d0701972 Binary files /dev/null and b/vendor/cache/ruby-hmac-0.4.0.gem differ diff --git a/vendor/cache/signet-0.8.1.gem b/vendor/cache/signet-0.8.1.gem new file mode 100644 index 000000000..b2b22f3c4 Binary files /dev/null and b/vendor/cache/signet-0.8.1.gem differ diff --git a/vendor/cache/simple_oauth-0.1.9.gem b/vendor/cache/simple_oauth-0.1.9.gem new file mode 100644 index 000000000..350d10055 Binary files /dev/null and b/vendor/cache/simple_oauth-0.1.9.gem differ diff --git a/vendor/cache/softlayer_messaging-1.0.2.gem b/vendor/cache/softlayer_messaging-1.0.2.gem new file mode 100644 index 000000000..9591d2e84 Binary files /dev/null and b/vendor/cache/softlayer_messaging-1.0.2.gem differ diff --git a/vendor/cache/thread_safe-0.3.6.gem b/vendor/cache/thread_safe-0.3.6.gem new file mode 100644 index 000000000..7ee950f8b Binary files /dev/null and b/vendor/cache/thread_safe-0.3.6.gem differ diff --git a/vendor/cache/tinder-1.10.0.gem b/vendor/cache/tinder-1.10.0.gem new file mode 100644 index 000000000..97415f5c9 Binary files /dev/null and b/vendor/cache/tinder-1.10.0.gem differ diff --git a/vendor/cache/twilio-ruby-3.9.0.gem b/vendor/cache/twilio-ruby-3.9.0.gem new file mode 100644 index 000000000..509d753c8 Binary files /dev/null and b/vendor/cache/twilio-ruby-3.9.0.gem differ diff --git a/vendor/cache/twitter-stream-0.1.16.gem b/vendor/cache/twitter-stream-0.1.16.gem new file mode 100644 index 000000000..aa7e340ee Binary files /dev/null and b/vendor/cache/twitter-stream-0.1.16.gem differ diff --git a/vendor/cache/tzinfo-1.2.4.gem b/vendor/cache/tzinfo-1.2.4.gem new file mode 100644 index 000000000..40fc7d747 Binary files /dev/null and b/vendor/cache/tzinfo-1.2.4.gem differ diff --git a/vendor/cache/unf-0.1.4.gem b/vendor/cache/unf-0.1.4.gem new file mode 100644 index 000000000..01f1852db Binary files /dev/null and b/vendor/cache/unf-0.1.4.gem differ diff --git a/vendor/cache/unf_ext-0.0.7.4.gem b/vendor/cache/unf_ext-0.0.7.4.gem new file mode 100644 index 000000000..444be9f6a Binary files /dev/null and b/vendor/cache/unf_ext-0.0.7.4.gem differ diff --git a/vendor/cache/xml-simple-1.0.11.gem b/vendor/cache/xml-simple-1.0.11.gem new file mode 100644 index 000000000..b13501f28 Binary files /dev/null and b/vendor/cache/xml-simple-1.0.11.gem differ diff --git a/vendor/cache/xmlrpc-0.2.1.gem b/vendor/cache/xmlrpc-0.2.1.gem new file mode 100644 index 000000000..fd2d27f47 Binary files /dev/null and b/vendor/cache/xmlrpc-0.2.1.gem differ diff --git a/vendor/cache/xmpp4r-0.5.6.gem b/vendor/cache/xmpp4r-0.5.6.gem new file mode 100644 index 000000000..2226bc9c6 Binary files /dev/null and b/vendor/cache/xmpp4r-0.5.6.gem differ diff --git a/vendor/cache/yajl-ruby-1.3.1.gem b/vendor/cache/yajl-ruby-1.3.1.gem new file mode 100644 index 000000000..8ac269cc0 Binary files /dev/null and b/vendor/cache/yajl-ruby-1.3.1.gem differ diff --git a/vendor/crack-0.1.4/.gitignore b/vendor/crack-0.1.4/.gitignore deleted file mode 100644 index 0b15e4121..000000000 --- a/vendor/crack-0.1.4/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.sw? -.DS_Store -coverage -rdoc -pkg -*.gem \ No newline at end of file diff --git a/vendor/crack-0.1.4/History b/vendor/crack-0.1.4/History deleted file mode 100644 index 55d39d20a..000000000 --- a/vendor/crack-0.1.4/History +++ /dev/null @@ -1,15 +0,0 @@ -== 0.1.3 2009-06-22 -* 1 minor patch - * Parsing a text node with attributes stores them in the attributes method (tamalw) - -== 0.1.2 2009-04-21 -* 2 minor patches - * Correct unnormalization of attribute values (der-flo) - * Fix error in parsing YAML in the case where a hash value ends with backslashes, and there are subsequent values in the hash (deadprogrammer) - -== 0.1.1 2009-03-31 -* 1 minor patch - * Parsing empty or blank xml now returns empty hash instead of raising error. - -== 0.1.0 2009-03-28 -* Initial release. \ No newline at end of file diff --git a/vendor/crack-0.1.4/LICENSE b/vendor/crack-0.1.4/LICENSE deleted file mode 100644 index fbbebe148..000000000 --- a/vendor/crack-0.1.4/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2009 John Nunemaker - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/crack-0.1.4/README.rdoc b/vendor/crack-0.1.4/README.rdoc deleted file mode 100644 index 3be68ae67..000000000 --- a/vendor/crack-0.1.4/README.rdoc +++ /dev/null @@ -1,42 +0,0 @@ -= crack - -Really simple JSON and XML parsing, ripped from Merb and Rails. The XML parser is ripped from Merb and the JSON parser is ripped from Rails. I take no credit, just packaged them for all to enjoy and easily use. - -== note on releases - -Releases are tagged on github and also released as gems on github and rubyforge. Master is pushed to whenever I add a patch or a new feature. To build from master, you can clone the code, generate the updated gemspec, build the gem and install. - -* rake gemspec -* gem build httparty.gemspec -* gem install the gem that was built - -== note on patches/pull requests - -* Fork the project. -* Make your feature addition or bug fix. -* Add tests for it. This is important so I don't break it in a future version unintentionally. -* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull) -* Send me a pull request. Bonus points for topic branches. - -== usage - - gem 'crack' - require 'crack' # for xml and json - require 'crack/json' # for just json - require 'crack/xml' # for just xml - -== examples - - Crack::XML.parse("This is the contents") - # => {'tag' => 'This is the contents'} - - Crack::JSON.parse('{"tag":"This is the contents"}') - # => {'tag' => 'This is the contents'} - -== Copyright - -Copyright (c) 2009 John Nunemaker. See LICENSE for details. - -== Docs - -http://rdoc.info/projects/jnunemaker/crack diff --git a/vendor/crack-0.1.4/Rakefile b/vendor/crack-0.1.4/Rakefile deleted file mode 100644 index 73c3d6f04..000000000 --- a/vendor/crack-0.1.4/Rakefile +++ /dev/null @@ -1,49 +0,0 @@ -require 'rubygems' -require 'rake' - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "crack" - gem.summary = %Q{Really simple JSON and XML parsing, ripped from Merb and Rails.} - gem.email = "nunemaker@gmail.com" - gem.homepage = "http://github.com/jnunemaker/crack" - gem.authors = ["John Nunemaker"] - gem.rubyforge_project = 'crack' - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings - end -rescue LoadError - puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com" -end - -require 'rake/rdoctask' -Rake::RDocTask.new do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = 'crack' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -require 'rake/testtask' -Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/*_test.rb' - test.verbose = false -end - -begin - require 'rcov/rcovtask' - Rcov::RcovTask.new do |test| - test.libs << 'test' - test.pattern = 'test/**/*_test.rb' - test.verbose = true - end -rescue LoadError - task :rcov do - abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" - end -end - - -task :default => :test \ No newline at end of file diff --git a/vendor/crack-0.1.4/VERSION.yml b/vendor/crack-0.1.4/VERSION.yml deleted file mode 100644 index c2d562b75..000000000 --- a/vendor/crack-0.1.4/VERSION.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -:major: 0 -:minor: 1 -:patch: 4 diff --git a/vendor/crack-0.1.4/crack.gemspec b/vendor/crack-0.1.4/crack.gemspec deleted file mode 100644 index 86e09065c..000000000 --- a/vendor/crack-0.1.4/crack.gemspec +++ /dev/null @@ -1,61 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = %q{crack} - s.version = "0.1.4" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["John Nunemaker"] - s.date = %q{2009-07-19} - s.email = %q{nunemaker@gmail.com} - s.extra_rdoc_files = [ - "LICENSE", - "README.rdoc" - ] - s.files = [ - ".gitignore", - "History", - "LICENSE", - "README.rdoc", - "Rakefile", - "VERSION.yml", - "crack.gemspec", - "lib/crack.rb", - "lib/crack/core_extensions.rb", - "lib/crack/json.rb", - "lib/crack/xml.rb", - "test/crack_test.rb", - "test/data/twittersearch-firefox.json", - "test/data/twittersearch-ie.json", - "test/hash_test.rb", - "test/json_test.rb", - "test/string_test.rb", - "test/test_helper.rb", - "test/xml_test.rb" - ] - s.has_rdoc = true - s.homepage = %q{http://github.com/jnunemaker/crack} - s.rdoc_options = ["--charset=UTF-8"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{crack} - s.rubygems_version = %q{1.3.1} - s.summary = %q{Really simple JSON and XML parsing, ripped from Merb and Rails.} - s.test_files = [ - "test/crack_test.rb", - "test/hash_test.rb", - "test/json_test.rb", - "test/string_test.rb", - "test/test_helper.rb", - "test/xml_test.rb" - ] - - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 2 - - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then - else - end - else - end -end diff --git a/vendor/crack-0.1.4/lib/crack.rb b/vendor/crack-0.1.4/lib/crack.rb deleted file mode 100644 index 9aa66258d..000000000 --- a/vendor/crack-0.1.4/lib/crack.rb +++ /dev/null @@ -1,7 +0,0 @@ -module Crack - class ParseError < StandardError; end -end - -require 'crack/core_extensions' -require 'crack/json' -require 'crack/xml' \ No newline at end of file diff --git a/vendor/crack-0.1.4/lib/crack/core_extensions.rb b/vendor/crack-0.1.4/lib/crack/core_extensions.rb deleted file mode 100644 index 077e3b72d..000000000 --- a/vendor/crack-0.1.4/lib/crack/core_extensions.rb +++ /dev/null @@ -1,128 +0,0 @@ -require 'uri' - -class Object #:nodoc: - # @return - # - # @example [].blank? #=> true - # @example [1].blank? #=> false - # @example [nil].blank? #=> false - # - # Returns true if the object is nil or empty (if applicable) - def blank? - nil? || (respond_to?(:empty?) && empty?) - end unless method_defined?(:blank?) -end # class Object - -class Numeric #:nodoc: - # @return - # - # Numerics can't be blank - def blank? - false - end unless method_defined?(:blank?) -end # class Numeric - -class NilClass #:nodoc: - # @return - # - # Nils are always blank - def blank? - true - end unless method_defined?(:blank?) -end # class NilClass - -class TrueClass #:nodoc: - # @return - # - # True is not blank. - def blank? - false - end unless method_defined?(:blank?) -end # class TrueClass - -class FalseClass #:nodoc: - # False is always blank. - def blank? - true - end unless method_defined?(:blank?) -end # class FalseClass - -class String #:nodoc: - # @example "".blank? #=> true - # @example " ".blank? #=> true - # @example " hey ho ".blank? #=> false - # - # @return - # - # Strips out whitespace then tests if the string is empty. - def blank? - strip.empty? - end unless method_defined?(:blank?) - - def snake_case - return self.downcase if self =~ /^[A-Z]+$/ - self.gsub(/([A-Z]+)(?=[A-Z][a-z]?)|\B[A-Z]/, '_\&') =~ /_*(.*)/ - return $+.downcase - end unless method_defined?(:snake_case) -end # class String - -class Hash #:nodoc: - # @return This hash as a query string - # - # @example - # { :name => "Bob", - # :address => { - # :street => '111 Ruby Ave.', - # :city => 'Ruby Central', - # :phones => ['111-111-1111', '222-222-2222'] - # } - # }.to_params - # #=> "name=Bob&address[city]=Ruby Central&address[phones][]=111-111-1111&address[phones][]=222-222-2222&address[street]=111 Ruby Ave." - def to_params - params = self.map { |k,v| normalize_param(k,v) }.join - params.chop! # trailing & - params - end - - # @param key The key for the param. - # @param value The value for the param. - # - # @return This key value pair as a param - # - # @example normalize_param(:name, "Bob Jones") #=> "name=Bob%20Jones&" - def normalize_param(key, value) - param = '' - stack = [] - - if value.is_a?(Array) - param << value.map { |element| normalize_param("#{key}[]", element) }.join - elsif value.is_a?(Hash) - stack << [key,value] - else - param << "#{key}=#{URI.encode(value.to_s, Regexp.new("[^#{URI::PATTERN::UNRESERVED}]"))}&" - end - - stack.each do |parent, hash| - hash.each do |key, value| - if value.is_a?(Hash) - stack << ["#{parent}[#{key}]", value] - else - param << normalize_param("#{parent}[#{key}]", value) - end - end - end - - param - end - - # @return The hash as attributes for an XML tag. - # - # @example - # { :one => 1, "two"=>"TWO" }.to_xml_attributes - # #=> 'one="1" two="TWO"' - def to_xml_attributes - map do |k,v| - %{#{k.to_s.snake_case.sub(/^(.{1,1})/) { |m| m.downcase }}="#{v}"} - end.join(' ') - end -end \ No newline at end of file diff --git a/vendor/crack-0.1.4/lib/crack/json.rb b/vendor/crack-0.1.4/lib/crack/json.rb deleted file mode 100644 index a3a51eb5b..000000000 --- a/vendor/crack-0.1.4/lib/crack/json.rb +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (c) 2004-2008 David Heinemeier Hansson -# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -require 'yaml' -require 'strscan' - -module Crack - class JSON - def self.parse(json) - YAML.load(unescape(convert_json_to_yaml(json))) - rescue ArgumentError => e - raise ParseError, "Invalid JSON string" - end - - protected - def self.unescape(str) - str.gsub(/\\u([0-9a-f]{4})/) { [$1.hex].pack("U") } - end - - # matches YAML-formatted dates - DATE_REGEX = /^\d{4}-\d{2}-\d{2}|\d{4}-\d{1,2}-\d{1,2}[ \t]+\d{1,2}:\d{2}:\d{2}(\.[0-9]*)?(([ \t]*)Z|[-+]\d{2}?(:\d{2})?)?$/ - - # Ensure that ":" and "," are always followed by a space - def self.convert_json_to_yaml(json) #:nodoc: - scanner, quoting, marks, pos, times = StringScanner.new(json), false, [], nil, [] - while scanner.scan_until(/(\\['"]|['":,\\]|\\.)/) - case char = scanner[1] - when '"', "'" - if !quoting - quoting = char - pos = scanner.pos - elsif quoting == char - if json[pos..scanner.pos-2] =~ DATE_REGEX - # found a date, track the exact positions of the quotes so we can remove them later. - # oh, and increment them for each current mark, each one is an extra padded space that bumps - # the position in the final YAML output - total_marks = marks.size - times << pos+total_marks << scanner.pos+total_marks - end - quoting = false - end - when ":","," - marks << scanner.pos - 1 unless quoting - when "\\" - scanner.skip(/\\/) - end - end - - if marks.empty? - json.gsub(/\\\//, '/') - else - left_pos = [-1].push(*marks) - right_pos = marks << json.length - output = [] - left_pos.each_with_index do |left, i| - output << json[left.succ..right_pos[i]] - end - output = output * " " - - times.each { |i| output[i-1] = ' ' } - output.gsub!(/\\\//, '/') - output - end - end - end -end \ No newline at end of file diff --git a/vendor/crack-0.1.4/lib/crack/xml.rb b/vendor/crack-0.1.4/lib/crack/xml.rb deleted file mode 100644 index 48e0d31a1..000000000 --- a/vendor/crack-0.1.4/lib/crack/xml.rb +++ /dev/null @@ -1,214 +0,0 @@ -require 'rexml/parsers/streamparser' -require 'rexml/parsers/baseparser' -require 'rexml/light/node' -require 'rexml/text' -require 'date' -require 'time' -require 'yaml' -require 'bigdecimal' - -# This is a slighly modified version of the XMLUtilityNode from -# http://merb.devjavu.com/projects/merb/ticket/95 (has.sox@gmail.com) -# It's mainly just adding vowels, as I ht cd wth n vwls :) -# This represents the hard part of the work, all I did was change the -# underlying parser. -class REXMLUtilityNode #:nodoc: - attr_accessor :name, :attributes, :children, :type - - def self.typecasts - @@typecasts - end - - def self.typecasts=(obj) - @@typecasts = obj - end - - def self.available_typecasts - @@available_typecasts - end - - def self.available_typecasts=(obj) - @@available_typecasts = obj - end - - self.typecasts = {} - self.typecasts["integer"] = lambda{|v| v.nil? ? nil : v.to_i} - self.typecasts["boolean"] = lambda{|v| v.nil? ? nil : (v.strip != "false")} - self.typecasts["datetime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc} - self.typecasts["date"] = lambda{|v| v.nil? ? nil : Date.parse(v)} - self.typecasts["dateTime"] = lambda{|v| v.nil? ? nil : Time.parse(v).utc} - self.typecasts["decimal"] = lambda{|v| v.nil? ? nil : BigDecimal(v.to_s)} - self.typecasts["double"] = lambda{|v| v.nil? ? nil : v.to_f} - self.typecasts["float"] = lambda{|v| v.nil? ? nil : v.to_f} - self.typecasts["symbol"] = lambda{|v| v.nil? ? nil : v.to_sym} - self.typecasts["string"] = lambda{|v| v.to_s} - self.typecasts["yaml"] = lambda{|v| v.nil? ? nil : YAML.load(v)} - self.typecasts["base64Binary"] = lambda{|v| v.unpack('m').first } - - self.available_typecasts = self.typecasts.keys - - def initialize(name, normalized_attributes = {}) - - # unnormalize attribute values - attributes = Hash[* normalized_attributes.map { |key, value| - [ key, unnormalize_xml_entities(value) ] - }.flatten] - - @name = name.tr("-", "_") - # leave the type alone if we don't know what it is - @type = self.class.available_typecasts.include?(attributes["type"]) ? attributes.delete("type") : attributes["type"] - - @nil_element = attributes.delete("nil") == "true" - @attributes = undasherize_keys(attributes) - @children = [] - @text = false - end - - def add_node(node) - @text = true if node.is_a? String - @children << node - end - - def to_hash - if @type == "file" - f = StringIO.new((@children.first || '').unpack('m').first) - class << f - attr_accessor :original_filename, :content_type - end - f.original_filename = attributes['name'] || 'untitled' - f.content_type = attributes['content_type'] || 'application/octet-stream' - return {name => f} - end - - if @text - t = typecast_value( unnormalize_xml_entities( inner_html ) ) - t.class.send(:attr_accessor, :attributes) - t.attributes = attributes - return { name => t } - else - #change repeating groups into an array - groups = @children.inject({}) { |s,e| (s[e.name] ||= []) << e; s } - - out = nil - if @type == "array" - out = [] - groups.each do |k, v| - if v.size == 1 - out << v.first.to_hash.entries.first.last - else - out << v.map{|e| e.to_hash[k]} - end - end - out = out.flatten - - else # If Hash - out = {} - groups.each do |k,v| - if v.size == 1 - out.merge!(v.first) - else - out.merge!( k => v.map{|e| e.to_hash[k]}) - end - end - out.merge! attributes unless attributes.empty? - out = out.empty? ? nil : out - end - - if @type && out.nil? - { name => typecast_value(out) } - else - { name => out } - end - end - end - - # Typecasts a value based upon its type. For instance, if - # +node+ has #type == "integer", - # {{[node.typecast_value("12") #=> 12]}} - # - # @param value The value that is being typecast. - # - # @details [:type options] - # "integer":: - # converts +value+ to an integer with #to_i - # "boolean":: - # checks whether +value+, after removing spaces, is the literal - # "true" - # "datetime":: - # Parses +value+ using Time.parse, and returns a UTC Time - # "date":: - # Parses +value+ using Date.parse - # - # @return - # The result of typecasting +value+. - # - # @note - # If +self+ does not have a "type" key, or if it's not one of the - # options specified above, the raw +value+ will be returned. - def typecast_value(value) - return value unless @type - proc = self.class.typecasts[@type] - proc.nil? ? value : proc.call(value) - end - - # Take keys of the form foo-bar and convert them to foo_bar - def undasherize_keys(params) - params.keys.each do |key, value| - params[key.tr("-", "_")] = params.delete(key) - end - params - end - - # Get the inner_html of the REXML node. - def inner_html - @children.join - end - - # Converts the node into a readable HTML node. - # - # @return The HTML node in text form. - def to_html - attributes.merge!(:type => @type ) if @type - "<#{name}#{attributes.to_xml_attributes}>#{@nil_element ? '' : inner_html}" - end - - # @alias #to_html #to_s - def to_s - to_html - end - - private - - def unnormalize_xml_entities value - REXML::Text.unnormalize(value) - end -end - -module Crack - class XML - def self.parse(xml) - stack = [] - parser = REXML::Parsers::BaseParser.new(xml) - - while true - event = parser.pull - case event[0] - when :end_document - break - when :end_doctype, :start_doctype - # do nothing - when :start_element - stack.push REXMLUtilityNode.new(event[1], event[2]) - when :end_element - if stack.size > 1 - temp = stack.pop - stack.last.add_node(temp) - end - when :text, :cdata - stack.last.add_node(event[1]) unless event[1].strip.length == 0 || stack.empty? - end - end - stack.length > 0 ? stack.pop.to_hash : {} - end - end -end \ No newline at end of file diff --git a/vendor/crack-0.1.4/test/crack_test.rb b/vendor/crack-0.1.4/test/crack_test.rb deleted file mode 100644 index 2b9b65d7e..000000000 --- a/vendor/crack-0.1.4/test/crack_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -# class CrackTest < Test::Unit::TestCase -# end diff --git a/vendor/crack-0.1.4/test/data/twittersearch-firefox.json b/vendor/crack-0.1.4/test/data/twittersearch-firefox.json deleted file mode 100644 index 0ee9f03c0..000000000 --- a/vendor/crack-0.1.4/test/data/twittersearch-firefox.json +++ /dev/null @@ -1 +0,0 @@ -{"results":[{"text":"#let\u00f6lt\u00e9s - Mozilla SeaMonkey 1.1.16 magyar: B\u00f6ng\u00e9sz\u00f5 (Firefox), chat program (ChatZilla), weboldal.. http:\/\/tinyurl.com\/clvydf","to_user_id":null,"from_user":"mp33portal","id":1567167290,"from_user_id":7191223,"iso_language_code":"hu","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/96234069\/mp33teamlogo_normal.JPG","created_at":"Mon, 20 Apr 2009 17:25:16 +0000"},{"text":"#veille-sur-internet Speedtile 0.4, un nouveau plugin de bookmarks en visuel pour Firefox: \n.. http:\/\/twurl.nl\/43eq0o","to_user_id":null,"from_user":"rez0","id":1567164191,"from_user_id":87975,"iso_language_code":"fr","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71734441\/80x80-2_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:53 +0000"},{"text":"Firefox #fail 2 do dia...","to_user_id":null,"from_user":"lucascimino","id":1567163150,"from_user_id":561101,"iso_language_code":"pt","source":"<a href="http:\/\/www.nambu.com">Nambu<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/108061839\/macbookpro_7_normal.gif","created_at":"Mon, 20 Apr 2009 17:24:45 +0000"},{"text":"Download Squad: AVG offers standalone realtime web page scanning for Firefox and IE: Filed under:.. http:\/\/tinyurl.com\/c4v923","to_user_id":null,"from_user":"techwatch","id":1567162787,"from_user_id":907915,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/118338486\/FotoFlexer_Photo_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:42 +0000"},{"text":"oops.....thought I was typing in my address bar. Using my Sidekick as web for past 3 days...Need...Firefox...Back...In...Life...","to_user_id":null,"from_user":"MikeMorganJr","id":1567162698,"from_user_id":8472813,"iso_language_code":"en","source":"<a href="http:\/\/twitterhelp.blogspot.com\/2008\/05\/twitter-via-mobile-web-mtwittercom.html">mobile web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/101742681\/S4201261_normal.JPG","created_at":"Mon, 20 Apr 2009 17:24:42 +0000"},{"text":"Top 10 Firefox Add-ons for Linux Users http:\/\/www.linux-mag.com\/id\/7307 @LinuxMagazine","to_user_id":null,"from_user":"jtcatchenco","id":1567161761,"from_user_id":102514,"iso_language_code":"no","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/67647355\/jairo2_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:32 +0000"},{"text":"@mamamali Try "TwitterFox" for Firefox?","to_user_id":11418879,"to_user":"mamamali","from_user":"coldmilktea","id":1567160292,"from_user_id":366808,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/58805948\/n546821674_1689558_9769_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:24 +0000"},{"text":"@cbcurran i have and i like it, but i use firefox for dev. because of the dev tools available to users","to_user_id":4604162,"to_user":"cbcurran","from_user":"joshuamc","id":1567160224,"from_user_id":1038770,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57059100\/1a8f013_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:24 +0000"},{"text":"@salustio A vers\u00e3o portuguesa do Firefox inclui motor de pesquisa para o Dicion\u00e1rio Priberam que funciona correctamente!? N\u00e3o \u00e9 essa?","to_user_id":2011109,"to_user":"salustio","from_user":"priberam","id":1567158943,"from_user_id":12725990,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148282351\/logoquadrado_normal.jpg","created_at":"Mon, 20 Apr 2009 17:24:15 +0000"},{"text":"@enver555 hoy. En todos los ordenadores hay firefox y explorer, menos en el que me ha tocado hoy, que s\u00f3lo hay explorer.","to_user_id":1117,"to_user":"enver555","from_user":"Purnas","id":1567153499,"from_user_id":2869,"iso_language_code":"es","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/122746846\/ventanica_normal.jpg","created_at":"Mon, 20 Apr 2009 17:23:31 +0000"},{"text":"uffff por favor prueben la evolucion de las pesta\u00f1as en firefox... http:\/\/tinyurl.com\/3bhosa","to_user_id":null,"from_user":"rubbenslife","id":1567152871,"from_user_id":318865,"iso_language_code":"es","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/109636341\/gir-vector2_normal.png","created_at":"Mon, 20 Apr 2009 17:23:27 +0000"},{"text":"@Andrew_Taylor I used to use IE as an excuse to not get any work done--you know, when a web page looks great in Firefox but is crap in IE.","to_user_id":920152,"to_user":"Andrew_Taylor","from_user":"thepete","id":1567151382,"from_user_id":20159,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/bigbird\/">Bigbird<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/78425271\/ThePeteHead_normal.png","created_at":"Mon, 20 Apr 2009 17:23:16 +0000"},{"text":"15 cool tricks for firefox users http:\/\/twurl.nl\/ydpfj4 found via delicious network","to_user_id":null,"from_user":"mcfarljo","id":1567150610,"from_user_id":543823,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/67908105\/twitterprofile_normal.jpg","created_at":"Mon, 20 Apr 2009 17:23:10 +0000"},{"text":"Is there a good reason why it's taking so long for Firefox to load images since the last update?","to_user_id":null,"from_user":"KidKaz","id":1567150504,"from_user_id":2473590,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/78432331\/009_a_normal.png","created_at":"Mon, 20 Apr 2009 17:23:08 +0000"},{"text":"now its not working in Firefox on clients machine and they have exact same version as me (3.0.8) on a PC. Oh well....","to_user_id":null,"from_user":"andrewyee","id":1567150403,"from_user_id":1297173,"iso_language_code":"en","source":"<a href="http:\/\/destroytwitter.com\/">DestroyTwitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/107140778\/CIMG738a5_normal.jpg","created_at":"Mon, 20 Apr 2009 17:23:07 +0000"},{"text":"Voltei para o Firefox 3.0.8, o 3.1b3 est\u00e1 com alguns bugs que acabam com a produtividade...","to_user_id":null,"from_user":"yporti","id":1567148429,"from_user_id":1470378,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/126029039\/avatar2_normal.png","created_at":"Mon, 20 Apr 2009 17:22:51 +0000"},{"text":"recovered bookmarks with firefox's automatic recovery - nice feature when you need it.","to_user_id":null,"from_user":"coffeeshrk","id":1567147766,"from_user_id":2776616,"iso_language_code":"en","source":"<a href="http:\/\/www.twitterlight.com\/">Twitterlight<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/132290339\/cg_normal.jpg","created_at":"Mon, 20 Apr 2009 17:22:48 +0000"},{"text":"@ewillett I'm using Firefox Portable. It has Flash, but not the latest version. I just checked in IE 7, and the titles appear last, and slow","to_user_id":1112964,"to_user":"ewillett","from_user":"fallapart","id":1567143242,"from_user_id":570499,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/55279513\/marturia_normal.gif","created_at":"Mon, 20 Apr 2009 17:22:12 +0000"},{"text":"Is there any "Stop Susan Boyle News" button on Firefox or IE7?","to_user_id":null,"from_user":"MyCaricaturecom","id":1567141153,"from_user_id":8967683,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/103773093\/untitled_normal.jpg","created_at":"Mon, 20 Apr 2009 17:21:56 +0000"},{"text":"Firefox Question: why is firefox not working for me? http:\/\/twurl.nl\/7dvotq","to_user_id":null,"from_user":"Firefox_Queries","id":1567139413,"from_user_id":994884,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56842902\/fxq-a_normal.png","created_at":"Mon, 20 Apr 2009 17:21:42 +0000"},{"text":"Showing Joan the coolest add on for firefox = twitterfox","to_user_id":null,"from_user":"shannonels","id":1567130581,"from_user_id":8743358,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/112823048\/small_text1_17_normal.JPG","created_at":"Mon, 20 Apr 2009 17:20:34 +0000"},{"text":"Mientras espero la integraci\u00f3n en el Adium uso Twitbin en Firefox","to_user_id":null,"from_user":"elgaita","id":1567124994,"from_user_id":6025355,"iso_language_code":"es","source":"<a href="http:\/\/www.twitbin.com\/">TwitBin<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/86912947\/Ojo_normal.png","created_at":"Mon, 20 Apr 2009 17:19:53 +0000"},{"text":"@tenketanken fikk du noe svar p\u00e5 den addonen til firefox?","to_user_id":4597139,"to_user":"tenketanken","from_user":"cluver","id":1567120286,"from_user_id":3489762,"iso_language_code":"no","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/119889955\/Bilde_326_normal.jpg","created_at":"Mon, 20 Apr 2009 17:19:18 +0000"},{"text":"@KurtScholle Digg had Ads? lol, With Firefox, AdBlock & RSS I never see the ads","to_user_id":333651,"to_user":"KurtScholle","from_user":"bcbeatty","id":1567119630,"from_user_id":68460,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64319687\/Me_from_the_Lodge_7-13-08_normal.jpeg","created_at":"Mon, 20 Apr 2009 17:19:12 +0000"},{"text":"@spittingcat ahhh! didn't know, I only look at youtube on firefox. don't have any mobile communicators.","to_user_id":4254917,"to_user":"spittingcat","from_user":"mattmagic","id":1567117100,"from_user_id":5727306,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/84251889\/795405-big_normal.jpg","created_at":"Mon, 20 Apr 2009 17:18:53 +0000"},{"text":"@maboa - Mozilla\/5.0 (X11; U; Linux i686; en-GB; rv:1.8.1.13) Gecko\/20080316 SUSE\/2.0.0.13-0.2 Firefox\/2.0.0.13","to_user_id":33370,"to_user":"maboa","from_user":"lhearl","id":1567116047,"from_user_id":11145048,"iso_language_code":"no","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","created_at":"Mon, 20 Apr 2009 17:18:47 +0000"},{"text":"Finally upgrading to Firefox 3 (from 2), on both my work and home computers. Why did it take me so long?","to_user_id":null,"from_user":"FrederikGoris","id":1567114241,"from_user_id":2183657,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57245090\/binkley_trans_normal.gif","created_at":"Mon, 20 Apr 2009 17:18:34 +0000"},{"text":"really people. stop using internet explorer! FIREFOX! that way I don't have to keep changing my details on my site :)","to_user_id":null,"from_user":"StilettoSportsJ","id":1567114128,"from_user_id":3263198,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/140589587\/summer_me_normal.jpg","created_at":"Mon, 20 Apr 2009 17:18:32 +0000"},{"text":"at\u00e9q esse firefox 308 n\u00e3o est\u00e1 t\u00e3o ruim. mas ainda me irritam alguns bugs ~~","to_user_id":null,"from_user":"caduzito","id":1567111654,"from_user_id":5051483,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/76892540\/package_toys_normal.png","created_at":"Mon, 20 Apr 2009 17:18:15 +0000"},{"text":"Cierro Firefox y tweetdeck que tengo bastante tarea que hacer","to_user_id":null,"from_user":"marv3x","id":1567110471,"from_user_id":111779,"iso_language_code":"es","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/135137954\/moto_0679_normal.jpg","created_at":"Mon, 20 Apr 2009 17:18:05 +0000"},{"text":"@tmc057 love firefox, but now I use that google chrome on my laptop...like it too!","to_user_id":8622848,"to_user":"tmc057","from_user":"jennmet","id":1567108866,"from_user_id":7219827,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/129220839\/smile_feet_normal.jpg","created_at":"Mon, 20 Apr 2009 17:17:52 +0000"},{"text":"Firefox Plugin for Twitter http:\/\/tinyurl.com\/2bmr3q","to_user_id":null,"from_user":"mazharin","id":1567108398,"from_user_id":12764228,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148417263\/logo_normal.gif","created_at":"Mon, 20 Apr 2009 17:17:51 +0000"},{"text":"firefox needs to not use a problematic cache","to_user_id":null,"from_user":"jakedahn","id":1567108188,"from_user_id":89635,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57291688\/n1277970100_2225_normal.jpg","created_at":"Mon, 20 Apr 2009 17:17:47 +0000"},{"text":"Dodajte Gmail Tasks u Firefox sidebar: Po\u0161to ste verovatno po\u010deli da koristite Gmail Tasks za pam\u0107enje va\u0161ih dne.. http:\/\/tinyurl.com\/df7dgt","to_user_id":null,"from_user":"djevrek","id":1567104166,"from_user_id":6752155,"iso_language_code":"pt","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/112428857\/Picture_202_normal.jpg","created_at":"Mon, 20 Apr 2009 17:17:17 +0000"},{"text":"sandwich? sandwhich? can i spell at all? why doesn't safari have spellcheck like firefox does?","to_user_id":null,"from_user":"slimfender","id":1567102131,"from_user_id":461073,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/125212882\/20-02-2009_1-2_normal.jpg","created_at":"Mon, 20 Apr 2009 17:16:58 +0000"},{"text":"Did you know that you can drag a tab from Firefox to Chome and back? Neat.","to_user_id":null,"from_user":"joshutk","id":1567100604,"from_user_id":222578,"iso_language_code":"en","source":"<a href="http:\/\/destroytwitter.com\/">DestroyTwitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53112855\/josh_cs3_normal.png","created_at":"Mon, 20 Apr 2009 17:16:48 +0000"},{"text":"@cineboy \n\nI think it's Firefox. Safari seems faster. I thought it was comcast.","to_user_id":3502968,"to_user":"cineboy","from_user":"AndrewFRobinson","id":1567092336,"from_user_id":5219854,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/80758440\/Blog_Picture_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:46 +0000"},{"text":"@Avinio thank you, firefox didn't work. it always gives back an error. thanks for helping though :)","to_user_id":218611,"to_user":"Avinio","from_user":"Sarah_Stuart","id":1567091592,"from_user_id":1854673,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148425394\/n1050963749_30402544_5294812_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:40 +0000"},{"text":"Speed Up Firefox web browser http:\/\/tinyurl.com\/28zjbm","to_user_id":null,"from_user":"jayminkapish","id":1567089438,"from_user_id":227615,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51442432\/jay_normal.png","created_at":"Mon, 20 Apr 2009 17:15:26 +0000"},{"text":"Minimap sidebar for Firefox ~ Mapping, addresses and directions @ http:\/\/tinyurl.com\/6f3yt6","to_user_id":null,"from_user":"steven2509","id":1567087844,"from_user_id":10204537,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/124435871\/Thor_3_normal.JPG","created_at":"Mon, 20 Apr 2009 17:15:12 +0000"},{"text":"@plutoniumpage Firefox -> Safari: Mac or PC?","to_user_id":3185443,"to_user":"plutoniumpage","from_user":"Malacandra","id":1567087584,"from_user_id":1174499,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/91904641\/miles_for_twitter_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:10 +0000"},{"text":"@Beeeeg except firefox gets bored after a while and asks if you want the script to be stopped.","to_user_id":9535974,"to_user":"Beeeeg","from_user":"Drarok","id":1567080622,"from_user_id":941369,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56645906\/Goomba_normal.jpg","created_at":"Mon, 20 Apr 2009 17:14:18 +0000"},{"text":"Screen resizing problems in Firefox http:\/\/tinyurl.com\/chz3wb","to_user_id":null,"from_user":"otherinboxhelp","id":1567079152,"from_user_id":2263650,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63409998\/otherinbox_icon_normal.png","created_at":"Mon, 20 Apr 2009 17:14:07 +0000"},{"text":"@johnfbraun I really don't like Tweetdeck. Even with two monitors it takes up too much space. Tweetie fits perfectly just next to Firefox.","to_user_id":1291479,"to_user":"johnfbraun","from_user":"nentecular","id":1567076517,"from_user_id":928787,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57182988\/nentecular_normal.jpg","created_at":"Mon, 20 Apr 2009 17:13:45 +0000"},{"text":"t\u00f4 de boa com a organiza\u00e7\u00e3o das abas do firefox. se mta coisa acumula pra ler, organiza nos favoritos! :)","to_user_id":null,"from_user":"foxpretender","id":1567075265,"from_user_id":2199243,"iso_language_code":"pt","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/72981570\/DSC00347_normal.JPG","created_at":"Mon, 20 Apr 2009 17:13:37 +0000"},{"text":"Queria o Gmail sempre aberto sem precisar usar o Firefox pra isso","to_user_id":null,"from_user":"rustymind","id":1567072458,"from_user_id":6155,"iso_language_code":"pt","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/88642915\/c_normal.jpg","created_at":"Mon, 20 Apr 2009 17:13:14 +0000"},{"text":"@BostonWealthMan i'll try to fix, but Firefox users can see the blog fine; come back to the blog in 20 mins and c what happens","to_user_id":6438140,"to_user":"BostonWealthMan","from_user":"yesandnotyes","id":1567067108,"from_user_id":3780901,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/118180349\/deo-portrait_normal.JPG","created_at":"Mon, 20 Apr 2009 17:12:34 +0000"},{"text":"@viciousbleu @benipsen if you have firefox, you can get a script via Greasemonkey to block apps\/quizzes in swathes. but it's a little work","to_user_id":1681225,"to_user":"viciousbleu","from_user":"SamCousins","id":1567066165,"from_user_id":5090625,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/127496405\/Sam_normal.jpg","created_at":"Mon, 20 Apr 2009 17:12:27 +0000"},{"text":"PS It seems like the photo album only works in Firefox, not IE right now. Good a reason as any to switch :)","to_user_id":null,"from_user":"toosunnyouthere","id":1567061723,"from_user_id":312807,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57121330\/Twitter_profile_photo_normal.jpg","created_at":"Mon, 20 Apr 2009 17:11:53 +0000"},{"text":"@mackaffinity thanks for tip on firefox threaded tabs. Nice!","to_user_id":267931,"to_user":"mackaffinity","from_user":"malcolmbot","id":1567056739,"from_user_id":11583811,"iso_language_code":"en","source":"<a href="http:\/\/83degrees.com\/to\/powertwitter">Power Twitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/78425206\/malcom_hat3_normal.jpg","created_at":"Mon, 20 Apr 2009 17:11:14 +0000"},{"text":"@Biertjuh JA, ik lul teveel :) Ene FireFox Pimp en ene Henk van Dijke zijn ineens verdwenen :) Ene Jenny Doverspike heb ik heengezonden","to_user_id":9701261,"to_user":"Biertjuh","from_user":"Kruimeldief","id":1567056294,"from_user_id":4748714,"iso_language_code":"nl","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/126656948\/8b06388c-1206-43df-b9dd-4b51228b373b_normal.jpg","created_at":"Mon, 20 Apr 2009 17:11:11 +0000"},{"text":"@bravenewcode tested in safari 4 beta & 3.1.2 & latest firefox on mac. the ajax stuff doesn't work in any of them.","to_user_id":994961,"to_user":"bravenewcode","from_user":"khlrqa","id":1567052831,"from_user_id":224717,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57154560\/rrr300_normal.jpg","created_at":"Mon, 20 Apr 2009 17:10:45 +0000"},{"text":"RT: "Throw all the tiny red lines you wish, I shall destroy them all!"\n-- Fox, da SJ Games, sobre o corretor ortogr\u00e1fico do Firefox.","to_user_id":null,"from_user":"mamangava","id":1567052258,"from_user_id":4390018,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/75652189\/DSC04072_normal.JPG","created_at":"Mon, 20 Apr 2009 17:10:41 +0000"},{"text":"#Firefox prend officialement le nom de #Firefox3.5 dans la quatri\u00e8me beta de ce dernier :)","to_user_id":null,"from_user":"OyoKooN","id":1567044110,"from_user_id":176092,"iso_language_code":"fr","source":"<a href="http:\/\/desktop.seesmic.com\/">Seesmic Desktop<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/129147038\/OliviaDunhamJPG_normal.jpg","created_at":"Mon, 20 Apr 2009 17:09:40 +0000"},{"text":"Atlantainternetmarketing.net News: "Top 10 Firefox Add-ons for Linux Users - Linux Magazine (registration)" - http:\/\/tinyurl.com\/cfgdqb","to_user_id":null,"from_user":"SEOAtlanta","id":1567034693,"from_user_id":5051211,"iso_language_code":"en","source":"<a href="http:\/\/www.bravenewcode.com\/wordtwit\/">WordTwit<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/126242512\/atlanta-seo-1_normal.png","created_at":"Mon, 20 Apr 2009 17:08:28 +0000"},{"text":"@Avinio i haven't tried firefox, just safari, good idea. am going to try it out now :) thanks","to_user_id":218611,"to_user":"Avinio","from_user":"Sarah_Stuart","id":1567028645,"from_user_id":1854673,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148425394\/n1050963749_30402544_5294812_normal.jpg","created_at":"Mon, 20 Apr 2009 17:07:41 +0000"},{"text":"me voy a regresar a firefox porke google chrome no me convenci\u00f3","to_user_id":null,"from_user":"SonneMx","id":1567020771,"from_user_id":1065217,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59431140\/DSC00072_normal.JPG","created_at":"Mon, 20 Apr 2009 17:06:41 +0000"},{"text":"Wyzo 3.0.1 The New Customized Browser Of FireFox 3.0.8 - http:\/\/tinyurl.com\/cm98td","to_user_id":null,"from_user":"anwarwagdi","id":1567016110,"from_user_id":2183567,"iso_language_code":"en","source":"<a href="http:\/\/www.sharethis.com">ShareThis.com<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/83273512\/125x125_banner_normal.png","created_at":"Mon, 20 Apr 2009 17:06:06 +0000"},{"text":"Firefox = passoire ?: C\u2018est en tout cas ce que semble d\u00e9montrer une \u00e9tude men\u00e9e en 2008 par la soci\u00e9t\u00e9 Secunia, .. http:\/\/tinyurl.com\/dkgkj5","to_user_id":null,"from_user":"fuzzfr","id":1567013785,"from_user_id":3239997,"iso_language_code":"fr","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68899486\/avatar_fuzz_normal.jpg","created_at":"Mon, 20 Apr 2009 17:05:47 +0000"},{"text":"@DavidEntremont It is a decent iPhone webb app. I need to start using a desktop app since Twitter.com always seems so laggy on firefox.","to_user_id":150359,"to_user":"DavidEntremont","from_user":"DrArdtagon","id":1567006240,"from_user_id":4627853,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/70564130\/Anthony93_normal.JPG","created_at":"Mon, 20 Apr 2009 17:04:51 +0000"},{"text":"Firefox 3.5b4 \u0432\u044b\u0439\u0434\u0435\u0442 22-24 \u0430\u043f\u0440\u0435\u043b\u044f http:\/\/tr.im\/jflf","to_user_id":null,"from_user":"smartfon","id":1567002479,"from_user_id":1538736,"iso_language_code":"ru","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/130824428\/av-150_normal.png","created_at":"Mon, 20 Apr 2009 17:04:23 +0000"},{"text":"im using firefox right now for my tweets but ima be on tweet deck or Tweetie in a minute","to_user_id":null,"from_user":"solaravada","id":1567000487,"from_user_id":3205793,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/140410086\/Picture_060_normal.jpg","created_at":"Mon, 20 Apr 2009 17:04:06 +0000"},{"text":"Speedtile 0.4, un nouveau plugin de bookmarks en visuel pour Firefox: \n\t\t\n\t\t\t\n\t\t\n\tPour les utiisateurs du naviga.. http:\/\/tinyurl.com\/cp9ado","to_user_id":null,"from_user":"jmgall","id":1566997778,"from_user_id":23853,"iso_language_code":"fr","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/90306573\/jmbg54000_normal.jpg","created_at":"Mon, 20 Apr 2009 17:03:47 +0000"},{"text":"Top 10 Firefox Add-ons for Linux Users http:\/\/bit.ly\/15v1bC","to_user_id":null,"from_user":"ielite","id":1566997201,"from_user_id":3174070,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68501431\/logo_normal.PNG","created_at":"Mon, 20 Apr 2009 17:03:43 +0000"},{"text":"@AngryChad Use the Better GReader extension for Firefox!","to_user_id":310949,"to_user":"AngryChad","from_user":"abeldanger","id":1566992843,"from_user_id":611593,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56922450\/my_head_normal.jpg","created_at":"Mon, 20 Apr 2009 17:03:11 +0000"},{"text":"twitter travando o firefox de cinco em cinco minutos!","to_user_id":null,"from_user":"marcel_silva","id":1566987360,"from_user_id":12757889,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148430974\/7wBCg9Y8AaNEqXT_normal.jpg","created_at":"Mon, 20 Apr 2009 17:02:31 +0000"},{"text":"Anyone notice Firefox trying to be more like Chrome? & with the FB\/twitter ap\/look and & copy-tition it's like one big virtual brand soup","to_user_id":null,"from_user":"rachelcw","id":1566986955,"from_user_id":3051268,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68342500\/rach_glasses_normal.jpg","created_at":"Mon, 20 Apr 2009 17:02:27 +0000"},{"text":"#Titook: The research was conducted by NSS labs and they had included the likes of Firefox (3.07), Apple.. http:\/\/tinyurl.com\/cnqhjs","to_user_id":null,"from_user":"TechnoZero","id":1566980725,"from_user_id":12687581,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147420706\/TiDolphi_normal.jpg","created_at":"Mon, 20 Apr 2009 17:01:42 +0000"},{"text":"Turning OFF firefox so I get WORK!","to_user_id":null,"from_user":"CandiedFabrics","id":1566978524,"from_user_id":8190119,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/146694105\/Vimeo_avatar_300_normal.jpg","created_at":"Mon, 20 Apr 2009 17:01:27 +0000"},{"text":"Likes Mozilla Labs Weave 0.3 : Need to wait it be upgraded, hope to sync all of my firefox plugins and add-o... - http:\/\/likaholix.com\/r\/fBK","to_user_id":null,"from_user":"betashow","id":1566977384,"from_user_id":181186,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147546718\/Leo_mobile_normal.jpg","created_at":"Mon, 20 Apr 2009 17:01:19 +0000"},{"text":"Firefox users, you probably know of the Twitter search add-on http:\/\/tinyurl.com\/c58xm9","to_user_id":null,"from_user":"edizquierdo","id":1566977150,"from_user_id":2010561,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/54481780\/ed_normal.png","created_at":"Mon, 20 Apr 2009 17:01:19 +0000"},{"text":"Download Facebook Albums to Your PC with FacePAD Firefox Add-on http:\/\/tinyurl.com\/daglp8","to_user_id":null,"from_user":"pcsbox","id":1566974888,"from_user_id":754736,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/76459142\/single_normal.JPG","created_at":"Mon, 20 Apr 2009 17:01:00 +0000"},{"text":"Testar Firefox 3.1 Beta 3","to_user_id":null,"from_user":"jonstg","id":1566974831,"from_user_id":2801022,"iso_language_code":"pt","source":"<a href="http:\/\/www.chrisfinke.com\/addons\/twitterbar\/">TwitterBar<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/70746207\/johan_stenberg_normal.JPG","created_at":"Mon, 20 Apr 2009 17:00:59 +0000"},{"text":"@priberam Uso o motor de pesquisa do dicion\u00e1rio instalado no Firefox. Sempre que procuro palavra com acentos, cedilha ou til, n\u00e3o reconhece.","to_user_id":12725990,"to_user":"priberam","from_user":"salustio","id":1566970119,"from_user_id":2011109,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/122514367\/maca2-twitter_normal.jpg","created_at":"Mon, 20 Apr 2009 17:00:28 +0000"},{"text":"Me hecho a dormir o pruebo Firefox 3.5 ? me hecho a dormir eso es mejor XD","to_user_id":null,"from_user":"icekrypto","id":1566965118,"from_user_id":11255742,"iso_language_code":"es","source":"<a href="http:\/\/itweet.net\/">iTweet<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/135479149\/icekrypto-mini_normal.jpg","created_at":"Mon, 20 Apr 2009 16:59:53 +0000"},{"text":"How to get a better Firefox with Ubiquity extension http:\/\/tinyurl.com\/c8pxlr","to_user_id":null,"from_user":"macstories","id":1566964874,"from_user_id":12757200,"iso_language_code":"en","source":"<a href="http:\/\/bluebirdapp.com">Bluebird<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148456587\/apple_logo_rainbow_6_color_normal.jpg","created_at":"Mon, 20 Apr 2009 16:59:51 +0000"},{"text":"@passionpit the video won't play on my Mac in neither Safari 4 nor Firefox 3. It jumps right to the end where it says "replay"\/"share"...","to_user_id":1195668,"to_user":"passionpit","from_user":"julscho","id":1566960035,"from_user_id":424071,"iso_language_code":"en","source":"<a href="http:\/\/loungeapp.com">Lounge<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148317755\/Tamala2010_330x296_normal.jpg","created_at":"Mon, 20 Apr 2009 16:59:17 +0000"},{"text":"@haacked Better yet, goes around and installs Firefox and makes it the default browser?","to_user_id":34575,"to_user":"haacked","from_user":"beebe4","id":1566958997,"from_user_id":183100,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57482684\/Photo_5_normal.jpg","created_at":"Mon, 20 Apr 2009 16:59:08 +0000"},{"text":"@therealmaz Ideas for other topics: IDEs (Eclipse, Visual Studio, etc,,,) and Firefox + Firebug","to_user_id":381054,"to_user":"therealmaz","from_user":"elevine","id":1566957248,"from_user_id":83133,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/24654522\/avatar2_normal.jpg","created_at":"Mon, 20 Apr 2009 16:58:56 +0000"},{"text":"@Carol_Meneses @Carol_Meneses F\u00e1cil... se vc usa o firefox, baixe o twitter fox, a~i vai funcionar que nem orkut o seu twitter","to_user_id":12710301,"to_user":"Carol_Meneses","from_user":"koiann","id":1566956562,"from_user_id":8928327,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/112468850\/030209180946_normal.jpg","created_at":"Mon, 20 Apr 2009 16:58:49 +0000"},{"text":"is anyone else having problems with Firefox crashing? It's been crashing nonstop for me at work and at home...I do not want to go back to IE","to_user_id":null,"from_user":"Joveth","id":1566952618,"from_user_id":5661754,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/84254585\/Jono1_normal.jpg","created_at":"Mon, 20 Apr 2009 16:58:18 +0000"},{"text":"Wyzo 3.0.1 The New Customized Browser Of FireFox 3.0.8","to_user_id":null,"from_user":"ibraheiem","id":1566952321,"from_user_id":6483451,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","created_at":"Mon, 20 Apr 2009 16:58:19 +0000"},{"text":"Enjoying the fruits of Firefox 3","to_user_id":null,"from_user":"NeonXero","id":1566949639,"from_user_id":4159819,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"https:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/131049544\/Photo_147_normal.jpg","created_at":"Mon, 20 Apr 2009 16:57:59 +0000"},{"text":"New Post: [tip] \u5c07\u4efb\u4f55\u641c\u5c0b\u6846\u52a0\u5165\u706b\u72d0\u641c\u5c0b\u5217 \u2013 add any search engine into firefox search bar http:\/\/tinyurl.com\/dymzhm","to_user_id":null,"from_user":"brownywalking","id":1566948188,"from_user_id":130823,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/37532782\/\u5f71\u50cf008_normal.jpg","created_at":"Mon, 20 Apr 2009 16:57:47 +0000"},{"text":""Conflux" is too a word, Firefox! You won't make me use "confluence." Throw all the tiny red lines you wish, I shall destroy them all! -Fox","to_user_id":null,"from_user":"SJGames","id":1566946967,"from_user_id":2097481,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64317528\/bigpyr_normal.png","created_at":"Mon, 20 Apr 2009 16:57:39 +0000"},{"text":"c4est relou d ecrire sur un clqvier qwerty. pis yq pqs firefox donc pqs de ;qils. fqil.","to_user_id":null,"from_user":"delgoff","id":1566944285,"from_user_id":1508369,"iso_language_code":"fr","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/94776151\/3318979772_3a9675756c_b_normal.jpg","created_at":"Mon, 20 Apr 2009 16:57:20 +0000"},{"text":"check out "Personas" for Firefox. Much easier than messing with themes. Dull Browser? get it here! http:\/\/digg.com\/d1nfa0 #newtechmondays","to_user_id":null,"from_user":"RosenKratz","id":1566935847,"from_user_id":2460052,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56395851\/n7021936_38073746_8583_normal.jpg","created_at":"Mon, 20 Apr 2009 16:56:16 +0000"},{"text":"20+ Great Twitter Tools for Firefox http:\/\/ping.fm\/qQDf1","to_user_id":null,"from_user":"RealEstateXpert","id":1566927762,"from_user_id":461121,"iso_language_code":"en","source":"<a href="http:\/\/www.ping.fm\/">Ping.fm<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/54324508\/jons_pic_normal.jpg","created_at":"Mon, 20 Apr 2009 16:55:14 +0000"},{"text":"@filipekiss \u00e9 verdade! O Foxytunes, extens\u00e3o pro Firefox, usa a Amazon pra pegar as capas.. eaHeaouhAEOUahe","to_user_id":216075,"to_user":"filipekiss","from_user":"mustabr","id":1566927275,"from_user_id":872878,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/138775391\/elitegeek_normal.png","created_at":"Mon, 20 Apr 2009 16:55:09 +0000"},{"text":"Come on PayPal, you don't support Firefox on your developer website?","to_user_id":null,"from_user":"paulwpagel","id":1566925393,"from_user_id":1145227,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57536184\/Photo_8_normal.jpg","created_at":"Mon, 20 Apr 2009 16:54:55 +0000"},{"text":"Cool Firefox extension, Firediff: http:\/\/www.incaseofstairs.com\/firediff\/","to_user_id":null,"from_user":"nderksen","id":1566920249,"from_user_id":410013,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/108693203\/opus_small_normal.png","created_at":"Mon, 20 Apr 2009 16:54:18 +0000"},{"text":"Firefox.next: an iTunes-like browser? http:\/\/tinyurl.com\/dexkrr","to_user_id":null,"from_user":"macstories","id":1566919449,"from_user_id":12757200,"iso_language_code":"en","source":"<a href="http:\/\/bluebirdapp.com">Bluebird<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148456587\/apple_logo_rainbow_6_color_normal.jpg","created_at":"Mon, 20 Apr 2009 16:54:12 +0000"},{"text":"*sigh* I do cruel things to Firefox. *restarts browser*","to_user_id":null,"from_user":"mactavish","id":1566917670,"from_user_id":60868,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59435649\/maryforprofileaug08_normal.jpg","created_at":"Mon, 20 Apr 2009 16:53:57 +0000"},{"text":"@mandiebear oh thats foxy tunes for firefox. its a plugin. that can control your music apps on your comp and post your song to twitter.","to_user_id":1734139,"to_user":"mandiebear","from_user":"samuraipanzer","id":1566914895,"from_user_id":126457,"iso_language_code":"en","source":"<a href="http:\/\/www.digsby.com\/">digsby<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/79442241\/IMG00201_normal.jpg","created_at":"Mon, 20 Apr 2009 16:53:37 +0000"},{"text":"Its really confusing to keep track of windows in multiple desktops.. I have four windows of Firefox with the same page on each desktop.. :\\","to_user_id":null,"from_user":"itsanimesh","id":1566912616,"from_user_id":6778642,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/93907938\/DSC00370_normal.JPG","created_at":"Mon, 20 Apr 2009 16:53:19 +0000"},{"text":"Reading: "10 Essential Firefox Addons\/Extensions For Bloggers | PCandWEB" ( http:\/\/tinyurl.com\/dfrprz )","to_user_id":null,"from_user":"sgayen","id":1566912172,"from_user_id":4381856,"iso_language_code":"en","source":"<a href="http:\/\/twitthat.com\/">twitthat<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/75387168\/sg_normal.JPG","created_at":"Mon, 20 Apr 2009 16:53:17 +0000"},{"text":"is sayin download skipscreen for firefox no more wait times for zshare rapidshare etc.....","to_user_id":null,"from_user":"r__dub","id":1566909817,"from_user_id":3204128,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","created_at":"Mon, 20 Apr 2009 16:52:59 +0000"},{"text":"@rbieber you using Firefox 3.0 or the 3.1 beta? I was using 3.1 beta (very stable) until Safari 4 beta came out","to_user_id":29636,"to_user":"rbieber","from_user":"frumpa","id":1566905518,"from_user_id":192534,"iso_language_code":"en","source":"<a href="http:\/\/www.nambu.com">Nambu<\/a>","profile_image_url":"https:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/137414986\/3437301687_7edf805439_normal.jpg","created_at":"Mon, 20 Apr 2009 16:52:25 +0000"},{"text":"Can it be true that Google @Adsense doesn't support Firefox on the Mac OS? For real?! Google hangs & doesn't offer any confirmations. WTF?","to_user_id":null,"from_user":"mylerdude","id":1566905089,"from_user_id":10384,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/125612392\/mylerdude_gmail.com_615b413c_normal.jpg","created_at":"Mon, 20 Apr 2009 16:52:24 +0000"},{"text":"amo el hack "open new tabs in background" de firefox. creo que deber\u00eda venir por defecto.","to_user_id":null,"from_user":"claudio","id":1566903611,"from_user_id":14147,"iso_language_code":"es","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/77314492\/Imagen_1_normal.png","created_at":"Mon, 20 Apr 2009 16:52:13 +0000"}],"since_id":0,"max_id":1567167290,"refresh_url":"?since_id=1567167290&q=firefox","results_per_page":100,"next_page":"?page=2&max_id=1567167290&rpp=100&q=firefox","completed_in":0.041434,"page":1,"query":"firefox"} \ No newline at end of file diff --git a/vendor/crack-0.1.4/test/data/twittersearch-ie.json b/vendor/crack-0.1.4/test/data/twittersearch-ie.json deleted file mode 100644 index 8b0664a4d..000000000 --- a/vendor/crack-0.1.4/test/data/twittersearch-ie.json +++ /dev/null @@ -1 +0,0 @@ -{"results":[{"text":"@4v4t4r La verdad ? No creo. Esas barritas vienen en la instalcion por defecto de Internet explorer, creeme es NORMAL.","to_user_id":5259518,"to_user":"4v4t4r","from_user":"Do0kK1em4n","id":1567118165,"from_user_id":11709821,"iso_language_code":"es","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/139688381\/avatar_new_normal.jpg","created_at":"Mon, 20 Apr 2009 17:19:04 +0000"},{"text":"really people. stop using internet explorer! FIREFOX! that way I don't have to keep changing my details on my site :)","to_user_id":null,"from_user":"StilettoSportsJ","id":1567114128,"from_user_id":3263198,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/140589587\/summer_me_normal.jpg","created_at":"Mon, 20 Apr 2009 17:18:32 +0000"},{"text":"MS09-014 MS Internet Explorer EMBED Memory Corruption PoC http:\/\/is.gd\/tv29","to_user_id":null,"from_user":"magic7502","id":1567099676,"from_user_id":6119063,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/116434670\/0312091732_normal.jpg","created_at":"Mon, 20 Apr 2009 17:16:43 +0000"},{"text":"Jo, no es que twitpic no lance el rss, no, es que Internet Explorer (donde me obligan a trabajar hoy) no los lee...caguen","to_user_id":null,"from_user":"Purnas","id":1567091912,"from_user_id":2869,"iso_language_code":"es","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/122746846\/ventanica_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:43 +0000"},{"text":"<3'ing Internet Explorer 8's rendering. *God* I never thought i'd say that about an IE product....","to_user_id":null,"from_user":"jimmysparkle","id":1567090044,"from_user_id":1108298,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/20314752\/twitter2_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:28 +0000"},{"text":"adblocking with internet explorer 8 http:\/\/tinyurl.com\/d53of5 via @thurrott","to_user_id":null,"from_user":"KnightMare","id":1567087820,"from_user_id":328746,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/83949896\/sfu_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:12 +0000"},{"text":"Help kill Internet Explorer 6: http:\/\/ie6update.com","to_user_id":null,"from_user":"ninjamultimedia","id":1567086481,"from_user_id":2114255,"iso_language_code":"no","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81114036\/twitter-pic_normal.jpg","created_at":"Mon, 20 Apr 2009 17:15:03 +0000"},{"text":"Meant to RT last week: Help kill Internet Explorer 6 http:\/\/bit.ly\/HkBgS (via @KISSmetrics)","to_user_id":null,"from_user":"mannyblum","id":1567082340,"from_user_id":30005,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/94915611\/photo_normal.jpg","created_at":"Mon, 20 Apr 2009 17:14:31 +0000"},{"text":"Dear Internet Explorer, You suck. <3 Kristi","to_user_id":null,"from_user":"kristijoklemm","id":1567071123,"from_user_id":3190712,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68600911\/Avatar_normal.jpg","created_at":"Mon, 20 Apr 2009 17:13:04 +0000"},{"text":"The North America Mission Board requires Internet explorer for all of their applications... baptist FAIL!","to_user_id":null,"from_user":"bradchristian","id":1567034289,"from_user_id":463002,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/62316824\/n742680170_4110871_9789_normal.jpg","created_at":"Mon, 20 Apr 2009 17:08:24 +0000"},{"text":"Looks like it's gonna be another week of me saying "FUCK INTERNET EXPLORER!" at least once a day.","to_user_id":null,"from_user":"travistubbs","id":1566938125,"from_user_id":37852,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63067002\/Me_2008_Oct_28_-_192_normal.jpg","created_at":"Mon, 20 Apr 2009 16:56:31 +0000"},{"text":"MS Internet Explorer EMBED Memory Corruption PoC (MS09-014) http:\/\/tinyurl.com\/cglo9b","to_user_id":null,"from_user":"os555feed","id":1566891006,"from_user_id":4265807,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/91975412\/24122008884_normal.jpg","created_at":"Mon, 20 Apr 2009 16:50:37 +0000"},{"text":"@jhgagle A bug? Are you using Internet Explorer by any chance? lol","to_user_id":5204845,"to_user":"jhgagle","from_user":"JohnONolan","id":1566839803,"from_user_id":4194942,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/110880326\/gravatar-j_normal.jpg","created_at":"Mon, 20 Apr 2009 16:44:14 +0000"},{"text":"O blogue j\u00e1 \u00e9 99,7% compat\u00edvel com o Internet Explorer, falta pouco para os 99,9%.","to_user_id":null,"from_user":"ByGruph","id":1566835526,"from_user_id":7213531,"iso_language_code":"pt","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/111208842\/bygruph_logo_normal.jpg","created_at":"Mon, 20 Apr 2009 16:43:42 +0000"},{"text":"RT @nicknewlin: "Internet Explorer is missing updates required to view this webpage" http:\/\/ie6update.com\/","to_user_id":null,"from_user":"emmalpitts","id":1566824643,"from_user_id":849091,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71384508\/twitter_normal.JPG","created_at":"Mon, 20 Apr 2009 16:42:20 +0000"},{"text":"@merlyn I like that MySQL gotcha quote:"this page may not render well in Internet Explorer, run along and get yourself a proper browser." :)","to_user_id":332680,"to_user":"merlyn","from_user":"Ve2dmn","id":1566804056,"from_user_id":423826,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53988981\/dave_simpson-1_normal.JPG","created_at":"Mon, 20 Apr 2009 16:39:46 +0000"},{"text":"Internet Explorer 6 smells of farts! Eggy ones!!!","to_user_id":null,"from_user":"Sulcalibur","id":1566803094,"from_user_id":9708,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/115919343\/house_av_normal.jpg","created_at":"Mon, 20 Apr 2009 16:39:39 +0000"},{"text":"vTalKi: MS Internet Explorer EMBED Memory Corruption PoC (MS09-014): MS Internet Explorer EMBED Memory Co.. http:\/\/tinyurl.com\/csm8tq","to_user_id":null,"from_user":"AdeelAhmad","id":1566801314,"from_user_id":6728,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/78465959\/SANY0169_normal.jpg","created_at":"Mon, 20 Apr 2009 16:39:26 +0000"},{"text":""Internet Explorer is missing updates required to view this webpage" http:\/\/ie6update.com\/","to_user_id":null,"from_user":"nicknewlin","id":1566787085,"from_user_id":4723040,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/96068335\/twitter_normal.png","created_at":"Mon, 20 Apr 2009 16:37:38 +0000"},{"text":"@anapaulaludin AH, outra coisa: no Opera d\u00e1 de "disfar\u00e7ar" o browser como firefox ou Internet Explorer. Se no Safari tiver isso tb, tente.","to_user_id":3385343,"to_user":"anapaulaludin","from_user":"arielcardeal","id":1566751445,"from_user_id":8176469,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/106792395\/S6302098_normal.JPG","created_at":"Mon, 20 Apr 2009 16:33:12 +0000"},{"text":"is installing internet explorer 8... I don't even know why, I should just stick with Firefox","to_user_id":null,"from_user":"fbcyouthpastor","id":1566748760,"from_user_id":2496853,"iso_language_code":"en","source":"<a href="http:\/\/help.twitter.com\/index.php?pg=kb.page&id=75">txt<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/69581651\/Pizza_normal.jpg","created_at":"Mon, 20 Apr 2009 16:32:52 +0000"},{"text":"I did not think this was possible, but I hate Internet Explorer more today than I did yesterday.","to_user_id":null,"from_user":"arunningfool","id":1566745983,"from_user_id":1260812,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/73073734\/1231514992_normal.jpg","created_at":"Mon, 20 Apr 2009 16:32:31 +0000"},{"text":"Just had to open Internet Explorer in order to have 2 Twitter accounts open at once... had forgotten how much I loathe IE.","to_user_id":null,"from_user":"KylaJuett","id":1566711126,"from_user_id":12733890,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/117289537\/side_view_hair_shot_normal.jpg","created_at":"Mon, 20 Apr 2009 16:28:15 +0000"},{"text":"had to open Internet Explorer in order to have 2 Twitter accounts open at once... had forgotten how much I loathe IE. yucky.","to_user_id":null,"from_user":"kahlia","id":1566707487,"from_user_id":151880,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148245858\/side_view_hair_shot_-_copia_normal.jpg","created_at":"Mon, 20 Apr 2009 16:27:47 +0000"},{"text":"@KamikazeKitty yep.. completely.. There's plugins for Firefox, and must be for Internet Explorer too.. & the best part is, it's all online!","to_user_id":1740099,"to_user":"kamikazekitty","from_user":"farhan","id":1566672135,"from_user_id":150999,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68949504\/largefacepicofme_normal.jpg","created_at":"Mon, 20 Apr 2009 16:23:25 +0000"},{"text":"ZDNet.de - Browstertest Internet Explorer 8 vs Google Chrome http:\/\/ff.im\/2eZKq","to_user_id":null,"from_user":"windowsos","id":1566662738,"from_user_id":5306236,"iso_language_code":"fr","source":"<a href="http:\/\/friendfeed.com\/">FriendFeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81313254\/windows7-logo_normal.jpg","created_at":"Mon, 20 Apr 2009 16:22:13 +0000"},{"text":"How to Install Internet Explorer 8r http:\/\/ff.im\/2eZKu","to_user_id":null,"from_user":"windowsos","id":1566659663,"from_user_id":5306236,"iso_language_code":"en","source":"<a href="http:\/\/friendfeed.com\/">FriendFeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81313254\/windows7-logo_normal.jpg","created_at":"Mon, 20 Apr 2009 16:21:50 +0000"},{"text":"(I was about to moan about internet explorer but I keep crashing firefox too, suddenly remembering why PCs suck)","to_user_id":null,"from_user":"helenjaques","id":1566640635,"from_user_id":2301337,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/89328426\/H_Jaques_normal.JPG","created_at":"Mon, 20 Apr 2009 16:19:26 +0000"},{"text":"Nossa, a Interface do Twitter \u00e9 toda arredondada com -moz-border-radius, olha como fica o layout no Internet Explorer...","to_user_id":null,"from_user":"mikaelcarrara","id":1566614819,"from_user_id":1852892,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147312394\/DSC05801_normal.jpg","created_at":"Mon, 20 Apr 2009 16:16:11 +0000"},{"text":"Help kill Internet Explorer 6 http:\/\/ie6update.com\/","to_user_id":null,"from_user":"balachandar","id":1566610906,"from_user_id":89981,"iso_language_code":"no","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68094517\/me-lomo-center_normal.jpg","created_at":"Mon, 20 Apr 2009 16:15:42 +0000"},{"text":"internet explorer + conex\u00e3o lent\u00edssima = infeeeeerno!","to_user_id":null,"from_user":"daniarrais","id":1566582349,"from_user_id":22932,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/65637888\/bzbzbz_normal.jpg","created_at":"Mon, 20 Apr 2009 16:12:11 +0000"},{"text":"has just installed Internet Explorer 8 on his Windows machine. It'll be used for testing websites compatibility only.","to_user_id":null,"from_user":"Jupe","id":1566538888,"from_user_id":41984,"iso_language_code":"en","source":"<a href="http:\/\/itweet.net\/">iTweet<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51410723\/Johnny_Depp_normal.jpg","created_at":"Mon, 20 Apr 2009 16:06:46 +0000"},{"text":"Pleaaaaase stop using Internet Explorer!","to_user_id":null,"from_user":"muratalibaba","id":1566535914,"from_user_id":9140550,"iso_language_code":"en","source":"<a href="http:\/\/www.twittergadget.com">TwitterGadget<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/114003933\/8_normal.jpg","created_at":"Mon, 20 Apr 2009 16:06:23 +0000"},{"text":"RT SannWoodReading: Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer ( http:\/\/tinyurl.com\/df4vyt )","to_user_id":null,"from_user":"DWsCoverGirl1","id":1566517464,"from_user_id":10956377,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147202714\/Picture_065_normal.jpg","created_at":"Mon, 20 Apr 2009 16:04:13 +0000"},{"text":"Internet Explorer 8 Web Accelerators http:\/\/ff.im\/2eZte","to_user_id":null,"from_user":"windowsos","id":1566498044,"from_user_id":5306236,"iso_language_code":"fr","source":"<a href="http:\/\/friendfeed.com\/">FriendFeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81313254\/windows7-logo_normal.jpg","created_at":"Mon, 20 Apr 2009 16:01:52 +0000"},{"text":"Abri o Microsoft Windows Internet Explorer e fui direto pro Facebook. Vou ver o Twitter do @dennylira.","to_user_id":null,"from_user":"cwks","id":1566493322,"from_user_id":3101152,"iso_language_code":"pt","source":"<a href="http:\/\/destroytwitter.com\/">DestroyTwitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/122467825\/wall_post_normal.png","created_at":"Mon, 20 Apr 2009 16:01:17 +0000"},{"text":"Internet Explorer 8 Easier Browsing http:\/\/ff.im\/2eZtf","to_user_id":null,"from_user":"windowsos","id":1566491939,"from_user_id":5306236,"iso_language_code":"en","source":"<a href="http:\/\/friendfeed.com\/">FriendFeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81313254\/windows7-logo_normal.jpg","created_at":"Mon, 20 Apr 2009 16:01:08 +0000"},{"text":"@shaymorris it is the new version of internet explorer.","to_user_id":9024003,"to_user":"shaymorris","from_user":"Evaid","id":1566466536,"from_user_id":9457085,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/141044641\/thumb_normal.jpg","created_at":"Mon, 20 Apr 2009 15:58:07 +0000"},{"text":"A detestar o Internet Explorer s\u00f3 um bocadinho!","to_user_id":null,"from_user":"usaralho","id":1566454790,"from_user_id":4141064,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/119807777\/Albergaria_2009__24__normal.JPG","created_at":"Mon, 20 Apr 2009 15:56:41 +0000"},{"text":"www.ThunDi.com Download Internet Explorer 8 All Versions Full Setup Offline Standalone Installer For http:\/\/u.mavrev.com\/2vwb","to_user_id":null,"from_user":"ThunDi","id":1566449624,"from_user_id":2520137,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/118360174\/n599657087_2508_1__normal.jpg","created_at":"Mon, 20 Apr 2009 15:56:04 +0000"},{"text":"Thinking about switching to Windows? The Windows hardware compatibility list (HCL) can only be viewed with Internet Explorer.","to_user_id":null,"from_user":"chaz_6","id":1566422783,"from_user_id":5979546,"iso_language_code":"en","source":"<a href="http:\/\/identi.ca\/">Identica<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/88105653\/chaz6-avatar-alt-trans_normal.png","created_at":"Mon, 20 Apr 2009 15:52:45 +0000"},{"text":"Reading: Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer ( http:\/\/tinyurl.com\/df4vyt )","to_user_id":null,"from_user":"SannWood","id":1566359020,"from_user_id":7039,"iso_language_code":"en","source":"<a href="http:\/\/twitthat.com\/">twitthat<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51719837\/staci_avatar2_normal.jpg","created_at":"Mon, 20 Apr 2009 15:44:54 +0000"},{"text":"J\u00e1 consegui descobrir a causa de um bug no Internet Explorer, mas ainda falta descobrir e corrigir outro.","to_user_id":null,"from_user":"ByGruph","id":1566321286,"from_user_id":7213531,"iso_language_code":"pt","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/111208842\/bygruph_logo_normal.jpg","created_at":"Mon, 20 Apr 2009 15:40:15 +0000"},{"text":"@Glinner Can I be a clued in Twtter type who uses a combination of Firefox AND Internet Explorer AND Chrome for different uses?","to_user_id":414478,"to_user":"Glinner","from_user":"niviking","id":1566314778,"from_user_id":2494734,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81692652\/060122_Me_normal.jpg","created_at":"Mon, 20 Apr 2009 15:39:28 +0000"},{"text":"at the bottom of MSN emails: "Get the new Internet Explorer 8 Optimised for MSN" the last 3 words there scare me","to_user_id":null,"from_user":"pixelenvy","id":1566277338,"from_user_id":122930,"iso_language_code":"en","source":"<a href="http:\/\/blog.codahale.com\/2007\/01\/15\/tweet-twitter-quicksilver\/">Qu\u0131c\u0138s\u0131\u0269\u2174\u03b5\u0280<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/67508889\/first_choice_normal.jpg","created_at":"Mon, 20 Apr 2009 15:34:56 +0000"},{"text":"@Glinner Anyone using Internet Explorer is onlikely to be on here. They're probably at the dry cleaners picking up their spare hair shirt.","to_user_id":414478,"to_user":"Glinner","from_user":"rob_hyde","id":1566275213,"from_user_id":3445699,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/127583120\/n871955857_506717_9726_normal.jpg","created_at":"Mon, 20 Apr 2009 15:34:39 +0000"},{"text":"@Glinner Internet Explorer?? Next you'll be telling us of some new fangled horseless carriage which travels along a black carpet of tar! ;-)","to_user_id":414478,"to_user":"Glinner","from_user":"icybloke","id":1566272575,"from_user_id":4233910,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/88388455\/me_normal.png","created_at":"Mon, 20 Apr 2009 15:34:21 +0000"},{"text":"everything changes one you open up internet explorer... got some spiffing up to do in the moonlight hours. loving the ortlieb bike packers.","to_user_id":null,"from_user":"mimiflynn","id":1566258732,"from_user_id":5536946,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/84122388\/DSCF4076_normal.jpg","created_at":"Mon, 20 Apr 2009 15:32:35 +0000"},{"text":"@LondonEater I can't even get in the page, it says internet explorer can't display etc.","to_user_id":1658084,"to_user":"londoneater","from_user":"hollowlegs","id":1566247230,"from_user_id":1328869,"iso_language_code":"en","source":"<a href="http:\/\/www.twittergadget.com">TwitterGadget<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/142065903\/s514357173_1150793_8485_normal.jpg","created_at":"Mon, 20 Apr 2009 15:31:12 +0000"},{"text":"RT @Glinner: I realise most of you aren't using Internet Explorer, being clued-in Twitter types, but just in case.http:\/\/tinyurl.com\/6a37pp","to_user_id":null,"from_user":"andersoicouk","id":1566231989,"from_user_id":642429,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","created_at":"Mon, 20 Apr 2009 15:29:22 +0000"},{"text":"RT @Glinner: I realise most of you aren't using Internet Explorer, being clued-in Twitter types, but just in case...http:\/\/tinyurl.com\/6 ...","to_user_id":null,"from_user":"andersoicouk","id":1566225949,"from_user_id":642429,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","created_at":"Mon, 20 Apr 2009 15:28:36 +0000"},{"text":"I realise most of you aren't using Internet Explorer, being clued-in Twitter types, but just in case...http:\/\/tinyurl.com\/6a37pp","to_user_id":null,"from_user":"Glinner","id":1566218970,"from_user_id":414478,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/48545652\/glinner-128_normal.jpg","created_at":"Mon, 20 Apr 2009 15:27:45 +0000"},{"text":"IE Favorites Center Shortcuts: You know about Internet Explorer's Favorites Center, right? Do you want to make y.. http:\/\/tinyurl.com\/dbky2e","to_user_id":null,"from_user":"FasTekSolutions","id":1566205555,"from_user_id":12673182,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147843815\/fts3_normal.gif","created_at":"Mon, 20 Apr 2009 15:26:07 +0000"},{"text":"SVG Tiger in Internet Explorer: http:\/\/tinyurl.com\/bwx4ub #svgie","to_user_id":null,"from_user":"ilinsky","id":1566181781,"from_user_id":1603038,"iso_language_code":"no","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59922497\/sergey_ilinsky_normal.jpg","created_at":"Mon, 20 Apr 2009 15:23:09 +0000"},{"text":"Is your website ready for Internet Explorer 8? http:\/\/bit.ly\/5tFGz","to_user_id":null,"from_user":"FletchMcGull","id":1566170143,"from_user_id":5605296,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/83371976\/fletchmcbadboy2_normal.jpg","created_at":"Mon, 20 Apr 2009 15:21:44 +0000"},{"text":"I HATE programming a web application to be cross-browser compatible. Internet Explorer makes this too damn difficult.","to_user_id":null,"from_user":"level10","id":1566125694,"from_user_id":892608,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/72748210\/avatar-seth_normal.jpg","created_at":"Mon, 20 Apr 2009 15:16:12 +0000"},{"text":"hating internet explorer, it fails majorly...","to_user_id":null,"from_user":"SampsonW","id":1566108019,"from_user_id":12725625,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148185431\/n794830012_4855990_9040_normal.jpg","created_at":"Mon, 20 Apr 2009 15:14:06 +0000"},{"text":"Got my new macbook up and running; with Internet Explorer and Outlook running through Parallel Desktop 4.0 It works great! Ready 4 the week.","to_user_id":null,"from_user":"johncarle","id":1566082833,"from_user_id":7733278,"iso_language_code":"en","source":"<a href="http:\/\/orangatame.com\/products\/twitterberry\/">TwitterBerry<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/102687812\/iStock_000006069267Small_normal.jpg","created_at":"Mon, 20 Apr 2009 15:10:56 +0000"},{"text":"O blogue \u00e9 96% compat\u00edvel com o Internet Explorer. Os restantes browsers Firefox, Safari e Opera 99,9%. Existe ainda dois bugs no IE.","to_user_id":null,"from_user":"ByGruph","id":1566071355,"from_user_id":7213531,"iso_language_code":"pt","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/111208842\/bygruph_logo_normal.jpg","created_at":"Mon, 20 Apr 2009 15:09:31 +0000"},{"text":"Internet Explorer 8.0 Final [For XP]\nhttp:\/\/tinyurl.com\/cwj5j6","to_user_id":null,"from_user":"liveoutsource","id":1566052983,"from_user_id":5926625,"iso_language_code":"fr","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/85965061\/live-outsource-logo_normal.gif","created_at":"Mon, 20 Apr 2009 15:07:12 +0000"},{"text":"@popelizbet Yah but I'm a rebel and internet explorer refuses to work on my lappy. If it works for you go for it, as for me I filed mine np","to_user_id":4132150,"to_user":"popelizbet","from_user":"maggs07","id":1565996678,"from_user_id":11256184,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148251632\/onthewayto_grad_interview_normal.jpg","created_at":"Mon, 20 Apr 2009 15:00:12 +0000"},{"text":"Maldito Internet Explorer.","to_user_id":null,"from_user":"ByGruph","id":1565972305,"from_user_id":7213531,"iso_language_code":"fr","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/111208842\/bygruph_logo_normal.jpg","created_at":"Mon, 20 Apr 2009 14:57:07 +0000"},{"text":"RT @gacconsultants "Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer" http:\/\/hub.tm\/?HLVWJ","to_user_id":null,"from_user":"danielngsh","id":1565964732,"from_user_id":2124434,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/119922222\/seline_normal.jpg","created_at":"Mon, 20 Apr 2009 14:56:08 +0000"},{"text":"latest version of Mozilla not an approved browser in which to fill out the FAFSA. y halo thar, Internet Explorer, we meet again.","to_user_id":null,"from_user":"popelizbet","id":1565957004,"from_user_id":4132150,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/74155220\/220png_normal.PNG","created_at":"Mon, 20 Apr 2009 14:55:08 +0000"},{"text":"RT @gacconsultants: "Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer" http:\/\/hub.tm\/?HLVWJ","to_user_id":null,"from_user":"mnazrulhisyam","id":1565955303,"from_user_id":5077164,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/109695942\/DSC00681_normal.JPG","created_at":"Mon, 20 Apr 2009 14:54:54 +0000"},{"text":""Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer" http:\/\/hub.tm\/?HLVWJ","to_user_id":null,"from_user":"gacconsultants","id":1565940431,"from_user_id":2365333,"iso_language_code":"en","source":"<a href="http:\/\/twitter.grader.com">Twitter Grader<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/68430271\/Hello..._normal.jpg","created_at":"Mon, 20 Apr 2009 14:53:01 +0000"},{"text":"i hate internet explorer. it's not letting me update my twitter at school.","to_user_id":null,"from_user":"thejoshosaurus","id":1565923978,"from_user_id":1810512,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61037694\/241852_large_normal.jpg","created_at":"Mon, 20 Apr 2009 14:50:55 +0000"},{"text":"What do Internet Explorer and Lotus Notes in common? -- v8 is out there but corporate dinos cling to v6.","to_user_id":null,"from_user":"notessensei","id":1565907925,"from_user_id":37829,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/52169724\/StephanAndTheCat140x185_normal.jpg","created_at":"Mon, 20 Apr 2009 14:48:53 +0000"},{"text":"Internet Explorer 8 add-in how to\n\nhttp:\/\/tinyurl.com\/cl9g9q","to_user_id":null,"from_user":"CyberComputerSt","id":1565907073,"from_user_id":8867781,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/116097560\/ccs1_normal.jpg","created_at":"Mon, 20 Apr 2009 14:48:45 +0000"},{"text":"Internet Explorer 8 - InPrivate-Browsen: http:\/\/tinyurl.com\/d9jq82","to_user_id":null,"from_user":"WindowsGermany","id":1565893337,"from_user_id":9387160,"iso_language_code":"sv","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147842477\/StartBTN-Vista_rgb_normal.png","created_at":"Mon, 20 Apr 2009 14:46:57 +0000"},{"text":"Whao. Internet explorer 8 is FAST","to_user_id":null,"from_user":"Ashvixen","id":1565891692,"from_user_id":6016970,"iso_language_code":"en","source":"<a href="http:\/\/orangatame.com\/products\/twitterberry\/">TwitterBerry<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/147184752\/n500466776_2127527_1876248_normal.jpg","created_at":"Mon, 20 Apr 2009 14:46:44 +0000"},{"text":"Fix Internet Explorer 6 and 7 bugs (Make IE behave like a standards-compliant browser) http:\/\/bit.ly\/aUOSt RT @webupd8","to_user_id":null,"from_user":"kirako","id":1565882418,"from_user_id":2297,"iso_language_code":"en","source":"<a href="http:\/\/www.hootsuite.com">HootSuite<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/136164291\/melly84_normal.jpg","created_at":"Mon, 20 Apr 2009 14:45:35 +0000"},{"text":"Internet Explorer < 8 is broken and obsolete. Web sites requiring Internet Explorer < 8 are likewise also broken and obsolete.","to_user_id":null,"from_user":"mcornick","id":1565847317,"from_user_id":7397,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/77442678\/Photo_1_normal.jpg","created_at":"Mon, 20 Apr 2009 14:41:00 +0000"},{"text":"MS Internet Explorer EMBED Memory Corruption PoC (MS09-014)","to_user_id":null,"from_user":"niktrix","id":1565830605,"from_user_id":3457414,"iso_language_code":"en","source":"<a href="http:\/\/twitterfeed.com">twitterfeed<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/134374205\/download_normal.jpg","created_at":"Mon, 20 Apr 2009 14:38:49 +0000"},{"text":"@Japh "Internet Explorer is missing updates required to view this site." That's misleading unless you really have locked IE6 users out.","to_user_id":1317941,"to_user":"Japh","from_user":"friskdesign","id":1565830261,"from_user_id":7665755,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/129021924\/lastfm_normal.jpg","created_at":"Mon, 20 Apr 2009 14:38:46 +0000"},{"text":"Fechando o Microsoft Windows Internet Explorer, clicando na bolinha e em Shut down. Tchau, e at\u00e9 os #2700 :)","to_user_id":null,"from_user":"cwks","id":1565786325,"from_user_id":3101152,"iso_language_code":"pt","source":"<a href="http:\/\/destroytwitter.com\/">DestroyTwitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/122467825\/wall_post_normal.png","created_at":"Mon, 20 Apr 2009 14:33:02 +0000"},{"text":"RT @xutopia: Internet Explorer 6 Update Trick #ie6 #webdesign #webprogramming http:\/\/ie6update.com\/","to_user_id":null,"from_user":"JessyO","id":1565755580,"from_user_id":2191850,"iso_language_code":"en","source":"<a href="http:\/\/desktop.seesmic.com\/">Seesmic Desktop<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/124298504\/Photo_54_normal.jpg","created_at":"Mon, 20 Apr 2009 14:29:04 +0000"},{"text":"Automated: Internet Explorer 6 http:\/\/tinyurl.com\/c2ht3u","to_user_id":null,"from_user":"ara_p","id":1565737524,"from_user_id":25594,"iso_language_code":"fr","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/114724699\/avatar_normal.png","created_at":"Mon, 20 Apr 2009 14:26:41 +0000"},{"text":"RT @jbooth83: RT @Hall_Web: Do Not Use Internet Explorer http:\/\/tinyurl.com\/df4vyt -- best advice I've heard in a while!","to_user_id":null,"from_user":"finalrune","id":1565728238,"from_user_id":1414501,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/70917649\/fred-2_normal.jpg","created_at":"Mon, 20 Apr 2009 14:25:26 +0000"},{"text":"Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer http:\/\/is.gd\/tsKm","to_user_id":null,"from_user":"dialogicmed","id":1565719266,"from_user_id":2769926,"iso_language_code":"en","source":"<a href="http:\/\/www.newsfirex.com\/safari140\/">safari140<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66204807\/F1000021_normal.jpg","created_at":"Mon, 20 Apr 2009 14:24:14 +0000"},{"text":"Help kill Internet Explorer 6 #ie6update http:\/\/ow.ly\/3kpr via @leemunroe","to_user_id":null,"from_user":"ghooghe","id":1565703968,"from_user_id":3408076,"iso_language_code":"nl","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/69901165\/ghooghe_normal.jpg","created_at":"Mon, 20 Apr 2009 14:22:13 +0000"},{"text":"Internet Explorer 6 Update Trick #ie6 #webdesign #webprogramming http:\/\/ie6update.com\/","to_user_id":null,"from_user":"xutopia","id":1565699013,"from_user_id":350298,"iso_language_code":"en","source":"<a href="http:\/\/identi.ca\/">Identica<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/130684111\/n594340287_6946_normal.jpg","created_at":"Mon, 20 Apr 2009 14:21:33 +0000"},{"text":"Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer - http:\/\/tinyurl.com\/df4vyt","to_user_id":null,"from_user":"nishadsn","id":1565643584,"from_user_id":4175863,"iso_language_code":"en","source":"<a href="http:\/\/www.sharethis.com">ShareThis.com<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/74403312\/DSC_0345_normal.JPG","created_at":"Mon, 20 Apr 2009 14:14:08 +0000"},{"text":"having a fight with Internet Explorer 7. And losing. Windows folks, upgrade to IE8. (and then go to http:\/\/www.scottcrews.com )","to_user_id":null,"from_user":"scottcrews","id":1565640501,"from_user_id":193280,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66364301\/7682769_normal.jpg","created_at":"Mon, 20 Apr 2009 14:13:44 +0000"},{"text":"Just downloaded the Internet Explorer 8. Looks alright but it will never convert me","to_user_id":null,"from_user":"ryanmawhinney","id":1565634164,"from_user_id":3546086,"iso_language_code":"en","source":"<a href="http:\/\/twitterfox.net\/">TwitterFox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/75889651\/ryandeborah_normal.png","created_at":"Mon, 20 Apr 2009 14:12:51 +0000"},{"text":"Another Twitter worm: http:\/\/tinyurl.com\/cjzxmm It seems to only be a problem for Internet Explorer users, or those who follow celebrities.","to_user_id":null,"from_user":"rlainhart","id":1565626398,"from_user_id":4251120,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/74857807\/DarkAvatar_normal.jpg","created_at":"Mon, 20 Apr 2009 14:11:45 +0000"},{"text":"RT @Hall_Web: Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer http:\/\/tinyurl.com\/df4vyt","to_user_id":null,"from_user":"jbooth83","id":1565625363,"from_user_id":1468154,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59048474\/1139021_normal.png","created_at":"Mon, 20 Apr 2009 14:11:38 +0000"},{"text":"sick of internet explorer..always F**king up!","to_user_id":null,"from_user":"yodadapug","id":1565622663,"from_user_id":12620982,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/146966177\/IMG_1031_normal.JPG","created_at":"Mon, 20 Apr 2009 14:11:15 +0000"},{"text":"We've sorted out our order form issues for Internet Explorer users, you can now submit orders. We're working hard on the contact page.","to_user_id":null,"from_user":"slicestation","id":1565603428,"from_user_id":4780367,"iso_language_code":"en","source":"<a href="http:\/\/twuffer.com">Twuffer<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/144962167\/app_48_normal.png","created_at":"Mon, 20 Apr 2009 14:08:36 +0000"},{"text":"Petition: the internet to stop using Internet Explorer! http:\/\/twitition.com\/zv4mg @greygorn","to_user_id":null,"from_user":"colindpritchard","id":1565600593,"from_user_id":3694030,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/81513344\/Photo_192_normal.jpg","created_at":"Mon, 20 Apr 2009 14:08:11 +0000"},{"text":"@Tech_Mate Not work tech Internet Explorer cannot display the webpage 8o|","to_user_id":12686895,"to_user":"Tech_Mate","from_user":"Tara_Rose","id":1565599045,"from_user_id":9805925,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/125223730\/0_7016_normal.jpg","created_at":"Mon, 20 Apr 2009 14:07:58 +0000"},{"text":"Twitter Plagued with Annoying Worm - Do Not Use Internet Explorer http:\/\/tinyurl.com\/df4vyt","to_user_id":null,"from_user":"Hall_Web","id":1565595648,"from_user_id":284802,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/70194610\/hall-logo-sq_normal.jpg","created_at":"Mon, 20 Apr 2009 14:07:30 +0000"},{"text":"@cusimano I couldn't watch in Firefox (you're on wbztv.com?)... was able to jump on a PC and watch in Internet Explorer. #BostonMarathon","to_user_id":2300645,"to_user":"cusimano","from_user":"andrewphelps","id":1565576031,"from_user_id":501355,"iso_language_code":"en","source":"<a href="http:\/\/83degrees.com\/to\/powertwitter">Power Twitter<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/98893360\/haircut_normal.jpg","created_at":"Mon, 20 Apr 2009 14:04:46 +0000"},{"text":"We've had some Gumtree.com users reporting that they can't click into text fields in Internet Explorer on the ad posting form. Can you try?","to_user_id":null,"from_user":"antoniojl","id":1565568983,"from_user_id":61036,"iso_language_code":"en","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/146595521\/Photo_3-1_normal.jpg","created_at":"Mon, 20 Apr 2009 14:03:47 +0000"},{"text":"Poucos homens de bem usam Internet Explorer 6...","to_user_id":null,"from_user":"leonardoreis","id":1565560621,"from_user_id":6047517,"iso_language_code":"pt","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/87063762\/leonardoreisibest_normal.jpg","created_at":"Mon, 20 Apr 2009 14:02:38 +0000"},{"text":"Anyone can please help me? A good internet program. Not Internet explorer or safari. I am thinking of google chrome. any programs? XD","to_user_id":null,"from_user":"darksinjun","id":1565541090,"from_user_id":12720060,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/148139033\/MS_Monster_Christmas_slime_normal.png","created_at":"Mon, 20 Apr 2009 14:00:06 +0000"},{"text":"FYI, the live video link didn't work for me in Firefox or Safari. Had to pull it up on Internet Explorer on PC...","to_user_id":null,"from_user":"AdrianArroyos","id":1565484099,"from_user_id":6016767,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/99776740\/AdrianTwitter_normal.jpg","created_at":"Mon, 20 Apr 2009 13:52:04 +0000"},{"text":"W00T!!! Finally solved my problems with my websites with FireFox & Internet Explorer (and hope also the Windows & Mac problems)","to_user_id":null,"from_user":"barryjonas","id":1565474829,"from_user_id":7905502,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/105960589\/avatar_twitter_normal.jpg","created_at":"Mon, 20 Apr 2009 13:50:44 +0000"},{"text":"@philipbeel only down side to #ie6update is that is upgrades then to internet explorer!","to_user_id":2755406,"to_user":"philipbeel","from_user":"jodiedoubleday","id":1565474229,"from_user_id":4634664,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/76982086\/n504994137_250648_1693_normal.jpg","created_at":"Mon, 20 Apr 2009 13:50:40 +0000"},{"text":"Internet Explorer 8 Auto-Update Coming. http:\/\/is.gd\/ts9N","to_user_id":null,"from_user":"gullage","id":1565417582,"from_user_id":2145976,"iso_language_code":"en","source":"<a href="http:\/\/www.twhirl.org\/">twhirl<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/129607278\/troy-20090331-sm_normal.jpg","created_at":"Mon, 20 Apr 2009 13:42:29 +0000"}],"since_id":0,"max_id":1567118165,"refresh_url":"?since_id=1567118165&q=internet+explorer","results_per_page":100,"next_page":"?page=2&max_id=1567118165&rpp=100&q=internet+explorer","completed_in":0.062616,"page":1,"query":"internet+explorer"} \ No newline at end of file diff --git a/vendor/crack-0.1.4/test/hash_test.rb b/vendor/crack-0.1.4/test/hash_test.rb deleted file mode 100644 index 7b5ea10dc..000000000 --- a/vendor/crack-0.1.4/test/hash_test.rb +++ /dev/null @@ -1,56 +0,0 @@ -require 'test_helper' - -class CrackTest < Test::Unit::TestCase - context "to_xml_attributes" do - setup do - @hash = { :one => "ONE", "two" => "TWO" } - end - - should "should turn the hash into xml attributes" do - attrs = @hash.to_xml_attributes - attrs.should =~ /one="ONE"/m - attrs.should =~ /two="TWO"/m - end - - should 'should preserve _ in hash keys' do - attrs = { - :some_long_attribute => "with short value", - :crash => :burn, - :merb => "uses extlib" - }.to_xml_attributes - - attrs.should =~ /some_long_attribute="with short value"/ - attrs.should =~ /merb="uses extlib"/ - attrs.should =~ /crash="burn"/ - end - end - - context "to_params" do - { - { "foo" => "bar", "baz" => "bat" } => "foo=bar&baz=bat", - { "foo" => [ "bar", "baz" ] } => "foo[]=bar&foo[]=baz", - { "foo" => [ {"bar" => "1"}, {"bar" => 2} ] } => "foo[][bar]=1&foo[][bar]=2", - { "foo" => { "bar" => [ {"baz" => 1}, {"baz" => "2"} ] } } => "foo[bar][][baz]=1&foo[bar][][baz]=2", - { "foo" => {"1" => "bar", "2" => "baz"} } => "foo[1]=bar&foo[2]=baz" - }.each do |hash, params| - should "should covert hash: #{hash.inspect} to params: #{params.inspect}" do - hash.to_params.split('&').sort.should == params.split('&').sort - end - end - - should 'should not leave a trailing &' do - { - :name => 'Bob', - :address => { - :street => '111 Ruby Ave.', - :city => 'Ruby Central', - :phones => ['111-111-1111', '222-222-2222'] - } - }.to_params.should_not =~ /&$/ - end - - should 'should URL encode unsafe characters' do - {:q => "?&\" +"}.to_params.should == "q=%3F%26%22%20%2B" - end - end -end \ No newline at end of file diff --git a/vendor/crack-0.1.4/test/json_test.rb b/vendor/crack-0.1.4/test/json_test.rb deleted file mode 100644 index e981ed75d..000000000 --- a/vendor/crack-0.1.4/test/json_test.rb +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 -require 'test_helper' - -class JsonTest < Test::Unit::TestCase - TESTS = { - %q({"data": "G\u00fcnter"}) => {"data" => "Günter"}, - %q({"returnTo":{"\/categories":"\/"}}) => {"returnTo" => {"/categories" => "/"}}, - %q({returnTo:{"\/categories":"\/"}}) => {"returnTo" => {"/categories" => "/"}}, - %q({"return\\"To\\":":{"\/categories":"\/"}}) => {"return\"To\":" => {"/categories" => "/"}}, - %q({"returnTo":{"\/categories":1}}) => {"returnTo" => {"/categories" => 1}}, - %({"returnTo":[1,"a"]}) => {"returnTo" => [1, "a"]}, - %({"returnTo":[1,"\\"a\\",", "b"]}) => {"returnTo" => [1, "\"a\",", "b"]}, - %({a: "'", "b": "5,000"}) => {"a" => "'", "b" => "5,000"}, - %({a: "a's, b's and c's", "b": "5,000"}) => {"a" => "a's, b's and c's", "b" => "5,000"}, - %({a: "2007-01-01"}) => {'a' => Date.new(2007, 1, 1)}, - %({a: "2007-01-01 01:12:34 Z"}) => {'a' => Time.utc(2007, 1, 1, 1, 12, 34)}, - # no time zone - %({a: "2007-01-01 01:12:34"}) => {'a' => "2007-01-01 01:12:34"}, - %([]) => [], - %({}) => {}, - %(1) => 1, - %("") => "", - %("\\"") => "\"", - %(null) => nil, - %(true) => true, - %(false) => false, - %q("http:\/\/test.host\/posts\/1") => "http://test.host/posts/1" - } - - TESTS.each do |json, expected| - should "should decode json (#{json})" do - lambda { - Crack::JSON.parse(json).should == expected - }.should_not raise_error - end - end - - should "should raise error for failed decoding" do - lambda { - Crack::JSON.parse(%({: 1})) - }.should raise_error(Crack::ParseError) - end - - should "should be able to parse a JSON response from a Twitter search about 'firefox'" do - data = '' - File.open(File.dirname(__FILE__) + "/data/twittersearch-firefox.json", "r") { |f| - data = f.read - } - - lambda { - Crack::JSON.parse(data) - }.should_not raise_error(Crack::ParseError) - end - - should "should be able to parse a JSON response from a Twitter search about 'internet explorer'" do - data = '' - File.open(File.dirname(__FILE__) + "/data/twittersearch-ie.json", "r") { |f| - data = f.read - } - - lambda { - Crack::JSON.parse(data) - }.should_not raise_error(Crack::ParseError) - end - -end diff --git a/vendor/crack-0.1.4/test/string_test.rb b/vendor/crack-0.1.4/test/string_test.rb deleted file mode 100644 index 1ffe9b223..000000000 --- a/vendor/crack-0.1.4/test/string_test.rb +++ /dev/null @@ -1,31 +0,0 @@ -require 'test_helper' - -class CrackTest < Test::Unit::TestCase - context "snake_case" do - should "lowercases one word CamelCase" do - "Merb".snake_case.should == "merb" - end - - should "makes one underscore snake_case two word CamelCase" do - "MerbCore".snake_case.should == "merb_core" - end - - should "handles CamelCase with more than 2 words" do - "SoYouWantContributeToMerbCore".snake_case.should == "so_you_want_contribute_to_merb_core" - end - - should "handles CamelCase with more than 2 capital letter in a row" do - "CNN".snake_case.should == "cnn" - "CNNNews".snake_case.should == "cnn_news" - "HeadlineCNNNews".snake_case.should == "headline_cnn_news" - end - - should "does NOT change one word lowercase" do - "merb".snake_case.should == "merb" - end - - should "leaves snake_case as is" do - "merb_core".snake_case.should == "merb_core" - end - end -end \ No newline at end of file diff --git a/vendor/crack-0.1.4/test/test_helper.rb b/vendor/crack-0.1.4/test/test_helper.rb deleted file mode 100644 index 5290ce453..000000000 --- a/vendor/crack-0.1.4/test/test_helper.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'rubygems' -require 'test/unit' -require 'shoulda' -gem 'jnunemaker-matchy', '>= 0.4.0' -require 'matchy' - -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) -require 'crack' - -class Test::Unit::TestCase -end diff --git a/vendor/crack-0.1.4/test/xml_test.rb b/vendor/crack-0.1.4/test/xml_test.rb deleted file mode 100644 index b273fc3d8..000000000 --- a/vendor/crack-0.1.4/test/xml_test.rb +++ /dev/null @@ -1,489 +0,0 @@ -require 'test_helper' - -class XmlTest < Test::Unit::TestCase - should "should transform a simple tag with content" do - xml = "This is the contents" - Crack::XML.parse(xml).should == { 'tag' => 'This is the contents' } - end - - should "should work with cdata tags" do - xml = <<-END - - - - END - Crack::XML.parse(xml)["tag"].strip.should == "text inside cdata" - end - - should "should transform a simple tag with attributes" do - xml = "" - hash = { 'tag' => { 'attr1' => '1', 'attr2' => '2' } } - Crack::XML.parse(xml).should == hash - end - - should "should transform repeating siblings into an array" do - xml =<<-XML - - - - - XML - - Crack::XML.parse(xml)['opt']['user'].class.should == Array - - hash = { - 'opt' => { - 'user' => [{ - 'login' => 'grep', - 'fullname' => 'Gary R Epstein' - },{ - 'login' => 'stty', - 'fullname' => 'Simon T Tyson' - }] - } - } - - Crack::XML.parse(xml).should == hash - end - - should "should not transform non-repeating siblings into an array" do - xml =<<-XML - - - - XML - - Crack::XML.parse(xml)['opt']['user'].class.should == Hash - - hash = { - 'opt' => { - 'user' => { - 'login' => 'grep', - 'fullname' => 'Gary R Epstein' - } - } - } - - Crack::XML.parse(xml).should == hash - end - - context "Parsing xml with text and attributes" do - setup do - xml =<<-XML - - Gary R Epstein - Simon T Tyson - - XML - @data = Crack::XML.parse(xml) - end - - should "correctly parse text nodes" do - @data.should == { - 'opt' => { - 'user' => [ - 'Gary R Epstein', - 'Simon T Tyson' - ] - } - } - end - - should "be parse attributes for text node if present" do - @data['opt']['user'][0].attributes.should == {'login' => 'grep'} - end - - should "default attributes to empty hash if not present" do - @data['opt']['user'][1].attributes.should == {} - end - end - - should "should typecast an integer" do - xml = "10" - Crack::XML.parse(xml)['tag'].should == 10 - end - - should "should typecast a true boolean" do - xml = "true" - Crack::XML.parse(xml)['tag'].should be(true) - end - - should "should typecast a false boolean" do - ["false"].each do |w| - Crack::XML.parse("#{w}")['tag'].should be(false) - end - end - - should "should typecast a datetime" do - xml = "2007-12-31 10:32" - Crack::XML.parse(xml)['tag'].should == Time.parse( '2007-12-31 10:32' ).utc - end - - should "should typecast a date" do - xml = "2007-12-31" - Crack::XML.parse(xml)['tag'].should == Date.parse('2007-12-31') - end - - xml_entities = { - "<" => "<", - ">" => ">", - '"' => """, - "'" => "'", - "&" => "&" - } - should "should unescape html entities" do - xml_entities.each do |k,v| - xml = "Some content #{v}" - Crack::XML.parse(xml)['tag'].should =~ Regexp.new(k) - end - end - - should "should unescape XML entities in attributes" do - xml_entities.each do |k,v| - xml = "" - Crack::XML.parse(xml)['tag']['attr'].should =~ Regexp.new(k) - end - end - - should "should undasherize keys as tags" do - xml = "Stuff" - Crack::XML.parse(xml).keys.should include( 'tag_1' ) - end - - should "should undasherize keys as attributes" do - xml = "" - Crack::XML.parse(xml)['tag1'].keys.should include( 'attr_1') - end - - should "should undasherize keys as tags and attributes" do - xml = "" - Crack::XML.parse(xml).keys.should include( 'tag_1' ) - Crack::XML.parse(xml)['tag_1'].keys.should include( 'attr_1') - end - - should "should render nested content correctly" do - xml = "Tag1 Content This is strong" - Crack::XML.parse(xml)['root']['tag1'].should == "Tag1 Content This is strong" - end - - should "should render nested content with splshould text nodes correctly" do - xml = "Tag1 ContentStuff Hi There" - Crack::XML.parse(xml)['root'].should == "Tag1 ContentStuff Hi There" - end - - should "should ignore attributes when a child is a text node" do - xml = "Stuff" - Crack::XML.parse(xml).should == { "root" => "Stuff" } - end - - should "should ignore attributes when any child is a text node" do - xml = "Stuff in italics" - Crack::XML.parse(xml).should == { "root" => "Stuff in italics" } - end - - should "should correctly transform multiple children" do - xml = <<-XML - - 35 - Home Simpson - 1988-01-01 - 2000-04-28 23:01 - true - - XML - - hash = { - "user" => { - "gender" => "m", - "age" => 35, - "name" => "Home Simpson", - "dob" => Date.parse('1988-01-01'), - "joined_at" => Time.parse("2000-04-28 23:01"), - "is_cool" => true - } - } - - Crack::XML.parse(xml).should == hash - end - - should "should properly handle nil values (ActiveSupport Compatible)" do - topic_xml = <<-EOT - - - - - - - - - - EOT - - expected_topic_hash = { - 'title' => nil, - 'id' => nil, - 'approved' => nil, - 'written_on' => nil, - 'viewed_at' => nil, - 'content' => nil, - 'parent_id' => nil - } - Crack::XML.parse(topic_xml)["topic"].should == expected_topic_hash - end - - should "should handle a single record from xml (ActiveSupport Compatible)" do - topic_xml = <<-EOT - - The First Topic - David - 1 - true - 0 - 2592000000 - 2003-07-16 - 2003-07-16T09:28:00+0000 - --- \n1: should be an integer\n:message: Have a nice day\narray: \n- should-have-dashes: true\n should_have_underscores: true\n - david@loudthinking.com - - 1.5 - 135 - yes - - EOT - - expected_topic_hash = { - 'title' => "The First Topic", - 'author_name' => "David", - 'id' => 1, - 'approved' => true, - 'replies_count' => 0, - 'replies_close_in' => 2592000000, - 'written_on' => Date.new(2003, 7, 16), - 'viewed_at' => Time.utc(2003, 7, 16, 9, 28), - # Changed this line where the key is :message. The yaml specifies this as a symbol, and who am I to change what you specify - # The line in ActiveSupport is - # 'content' => { 'message' => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] }, - 'content' => { :message => "Have a nice day", 1 => "should be an integer", "array" => [{ "should-have-dashes" => true, "should_have_underscores" => true }] }, - 'author_email_address' => "david@loudthinking.com", - 'parent_id' => nil, - 'ad_revenue' => BigDecimal("1.50"), - 'optimum_viewing_angle' => 135.0, - 'resident' => :yes - } - - Crack::XML.parse(topic_xml)["topic"].each do |k,v| - v.should == expected_topic_hash[k] - end - end - - should "should handle multiple records (ActiveSupport Compatible)" do - topics_xml = <<-EOT - - - The First Topic - David - 1 - false - 0 - 2592000000 - 2003-07-16 - 2003-07-16T09:28:00+0000 - Have a nice day - david@loudthinking.com - - - - The Second Topic - Jason - 1 - false - 0 - 2592000000 - 2003-07-16 - 2003-07-16T09:28:00+0000 - Have a nice day - david@loudthinking.com - - - - EOT - - expected_topic_hash = { - 'title' => "The First Topic", - 'author_name' => "David", - 'id' => 1, - 'approved' => false, - 'replies_count' => 0, - 'replies_close_in' => 2592000000, - 'written_on' => Date.new(2003, 7, 16), - 'viewed_at' => Time.utc(2003, 7, 16, 9, 28), - 'content' => "Have a nice day", - 'author_email_address' => "david@loudthinking.com", - 'parent_id' => nil - } - # puts Crack::XML.parse(topics_xml)['topics'].first.inspect - Crack::XML.parse(topics_xml)["topics"].first.each do |k,v| - v.should == expected_topic_hash[k] - end - end - - should "should handle a single record from_xml with attributes other than type (ActiveSupport Compatible)" do - topic_xml = <<-EOT - - - - - - EOT - - expected_topic_hash = { - 'id' => "175756086", - 'owner' => "55569174@N00", - 'secret' => "0279bf37a1", - 'server' => "76", - 'title' => "Colored Pencil PhotoBooth Fun", - 'ispublic' => "1", - 'isfriend' => "0", - 'isfamily' => "0", - } - Crack::XML.parse(topic_xml)["rsp"]["photos"]["photo"].each do |k,v| - v.should == expected_topic_hash[k] - end - end - - should "should handle an emtpy array (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - - XML - expected_blog_hash = {"blog" => {"posts" => []}} - Crack::XML.parse(blog_xml).should == expected_blog_hash - end - - should "should handle empty array with whitespace from xml (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - - - XML - expected_blog_hash = {"blog" => {"posts" => []}} - Crack::XML.parse(blog_xml).should == expected_blog_hash - end - - should "should handle array with one entry from_xml (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - a post - - - XML - expected_blog_hash = {"blog" => {"posts" => ["a post"]}} - Crack::XML.parse(blog_xml).should == expected_blog_hash - end - - should "should handle array with multiple entries from xml (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - a post - another post - - - XML - expected_blog_hash = {"blog" => {"posts" => ["a post", "another post"]}} - Crack::XML.parse(blog_xml).should == expected_blog_hash - end - - should "should handle file types (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - - - XML - hash = Crack::XML.parse(blog_xml) - hash.keys.should include('blog') - hash['blog'].keys.should include('logo') - - file = hash['blog']['logo'] - file.original_filename.should == 'logo.png' - file.content_type.should == 'image/png' - end - - should "should handle file from xml with defaults (ActiveSupport Compatible)" do - blog_xml = <<-XML - - - - - XML - file = Crack::XML.parse(blog_xml)['blog']['logo'] - file.original_filename.should == 'untitled' - file.content_type.should == 'application/octet-stream' - end - - should "should handle xsd like types from xml (ActiveSupport Compatible)" do - bacon_xml = <<-EOT - - 0.5 - 12.50 - 1 - 2007-12-25T12:34:56+0000 - - YmFiZS5wbmc= - - EOT - - expected_bacon_hash = { - 'weight' => 0.5, - 'chunky' => true, - 'price' => BigDecimal("12.50"), - 'expires_at' => Time.utc(2007,12,25,12,34,56), - 'notes' => "", - 'illustration' => "babe.png" - } - - Crack::XML.parse(bacon_xml)["bacon"].should == expected_bacon_hash - end - - should "should let type trickle through when unknown (ActiveSupport Compatible)" do - product_xml = <<-EOT - - 0.5 - image.gif - - - EOT - - expected_product_hash = { - 'weight' => 0.5, - 'image' => {'type' => 'ProductImage', 'filename' => 'image.gif' }, - } - - Crack::XML.parse(product_xml)["product"].should == expected_product_hash - end - - should "should handle unescaping from xml (ActiveResource Compatible)" do - xml_string = 'First & Last NameFirst &amp; Last Name' - expected_hash = { - 'bare_string' => 'First & Last Name', - 'pre_escaped_string' => 'First & Last Name' - } - - Crack::XML.parse(xml_string)['person'].should == expected_hash - end - - should "handle an empty xml string" do - Crack::XML.parse('').should == {} - end - - # As returned in the response body by the unfuddle XML API when creating objects - should "handle an xml string containing a single space" do - Crack::XML.parse(' ').should == {} - end -end \ No newline at end of file diff --git a/vendor/httparty-0.5.0/.gitignore b/vendor/httparty-0.5.0/.gitignore deleted file mode 100644 index 1292899f1..000000000 --- a/vendor/httparty-0.5.0/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -.DS_Store -doc/ -tmp/ -log/ -pkg/ -*.swp diff --git a/vendor/httparty-0.5.0/History b/vendor/httparty-0.5.0/History deleted file mode 100644 index 204d99d4e..000000000 --- a/vendor/httparty-0.5.0/History +++ /dev/null @@ -1,159 +0,0 @@ -== 0.5.0 2009-12-07 -* bug fixes - * inheritable attributes no longer mutable by subclasses (yyyc514) - * namespace BasicObject within HTTParty to avoid class name collisions (eric) - -* major enhancements - * Custom Parsers via class or proc - * Deprecation warning on HTTParty::AllowedFormats - moved to HTTParty::Parser::SupportedFormats - -* minor enhancements - * Curl inspired output when using the binary in verbose mode (alexvollmer) - * raise UnsupportedURIScheme when scheme is not HTTP or HTTPS (djspinmonkey) - * Allow SSL for ports other than 443 when scheme is HTTPS (stefankroes) - * Accept PEM certificates via HTTParty#pem (chrislo) - * Support HEAD and OPTION verbs (grempe) - * Verify SSL certificates when providing a PEM file (collectiveidea/danielmorrison) - -== 0.4.5 2009-09-12 -* bug fixes - * Fixed class-level headers overwritten by cookie management code. Closes #19 - * Fixed "superclass mismatch for class BlankSlate" error. Closes #20 - * Fixed reading files as post data from the command line (vesan) -* minor enhancements - * Timeout option added; will raise a Timeout::Error after the timeout has elapsed (attack). Closes #17 - HTTParty.get "http://github.com", :timeout => 1 - * Building gem with Jeweler - -== 0.4.4 2009-07-19 -* 2 minor update - * :query no longer sets form data. Use body and set content type to application/x-www-form-urlencoded if you need it. :query was wrong for that. - * Fixed a bug in the cookies class method that caused cookies to be forgotten after the first request. - * Also, some general cleanup of tests and such. - -== 0.4.3 2009-04-23 -* 1 minor update - * added message to the response object - -== 0.4.2 2009-03-30 -* 2 minor changes - * response code now returns an integer instead of a string (jqr) - * rubyforge project setup for crack so i'm now depending on that instead of jnunemaker-crack - -== 0.4.1 2009-03-29 -* 1 minor fix - * gem 'jnunemaker-crack' instead of gem 'crack' - -== 0.4.0 2009-03-29 -* 1 minor change - * Switched xml and json parsing to crack (same code as before just moved to gem for easier reuse in other projects) - -== 0.3.1 2009-02-10 -* 1 minor fix, 1 minor enhancement - * Fixed unescaping umlauts (siebertm) - * Added yaml response parsing (Miha Filej) - -== 0.3.0 2009-01-31 -* 1 major enhancement, 1 bug fix - * JSON gem no longer a requirement. It was conflicting with rails json stuff so I just stole ActiveSupport's json decoding and bundled it with HTTParty. - * Fixed bug where query strings were being duplicated on redirects - * Added a bunch of specs and moved some code around. - -== 0.2.10 2009-01-29 -* 1 minor enhancement - * Made encoding on query parameters treat everything except URI::PATTERN::UNRESERVED as UNSAFE to force encoding of '+' character (Julian Russell) - -== 0.2.9 2009-01-29 -* 3 minor enhancements - * Added a 'headers' accessor to the response with a hash of any HTTP headers. (Don Peterson) - * Add support for a ":cookies" option to be used at the class level, or as an option on any individual call. It should be passed a hash, which will be converted to the proper format and added to the request headers when the call is made. (Don Peterson) - * Refactored several specs and added a full suite of cucumber features (Don Peterson) - -== 0.2.8 2009-01-28 -* 1 major fix - * fixed major bug with response where it wouldn't iterate or really work at all with parsed responses - -== 0.2.7 2009-01-28 -* 2 minor fixes, 2 minor enhancements, 2 major enhancements - * fixed undefined method add_node for nil class error that occasionally happened (juliocesar) - * Handle nil or unexpected values better when typecasting. (Brian Landau) - * More robust handling of mime types (Alex Vollmer) - * Fixed support for specifying headers and added support for basic auth to CLI. (Alex Vollmer) - * Added first class response object that includes original body and status code (Alex Vollmer) - * Now parsing all response types as some non-200 responses provide important information, this means no more exception raising (Alex Vollmer) - -== 0.2.6 2009-01-05 -* 1 minor bug fix - * added explicit require of time as Time#parse failed outside of rails (willcodeforfoo) - -== 0.2.5 2009-01-05 -* 1 major enhancement - * Add command line interface to HTTParty (Alex Vollmer) - -== 0.2.4 2008-12-23 -* 1 bug fix - * Fixed that mimetype detection was failing if no mimetype was returned from service (skippy) -== 0.2.3 2008-12-23 -* 1 bug fix - * Fixed typecasting class variable naming issue - -== 0.2.2 2008-12-08 -* 1 bug fix - * Added the missing core extension hash method to_xml_attributes - -== 0.2.1 2008-12-08 -* 1 bug fix - * Fixed that HTTParty was borking ActiveSupport and as such Rails (thanks to Rob Sanheim) - -== 0.2.0 2008-12-07 -* 1 major enhancement - * Removed ActiveSupport as a dependency. Now requires json gem for json deserialization and uses an included class to do the xml parsing. - -== 0.1.8 2008-11-30 -* 3 major enhancements - * Moved base_uri normalization into request class and out of httparty module, fixing - the problem where base_uri was not always being normalized. - * Stupid simple support for HTTParty.get/post/put/delete. (jqr) - * Switched gem management to Echoe from newgem. - -== 0.1.7 2008-11-30 -* 1 major enhancement - * fixed multiple class definitions overriding each others options - -== 0.1.6 2008-11-26 -* 1 major enhancement - * now passing :query to set_form_data if post request to avoid content length errors - -== 0.1.5 2008-11-14 -* 2 major enhancements - * Refactored send request method out into its own object. - * Added :html format if you just want to do that. - -== 0.1.4 2008-11-08 -* 3 major enhancements: - * Removed some cruft - * Added ability to follow redirects automatically and turn that off (Alex Vollmer) - -== 0.1.3 2008-08-22 - -* 3 major enhancements: - * Added http_proxy key for setting proxy server and port (francxk@gmail.com) - * Now raises exception when http error occurs (francxk@gmail.com) - * Changed auto format detection from file extension to response content type (Jay Pignata) - -== 0.1.2 2008-08-09 - -* 1 major enhancement: - * default_params were not being appended to query string if option[:query] was blank - -== 0.1.1 2008-07-30 - -* 2 major enhancement: - * Added :basic_auth key for options when making a request - * :query and :body both now work with query string or hash - -== 0.1.0 2008-07-27 - -* 1 major enhancement: - * Initial release diff --git a/vendor/httparty-0.5.0/MIT-LICENSE b/vendor/httparty-0.5.0/MIT-LICENSE deleted file mode 100644 index ea4d34055..000000000 --- a/vendor/httparty-0.5.0/MIT-LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2008 John Nunemaker - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/httparty-0.5.0/Manifest b/vendor/httparty-0.5.0/Manifest deleted file mode 100644 index 446e7baa3..000000000 --- a/vendor/httparty-0.5.0/Manifest +++ /dev/null @@ -1,47 +0,0 @@ -bin/httparty -cucumber.yml -examples/aaws.rb -examples/basic.rb -examples/delicious.rb -examples/google.rb -examples/rubyurl.rb -examples/twitter.rb -examples/whoismyrep.rb -features/basic_authentication.feature -features/command_line.feature -features/deals_with_http_error_codes.feature -features/handles_multiple_formats.feature -features/steps/env.rb -features/steps/httparty_response_steps.rb -features/steps/httparty_steps.rb -features/steps/mongrel_helper.rb -features/steps/remote_service_steps.rb -features/supports_redirection.feature -History -httparty.gemspec -lib/httparty/cookie_hash.rb -lib/httparty/core_extensions.rb -lib/httparty/exceptions.rb -lib/httparty/module_inheritable_attributes.rb -lib/httparty/request.rb -lib/httparty/response.rb -lib/httparty/version.rb -lib/httparty.rb -Manifest -MIT-LICENSE -Rakefile -README.rdoc -spec/fixtures/delicious.xml -spec/fixtures/empty.xml -spec/fixtures/google.html -spec/fixtures/twitter.json -spec/fixtures/twitter.xml -spec/fixtures/undefined_method_add_node_for_nil.xml -spec/httparty/cookie_hash_spec.rb -spec/httparty/request_spec.rb -spec/httparty/response_spec.rb -spec/httparty_spec.rb -spec/spec.opts -spec/spec_helper.rb -website/css/common.css -website/index.html diff --git a/vendor/httparty-0.5.0/README.rdoc b/vendor/httparty-0.5.0/README.rdoc deleted file mode 100644 index f78fbc024..000000000 --- a/vendor/httparty-0.5.0/README.rdoc +++ /dev/null @@ -1,54 +0,0 @@ -= httparty - -Makes http fun again! - -== Note on Releases - -Releases are tagged on github and also released as gems on github and rubyforge. Master is pushed to whenever I add a patch or a new feature. To build from master, you can clone the code, generate the updated gemspec, build the gem and install. - -* rake gemspec -* gem build httparty.gemspec -* gem install the gem that was built - -== Note on Patches/Pull Requests - -* Fork the project. -* Make your feature addition or bug fix. -* Add tests for it. This is important so I don't break it in a future version unintentionally. -* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull) -* Send me a pull request. Bonus points for topic branches. - -== Features: - -* Easy get, post requests -* Basic http authentication -* Default request query string parameters (ie: for api keys that are needed on each request) -* Automatic parsing of JSON and XML into ruby hashes based on response content-type - -== Examples - -See http://github.com/jnunemaker/httparty/tree/master/examples - -== Command Line Interface - -httparty also includes the executable httparty which can be -used to query web services and examine the resulting output. By default -it will output the response as a pretty-printed Ruby object (useful for -grokking the structure of output). This can also be overridden to output -formatted XML or JSON. Execute httparty --help for all the -options. Below is an example of how easy it is. - - httparty "http://twitter.com/statuses/public_timeline.json" - -== Requirements - -* Crack http://github.com/jnunemaker/crack/ - For XML and JSON parsing. -* You like to party! - -== Install - -* sudo gem install httparty - -== Docs - -http://rdoc.info/projects/jnunemaker/httparty \ No newline at end of file diff --git a/vendor/httparty-0.5.0/Rakefile b/vendor/httparty-0.5.0/Rakefile deleted file mode 100644 index a80ed464d..000000000 --- a/vendor/httparty-0.5.0/Rakefile +++ /dev/null @@ -1,76 +0,0 @@ -require 'rubygems' -require 'rake' - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "httparty" - gem.summary = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} - gem.description = %Q{Makes http fun! Also, makes consuming restful web services dead easy.} - gem.email = "nunemaker@gmail.com" - gem.homepage = "http://httparty.rubyforge.org" - gem.authors = ["John Nunemaker", "Sandro Turriate"] - gem.add_dependency 'crack', '>= 0.1.1' - gem.add_development_dependency "activesupport", "~>2.3" - gem.add_development_dependency "cucumber", "~>0.4" - gem.add_development_dependency "fakeweb", "~>1.2" - gem.add_development_dependency "mongrel", "~>1.1" - gem.add_development_dependency "rspec", "1.2.9" - gem.post_install_message = "When you HTTParty, you must party hard!" - gem.rubyforge_project = 'httparty' - # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings - end - Jeweler::RubyforgeTasks.new do |rubyforge| - rubyforge.doc_task = "rdoc" - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" -end - -require 'spec/rake/spectask' -Spec::Rake::SpecTask.new(:spec) do |spec| - spec.libs << 'lib' << 'spec' - spec.spec_files = FileList['spec/**/*_spec.rb'] - spec.spec_opts = ['--options', 'spec/spec.opts'] -end - -Spec::Rake::SpecTask.new(:rcov) do |spec| - spec.libs << 'lib' << 'spec' - spec.pattern = 'spec/**/*_spec.rb' - spec.rcov = true -end - -task :spec => :check_dependencies - -begin - require 'cucumber/rake/task' - Cucumber::Rake::Task.new(:features) - - task :features => :check_dependencies -rescue LoadError - task :features do - abort "Cucumber is not available. In order to run features, you must: sudo gem install cucumber" - end -end - -task :default => [:spec, :features] - -require 'rake/rdoctask' -Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION') - version = File.read('VERSION') - else - version = "" - end - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "httparty #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -desc 'Upload website files to rubyforge' -task :website do - sh %{rsync -av website/ jnunemaker@rubyforge.org:/var/www/gforge-projects/httparty} -end diff --git a/vendor/httparty-0.5.0/VERSION b/vendor/httparty-0.5.0/VERSION deleted file mode 100644 index 8f0916f76..000000000 --- a/vendor/httparty-0.5.0/VERSION +++ /dev/null @@ -1 +0,0 @@ -0.5.0 diff --git a/vendor/httparty-0.5.0/bin/httparty b/vendor/httparty-0.5.0/bin/httparty deleted file mode 100755 index fda4109a9..000000000 --- a/vendor/httparty-0.5.0/bin/httparty +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env ruby - -require "optparse" -require "pp" - -$:.unshift(File.join(File.dirname(__FILE__), "/../lib")) -require "httparty" - -opts = { - :action => :get, - :headers => {}, - :verbose => false -} - -OptionParser.new do |o| - o.banner = "USAGE: #{$0} [options] [url]" - - o.on("-f", - "--format [FORMAT]", - "Output format to use instead of pretty-print ruby: " + - "plain, json or xml") do |f| - opts[:output_format] = f.downcase.to_sym - end - - o.on("-a", - "--action [ACTION]", - "HTTP action: get (default), post, put, delete, head, or options") do |a| - opts[:action] = a.downcase.to_sym - end - - o.on("-d", - "--data [BODY]", - "Data to put in request body (prefix with '@' for file)") do |d| - if d =~ /^@/ - opts[:data] = open(d[1..-1]).read - else - opts[:data] = d - end - end - - o.on("-H", "--header [NAME=VALUE]", "Additional HTTP headers in NAME=VALUE form") do |h| - abort "Invalid header specification, should be Name:Value" unless h =~ /.+:.+/ - name, value = h.split(':') - opts[:headers][name.strip] = value.strip - end - - o.on("-v", "--verbose", "If set, print verbose output") do |v| - opts[:verbose] = true - end - - o.on("-u", "--user [CREDS]", "Use basic authentication. Value should be user:password") do |u| - abort "Invalid credentials format. Must be user:password" unless u =~ /.+:.+/ - user, password = u.split(':') - opts[:basic_auth] = { :username => user, :password => password } - end - - o.on("-h", "--help", "Show help documentation") do |h| - puts o - exit - end -end.parse! - - -if ARGV.empty? - STDERR.puts "You need to provide a URL" - STDERR.puts "USAGE: #{$0} [options] [url]" -end - -def dump_headers(response) - resp_type = Net::HTTPResponse::CODE_TO_OBJ[response.code.to_s] - puts "#{response.code} #{resp_type.to_s.sub(/^Net::HTTP/, '')}" - response.headers.each do |n,v| - puts "#{n}: #{v}" - end - puts -end - -if opts[:verbose] - puts "#{opts[:action].to_s.upcase} #{ARGV.first}" - opts[:headers].each do |n,v| - puts "#{n}: #{v}" - end - puts -end - -response = HTTParty.send(opts[:action], ARGV.first, opts) -if opts[:output_format].nil? - dump_headers(response) if opts[:verbose] - pp response -else - print_format = opts[:output_format] - dump_headers(response) if opts[:verbose] - - case opts[:output_format] - when :json - begin - require 'rubygems' - require 'json' - puts JSON.pretty_generate(response.delegate) - rescue LoadError - puts YAML.dump(response.delegate) - end - when :xml - REXML::Document.new(response.body).write(STDOUT, 2) - puts - else - puts response - end -end diff --git a/vendor/httparty-0.5.0/cucumber.yml b/vendor/httparty-0.5.0/cucumber.yml deleted file mode 100644 index c1869b563..000000000 --- a/vendor/httparty-0.5.0/cucumber.yml +++ /dev/null @@ -1 +0,0 @@ -default: features diff --git a/vendor/httparty-0.5.0/examples/aaws.rb b/vendor/httparty-0.5.0/examples/aaws.rb deleted file mode 100644 index 3389d119f..000000000 --- a/vendor/httparty-0.5.0/examples/aaws.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'rubygems' -require 'activesupport' - -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' -config = YAML::load(File.read(File.join(ENV['HOME'], '.aaws'))) - -module AAWS - class Book - include HTTParty - base_uri 'http://ecs.amazonaws.com' - default_params :Service => 'AWSECommerceService', :Operation => 'ItemSearch', :SearchIndex => 'Books' - - def initialize(key) - self.class.default_params :AWSAccessKeyId => key - end - - def search(options={}) - raise ArgumentError, 'You must search for something' if options[:query].blank? - - # amazon uses nasty camelized query params - options[:query] = options[:query].inject({}) { |h, q| h[q[0].to_s.camelize] = q[1]; h } - - # make a request and return the items (NOTE: this doesn't handle errors at this point) - self.class.get('/onca/xml', options)['ItemSearchResponse']['Items'] - end - end -end - -aaws = AAWS::Book.new(config[:access_key]) -pp aaws.search(:query => {:title => 'Ruby On Rails'}) \ No newline at end of file diff --git a/vendor/httparty-0.5.0/examples/basic.rb b/vendor/httparty-0.5.0/examples/basic.rb deleted file mode 100644 index 2e4e95fc7..000000000 --- a/vendor/httparty-0.5.0/examples/basic.rb +++ /dev/null @@ -1,11 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' - -# You can also use post, put, delete, head, options in the same fashion -response = HTTParty.get('http://twitter.com/statuses/public_timeline.json') -puts response.body, response.code, response.message, response.headers.inspect - -response.each do |item| - puts item['user']['screen_name'] -end diff --git a/vendor/httparty-0.5.0/examples/custom_parsers.rb b/vendor/httparty-0.5.0/examples/custom_parsers.rb deleted file mode 100644 index 3a91813fe..000000000 --- a/vendor/httparty-0.5.0/examples/custom_parsers.rb +++ /dev/null @@ -1,67 +0,0 @@ -class ParseAtom - include HTTParty - - # Support Atom along with the default parsers: xml, json, yaml, etc. - class Parser::Atom < HTTParty::Parser - SupportedFormats.merge!({"application/atom+xml" => :atom}) - - protected - - # perform atom parsing on body - def atom - body.to_atom - end - end - - parser Parser::Atom -end - - -class OnlyParseAtom - include HTTParty - - # Only support Atom - class Parser::OnlyAtom < HTTParty::Parser - SupportedFormats = {"application/atom+xml" => :atom} - - protected - - # perform atom parsing on body - def atom - body.to_atom - end - end - - parser Parser::OnlyAtom -end - - -class SkipParsing - include HTTParty - - # Parse the response body however you like - class Parser::Simple < HTTParty::Parser - def parse - body - end - end - - parser Parser::Simple -end - - -class AdHocParsing - include HTTParty - parser( - Proc.new do |body, format| - case format - when :json - body.to_json - when :xml - body.to_xml - else - body - end - end - ) -end diff --git a/vendor/httparty-0.5.0/examples/delicious.rb b/vendor/httparty-0.5.0/examples/delicious.rb deleted file mode 100644 index e6d624386..000000000 --- a/vendor/httparty-0.5.0/examples/delicious.rb +++ /dev/null @@ -1,37 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' -config = YAML::load(File.read(File.join(ENV['HOME'], '.delicious'))) - -class Delicious - include HTTParty - base_uri 'https://api.del.icio.us/v1' - - def initialize(u, p) - @auth = {:username => u, :password => p} - end - - # query params that filter the posts are: - # tag (optional). Filter by this tag. - # dt (optional). Filter by this date (CCYY-MM-DDThh:mm:ssZ). - # url (optional). Filter by this url. - # ie: posts(:query => {:tag => 'ruby'}) - def posts(options={}) - options.merge!({:basic_auth => @auth}) - self.class.get('/posts/get', options) - end - - # query params that filter the posts are: - # tag (optional). Filter by this tag. - # count (optional). Number of items to retrieve (Default:15, Maximum:100). - def recent(options={}) - options.merge!({:basic_auth => @auth}) - self.class.get('/posts/recent', options) - end -end - -delicious = Delicious.new(config['username'], config['password']) -pp delicious.posts(:query => {:tag => 'ruby'}) -pp delicious.recent - -delicious.recent['posts']['post'].each { |post| puts post['href'] } \ No newline at end of file diff --git a/vendor/httparty-0.5.0/examples/google.rb b/vendor/httparty-0.5.0/examples/google.rb deleted file mode 100644 index f629b4d41..000000000 --- a/vendor/httparty-0.5.0/examples/google.rb +++ /dev/null @@ -1,16 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' - -class Google - include HTTParty - format :html -end - -# google.com redirects to www.google.com so this is live test for redirection -pp Google.get('http://google.com') - -puts '', '*'*70, '' - -# check that ssl is requesting right -pp Google.get('https://www.google.com') \ No newline at end of file diff --git a/vendor/httparty-0.5.0/examples/rubyurl.rb b/vendor/httparty-0.5.0/examples/rubyurl.rb deleted file mode 100644 index 65808fb72..000000000 --- a/vendor/httparty-0.5.0/examples/rubyurl.rb +++ /dev/null @@ -1,14 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' - -class Rubyurl - include HTTParty - base_uri 'rubyurl.com' - - def self.shorten( website_url ) - post( '/api/links.json', :query => { :link => { :website_url => website_url } } ) - end -end - -pp Rubyurl.shorten( 'http://istwitterdown.com/') \ No newline at end of file diff --git a/vendor/httparty-0.5.0/examples/twitter.rb b/vendor/httparty-0.5.0/examples/twitter.rb deleted file mode 100644 index c7794fa37..000000000 --- a/vendor/httparty-0.5.0/examples/twitter.rb +++ /dev/null @@ -1,31 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' -config = YAML::load(File.read(File.join(ENV['HOME'], '.twitter'))) - -class Twitter - include HTTParty - base_uri 'twitter.com' - - def initialize(u, p) - @auth = {:username => u, :password => p} - end - - # which can be :friends, :user or :public - # options[:query] can be things like since, since_id, count, etc. - def timeline(which=:friends, options={}) - options.merge!({:basic_auth => @auth}) - self.class.get("/statuses/#{which}_timeline.json", options) - end - - def post(text) - options = { :query => {:status => text}, :basic_auth => @auth } - self.class.post('/statuses/update.json', options) - end -end - -twitter = Twitter.new(config['email'], config['password']) -pp twitter.timeline -# pp twitter.timeline(:friends, :query => {:since_id => 868482746}) -# pp twitter.timeline(:friends, :query => 'since_id=868482746') -# pp twitter.post('this is a test of 0.2.0') \ No newline at end of file diff --git a/vendor/httparty-0.5.0/examples/whoismyrep.rb b/vendor/httparty-0.5.0/examples/whoismyrep.rb deleted file mode 100644 index b59473c16..000000000 --- a/vendor/httparty-0.5.0/examples/whoismyrep.rb +++ /dev/null @@ -1,10 +0,0 @@ -dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) -require File.join(dir, 'httparty') -require 'pp' - -class Rep - include HTTParty -end - -pp Rep.get('http://whoismyrepresentative.com/whoismyrep.php?zip=46544') -pp Rep.get('http://whoismyrepresentative.com/whoismyrep.php', :query => {:zip => 46544}) \ No newline at end of file diff --git a/vendor/httparty-0.5.0/features/basic_authentication.feature b/vendor/httparty-0.5.0/features/basic_authentication.feature deleted file mode 100644 index ee276507e..000000000 --- a/vendor/httparty-0.5.0/features/basic_authentication.feature +++ /dev/null @@ -1,20 +0,0 @@ -Feature: Basic Authentication - - As a developer - I want to be able to use a service that requires Basic Authentication - Because that is not an uncommon requirement - - Scenario: Passing no credentials to a page requiring Basic Authentication - Given a restricted page at '/protected.html' - When I call HTTParty#get with '/protected.html' - Then it should return a response with a 401 response code - - Scenario: Passing proper credentials to a page requiring Basic Authentication - Given a remote service that returns 'Authenticated Page' - And that service is accessed at the path '/protected.html' - And that service is protected by Basic Authentication - And that service requires the username 'jcash' with the password 'maninblack' - When I call HTTParty#get with '/protected.html' and a basic_auth hash: - | username | password | - | jcash | maninblack | - Then the return value should match 'Authenticated Page' diff --git a/vendor/httparty-0.5.0/features/command_line.feature b/vendor/httparty-0.5.0/features/command_line.feature deleted file mode 100644 index 951e23670..000000000 --- a/vendor/httparty-0.5.0/features/command_line.feature +++ /dev/null @@ -1,7 +0,0 @@ -Feature: Command Line - - As a developer - I want to be able to harness the power of HTTParty from the command line - Because that would make quick testing and debugging easy - And 'easy' is my middle name - And I'm kidding it's actually 'Danger'! diff --git a/vendor/httparty-0.5.0/features/deals_with_http_error_codes.feature b/vendor/httparty-0.5.0/features/deals_with_http_error_codes.feature deleted file mode 100644 index ccb9912fb..000000000 --- a/vendor/httparty-0.5.0/features/deals_with_http_error_codes.feature +++ /dev/null @@ -1,26 +0,0 @@ -Feature: Deals with HTTP error codes - - As a developer - I want to be informed of non-successful responses - Because sometimes thing explode - And I should probably know what happened - - Scenario: A response of '404 - Not Found' - Given a remote service that returns a 404 status code - And that service is accessed at the path '/service.html' - When I call HTTParty#get with '/service.html' - Then it should return a response with a 404 response code - - Scenario: A response of '500 - Internal Server Error' - Given a remote service that returns a 500 status code - And that service is accessed at the path '/service.html' - When I call HTTParty#get with '/service.html' - Then it should return a response with a 500 response code - - Scenario: A non-successful response where I need the body - Given a remote service that returns a 400 status code - And the response from the service has a body of 'Bad response' - And that service is accessed at the path '/service.html' - When I call HTTParty#get with '/service.html' - Then it should return a response with a 400 response code - And the return value should match 'Bad response' diff --git a/vendor/httparty-0.5.0/features/handles_multiple_formats.feature b/vendor/httparty-0.5.0/features/handles_multiple_formats.feature deleted file mode 100644 index 24c91fabd..000000000 --- a/vendor/httparty-0.5.0/features/handles_multiple_formats.feature +++ /dev/null @@ -1,34 +0,0 @@ -Feature: Handles Multiple Formats - - As a developer - I want to be able to consume remote services of many different formats - And I want those formats to be automatically detected and handled - Because web services take many forms - And I don't want to have to do any extra work - - Scenario: An HTML service - Given a remote service that returns '

Some HTML

' - And that service is accessed at the path '/service.html' - And the response from the service has a Content-Type of 'text/html' - When I call HTTParty#get with '/service.html' - Then it should return a String - And the return value should match '

Some HTML

' - - Scenario: A JSON service - Given a remote service that returns '{ "jennings": "waylon", "cash": "johnny" }' - And that service is accessed at the path '/service.json' - And the response from the service has a Content-Type of 'application/json' - When I call HTTParty#get with '/service.json' - Then it should return a Hash equaling: - | key | value | - | jennings | waylon | - | cash | johnny | - - Scenario: An XML Service - Given a remote service that returns 'waylon jennings' - And that service is accessed at the path '/service.xml' - And the response from the service has a Content-Type of 'text/xml' - When I call HTTParty#get with '/service.xml' - Then it should return a Hash equaling: - | key | value | - | singer | waylon jennings | diff --git a/vendor/httparty-0.5.0/features/steps/env.rb b/vendor/httparty-0.5.0/features/steps/env.rb deleted file mode 100644 index c75dcec88..000000000 --- a/vendor/httparty-0.5.0/features/steps/env.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'mongrel' -require 'activesupport' -require 'lib/httparty' -require 'spec/expectations' - -Before do - port = ENV["HTTPARTY_PORT"] || 31981 - @host_and_port = "0.0.0.0:#{port}" - @server = Mongrel::HttpServer.new("0.0.0.0", port) - @server.run - @request_options = {} -end - -After do - @server.stop -end diff --git a/vendor/httparty-0.5.0/features/steps/httparty_response_steps.rb b/vendor/httparty-0.5.0/features/steps/httparty_response_steps.rb deleted file mode 100644 index 684d0f554..000000000 --- a/vendor/httparty-0.5.0/features/steps/httparty_response_steps.rb +++ /dev/null @@ -1,26 +0,0 @@ -Then /it should return an? (\w+)$/ do |class_string| - @response_from_httparty.should be_an_instance_of(class_string.constantize) -end - -Then /the return value should match '(.*)'/ do |expected_text| - @response_from_httparty.should eql(expected_text) -end - -Then /it should return a Hash equaling:/ do |hash_table| - @response_from_httparty.should be_an_instance_of(Hash) - @response_from_httparty.keys.length.should eql(hash_table.rows.length) - hash_table.hashes.each do |pair| - key, value = pair["key"], pair["value"] - @response_from_httparty.keys.should include(key) - @response_from_httparty[key].should eql(value) - end -end - -Then /it should return a response with a (\d+) response code/ do |code| - @response_from_httparty.code.should eql(code.to_i) -end - -Then /it should raise (?:an|a) ([\w:]+) exception/ do |exception| - @exception_from_httparty.should_not be_nil - @exception_from_httparty.class.name.should eql(exception) -end diff --git a/vendor/httparty-0.5.0/features/steps/httparty_steps.rb b/vendor/httparty-0.5.0/features/steps/httparty_steps.rb deleted file mode 100644 index 3a82c78d2..000000000 --- a/vendor/httparty-0.5.0/features/steps/httparty_steps.rb +++ /dev/null @@ -1,19 +0,0 @@ -When /^I set my HTTParty timeout option to (\d+)$/ do |timeout| - @request_options[:timeout] = timeout.to_i -end - -When /I call HTTParty#get with '(.*)'$/ do |url| - begin - @response_from_httparty = HTTParty.get("http://#{@host_and_port}#{url}", @request_options) - rescue HTTParty::RedirectionTooDeep, Timeout::Error => e - @exception_from_httparty = e - end -end - -When /I call HTTParty#get with '(.*)' and a basic_auth hash:/ do |url, auth_table| - h = auth_table.hashes.first - @response_from_httparty = HTTParty.get( - "http://#{@host_and_port}#{url}", - :basic_auth => { :username => h["username"], :password => h["password"] } - ) -end diff --git a/vendor/httparty-0.5.0/features/steps/mongrel_helper.rb b/vendor/httparty-0.5.0/features/steps/mongrel_helper.rb deleted file mode 100644 index 80b8d8cd3..000000000 --- a/vendor/httparty-0.5.0/features/steps/mongrel_helper.rb +++ /dev/null @@ -1,56 +0,0 @@ -def basic_mongrel_handler - Class.new(Mongrel::HttpHandler) do - attr_writer :content_type, :response_body, :response_code, :preprocessor - - def initialize - @content_type = "text/html" - @response_body = "" - @response_code = 200 - @custom_headers = {} - end - - def process(request, response) - instance_eval &@preprocessor if @preprocessor - reply_with(response, @response_code, @response_body) - end - - def reply_with(response, code, response_body) - response.start(code) do |head, body| - head["Content-Type"] = @content_type - @custom_headers.each { |k,v| head[k] = v } - body.write(response_body) - end - end - end -end - -def new_mongrel_handler - basic_mongrel_handler.new -end - -def add_basic_authentication_to(handler) - m = Module.new do - attr_writer :username, :password - - def self.extended(base) - base.instance_eval { @custom_headers["WWW-Authenticate"] = 'Basic Realm="Super Secret Page"' } - base.class_eval { alias_method_chain :process, :basic_authentication } - end - - def process_with_basic_authentication(request, response) - if authorized?(request) then process_without_basic_authentication(request, response) - else reply_with(response, 401, "Incorrect. You have 20 seconds to comply.") - end - end - - def authorized?(request) - request.params["HTTP_AUTHORIZATION"] == "Basic " + Base64.encode64("#{@username}:#{@password}").strip - end - end - handler.extend(m) -end - -def new_mongrel_redirector(target_url, relative_path = false) - target_url = "http://#{@host_and_port}#{target_url}" unless relative_path - Mongrel::RedirectHandler.new(target_url) -end diff --git a/vendor/httparty-0.5.0/features/steps/remote_service_steps.rb b/vendor/httparty-0.5.0/features/steps/remote_service_steps.rb deleted file mode 100644 index c806246d5..000000000 --- a/vendor/httparty-0.5.0/features/steps/remote_service_steps.rb +++ /dev/null @@ -1,52 +0,0 @@ -Given /a remote service that returns '(.*)'/ do |response_body| - @handler = new_mongrel_handler - Given "the response from the service has a body of '#{response_body}'" -end - -Given /a remote service that returns a (\d+) status code/ do |code| - @handler = new_mongrel_handler - @handler.response_code = code -end - -Given /that service is accessed at the path '(.*)'/ do |path| - @server.register(path, @handler) -end - -Given /^that service takes (\d+) seconds to generate a response$/ do |time| - preprocessor = lambda { sleep time.to_i } - @handler.preprocessor = preprocessor -end - -Given /the response from the service has a Content-Type of '(.*)'/ do |content_type| - @handler.content_type = content_type -end - -Given /the response from the service has a body of '(.*)'/ do |response_body| - @handler.response_body = response_body -end - -Given /the url '(.*)' redirects to '(.*)'/ do |redirection_url, target_url| - @server.register redirection_url, new_mongrel_redirector(target_url) -end - -Given /that service is protected by Basic Authentication/ do - add_basic_authentication_to @handler -end - -Given /that service requires the username '(.*)' with the password '(.*)'/ do |username, password| - @handler.username = username - @handler.password = password -end - -Given /a restricted page at '(.*)'/ do |url| - Given "a remote service that returns 'A response I will never see'" - And "that service is accessed at the path '#{url}'" - And "that service is protected by Basic Authentication" - And "that service requires the username 'something' with the password 'secret'" -end - -# This joins the server thread, and halts cucumber, so you can actually hit the -# server with a browser. Runs until you kill it with Ctrl-c -Given /I want to hit this in a browser/ do - @server.acceptor.join -end diff --git a/vendor/httparty-0.5.0/features/supports_redirection.feature b/vendor/httparty-0.5.0/features/supports_redirection.feature deleted file mode 100644 index 1c1deefab..000000000 --- a/vendor/httparty-0.5.0/features/supports_redirection.feature +++ /dev/null @@ -1,22 +0,0 @@ -Feature: Supports Redirection - - As a developer - I want to work with services that may redirect me - And I want it to follow a reasonable number of redirects - Because sometimes web services do that - - Scenario: A service that redirects once - Given a remote service that returns 'Service Response' - And that service is accessed at the path '/service.html' - And the url '/redirector.html' redirects to '/service.html' - When I call HTTParty#get with '/redirector.html' - Then the return value should match 'Service Response' - - # TODO: Look in to why this actually fails... - Scenario: A service that redirects to a relative URL - - Scenario: A service that redirects infinitely - Given the url '/first.html' redirects to '/second.html' - And the url '/second.html' redirects to '/first.html' - When I call HTTParty#get with '/first.html' - Then it should raise an HTTParty::RedirectionTooDeep exception diff --git a/vendor/httparty-0.5.0/features/supports_timeout_option.feature b/vendor/httparty-0.5.0/features/supports_timeout_option.feature deleted file mode 100644 index aab5f5ba0..000000000 --- a/vendor/httparty-0.5.0/features/supports_timeout_option.feature +++ /dev/null @@ -1,12 +0,0 @@ -Feature: Supports the timeout option - In order to handle inappropriately slow response times - As a developer - I want my request to raise an exception after my specified timeout as elapsed - - Scenario: A long running response - Given a remote service that returns '

Some HTML

' - And that service is accessed at the path '/service.html' - And that service takes 2 seconds to generate a response - When I set my HTTParty timeout option to 1 - And I call HTTParty#get with '/service.html' - Then it should raise a Timeout::Error exception diff --git a/vendor/httparty-0.5.0/httparty.gemspec b/vendor/httparty-0.5.0/httparty.gemspec deleted file mode 100644 index c7c0ce368..000000000 --- a/vendor/httparty-0.5.0/httparty.gemspec +++ /dev/null @@ -1,127 +0,0 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = %q{httparty} - s.version = "0.5.0" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["John Nunemaker", "Sandro Turriate"] - s.date = %q{2009-12-07} - s.default_executable = %q{httparty} - s.description = %q{Makes http fun! Also, makes consuming restful web services dead easy.} - s.email = %q{nunemaker@gmail.com} - s.executables = ["httparty"] - s.extra_rdoc_files = [ - "README.rdoc" - ] - s.files = [ - ".gitignore", - "History", - "MIT-LICENSE", - "Manifest", - "README.rdoc", - "Rakefile", - "VERSION", - "bin/httparty", - "cucumber.yml", - "examples/aaws.rb", - "examples/basic.rb", - "examples/custom_parsers.rb", - "examples/delicious.rb", - "examples/google.rb", - "examples/rubyurl.rb", - "examples/twitter.rb", - "examples/whoismyrep.rb", - "features/basic_authentication.feature", - "features/command_line.feature", - "features/deals_with_http_error_codes.feature", - "features/handles_multiple_formats.feature", - "features/steps/env.rb", - "features/steps/httparty_response_steps.rb", - "features/steps/httparty_steps.rb", - "features/steps/mongrel_helper.rb", - "features/steps/remote_service_steps.rb", - "features/supports_redirection.feature", - "features/supports_timeout_option.feature", - "httparty.gemspec", - "lib/httparty.rb", - "lib/httparty/cookie_hash.rb", - "lib/httparty/core_extensions.rb", - "lib/httparty/exceptions.rb", - "lib/httparty/module_inheritable_attributes.rb", - "lib/httparty/parser.rb", - "lib/httparty/request.rb", - "lib/httparty/response.rb", - "lib/httparty/version.rb", - "spec/fixtures/delicious.xml", - "spec/fixtures/empty.xml", - "spec/fixtures/google.html", - "spec/fixtures/twitter.json", - "spec/fixtures/twitter.xml", - "spec/fixtures/undefined_method_add_node_for_nil.xml", - "spec/httparty/cookie_hash_spec.rb", - "spec/httparty/parser_spec.rb", - "spec/httparty/request_spec.rb", - "spec/httparty/response_spec.rb", - "spec/httparty_spec.rb", - "spec/spec.opts", - "spec/spec_helper.rb", - "website/css/common.css", - "website/index.html" - ] - s.homepage = %q{http://httparty.rubyforge.org} - s.post_install_message = %q{When you HTTParty, you must party hard!} - s.rdoc_options = ["--charset=UTF-8"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{httparty} - s.rubygems_version = %q{1.3.5} - s.summary = %q{Makes http fun! Also, makes consuming restful web services dead easy.} - s.test_files = [ - "spec/httparty/cookie_hash_spec.rb", - "spec/httparty/parser_spec.rb", - "spec/httparty/request_spec.rb", - "spec/httparty/response_spec.rb", - "spec/httparty_spec.rb", - "spec/spec_helper.rb", - "examples/aaws.rb", - "examples/basic.rb", - "examples/custom_parsers.rb", - "examples/delicious.rb", - "examples/google.rb", - "examples/rubyurl.rb", - "examples/twitter.rb", - "examples/whoismyrep.rb" - ] - - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 3 - - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, [">= 0.1.1"]) - s.add_development_dependency(%q, ["~> 2.3"]) - s.add_development_dependency(%q, ["~> 0.4"]) - s.add_development_dependency(%q, ["~> 1.2"]) - s.add_development_dependency(%q, ["~> 1.1"]) - s.add_development_dependency(%q, ["= 1.2.9"]) - else - s.add_dependency(%q, [">= 0.1.1"]) - s.add_dependency(%q, ["~> 2.3"]) - s.add_dependency(%q, ["~> 0.4"]) - s.add_dependency(%q, ["~> 1.2"]) - s.add_dependency(%q, ["~> 1.1"]) - s.add_dependency(%q, ["= 1.2.9"]) - end - else - s.add_dependency(%q, [">= 0.1.1"]) - s.add_dependency(%q, ["~> 2.3"]) - s.add_dependency(%q, ["~> 0.4"]) - s.add_dependency(%q, ["~> 1.2"]) - s.add_dependency(%q, ["~> 1.1"]) - s.add_dependency(%q, ["= 1.2.9"]) - end -end - diff --git a/vendor/httparty-0.5.0/lib/httparty.rb b/vendor/httparty-0.5.0/lib/httparty.rb deleted file mode 100644 index fe3cc5202..000000000 --- a/vendor/httparty-0.5.0/lib/httparty.rb +++ /dev/null @@ -1,263 +0,0 @@ -require 'pathname' -require 'net/http' -require 'net/https' -require 'rubygems' -gem 'crack', '>= 0.1.1' -require 'crack' - -dir = Pathname(__FILE__).dirname.expand_path - -require dir + 'httparty/module_inheritable_attributes' -require dir + 'httparty/cookie_hash' - -module HTTParty - module AllowedFormatsDeprecation - def const_missing(const) - if const.to_s =~ /AllowedFormats$/ - Kernel.warn("Deprecated: Use HTTParty::Parser::SupportedFormats") - HTTParty::Parser::SupportedFormats - else - super - end - end - end - - extend AllowedFormatsDeprecation - - def self.included(base) - base.extend ClassMethods - base.send :include, HTTParty::ModuleInheritableAttributes - base.send(:mattr_inheritable, :default_options) - base.send(:mattr_inheritable, :default_cookies) - base.instance_variable_set("@default_options", {}) - base.instance_variable_set("@default_cookies", CookieHash.new) - end - - module ClassMethods - extend AllowedFormatsDeprecation - - # Allows setting http proxy information to be used - # - # class Foo - # include HTTParty - # http_proxy 'http://foo.com', 80 - # end - def http_proxy(addr=nil, port = nil) - default_options[:http_proxyaddr] = addr - default_options[:http_proxyport] = port - end - - # Allows setting a base uri to be used for each request. - # Will normalize uri to include http, etc. - # - # class Foo - # include HTTParty - # base_uri 'twitter.com' - # end - def base_uri(uri=nil) - return default_options[:base_uri] unless uri - default_options[:base_uri] = HTTParty.normalize_base_uri(uri) - end - - # Allows setting basic authentication username and password. - # - # class Foo - # include HTTParty - # basic_auth 'username', 'password' - # end - def basic_auth(u, p) - default_options[:basic_auth] = {:username => u, :password => p} - end - - # Allows setting default parameters to be appended to each request. - # Great for api keys and such. - # - # class Foo - # include HTTParty - # default_params :api_key => 'secret', :another => 'foo' - # end - def default_params(h={}) - raise ArgumentError, 'Default params must be a hash' unless h.is_a?(Hash) - default_options[:default_params] ||= {} - default_options[:default_params].merge!(h) - end - - # Allows setting a base uri to be used for each request. - # - # class Foo - # include HTTParty - # headers 'Accept' => 'text/html' - # end - def headers(h={}) - raise ArgumentError, 'Headers must be a hash' unless h.is_a?(Hash) - default_options[:headers] ||= {} - default_options[:headers].merge!(h) - end - - def cookies(h={}) - raise ArgumentError, 'Cookies must be a hash' unless h.is_a?(Hash) - default_cookies.add_cookies(h) - end - - # Allows setting the format with which to parse. - # Must be one of the allowed formats ie: json, xml - # - # class Foo - # include HTTParty - # format :json - # end - def format(f = nil) - if f.nil? - default_options[:format] - else - parser(Parser) if parser.nil? - default_options[:format] = f - validate_format - end - end - - # Allows setting a PEM file to be used - # - # class Foo - # include HTTParty - # pem File.read('/home/user/my.pem') - # end - def pem(pem_contents) - default_options[:pem] = pem_contents - end - - # Allows setting a custom parser for the response. - # - # class Foo - # include HTTParty - # parser Proc.new {|data| ...} - # end - def parser(customer_parser = nil) - if customer_parser.nil? - default_options[:parser] - else - default_options[:parser] = customer_parser - validate_format - end - end - - # Allows making a get request to a url. - # - # class Foo - # include HTTParty - # end - # - # # Simple get with full url - # Foo.get('http://foo.com/resource.json') - # - # # Simple get with full url and query parameters - # # ie: http://foo.com/resource.json?limit=10 - # Foo.get('http://foo.com/resource.json', :query => {:limit => 10}) - def get(path, options={}) - perform_request Net::HTTP::Get, path, options - end - - # Allows making a post request to a url. - # - # class Foo - # include HTTParty - # end - # - # # Simple post with full url and setting the body - # Foo.post('http://foo.com/resources', :body => {:bar => 'baz'}) - # - # # Simple post with full url using :query option, - # # which gets set as form data on the request. - # Foo.post('http://foo.com/resources', :query => {:bar => 'baz'}) - def post(path, options={}) - perform_request Net::HTTP::Post, path, options - end - - def put(path, options={}) - perform_request Net::HTTP::Put, path, options - end - - def delete(path, options={}) - perform_request Net::HTTP::Delete, path, options - end - - def head(path, options={}) - perform_request Net::HTTP::Head, path, options - end - - def options(path, options={}) - perform_request Net::HTTP::Options, path, options - end - - def default_options #:nodoc: - @default_options - end - - private - - def perform_request(http_method, path, options) #:nodoc: - options = default_options.dup.merge(options) - process_cookies(options) - Request.new(http_method, path, options).perform - end - - def process_cookies(options) #:nodoc: - return unless options[:cookies] || default_cookies.any? - options[:headers] ||= headers.dup - options[:headers]["cookie"] = cookies.merge(options.delete(:cookies) || {}).to_cookie_string - end - - def validate_format - if format && parser.respond_to?(:supports_format?) && !parser.supports_format?(format) - raise UnsupportedFormat, "'#{format.inspect}' Must be one of: #{parser.supported_formats.map{|f| f.to_s}.sort.join(', ')}" - end - end - end - - def self.normalize_base_uri(url) #:nodoc: - normalized_url = url.dup - use_ssl = (normalized_url =~ /^https/) || normalized_url.include?(':443') - ends_with_slash = normalized_url =~ /\/$/ - - normalized_url.chop! if ends_with_slash - normalized_url.gsub!(/^https?:\/\//i, '') - - "http#{'s' if use_ssl}://#{normalized_url}" - end - - class Basement #:nodoc: - include HTTParty - end - - def self.get(*args) - Basement.get(*args) - end - - def self.post(*args) - Basement.post(*args) - end - - def self.put(*args) - Basement.put(*args) - end - - def self.delete(*args) - Basement.delete(*args) - end - - def self.head(*args) - Basement.head(*args) - end - - def self.options(*args) - Basement.options(*args) - end - -end - -require dir + 'httparty/core_extensions' -require dir + 'httparty/exceptions' -require dir + 'httparty/parser' -require dir + 'httparty/request' -require dir + 'httparty/response' - diff --git a/vendor/httparty-0.5.0/lib/httparty/cookie_hash.rb b/vendor/httparty-0.5.0/lib/httparty/cookie_hash.rb deleted file mode 100644 index 2a9dda184..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/cookie_hash.rb +++ /dev/null @@ -1,22 +0,0 @@ -class HTTParty::CookieHash < Hash #:nodoc: - - CLIENT_COOKIES = %w{path expires domain path secure HTTPOnly} - - def add_cookies(value) - case value - when Hash - merge!(value) - when String - value.split('; ').each do |cookie| - array = cookie.split('=') - self[array[0].to_sym] = array[1] - end - else - raise "add_cookies only takes a Hash or a String" - end - end - - def to_cookie_string - delete_if { |k, v| CLIENT_COOKIES.include?(k.to_s) }.collect { |k, v| "#{k}=#{v}" }.join("; ") - end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/core_extensions.rb b/vendor/httparty-0.5.0/lib/httparty/core_extensions.rb deleted file mode 100644 index 332fc412d..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/core_extensions.rb +++ /dev/null @@ -1,31 +0,0 @@ -module HTTParty - if defined?(::BasicObject) - BasicObject = ::BasicObject #:nodoc: - else - class BasicObject #:nodoc: - instance_methods.each { |m| undef_method m unless m =~ /^__|instance_eval/ } - end - end -end - -# 1.8.6 has mistyping of transitive in if statement -require "rexml/document" -module REXML #:nodoc: - class Document < Element #:nodoc: - def write( output=$stdout, indent=-1, transitive=false, ie_hack=false ) - if xml_decl.encoding != "UTF-8" && !output.kind_of?(Output) - output = Output.new( output, xml_decl.encoding ) - end - formatter = if indent > -1 - if transitive - REXML::Formatters::Transitive.new( indent, ie_hack ) - else - REXML::Formatters::Pretty.new( indent, ie_hack ) - end - else - REXML::Formatters::Default.new( ie_hack ) - end - formatter.write( self, output ) - end - end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/exceptions.rb b/vendor/httparty-0.5.0/lib/httparty/exceptions.rb deleted file mode 100644 index 88d082285..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/exceptions.rb +++ /dev/null @@ -1,10 +0,0 @@ -module HTTParty - # Exception raised when you attempt to set a non-existant format - class UnsupportedFormat < StandardError; end - - # Exception raised when using a URI scheme other than HTTP or HTTPS - class UnsupportedURIScheme < StandardError; end - - # Exception that is raised when request has redirected too many times - class RedirectionTooDeep < StandardError; end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/module_inheritable_attributes.rb b/vendor/httparty-0.5.0/lib/httparty/module_inheritable_attributes.rb deleted file mode 100644 index ebb4bb283..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/module_inheritable_attributes.rb +++ /dev/null @@ -1,25 +0,0 @@ -module HTTParty - module ModuleInheritableAttributes #:nodoc: - def self.included(base) - base.extend(ClassMethods) - end - - module ClassMethods #:nodoc: - def mattr_inheritable(*args) - @mattr_inheritable_attrs ||= [:mattr_inheritable_attrs] - @mattr_inheritable_attrs += args - args.each do |arg| - module_eval %(class << self; attr_accessor :#{arg} end) - end - @mattr_inheritable_attrs - end - - def inherited(subclass) - @mattr_inheritable_attrs.each do |inheritable_attribute| - instance_var = "@#{inheritable_attribute}" - subclass.instance_variable_set(instance_var, instance_variable_get(instance_var).clone) - end - end - end - end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/parser.rb b/vendor/httparty-0.5.0/lib/httparty/parser.rb deleted file mode 100644 index f0fc00d9e..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/parser.rb +++ /dev/null @@ -1,140 +0,0 @@ -module HTTParty - # The default parser used by HTTParty, supports xml, json, html, yaml, and - # plain text. - # - # == Custom Parsers - # - # If you'd like to do your own custom parsing, subclassing HTTParty::Parser - # will make that process much easier. There are a few different ways you can - # utilize HTTParty::Parser as a superclass. - # - # @example Intercept the parsing for all formats - # class SimpleParser < HTTParty::Parser - # def parse - # perform_parsing - # end - # end - # - # @example Add the atom format and parsing method to the default parser - # class AtomParsingIncluded < HTTParty::Parser - # SupportedFormats.merge!( - # {"application/atom+xml" => :atom} - # ) - # - # def atom - # perform_atom_parsing - # end - # end - # - # @example Only support the atom format - # class ParseOnlyAtom < HTTParty::Parser - # SupportedFormats = {"application/atom+xml" => :atom} - # - # def atom - # perform_atom_parsing - # end - # end - # - # @abstract Read the Custom Parsers section for more information. - class Parser - SupportedFormats = { - 'text/xml' => :xml, - 'application/xml' => :xml, - 'application/json' => :json, - 'text/json' => :json, - 'application/javascript' => :json, - 'text/javascript' => :json, - 'text/html' => :html, - 'application/x-yaml' => :yaml, - 'text/yaml' => :yaml, - 'text/plain' => :plain - } - - # The response body of the request - # @return [String] - attr_reader :body - - # The intended parsing format for the request - # @return [Symbol] e.g. :json - attr_reader :format - - # @param [String] body the response body - # @param [Symbol] format the response format - # @return parsed response - def self.call(body, format) - new(body, format).parse - end - - # @return [Hash] the SupportedFormats hash - def self.formats - const_get(:SupportedFormats) - end - - # @param [String] mimetype response MIME type - # @return [Symbol] - # @return [nil] mime type not supported - def self.format_from_mimetype(mimetype) - formats[formats.keys.detect {|k| mimetype.include?(k)}] - end - - # @return [Array] list of supported formats - def self.supported_formats - formats.values.uniq - end - - # @param [Symbol] format e.g. :json, :xml - # @return [Boolean] - def self.supports_format?(format) - supported_formats.include?(format) - end - - def initialize(body, format) - @body = body - @format = format - end - private_class_method :new - - # @return [Object] the parsed body - # @return [nil] when the response body is nil or an empty string - def parse - return nil if body.nil? || body.empty? - if supports_format? - parse_supported_format - else - body - end - end - - protected - - def xml - Crack::XML.parse(body) - end - - def json - Crack::JSON.parse(body) - end - - def yaml - YAML.load(body) - end - - def html - body - end - - def plain - body - end - - def supports_format? - self.class.supports_format?(format) - end - - def parse_supported_format - send(format) - rescue NoMethodError - raise NotImplementedError, "#{self.class.name} has not implemented a parsing method for the #{format.inspect} format." - end - end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/request.rb b/vendor/httparty-0.5.0/lib/httparty/request.rb deleted file mode 100644 index 790c802ed..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/request.rb +++ /dev/null @@ -1,181 +0,0 @@ -require 'uri' - -module HTTParty - class Request #:nodoc: - SupportedHTTPMethods = [ - Net::HTTP::Get, - Net::HTTP::Post, - Net::HTTP::Put, - Net::HTTP::Delete, - Net::HTTP::Head, - Net::HTTP::Options - ] - - SupportedURISchemes = [URI::HTTP, URI::HTTPS] - - attr_accessor :http_method, :path, :options - - def initialize(http_method, path, o={}) - self.http_method = http_method - self.path = path - self.options = { - :limit => o.delete(:no_follow) ? 0 : 5, - :default_params => {}, - :parser => Parser - }.merge(o) - end - - def path=(uri) - @path = URI.parse(uri) - end - - def uri - new_uri = path.relative? ? URI.parse("#{options[:base_uri]}#{path}") : path - - # avoid double query string on redirects [#12] - unless @redirect - new_uri.query = query_string(new_uri) - end - - unless SupportedURISchemes.include? new_uri.class - raise UnsupportedURIScheme, "'#{new_uri}' Must be HTTP or HTTPS" - end - - new_uri - end - - def format - options[:format] - end - - def parser - options[:parser] - end - - - def perform - validate - setup_raw_request - handle_response(get_response) - end - - private - - def http - http = Net::HTTP.new(uri.host, uri.port, options[:http_proxyaddr], options[:http_proxyport]) - http.use_ssl = ssl_implied? - - if options[:timeout] && options[:timeout].is_a?(Integer) - http.open_timeout = options[:timeout] - http.read_timeout = options[:timeout] - end - - if options[:pem] && http.use_ssl? - http.cert = OpenSSL::X509::Certificate.new(options[:pem]) - http.key = OpenSSL::PKey::RSA.new(options[:pem]) - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - else - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - - http - end - - def ssl_implied? - uri.port == 443 || uri.instance_of?(URI::HTTPS) - end - - def body - options[:body].is_a?(Hash) ? options[:body].to_params : options[:body] - end - - def username - options[:basic_auth][:username] - end - - def password - options[:basic_auth][:password] - end - - def setup_raw_request - @raw_request = http_method.new(uri.request_uri) - @raw_request.body = body if body - @raw_request.initialize_http_header(options[:headers]) - @raw_request.basic_auth(username, password) if options[:basic_auth] - end - - def perform_actual_request - http.request(@raw_request) - end - - def get_response - response = perform_actual_request - options[:format] ||= format_from_mimetype(response['content-type']) - response - end - - def query_string(uri) - query_string_parts = [] - query_string_parts << uri.query unless uri.query.nil? - - if options[:query].is_a?(Hash) - query_string_parts << options[:default_params].merge(options[:query]).to_params - else - query_string_parts << options[:default_params].to_params unless options[:default_params].nil? - query_string_parts << options[:query] unless options[:query].nil? - end - - query_string_parts.size > 0 ? query_string_parts.join('&') : nil - end - - # Raises exception Net::XXX (http error code) if an http error occured - def handle_response(response) - case response - when Net::HTTPRedirection - options[:limit] -= 1 - self.path = response['location'] - @redirect = true - self.http_method = Net::HTTP::Get - capture_cookies(response) - perform - else - Response.new(parse_response(response.body), response.body, response.code, response.message, response.to_hash) - end - end - - def parse_response(body) - parser.call(body, format) - end - - def capture_cookies(response) - return unless response['Set-Cookie'] - cookies_hash = HTTParty::CookieHash.new() - cookies_hash.add_cookies(options[:headers]['Cookie']) if options[:headers] && options[:headers]['Cookie'] - cookies_hash.add_cookies(response['Set-Cookie']) - options[:headers] ||= {} - options[:headers]['Cookie'] = cookies_hash.to_cookie_string - end - - # Uses the HTTP Content-Type header to determine the format of the - # response It compares the MIME type returned to the types stored in the - # SupportedFormats hash - def format_from_mimetype(mimetype) - if mimetype && parser.respond_to?(:format_from_mimetype) - parser.format_from_mimetype(mimetype) - end - end - - def validate - raise HTTParty::RedirectionTooDeep, 'HTTP redirects too deep' if options[:limit].to_i <= 0 - raise ArgumentError, 'only get, post, put, delete, head, and options methods are supported' unless SupportedHTTPMethods.include?(http_method) - raise ArgumentError, ':headers must be a hash' if options[:headers] && !options[:headers].is_a?(Hash) - raise ArgumentError, ':basic_auth must be a hash' if options[:basic_auth] && !options[:basic_auth].is_a?(Hash) - raise ArgumentError, ':query must be hash if using HTTP Post' if post? && !options[:query].nil? && !options[:query].is_a?(Hash) - end - - def post? - Net::HTTP::Post == http_method - end - end -end - diff --git a/vendor/httparty-0.5.0/lib/httparty/response.rb b/vendor/httparty-0.5.0/lib/httparty/response.rb deleted file mode 100644 index 519cfe63d..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/response.rb +++ /dev/null @@ -1,18 +0,0 @@ -module HTTParty - class Response < HTTParty::BasicObject #:nodoc: - attr_accessor :body, :code, :message, :headers - attr_reader :delegate - - def initialize(delegate, body, code, message, headers={}) - @delegate = delegate - @body = body - @code = code.to_i - @message = message - @headers = headers - end - - def method_missing(name, *args, &block) - @delegate.send(name, *args, &block) - end - end -end diff --git a/vendor/httparty-0.5.0/lib/httparty/version.rb b/vendor/httparty-0.5.0/lib/httparty/version.rb deleted file mode 100644 index 919c80f29..000000000 --- a/vendor/httparty-0.5.0/lib/httparty/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module HTTParty #:nodoc: - Version = '0.5.0' -end diff --git a/vendor/httparty-0.5.0/spec/fixtures/delicious.xml b/vendor/httparty-0.5.0/spec/fixtures/delicious.xml deleted file mode 100644 index f93a1eeb6..000000000 --- a/vendor/httparty-0.5.0/spec/fixtures/delicious.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/fixtures/empty.xml b/vendor/httparty-0.5.0/spec/fixtures/empty.xml deleted file mode 100644 index e69de29bb..000000000 diff --git a/vendor/httparty-0.5.0/spec/fixtures/google.html b/vendor/httparty-0.5.0/spec/fixtures/google.html deleted file mode 100644 index 1c4221d48..000000000 --- a/vendor/httparty-0.5.0/spec/fixtures/google.html +++ /dev/null @@ -1,3 +0,0 @@ -Google

Google

 
  Advanced Search
  Preferences
  Language Tools


Advertising Programs - Business Solutions - About Google

©2008 - Privacy

\ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/fixtures/twitter.json b/vendor/httparty-0.5.0/spec/fixtures/twitter.json deleted file mode 100644 index 642dd01ce..000000000 --- a/vendor/httparty-0.5.0/spec/fixtures/twitter.json +++ /dev/null @@ -1 +0,0 @@ -[{"user":{"followers_count":1,"description":null,"url":null,"profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Opera Plaza, California","screen_name":"Pyk","name":"Pyk","id":"7694602"},"text":"@lapilofu If you need a faster transfer, target disk mode should work too :)","truncated":false,"favorited":false,"in_reply_to_user_id":6128642,"created_at":"Sat Dec 06 21:29:14 +0000 2008","source":"twitterrific","in_reply_to_status_id":1042497164,"id":"1042500587"},{"user":{"followers_count":278,"description":"ã—ãŒãªã„プログラマ\/ã¨ã‚Šã‚ãˆãšå®®å­ã¯ä¿ºã®å«\u2026ã„ã‚„ã€å¨˜ã ï¼\/Delphi&Pythonプログラマ修行中\/bot製作ã«ãƒãƒžã‚Šã¤ã¤ã‚る。三ã¤ã»ã©è£½ä½œ&構想中\/[eof]","url":"http:\/\/logiq.orz.hm\/","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59588711\/l_ワ_l↑_normal.png","protected":false,"location":"ã²ã ã¾ã‚Šè˜202å·å®¤","screen_name":"feiz","name":"azkn3","id":"14310520"},"text":"@y_benjo ã¡ã‚‡ãƒ¼é…レスã§ã™ãŒãŸã ã®ã¯ã ã„ã‚ã™ãŽã‚‹ãƒ»ãƒ»ãƒ» ( ll ワ ll )","truncated":false,"favorited":false,"in_reply_to_user_id":8428752,"created_at":"Sat Dec 06 21:29:14 +0000 2008","source":"twit","in_reply_to_status_id":1042479758,"id":"1042500586"},{"user":{"followers_count":1233,"description":""to understand one life you must swallow the world." I run refine+focus: a marketing agency working w\/ brands, media and VCs. http:\/\/tinyurl.com\/63mrn","url":"http:\/\/www.quiverandquill.com","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53684650\/539059005_2a3b462d20_normal.jpg","protected":false,"location":"Cambridge, MA ","screen_name":"quiverandquill","name":"zach Braiker","id":"6845872"},"text":"@18percentgrey I didn't see Damon on Palin. i'll look on youtube. thx .Z","truncated":false,"favorited":false,"in_reply_to_user_id":10529932,"created_at":"Sat Dec 06 21:29:12 +0000 2008","source":"web","in_reply_to_status_id":1042499331,"id":"1042500584"},{"user":{"followers_count":780,"description":"Mein Blog ist unter http:\/\/blog.helmschrott.de zu finden. Unter http:\/\/blogalm.de kannst Du Deinen Blog eintragen!","url":"http:\/\/helmschrott.de\/blog","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/60997686\/avatar-250_normal.jpg","protected":false,"location":"Münchner Straße","screen_name":"helmi","name":"Frank Helmschrott","id":"867641"},"text":"@gigold auch mist oder?ich glaub ich fangs jetzt dann einfach mal an - wird schon vernünftige update-prozesse geben.","truncated":false,"favorited":false,"in_reply_to_user_id":959931,"created_at":"Sat Dec 06 21:29:11 +0000 2008","source":"twhirl","in_reply_to_status_id":1042500095,"id":"1042500583"},{"user":{"followers_count":63,"description":"Liberation from Misconceptions","url":"http:\/\/sexorcism.blogspot.com","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63897302\/having-sex-on-bed_normal.jpg","protected":false,"location":"USA","screen_name":"Sexorcism","name":"Sexorcism","id":"16929435"},"text":"@thursdays_child someecards might.","truncated":false,"favorited":false,"in_reply_to_user_id":14484963,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"twittergadget","in_reply_to_status_id":1042499777,"id":"1042500581"},{"user":{"followers_count":106,"description":"Researcher. Maître de Conférences - Sémiologue - Spécialiste des médias audiovisuels. Analyste des médias, de la télévision et de la presse people (gossip). ","url":"http:\/\/semioblog.over-blog.org\/","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/57988482\/Thomas_et_Vic_pour_promo_2_058_normal.JPG","protected":false,"location":"France","screen_name":"semioblog","name":"Virginie Spies","id":"10078802"},"text":"@richardvonstern on reparle de tout cela bientôt, si vous voulez vraiment m'aider","truncated":false,"favorited":false,"in_reply_to_user_id":15835317,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"twitterrific","in_reply_to_status_id":1042357537,"id":"1042500580"},{"user":{"followers_count":26,"description":"","url":"","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63461084\/November2ndpics_125_normal.jpg","protected":false,"location":"Louisville, Ky","screen_name":"scrapaunt","name":"scrapaunt","id":"16660671"},"text":"@NKOTB4LIFE Hope your neck feels better after your nap.","truncated":false,"favorited":false,"in_reply_to_user_id":16041403,"created_at":"Sat Dec 06 21:29:10 +0000 2008","source":"web","in_reply_to_status_id":1042450159,"id":"1042500579"},{"user":{"followers_count":245,"description":"Maui HI Real Estate Salesperson specializing in off the grid lifestyle","url":"http:\/\/www.eastmaui.com","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/59558480\/face2_normal.jpg","protected":false,"location":"north shore maui hawaii","screen_name":"mauihunter","name":"Georgina M. Hunter ","id":"16161708"},"text":"@BeeRealty http:\/\/twitpic.com\/qpog - It's a good safe place to lay - no dogs up there.","truncated":false,"favorited":false,"in_reply_to_user_id":15781063,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"twitpic","in_reply_to_status_id":1042497815,"id":"1042500578"},{"user":{"followers_count":95,"description":"","url":"","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66581657\/nose-pick_normal.jpg","protected":false,"location":"zoetermeer","screen_name":"GsKlukkluk","name":"Klukkluk","id":"14218588"},"text":"twit \/off zalige nacht!","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:14 +0000 2008","source":"web","in_reply_to_status_id":null,"id":"1042500577"},{"user":{"followers_count":33,"description":"Living in denial that I live in a podunk town, I spend my time in search of good music in LA. Pure city-dweller and puma. That's about it.","url":"","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56024131\/Photo_145_normal.jpg","protected":false,"location":"Santa Barbara, CA","screen_name":"pumainthemvmt","name":"Valerie","id":"15266837"},"text":"I love my parents with all my heart, but sometimes they make me want to scratch my eyes out.","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:10 +0000 2008","source":"sms","in_reply_to_status_id":null,"id":"1042500576"},{"user":{"followers_count":99,"description":"大学生ã§ã™ã‚ˆã€‚Ad[es]er。趣味ã§è¾­æ›¸ã¨ã‹ç·¨è¼¯ã—ã¦ã‚ã¾ã™ã€‚JavaScriptã§ã‚²ãƒ¼ãƒ æ›¸ããŸã„ã‘ã©æ™‚é–“ã­ãˆã€‚","url":"http:\/\/greengablez.net\/diary\/","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/60269370\/zonu_1_normal.gif","protected":false,"location":"Sapporo, Hokkaido, Japan","screen_name":"tadsan","name":"船越次男","id":"11637282"},"text":"リトル・プリンセスã¨ã ã‘書ã‹ã‚ŒãŸã‚‰å°å…¬å¥³ã‚’連想ã™ã‚‹ã ã‚ã€å¸¸è­˜çš„ã«è€ƒã¸ã¦ã€‚","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:11 +0000 2008","source":"tiitan","in_reply_to_status_id":null,"id":"1042500575"},{"user":{"followers_count":68,"description":"I love all things beer. What goes better with beer than Porn, nothig I tell ya nothing.","url":"","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66479069\/Picture_9_normal.jpg","protected":false,"location":"Durant","screen_name":"Jeffporn","name":"Jeffporn","id":"14065262"},"text":"At Lefthand having milk stout on cask - Photo: http:\/\/bkite.com\/02PeH","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:10 +0000 2008","source":"brightkite","in_reply_to_status_id":null,"id":"1042500574"},{"user":{"followers_count":7,"description":"","url":"http:\/\/www.PeteKinser.com","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/65572489\/PeteKinser-close_normal.jpg","protected":false,"location":"Denver, CO","screen_name":"pkinser","name":"pkinser","id":"15570525"},"text":"Snooze is where it's at for brunch if you're ever in Denver. Yum.","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:11 +0000 2008","source":"fring","in_reply_to_status_id":null,"id":"1042500572"},{"user":{"followers_count":75,"description":"I am a gamer and this is my gaming account, check out my other Twitter account for non-gaming tweets.","url":"http:\/\/twitter.com\/Nailhead","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56881055\/nailhead_184x184_normal.jpg","protected":false,"location":"Huntsville, AL","screen_name":"Nailhead_Gamer","name":"Eric Fullerton","id":"15487663"},"text":"Completed the epic quest line for the Death Knight. Now what? Outlands? I wish to skip Outlands please, thanks.","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"twitterfox","in_reply_to_status_id":null,"id":"1042500571"},{"user":{"followers_count":111,"description":"","url":"http:\/\/www.ns-tech.com\/blog\/geldred.nsf","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63865052\/brak2_normal.JPG","protected":false,"location":"Cleveland OH","screen_name":"geldred","name":"geldred","id":"14093394"},"text":"I'm at Target Store - Avon OH (35830 Detroit Rd, Avon, OH 44011, USA) - http:\/\/bkite.com\/02PeI","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"brightkite","in_reply_to_status_id":null,"id":"1042500570"},{"user":{"followers_count":16,"description":"Soundtrack Composer\/Musician\/Producer","url":"http:\/\/www.reverbnation\/musicbystratos","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/63311865\/logo-stratos_normal.png","protected":false,"location":"Grove City, Ohio 43123","screen_name":"Stratos","name":"Bryan K Borgman","id":"756062"},"text":"is reminded how beautiful the world can be when it's blanketed by clean white snow.","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"web","in_reply_to_status_id":null,"id":"1042500569"},{"user":{"followers_count":7,"description":null,"url":null,"profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":null,"screen_name":"garrettromine","name":"garrettromine","id":"16120885"},"text":"Go Julio","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:10 +0000 2008","source":"sms","in_reply_to_status_id":null,"id":"1042500568"},{"user":{"followers_count":111,"description":"WHAT IS HAPPNING IN THE WORLD??? SEE DIFFERENT NEWS STORIES FROM MANY SOURCES.","url":"http:\/\/henrynews.wetpaint.com","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/65118112\/2008-election-map-nytimes_normal.png","protected":false,"location":"","screen_name":"HenryNews","name":"HenryNews","id":"17398510"},"text":"Svindal completes double at Beaver Creek: Read full story for latest details. http:\/\/tinyurl.com\/6qugub","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"twitterfeed","in_reply_to_status_id":null,"id":"1042500567"},{"user":{"followers_count":34,"description":"I am a man of many bio's, scott bio's!","url":"http:\/\/flickr.com\/photos\/giantcandy","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/25680382\/Icon_for_Twitter_normal.jpg","protected":false,"location":"Loves Park, IL, USA","screen_name":"Pychobj2001","name":"William Boehm Jr","id":"809103"},"text":"I have a 3rd break light and the license plate lights are out...just replacing 1 plate light...abide by law just enough","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Sat Dec 06 21:29:10 +0000 2008","source":"twidroid","in_reply_to_status_id":null,"id":"1042500566"},{"user":{"followers_count":61,"description":"Wife. Designer. Green Enthusiast. New Homeowner. Pet Owner. Internet Addict.","url":"http:\/\/confessionsofadesignjunkie.blogspot.com\/","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66044439\/n27310459_33432814_6743-1_normal.jpg","protected":false,"location":"Indiana","screen_name":"smquaseb","name":"Stacy","id":"15530992"},"text":"@Indygardener We still had a few people shoveling in our neighborhood - I didn't think it was enough to shovel, but keeps the kids busy.","truncated":false,"favorited":false,"in_reply_to_user_id":12811482,"created_at":"Sat Dec 06 21:29:13 +0000 2008","source":"web","in_reply_to_status_id":1042488558,"id":"1042500565"}] \ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/fixtures/twitter.xml b/vendor/httparty-0.5.0/spec/fixtures/twitter.xml deleted file mode 100644 index 24abaa8e8..000000000 --- a/vendor/httparty-0.5.0/spec/fixtures/twitter.xml +++ /dev/null @@ -1,403 +0,0 @@ - - - Sun Dec 07 00:36:16 +0000 2008 - 1042729116 - @sebbo Outlook not so good - web - false - 1042716367 - 2989541 - false - - 17656026 - Magic 8 Bot - magic8bot - ask me a question - - http://s3.amazonaws.com/twitter_production/profile_images/65565851/8ball_large_normal.jpg - - false - 90 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729115 - Azdel Slade :friends from midian city http://bloghud.com/id/27312 - web - false - - - false - - 801094 - BlogHUD - bloghud - - - http://s3.amazonaws.com/twitter_production/profile_images/25235272/bloghud_twitter_normal.jpg - - false - 313 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729114 - Reading: "The Reckoning - Debt Watchdogs - Tamed or Caught Napping? - Series - NYTimes.com" ( http://tinyurl.com/5754s6 ) - twitthat - false - - - false - - 3512101 - bill - niubi - in beijing learning socialism 2 prepare 4 return 2 us - beijing - http://s3.amazonaws.com/twitter_production/profile_images/53292616/realtwitterers_normal.jpg - - false - 710 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729113 - Fianlly done and headed home! - sms - false - - - false - - 13186842 - Okthirddayfan - Okthirddayfan - - Oklahoma! - http://s3.amazonaws.com/twitter_production/profile_images/61414367/mecropped_normal.jpg - http://thirddaypix.blogspot.com/ - false - 68 - - - Sun Dec 07 00:36:16 +0000 2008 - 1042729112 - Adobe Flashplayer 10 and Debug versions: http://www.adobe.com/support/flashplayer/downloads.html - toro - false - - - false - - 15243380 - cbrueggenolte - cbrueggenolte - 27, Male, Mac Geek, Developer Java &amp; Flex &amp; Air - Aachen - http://s3.amazonaws.com/twitter_production/profile_images/55929263/214508011845f026bfd407c_normal.jpg - http://my.opera.com/carstenbrueggenolte - false - 16 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729111 - Done and done. - twitterrific - false - - - false - - 10978752 - Sergey Safonov - iron_Lung - I have my fingers in many pies. - Moscow - http://s3.amazonaws.com/twitter_production/profile_images/57841057/eat38_normal.gif - http://www.flickr.com/photos/iron_Lung - false - 11 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729110 - Veja a tabela de preços do Acquaplay da Tecnisa aqui:http://tinyurl.com/acquaplaypreco - web - false - - - false - - 13735402 - Tecnisa S.A - Tecnisa - Mais construtora por m2 - Faria Lima, 3144 - SP - http://s3.amazonaws.com/twitter_production/profile_images/56572222/logo_normal.jpg - http://www.tecnisa.com.br - false - 77 - - - Sun Dec 07 00:36:16 +0000 2008 - 1042729108 - devin harris has the flu. always have the memory of jordan scoring 50 on the knicks at the garden with the flu - web - false - - - false - - 17930773 - 24 Seconds to Shoot - NBA24sts - NBA handicapping insight and analysis. - las vegas - http://s3.amazonaws.com/twitter_production/profile_images/66593862/fresno_normal.jpg - - false - 1 - - - Sun Dec 07 00:36:16 +0000 2008 - 1042729105 - At Brandon and Shannon's holiday party.. - twitterberry - false - - - false - - 5388602 - Mike J. (Telligent) - mjamrst - Video Game Account Manager - Palo Alto, CA - http://s3.amazonaws.com/twitter_production/profile_images/66375174/Thanksgiving_11272008-048_normal.jpg - http://www.telligent.com - false - 225 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729104 - Xinhua: Forty percent of Australian PM office' staff quit : CANBERRA, Dec. 7 (Xinhua) -- Only.. http://tinyurl.com/5gwotd - twitterfeed - false - - - false - - 11566502 - Headline News - headlinenews - - - http://s3.amazonaws.com/twitter_production/profile_images/41784602/1890_wires_normal.jpg - - false - 575 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729101 - @hilarycassman soo funnny - sms - false - 1042725825 - 17644455 - false - - 17887548 - katieballss - katieballss - - - http://s3.amazonaws.com/twitter_production/profile_images/66523737/th_Photo87_normal.jpg - http://www.myspace.com/xxpeachxx101 - false - 23 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729100 - d'ora in poi, oltre al ferragosto, odiera' anche il natale e tutto il mese che ci gira intorno.. =.='' - mobile - false - - - false - - 9719482 - trotto - trotto - sociologo di formazione... uno dei tanti attivisti! :) - Fano - Italy - http://s3.amazonaws.com/twitter_production/profile_images/55603933/mybob-calimetux-1526_normal.png - http://trotto1308.netsons.org/wordpress/ - false - 98 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729099 - Came across an ad on another site with a redneck looking santa... said "Bust Santa's zit and win a free ipod." Umm... disturbing much? - web - false - - - false - - 9937182 - froggybluesock - froggybluesock - - Indiana - http://s3.amazonaws.com/twitter_production/profile_images/35393032/about_me_normal.jpg - http://www.footprintsonthemoon.com - false - 82 - - - Sun Dec 07 00:36:17 +0000 2008 - 1042729098 - nothing - web - false - - - false - - 17932339 - treblehook - treblehook - - - http://static.twitter.com/images/default_profile_normal.png - - false - 0 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729095 - Setting up my new Windows Live profile - web - false - - - false - - 17906075 - Mark_Layton - Mark_Layton - - - http://static.twitter.com/images/default_profile_normal.png - - false - 2 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729092 - me voy a sobar, a ver si mañana estoy mejor, wenas noches a tod@s - web - false - - - false - - 14062655 - tmaniak - tmaniak - - - http://s3.amazonaws.com/twitter_production/profile_images/51680481/BF-109_normal.jpg - http://dhost.info/tmaniak - false - 10 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729090 - ãƒã‚¤ãƒˆå»¶é•·æˆ¦å…¥ã‚Šã¾ã—ãŸãƒ¼ 店長ãŒé…刻ã£ã¦ã©ã†ãªã‚“ã ã€‚ã—ã‹ã‚‚何回も - natsuliphone - false - - - false - - 15618846 - kabayaki - kabayaki - FPS(L4Dã€TF2ã€CS:Sã€BF)ã€TPSã€RCGã€ãƒžãƒ³ã‚¬ã€ã‚¢ãƒ‹ãƒ¡ã€ãƒ‡ã‚¸ãƒ¢ãƒŽãŒå¥½ããªã¨ã‚る学生 - tokyo - http://s3.amazonaws.com/twitter_production/profile_images/57305902/184_normal.jpg - http://kabayakiya.blog43.fc2.com/ - false - 20 - - - Sun Dec 07 00:36:13 +0000 2008 - 1042729089 - just drove to southern california and joy of children hugging grandparents made it all worthwhile. heading to imedia in la quinta tomorrow. - web - false - - - false - - 1630261 - mark silva - marksilva - digital media http://realbranding.com Principal, Managing Director - often san francisco - http://s3.amazonaws.com/twitter_production/profile_images/29807902/silvasimpson3th_normal.jpg - http://marksilva.com - false - 497 - - - Sun Dec 07 00:36:14 +0000 2008 - 1042729088 - @wholefoods would love to have a juicebar in one of your cambridge or boston locations - web - false - 1041125103 - 15131310 - false - - 15856582 - Maura McGovern - mmcgovern - photographer with a day job in venture capital; obsessed with design blogs, long walks, yoga, social networking, people watching. tea and music are essential! - Boston - http://s3.amazonaws.com/twitter_production/profile_images/66110383/DSCN1740_normal.JPG - http://lefteyephotography.blogspot.com - false - 244 - - - Sun Dec 07 00:36:15 +0000 2008 - 1042729087 - Going over the Advent lists. - web - false - - - false - - 17122107 - gsusan - gsusan - US American writer/sister/daughter/aunt/woman from New England living in SoCal. - San Diego, CA USA - http://s3.amazonaws.com/twitter_production/profile_images/63951854/susan_ocracoke_normal.jpg - - false - 6 - - - \ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/fixtures/undefined_method_add_node_for_nil.xml b/vendor/httparty-0.5.0/spec/fixtures/undefined_method_add_node_for_nil.xml deleted file mode 100644 index 43d96a7da..000000000 --- a/vendor/httparty-0.5.0/spec/fixtures/undefined_method_add_node_for_nil.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/httparty/cookie_hash_spec.rb b/vendor/httparty-0.5.0/spec/httparty/cookie_hash_spec.rb deleted file mode 100644 index 570802082..000000000 --- a/vendor/httparty-0.5.0/spec/httparty/cookie_hash_spec.rb +++ /dev/null @@ -1,71 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper')) - -describe HTTParty::CookieHash do - before(:each) do - @cookie_hash = HTTParty::CookieHash.new - end - - describe "#add_cookies" do - - describe "with a hash" do - it "should add new key/value pairs to the hash" do - @cookie_hash.add_cookies(:foo => "bar") - @cookie_hash.add_cookies(:rofl => "copter") - @cookie_hash.length.should eql(2) - end - - it "should overwrite any existing key" do - @cookie_hash.add_cookies(:foo => "bar") - @cookie_hash.add_cookies(:foo => "copter") - @cookie_hash.length.should eql(1) - @cookie_hash[:foo].should eql("copter") - end - end - - describe "with a string" do - it "should add new key/value pairs to the hash" do - @cookie_hash.add_cookies("first=one; second=two; third") - @cookie_hash[:first].should == 'one' - @cookie_hash[:second].should == 'two' - @cookie_hash[:third].should == nil - end - - it "should overwrite any existing key" do - @cookie_hash[:foo] = 'bar' - @cookie_hash.add_cookies("foo=tar") - @cookie_hash.length.should eql(1) - @cookie_hash[:foo].should eql("tar") - end - end - - describe 'with other class' do - it "should error" do - lambda { - @cookie_hash.add_cookies(Array.new) - }.should raise_error - end - end - end - - # The regexen are required because Hashes aren't ordered, so a test against - # a hardcoded string was randomly failing. - describe "#to_cookie_string" do - before(:each) do - @cookie_hash.add_cookies(:foo => "bar") - @cookie_hash.add_cookies(:rofl => "copter") - @s = @cookie_hash.to_cookie_string - end - - it "should format the key/value pairs, delimited by semi-colons" do - @s.should match(/foo=bar/) - @s.should match(/rofl=copter/) - @s.should match(/^\w+=\w+; \w+=\w+$/) - end - - it "should not include client side only cookies" do - @cookie_hash.add_cookies(:path => "/") - @s = @cookie_hash.to_cookie_string - @s.should_not match(/path=\//) - end - end -end diff --git a/vendor/httparty-0.5.0/spec/httparty/parser_spec.rb b/vendor/httparty-0.5.0/spec/httparty/parser_spec.rb deleted file mode 100644 index 0daea3f7f..000000000 --- a/vendor/httparty-0.5.0/spec/httparty/parser_spec.rb +++ /dev/null @@ -1,154 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) - -class CustomParser < HTTParty::Parser; end - -describe HTTParty::Parser do - describe ".SupportedFormats" do - it "returns a hash" do - HTTParty::Parser::SupportedFormats.should be_instance_of(Hash) - end - end - - describe ".call" do - it "generates an HTTParty::Parser instance with the given body and format" do - HTTParty::Parser.should_receive(:new).with('body', :plain).and_return(stub(:parse => nil)) - HTTParty::Parser.call('body', :plain) - end - - it "calls #parse on the parser" do - parser = mock('Parser') - parser.should_receive(:parse) - HTTParty::Parser.stub(:new => parser) - parser = HTTParty::Parser.call('body', :plain) - end - end - - describe ".formats" do - it "returns the SupportedFormats constant" do - HTTParty::Parser.formats.should == HTTParty::Parser::SupportedFormats - end - - it "returns the SupportedFormats constant for subclasses" do - class MyParser < HTTParty::Parser - SupportedFormats = {"application/atom+xml" => :atom} - end - MyParser.formats.should == {"application/atom+xml" => :atom} - end - end - - describe ".format_from_mimetype" do - it "returns a symbol representing the format mimetype" do - HTTParty::Parser.format_from_mimetype("text/plain").should == :plain - end - - it "returns nil when the mimetype is not supported" do - HTTParty::Parser.format_from_mimetype("application/atom+xml").should be_nil - end - end - - describe ".supported_formats" do - it "returns a unique set of supported formats represented by symbols" do - HTTParty::Parser.supported_formats.should == HTTParty::Parser::SupportedFormats.values.uniq - end - end - - describe ".supports_format?" do - it "returns true for a supported format" do - HTTParty::Parser.stub(:supported_formats => [:json]) - HTTParty::Parser.supports_format?(:json).should be_true - end - - it "returns false for an unsupported format" do - HTTParty::Parser.stub(:supported_formats => []) - HTTParty::Parser.supports_format?(:json).should be_false - end - end - - describe "#parse" do - before do - @parser = HTTParty::Parser.new('body', :json) - end - - it "attempts to parse supported formats" do - @parser.stub(:supports_format? => true) - @parser.should_receive(:parse_supported_format) - @parser.parse - end - - it "returns the unparsed body when the format is unsupported" do - @parser.stub(:supports_format? => false) - @parser.parse.should == @parser.body - end - - it "returns nil for an empty body" do - @parser.stub(:body => '') - @parser.parse.should be_nil - end - - it "returns nil for a nil body" do - @parser.stub(:body => nil) - @parser.parse.should be_nil - end - end - - describe "#supports_format?" do - it "utilizes the class method to determine if the format is supported" do - HTTParty::Parser.should_receive(:supports_format?).with(:json) - parser = HTTParty::Parser.new('body', :json) - parser.send(:supports_format?) - end - end - - describe "#parse_supported_format" do - it "calls the parser for the given format" do - parser = HTTParty::Parser.new('body', :json) - parser.should_receive(:json) - parser.send(:parse_supported_format) - end - - context "when a parsing method does not exist for the given format" do - it "raises an exception" do - parser = HTTParty::Parser.new('body', :atom) - expect do - parser.send(:parse_supported_format) - end.to raise_error(NotImplementedError, "HTTParty::Parser has not implemented a parsing method for the :atom format.") - end - - it "raises a useful exception message for subclasses" do - parser = CustomParser.new('body', :atom) - expect do - parser.send(:parse_supported_format) - end.to raise_error(NotImplementedError, "CustomParser has not implemented a parsing method for the :atom format.") - end - end - end - - context "parsers" do - subject do - HTTParty::Parser.new('body', nil) - end - - it "parses xml with Crack" do - Crack::XML.should_receive(:parse).with('body') - subject.send(:xml) - end - - it "parses json with Crack" do - Crack::JSON.should_receive(:parse).with('body') - subject.send(:json) - end - - it "parses yaml" do - YAML.should_receive(:load).with('body') - subject.send(:yaml) - end - - it "parses html by simply returning the body" do - subject.send(:html).should == 'body' - end - - it "parses plain text by simply returning the body" do - subject.send(:plain).should == 'body' - end - end -end diff --git a/vendor/httparty-0.5.0/spec/httparty/request_spec.rb b/vendor/httparty-0.5.0/spec/httparty/request_spec.rb deleted file mode 100644 index 155f8baf8..000000000 --- a/vendor/httparty-0.5.0/spec/httparty/request_spec.rb +++ /dev/null @@ -1,335 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) - -describe HTTParty::Request do - def stub_response(body, code = 200) - unless @http - @http = Net::HTTP.new('localhost', 80) - @request.stub!(:http).and_return(@http) - @request.stub!(:uri).and_return(URI.parse("http://foo.com/foobar")) - end - - response = Net::HTTPResponse::CODE_TO_OBJ[code.to_s].new("1.1", code, body) - response.stub!(:body).and_return(body) - - @http.stub!(:request).and_return(response) - response - end - - before do - @request = HTTParty::Request.new(Net::HTTP::Get, 'http://api.foo.com/v1', :format => :xml) - end - - describe "initialization" do - it "sets parser to HTTParty::Parser" do - request = HTTParty::Request.new(Net::HTTP::Get, 'http://google.com') - request.parser.should == HTTParty::Parser - end - - it "sets parser to the optional parser" do - my_parser = lambda {} - request = HTTParty::Request.new(Net::HTTP::Get, 'http://google.com', :parser => my_parser) - request.parser.should == my_parser - end - end - - describe "#format" do - it "should return the correct parsing format" do - @request.format.should == :xml - end - end - - describe 'http' do - it "should use ssl for port 443" do - request = HTTParty::Request.new(Net::HTTP::Get, 'https://api.foo.com/v1:443') - request.send(:http).use_ssl?.should == true - end - - it 'should not use ssl for port 80' do - request = HTTParty::Request.new(Net::HTTP::Get, 'http://foobar.com') - request.send(:http).use_ssl?.should == false - end - - it "uses ssl for https scheme with default port" do - request = HTTParty::Request.new(Net::HTTP::Get, 'https://foobar.com') - request.send(:http).use_ssl?.should == true - end - - it "uses ssl for https scheme regardless of port" do - request = HTTParty::Request.new(Net::HTTP::Get, 'https://foobar.com:123456') - request.send(:http).use_ssl?.should == true - end - - context "PEM certificates" do - before do - OpenSSL::X509::Certificate.stub(:new) - OpenSSL::PKey::RSA.stub(:new) - end - - context "when scheme is https" do - before do - @request.stub!(:uri).and_return(URI.parse("https://google.com")) - pem = :pem_contents - @cert = mock("OpenSSL::X509::Certificate") - @key = mock("OpenSSL::PKey::RSA") - OpenSSL::X509::Certificate.should_receive(:new).with(pem).and_return(@cert) - OpenSSL::PKey::RSA.should_receive(:new).with(pem).and_return(@key) - - @request.options[:pem] = pem - @pem_http = @request.send(:http) - end - - it "should use a PEM certificate when provided" do - @pem_http.cert.should == @cert - @pem_http.key.should == @key - end - - it "should verify the certificate when provided" do - @pem_http = @request.send(:http) - @pem_http.verify_mode.should == OpenSSL::SSL::VERIFY_PEER - end - end - - context "when scheme is not https" do - it "does not assign a PEM" do - http = Net::HTTP.new('google.com') - http.should_not_receive(:cert=) - http.should_not_receive(:key=) - Net::HTTP.stub(:new => http) - - request = HTTParty::Request.new(Net::HTTP::Get, 'http://google.com') - request.options[:pem] = :pem_contents - request.send(:http) - end - - it "should not verify a certificate if scheme is not https" do - http = Net::HTTP.new('google.com') - Net::HTTP.stub(:new => http) - - request = HTTParty::Request.new(Net::HTTP::Get, 'http://google.com') - request.options[:pem] = :pem_contents - http = request.send(:http) - http.verify_mode.should == OpenSSL::SSL::VERIFY_NONE - end - end - end - - it "should use basic auth when configured" do - @request.options[:basic_auth] = {:username => 'foobar', :password => 'secret'} - @request.send(:setup_raw_request) - @request.instance_variable_get(:@raw_request)['authorization'].should_not be_nil - end - - context "when setting timeout" do - it "does nothing if the timeout option is a string" do - http = mock("http", :null_object => true) - http.should_not_receive(:open_timeout=) - http.should_not_receive(:read_timeout=) - Net::HTTP.stub(:new => http) - - request = HTTParty::Request.new(Net::HTTP::Get, 'https://foobar.com', {:timeout => "five seconds"}) - request.send(:http) - end - - it "sets the timeout to 5 seconds" do - @request.options[:timeout] = 5 - @request.send(:http).open_timeout.should == 5 - @request.send(:http).read_timeout.should == 5 - end - end - end - - describe '#format_from_mimetype' do - it 'should handle text/xml' do - ["text/xml", "text/xml; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :xml - end - end - - it 'should handle application/xml' do - ["application/xml", "application/xml; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :xml - end - end - - it 'should handle text/json' do - ["text/json", "text/json; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :json - end - end - - it 'should handle application/json' do - ["application/json", "application/json; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :json - end - end - - it 'should handle text/javascript' do - ["text/javascript", "text/javascript; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :json - end - end - - it 'should handle application/javascript' do - ["application/javascript", "application/javascript; charset=iso8859-1"].each do |ct| - @request.send(:format_from_mimetype, ct).should == :json - end - end - - it "returns nil for an unrecognized mimetype" do - @request.send(:format_from_mimetype, "application/atom+xml").should be_nil - end - - it "returns nil when using a default parser" do - @request.options[:parser] = lambda {} - @request.send(:format_from_mimetype, "text/json").should be_nil - end - end - - describe 'parsing responses' do - it 'should handle xml automatically' do - xml = %q[1234Foo Bar!] - @request.options[:format] = :xml - @request.send(:parse_response, xml).should == {'books' => {'book' => {'id' => '1234', 'name' => 'Foo Bar!'}}} - end - - it 'should handle json automatically' do - json = %q[{"books": {"book": {"name": "Foo Bar!", "id": "1234"}}}] - @request.options[:format] = :json - @request.send(:parse_response, json).should == {'books' => {'book' => {'id' => '1234', 'name' => 'Foo Bar!'}}} - end - - it 'should handle yaml automatically' do - yaml = "books: \n book: \n name: Foo Bar!\n id: \"1234\"\n" - @request.options[:format] = :yaml - @request.send(:parse_response, yaml).should == {'books' => {'book' => {'id' => '1234', 'name' => 'Foo Bar!'}}} - end - - it "should include any HTTP headers in the returned response" do - @request.options[:format] = :html - response = stub_response "Content" - response.initialize_http_header("key" => "value") - - @request.perform.headers.should == { "key" => ["value"] } - end - - describe 'with non-200 responses' do - it 'should return a valid object for 4xx response' do - stub_response 'yes', 401 - resp = @request.perform - resp.code.should == 401 - resp.body.should == "yes" - resp['foo']['bar'].should == "yes" - end - - it 'should return a valid object for 5xx response' do - stub_response 'error', 500 - resp = @request.perform - resp.code.should == 500 - resp.body.should == "error" - resp['foo']['bar'].should == "error" - end - end - end - - it "should not attempt to parse empty responses" do - stub_response "", 204 - - @request.options[:format] = :xml - @request.perform.should be_nil - end - - it "should not fail for missing mime type" do - stub_response "Content for you" - @request.options[:format] = :html - @request.perform.should == 'Content for you' - end - - describe "a request that redirects" do - before(:each) do - @redirect = stub_response("", 302) - @redirect['location'] = '/foo' - - @ok = stub_response('bar', 200) - end - - describe "once" do - before(:each) do - @http.stub!(:request).and_return(@redirect, @ok) - end - - it "should be handled by GET transparently" do - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should be handled by POST transparently" do - @request.http_method = Net::HTTP::Post - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should be handled by DELETE transparently" do - @request.http_method = Net::HTTP::Delete - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should be handled by PUT transparently" do - @request.http_method = Net::HTTP::Put - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should be handled by HEAD transparently" do - @request.http_method = Net::HTTP::Head - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should be handled by OPTIONS transparently" do - @request.http_method = Net::HTTP::Options - @request.perform.should == {"hash" => {"foo" => "bar"}} - end - - it "should keep track of cookies between redirects" do - @redirect['Set-Cookie'] = 'foo=bar; name=value; HTTPOnly' - @request.perform - @request.options[:headers]['Cookie'].should match(/foo=bar/) - @request.options[:headers]['Cookie'].should match(/name=value/) - end - - it 'should update cookies with rediects' do - @request.options[:headers] = {'Cookie'=> 'foo=bar;'} - @redirect['Set-Cookie'] = 'foo=tar;' - @request.perform - @request.options[:headers]['Cookie'].should match(/foo=tar/) - end - - it 'should keep cookies between rediects' do - @request.options[:headers] = {'Cookie'=> 'keep=me'} - @redirect['Set-Cookie'] = 'foo=tar;' - @request.perform - @request.options[:headers]['Cookie'].should match(/keep=me/) - end - - it 'should make resulting request a get request if it not already' do - @request.http_method = Net::HTTP::Delete - @request.perform.should == {"hash" => {"foo" => "bar"}} - @request.http_method.should == Net::HTTP::Get - end - end - - describe "infinitely" do - before(:each) do - @http.stub!(:request).and_return(@redirect) - end - - it "should raise an exception" do - lambda { @request.perform }.should raise_error(HTTParty::RedirectionTooDeep) - end - end - end -end - -describe HTTParty::Request, "with POST http method" do - it "should raise argument error if query is not a hash" do - lambda { - HTTParty::Request.new(Net::HTTP::Post, 'http://api.foo.com/v1', :format => :xml, :query => 'astring').perform - }.should raise_error(ArgumentError) - end -end diff --git a/vendor/httparty-0.5.0/spec/httparty/response_spec.rb b/vendor/httparty-0.5.0/spec/httparty/response_spec.rb deleted file mode 100644 index bb52edef8..000000000 --- a/vendor/httparty-0.5.0/spec/httparty/response_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), '..', 'spec_helper')) - -describe HTTParty::Response do - describe "initialization" do - before do - @response_object = {'foo' => 'bar'} - @body = "{foo:'bar'}" - @code = '200' - @message = 'OK' - @response = HTTParty::Response.new(@response_object, @body, @code, @message) - end - - it "should set delegate" do - @response.delegate.should == @response_object - end - - it "should set body" do - @response.body.should == @body - end - - it "should set code" do - @response.code.should.to_s == @code - end - - it "should set code as a Fixnum" do - @response.code.should be_an_instance_of(Fixnum) - end - - it "should set body" do - @response.body.should == @body - end - end - - it "should be able to set headers during initialization" do - response = HTTParty::Response.new({'foo' => 'bar'}, "{foo:'bar'}", 200, 'OK', {'foo' => 'bar'}) - response.headers.should == {'foo' => 'bar'} - end - - it "should send missing methods to delegate" do - response = HTTParty::Response.new({'foo' => 'bar'}, "{foo:'bar'}", 200, 'OK') - response['foo'].should == 'bar' - end - - it "should be able to iterate delegate if it is array" do - response = HTTParty::Response.new([{'foo' => 'bar'}, {'foo' => 'baz'}], "[{foo:'bar'}, {foo:'baz'}]", 200, 'OK') - response.size.should == 2 - lambda { - response.each { |item| } - }.should_not raise_error - end - - xit "should allow hashes to be accessed with dot notation" do - response = HTTParty::Response.new({'foo' => 'bar'}, "{foo:'bar'}", 200, 'OK') - response.foo.should == 'bar' - end - - xit "should allow nested hashes to be accessed with dot notation" do - response = HTTParty::Response.new({'foo' => {'bar' => 'baz'}}, "{foo: {bar:'baz'}}", 200, 'OK') - response.foo.should == {'bar' => 'baz'} - response.foo.bar.should == 'baz' - end -end \ No newline at end of file diff --git a/vendor/httparty-0.5.0/spec/httparty_spec.rb b/vendor/httparty-0.5.0/spec/httparty_spec.rb deleted file mode 100644 index ef37179a0..000000000 --- a/vendor/httparty-0.5.0/spec/httparty_spec.rb +++ /dev/null @@ -1,454 +0,0 @@ -require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper')) - -class CustomParser - def self.parse(body) - return {:sexy => true} - end -end - -describe HTTParty do - before(:each) do - @klass = Class.new - @klass.instance_eval { include HTTParty } - end - - describe "AllowedFormats deprecated" do - before do - Kernel.stub(:warn) - end - it "warns with a deprecation message" do - Kernel.should_receive(:warn).with("Deprecated: Use HTTParty::Parser::SupportedFormats") - HTTParty::AllowedFormats - end - - it "returns HTTPart::Parser::SupportedFormats" do - HTTParty::AllowedFormats.should == HTTParty::Parser::SupportedFormats - end - end - - describe "base uri" do - before(:each) do - @klass.base_uri('api.foo.com/v1') - end - - it "should have reader" do - @klass.base_uri.should == 'http://api.foo.com/v1' - end - - it 'should have writer' do - @klass.base_uri('http://api.foobar.com') - @klass.base_uri.should == 'http://api.foobar.com' - end - - it 'should not modify the parameter during assignment' do - uri = 'http://api.foobar.com' - @klass.base_uri(uri) - uri.should == 'http://api.foobar.com' - end - end - - describe "#normalize_base_uri" do - it "should add http if not present for non ssl requests" do - uri = HTTParty.normalize_base_uri('api.foobar.com') - uri.should == 'http://api.foobar.com' - end - - it "should add https if not present for ssl requests" do - uri = HTTParty.normalize_base_uri('api.foo.com/v1:443') - uri.should == 'https://api.foo.com/v1:443' - end - - it "should not remove https for ssl requests" do - uri = HTTParty.normalize_base_uri('https://api.foo.com/v1:443') - uri.should == 'https://api.foo.com/v1:443' - end - - it 'should not modify the parameter' do - uri = 'http://api.foobar.com' - HTTParty.normalize_base_uri(uri) - uri.should == 'http://api.foobar.com' - end - end - - describe "headers" do - def expect_headers(header={}) - HTTParty::Request.should_receive(:new) \ - .with(anything, anything, hash_including({ :headers => header })) \ - .and_return(mock("mock response", :perform => nil)) - end - - it "should default to empty hash" do - @klass.headers.should == {} - end - - it "should be able to be updated" do - init_headers = {:foo => 'bar', :baz => 'spax'} - @klass.headers init_headers - @klass.headers.should == init_headers - end - - it "uses the class headers when sending a request" do - expect_headers(:foo => 'bar') - @klass.headers(:foo => 'bar') - @klass.get('') - end - - it "overwrites class headers when passing in headers" do - expect_headers(:baz => 'spax') - @klass.headers(:foo => 'bar') - @klass.get('', :headers => {:baz => 'spax'}) - end - - context "with cookies" do - it 'utilizes the class-level cookies' do - expect_headers(:foo => 'bar', 'cookie' => 'type=snickerdoodle') - @klass.headers(:foo => 'bar') - @klass.cookies(:type => 'snickerdoodle') - @klass.get('') - end - - it 'adds cookies to the headers' do - expect_headers(:foo => 'bar', 'cookie' => 'type=snickerdoodle') - @klass.headers(:foo => 'bar') - @klass.get('', :cookies => {:type => 'snickerdoodle'}) - end - - it 'adds optional cookies to the optional headers' do - expect_headers(:baz => 'spax', 'cookie' => 'type=snickerdoodle') - @klass.get('', :cookies => {:type => 'snickerdoodle'}, :headers => {:baz => 'spax'}) - end - end - end - - describe "cookies" do - def expect_cookie_header(s) - HTTParty::Request.should_receive(:new) \ - .with(anything, anything, hash_including({ :headers => { "cookie" => s } })) \ - .and_return(mock("mock response", :perform => nil)) - end - - it "should not be in the headers by default" do - HTTParty::Request.stub!(:new).and_return(stub(nil, :perform => nil)) - @klass.get("") - @klass.headers.keys.should_not include("cookie") - end - - it "should raise an ArgumentError if passed a non-Hash" do - lambda do - @klass.cookies("nonsense") - end.should raise_error(ArgumentError) - end - - it "should allow a cookie to be specified with a one-off request" do - expect_cookie_header "type=snickerdoodle" - @klass.get("", :cookies => { :type => "snickerdoodle" }) - end - - describe "when a cookie is set at the class level" do - before(:each) do - @klass.cookies({ :type => "snickerdoodle" }) - end - - it "should include that cookie in the request" do - expect_cookie_header "type=snickerdoodle" - @klass.get("") - end - - it "should pass the proper cookies when requested multiple times" do - 2.times do - expect_cookie_header "type=snickerdoodle" - @klass.get("") - end - end - - it "should allow the class defaults to be overridden" do - expect_cookie_header "type=chocolate_chip" - - @klass.get("", :cookies => { :type => "chocolate_chip" }) - end - end - - describe "in a class with multiple methods that use different cookies" do - before(:each) do - @klass.instance_eval do - def first_method - get("first_method", :cookies => { :first_method_cookie => "foo" }) - end - - def second_method - get("second_method", :cookies => { :second_method_cookie => "foo" }) - end - end - end - - it "should not allow cookies used in one method to carry over into other methods" do - expect_cookie_header "first_method_cookie=foo" - @klass.first_method - - expect_cookie_header "second_method_cookie=foo" - @klass.second_method - end - end - end - - describe "default params" do - it "should default to empty hash" do - @klass.default_params.should == {} - end - - it "should be able to be updated" do - new_defaults = {:foo => 'bar', :baz => 'spax'} - @klass.default_params new_defaults - @klass.default_params.should == new_defaults - end - end - - describe "basic http authentication" do - it "should work" do - @klass.basic_auth 'foobar', 'secret' - @klass.default_options[:basic_auth].should == {:username => 'foobar', :password => 'secret'} - end - end - - describe "parser" do - let(:parser) do - Proc.new{ |data, format| CustomParser.parse(data) } - end - - it "should set parser options" do - @klass.parser parser - @klass.default_options[:parser].should == parser - end - - it "should be able parse response with custom parser" do - @klass.parser parser - FakeWeb.register_uri(:get, 'http://twitter.com/statuses/public_timeline.xml', :body => 'tweets') - custom_parsed_response = @klass.get('http://twitter.com/statuses/public_timeline.xml') - custom_parsed_response[:sexy].should == true - end - - it "raises UnsupportedFormat when the parser cannot handle the format" do - @klass.format :json - class MyParser < HTTParty::Parser - SupportedFormats = {} - end - expect do - @klass.parser MyParser - end.to raise_error(HTTParty::UnsupportedFormat) - end - - it 'does not validate format whe custom parser is a proc' do - expect do - @klass.format :json - @klass.parser lambda {|body, format|} - end.to_not raise_error(HTTParty::UnsupportedFormat) - end - end - - describe "format" do - it "should allow xml" do - @klass.format :xml - @klass.default_options[:format].should == :xml - end - - it "should allow json" do - @klass.format :json - @klass.default_options[:format].should == :json - end - - it "should allow yaml" do - @klass.format :yaml - @klass.default_options[:format].should == :yaml - end - - it "should allow plain" do - @klass.format :plain - @klass.default_options[:format].should == :plain - end - - it 'should not allow funky format' do - lambda do - @klass.format :foobar - end.should raise_error(HTTParty::UnsupportedFormat) - end - - it 'should only print each format once with an exception' do - lambda do - @klass.format :foobar - end.should raise_error(HTTParty::UnsupportedFormat, "':foobar' Must be one of: html, json, plain, xml, yaml") - end - - it 'sets the default parser' do - @klass.default_options[:parser].should be_nil - @klass.format :json - @klass.default_options[:parser].should == HTTParty::Parser - end - - it 'does not reset parser to the default parser' do - my_parser = lambda {} - @klass.parser my_parser - @klass.format :json - @klass.parser.should == my_parser - end - end - - describe "with explicit override of automatic redirect handling" do - - it "should fail with redirected GET" do - lambda do - @klass.get('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - - it "should fail with redirected POST" do - lambda do - @klass.post('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - - it "should fail with redirected DELETE" do - lambda do - @klass.delete('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - - it "should fail with redirected PUT" do - lambda do - @klass.put('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - - it "should fail with redirected HEAD" do - lambda do - @klass.head('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - - it "should fail with redirected OPTIONS" do - lambda do - @klass.options('/foo', :no_follow => true) - end.should raise_error(HTTParty::RedirectionTooDeep) - end - end - - describe "with multiple class definitions" do - before(:each) do - @klass.instance_eval do - base_uri "http://first.com" - default_params :one => 1 - end - - @additional_klass = Class.new - @additional_klass.instance_eval do - include HTTParty - base_uri "http://second.com" - default_params :two => 2 - end - end - - it "should not run over each others options" do - @klass.default_options.should == { :base_uri => 'http://first.com', :default_params => { :one => 1 } } - @additional_klass.default_options.should == { :base_uri => 'http://second.com', :default_params => { :two => 2 } } - end - end - - describe "two child classes inheriting from one parent" do - before(:each) do - @parent = Class.new do - include HTTParty - end - - @child1 = Class.new(@parent) - @child2 = Class.new(@parent) - end - - it "does not modify each others inherited attributes" do - @child1.default_params :joe => "alive" - @child2.default_params :joe => "dead" - - @child1.default_options.should == { :default_params => {:joe => "alive"} } - @child2.default_options.should == { :default_params => {:joe => "dead"} } - - @parent.default_options.should == { } - end - end - - describe "#get" do - it "should be able to get html" do - stub_http_response_with('google.html') - HTTParty.get('http://www.google.com').should == file_fixture('google.html') - end - - it "should be able parse response type json automatically" do - stub_http_response_with('twitter.json') - tweets = HTTParty.get('http://twitter.com/statuses/public_timeline.json') - tweets.size.should == 20 - tweets.first['user'].should == { - "name" => "Pyk", - "url" => nil, - "id" => "7694602", - "description" => nil, - "protected" => false, - "screen_name" => "Pyk", - "followers_count" => 1, - "location" => "Opera Plaza, California", - "profile_image_url" => "http://static.twitter.com/images/default_profile_normal.png" - } - end - - it "should be able parse response type xml automatically" do - stub_http_response_with('twitter.xml') - tweets = HTTParty.get('http://twitter.com/statuses/public_timeline.xml') - tweets['statuses'].size.should == 20 - tweets['statuses'].first['user'].should == { - "name" => "Magic 8 Bot", - "url" => nil, - "id" => "17656026", - "description" => "ask me a question", - "protected" => "false", - "screen_name" => "magic8bot", - "followers_count" => "90", - "profile_image_url" => "http://s3.amazonaws.com/twitter_production/profile_images/65565851/8ball_large_normal.jpg", - "location" => nil - } - end - - it "should not get undefined method add_node for nil class for the following xml" do - stub_http_response_with('undefined_method_add_node_for_nil.xml') - result = HTTParty.get('http://foobar.com') - result.should == {"Entities"=>{"href"=>"https://s3-sandbox.parature.com/api/v1/5578/5633/Account", "results"=>"0", "total"=>"0", "page_size"=>"25", "page"=>"1"}} - end - - it "should parse empty response fine" do - stub_http_response_with('empty.xml') - result = HTTParty.get('http://foobar.com') - result.should be_nil - end - - it "should accept http URIs" do - stub_http_response_with('google.html') - lambda do - HTTParty.get('http://google.com') - end.should_not raise_error(HTTParty::UnsupportedURIScheme) - end - - it "should accept https URIs" do - stub_http_response_with('google.html') - lambda do - HTTParty.get('https://google.com') - end.should_not raise_error(HTTParty::UnsupportedURIScheme) - end - - it "should raise an ArgumentError on URIs that are not http or https" do - lambda do - HTTParty.get("file:///there_is_no_party_on/my/filesystem") - end.should raise_error(HTTParty::UnsupportedURIScheme) - end - - it "should raise an InvalidURIError on URIs that can't be parsed at all" do - lambda do - HTTParty.get("It's the one that says 'Bad URI'") - end.should raise_error(URI::InvalidURIError) - end - end -end diff --git a/vendor/httparty-0.5.0/spec/spec.opts b/vendor/httparty-0.5.0/spec/spec.opts deleted file mode 100644 index 5779d6236..000000000 --- a/vendor/httparty-0.5.0/spec/spec.opts +++ /dev/null @@ -1,2 +0,0 @@ ---colour ---format specdoc diff --git a/vendor/httparty-0.5.0/spec/spec_helper.rb b/vendor/httparty-0.5.0/spec/spec_helper.rb deleted file mode 100644 index f70f45f07..000000000 --- a/vendor/httparty-0.5.0/spec/spec_helper.rb +++ /dev/null @@ -1,24 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'httparty') -gem 'rspec', '1.2.9' -gem 'fakeweb' -require 'spec/autorun' -require 'fakeweb' - -FakeWeb.allow_net_connect = false - -def file_fixture(filename) - open(File.join(File.dirname(__FILE__), 'fixtures', "#{filename.to_s}")).read -end - -def stub_http_response_with(filename) - format = filename.split('.').last.intern - data = file_fixture(filename) - - response = Net::HTTPOK.new("1.1", 200, "Content for you") - response.stub!(:body).and_return(data) - - http_request = HTTParty::Request.new(Net::HTTP::Get, 'http://localhost', :format => format) - http_request.stub!(:perform_actual_request).and_return(response) - - HTTParty::Request.should_receive(:new).and_return(http_request) -end diff --git a/vendor/httparty-0.5.0/website/css/common.css b/vendor/httparty-0.5.0/website/css/common.css deleted file mode 100644 index 61f38ac69..000000000 --- a/vendor/httparty-0.5.0/website/css/common.css +++ /dev/null @@ -1,47 +0,0 @@ -@media screen, projection { - /* - Copyright (c) 2007, Yahoo! Inc. All rights reserved. - Code licensed under the BSD License: - http://developer.yahoo.net/yui/license.txt - version: 2.2.0 - */ - body {font:13px arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}select, input, textarea {font:99% arial,helvetica,clean,sans-serif;}pre, code {font:115% monospace;*font-size:100%;}body * {line-height:1.22em;} - body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}/*ol,ul {list-style:none;}*/caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;} - /* end of yahoo reset and fonts */ - - body {color:#333; background:#4b1a1a; line-height:1.3;} - p {margin:0 0 20px;} - a {color:#4b1a1a;} - a:hover {text-decoration:none;} - strong {font-weight:bold;} - em {font-style:italics;} - h1,h2,h3,h4,h5,h6 {font-weight:bold;} - h1 {font-size:197%; margin:30px 0; color:#4b1a1a;} - h2 {font-size:174%; margin:20px 0; color:#b8111a;} - h3 {font-size:152%; margin:10px 0;} - h4 {font-size:129%; margin:10px 0;} - pre {background:#eee; margin:0 0 20px; padding:20px; border:1px solid #ccc; font-size:100%; overflow:auto;} - code {font-size:100%; margin:0; padding:0;} - ul, ol {margin:10px 0 10px 25px;} - ol li {margin:0 0 10px;} - - - - - - div#wrapper {background:#fff; width:560px; margin:0 auto; padding:20px; border:10px solid #bc8c46; border-width:0 10px;} - div#header {position:relative; border-bottom:1px dotted; margin:0 0 10px; padding:0 0 10px;} - div#header p {margin:0; padding:0;} - div#header h1 {margin:0; padding:0;} - ul#nav {position:absolute; top:0; right:0; list-style:none; margin:0; padding:0;} - ul#nav li {display:inline; padding:0 0 0 5px;} - ul#nav li a {} - div#content {} - div#footer {margin:40px 0 0; border-top:1px dotted; padding:10px 0 0;} - - - - - - -} \ No newline at end of file diff --git a/vendor/httparty-0.5.0/website/index.html b/vendor/httparty-0.5.0/website/index.html deleted file mode 100644 index 3b4c86ff3..000000000 --- a/vendor/httparty-0.5.0/website/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - HTTParty by John Nunemaker - - - - -
- - -
-

Install

-
$ sudo gem install httparty
- -

Some Quick Examples

- -

The following is a simple example of wrapping Twitter's API for posting updates.

- -
class Twitter
-  include HTTParty
-  base_uri 'twitter.com'
-  basic_auth 'username', 'password'
-end
-
-Twitter.post('/statuses/update.json', :query => {:status => "It's an HTTParty and everyone is invited!"})
- -

That is really it! The object returned is a ruby hash that is decoded from Twitter's json response. JSON parsing is used because of the .json extension in the path of the request. You can also explicitly set a format (see the examples).

- -

That works and all but what if you don't want to embed your username and password in the class? Below is an example to fix that:

- -
class Twitter
-  include HTTParty
-  base_uri 'twitter.com'
-
-  def initialize(u, p)
-    @auth = {:username => u, :password => p}
-  end
-
-  def post(text)
-    options = { :query => {:status => text}, :basic_auth => @auth }
-    self.class.post('/statuses/update.json', options)
-  end
-end
-
-Twitter.new('username', 'password').post("It's an HTTParty and everyone is invited!")
- -

More Examples: There are several examples in the gem itself.

- -

Support

-

Conversations welcome in the google group and bugs/features over at Github.

- - -
- - -
- - - \ No newline at end of file diff --git a/vendor/internal-gems/basecamp/lib/basecamp.rb b/vendor/internal-gems/basecamp/lib/basecamp.rb new file mode 100644 index 000000000..58d587f96 --- /dev/null +++ b/vendor/internal-gems/basecamp/lib/basecamp.rb @@ -0,0 +1,640 @@ +require 'net/https' +require 'yaml' +require 'date' +require 'time' + +begin + require 'xmlsimple' +rescue LoadError + begin + require 'rubygems' + require 'xmlsimple' + rescue LoadError + abort <<-ERROR +The 'xml-simple' library could not be loaded. If you have RubyGems installed +you can install xml-simple by doing "gem install xml-simple". +ERROR + end +end + +begin + require 'active_resource' +rescue LoadError + begin + require 'rubygems' + require 'active_resource' + rescue LoadError + abort <<-ERROR +The 'activeresource' library could not be loaded. If you have RubyGems +installed you can install ActiveResource by doing "gem install activeresource". +ERROR + end +end + +# = A Ruby library for working with the Basecamp web-services API. +# +# For more information about the Basecamp web-services API, visit: +# +# http://developer.37signals.com/basecamp +# +# NOTE: not all of Basecamp's web-services are accessible via REST. This +# library provides access to RESTful services via ActiveResource. Services not +# yet upgraded to REST are accessed via the Basecamp class. Continue reading +# for more details. +# +# +# == Establishing a Connection +# +# The first thing you need to do is establish a connection to Basecamp. This +# requires your Basecamp site address and your login credentials. Example: +# +# Basecamp.establish_connection!('you.grouphub.com', 'username', 'password') +# +# This is the same whether you're accessing using the ActiveResource interface, +# or the legacy interface. +# +# +# == Using the REST interface via ActiveResource +# +# The REST interface is accessed via ActiveResource, a popular Ruby library +# that implements object-relational mapping for REST web-services. For more +# information on working with ActiveResource, see: +# +# * http://api.rubyonrails.org/files/activeresource/README.html +# * http://api.rubyonrails.org/classes/ActiveResource/Base.html +# +# +# === Finding a Resource +# +# Find a specific resource using the +find+ method. Attributes of the resource +# are available as instance methods on the resulting object. For example, to +# find a message with the ID of 8675309 and access its title attribute, you +# would do the following: +# +# m = Basecamp::Message.find(8675309) +# m.title # => 'Jenny' +# +# To find all messages for a given project, use find(:all), passing the +# project_id as a parameter to find. Example: +# +# messages = Basecamp::Message.find(:all, params => { :project_id => 1037 }) +# messages.size # => 25 +# +# +# === Creating a Resource +# +# Create a resource by making a new instance of that resource, setting its +# attributes, and saving it. If the resource requires a prefix to identify +# it (as is the case with resources that belong to a sub-resource, such as a +# project), it should be specified when instantiating the object. Examples: +# +# m = Basecamp::Message.new(:project_id => 1037) +# m.category_id = 7301 +# m.title = 'Message in a bottle' +# m.body = 'Another lonely day, with no one here but me' +# m.save # => true +# +# c = Basecamp::Comment.new(:post_id => 25874) +# c.body = 'Did you get those TPS reports?' +# c.save # => true +# +# You can also create a resource using the +create+ method, which will create +# and save it in one step. Example: +# +# Basecamp::TodoItem.create(:todo_list_id => 3422, :contents => 'Do it') +# +# +# === Updating a Resource +# +# To update a resource, first find it by its id, change its attributes, and +# save it. Example: +# +# m = Basecamp::Message.find(8675309) +# m.body = 'Changed' +# m.save # => true +# +# +# === Deleting a Resource +# +# To delete a resource, use the +delete+ method with the ID of the resource +# you want to delete. Example: +# +# Basecamp::Message.delete(1037) +# +# +# === Attaching Files to a Resource +# +# If the resource accepts file attachments, the +attachments+ parameter should +# be an array of Basecamp::Attachment objects. Example: +# +# a1 = Basecamp::Attachment.create('primary', File.read('primary.doc')) +# a2 = Basecamp::Attachment.create('another', File.read('another.doc')) +# +# m = Basecamp::Message.new(:project_id => 1037) +# ... +# m.attachments = [a1, a2] +# m.save # => true +# +# +# = Using the non-REST inteface +# +# The non-REST interface is accessed via instance methods on the Basecamp +# class. Ensure you've established a connection, then create a new Basecamp +# instance and call methods on it. Object attributes are accessible as methods. +# Example: +# +# session = Basecamp.new +# person = session.person(93832) # => # +# person.first_name # => "Jason" +# +class Basecamp + class Connection #:nodoc: + def initialize(master) + @master = master + @connection = Net::HTTP.new(master.site, master.use_ssl ? 443 : 80) + @connection.use_ssl = master.use_ssl + @connection.verify_mode = OpenSSL::SSL::VERIFY_NONE if master.use_ssl + end + + def post(path, body, headers = {}) + request = Net::HTTP::Post.new(path, headers.merge('Accept' => 'application/xml')) + request.basic_auth(@master.user, @master.password) + @connection.request(request, body) + end + end + + class Resource < ActiveResource::Base #:nodoc: + class << self + def parent_resources(*parents) + @parent_resources = parents + end + + def element_name + @element_name || name.split(/::/).last.underscore + end + + def prefix_source + if @parent_resources + @parent_resources.map { |resource| "/#{resource.to_s.pluralize}/:#{resource}_id" }.join + '/' + else + '/' + end + end + + def prefix(options = {}) + if options.any? + options.map { |name, value| "/#{name.to_s.chomp('_id').pluralize}/#{value}" }.join + '/' + else + '/' + end + end + end + + def prefix_options + id ? {} : super + end + end + + class Project < Resource + end + + class Company < Resource + parent_resources :project + + def self.on_project(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id)) + end + end + + # == Creating different types of categories + # + # The type parameter is required when creating a category. For exampe, to + # create an attachment category for a particular project: + # + # c = Basecamp::Category.new(:project_id => 1037) + # c.type = 'attachment' + # c.name = 'Pictures' + # c.save # => true + # + class Category < Resource + parent_resources :project + + def self.all(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id)) + end + + def self.post_categories(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id, :type => 'post')) + end + + def self.attachment_categories(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id, :type => 'attachment')) + end + end + + class Message < Resource + self.prefix = "/projects/:project_id/" + self.element_name = "post" + + # Returns the most recent 25 messages in the given project (and category, + # if specified). If you need to retrieve older messages, use the archive + # method instead. Example: + # + # Basecamp::Message.recent(1037) + # Basecamp::Message.recent(1037, :category_id => 7301) + # + def self.recent(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id)) + end + + # Returns a summary of all messages in the given project (and category, if + # specified). The summary is simply the title and category of the message, + # as well as the number of attachments (if any). Example: + # + # Basecamp::Message.archive(1037) + # Basecamp::Message.archive(1037, :category_id => 7301) + # + def self.archive(project_id, options = {}) + find(:all, :params => options.merge(:project_id => project_id), :from => :archive) + end + + def comments(options = {}) + @comments ||= Comment.find(:all, :params => options.merge(:post_id => id)) + end + end + + # == Creating comments for multiple resources + # + # Comments can be created for messages, milestones, and to-dos, identified + # by the post_id, milestone_id, and todo_item_id + # params respectively. + # + # For example, to create a comment on the message with id #8675309: + # + # c = Basecamp::Comment.new(:post_id => 8675309) + # c.body = 'Great tune' + # c.save # => true + # + # Similarly, to create a comment on a milestone: + # + # c = Basecamp::Comment.new(:milestone_id => 8473647) + # c.body = 'Is this done yet?' + # c.save # => true + # + class Comment < Resource + parent_resources :post, :milestone, :todo_item + end + + class TodoList < Resource + parent_resources :project + + # Returns all lists for a project. If complete is true, only completed lists + # are returned. If complete is false, only uncompleted lists are returned. + def self.all(project_id, complete = nil) + filter = case complete + when nil then "all" + when true then "finished" + when false then "pending" + else raise ArgumentError, "invalid value for `complete'" + end + + find(:all, :params => { :project_id => project_id, :filter => filter }) + end + + def todo_items(options = {}) + @todo_items ||= TodoItem.find(:all, :params => options.merge(:todo_list_id => id)) + end + end + + class TodoItem < Resource + parent_resources :todo_list + + def todo_list(options = {}) + @todo_list ||= TodoList.find(todo_list_id, options) + end + + def time_entries(options = {}) + @time_entries ||= TimeEntry.find(:all, :params => options.merge(:todo_item_id => id)) + end + + def comments(options = {}) + @comments ||= Comment.find(:all, :params => options.merge(:todo_item_id => id)) + end + + def complete! + put(:complete) + end + + def uncomplete! + put(:uncomplete) + end + end + + class TimeEntry < Resource + parent_resources :project, :todo_item + + def self.all(project_id, page = 0) + find(:all, :params => { :project_id => project_id, :page => page }) + end + + def self.report(options={}) + find(:all, :from => :report, :params => options) + end + end + + class Category < Resource + parent_resources :project + end + + class Attachment + attr_accessor :id, :filename, :content + + def self.create(filename, content) + returning new(filename, content) do |attachment| + attachment.save + end + end + + def initialize(filename, content) + @filename, @content = filename, content + end + + def attributes + { :file => id, :original_filename => filename } + end + + def to_xml(options = {}) + { :file => attributes }.to_xml(options) + end + + def inspect + to_s + end + + def save + response = Basecamp.connection.post('/upload', content, 'Content-Type' => 'application/octet-stream') + + if response.code == '200' + self.id = Hash.from_xml(response.body)['upload']['id'] + true + else + raise "Could not save attachment: #{response.message} (#{response.code})" + end + end + end + + class Record #:nodoc: + attr_reader :type + + def initialize(type, hash) + @type, @hash = type, hash + end + + def [](name) + name = dashify(name) + + case @hash[name] + when Hash then + @hash[name] = if (@hash[name].keys.length == 1 && @hash[name].values.first.is_a?(Array)) + @hash[name].values.first.map { |v| Record.new(@hash[name].keys.first, v) } + else + Record.new(name, @hash[name]) + end + else + @hash[name] + end + end + + def id + @hash['id'] + end + + def attributes + @hash.keys + end + + def respond_to?(sym) + super || @hash.has_key?(dashify(sym)) + end + + def method_missing(sym, *args) + if args.empty? && !block_given? && respond_to?(sym) + self[sym] + else + super + end + end + + def to_s + "\#" + end + + def inspect + to_s + end + + private + + def dashify(name) + name.to_s.tr("_", "-") + end + end + + attr_accessor :use_xml + + class << self + attr_reader :site, :user, :password, :use_ssl + + def establish_connection!(site, user, password, use_ssl = false) + @site = site + @user = user + @password = password + @use_ssl = use_ssl + + Resource.user = user + Resource.password = password + Resource.site = (use_ssl ? "https" : "http") + "://" + site + Resource.format = :xml + + @connection = Connection.new(self) + end + + def connection + @connection || raise('No connection established') + end + end + + def initialize + @use_xml = false + end + + # ========================================================================== + # PEOPLE + # ========================================================================== + + # Return an array of the people in the given company. If the project-id is + # given, only people who have access to the given project will be returned. + def people(company_id, project_id=nil) + url = project_id ? "/projects/#{project_id}" : "" + url << "/contacts/people/#{company_id}" + records "person", url + end + + # Return information about the person with the given id + def person(id) + record "/contacts/person/#{id}" + end + + # ========================================================================== + # MILESTONES + # ========================================================================== + + # Returns a list of all milestones for the given project, optionally filtered + # by whether they are completed, late, or upcoming. + def milestones(project_id, find = 'all') + records "milestone", "/projects/#{project_id}/milestones/list", :find => find + end + + # Create a new milestone for the given project. +data+ must be hash of the + # values to set, including +title+, +deadline+, +responsible_party+, and + # +notify+. + def create_milestone(project_id, data) + create_milestones(project_id, [data]).first + end + + # As #create_milestone, but can create multiple milestones in a single + # request. The +milestones+ parameter must be an array of milestone values as + # described in #create_milestone. + def create_milestones(project_id, milestones) + records "milestone", "/projects/#{project_id}/milestones/create", :milestone => milestones + end + + # Updates an existing milestone. + def update_milestone(id, data, move = false, move_off_weekends = false) + record "/milestones/update/#{id}", :milestone => data, + :move_upcoming_milestones => move, + :move_upcoming_milestones_off_weekends => move_off_weekends + end + + # Destroys the milestone with the given id. + def delete_milestone(id) + record "/milestones/delete/#{id}" + end + + # Complete the milestone with the given id + def complete_milestone(id) + record "/milestones/complete/#{id}" + end + + # Uncomplete the milestone with the given id + def uncomplete_milestone(id) + record "/milestones/uncomplete/#{id}" + end + + private + + # Make a raw web-service request to Basecamp. This will return a Hash of + # Arrays of the response, and may seem a little odd to the uninitiated. + def request(path, parameters = {}) + response = Basecamp.connection.post(path, convert_body(parameters), "Content-Type" => content_type) + + if response.code.to_i / 100 == 2 + result = XmlSimple.xml_in(response.body, 'keeproot' => true, 'contentkey' => '__content__', 'forcecontent' => true) + typecast_value(result) + else + raise "#{response.message} (#{response.code})" + end + end + + # A convenience method for wrapping the result of a query in a Record + # object. This assumes that the result is a singleton, not a collection. + def record(path, parameters={}) + result = request(path, parameters) + (result && !result.empty?) ? Record.new(result.keys.first, result.values.first) : nil + end + + # A convenience method for wrapping the result of a query in Record + # objects. This assumes that the result is a collection--any singleton + # result will be wrapped in an array. + def records(node, path, parameters={}) + result = request(path, parameters).values.first or return [] + result = result[node] or return [] + result = [result] unless Array === result + result.map { |row| Record.new(node, row) } + end + + def convert_body(body) + body = use_xml ? body.to_legacy_xml : body.to_yaml + end + + def content_type + use_xml ? "application/xml" : "application/x-yaml" + end + + def typecast_value(value) + case value + when Hash + if value.has_key?("__content__") + content = translate_entities(value["__content__"]).strip + case value["type"] + when "integer" then content.to_i + when "boolean" then content == "true" + when "datetime" then Time.parse(content) + when "date" then Date.parse(content) + else content + end + # a special case to work-around a bug in XmlSimple. When you have an empty + # tag that has an attribute, XmlSimple will not add the __content__ key + # to the returned hash. Thus, we check for the presense of the 'type' + # attribute to look for empty, typed tags, and simply return nil for + # their value. + elsif value.keys == %w(type) + nil + elsif value["nil"] == "true" + nil + # another special case, introduced by the latest rails, where an array + # type now exists. This is parsed by XmlSimple as a two-key hash, where + # one key is 'type' and the other is the actual array value. + elsif value.keys.length == 2 && value["type"] == "array" + value.delete("type") + typecast_value(value) + else + value.empty? ? nil : value.inject({}) do |h,(k,v)| + h[k] = typecast_value(v) + h + end + end + when Array + value.map! { |i| typecast_value(i) } + case value.length + when 0 then nil + when 1 then value.first + else value + end + else + raise "can't typecast #{value.inspect}" + end + end + + def translate_entities(value) + value.gsub(/</, "<"). + gsub(/>/, ">"). + gsub(/"/, '"'). + gsub(/'/, "'"). + gsub(/&/, "&") + end +end + +# A minor hack to let Xml-Simple serialize symbolic keys in hashes +class Symbol + def [](*args) + to_s[*args] + end +end + +class Hash + def to_legacy_xml + XmlSimple.xml_out({:request => self}, 'keeproot' => true, 'noattr' => true) + end +end + diff --git a/vendor/json-1.1.2/CHANGES b/vendor/json-1.1.2/CHANGES deleted file mode 100644 index 5df1536ba..000000000 --- a/vendor/json-1.1.2/CHANGES +++ /dev/null @@ -1,83 +0,0 @@ -2007-11-27 (1.1.2) - * Remember default dir (last used directory) in editor. - * JSON::Editor.edit method added, the editor can now receive json texts from - the clipboard via C-v. - * Load json texts from an URL pasted via middle button press. - * Added :create_additions option to Parser. This makes it possible to disable - the creation of additions by force, in order to treat json texts as data - while having additions loaded. - * Jacob Maine reported, that JSON(:foo) outputs a JSON - object if the rails addition is enabled, which is wrong. It now outputs a - JSON string "foo" instead, like suggested by Jacob Maine. - * Discovered a bug in the Ruby Bugs Tracker on rubyforge, that was reported - by John Evans lgastako@gmail.com. He could produce a crash in the JSON - generator by returning something other than a String instance from a - to_json method. I now guard against this by doing a rather crude type - check, which raises an exception instead of crashing. -2007-07-06 (1.1.1) - * Yui NARUSE sent some patches to fix tests for Ruby - 1.9. I applied them and adapted some of them a bit to run both on 1.8 and - 1.9. - * Introduced a JSON.parse! method without depth checking for people who like - danger. - * Made generate and pretty_generate methods configurable by an options hash. - * Added :allow_nan option to parser and generator in order to handle NaN, - Infinity, and -Infinity correctly - if requested. Floats, which aren't numbers, - aren't valid JSON according to RFC4627, so by default an exception will be - raised if any of these symbols are encountered. Thanks to Andrea Censi - for his hint about this. - * Fixed some more tests for Ruby 1.9. - * Implemented dump/load interface of Marshal as suggested in ruby-core:11405 - by murphy . - * Implemented the max_nesting feature for generate methods, too. - * Added some implementations for ruby core's custom objects for - serialisation/deserialisation purposes. -2007-05-21 (1.1.0) - * Implemented max_nesting feature for parser to avoid stack overflows for - data from untrusted sources. If you trust the source, you can disable it - with the option max_nesting => false. - * Piers Cawley reported a bug, that not every - character can be escaped by ?\ as required by RFC4627. There's a - contradiction between David Crockford's JSON checker test vectors (in - tests/fixtures) and RFC4627, though. I decided to stick to the RFC, because - the JSON checker seems to be a bit older than the RFC. - * Extended license to Ruby License, which includes the GPL. - * Added keyboard shortcuts, and 'Open location' menu item to edit_json.rb. -2007-05-09 (1.0.4) - * Applied a patch from Yui NARUSE to make JSON compile - under Ruby 1.9. Thank you very much for mailing it to me! - * Made binary variants of JSON fail early, instead of falling back to the - pure version. This should avoid overshadowing of eventual problems while - loading of the binary. -2007-03-24 (1.0.3) - * Improved performance of pure variant a bit. - * The ext variant of this release supports the mswin32 platform. Ugh! -2007-03-24 (1.0.2) - * Ext Parser didn't parse 0e0 correctly into 0.0: Fixed! -2007-03-24 (1.0.1) - * Forgot some object files in the build dir. I really like that - not! -2007-03-24 (1.0.0) - * Added C implementations for the JSON generator and a ragel based JSON - parser in C. - * Much more tests, especially fixtures from json.org. - * Further improved conformance to RFC4627. -2007-02-09 (0.4.3) - * Conform more to RFC4627 for JSON: This means JSON strings - now always must contain exactly one object "{ ... }" or array "[ ... ]" in - order to be parsed without raising an exception. The definition of what - constitutes a whitespace is narrower in JSON than in Ruby ([ \t\r\n]), and - there are differences in floats and integers (no octals or hexadecimals) as - well. - * Added aliases generate and pretty_generate of unparse and pretty_unparse. - * Fixed a test case. - * Catch an Iconv::InvalidEncoding exception, that seems to occur on some Sun - boxes with SunOS 5.8, if iconv doesn't support utf16 conversions. This was - reported by Andrew R Jackson , thanks a bunch! -2006-08-25 (0.4.2) - * Fixed a bug in handling solidi (/-characters), that was reported by - Kevin Gilpin . -2006-02-06 (0.4.1) - * Fixed a bug related to escaping with backslashes. Thanks for the report go - to Florian Munz . -2005-09-23 (0.4.0) - * Initial Rubyforge Version diff --git a/vendor/json-1.1.2/GPL b/vendor/json-1.1.2/GPL deleted file mode 100644 index 5b6e7c66c..000000000 --- a/vendor/json-1.1.2/GPL +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/vendor/json-1.1.2/README b/vendor/json-1.1.2/README deleted file mode 100644 index 9b4f3bec9..000000000 --- a/vendor/json-1.1.2/README +++ /dev/null @@ -1,78 +0,0 @@ -Dependencies for Building -========================= - -- You need rake to build the extensions and install them. - - You can get it from rubyforge: - http://rubyforge.org/projects/rake - - or just type - - # gem install rake - - for the installation via rubygems. - -- If you want to rebuild the parser.c file or draw nice graphviz images of the - state machines, you need ragel from: - http://www.cs.queensu.ca/~thurston/ragel - -Installation -============ - -It's recommended to use the extension variant of JSON, because it's quite a bit -faster than the pure ruby variant. If you cannot build it on your system, you -can settle for the latter. - -Just type into the command line as root: - -# rake install - -The above command will build the extensions and install them on your system. - -# rake install_pure - -or - -# ruby install.rb - -will just install the pure ruby implementation of JSON. - -If you use Rubygems you can type - -# gem install json - -instead, to install the newest JSON version. - -There is also a pure ruby json only variant of the gem, that can be installed -with: - -# gem install json_pure - -Testing and Examples -==================== - -To run the tests type: - -$ rake test_ext - -This will build the extensions first and then test them. - -$ rake test_pure - -This will test the pure ruby extensions. - -There is also a small example in tools/server.rb if you want to see, how -receiving a JSON object from a webrick server in your browser with the -javasript prototype library (http://www.prototypejs.org) works. - -Author -====== - -Florian Frank - -License -======= - -Ruby License, see the RUBY file included in the source distribution. The Ruby -License includes the GNU General Public License (GPL), Version 2, so see the -file GPL as well. diff --git a/vendor/json-1.1.2/RUBY b/vendor/json-1.1.2/RUBY deleted file mode 100644 index 4a99f6f01..000000000 --- a/vendor/json-1.1.2/RUBY +++ /dev/null @@ -1,58 +0,0 @@ -Ruby is copyrighted free software by Yukihiro Matsumoto . -You can redistribute it and/or modify it under either the terms of the GPL -(see COPYING.txt file), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) rename any non-standard executables so the names do not conflict - with standard executables, which must also be provided. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or executable - form, provided that you do at least ONE of the following: - - a) distribute the executables and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard executables non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under this terms. - - They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some - files under the ./missing directory. See each file for the copying - condition. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. - diff --git a/vendor/json-1.1.2/Rakefile b/vendor/json-1.1.2/Rakefile deleted file mode 100644 index 0e2fb549c..000000000 --- a/vendor/json-1.1.2/Rakefile +++ /dev/null @@ -1,311 +0,0 @@ -# vim: set et sw=2 ts=2: - -begin - require 'rake/gempackagetask' -rescue LoadError -end -require 'rake/clean' - -require 'rbconfig' -include Config - -ON_WINDOWS = RUBY_PLATFORM =~ /mswin32/i -PKG_NAME = 'json' -PKG_VERSION = File.read('VERSION').chomp -PKG_FILES = FileList["**/*"].exclude(/CVS|pkg|coverage|Makefile/).exclude(/\.(so|bundle|o|#{CONFIG['DLEXT']})$/) -EXT_ROOT_DIR = 'ext/json/ext' -EXT_PARSER_DIR = "#{EXT_ROOT_DIR}/parser" -EXT_PARSER_DL = "#{EXT_ROOT_DIR}/parser.#{CONFIG['DLEXT']}" -EXT_PARSER_SRC = "#{EXT_PARSER_DIR}/parser.c" -PKG_FILES << EXT_PARSER_SRC -EXT_GENERATOR_DIR = "#{EXT_ROOT_DIR}/generator" -EXT_GENERATOR_DL = "#{EXT_ROOT_DIR}/generator.#{CONFIG['DLEXT']}" -EXT_GENERATOR_SRC = "#{EXT_GENERATOR_DIR}/generator.c" -RAGEL_CODEGEN = %w[rlcodegen rlgen-cd].find { |c| system(c, '-v') } -RAGEL_DOTGEN = %w[rlgen-dot rlgen-cd].find { |c| system(c, '-v') } -RAGEL_PATH = "#{EXT_PARSER_DIR}/parser.rl" -CLEAN.include 'doc', 'coverage', FileList['diagrams/*.*'], - FileList["ext/**/*.{so,bundle,#{CONFIG['DLEXT']},o,obj,pdb,lib,manifest,exp,def}"], - FileList["ext/**/Makefile"] - - -desc "Installing library (pure)" -task :install_pure => :version do - ruby 'install.rb' -end - -task :install_ext_really do - sitearchdir = CONFIG["sitearchdir"] - cd 'ext' do - for file in Dir["json/ext/*.#{CONFIG['DLEXT']}"] - d = File.join(sitearchdir, file) - mkdir_p File.dirname(d) - install(file, d) - end - end -end - -desc "Installing library (extension)" -task :install_ext => [ :compile, :install_pure, :install_ext_really ] - -task :install => :install_ext - -desc "Compiling extension" -task :compile => [ EXT_PARSER_DL, EXT_GENERATOR_DL ] - -file EXT_PARSER_DL => EXT_PARSER_SRC do - cd EXT_PARSER_DIR do - ruby 'extconf.rb' - if ON_WINDOWS - sh 'nmake' - sh "mt -manifest parser.#{CONFIG['DLEXT']}.manifest -outputresource:parser.#{CONFIG['DLEXT']};2" - else - sh 'make' - end - end - cp "#{EXT_PARSER_DIR}/parser.#{CONFIG['DLEXT']}", EXT_ROOT_DIR -end - -file EXT_GENERATOR_DL => EXT_GENERATOR_SRC do - cd EXT_GENERATOR_DIR do - ruby 'extconf.rb' - if ON_WINDOWS - sh 'nmake' - sh "mt -manifest generator.#{CONFIG['DLEXT']}.manifest -outputresource:generator.#{CONFIG['DLEXT']};2" - else - sh 'make' - end - end - cp "#{EXT_GENERATOR_DIR}/generator.#{CONFIG['DLEXT']}", EXT_ROOT_DIR -end - -desc "Generate parser with ragel" -task :ragel => EXT_PARSER_SRC - -task :ragel_clean do - rm_rf EXT_PARSER_SRC -end - -file EXT_PARSER_SRC => RAGEL_PATH do - cd EXT_PARSER_DIR do - sh "ragel parser.rl | #{RAGEL_CODEGEN} -G2" - end -end - -desc "Generate diagrams of ragel parser (ps)" -task :ragel_dot_ps do - root = 'diagrams' - specs = [] - File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs - sh "ragel #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tps -o#{root}/#{s}.ps" - end -end - -desc "Generate diagrams of ragel parser (png)" -task :ragel_dot_png do - root = 'diagrams' - specs = [] - File.new(RAGEL_PATH).grep(/^\s*machine\s*(\S+);\s*$/) { specs << $1 } - for s in specs - sh "ragel #{RAGEL_PATH} -S#{s} | #{RAGEL_DOTGEN} -p|dot -Tpng -o#{root}/#{s}.png" - end -end - -desc "Generate diagrams of ragel parser" -task :ragel_dot => [ :ragel_dot_png, :ragel_dot_ps ] - -desc "Testing library (pure ruby)" -task :test_pure => :clean do - ruby '-I lib tests/runner.rb' -end - -desc "Testing library (extension)" -task :test_ext => :compile do - ruby '-I ext:lib tests/runner.rb' -end - -desc "Benchmarking parser (pure)" -task :benchmark_parser_pure do - ruby '-I lib benchmarks/benchmark_parser.rb pure' -end - -desc "Benchmarking generator (pure)" -task :benchmark_generator_pure do - ruby '-I lib benchmarks/benchmark_generator.rb pure' - ruby 'benchmarks/benchmark_rails.rb' -end - -desc "Benchmarking library (pure)" -task :benchmark_pure => [ :benchmark_parser_pure, :benchmark_generator_pure ] - -desc "Benchmarking parser (extension)" -task :benchmark_parser_ext => :compile do - ruby '-I ext:lib benchmarks/benchmark_parser.rb ext' -end - -desc "Benchmarking generator (extension)" -task :benchmark_generator_ext => :compile do - ruby '-I ext:lib benchmarks/benchmark_generator.rb ext' - ruby 'benchmarks/benchmark_rails.rb' -end - -desc "Benchmarking library (extension)" -task :benchmark_ext => [ :benchmark_parser_ext, :benchmark_generator_ext ] - -task :benchmark do - puts "Benchmarking extension variant" - Rake::Task[:benchmark_ext].invoke - puts "Benchmarking pure variant" - Rake::Task[:benchmark_pure].invoke -end - -desc "Testing library with coverage" # XXX broken -task :coverage do - system 'RUBYOPT="" rcov -x tests -Ilib tests/runner.rb' -end - -desc "Create RDOC documentation" -task :doc => [ :version, EXT_PARSER_SRC ] do - sh "rdoc -m JSON -S -o doc lib/json.rb #{FileList['lib/json/**/*.rb']} #{EXT_PARSER_SRC} #{EXT_GENERATOR_SRC}" -end - -if defined? Gem - spec_pure = Gem::Specification.new do |s| - s.name = 'json_pure' - s.version = PKG_VERSION - s.summary = "A JSON implementation in Ruby" - s.description = "" - - s.files = PKG_FILES - - s.require_path = 'lib' - - s.bindir = "bin" - s.executables = ["edit_json.rb"] - s.default_executable = "edit_json.rb" - - s.has_rdoc = true - s.rdoc_options << - '--title' << 'JSON -- A JSON implemention' << - '--main' << 'JSON' << '--line-numbers' - s.test_files << 'tests/runner.rb' - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://json.rubyforge.org" - s.rubyforge_project = "json" - end - - Rake::GemPackageTask.new(spec_pure) do |pkg| - pkg.need_tar = true - pkg.package_files += PKG_FILES - end - - spec_ext = Gem::Specification.new do |s| - s.name = 'json' - s.version = PKG_VERSION - s.summary = "A JSON implementation as a Ruby extension" - s.description = "" - - s.files = PKG_FILES - - s.extensions << - "#{EXT_PARSER_DIR}/extconf.rb" << - "#{EXT_GENERATOR_DIR}/extconf.rb" - - s.require_path = EXT_ROOT_DIR - s.require_paths << 'ext' - s.require_paths << 'lib' - - s.bindir = "bin" - s.executables = ["edit_json.rb"] - s.default_executable = "edit_json.rb" - - s.has_rdoc = true - s.rdoc_options << - '--title' << 'JSON -- A JSON implemention' << - '--main' << 'JSON' << '--line-numbers' - s.test_files << 'tests/runner.rb' - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://json.rubyforge.org" - s.rubyforge_project = "json" - end - - Rake::GemPackageTask.new(spec_ext) do |pkg| - pkg.need_tar = true - pkg.package_files += PKG_FILES - end - - task :package_win => :compile do - mkdir_p 'pkg' - spec_win_ext = Gem::Specification.new do |s| - s.name = 'json' - s.platform = Gem::Platform::WIN32 - s.version = PKG_VERSION - s.summary = "A JSON implementation as a Ruby extension" - s.description = "" - - s.files = PKG_FILES.to_a << - "#{EXT_ROOT_DIR}/parser.#{CONFIG['DLEXT']}" << - "#{EXT_ROOT_DIR}/generator.#{CONFIG['DLEXT']}" - - s.require_path = EXT_ROOT_DIR - s.require_paths << 'ext' - s.require_paths << 'lib' - - s.bindir = "bin" - s.executables = ["edit_json.rb", "prettify_json.rb"] - s.default_executable = "edit_json.rb" - - s.has_rdoc = true - s.rdoc_options << - '--title' << 'JSON -- A JSON implemention' << - '--main' << 'JSON' << '--line-numbers' - s.test_files << 'tests/runner.rb' - - s.author = "Florian Frank" - s.email = "flori@ping.de" - s.homepage = "http://json.rubyforge.org" - s.rubyforge_project = "json" - end - - gem_file = "json-#{spec_win_ext.version}-#{spec_win_ext.platform}.gem" - Gem::Builder.new(spec_win_ext).build - mv gem_file, 'pkg' - end -end - -task :mrproper => [ :ragel_clean, :clean ] do - for dir in [ EXT_PARSER_DIR, EXT_GENERATOR_DIR ] - cd(dir) { rm_f 'Makefile' } - end -end - -desc m = "Writing version information for #{PKG_VERSION}" -task :version do - puts m - File.open(File.join('lib', 'json', 'version.rb'), 'w') do |v| - v.puts < [ :version, :clean, :package_win ] -else - task :release => [ :version, :mrproper, :package ] -end - -task :default => [ :version, :compile ] diff --git a/vendor/json-1.1.2/TODO b/vendor/json-1.1.2/TODO deleted file mode 100644 index 8b1378917..000000000 --- a/vendor/json-1.1.2/TODO +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/json-1.1.2/VERSION b/vendor/json-1.1.2/VERSION deleted file mode 100644 index 45a1b3f44..000000000 --- a/vendor/json-1.1.2/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.1.2 diff --git a/vendor/json-1.1.2/benchmarks/benchmark.txt b/vendor/json-1.1.2/benchmarks/benchmark.txt deleted file mode 100644 index 255d9fc93..000000000 --- a/vendor/json-1.1.2/benchmarks/benchmark.txt +++ /dev/null @@ -1,133 +0,0 @@ -(in /home/flori/json) -Ragel Code Generator version 5.17 January 2007 -Copyright (c) 2001-2006 by Adrian Thurston -Benchmarking extension variant -First run for warmup. -Running 'BC_Parser' for a duration of 10 secs per method: - real total utime stime cutime cstime -parser: 10.005944 10.010000 9.970000 0.040000 0.000000 0.000000 - 5091 508.591409 0.001966 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Parser' for a duration of 10 secs per method: - real total utime stime cutime cstime -parser: 10.006881 10.000000 9.950000 0.050000 0.000000 0.000000 - 5055 505.500000 0.001978 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - - -[null,false,true,"f\u00d6\u00df\u00c4r",["n\u20acst\u20acd",true],{"quux":true,"foo\u00df":"b\u00e4r"}] -First run for warmup. -Running 'BC_Generator' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator_pretty: 10.001066 10.010000 9.990000 0.020000 0.000000 0.000000 - 3492 348.851149 0.002867 -generator_fast : 10.002910 10.000000 9.980000 0.020000 0.000000 0.000000 - 5416 541.600000 0.001846 -generator_safe : 10.003107 10.010000 10.000000 0.010000 0.000000 0.000000 - 4926 492.107892 0.002032 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Generator' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator_pretty: 10.009150 10.010000 10.010000 0.000000 0.000000 0.000000 - 3511 350.749251 0.002851 -generator_fast : 10.014407 10.020000 10.020000 0.000000 0.000000 0.000000 - 5411 540.019960 0.001852 -generator_safe : 10.010055 10.000000 10.000000 0.000000 0.000000 0.000000 - 4933 493.300000 0.002027 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - -Comparison in BC_Generator: - secs/call speed -generator_fast : 0.002 -> 1.540x -generator_safe : 0.002 -> 1.406x -generator_pretty: 0.003 -> 1.000x --------------------------------------------------------------------------------- - -[null, false, true, "f\u00d6\u00df\u00c4r", ["n\u20acst\u20acd", true], {quux: true, "foo\u00df": "b\u00e4r"}] -First run for warmup. -Running 'BC_Rails' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator: 10.026043 10.020000 10.020000 0.000000 0.000000 0.000000 - 239 23.852295 0.041925 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Rails' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator: 10.010931 10.020000 10.010000 0.010000 0.000000 0.000000 - 238 23.752495 0.042101 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - - -Benchmarking pure variant -First run for warmup. -Running 'BC_Parser' for a duration of 10 secs per method: - real total utime stime cutime cstime -parser: 10.022352 10.030000 10.020000 0.010000 0.000000 0.000000 - 288 28.713858 0.034826 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Parser' for a duration of 10 secs per method: - real total utime stime cutime cstime -parser: 10.006552 10.000000 10.000000 0.000000 0.000000 0.000000 - 289 28.900000 0.034602 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - - -[null,false,true,"f\u00d6\u00df\u00c4r",["n\u20acst\u20acd",true],{"quux":true,"foo\u00df":"b\u00e4r"}] -First run for warmup. -Running 'BC_Generator' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator_fast : 10.011644 10.010000 10.010000 0.000000 0.000000 0.000000 - 411 41.058941 0.024355 -generator_safe : 10.007100 10.010000 10.010000 0.000000 0.000000 0.000000 - 352 35.164835 0.028438 -generator_pretty: 10.008156 10.010000 10.010000 0.000000 0.000000 0.000000 - 341 34.065934 0.029355 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Generator' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator_fast : 10.005185 10.010000 10.010000 0.000000 0.000000 0.000000 - 411 41.058941 0.024355 -generator_safe : 10.006932 10.010000 10.010000 0.000000 0.000000 0.000000 - 351 35.064935 0.028519 -generator_pretty: 10.007414 10.000000 10.000000 0.000000 0.000000 0.000000 - 340 34.000000 0.029412 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - -Comparison in BC_Generator: - secs/call speed -generator_fast : 0.024 -> 1.208x -generator_safe : 0.029 -> 1.031x -generator_pretty: 0.029 -> 1.000x --------------------------------------------------------------------------------- - -[null, false, true, "f\u00d6\u00df\u00c4r", ["n\u20acst\u20acd", true], {quux: true, "foo\u00df": "b\u00e4r"}] -First run for warmup. -Running 'BC_Rails' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator: 10.005748 10.000000 10.000000 0.000000 0.000000 0.000000 - 240 24.000000 0.041667 - calls calls/sec secs/call --------------------------------------------------------------------------------- -Running 'BC_Rails' for a duration of 10 secs per method: - real total utime stime cutime cstime -generator: 10.006764 10.010000 10.010000 0.000000 0.000000 0.000000 - 239 23.876124 0.041883 - calls calls/sec secs/call --------------------------------------------------------------------------------- -================================================================================ - - diff --git a/vendor/json-1.1.2/benchmarks/benchmark_generator.rb b/vendor/json-1.1.2/benchmarks/benchmark_generator.rb deleted file mode 100644 index f0173bc53..000000000 --- a/vendor/json-1.1.2/benchmarks/benchmark_generator.rb +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env ruby - -require 'bullshit' -$KCODE='utf8' -if ARGV.shift == 'pure' - require 'json/pure' -else - require 'json/ext' -end - -class BC_Generator < Bullshit::TimeCase - include JSON - - warmup true - duration 10 - - def setup - a = [ nil, false, true, "fÖßÄr", [ "n€st€d", true ], { "fooß" => "bär", "quux" => true } ] - puts JSON[a] - @big = a * 100 - end - - def benchmark_generator_fast - @result = JSON.fast_generate(@big) - end - - def reset_benchmark_generator_fast - @result and @result.size > 2 + 6 * @big.size or raise @result.to_s - end - - def benchmark_generator_safe - @result = JSON.generate(@big) - end - - def reset_benchmark_generator_safe - @result and @result.size > 2 + 6 * @big.size or raise @result.to_s - end - - def benchmark_generator_pretty - @result = JSON.pretty_generate(@big) - end - - def reset_benchmark_generator_pretty - @result and @result.size > 2 + 6 * @big.size or raise @result.to_s - end - - compare :generator_fast, :generator_safe, :generator_pretty -end diff --git a/vendor/json-1.1.2/benchmarks/benchmark_parser.rb b/vendor/json-1.1.2/benchmarks/benchmark_parser.rb deleted file mode 100644 index 486cbaa32..000000000 --- a/vendor/json-1.1.2/benchmarks/benchmark_parser.rb +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env ruby - -require 'bullshit' -if ARGV.shift == 'pure' - require 'json/pure' -else - require 'json/ext' -end - -class BC_Parser < Bullshit::TimeCase - include JSON - - warmup true - duration 10 - - def setup - a = [ nil, false, true, "fÖß\nÄr", [ "n€st€d", true ], { "fooß" => "bär", "qu\r\nux" => true } ] - @big = a * 100 - @json = JSON.generate(@big) - end - - def benchmark_parser - a = JSON.parse(@json) - a == @big or raise "not equal" - end -end diff --git a/vendor/json-1.1.2/benchmarks/benchmark_rails.rb b/vendor/json-1.1.2/benchmarks/benchmark_rails.rb deleted file mode 100644 index a9afb0d80..000000000 --- a/vendor/json-1.1.2/benchmarks/benchmark_rails.rb +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env ruby - -require 'bullshit' -require 'active_support' - -class BC_Rails < Bullshit::TimeCase - warmup true - duration 10 - - def setup - a = [ nil, false, true, "fÖßÄr", [ "n€st€d", true ], { "fooß" => "bär", "quux" => true } ] - puts a.to_json - @big = a * 100 - end - - def benchmark_generator - @result = @big.to_json - end - - def reset_benchmark_generator - @result and @result.size > 2 + 6 * @big.size or raise @result.to_s - if stack = Thread.current[:json_reference_stack] - stack.clear - end - end -end diff --git a/vendor/json-1.1.2/bin/edit_json.rb b/vendor/json-1.1.2/bin/edit_json.rb deleted file mode 100644 index 234d78577..000000000 --- a/vendor/json-1.1.2/bin/edit_json.rb +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env ruby -$KCODE = 'U' -require 'json/editor' - -filename, encoding = ARGV -JSON::Editor.start(encoding) do |window| - if filename - window.file_open(filename) - end -end - # vim: set et sw=2 ts=2: diff --git a/vendor/json-1.1.2/bin/prettify_json.rb b/vendor/json-1.1.2/bin/prettify_json.rb deleted file mode 100644 index 3c08050c8..000000000 --- a/vendor/json-1.1.2/bin/prettify_json.rb +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env ruby -$KCODE = 'U' -require 'json' -require 'fileutils' -include FileUtils - -# Parses the argument array _args_, according to the pattern _s_, to -# retrieve the single character command line options from it. If _s_ is -# 'xy:' an option '-x' without an option argument is searched, and an -# option '-y foo' with an option argument ('foo'). -# -# An option hash is returned with all found options set to true or the -# found option argument. -def go(s, args = ARGV) - b, v = s.scan(/(.)(:?)/).inject([{},{}]) { |t,(o,a)| - t[a.empty? ? 0 : 1][o] = a.empty? ? false : nil - t - } - while a = args.shift - a !~ /\A-(.+)/ and args.unshift a and break - p = $1 - until p == '' - o = p.slice!(0, 1) - if v.key?(o) - v[o] = if p == '' then args.shift or break 1 else p end - break - elsif b.key?(o) - b[o] = true - else - args.unshift a - break 1 - end - end and break - end - b.merge(v) -end - -opts = go 'slhi:', args = ARGV.dup -if opts['h'] || opts['l'] && opts['s'] - puts < - - - Javascript Example - - - - - -

Fetching object from server

-
- Switch on Javascript! -
- - - diff --git a/vendor/json-1.1.2/data/prototype.js b/vendor/json-1.1.2/data/prototype.js deleted file mode 100644 index 5c7346294..000000000 --- a/vendor/json-1.1.2/data/prototype.js +++ /dev/null @@ -1,4184 +0,0 @@ -/* Prototype JavaScript framework, version 1.6.0 - * (c) 2005-2007 Sam Stephenson - * - * Prototype is freely distributable under the terms of an MIT-style license. - * For details, see the Prototype web site: http://www.prototypejs.org/ - * - *--------------------------------------------------------------------------*/ - -var Prototype = { - Version: '1.6.0', - - Browser: { - IE: !!(window.attachEvent && !window.opera), - Opera: !!window.opera, - WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1, - Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1, - MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/) - }, - - BrowserFeatures: { - XPath: !!document.evaluate, - ElementExtensions: !!window.HTMLElement, - SpecificElementExtensions: - document.createElement('div').__proto__ && - document.createElement('div').__proto__ !== - document.createElement('form').__proto__ - }, - - ScriptFragment: ']*>([\\S\\s]*?)<\/script>', - JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/, - - emptyFunction: function() { }, - K: function(x) { return x } -}; - -if (Prototype.Browser.MobileSafari) - Prototype.BrowserFeatures.SpecificElementExtensions = false; - -if (Prototype.Browser.WebKit) - Prototype.BrowserFeatures.XPath = false; - -/* Based on Alex Arnell's inheritance implementation. */ -var Class = { - create: function() { - var parent = null, properties = $A(arguments); - if (Object.isFunction(properties[0])) - parent = properties.shift(); - - function klass() { - this.initialize.apply(this, arguments); - } - - Object.extend(klass, Class.Methods); - klass.superclass = parent; - klass.subclasses = []; - - if (parent) { - var subclass = function() { }; - subclass.prototype = parent.prototype; - klass.prototype = new subclass; - parent.subclasses.push(klass); - } - - for (var i = 0; i < properties.length; i++) - klass.addMethods(properties[i]); - - if (!klass.prototype.initialize) - klass.prototype.initialize = Prototype.emptyFunction; - - klass.prototype.constructor = klass; - - return klass; - } -}; - -Class.Methods = { - addMethods: function(source) { - var ancestor = this.superclass && this.superclass.prototype; - var properties = Object.keys(source); - - if (!Object.keys({ toString: true }).length) - properties.push("toString", "valueOf"); - - for (var i = 0, length = properties.length; i < length; i++) { - var property = properties[i], value = source[property]; - if (ancestor && Object.isFunction(value) && - value.argumentNames().first() == "$super") { - var method = value, value = Object.extend((function(m) { - return function() { return ancestor[m].apply(this, arguments) }; - })(property).wrap(method), { - valueOf: function() { return method }, - toString: function() { return method.toString() } - }); - } - this.prototype[property] = value; - } - - return this; - } -}; - -var Abstract = { }; - -Object.extend = function(destination, source) { - for (var property in source) - destination[property] = source[property]; - return destination; -}; - -Object.extend(Object, { - inspect: function(object) { - try { - if (object === undefined) return 'undefined'; - if (object === null) return 'null'; - return object.inspect ? object.inspect() : object.toString(); - } catch (e) { - if (e instanceof RangeError) return '...'; - throw e; - } - }, - - toJSON: function(object) { - var type = typeof object; - switch (type) { - case 'undefined': - case 'function': - case 'unknown': return; - case 'boolean': return object.toString(); - } - - if (object === null) return 'null'; - if (object.toJSON) return object.toJSON(); - if (Object.isElement(object)) return; - - var results = []; - for (var property in object) { - var value = Object.toJSON(object[property]); - if (value !== undefined) - results.push(property.toJSON() + ': ' + value); - } - - return '{' + results.join(', ') + '}'; - }, - - toQueryString: function(object) { - return $H(object).toQueryString(); - }, - - toHTML: function(object) { - return object && object.toHTML ? object.toHTML() : String.interpret(object); - }, - - keys: function(object) { - var keys = []; - for (var property in object) - keys.push(property); - return keys; - }, - - values: function(object) { - var values = []; - for (var property in object) - values.push(object[property]); - return values; - }, - - clone: function(object) { - return Object.extend({ }, object); - }, - - isElement: function(object) { - return object && object.nodeType == 1; - }, - - isArray: function(object) { - return object && object.constructor === Array; - }, - - isHash: function(object) { - return object instanceof Hash; - }, - - isFunction: function(object) { - return typeof object == "function"; - }, - - isString: function(object) { - return typeof object == "string"; - }, - - isNumber: function(object) { - return typeof object == "number"; - }, - - isUndefined: function(object) { - return typeof object == "undefined"; - } -}); - -Object.extend(Function.prototype, { - argumentNames: function() { - var names = this.toString().match(/^[\s\(]*function[^(]*\((.*?)\)/)[1].split(",").invoke("strip"); - return names.length == 1 && !names[0] ? [] : names; - }, - - bind: function() { - if (arguments.length < 2 && arguments[0] === undefined) return this; - var __method = this, args = $A(arguments), object = args.shift(); - return function() { - return __method.apply(object, args.concat($A(arguments))); - } - }, - - bindAsEventListener: function() { - var __method = this, args = $A(arguments), object = args.shift(); - return function(event) { - return __method.apply(object, [event || window.event].concat(args)); - } - }, - - curry: function() { - if (!arguments.length) return this; - var __method = this, args = $A(arguments); - return function() { - return __method.apply(this, args.concat($A(arguments))); - } - }, - - delay: function() { - var __method = this, args = $A(arguments), timeout = args.shift() * 1000; - return window.setTimeout(function() { - return __method.apply(__method, args); - }, timeout); - }, - - wrap: function(wrapper) { - var __method = this; - return function() { - return wrapper.apply(this, [__method.bind(this)].concat($A(arguments))); - } - }, - - methodize: function() { - if (this._methodized) return this._methodized; - var __method = this; - return this._methodized = function() { - return __method.apply(null, [this].concat($A(arguments))); - }; - } -}); - -Function.prototype.defer = Function.prototype.delay.curry(0.01); - -Date.prototype.toJSON = function() { - return '"' + this.getUTCFullYear() + '-' + - (this.getUTCMonth() + 1).toPaddedString(2) + '-' + - this.getUTCDate().toPaddedString(2) + 'T' + - this.getUTCHours().toPaddedString(2) + ':' + - this.getUTCMinutes().toPaddedString(2) + ':' + - this.getUTCSeconds().toPaddedString(2) + 'Z"'; -}; - -var Try = { - these: function() { - var returnValue; - - for (var i = 0, length = arguments.length; i < length; i++) { - var lambda = arguments[i]; - try { - returnValue = lambda(); - break; - } catch (e) { } - } - - return returnValue; - } -}; - -RegExp.prototype.match = RegExp.prototype.test; - -RegExp.escape = function(str) { - return String(str).replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); -}; - -/*--------------------------------------------------------------------------*/ - -var PeriodicalExecuter = Class.create({ - initialize: function(callback, frequency) { - this.callback = callback; - this.frequency = frequency; - this.currentlyExecuting = false; - - this.registerCallback(); - }, - - registerCallback: function() { - this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000); - }, - - execute: function() { - this.callback(this); - }, - - stop: function() { - if (!this.timer) return; - clearInterval(this.timer); - this.timer = null; - }, - - onTimerEvent: function() { - if (!this.currentlyExecuting) { - try { - this.currentlyExecuting = true; - this.execute(); - } finally { - this.currentlyExecuting = false; - } - } - } -}); -Object.extend(String, { - interpret: function(value) { - return value == null ? '' : String(value); - }, - specialChar: { - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '\\': '\\\\' - } -}); - -Object.extend(String.prototype, { - gsub: function(pattern, replacement) { - var result = '', source = this, match; - replacement = arguments.callee.prepareReplacement(replacement); - - while (source.length > 0) { - if (match = source.match(pattern)) { - result += source.slice(0, match.index); - result += String.interpret(replacement(match)); - source = source.slice(match.index + match[0].length); - } else { - result += source, source = ''; - } - } - return result; - }, - - sub: function(pattern, replacement, count) { - replacement = this.gsub.prepareReplacement(replacement); - count = count === undefined ? 1 : count; - - return this.gsub(pattern, function(match) { - if (--count < 0) return match[0]; - return replacement(match); - }); - }, - - scan: function(pattern, iterator) { - this.gsub(pattern, iterator); - return String(this); - }, - - truncate: function(length, truncation) { - length = length || 30; - truncation = truncation === undefined ? '...' : truncation; - return this.length > length ? - this.slice(0, length - truncation.length) + truncation : String(this); - }, - - strip: function() { - return this.replace(/^\s+/, '').replace(/\s+$/, ''); - }, - - stripTags: function() { - return this.replace(/<\/?[^>]+>/gi, ''); - }, - - stripScripts: function() { - return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), ''); - }, - - extractScripts: function() { - var matchAll = new RegExp(Prototype.ScriptFragment, 'img'); - var matchOne = new RegExp(Prototype.ScriptFragment, 'im'); - return (this.match(matchAll) || []).map(function(scriptTag) { - return (scriptTag.match(matchOne) || ['', ''])[1]; - }); - }, - - evalScripts: function() { - return this.extractScripts().map(function(script) { return eval(script) }); - }, - - escapeHTML: function() { - var self = arguments.callee; - self.text.data = this; - return self.div.innerHTML; - }, - - unescapeHTML: function() { - var div = new Element('div'); - div.innerHTML = this.stripTags(); - return div.childNodes[0] ? (div.childNodes.length > 1 ? - $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) : - div.childNodes[0].nodeValue) : ''; - }, - - toQueryParams: function(separator) { - var match = this.strip().match(/([^?#]*)(#.*)?$/); - if (!match) return { }; - - return match[1].split(separator || '&').inject({ }, function(hash, pair) { - if ((pair = pair.split('='))[0]) { - var key = decodeURIComponent(pair.shift()); - var value = pair.length > 1 ? pair.join('=') : pair[0]; - if (value != undefined) value = decodeURIComponent(value); - - if (key in hash) { - if (!Object.isArray(hash[key])) hash[key] = [hash[key]]; - hash[key].push(value); - } - else hash[key] = value; - } - return hash; - }); - }, - - toArray: function() { - return this.split(''); - }, - - succ: function() { - return this.slice(0, this.length - 1) + - String.fromCharCode(this.charCodeAt(this.length - 1) + 1); - }, - - times: function(count) { - return count < 1 ? '' : new Array(count + 1).join(this); - }, - - camelize: function() { - var parts = this.split('-'), len = parts.length; - if (len == 1) return parts[0]; - - var camelized = this.charAt(0) == '-' - ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1) - : parts[0]; - - for (var i = 1; i < len; i++) - camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1); - - return camelized; - }, - - capitalize: function() { - return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase(); - }, - - underscore: function() { - return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase(); - }, - - dasherize: function() { - return this.gsub(/_/,'-'); - }, - - inspect: function(useDoubleQuotes) { - var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) { - var character = String.specialChar[match[0]]; - return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16); - }); - if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"'; - return "'" + escapedString.replace(/'/g, '\\\'') + "'"; - }, - - toJSON: function() { - return this.inspect(true); - }, - - unfilterJSON: function(filter) { - return this.sub(filter || Prototype.JSONFilter, '#{1}'); - }, - - isJSON: function() { - var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, ''); - return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str); - }, - - evalJSON: function(sanitize) { - var json = this.unfilterJSON(); - try { - if (!sanitize || json.isJSON()) return eval('(' + json + ')'); - } catch (e) { } - throw new SyntaxError('Badly formed JSON string: ' + this.inspect()); - }, - - include: function(pattern) { - return this.indexOf(pattern) > -1; - }, - - startsWith: function(pattern) { - return this.indexOf(pattern) === 0; - }, - - endsWith: function(pattern) { - var d = this.length - pattern.length; - return d >= 0 && this.lastIndexOf(pattern) === d; - }, - - empty: function() { - return this == ''; - }, - - blank: function() { - return /^\s*$/.test(this); - }, - - interpolate: function(object, pattern) { - return new Template(this, pattern).evaluate(object); - } -}); - -if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, { - escapeHTML: function() { - return this.replace(/&/g,'&').replace(//g,'>'); - }, - unescapeHTML: function() { - return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>'); - } -}); - -String.prototype.gsub.prepareReplacement = function(replacement) { - if (Object.isFunction(replacement)) return replacement; - var template = new Template(replacement); - return function(match) { return template.evaluate(match) }; -}; - -String.prototype.parseQuery = String.prototype.toQueryParams; - -Object.extend(String.prototype.escapeHTML, { - div: document.createElement('div'), - text: document.createTextNode('') -}); - -with (String.prototype.escapeHTML) div.appendChild(text); - -var Template = Class.create({ - initialize: function(template, pattern) { - this.template = template.toString(); - this.pattern = pattern || Template.Pattern; - }, - - evaluate: function(object) { - if (Object.isFunction(object.toTemplateReplacements)) - object = object.toTemplateReplacements(); - - return this.template.gsub(this.pattern, function(match) { - if (object == null) return ''; - - var before = match[1] || ''; - if (before == '\\') return match[2]; - - var ctx = object, expr = match[3]; - var pattern = /^([^.[]+|\[((?:.*?[^\\])?)\])(\.|\[|$)/, match = pattern.exec(expr); - if (match == null) return before; - - while (match != null) { - var comp = match[1].startsWith('[') ? match[2].gsub('\\\\]', ']') : match[1]; - ctx = ctx[comp]; - if (null == ctx || '' == match[3]) break; - expr = expr.substring('[' == match[3] ? match[1].length : match[0].length); - match = pattern.exec(expr); - } - - return before + String.interpret(ctx); - }.bind(this)); - } -}); -Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/; - -var $break = { }; - -var Enumerable = { - each: function(iterator, context) { - var index = 0; - iterator = iterator.bind(context); - try { - this._each(function(value) { - iterator(value, index++); - }); - } catch (e) { - if (e != $break) throw e; - } - return this; - }, - - eachSlice: function(number, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var index = -number, slices = [], array = this.toArray(); - while ((index += number) < array.length) - slices.push(array.slice(index, index+number)); - return slices.collect(iterator, context); - }, - - all: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = true; - this.each(function(value, index) { - result = result && !!iterator(value, index); - if (!result) throw $break; - }); - return result; - }, - - any: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result = false; - this.each(function(value, index) { - if (result = !!iterator(value, index)) - throw $break; - }); - return result; - }, - - collect: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - this.each(function(value, index) { - results.push(iterator(value, index)); - }); - return results; - }, - - detect: function(iterator, context) { - iterator = iterator.bind(context); - var result; - this.each(function(value, index) { - if (iterator(value, index)) { - result = value; - throw $break; - } - }); - return result; - }, - - findAll: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (iterator(value, index)) - results.push(value); - }); - return results; - }, - - grep: function(filter, iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var results = []; - - if (Object.isString(filter)) - filter = new RegExp(filter); - - this.each(function(value, index) { - if (filter.match(value)) - results.push(iterator(value, index)); - }); - return results; - }, - - include: function(object) { - if (Object.isFunction(this.indexOf)) - if (this.indexOf(object) != -1) return true; - - var found = false; - this.each(function(value) { - if (value == object) { - found = true; - throw $break; - } - }); - return found; - }, - - inGroupsOf: function(number, fillWith) { - fillWith = fillWith === undefined ? null : fillWith; - return this.eachSlice(number, function(slice) { - while(slice.length < number) slice.push(fillWith); - return slice; - }); - }, - - inject: function(memo, iterator, context) { - iterator = iterator.bind(context); - this.each(function(value, index) { - memo = iterator(memo, value, index); - }); - return memo; - }, - - invoke: function(method) { - var args = $A(arguments).slice(1); - return this.map(function(value) { - return value[method].apply(value, args); - }); - }, - - max: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == undefined || value >= result) - result = value; - }); - return result; - }, - - min: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var result; - this.each(function(value, index) { - value = iterator(value, index); - if (result == undefined || value < result) - result = value; - }); - return result; - }, - - partition: function(iterator, context) { - iterator = iterator ? iterator.bind(context) : Prototype.K; - var trues = [], falses = []; - this.each(function(value, index) { - (iterator(value, index) ? - trues : falses).push(value); - }); - return [trues, falses]; - }, - - pluck: function(property) { - var results = []; - this.each(function(value) { - results.push(value[property]); - }); - return results; - }, - - reject: function(iterator, context) { - iterator = iterator.bind(context); - var results = []; - this.each(function(value, index) { - if (!iterator(value, index)) - results.push(value); - }); - return results; - }, - - sortBy: function(iterator, context) { - iterator = iterator.bind(context); - return this.map(function(value, index) { - return {value: value, criteria: iterator(value, index)}; - }).sort(function(left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }).pluck('value'); - }, - - toArray: function() { - return this.map(); - }, - - zip: function() { - var iterator = Prototype.K, args = $A(arguments); - if (Object.isFunction(args.last())) - iterator = args.pop(); - - var collections = [this].concat(args).map($A); - return this.map(function(value, index) { - return iterator(collections.pluck(index)); - }); - }, - - size: function() { - return this.toArray().length; - }, - - inspect: function() { - return '#'; - } -}; - -Object.extend(Enumerable, { - map: Enumerable.collect, - find: Enumerable.detect, - select: Enumerable.findAll, - filter: Enumerable.findAll, - member: Enumerable.include, - entries: Enumerable.toArray, - every: Enumerable.all, - some: Enumerable.any -}); -function $A(iterable) { - if (!iterable) return []; - if (iterable.toArray) return iterable.toArray(); - var length = iterable.length, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; -} - -if (Prototype.Browser.WebKit) { - function $A(iterable) { - if (!iterable) return []; - if (!(Object.isFunction(iterable) && iterable == '[object NodeList]') && - iterable.toArray) return iterable.toArray(); - var length = iterable.length, results = new Array(length); - while (length--) results[length] = iterable[length]; - return results; - } -} - -Array.from = $A; - -Object.extend(Array.prototype, Enumerable); - -if (!Array.prototype._reverse) Array.prototype._reverse = Array.prototype.reverse; - -Object.extend(Array.prototype, { - _each: function(iterator) { - for (var i = 0, length = this.length; i < length; i++) - iterator(this[i]); - }, - - clear: function() { - this.length = 0; - return this; - }, - - first: function() { - return this[0]; - }, - - last: function() { - return this[this.length - 1]; - }, - - compact: function() { - return this.select(function(value) { - return value != null; - }); - }, - - flatten: function() { - return this.inject([], function(array, value) { - return array.concat(Object.isArray(value) ? - value.flatten() : [value]); - }); - }, - - without: function() { - var values = $A(arguments); - return this.select(function(value) { - return !values.include(value); - }); - }, - - reverse: function(inline) { - return (inline !== false ? this : this.toArray())._reverse(); - }, - - reduce: function() { - return this.length > 1 ? this : this[0]; - }, - - uniq: function(sorted) { - return this.inject([], function(array, value, index) { - if (0 == index || (sorted ? array.last() != value : !array.include(value))) - array.push(value); - return array; - }); - }, - - intersect: function(array) { - return this.uniq().findAll(function(item) { - return array.detect(function(value) { return item === value }); - }); - }, - - clone: function() { - return [].concat(this); - }, - - size: function() { - return this.length; - }, - - inspect: function() { - return '[' + this.map(Object.inspect).join(', ') + ']'; - }, - - toJSON: function() { - var results = []; - this.each(function(object) { - var value = Object.toJSON(object); - if (value !== undefined) results.push(value); - }); - return '[' + results.join(', ') + ']'; - } -}); - -// use native browser JS 1.6 implementation if available -if (Object.isFunction(Array.prototype.forEach)) - Array.prototype._each = Array.prototype.forEach; - -if (!Array.prototype.indexOf) Array.prototype.indexOf = function(item, i) { - i || (i = 0); - var length = this.length; - if (i < 0) i = length + i; - for (; i < length; i++) - if (this[i] === item) return i; - return -1; -}; - -if (!Array.prototype.lastIndexOf) Array.prototype.lastIndexOf = function(item, i) { - i = isNaN(i) ? this.length : (i < 0 ? this.length + i : i) + 1; - var n = this.slice(0, i).reverse().indexOf(item); - return (n < 0) ? n : i - n - 1; -}; - -Array.prototype.toArray = Array.prototype.clone; - -function $w(string) { - if (!Object.isString(string)) return []; - string = string.strip(); - return string ? string.split(/\s+/) : []; -} - -if (Prototype.Browser.Opera){ - Array.prototype.concat = function() { - var array = []; - for (var i = 0, length = this.length; i < length; i++) array.push(this[i]); - for (var i = 0, length = arguments.length; i < length; i++) { - if (Object.isArray(arguments[i])) { - for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++) - array.push(arguments[i][j]); - } else { - array.push(arguments[i]); - } - } - return array; - }; -} -Object.extend(Number.prototype, { - toColorPart: function() { - return this.toPaddedString(2, 16); - }, - - succ: function() { - return this + 1; - }, - - times: function(iterator) { - $R(0, this, true).each(iterator); - return this; - }, - - toPaddedString: function(length, radix) { - var string = this.toString(radix || 10); - return '0'.times(length - string.length) + string; - }, - - toJSON: function() { - return isFinite(this) ? this.toString() : 'null'; - } -}); - -$w('abs round ceil floor').each(function(method){ - Number.prototype[method] = Math[method].methodize(); -}); -function $H(object) { - return new Hash(object); -}; - -var Hash = Class.create(Enumerable, (function() { - if (function() { - var i = 0, Test = function(value) { this.key = value }; - Test.prototype.key = 'foo'; - for (var property in new Test('bar')) i++; - return i > 1; - }()) { - function each(iterator) { - var cache = []; - for (var key in this._object) { - var value = this._object[key]; - if (cache.include(key)) continue; - cache.push(key); - var pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - } - } else { - function each(iterator) { - for (var key in this._object) { - var value = this._object[key], pair = [key, value]; - pair.key = key; - pair.value = value; - iterator(pair); - } - } - } - - function toQueryPair(key, value) { - if (Object.isUndefined(value)) return key; - return key + '=' + encodeURIComponent(String.interpret(value)); - } - - return { - initialize: function(object) { - this._object = Object.isHash(object) ? object.toObject() : Object.clone(object); - }, - - _each: each, - - set: function(key, value) { - return this._object[key] = value; - }, - - get: function(key) { - return this._object[key]; - }, - - unset: function(key) { - var value = this._object[key]; - delete this._object[key]; - return value; - }, - - toObject: function() { - return Object.clone(this._object); - }, - - keys: function() { - return this.pluck('key'); - }, - - values: function() { - return this.pluck('value'); - }, - - index: function(value) { - var match = this.detect(function(pair) { - return pair.value === value; - }); - return match && match.key; - }, - - merge: function(object) { - return this.clone().update(object); - }, - - update: function(object) { - return new Hash(object).inject(this, function(result, pair) { - result.set(pair.key, pair.value); - return result; - }); - }, - - toQueryString: function() { - return this.map(function(pair) { - var key = encodeURIComponent(pair.key), values = pair.value; - - if (values && typeof values == 'object') { - if (Object.isArray(values)) - return values.map(toQueryPair.curry(key)).join('&'); - } - return toQueryPair(key, values); - }).join('&'); - }, - - inspect: function() { - return '#'; - }, - - toJSON: function() { - return Object.toJSON(this.toObject()); - }, - - clone: function() { - return new Hash(this); - } - } -})()); - -Hash.prototype.toTemplateReplacements = Hash.prototype.toObject; -Hash.from = $H; -var ObjectRange = Class.create(Enumerable, { - initialize: function(start, end, exclusive) { - this.start = start; - this.end = end; - this.exclusive = exclusive; - }, - - _each: function(iterator) { - var value = this.start; - while (this.include(value)) { - iterator(value); - value = value.succ(); - } - }, - - include: function(value) { - if (value < this.start) - return false; - if (this.exclusive) - return value < this.end; - return value <= this.end; - } -}); - -var $R = function(start, end, exclusive) { - return new ObjectRange(start, end, exclusive); -}; - -var Ajax = { - getTransport: function() { - return Try.these( - function() {return new XMLHttpRequest()}, - function() {return new ActiveXObject('Msxml2.XMLHTTP')}, - function() {return new ActiveXObject('Microsoft.XMLHTTP')} - ) || false; - }, - - activeRequestCount: 0 -}; - -Ajax.Responders = { - responders: [], - - _each: function(iterator) { - this.responders._each(iterator); - }, - - register: function(responder) { - if (!this.include(responder)) - this.responders.push(responder); - }, - - unregister: function(responder) { - this.responders = this.responders.without(responder); - }, - - dispatch: function(callback, request, transport, json) { - this.each(function(responder) { - if (Object.isFunction(responder[callback])) { - try { - responder[callback].apply(responder, [request, transport, json]); - } catch (e) { } - } - }); - } -}; - -Object.extend(Ajax.Responders, Enumerable); - -Ajax.Responders.register({ - onCreate: function() { Ajax.activeRequestCount++ }, - onComplete: function() { Ajax.activeRequestCount-- } -}); - -Ajax.Base = Class.create({ - initialize: function(options) { - this.options = { - method: 'post', - asynchronous: true, - contentType: 'application/x-www-form-urlencoded', - encoding: 'UTF-8', - parameters: '', - evalJSON: true, - evalJS: true - }; - Object.extend(this.options, options || { }); - - this.options.method = this.options.method.toLowerCase(); - if (Object.isString(this.options.parameters)) - this.options.parameters = this.options.parameters.toQueryParams(); - } -}); - -Ajax.Request = Class.create(Ajax.Base, { - _complete: false, - - initialize: function($super, url, options) { - $super(options); - this.transport = Ajax.getTransport(); - this.request(url); - }, - - request: function(url) { - this.url = url; - this.method = this.options.method; - var params = Object.clone(this.options.parameters); - - if (!['get', 'post'].include(this.method)) { - // simulate other verbs over post - params['_method'] = this.method; - this.method = 'post'; - } - - this.parameters = params; - - if (params = Object.toQueryString(params)) { - // when GET, append parameters to URL - if (this.method == 'get') - this.url += (this.url.include('?') ? '&' : '?') + params; - else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent)) - params += '&_='; - } - - try { - var response = new Ajax.Response(this); - if (this.options.onCreate) this.options.onCreate(response); - Ajax.Responders.dispatch('onCreate', this, response); - - this.transport.open(this.method.toUpperCase(), this.url, - this.options.asynchronous); - - if (this.options.asynchronous) this.respondToReadyState.bind(this).defer(1); - - this.transport.onreadystatechange = this.onStateChange.bind(this); - this.setRequestHeaders(); - - this.body = this.method == 'post' ? (this.options.postBody || params) : null; - this.transport.send(this.body); - - /* Force Firefox to handle ready state 4 for synchronous requests */ - if (!this.options.asynchronous && this.transport.overrideMimeType) - this.onStateChange(); - - } - catch (e) { - this.dispatchException(e); - } - }, - - onStateChange: function() { - var readyState = this.transport.readyState; - if (readyState > 1 && !((readyState == 4) && this._complete)) - this.respondToReadyState(this.transport.readyState); - }, - - setRequestHeaders: function() { - var headers = { - 'X-Requested-With': 'XMLHttpRequest', - 'X-Prototype-Version': Prototype.Version, - 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*' - }; - - if (this.method == 'post') { - headers['Content-type'] = this.options.contentType + - (this.options.encoding ? '; charset=' + this.options.encoding : ''); - - /* Force "Connection: close" for older Mozilla browsers to work - * around a bug where XMLHttpRequest sends an incorrect - * Content-length header. See Mozilla Bugzilla #246651. - */ - if (this.transport.overrideMimeType && - (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005) - headers['Connection'] = 'close'; - } - - // user-defined headers - if (typeof this.options.requestHeaders == 'object') { - var extras = this.options.requestHeaders; - - if (Object.isFunction(extras.push)) - for (var i = 0, length = extras.length; i < length; i += 2) - headers[extras[i]] = extras[i+1]; - else - $H(extras).each(function(pair) { headers[pair.key] = pair.value }); - } - - for (var name in headers) - this.transport.setRequestHeader(name, headers[name]); - }, - - success: function() { - var status = this.getStatus(); - return !status || (status >= 200 && status < 300); - }, - - getStatus: function() { - try { - return this.transport.status || 0; - } catch (e) { return 0 } - }, - - respondToReadyState: function(readyState) { - var state = Ajax.Request.Events[readyState], response = new Ajax.Response(this); - - if (state == 'Complete') { - try { - this._complete = true; - (this.options['on' + response.status] - || this.options['on' + (this.success() ? 'Success' : 'Failure')] - || Prototype.emptyFunction)(response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - var contentType = response.getHeader('Content-type'); - if (this.options.evalJS == 'force' - || (this.options.evalJS && contentType - && contentType.match(/^\s*(text|application)\/(x-)?(java|ecma)script(;.*)?\s*$/i))) - this.evalResponse(); - } - - try { - (this.options['on' + state] || Prototype.emptyFunction)(response, response.headerJSON); - Ajax.Responders.dispatch('on' + state, this, response, response.headerJSON); - } catch (e) { - this.dispatchException(e); - } - - if (state == 'Complete') { - // avoid memory leak in MSIE: clean up - this.transport.onreadystatechange = Prototype.emptyFunction; - } - }, - - getHeader: function(name) { - try { - return this.transport.getResponseHeader(name); - } catch (e) { return null } - }, - - evalResponse: function() { - try { - return eval((this.transport.responseText || '').unfilterJSON()); - } catch (e) { - this.dispatchException(e); - } - }, - - dispatchException: function(exception) { - (this.options.onException || Prototype.emptyFunction)(this, exception); - Ajax.Responders.dispatch('onException', this, exception); - } -}); - -Ajax.Request.Events = - ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; - -Ajax.Response = Class.create({ - initialize: function(request){ - this.request = request; - var transport = this.transport = request.transport, - readyState = this.readyState = transport.readyState; - - if((readyState > 2 && !Prototype.Browser.IE) || readyState == 4) { - this.status = this.getStatus(); - this.statusText = this.getStatusText(); - this.responseText = String.interpret(transport.responseText); - this.headerJSON = this._getHeaderJSON(); - } - - if(readyState == 4) { - var xml = transport.responseXML; - this.responseXML = xml === undefined ? null : xml; - this.responseJSON = this._getResponseJSON(); - } - }, - - status: 0, - statusText: '', - - getStatus: Ajax.Request.prototype.getStatus, - - getStatusText: function() { - try { - return this.transport.statusText || ''; - } catch (e) { return '' } - }, - - getHeader: Ajax.Request.prototype.getHeader, - - getAllHeaders: function() { - try { - return this.getAllResponseHeaders(); - } catch (e) { return null } - }, - - getResponseHeader: function(name) { - return this.transport.getResponseHeader(name); - }, - - getAllResponseHeaders: function() { - return this.transport.getAllResponseHeaders(); - }, - - _getHeaderJSON: function() { - var json = this.getHeader('X-JSON'); - if (!json) return null; - json = decodeURIComponent(escape(json)); - try { - return json.evalJSON(this.request.options.sanitizeJSON); - } catch (e) { - this.request.dispatchException(e); - } - }, - - _getResponseJSON: function() { - var options = this.request.options; - if (!options.evalJSON || (options.evalJSON != 'force' && - !(this.getHeader('Content-type') || '').include('application/json'))) - return null; - try { - return this.transport.responseText.evalJSON(options.sanitizeJSON); - } catch (e) { - this.request.dispatchException(e); - } - } -}); - -Ajax.Updater = Class.create(Ajax.Request, { - initialize: function($super, container, url, options) { - this.container = { - success: (container.success || container), - failure: (container.failure || (container.success ? null : container)) - }; - - options = options || { }; - var onComplete = options.onComplete; - options.onComplete = (function(response, param) { - this.updateContent(response.responseText); - if (Object.isFunction(onComplete)) onComplete(response, param); - }).bind(this); - - $super(url, options); - }, - - updateContent: function(responseText) { - var receiver = this.container[this.success() ? 'success' : 'failure'], - options = this.options; - - if (!options.evalScripts) responseText = responseText.stripScripts(); - - if (receiver = $(receiver)) { - if (options.insertion) { - if (Object.isString(options.insertion)) { - var insertion = { }; insertion[options.insertion] = responseText; - receiver.insert(insertion); - } - else options.insertion(receiver, responseText); - } - else receiver.update(responseText); - } - - if (this.success()) { - if (this.onComplete) this.onComplete.bind(this).defer(); - } - } -}); - -Ajax.PeriodicalUpdater = Class.create(Ajax.Base, { - initialize: function($super, container, url, options) { - $super(options); - this.onComplete = this.options.onComplete; - - this.frequency = (this.options.frequency || 2); - this.decay = (this.options.decay || 1); - - this.updater = { }; - this.container = container; - this.url = url; - - this.start(); - }, - - start: function() { - this.options.onComplete = this.updateComplete.bind(this); - this.onTimerEvent(); - }, - - stop: function() { - this.updater.options.onComplete = undefined; - clearTimeout(this.timer); - (this.onComplete || Prototype.emptyFunction).apply(this, arguments); - }, - - updateComplete: function(response) { - if (this.options.decay) { - this.decay = (response.responseText == this.lastText ? - this.decay * this.options.decay : 1); - - this.lastText = response.responseText; - } - this.timer = this.onTimerEvent.bind(this).delay(this.decay * this.frequency); - }, - - onTimerEvent: function() { - this.updater = new Ajax.Updater(this.container, this.url, this.options); - } -}); -function $(element) { - if (arguments.length > 1) { - for (var i = 0, elements = [], length = arguments.length; i < length; i++) - elements.push($(arguments[i])); - return elements; - } - if (Object.isString(element)) - element = document.getElementById(element); - return Element.extend(element); -} - -if (Prototype.BrowserFeatures.XPath) { - document._getElementsByXPath = function(expression, parentElement) { - var results = []; - var query = document.evaluate(expression, $(parentElement) || document, - null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); - for (var i = 0, length = query.snapshotLength; i < length; i++) - results.push(Element.extend(query.snapshotItem(i))); - return results; - }; -} - -/*--------------------------------------------------------------------------*/ - -if (!window.Node) var Node = { }; - -if (!Node.ELEMENT_NODE) { - // DOM level 2 ECMAScript Language Binding - Object.extend(Node, { - ELEMENT_NODE: 1, - ATTRIBUTE_NODE: 2, - TEXT_NODE: 3, - CDATA_SECTION_NODE: 4, - ENTITY_REFERENCE_NODE: 5, - ENTITY_NODE: 6, - PROCESSING_INSTRUCTION_NODE: 7, - COMMENT_NODE: 8, - DOCUMENT_NODE: 9, - DOCUMENT_TYPE_NODE: 10, - DOCUMENT_FRAGMENT_NODE: 11, - NOTATION_NODE: 12 - }); -} - -(function() { - var element = this.Element; - this.Element = function(tagName, attributes) { - attributes = attributes || { }; - tagName = tagName.toLowerCase(); - var cache = Element.cache; - if (Prototype.Browser.IE && attributes.name) { - tagName = '<' + tagName + ' name="' + attributes.name + '">'; - delete attributes.name; - return Element.writeAttribute(document.createElement(tagName), attributes); - } - if (!cache[tagName]) cache[tagName] = Element.extend(document.createElement(tagName)); - return Element.writeAttribute(cache[tagName].cloneNode(false), attributes); - }; - Object.extend(this.Element, element || { }); -}).call(window); - -Element.cache = { }; - -Element.Methods = { - visible: function(element) { - return $(element).style.display != 'none'; - }, - - toggle: function(element) { - element = $(element); - Element[Element.visible(element) ? 'hide' : 'show'](element); - return element; - }, - - hide: function(element) { - $(element).style.display = 'none'; - return element; - }, - - show: function(element) { - $(element).style.display = ''; - return element; - }, - - remove: function(element) { - element = $(element); - element.parentNode.removeChild(element); - return element; - }, - - update: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - content = Object.toHTML(content); - element.innerHTML = content.stripScripts(); - content.evalScripts.bind(content).defer(); - return element; - }, - - replace: function(element, content) { - element = $(element); - if (content && content.toElement) content = content.toElement(); - else if (!Object.isElement(content)) { - content = Object.toHTML(content); - var range = element.ownerDocument.createRange(); - range.selectNode(element); - content.evalScripts.bind(content).defer(); - content = range.createContextualFragment(content.stripScripts()); - } - element.parentNode.replaceChild(content, element); - return element; - }, - - insert: function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = {bottom:insertions}; - - var content, t, range; - - for (position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - t = Element._insertionTranslations[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - t.insert(element, content); - continue; - } - - content = Object.toHTML(content); - - range = element.ownerDocument.createRange(); - t.initializeRange(element, range); - t.insert(element, range.createContextualFragment(content.stripScripts())); - - content.evalScripts.bind(content).defer(); - } - - return element; - }, - - wrap: function(element, wrapper, attributes) { - element = $(element); - if (Object.isElement(wrapper)) - $(wrapper).writeAttribute(attributes || { }); - else if (Object.isString(wrapper)) wrapper = new Element(wrapper, attributes); - else wrapper = new Element('div', wrapper); - if (element.parentNode) - element.parentNode.replaceChild(wrapper, element); - wrapper.appendChild(element); - return wrapper; - }, - - inspect: function(element) { - element = $(element); - var result = '<' + element.tagName.toLowerCase(); - $H({'id': 'id', 'className': 'class'}).each(function(pair) { - var property = pair.first(), attribute = pair.last(); - var value = (element[property] || '').toString(); - if (value) result += ' ' + attribute + '=' + value.inspect(true); - }); - return result + '>'; - }, - - recursivelyCollect: function(element, property) { - element = $(element); - var elements = []; - while (element = element[property]) - if (element.nodeType == 1) - elements.push(Element.extend(element)); - return elements; - }, - - ancestors: function(element) { - return $(element).recursivelyCollect('parentNode'); - }, - - descendants: function(element) { - return $A($(element).getElementsByTagName('*')).each(Element.extend); - }, - - firstDescendant: function(element) { - element = $(element).firstChild; - while (element && element.nodeType != 1) element = element.nextSibling; - return $(element); - }, - - immediateDescendants: function(element) { - if (!(element = $(element).firstChild)) return []; - while (element && element.nodeType != 1) element = element.nextSibling; - if (element) return [element].concat($(element).nextSiblings()); - return []; - }, - - previousSiblings: function(element) { - return $(element).recursivelyCollect('previousSibling'); - }, - - nextSiblings: function(element) { - return $(element).recursivelyCollect('nextSibling'); - }, - - siblings: function(element) { - element = $(element); - return element.previousSiblings().reverse().concat(element.nextSiblings()); - }, - - match: function(element, selector) { - if (Object.isString(selector)) - selector = new Selector(selector); - return selector.match($(element)); - }, - - up: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(element.parentNode); - var ancestors = element.ancestors(); - return expression ? Selector.findElement(ancestors, expression, index) : - ancestors[index || 0]; - }, - - down: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return element.firstDescendant(); - var descendants = element.descendants(); - return expression ? Selector.findElement(descendants, expression, index) : - descendants[index || 0]; - }, - - previous: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element)); - var previousSiblings = element.previousSiblings(); - return expression ? Selector.findElement(previousSiblings, expression, index) : - previousSiblings[index || 0]; - }, - - next: function(element, expression, index) { - element = $(element); - if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element)); - var nextSiblings = element.nextSiblings(); - return expression ? Selector.findElement(nextSiblings, expression, index) : - nextSiblings[index || 0]; - }, - - select: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element, args); - }, - - adjacent: function() { - var args = $A(arguments), element = $(args.shift()); - return Selector.findChildElements(element.parentNode, args).without(element); - }, - - identify: function(element) { - element = $(element); - var id = element.readAttribute('id'), self = arguments.callee; - if (id) return id; - do { id = 'anonymous_element_' + self.counter++ } while ($(id)); - element.writeAttribute('id', id); - return id; - }, - - readAttribute: function(element, name) { - element = $(element); - if (Prototype.Browser.IE) { - var t = Element._attributeTranslations.read; - if (t.values[name]) return t.values[name](element, name); - if (t.names[name]) name = t.names[name]; - if (name.include(':')) { - return (!element.attributes || !element.attributes[name]) ? null : - element.attributes[name].value; - } - } - return element.getAttribute(name); - }, - - writeAttribute: function(element, name, value) { - element = $(element); - var attributes = { }, t = Element._attributeTranslations.write; - - if (typeof name == 'object') attributes = name; - else attributes[name] = value === undefined ? true : value; - - for (var attr in attributes) { - var name = t.names[attr] || attr, value = attributes[attr]; - if (t.values[attr]) name = t.values[attr](element, value); - if (value === false || value === null) - element.removeAttribute(name); - else if (value === true) - element.setAttribute(name, name); - else element.setAttribute(name, value); - } - return element; - }, - - getHeight: function(element) { - return $(element).getDimensions().height; - }, - - getWidth: function(element) { - return $(element).getDimensions().width; - }, - - classNames: function(element) { - return new Element.ClassNames(element); - }, - - hasClassName: function(element, className) { - if (!(element = $(element))) return; - var elementClassName = element.className; - return (elementClassName.length > 0 && (elementClassName == className || - new RegExp("(^|\\s)" + className + "(\\s|$)").test(elementClassName))); - }, - - addClassName: function(element, className) { - if (!(element = $(element))) return; - if (!element.hasClassName(className)) - element.className += (element.className ? ' ' : '') + className; - return element; - }, - - removeClassName: function(element, className) { - if (!(element = $(element))) return; - element.className = element.className.replace( - new RegExp("(^|\\s+)" + className + "(\\s+|$)"), ' ').strip(); - return element; - }, - - toggleClassName: function(element, className) { - if (!(element = $(element))) return; - return element[element.hasClassName(className) ? - 'removeClassName' : 'addClassName'](className); - }, - - // removes whitespace-only text node children - cleanWhitespace: function(element) { - element = $(element); - var node = element.firstChild; - while (node) { - var nextNode = node.nextSibling; - if (node.nodeType == 3 && !/\S/.test(node.nodeValue)) - element.removeChild(node); - node = nextNode; - } - return element; - }, - - empty: function(element) { - return $(element).innerHTML.blank(); - }, - - descendantOf: function(element, ancestor) { - element = $(element), ancestor = $(ancestor); - - if (element.compareDocumentPosition) - return (element.compareDocumentPosition(ancestor) & 8) === 8; - - if (element.sourceIndex && !Prototype.Browser.Opera) { - var e = element.sourceIndex, a = ancestor.sourceIndex, - nextAncestor = ancestor.nextSibling; - if (!nextAncestor) { - do { ancestor = ancestor.parentNode; } - while (!(nextAncestor = ancestor.nextSibling) && ancestor.parentNode); - } - if (nextAncestor) return (e > a && e < nextAncestor.sourceIndex); - } - - while (element = element.parentNode) - if (element == ancestor) return true; - return false; - }, - - scrollTo: function(element) { - element = $(element); - var pos = element.cumulativeOffset(); - window.scrollTo(pos[0], pos[1]); - return element; - }, - - getStyle: function(element, style) { - element = $(element); - style = style == 'float' ? 'cssFloat' : style.camelize(); - var value = element.style[style]; - if (!value) { - var css = document.defaultView.getComputedStyle(element, null); - value = css ? css[style] : null; - } - if (style == 'opacity') return value ? parseFloat(value) : 1.0; - return value == 'auto' ? null : value; - }, - - getOpacity: function(element) { - return $(element).getStyle('opacity'); - }, - - setStyle: function(element, styles) { - element = $(element); - var elementStyle = element.style, match; - if (Object.isString(styles)) { - element.style.cssText += ';' + styles; - return styles.include('opacity') ? - element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element; - } - for (var property in styles) - if (property == 'opacity') element.setOpacity(styles[property]); - else - elementStyle[(property == 'float' || property == 'cssFloat') ? - (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') : - property] = styles[property]; - - return element; - }, - - setOpacity: function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - return element; - }, - - getDimensions: function(element) { - element = $(element); - var display = $(element).getStyle('display'); - if (display != 'none' && display != null) // Safari bug - return {width: element.offsetWidth, height: element.offsetHeight}; - - // All *Width and *Height properties give 0 on elements with display none, - // so enable the element temporarily - var els = element.style; - var originalVisibility = els.visibility; - var originalPosition = els.position; - var originalDisplay = els.display; - els.visibility = 'hidden'; - els.position = 'absolute'; - els.display = 'block'; - var originalWidth = element.clientWidth; - var originalHeight = element.clientHeight; - els.display = originalDisplay; - els.position = originalPosition; - els.visibility = originalVisibility; - return {width: originalWidth, height: originalHeight}; - }, - - makePositioned: function(element) { - element = $(element); - var pos = Element.getStyle(element, 'position'); - if (pos == 'static' || !pos) { - element._madePositioned = true; - element.style.position = 'relative'; - // Opera returns the offset relative to the positioning context, when an - // element is position relative but top and left have not been defined - if (window.opera) { - element.style.top = 0; - element.style.left = 0; - } - } - return element; - }, - - undoPositioned: function(element) { - element = $(element); - if (element._madePositioned) { - element._madePositioned = undefined; - element.style.position = - element.style.top = - element.style.left = - element.style.bottom = - element.style.right = ''; - } - return element; - }, - - makeClipping: function(element) { - element = $(element); - if (element._overflow) return element; - element._overflow = Element.getStyle(element, 'overflow') || 'auto'; - if (element._overflow !== 'hidden') - element.style.overflow = 'hidden'; - return element; - }, - - undoClipping: function(element) { - element = $(element); - if (!element._overflow) return element; - element.style.overflow = element._overflow == 'auto' ? '' : element._overflow; - element._overflow = null; - return element; - }, - - cumulativeOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - positionedOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - element = element.offsetParent; - if (element) { - if (element.tagName == 'BODY') break; - var p = Element.getStyle(element, 'position'); - if (p == 'relative' || p == 'absolute') break; - } - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - absolutize: function(element) { - element = $(element); - if (element.getStyle('position') == 'absolute') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - var offsets = element.positionedOffset(); - var top = offsets[1]; - var left = offsets[0]; - var width = element.clientWidth; - var height = element.clientHeight; - - element._originalLeft = left - parseFloat(element.style.left || 0); - element._originalTop = top - parseFloat(element.style.top || 0); - element._originalWidth = element.style.width; - element._originalHeight = element.style.height; - - element.style.position = 'absolute'; - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.width = width + 'px'; - element.style.height = height + 'px'; - return element; - }, - - relativize: function(element) { - element = $(element); - if (element.getStyle('position') == 'relative') return; - // Position.prepare(); // To be done manually by Scripty when it needs it. - - element.style.position = 'relative'; - var top = parseFloat(element.style.top || 0) - (element._originalTop || 0); - var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0); - - element.style.top = top + 'px'; - element.style.left = left + 'px'; - element.style.height = element._originalHeight; - element.style.width = element._originalWidth; - return element; - }, - - cumulativeScrollOffset: function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.scrollTop || 0; - valueL += element.scrollLeft || 0; - element = element.parentNode; - } while (element); - return Element._returnOffset(valueL, valueT); - }, - - getOffsetParent: function(element) { - if (element.offsetParent) return $(element.offsetParent); - if (element == document.body) return $(element); - - while ((element = element.parentNode) && element != document.body) - if (Element.getStyle(element, 'position') != 'static') - return $(element); - - return $(document.body); - }, - - viewportOffset: function(forElement) { - var valueT = 0, valueL = 0; - - var element = forElement; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - - // Safari fix - if (element.offsetParent == document.body && - Element.getStyle(element, 'position') == 'absolute') break; - - } while (element = element.offsetParent); - - element = forElement; - do { - if (!Prototype.Browser.Opera || element.tagName == 'BODY') { - valueT -= element.scrollTop || 0; - valueL -= element.scrollLeft || 0; - } - } while (element = element.parentNode); - - return Element._returnOffset(valueL, valueT); - }, - - clonePosition: function(element, source) { - var options = Object.extend({ - setLeft: true, - setTop: true, - setWidth: true, - setHeight: true, - offsetTop: 0, - offsetLeft: 0 - }, arguments[2] || { }); - - // find page position of source - source = $(source); - var p = source.viewportOffset(); - - // find coordinate system to use - element = $(element); - var delta = [0, 0]; - var parent = null; - // delta [0,0] will do fine with position: fixed elements, - // position:absolute needs offsetParent deltas - if (Element.getStyle(element, 'position') == 'absolute') { - parent = element.getOffsetParent(); - delta = parent.viewportOffset(); - } - - // correct by body offsets (fixes Safari) - if (parent == document.body) { - delta[0] -= document.body.offsetLeft; - delta[1] -= document.body.offsetTop; - } - - // set position - if (options.setLeft) element.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px'; - if (options.setTop) element.style.top = (p[1] - delta[1] + options.offsetTop) + 'px'; - if (options.setWidth) element.style.width = source.offsetWidth + 'px'; - if (options.setHeight) element.style.height = source.offsetHeight + 'px'; - return element; - } -}; - -Element.Methods.identify.counter = 1; - -Object.extend(Element.Methods, { - getElementsBySelector: Element.Methods.select, - childElements: Element.Methods.immediateDescendants -}); - -Element._attributeTranslations = { - write: { - names: { - className: 'class', - htmlFor: 'for' - }, - values: { } - } -}; - - -if (!document.createRange || Prototype.Browser.Opera) { - Element.Methods.insert = function(element, insertions) { - element = $(element); - - if (Object.isString(insertions) || Object.isNumber(insertions) || - Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) - insertions = { bottom: insertions }; - - var t = Element._insertionTranslations, content, position, pos, tagName; - - for (position in insertions) { - content = insertions[position]; - position = position.toLowerCase(); - pos = t[position]; - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - pos.insert(element, content); - continue; - } - - content = Object.toHTML(content); - tagName = ((position == 'before' || position == 'after') - ? element.parentNode : element).tagName.toUpperCase(); - - if (t.tags[tagName]) { - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - if (position == 'top' || position == 'after') fragments.reverse(); - fragments.each(pos.insert.curry(element)); - } - else element.insertAdjacentHTML(pos.adjacency, content.stripScripts()); - - content.evalScripts.bind(content).defer(); - } - - return element; - }; -} - -if (Prototype.Browser.Opera) { - Element.Methods._getStyle = Element.Methods.getStyle; - Element.Methods.getStyle = function(element, style) { - switch(style) { - case 'left': - case 'top': - case 'right': - case 'bottom': - if (Element._getStyle(element, 'position') == 'static') return null; - default: return Element._getStyle(element, style); - } - }; - Element.Methods._readAttribute = Element.Methods.readAttribute; - Element.Methods.readAttribute = function(element, attribute) { - if (attribute == 'title') return element.title; - return Element._readAttribute(element, attribute); - }; -} - -else if (Prototype.Browser.IE) { - $w('positionedOffset getOffsetParent viewportOffset').each(function(method) { - Element.Methods[method] = Element.Methods[method].wrap( - function(proceed, element) { - element = $(element); - var position = element.getStyle('position'); - if (position != 'static') return proceed(element); - element.setStyle({ position: 'relative' }); - var value = proceed(element); - element.setStyle({ position: position }); - return value; - } - ); - }); - - Element.Methods.getStyle = function(element, style) { - element = $(element); - style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize(); - var value = element.style[style]; - if (!value && element.currentStyle) value = element.currentStyle[style]; - - if (style == 'opacity') { - if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/)) - if (value[1]) return parseFloat(value[1]) / 100; - return 1.0; - } - - if (value == 'auto') { - if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none')) - return element['offset' + style.capitalize()] + 'px'; - return null; - } - return value; - }; - - Element.Methods.setOpacity = function(element, value) { - function stripAlpha(filter){ - return filter.replace(/alpha\([^\)]*\)/gi,''); - } - element = $(element); - var currentStyle = element.currentStyle; - if ((currentStyle && !currentStyle.hasLayout) || - (!currentStyle && element.style.zoom == 'normal')) - element.style.zoom = 1; - - var filter = element.getStyle('filter'), style = element.style; - if (value == 1 || value === '') { - (filter = stripAlpha(filter)) ? - style.filter = filter : style.removeAttribute('filter'); - return element; - } else if (value < 0.00001) value = 0; - style.filter = stripAlpha(filter) + - 'alpha(opacity=' + (value * 100) + ')'; - return element; - }; - - Element._attributeTranslations = { - read: { - names: { - 'class': 'className', - 'for': 'htmlFor' - }, - values: { - _getAttr: function(element, attribute) { - return element.getAttribute(attribute, 2); - }, - _getAttrNode: function(element, attribute) { - var node = element.getAttributeNode(attribute); - return node ? node.value : ""; - }, - _getEv: function(element, attribute) { - var attribute = element.getAttribute(attribute); - return attribute ? attribute.toString().slice(23, -2) : null; - }, - _flag: function(element, attribute) { - return $(element).hasAttribute(attribute) ? attribute : null; - }, - style: function(element) { - return element.style.cssText.toLowerCase(); - }, - title: function(element) { - return element.title; - } - } - } - }; - - Element._attributeTranslations.write = { - names: Object.clone(Element._attributeTranslations.read.names), - values: { - checked: function(element, value) { - element.checked = !!value; - }, - - style: function(element, value) { - element.style.cssText = value ? value : ''; - } - } - }; - - Element._attributeTranslations.has = {}; - - $w('colSpan rowSpan vAlign dateTime accessKey tabIndex ' + - 'encType maxLength readOnly longDesc').each(function(attr) { - Element._attributeTranslations.write.names[attr.toLowerCase()] = attr; - Element._attributeTranslations.has[attr.toLowerCase()] = attr; - }); - - (function(v) { - Object.extend(v, { - href: v._getAttr, - src: v._getAttr, - type: v._getAttr, - action: v._getAttrNode, - disabled: v._flag, - checked: v._flag, - readonly: v._flag, - multiple: v._flag, - onload: v._getEv, - onunload: v._getEv, - onclick: v._getEv, - ondblclick: v._getEv, - onmousedown: v._getEv, - onmouseup: v._getEv, - onmouseover: v._getEv, - onmousemove: v._getEv, - onmouseout: v._getEv, - onfocus: v._getEv, - onblur: v._getEv, - onkeypress: v._getEv, - onkeydown: v._getEv, - onkeyup: v._getEv, - onsubmit: v._getEv, - onreset: v._getEv, - onselect: v._getEv, - onchange: v._getEv - }); - })(Element._attributeTranslations.read.values); -} - -else if (Prototype.Browser.Gecko && /rv:1\.8\.0/.test(navigator.userAgent)) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1) ? 0.999999 : - (value === '') ? '' : (value < 0.00001) ? 0 : value; - return element; - }; -} - -else if (Prototype.Browser.WebKit) { - Element.Methods.setOpacity = function(element, value) { - element = $(element); - element.style.opacity = (value == 1 || value === '') ? '' : - (value < 0.00001) ? 0 : value; - - if (value == 1) - if(element.tagName == 'IMG' && element.width) { - element.width++; element.width--; - } else try { - var n = document.createTextNode(' '); - element.appendChild(n); - element.removeChild(n); - } catch (e) { } - - return element; - }; - - // Safari returns margins on body which is incorrect if the child is absolutely - // positioned. For performance reasons, redefine Position.cumulativeOffset for - // KHTML/WebKit only. - Element.Methods.cumulativeOffset = function(element) { - var valueT = 0, valueL = 0; - do { - valueT += element.offsetTop || 0; - valueL += element.offsetLeft || 0; - if (element.offsetParent == document.body) - if (Element.getStyle(element, 'position') == 'absolute') break; - - element = element.offsetParent; - } while (element); - - return Element._returnOffset(valueL, valueT); - }; -} - -if (Prototype.Browser.IE || Prototype.Browser.Opera) { - // IE and Opera are missing .innerHTML support for TABLE-related and SELECT elements - Element.Methods.update = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) return element.update().insert(content); - - content = Object.toHTML(content); - var tagName = element.tagName.toUpperCase(); - - if (tagName in Element._insertionTranslations.tags) { - $A(element.childNodes).each(function(node) { element.removeChild(node) }); - Element._getContentFromAnonymousElement(tagName, content.stripScripts()) - .each(function(node) { element.appendChild(node) }); - } - else element.innerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -if (document.createElement('div').outerHTML) { - Element.Methods.replace = function(element, content) { - element = $(element); - - if (content && content.toElement) content = content.toElement(); - if (Object.isElement(content)) { - element.parentNode.replaceChild(content, element); - return element; - } - - content = Object.toHTML(content); - var parent = element.parentNode, tagName = parent.tagName.toUpperCase(); - - if (Element._insertionTranslations.tags[tagName]) { - var nextSibling = element.next(); - var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); - parent.removeChild(element); - if (nextSibling) - fragments.each(function(node) { parent.insertBefore(node, nextSibling) }); - else - fragments.each(function(node) { parent.appendChild(node) }); - } - else element.outerHTML = content.stripScripts(); - - content.evalScripts.bind(content).defer(); - return element; - }; -} - -Element._returnOffset = function(l, t) { - var result = [l, t]; - result.left = l; - result.top = t; - return result; -}; - -Element._getContentFromAnonymousElement = function(tagName, html) { - var div = new Element('div'), t = Element._insertionTranslations.tags[tagName]; - div.innerHTML = t[0] + html + t[1]; - t[2].times(function() { div = div.firstChild }); - return $A(div.childNodes); -}; - -Element._insertionTranslations = { - before: { - adjacency: 'beforeBegin', - insert: function(element, node) { - element.parentNode.insertBefore(node, element); - }, - initializeRange: function(element, range) { - range.setStartBefore(element); - } - }, - top: { - adjacency: 'afterBegin', - insert: function(element, node) { - element.insertBefore(node, element.firstChild); - }, - initializeRange: function(element, range) { - range.selectNodeContents(element); - range.collapse(true); - } - }, - bottom: { - adjacency: 'beforeEnd', - insert: function(element, node) { - element.appendChild(node); - } - }, - after: { - adjacency: 'afterEnd', - insert: function(element, node) { - element.parentNode.insertBefore(node, element.nextSibling); - }, - initializeRange: function(element, range) { - range.setStartAfter(element); - } - }, - tags: { - TABLE: ['', '
', 1], - TBODY: ['', '
', 2], - TR: ['', '
', 3], - TD: ['
', '
', 4], - SELECT: ['', 1] - } -}; - -(function() { - this.bottom.initializeRange = this.top.initializeRange; - Object.extend(this.tags, { - THEAD: this.tags.TBODY, - TFOOT: this.tags.TBODY, - TH: this.tags.TD - }); -}).call(Element._insertionTranslations); - -Element.Methods.Simulated = { - hasAttribute: function(element, attribute) { - attribute = Element._attributeTranslations.has[attribute] || attribute; - var node = $(element).getAttributeNode(attribute); - return node && node.specified; - } -}; - -Element.Methods.ByTag = { }; - -Object.extend(Element, Element.Methods); - -if (!Prototype.BrowserFeatures.ElementExtensions && - document.createElement('div').__proto__) { - window.HTMLElement = { }; - window.HTMLElement.prototype = document.createElement('div').__proto__; - Prototype.BrowserFeatures.ElementExtensions = true; -} - -Element.extend = (function() { - if (Prototype.BrowserFeatures.SpecificElementExtensions) - return Prototype.K; - - var Methods = { }, ByTag = Element.Methods.ByTag; - - var extend = Object.extend(function(element) { - if (!element || element._extendedByPrototype || - element.nodeType != 1 || element == window) return element; - - var methods = Object.clone(Methods), - tagName = element.tagName, property, value; - - // extend methods for specific tags - if (ByTag[tagName]) Object.extend(methods, ByTag[tagName]); - - for (property in methods) { - value = methods[property]; - if (Object.isFunction(value) && !(property in element)) - element[property] = value.methodize(); - } - - element._extendedByPrototype = Prototype.emptyFunction; - return element; - - }, { - refresh: function() { - // extend methods for all tags (Safari doesn't need this) - if (!Prototype.BrowserFeatures.ElementExtensions) { - Object.extend(Methods, Element.Methods); - Object.extend(Methods, Element.Methods.Simulated); - } - } - }); - - extend.refresh(); - return extend; -})(); - -Element.hasAttribute = function(element, attribute) { - if (element.hasAttribute) return element.hasAttribute(attribute); - return Element.Methods.Simulated.hasAttribute(element, attribute); -}; - -Element.addMethods = function(methods) { - var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag; - - if (!methods) { - Object.extend(Form, Form.Methods); - Object.extend(Form.Element, Form.Element.Methods); - Object.extend(Element.Methods.ByTag, { - "FORM": Object.clone(Form.Methods), - "INPUT": Object.clone(Form.Element.Methods), - "SELECT": Object.clone(Form.Element.Methods), - "TEXTAREA": Object.clone(Form.Element.Methods) - }); - } - - if (arguments.length == 2) { - var tagName = methods; - methods = arguments[1]; - } - - if (!tagName) Object.extend(Element.Methods, methods || { }); - else { - if (Object.isArray(tagName)) tagName.each(extend); - else extend(tagName); - } - - function extend(tagName) { - tagName = tagName.toUpperCase(); - if (!Element.Methods.ByTag[tagName]) - Element.Methods.ByTag[tagName] = { }; - Object.extend(Element.Methods.ByTag[tagName], methods); - } - - function copy(methods, destination, onlyIfAbsent) { - onlyIfAbsent = onlyIfAbsent || false; - for (var property in methods) { - var value = methods[property]; - if (!Object.isFunction(value)) continue; - if (!onlyIfAbsent || !(property in destination)) - destination[property] = value.methodize(); - } - } - - function findDOMClass(tagName) { - var klass; - var trans = { - "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph", - "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList", - "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading", - "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote", - "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION": - "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD": - "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR": - "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET": - "FrameSet", "IFRAME": "IFrame" - }; - if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName + 'Element'; - if (window[klass]) return window[klass]; - klass = 'HTML' + tagName.capitalize() + 'Element'; - if (window[klass]) return window[klass]; - - window[klass] = { }; - window[klass].prototype = document.createElement(tagName).__proto__; - return window[klass]; - } - - if (F.ElementExtensions) { - copy(Element.Methods, HTMLElement.prototype); - copy(Element.Methods.Simulated, HTMLElement.prototype, true); - } - - if (F.SpecificElementExtensions) { - for (var tag in Element.Methods.ByTag) { - var klass = findDOMClass(tag); - if (Object.isUndefined(klass)) continue; - copy(T[tag], klass.prototype); - } - } - - Object.extend(Element, Element.Methods); - delete Element.ByTag; - - if (Element.extend.refresh) Element.extend.refresh(); - Element.cache = { }; -}; - -document.viewport = { - getDimensions: function() { - var dimensions = { }; - $w('width height').each(function(d) { - var D = d.capitalize(); - dimensions[d] = self['inner' + D] || - (document.documentElement['client' + D] || document.body['client' + D]); - }); - return dimensions; - }, - - getWidth: function() { - return this.getDimensions().width; - }, - - getHeight: function() { - return this.getDimensions().height; - }, - - getScrollOffsets: function() { - return Element._returnOffset( - window.pageXOffset || document.documentElement.scrollLeft || document.body.scrollLeft, - window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop); - } -}; -/* Portions of the Selector class are derived from Jack Slocum’s DomQuery, - * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style - * license. Please see http://www.yui-ext.com/ for more information. */ - -var Selector = Class.create({ - initialize: function(expression) { - this.expression = expression.strip(); - this.compileMatcher(); - }, - - compileMatcher: function() { - // Selectors with namespaced attributes can't use the XPath version - if (Prototype.BrowserFeatures.XPath && !(/(\[[\w-]*?:|:checked)/).test(this.expression)) - return this.compileXPathMatcher(); - - var e = this.expression, ps = Selector.patterns, h = Selector.handlers, - c = Selector.criteria, le, p, m; - - if (Selector._cache[e]) { - this.matcher = Selector._cache[e]; - return; - } - - this.matcher = ["this.matcher = function(root) {", - "var r = root, h = Selector.handlers, c = false, n;"]; - - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - this.matcher.push(Object.isFunction(c[i]) ? c[i](m) : - new Template(c[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.matcher.push("return h.unique(n);\n}"); - eval(this.matcher.join('\n')); - Selector._cache[this.expression] = this.matcher; - }, - - compileXPathMatcher: function() { - var e = this.expression, ps = Selector.patterns, - x = Selector.xpath, le, m; - - if (Selector._cache[e]) { - this.xpath = Selector._cache[e]; return; - } - - this.matcher = ['.//*']; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - if (m = e.match(ps[i])) { - this.matcher.push(Object.isFunction(x[i]) ? x[i](m) : - new Template(x[i]).evaluate(m)); - e = e.replace(m[0], ''); - break; - } - } - } - - this.xpath = this.matcher.join(''); - Selector._cache[this.expression] = this.xpath; - }, - - findElements: function(root) { - root = root || document; - if (this.xpath) return document._getElementsByXPath(this.xpath, root); - return this.matcher(root); - }, - - match: function(element) { - this.tokens = []; - - var e = this.expression, ps = Selector.patterns, as = Selector.assertions; - var le, p, m; - - while (e && le !== e && (/\S/).test(e)) { - le = e; - for (var i in ps) { - p = ps[i]; - if (m = e.match(p)) { - // use the Selector.assertions methods unless the selector - // is too complex. - if (as[i]) { - this.tokens.push([i, Object.clone(m)]); - e = e.replace(m[0], ''); - } else { - // reluctantly do a document-wide search - // and look for a match in the array - return this.findElements(document).include(element); - } - } - } - } - - var match = true, name, matches; - for (var i = 0, token; token = this.tokens[i]; i++) { - name = token[0], matches = token[1]; - if (!Selector.assertions[name](element, matches)) { - match = false; break; - } - } - - return match; - }, - - toString: function() { - return this.expression; - }, - - inspect: function() { - return "#"; - } -}); - -Object.extend(Selector, { - _cache: { }, - - xpath: { - descendant: "//*", - child: "/*", - adjacent: "/following-sibling::*[1]", - laterSibling: '/following-sibling::*', - tagName: function(m) { - if (m[1] == '*') return ''; - return "[local-name()='" + m[1].toLowerCase() + - "' or local-name()='" + m[1].toUpperCase() + "']"; - }, - className: "[contains(concat(' ', @class, ' '), ' #{1} ')]", - id: "[@id='#{1}']", - attrPresence: "[@#{1}]", - attr: function(m) { - m[3] = m[5] || m[6]; - return new Template(Selector.xpath.operators[m[2]]).evaluate(m); - }, - pseudo: function(m) { - var h = Selector.xpath.pseudos[m[1]]; - if (!h) return ''; - if (Object.isFunction(h)) return h(m); - return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m); - }, - operators: { - '=': "[@#{1}='#{3}']", - '!=': "[@#{1}!='#{3}']", - '^=': "[starts-with(@#{1}, '#{3}')]", - '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']", - '*=': "[contains(@#{1}, '#{3}')]", - '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]", - '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]" - }, - pseudos: { - 'first-child': '[not(preceding-sibling::*)]', - 'last-child': '[not(following-sibling::*)]', - 'only-child': '[not(preceding-sibling::* or following-sibling::*)]', - 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]", - 'checked': "[@checked]", - 'disabled': "[@disabled]", - 'enabled': "[not(@disabled)]", - 'not': function(m) { - var e = m[6], p = Selector.patterns, - x = Selector.xpath, le, m, v; - - var exclusion = []; - while (e && le != e && (/\S/).test(e)) { - le = e; - for (var i in p) { - if (m = e.match(p[i])) { - v = Object.isFunction(x[i]) ? x[i](m) : new Template(x[i]).evaluate(m); - exclusion.push("(" + v.substring(1, v.length - 1) + ")"); - e = e.replace(m[0], ''); - break; - } - } - } - return "[not(" + exclusion.join(" and ") + ")]"; - }, - 'nth-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m); - }, - 'nth-last-child': function(m) { - return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m); - }, - 'nth-of-type': function(m) { - return Selector.xpath.pseudos.nth("position() ", m); - }, - 'nth-last-of-type': function(m) { - return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m); - }, - 'first-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m); - }, - 'last-of-type': function(m) { - m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m); - }, - 'only-of-type': function(m) { - var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m); - }, - nth: function(fragment, m) { - var mm, formula = m[6], predicate; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - if (mm = formula.match(/^(\d+)$/)) // digit only - return '[' + fragment + "= " + mm[1] + ']'; - if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (mm[1] == "-") mm[1] = -1; - var a = mm[1] ? Number(mm[1]) : 1; - var b = mm[2] ? Number(mm[2]) : 0; - predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " + - "((#{fragment} - #{b}) div #{a} >= 0)]"; - return new Template(predicate).evaluate({ - fragment: fragment, a: a, b: b }); - } - } - } - }, - - criteria: { - tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;', - className: 'n = h.className(n, r, "#{1}", c); c = false;', - id: 'n = h.id(n, r, "#{1}", c); c = false;', - attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;', - attr: function(m) { - m[3] = (m[5] || m[6]); - return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m); - }, - pseudo: function(m) { - if (m[6]) m[6] = m[6].replace(/"/g, '\\"'); - return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m); - }, - descendant: 'c = "descendant";', - child: 'c = "child";', - adjacent: 'c = "adjacent";', - laterSibling: 'c = "laterSibling";' - }, - - patterns: { - // combinators must be listed first - // (and descendant needs to be last combinator) - laterSibling: /^\s*~\s*/, - child: /^\s*>\s*/, - adjacent: /^\s*\+\s*/, - descendant: /^\s/, - - // selectors follow - tagName: /^\s*(\*|[\w\-]+)(\b|$)?/, - id: /^#([\w\-\*]+)(\b|$)/, - className: /^\.([\w\-\*]+)(\b|$)/, - pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|(?=\s)|(?=:))/, - attrPresence: /^\[([\w]+)\]/, - attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\4]*?)\4|([^'"][^\]]*?)))?\]/ - }, - - // for Selector.match and Element#match - assertions: { - tagName: function(element, matches) { - return matches[1].toUpperCase() == element.tagName.toUpperCase(); - }, - - className: function(element, matches) { - return Element.hasClassName(element, matches[1]); - }, - - id: function(element, matches) { - return element.id === matches[1]; - }, - - attrPresence: function(element, matches) { - return Element.hasAttribute(element, matches[1]); - }, - - attr: function(element, matches) { - var nodeValue = Element.readAttribute(element, matches[1]); - return Selector.operators[matches[2]](nodeValue, matches[3]); - } - }, - - handlers: { - // UTILITY FUNCTIONS - // joins two collections - concat: function(a, b) { - for (var i = 0, node; node = b[i]; i++) - a.push(node); - return a; - }, - - // marks an array of nodes for counting - mark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._counted = true; - return nodes; - }, - - unmark: function(nodes) { - for (var i = 0, node; node = nodes[i]; i++) - node._counted = undefined; - return nodes; - }, - - // mark each child node with its position (for nth calls) - // "ofType" flag indicates whether we're indexing for nth-of-type - // rather than nth-child - index: function(parentNode, reverse, ofType) { - parentNode._counted = true; - if (reverse) { - for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) { - var node = nodes[i]; - if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; - } - } else { - for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++) - if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++; - } - }, - - // filters out duplicates and extends all nodes - unique: function(nodes) { - if (nodes.length == 0) return nodes; - var results = [], n; - for (var i = 0, l = nodes.length; i < l; i++) - if (!(n = nodes[i])._counted) { - n._counted = true; - results.push(Element.extend(n)); - } - return Selector.handlers.unmark(results); - }, - - // COMBINATOR FUNCTIONS - descendant: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName('*')); - return results; - }, - - child: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) { - for (var j = 0, children = [], child; child = node.childNodes[j]; j++) - if (child.nodeType == 1 && child.tagName != '!') results.push(child); - } - return results; - }, - - adjacent: function(nodes) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - var next = this.nextElementSibling(node); - if (next) results.push(next); - } - return results; - }, - - laterSibling: function(nodes) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - h.concat(results, Element.nextSiblings(node)); - return results; - }, - - nextElementSibling: function(node) { - while (node = node.nextSibling) - if (node.nodeType == 1) return node; - return null; - }, - - previousElementSibling: function(node) { - while (node = node.previousSibling) - if (node.nodeType == 1) return node; - return null; - }, - - // TOKEN FUNCTIONS - tagName: function(nodes, root, tagName, combinator) { - tagName = tagName.toUpperCase(); - var results = [], h = Selector.handlers; - if (nodes) { - if (combinator) { - // fastlane for ordinary descendant combinators - if (combinator == "descendant") { - for (var i = 0, node; node = nodes[i]; i++) - h.concat(results, node.getElementsByTagName(tagName)); - return results; - } else nodes = this[combinator](nodes); - if (tagName == "*") return nodes; - } - for (var i = 0, node; node = nodes[i]; i++) - if (node.tagName.toUpperCase() == tagName) results.push(node); - return results; - } else return root.getElementsByTagName(tagName); - }, - - id: function(nodes, root, id, combinator) { - var targetNode = $(id), h = Selector.handlers; - if (!targetNode) return []; - if (!nodes && root == document) return [targetNode]; - if (nodes) { - if (combinator) { - if (combinator == 'child') { - for (var i = 0, node; node = nodes[i]; i++) - if (targetNode.parentNode == node) return [targetNode]; - } else if (combinator == 'descendant') { - for (var i = 0, node; node = nodes[i]; i++) - if (Element.descendantOf(targetNode, node)) return [targetNode]; - } else if (combinator == 'adjacent') { - for (var i = 0, node; node = nodes[i]; i++) - if (Selector.handlers.previousElementSibling(targetNode) == node) - return [targetNode]; - } else nodes = h[combinator](nodes); - } - for (var i = 0, node; node = nodes[i]; i++) - if (node == targetNode) return [targetNode]; - return []; - } - return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : []; - }, - - className: function(nodes, root, className, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - return Selector.handlers.byClassName(nodes, root, className); - }, - - byClassName: function(nodes, root, className) { - if (!nodes) nodes = Selector.handlers.descendant([root]); - var needle = ' ' + className + ' '; - for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { - nodeClassName = node.className; - if (nodeClassName.length == 0) continue; - if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) - results.push(node); - } - return results; - }, - - attrPresence: function(nodes, root, attr) { - if (!nodes) nodes = root.getElementsByTagName("*"); - var results = []; - for (var i = 0, node; node = nodes[i]; i++) - if (Element.hasAttribute(node, attr)) results.push(node); - return results; - }, - - attr: function(nodes, root, attr, value, operator) { - if (!nodes) nodes = root.getElementsByTagName("*"); - var handler = Selector.operators[operator], results = []; - for (var i = 0, node; node = nodes[i]; i++) { - var nodeValue = Element.readAttribute(node, attr); - if (nodeValue === null) continue; - if (handler(nodeValue, value)) results.push(node); - } - return results; - }, - - pseudo: function(nodes, name, value, root, combinator) { - if (nodes && combinator) nodes = this[combinator](nodes); - if (!nodes) nodes = root.getElementsByTagName("*"); - return Selector.pseudos[name](nodes, value, root); - } - }, - - pseudos: { - 'first-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.previousElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'last-child': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - if (Selector.handlers.nextElementSibling(node)) continue; - results.push(node); - } - return results; - }, - 'only-child': function(nodes, value, root) { - var h = Selector.handlers; - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!h.previousElementSibling(node) && !h.nextElementSibling(node)) - results.push(node); - return results; - }, - 'nth-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root); - }, - 'nth-last-child': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true); - }, - 'nth-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, false, true); - }, - 'nth-last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, formula, root, true, true); - }, - 'first-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, false, true); - }, - 'last-of-type': function(nodes, formula, root) { - return Selector.pseudos.nth(nodes, "1", root, true, true); - }, - 'only-of-type': function(nodes, formula, root) { - var p = Selector.pseudos; - return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root); - }, - - // handles the an+b logic - getIndices: function(a, b, total) { - if (a == 0) return b > 0 ? [b] : []; - return $R(1, total).inject([], function(memo, i) { - if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i); - return memo; - }); - }, - - // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type - nth: function(nodes, formula, root, reverse, ofType) { - if (nodes.length == 0) return []; - if (formula == 'even') formula = '2n+0'; - if (formula == 'odd') formula = '2n+1'; - var h = Selector.handlers, results = [], indexed = [], m; - h.mark(nodes); - for (var i = 0, node; node = nodes[i]; i++) { - if (!node.parentNode._counted) { - h.index(node.parentNode, reverse, ofType); - indexed.push(node.parentNode); - } - } - if (formula.match(/^\d+$/)) { // just a number - formula = Number(formula); - for (var i = 0, node; node = nodes[i]; i++) - if (node.nodeIndex == formula) results.push(node); - } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b - if (m[1] == "-") m[1] = -1; - var a = m[1] ? Number(m[1]) : 1; - var b = m[2] ? Number(m[2]) : 0; - var indices = Selector.pseudos.getIndices(a, b, nodes.length); - for (var i = 0, node, l = indices.length; node = nodes[i]; i++) { - for (var j = 0; j < l; j++) - if (node.nodeIndex == indices[j]) results.push(node); - } - } - h.unmark(nodes); - h.unmark(indexed); - return results; - }, - - 'empty': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) { - // IE treats comments as element nodes - if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue; - results.push(node); - } - return results; - }, - - 'not': function(nodes, selector, root) { - var h = Selector.handlers, selectorType, m; - var exclusions = new Selector(selector).findElements(root); - h.mark(exclusions); - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node._counted) results.push(node); - h.unmark(exclusions); - return results; - }, - - 'enabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (!node.disabled) results.push(node); - return results; - }, - - 'disabled': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.disabled) results.push(node); - return results; - }, - - 'checked': function(nodes, value, root) { - for (var i = 0, results = [], node; node = nodes[i]; i++) - if (node.checked) results.push(node); - return results; - } - }, - - operators: { - '=': function(nv, v) { return nv == v; }, - '!=': function(nv, v) { return nv != v; }, - '^=': function(nv, v) { return nv.startsWith(v); }, - '$=': function(nv, v) { return nv.endsWith(v); }, - '*=': function(nv, v) { return nv.include(v); }, - '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); }, - '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); } - }, - - matchElements: function(elements, expression) { - var matches = new Selector(expression).findElements(), h = Selector.handlers; - h.mark(matches); - for (var i = 0, results = [], element; element = elements[i]; i++) - if (element._counted) results.push(element); - h.unmark(matches); - return results; - }, - - findElement: function(elements, expression, index) { - if (Object.isNumber(expression)) { - index = expression; expression = false; - } - return Selector.matchElements(elements, expression || '*')[index || 0]; - }, - - findChildElements: function(element, expressions) { - var exprs = expressions.join(','), expressions = []; - exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) { - expressions.push(m[1].strip()); - }); - var results = [], h = Selector.handlers; - for (var i = 0, l = expressions.length, selector; i < l; i++) { - selector = new Selector(expressions[i].strip()); - h.concat(results, selector.findElements(element)); - } - return (l > 1) ? h.unique(results) : results; - } -}); - -function $$() { - return Selector.findChildElements(document, $A(arguments)); -} -var Form = { - reset: function(form) { - $(form).reset(); - return form; - }, - - serializeElements: function(elements, options) { - if (typeof options != 'object') options = { hash: !!options }; - else if (options.hash === undefined) options.hash = true; - var key, value, submitted = false, submit = options.submit; - - var data = elements.inject({ }, function(result, element) { - if (!element.disabled && element.name) { - key = element.name; value = $(element).getValue(); - if (value != null && (element.type != 'submit' || (!submitted && - submit !== false && (!submit || key == submit) && (submitted = true)))) { - if (key in result) { - // a key is already present; construct an array of values - if (!Object.isArray(result[key])) result[key] = [result[key]]; - result[key].push(value); - } - else result[key] = value; - } - } - return result; - }); - - return options.hash ? data : Object.toQueryString(data); - } -}; - -Form.Methods = { - serialize: function(form, options) { - return Form.serializeElements(Form.getElements(form), options); - }, - - getElements: function(form) { - return $A($(form).getElementsByTagName('*')).inject([], - function(elements, child) { - if (Form.Element.Serializers[child.tagName.toLowerCase()]) - elements.push(Element.extend(child)); - return elements; - } - ); - }, - - getInputs: function(form, typeName, name) { - form = $(form); - var inputs = form.getElementsByTagName('input'); - - if (!typeName && !name) return $A(inputs).map(Element.extend); - - for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) { - var input = inputs[i]; - if ((typeName && input.type != typeName) || (name && input.name != name)) - continue; - matchingInputs.push(Element.extend(input)); - } - - return matchingInputs; - }, - - disable: function(form) { - form = $(form); - Form.getElements(form).invoke('disable'); - return form; - }, - - enable: function(form) { - form = $(form); - Form.getElements(form).invoke('enable'); - return form; - }, - - findFirstElement: function(form) { - var elements = $(form).getElements().findAll(function(element) { - return 'hidden' != element.type && !element.disabled; - }); - var firstByIndex = elements.findAll(function(element) { - return element.hasAttribute('tabIndex') && element.tabIndex >= 0; - }).sortBy(function(element) { return element.tabIndex }).first(); - - return firstByIndex ? firstByIndex : elements.find(function(element) { - return ['input', 'select', 'textarea'].include(element.tagName.toLowerCase()); - }); - }, - - focusFirstElement: function(form) { - form = $(form); - form.findFirstElement().activate(); - return form; - }, - - request: function(form, options) { - form = $(form), options = Object.clone(options || { }); - - var params = options.parameters, action = form.readAttribute('action') || ''; - if (action.blank()) action = window.location.href; - options.parameters = form.serialize(true); - - if (params) { - if (Object.isString(params)) params = params.toQueryParams(); - Object.extend(options.parameters, params); - } - - if (form.hasAttribute('method') && !options.method) - options.method = form.method; - - return new Ajax.Request(action, options); - } -}; - -/*--------------------------------------------------------------------------*/ - -Form.Element = { - focus: function(element) { - $(element).focus(); - return element; - }, - - select: function(element) { - $(element).select(); - return element; - } -}; - -Form.Element.Methods = { - serialize: function(element) { - element = $(element); - if (!element.disabled && element.name) { - var value = element.getValue(); - if (value != undefined) { - var pair = { }; - pair[element.name] = value; - return Object.toQueryString(pair); - } - } - return ''; - }, - - getValue: function(element) { - element = $(element); - var method = element.tagName.toLowerCase(); - return Form.Element.Serializers[method](element); - }, - - setValue: function(element, value) { - element = $(element); - var method = element.tagName.toLowerCase(); - Form.Element.Serializers[method](element, value); - return element; - }, - - clear: function(element) { - $(element).value = ''; - return element; - }, - - present: function(element) { - return $(element).value != ''; - }, - - activate: function(element) { - element = $(element); - try { - element.focus(); - if (element.select && (element.tagName.toLowerCase() != 'input' || - !['button', 'reset', 'submit'].include(element.type))) - element.select(); - } catch (e) { } - return element; - }, - - disable: function(element) { - element = $(element); - element.blur(); - element.disabled = true; - return element; - }, - - enable: function(element) { - element = $(element); - element.disabled = false; - return element; - } -}; - -/*--------------------------------------------------------------------------*/ - -var Field = Form.Element; -var $F = Form.Element.Methods.getValue; - -/*--------------------------------------------------------------------------*/ - -Form.Element.Serializers = { - input: function(element, value) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - return Form.Element.Serializers.inputSelector(element, value); - default: - return Form.Element.Serializers.textarea(element, value); - } - }, - - inputSelector: function(element, value) { - if (value === undefined) return element.checked ? element.value : null; - else element.checked = !!value; - }, - - textarea: function(element, value) { - if (value === undefined) return element.value; - else element.value = value; - }, - - select: function(element, index) { - if (index === undefined) - return this[element.type == 'select-one' ? - 'selectOne' : 'selectMany'](element); - else { - var opt, value, single = !Object.isArray(index); - for (var i = 0, length = element.length; i < length; i++) { - opt = element.options[i]; - value = this.optionValue(opt); - if (single) { - if (value == index) { - opt.selected = true; - return; - } - } - else opt.selected = index.include(value); - } - } - }, - - selectOne: function(element) { - var index = element.selectedIndex; - return index >= 0 ? this.optionValue(element.options[index]) : null; - }, - - selectMany: function(element) { - var values, length = element.length; - if (!length) return null; - - for (var i = 0, values = []; i < length; i++) { - var opt = element.options[i]; - if (opt.selected) values.push(this.optionValue(opt)); - } - return values; - }, - - optionValue: function(opt) { - // extend element because hasAttribute may not be native - return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text; - } -}; - -/*--------------------------------------------------------------------------*/ - -Abstract.TimedObserver = Class.create(PeriodicalExecuter, { - initialize: function($super, element, frequency, callback) { - $super(callback, frequency); - this.element = $(element); - this.lastValue = this.getValue(); - }, - - execute: function() { - var value = this.getValue(); - if (Object.isString(this.lastValue) && Object.isString(value) ? - this.lastValue != value : String(this.lastValue) != String(value)) { - this.callback(this.element, value); - this.lastValue = value; - } - } -}); - -Form.Element.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.Observer = Class.create(Abstract.TimedObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); - -/*--------------------------------------------------------------------------*/ - -Abstract.EventObserver = Class.create({ - initialize: function(element, callback) { - this.element = $(element); - this.callback = callback; - - this.lastValue = this.getValue(); - if (this.element.tagName.toLowerCase() == 'form') - this.registerFormCallbacks(); - else - this.registerCallback(this.element); - }, - - onElementEvent: function() { - var value = this.getValue(); - if (this.lastValue != value) { - this.callback(this.element, value); - this.lastValue = value; - } - }, - - registerFormCallbacks: function() { - Form.getElements(this.element).each(this.registerCallback, this); - }, - - registerCallback: function(element) { - if (element.type) { - switch (element.type.toLowerCase()) { - case 'checkbox': - case 'radio': - Event.observe(element, 'click', this.onElementEvent.bind(this)); - break; - default: - Event.observe(element, 'change', this.onElementEvent.bind(this)); - break; - } - } - } -}); - -Form.Element.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.Element.getValue(this.element); - } -}); - -Form.EventObserver = Class.create(Abstract.EventObserver, { - getValue: function() { - return Form.serialize(this.element); - } -}); -if (!window.Event) var Event = { }; - -Object.extend(Event, { - KEY_BACKSPACE: 8, - KEY_TAB: 9, - KEY_RETURN: 13, - KEY_ESC: 27, - KEY_LEFT: 37, - KEY_UP: 38, - KEY_RIGHT: 39, - KEY_DOWN: 40, - KEY_DELETE: 46, - KEY_HOME: 36, - KEY_END: 35, - KEY_PAGEUP: 33, - KEY_PAGEDOWN: 34, - KEY_INSERT: 45, - - cache: { }, - - relatedTarget: function(event) { - var element; - switch(event.type) { - case 'mouseover': element = event.fromElement; break; - case 'mouseout': element = event.toElement; break; - default: return null; - } - return Element.extend(element); - } -}); - -Event.Methods = (function() { - var isButton; - - if (Prototype.Browser.IE) { - var buttonMap = { 0: 1, 1: 4, 2: 2 }; - isButton = function(event, code) { - return event.button == buttonMap[code]; - }; - - } else if (Prototype.Browser.WebKit) { - isButton = function(event, code) { - switch (code) { - case 0: return event.which == 1 && !event.metaKey; - case 1: return event.which == 1 && event.metaKey; - default: return false; - } - }; - - } else { - isButton = function(event, code) { - return event.which ? (event.which === code + 1) : (event.button === code); - }; - } - - return { - isLeftClick: function(event) { return isButton(event, 0) }, - isMiddleClick: function(event) { return isButton(event, 1) }, - isRightClick: function(event) { return isButton(event, 2) }, - - element: function(event) { - var node = Event.extend(event).target; - return Element.extend(node.nodeType == Node.TEXT_NODE ? node.parentNode : node); - }, - - findElement: function(event, expression) { - var element = Event.element(event); - return element.match(expression) ? element : element.up(expression); - }, - - pointer: function(event) { - return { - x: event.pageX || (event.clientX + - (document.documentElement.scrollLeft || document.body.scrollLeft)), - y: event.pageY || (event.clientY + - (document.documentElement.scrollTop || document.body.scrollTop)) - }; - }, - - pointerX: function(event) { return Event.pointer(event).x }, - pointerY: function(event) { return Event.pointer(event).y }, - - stop: function(event) { - Event.extend(event); - event.preventDefault(); - event.stopPropagation(); - event.stopped = true; - } - }; -})(); - -Event.extend = (function() { - var methods = Object.keys(Event.Methods).inject({ }, function(m, name) { - m[name] = Event.Methods[name].methodize(); - return m; - }); - - if (Prototype.Browser.IE) { - Object.extend(methods, { - stopPropagation: function() { this.cancelBubble = true }, - preventDefault: function() { this.returnValue = false }, - inspect: function() { return "[object Event]" } - }); - - return function(event) { - if (!event) return false; - if (event._extendedByPrototype) return event; - - event._extendedByPrototype = Prototype.emptyFunction; - var pointer = Event.pointer(event); - Object.extend(event, { - target: event.srcElement, - relatedTarget: Event.relatedTarget(event), - pageX: pointer.x, - pageY: pointer.y - }); - return Object.extend(event, methods); - }; - - } else { - Event.prototype = Event.prototype || document.createEvent("HTMLEvents").__proto__; - Object.extend(Event.prototype, methods); - return Prototype.K; - } -})(); - -Object.extend(Event, (function() { - var cache = Event.cache; - - function getEventID(element) { - if (element._eventID) return element._eventID; - arguments.callee.id = arguments.callee.id || 1; - return element._eventID = ++arguments.callee.id; - } - - function getDOMEventName(eventName) { - if (eventName && eventName.include(':')) return "dataavailable"; - return eventName; - } - - function getCacheForID(id) { - return cache[id] = cache[id] || { }; - } - - function getWrappersForEventName(id, eventName) { - var c = getCacheForID(id); - return c[eventName] = c[eventName] || []; - } - - function createWrapper(element, eventName, handler) { - var id = getEventID(element); - var c = getWrappersForEventName(id, eventName); - if (c.pluck("handler").include(handler)) return false; - - var wrapper = function(event) { - if (!Event || !Event.extend || - (event.eventName && event.eventName != eventName)) - return false; - - Event.extend(event); - handler.call(element, event) - }; - - wrapper.handler = handler; - c.push(wrapper); - return wrapper; - } - - function findWrapper(id, eventName, handler) { - var c = getWrappersForEventName(id, eventName); - return c.find(function(wrapper) { return wrapper.handler == handler }); - } - - function destroyWrapper(id, eventName, handler) { - var c = getCacheForID(id); - if (!c[eventName]) return false; - c[eventName] = c[eventName].without(findWrapper(id, eventName, handler)); - } - - function destroyCache() { - for (var id in cache) - for (var eventName in cache[id]) - cache[id][eventName] = null; - } - - if (window.attachEvent) { - window.attachEvent("onunload", destroyCache); - } - - return { - observe: function(element, eventName, handler) { - element = $(element); - var name = getDOMEventName(eventName); - - var wrapper = createWrapper(element, eventName, handler); - if (!wrapper) return element; - - if (element.addEventListener) { - element.addEventListener(name, wrapper, false); - } else { - element.attachEvent("on" + name, wrapper); - } - - return element; - }, - - stopObserving: function(element, eventName, handler) { - element = $(element); - var id = getEventID(element), name = getDOMEventName(eventName); - - if (!handler && eventName) { - getWrappersForEventName(id, eventName).each(function(wrapper) { - element.stopObserving(eventName, wrapper.handler); - }); - return element; - - } else if (!eventName) { - Object.keys(getCacheForID(id)).each(function(eventName) { - element.stopObserving(eventName); - }); - return element; - } - - var wrapper = findWrapper(id, eventName, handler); - if (!wrapper) return element; - - if (element.removeEventListener) { - element.removeEventListener(name, wrapper, false); - } else { - element.detachEvent("on" + name, wrapper); - } - - destroyWrapper(id, eventName, handler); - - return element; - }, - - fire: function(element, eventName, memo) { - element = $(element); - if (element == document && document.createEvent && !element.dispatchEvent) - element = document.documentElement; - - if (document.createEvent) { - var event = document.createEvent("HTMLEvents"); - event.initEvent("dataavailable", true, true); - } else { - var event = document.createEventObject(); - event.eventType = "ondataavailable"; - } - - event.eventName = eventName; - event.memo = memo || { }; - - if (document.createEvent) { - element.dispatchEvent(event); - } else { - element.fireEvent(event.eventType, event); - } - - return event; - } - }; -})()); - -Object.extend(Event, Event.Methods); - -Element.addMethods({ - fire: Event.fire, - observe: Event.observe, - stopObserving: Event.stopObserving -}); - -Object.extend(document, { - fire: Element.Methods.fire.methodize(), - observe: Element.Methods.observe.methodize(), - stopObserving: Element.Methods.stopObserving.methodize() -}); - -(function() { - /* Support for the DOMContentLoaded event is based on work by Dan Webb, - Matthias Miller, Dean Edwards and John Resig. */ - - var timer, fired = false; - - function fireContentLoadedEvent() { - if (fired) return; - if (timer) window.clearInterval(timer); - document.fire("dom:loaded"); - fired = true; - } - - if (document.addEventListener) { - if (Prototype.Browser.WebKit) { - timer = window.setInterval(function() { - if (/loaded|complete/.test(document.readyState)) - fireContentLoadedEvent(); - }, 0); - - Event.observe(window, "load", fireContentLoadedEvent); - - } else { - document.addEventListener("DOMContentLoaded", - fireContentLoadedEvent, false); - } - - } else { - document.write(" - - - -
-

<%=h exception.class %> at <%=h path %>

-

<%=h exception.message %>

- - - - - - -
Ruby<%=h frames.first.filename %>: in <%=h frames.first.function %>, line <%=h frames.first.lineno %>
Web<%=h req.request_method %> <%=h(req.host + path)%>
- -

Jump to:

- -
- -
-

Traceback (innermost first)

-
    -<% frames.each { |frame| %> -
  • - <%=h frame.filename %>: in <%=h frame.function %> - - <% if frame.context_line %> -
    - <% if frame.pre_context %> -
      - <% frame.pre_context.each { |line| %> -
    1. <%=h line %>
    2. - <% } %> -
    - <% end %> - -
      -
    1. <%=h frame.context_line %>...
    - - <% if frame.post_context %> -
      - <% frame.post_context.each { |line| %> -
    1. <%=h line %>
    2. - <% } %> -
    - <% end %> -
    - <% end %> -
  • -<% } %> -
-
- -
-

Request information

- -

GET

- <% unless req.GET.empty? %> - - - - - - - - - <% req.GET.sort_by { |k, v| k.to_s }.each { |key, val| %> - - - - - <% } %> - -
VariableValue
<%=h key %>
<%=h val.inspect %>
- <% else %> -

No GET data.

- <% end %> - -

POST

- <% unless req.POST.empty? %> - - - - - - - - - <% req.POST.sort_by { |k, v| k.to_s }.each { |key, val| %> - - - - - <% } %> - -
VariableValue
<%=h key %>
<%=h val.inspect %>
- <% else %> -

No POST data.

- <% end %> - - - - <% unless req.cookies.empty? %> - - - - - - - - - <% req.cookies.each { |key, val| %> - - - - - <% } %> - -
VariableValue
<%=h key %>
<%=h val.inspect %>
- <% else %> -

No cookie data.

- <% end %> - -

Rack ENV

- - - - - - - - - <% env.sort_by { |k, v| k.to_s }.each { |key, val| %> - - - - - <% } %> - -
VariableValue
<%=h key %>
<%=h val %>
- -
- -
-

- You're seeing this error because you use Rack::ShowException. -

-
- - - -HTML - - # :startdoc: - end -end diff --git a/vendor/rack-0.9.1/lib/rack/showstatus.rb b/vendor/rack-0.9.1/lib/rack/showstatus.rb deleted file mode 100644 index 5f13404dc..000000000 --- a/vendor/rack-0.9.1/lib/rack/showstatus.rb +++ /dev/null @@ -1,106 +0,0 @@ -require 'erb' -require 'rack/request' -require 'rack/utils' - -module Rack - # Rack::ShowStatus catches all empty responses the app it wraps and - # replaces them with a site explaining the error. - # - # Additional details can be put into rack.showstatus.detail - # and will be shown as HTML. If such details exist, the error page - # is always rendered, even if the reply was not empty. - - class ShowStatus - def initialize(app) - @app = app - @template = ERB.new(TEMPLATE) - end - - def call(env) - status, headers, body = @app.call(env) - headers = Utils::HeaderHash.new(headers) - empty = headers['Content-Length'].to_i <= 0 - - # client or server error, or explicit message - if (status.to_i >= 400 && empty) || env["rack.showstatus.detail"] - req = Rack::Request.new(env) - message = Rack::Utils::HTTP_STATUS_CODES[status.to_i] || status.to_s - detail = env["rack.showstatus.detail"] || message - body = @template.result(binding) - size = body.respond_to?(:bytesize) ? body.bytesize : body.size - [status, headers.merge("Content-Type" => "text/html", "Content-Length" => size.to_s), [body]] - else - [status, headers, body] - end - end - - def h(obj) # :nodoc: - case obj - when String - Utils.escape_html(obj) - else - Utils.escape_html(obj.inspect) - end - end - - # :stopdoc: - -# adapted from Django -# Copyright (c) 2005, the Lawrence Journal-World -# Used under the modified BSD license: -# http://www.xfree86.org/3.3.6/COPYRIGHT2.html#5 -TEMPLATE = <<'HTML' - - - - - <%=h message %> at <%=h req.script_name + req.path_info %> - - - - -
-

<%=h message %> (<%= status.to_i %>)

- - - - - - - - - -
Request Method:<%=h req.request_method %>
Request URL:<%=h req.url %>
-
-
-

<%= detail %>

-
- -
-

- You're seeing this error because you use Rack::ShowStatus. -

-
- - -HTML - - # :startdoc: - end -end diff --git a/vendor/rack-0.9.1/lib/rack/static.rb b/vendor/rack-0.9.1/lib/rack/static.rb deleted file mode 100644 index 168e8f83b..000000000 --- a/vendor/rack-0.9.1/lib/rack/static.rb +++ /dev/null @@ -1,38 +0,0 @@ -module Rack - - # The Rack::Static middleware intercepts requests for static files - # (javascript files, images, stylesheets, etc) based on the url prefixes - # passed in the options, and serves them using a Rack::File object. This - # allows a Rack stack to serve both static and dynamic content. - # - # Examples: - # use Rack::Static, :urls => ["/media"] - # will serve all requests beginning with /media from the "media" folder - # located in the current directory (ie media/*). - # - # use Rack::Static, :urls => ["/css", "/images"], :root => "public" - # will serve all requests beginning with /css or /images from the folder - # "public" in the current directory (ie public/css/* and public/images/*) - - class Static - - def initialize(app, options={}) - @app = app - @urls = options[:urls] || ["/favicon.ico"] - root = options[:root] || Dir.pwd - @file_server = Rack::File.new(root) - end - - def call(env) - path = env["PATH_INFO"] - can_serve = @urls.any? { |url| path.index(url) == 0 } - - if can_serve - @file_server.call(env) - else - @app.call(env) - end - end - - end -end diff --git a/vendor/rack-0.9.1/lib/rack/urlmap.rb b/vendor/rack-0.9.1/lib/rack/urlmap.rb deleted file mode 100644 index 01c9603ee..000000000 --- a/vendor/rack-0.9.1/lib/rack/urlmap.rb +++ /dev/null @@ -1,48 +0,0 @@ -module Rack - # Rack::URLMap takes a hash mapping urls or paths to apps, and - # dispatches accordingly. Support for HTTP/1.1 host names exists if - # the URLs start with http:// or https://. - # - # URLMap modifies the SCRIPT_NAME and PATH_INFO such that the part - # relevant for dispatch is in the SCRIPT_NAME, and the rest in the - # PATH_INFO. This should be taken care of when you need to - # reconstruct the URL in order to create links. - # - # URLMap dispatches in such a way that the longest paths are tried - # first, since they are most specific. - - class URLMap - def initialize(map) - @mapping = map.map { |location, app| - if location =~ %r{\Ahttps?://(.*?)(/.*)} - host, location = $1, $2 - else - host = nil - end - - unless location[0] == ?/ - raise ArgumentError, "paths need to start with /" - end - location = location.chomp('/') - - [host, location, app] - }.sort_by { |(h, l, a)| [-l.size, h.to_s.size] } # Longest path first - end - - def call(env) - path = env["PATH_INFO"].to_s.squeeze("/") - hHost, sName, sPort = env.values_at('HTTP_HOST','SERVER_NAME','SERVER_PORT') - @mapping.each { |host, location, app| - next unless (hHost == host || sName == host \ - || (host.nil? && (hHost == sName || hHost == sName+':'+sPort))) - next unless location == path[0, location.size] - next unless path[location.size] == nil || path[location.size] == ?/ - env["SCRIPT_NAME"] += location - env["PATH_INFO"] = path[location.size..-1] - return app.call(env) - } - [404, {"Content-Type" => "text/plain"}, ["Not Found: #{path}"]] - end - end -end - diff --git a/vendor/rack-0.9.1/lib/rack/utils.rb b/vendor/rack-0.9.1/lib/rack/utils.rb deleted file mode 100644 index 3fb7a7032..000000000 --- a/vendor/rack-0.9.1/lib/rack/utils.rb +++ /dev/null @@ -1,347 +0,0 @@ -require 'set' -require 'tempfile' - -module Rack - # Rack::Utils contains a grab-bag of useful methods for writing web - # applications adopted from all kinds of Ruby libraries. - - module Utils - # Performs URI escaping so that you can construct proper - # query strings faster. Use this rather than the cgi.rb - # version since it's faster. (Stolen from Camping). - def escape(s) - s.to_s.gsub(/([^ a-zA-Z0-9_.-]+)/n) { - '%'+$1.unpack('H2'*$1.size).join('%').upcase - }.tr(' ', '+') - end - module_function :escape - - # Unescapes a URI escaped string. (Stolen from Camping). - def unescape(s) - s.tr('+', ' ').gsub(/((?:%[0-9a-fA-F]{2})+)/n){ - [$1.delete('%')].pack('H*') - } - end - module_function :unescape - - # Stolen from Mongrel, with some small modifications: - # Parses a query string by breaking it up at the '&' - # and ';' characters. You can also use this to parse - # cookies by changing the characters used in the second - # parameter (which defaults to '&;'). - - def parse_query(qs, d = '&;') - params = {} - - (qs || '').split(/[#{d}] */n).each do |p| - k, v = unescape(p).split('=', 2) - - if cur = params[k] - if cur.class == Array - params[k] << v - else - params[k] = [cur, v] - end - else - params[k] = v - end - end - - return params - end - module_function :parse_query - - def build_query(params) - params.map { |k, v| - if v.class == Array - build_query(v.map { |x| [k, x] }) - else - escape(k) + "=" + escape(v) - end - }.join("&") - end - module_function :build_query - - # Escape ampersands, brackets and quotes to their HTML/XML entities. - def escape_html(string) - string.to_s.gsub("&", "&"). - gsub("<", "<"). - gsub(">", ">"). - gsub("'", "'"). - gsub('"', """) - end - module_function :escape_html - - def select_best_encoding(available_encodings, accept_encoding) - # http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - - expanded_accept_encoding = - accept_encoding.map { |m, q| - if m == "*" - (available_encodings - accept_encoding.map { |m2, _| m2 }).map { |m2| [m2, q] } - else - [[m, q]] - end - }.inject([]) { |mem, list| - mem + list - } - - encoding_candidates = expanded_accept_encoding.sort_by { |_, q| -q }.map { |m, _| m } - - unless encoding_candidates.include?("identity") - encoding_candidates.push("identity") - end - - expanded_accept_encoding.find_all { |m, q| - q == 0.0 - }.each { |m, _| - encoding_candidates.delete(m) - } - - return (encoding_candidates & available_encodings)[0] - end - module_function :select_best_encoding - - # The recommended manner in which to implement a contexting application - # is to define a method #context in which a new Context is instantiated. - # - # As a Context is a glorified block, it is highly recommended that you - # define the contextual block within the application's operational scope. - # This would typically the application as you're place into Rack's stack. - # - # class MyObject - # ... - # def context app - # Rack::Utils::Context.new app do |env| - # do_stuff - # response = app.call(env) - # do_more_stuff - # end - # end - # ... - # end - # - # mobj = MyObject.new - # app = mobj.context other_app - # Rack::Handler::Mongrel.new app - class Context < Proc - alias_method :old_inspect, :inspect - attr_reader :for, :app - def initialize app_f, app_r - raise 'running context not provided' unless app_f - raise 'running context does not respond to #context' unless app_f.respond_to? :context - raise 'application context not provided' unless app_r - raise 'application context does not respond to #call' unless app_r.respond_to? :call - @for = app_f - @app = app_r - end - def inspect - "#{old_inspect} ==> #{@for.inspect} ==> #{@app.inspect}" - end - def context app_r - raise 'new application context not provided' unless app_r - raise 'new application context does not respond to #call' unless app_r.respond_to? :call - @for.context app_r - end - def pretty_print pp - pp.text old_inspect - pp.nest 1 do - pp.breakable - pp.text '=for> ' - pp.pp @for - pp.breakable - pp.text '=app> ' - pp.pp @app - end - end - end - - # A case-insensitive Hash that preserves the original case of a - # header when set. - class HeaderHash < Hash - def initialize(hash={}) - @names = {} - hash.each { |k, v| self[k] = v } - end - - def to_hash - {}.replace(self) - end - - def [](k) - super @names[k.downcase] - end - - def []=(k, v) - delete k - @names[k.downcase] = k - super k, v - end - - def delete(k) - super @names.delete(k.downcase) - end - - def include?(k) - @names.has_key? k.downcase - end - - alias_method :has_key?, :include? - alias_method :member?, :include? - alias_method :key?, :include? - - def merge!(other) - other.each { |k, v| self[k] = v } - self - end - - def merge(other) - hash = dup - hash.merge! other - end - end - - # Every standard HTTP code mapped to the appropriate message. - # Stolen from Mongrel. - HTTP_STATUS_CODES = { - 100 => 'Continue', - 101 => 'Switching Protocols', - 200 => 'OK', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Large', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported' - } - - # Responses with HTTP status codes that should not have an entity body - STATUS_WITH_NO_ENTITY_BODY = Set.new((100..199).to_a << 204 << 304) - - # A multipart form data parser, adapted from IOWA. - # - # Usually, Rack::Request#POST takes care of calling this. - - module Multipart - EOL = "\r\n" - - def self.parse_multipart(env) - unless env['CONTENT_TYPE'] =~ - %r|\Amultipart/form-data.*boundary=\"?([^\";,]+)\"?|n - nil - else - boundary = "--#{$1}" - - params = {} - buf = "" - content_length = env['CONTENT_LENGTH'].to_i - input = env['rack.input'] - - boundary_size = boundary.size + EOL.size - bufsize = 16384 - - content_length -= boundary_size - - status = input.read(boundary_size) - raise EOFError, "bad content body" unless status == boundary + EOL - - rx = /(?:#{EOL})?#{Regexp.quote boundary}(#{EOL}|--)/ - - loop { - head = nil - body = '' - filename = content_type = name = nil - - until head && buf =~ rx - if !head && i = buf.index("\r\n\r\n") - head = buf.slice!(0, i+2) # First \r\n - buf.slice!(0, 2) # Second \r\n - - filename = head[/Content-Disposition:.* filename="?([^\";]*)"?/ni, 1] - content_type = head[/Content-Type: (.*)\r\n/ni, 1] - name = head[/Content-Disposition:.* name="?([^\";]*)"?/ni, 1] - - if filename - body = Tempfile.new("RackMultipart") - body.binmode if body.respond_to?(:binmode) - end - - next - end - - # Save the read body part. - if head && (boundary_size+4 < buf.size) - body << buf.slice!(0, buf.size - (boundary_size+4)) - end - - c = input.read(bufsize < content_length ? bufsize : content_length) - raise EOFError, "bad content body" if c.nil? || c.empty? - buf << c - content_length -= c.size - end - - # Save the rest. - if i = buf.index(rx) - body << buf.slice!(0, i) - buf.slice!(0, boundary_size+2) - - content_length = -1 if $1 == "--" - end - - if filename - body.rewind - data = {:filename => filename, :type => content_type, - :name => name, :tempfile => body, :head => head} - else - data = body - end - - if name - if name =~ /\[\]\z/ - params[name] ||= [] - params[name] << data - else - params[name] = data - end - end - - break if buf.empty? || content_length == -1 - } - - params - end - end - end - end -end diff --git a/vendor/rack-0.9.1/test/cgi/lighttpd.conf b/vendor/rack-0.9.1/test/cgi/lighttpd.conf deleted file mode 100644 index 889726c65..000000000 --- a/vendor/rack-0.9.1/test/cgi/lighttpd.conf +++ /dev/null @@ -1,20 +0,0 @@ -server.modules = ("mod_fastcgi", "mod_cgi") -server.document-root = "." -server.errorlog = "lighttpd.errors" -server.port = 9203 - -server.event-handler = "select" - -cgi.assign = ("/test" => "", -# ".ru" => "" - ) - -fastcgi.server = ("test.fcgi" => ("localhost" => - ("min-procs" => 1, - "socket" => "/tmp/rack-test-fcgi", - "bin-path" => "test.fcgi")), - "test.ru" => ("localhost" => - ("min-procs" => 1, - "socket" => "/tmp/rack-test-ru-fcgi", - "bin-path" => "test.ru")), - ) diff --git a/vendor/rack-0.9.1/test/cgi/test b/vendor/rack-0.9.1/test/cgi/test deleted file mode 100755 index e4837a4eb..000000000 --- a/vendor/rack-0.9.1/test/cgi/test +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby -# -*- ruby -*- - -$: << File.join(File.dirname(__FILE__), "..", "..", "lib") - -require 'rack' -require '../testrequest' - -Rack::Handler::CGI.run(Rack::Lint.new(TestRequest.new)) diff --git a/vendor/rack-0.9.1/test/cgi/test.fcgi b/vendor/rack-0.9.1/test/cgi/test.fcgi deleted file mode 100755 index 5e104fc9a..000000000 --- a/vendor/rack-0.9.1/test/cgi/test.fcgi +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env ruby -# -*- ruby -*- - -$:.unshift '../../lib' -require 'rack' -require '../testrequest' - -Rack::Handler::FastCGI.run(Rack::Lint.new(TestRequest.new)) diff --git a/vendor/rack-0.9.1/test/cgi/test.ru b/vendor/rack-0.9.1/test/cgi/test.ru deleted file mode 100755 index 4054b886e..000000000 --- a/vendor/rack-0.9.1/test/cgi/test.ru +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env ../../bin/rackup -#\ -E deployment -I ../../lib -# -*- ruby -*- - -require '../testrequest' - -run TestRequest.new diff --git a/vendor/rack-0.9.1/test/spec_rack_auth_basic.rb b/vendor/rack-0.9.1/test/spec_rack_auth_basic.rb deleted file mode 100644 index 3a76155de..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_auth_basic.rb +++ /dev/null @@ -1,69 +0,0 @@ -require 'test/spec' - -require 'rack/auth/basic' -require 'rack/mock' - -context 'Rack::Auth::Basic' do - - def realm - 'WallysWorld' - end - - def unprotected_app - lambda { |env| [ 200, {'Content-Type' => 'text/plain'}, ["Hi #{env['REMOTE_USER']}"] ] } - end - - def protected_app - app = Rack::Auth::Basic.new(unprotected_app) { |username, password| 'Boss' == username } - app.realm = realm - app - end - - setup do - @request = Rack::MockRequest.new(protected_app) - end - - def request_with_basic_auth(username, password, &block) - request 'HTTP_AUTHORIZATION' => 'Basic ' + ["#{username}:#{password}"].pack("m*"), &block - end - - def request(headers = {}) - yield @request.get('/', headers) - end - - def assert_basic_auth_challenge(response) - response.should.be.a.client_error - response.status.should.equal 401 - response.should.include 'WWW-Authenticate' - response.headers['WWW-Authenticate'].should =~ /Basic realm="/ - response.body.should.be.empty - end - - specify 'should challenge correctly when no credentials are specified' do - request do |response| - assert_basic_auth_challenge response - end - end - - specify 'should rechallenge if incorrect credentials are specified' do - request_with_basic_auth 'joe', 'password' do |response| - assert_basic_auth_challenge response - end - end - - specify 'should return application output if correct credentials are specified' do - request_with_basic_auth 'Boss', 'password' do |response| - response.status.should.equal 200 - response.body.to_s.should.equal 'Hi Boss' - end - end - - specify 'should return 400 Bad Request if different auth scheme used' do - request 'HTTP_AUTHORIZATION' => 'Digest params' do |response| - response.should.be.a.client_error - response.status.should.equal 400 - response.should.not.include 'WWW-Authenticate' - end - end - -end diff --git a/vendor/rack-0.9.1/test/spec_rack_auth_digest.rb b/vendor/rack-0.9.1/test/spec_rack_auth_digest.rb deleted file mode 100644 index 67fb0e538..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_auth_digest.rb +++ /dev/null @@ -1,169 +0,0 @@ -require 'test/spec' - -require 'rack/auth/digest/md5' -require 'rack/mock' - -context 'Rack::Auth::Digest::MD5' do - - def realm - 'WallysWorld' - end - - def unprotected_app - lambda do |env| - [ 200, {'Content-Type' => 'text/plain'}, ["Hi #{env['REMOTE_USER']}"] ] - end - end - - def protected_app - app = Rack::Auth::Digest::MD5.new(unprotected_app) do |username| - { 'Alice' => 'correct-password' }[username] - end - app.realm = realm - app.opaque = 'this-should-be-secret' - app - end - - def protected_app_with_hashed_passwords - app = Rack::Auth::Digest::MD5.new(unprotected_app) do |username| - username == 'Alice' ? Digest::MD5.hexdigest("Alice:#{realm}:correct-password") : nil - end - app.realm = realm - app.opaque = 'this-should-be-secret' - app.passwords_hashed = true - app - end - - setup do - @request = Rack::MockRequest.new(protected_app) - end - - def request(path, headers = {}, &block) - response = @request.get(path, headers) - block.call(response) if block - return response - end - - class MockDigestRequest - def initialize(params) - @params = params - end - def method_missing(sym) - if @params.has_key? k = sym.to_s - return @params[k] - end - super - end - def method - 'GET' - end - def response(password) - Rack::Auth::Digest::MD5.new(nil).send :digest, self, password - end - end - - def request_with_digest_auth(path, username, password, options = {}, &block) - response = request('/') - - return response unless response.status == 401 - - if wait = options.delete(:wait) - sleep wait - end - - challenge = response['WWW-Authenticate'].split(' ', 2).last - - params = Rack::Auth::Digest::Params.parse(challenge) - - params['username'] = username - params['nc'] = '00000001' - params['cnonce'] = 'nonsensenonce' - params['uri'] = path - - params.update options - - params['response'] = MockDigestRequest.new(params).response(password) - - request(path, { 'HTTP_AUTHORIZATION' => "Digest #{params}" }, &block) - end - - def assert_digest_auth_challenge(response) - response.should.be.a.client_error - response.status.should.equal 401 - response.should.include 'WWW-Authenticate' - response.headers['WWW-Authenticate'].should =~ /^Digest / - response.body.should.be.empty - end - - def assert_bad_request(response) - response.should.be.a.client_error - response.status.should.equal 400 - response.should.not.include 'WWW-Authenticate' - end - - specify 'should challenge when no credentials are specified' do - request '/' do |response| - assert_digest_auth_challenge response - end - end - - specify 'should return application output if correct credentials given' do - request_with_digest_auth '/', 'Alice', 'correct-password' do |response| - response.status.should.equal 200 - response.body.to_s.should.equal 'Hi Alice' - end - end - - specify 'should return application output if correct credentials given (hashed passwords)' do - @request = Rack::MockRequest.new(protected_app_with_hashed_passwords) - - request_with_digest_auth '/', 'Alice', 'correct-password' do |response| - response.status.should.equal 200 - response.body.to_s.should.equal 'Hi Alice' - end - end - - specify 'should rechallenge if incorrect username given' do - request_with_digest_auth '/', 'Bob', 'correct-password' do |response| - assert_digest_auth_challenge response - end - end - - specify 'should rechallenge if incorrect password given' do - request_with_digest_auth '/', 'Alice', 'wrong-password' do |response| - assert_digest_auth_challenge response - end - end - - specify 'should rechallenge with stale parameter if nonce is stale' do - begin - Rack::Auth::Digest::Nonce.time_limit = 1 - - request_with_digest_auth '/', 'Alice', 'correct-password', :wait => 2 do |response| - assert_digest_auth_challenge response - response.headers['WWW-Authenticate'].should =~ /\bstale=true\b/ - end - ensure - Rack::Auth::Digest::Nonce.time_limit = nil - end - end - - specify 'should return 400 Bad Request if incorrect qop given' do - request_with_digest_auth '/', 'Alice', 'correct-password', 'qop' => 'auth-int' do |response| - assert_bad_request response - end - end - - specify 'should return 400 Bad Request if incorrect uri given' do - request_with_digest_auth '/', 'Alice', 'correct-password', 'uri' => '/foo' do |response| - assert_bad_request response - end - end - - specify 'should return 400 Bad Request if different auth scheme used' do - request '/', 'HTTP_AUTHORIZATION' => 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==' do |response| - assert_bad_request response - end - end - -end diff --git a/vendor/rack-0.9.1/test/spec_rack_auth_openid.rb b/vendor/rack-0.9.1/test/spec_rack_auth_openid.rb deleted file mode 100644 index fd890fd7d..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_auth_openid.rb +++ /dev/null @@ -1,137 +0,0 @@ -require 'test/spec' - -begin -# requires the ruby-openid gem -require 'rack/auth/openid' - -context "Rack::Auth::OpenID" do - OID = Rack::Auth::OpenID - realm = 'http://path/arf' - ruri = %w{arf arf/blargh} - auri = ruri.map{|u|'/'+u} - furi = auri.map{|u|'http://path'+u} - - specify 'realm uri should be absolute and have a path' do - lambda{OID.new('/path')}. - should.raise ArgumentError - lambda{OID.new('http://path')}. - should.raise ArgumentError - lambda{OID.new('http://path/')}. - should.not.raise - lambda{OID.new('http://path/arf')}. - should.not.raise - end - - specify 'uri options should be absolute' do - [:login_good, :login_fail, :login_quit, :return_to].each do |param| - ruri.each do |uri| - lambda{OID.new(realm, {param=>uri})}. - should.raise ArgumentError - end - auri.each do |uri| - lambda{OID.new(realm, {param=>uri})}. - should.raise ArgumentError - end - furi.each do |uri| - lambda{OID.new(realm, {param=>uri})}. - should.not.raise - end - end - end - - specify 'return_to should be absolute and be under the realm' do - lambda{OID.new(realm, {:return_to => 'http://path'})}. - should.raise ArgumentError - lambda{OID.new(realm, {:return_to => 'http://path/'})}. - should.raise ArgumentError - lambda{OID.new(realm, {:return_to => 'http://path/arf'})}. - should.not.raise - lambda{OID.new(realm, {:return_to => 'http://path/arf/'})}. - should.not.raise - lambda{OID.new(realm, {:return_to => 'http://path/arf/blargh'})}. - should.not.raise - end - - specify 'extensions should be a module' do - ext = Object.new - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.match(/not a module/) - ext2 = Module.new - lambda{OID.new(realm).add_extension(ext2)}. - should.raise(ArgumentError). - message.should.not.match(/not a module/) - end - - specify 'extensions should have required constants defined' do - ext = Module.new - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/missing/) - ext::Request = nil - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/missing/). - should.not.match(/Request/) - ext::Response = nil - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/missing/). - should.not.match(/Response/) - ext::NS_URI = nil - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.not.match(/missing/) - end - - specify 'extensions should have Request and Response defined and inherit from OpenID::Extension' do -$-w, w = nil, $-w # yuck - ext = Module.new - ext::Request = nil - ext::Response = nil - ext::NS_URI = nil - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.match(/not a class/) - ext::Request = Class.new() - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.match(/not a class/) - ext::Response = Class.new() - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/not a decendant/) - ext::Request = Class.new(::OpenID::Extension) - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/not a decendant/) - ext::Response = Class.new(::OpenID::Extension) - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.match(/NS_URI/) -$-w = w - end - - specify 'extensions should have NS_URI defined and be a string of an absolute http uri' do -$-w, w = nil, $-w # yuck - ext = Module.new - ext::Request = Class.new(::OpenID::Extension) - ext::Response = Class.new(::OpenID::Extension) - ext::NS_URI = nil - lambda{OID.new(realm).add_extension(ext)}. - should.raise(TypeError). - message.should.match(/not a string/) - ext::NS_URI = 'openid.net' - lambda{OID.new(realm).add_extension(ext)}. - should.raise(ArgumentError). - message.should.match(/not an http uri/) - ext::NS_URI = 'http://openid.net' - lambda{OID.new(realm).add_extension(ext)}. - should.not.raise -$-w = w - end -end - -rescue LoadError - $stderr.puts "Skipping Rack::Auth::OpenID tests (ruby-openid 2 is required). `gem install ruby-openid` and try again." -end diff --git a/vendor/rack-0.9.1/test/spec_rack_builder.rb b/vendor/rack-0.9.1/test/spec_rack_builder.rb deleted file mode 100644 index 9739be6a0..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_builder.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'test/spec' - -require 'rack/builder' -require 'rack/mock' -require 'rack/showexceptions' -require 'rack/auth/basic' - -context "Rack::Builder" do - specify "chains apps by default" do - app = Rack::Builder.new do - use Rack::ShowExceptions - run lambda { |env| raise "bzzzt" } - end.to_app - - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - end - - specify "has implicit #to_app" do - app = Rack::Builder.new do - use Rack::ShowExceptions - run lambda { |env| raise "bzzzt" } - end - - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - end - - specify "supports blocks on use" do - app = Rack::Builder.new do - use Rack::ShowExceptions - use Rack::Auth::Basic do |username, password| - 'secret' == password - end - - run lambda { |env| [200, {}, 'Hi Boss'] } - end - - response = Rack::MockRequest.new(app).get("/") - response.should.be.client_error - response.status.should.equal 401 - - # with auth... - response = Rack::MockRequest.new(app).get("/", - 'HTTP_AUTHORIZATION' => 'Basic ' + ["joe:secret"].pack("m*")) - response.status.should.equal 200 - response.body.to_s.should.equal 'Hi Boss' - end - - specify "has explicit #to_app" do - app = Rack::Builder.app do - use Rack::ShowExceptions - run lambda { |env| raise "bzzzt" } - end - - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - Rack::MockRequest.new(app).get("/").should.be.server_error - end - - specify "apps are initialized once" do - app = Rack::Builder.new do - class AppClass - def initialize - @called = 0 - end - def call(env) - raise "bzzzt" if @called > 0 - @called += 1 - [200, {'Content-Type' => 'text/plain'}, 'OK'] - end - end - - use Rack::ShowExceptions - run AppClass.new - end - - Rack::MockRequest.new(app).get("/").status.should.equal 200 - Rack::MockRequest.new(app).get("/").should.be.server_error - end - -end diff --git a/vendor/rack-0.9.1/test/spec_rack_camping.rb b/vendor/rack-0.9.1/test/spec_rack_camping.rb deleted file mode 100644 index bed117108..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_camping.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'test/spec' -require 'stringio' -require 'uri' - -begin - require 'rack/mock' - - $-w, w = nil, $-w # yuck - require 'camping' - require 'rack/adapter/camping' - - Camping.goes :CampApp - module CampApp - module Controllers - class HW < R('/') - def get - @headers["X-Served-By"] = URI("http://rack.rubyforge.org") - "Camping works!" - end - - def post - "Data: #{input.foo}" - end - end - end - end - $-w = w - - context "Rack::Adapter::Camping" do - specify "works with GET" do - res = Rack::MockRequest.new(Rack::Adapter::Camping.new(CampApp)). - get("/") - - res.should.be.ok - res["Content-Type"].should.equal "text/html" - res["X-Served-By"].should.equal "http://rack.rubyforge.org" - - res.body.should.equal "Camping works!" - end - - specify "works with POST" do - res = Rack::MockRequest.new(Rack::Adapter::Camping.new(CampApp)). - post("/", :input => "foo=bar") - - res.should.be.ok - res.body.should.equal "Data: bar" - end - end -rescue LoadError - $stderr.puts "Skipping Rack::Adapter::Camping tests (Camping is required). `gem install camping` and try again." -end diff --git a/vendor/rack-0.9.1/test/spec_rack_cascade.rb b/vendor/rack-0.9.1/test/spec_rack_cascade.rb deleted file mode 100644 index 3c0f3be36..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_cascade.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'test/spec' - -require 'rack/cascade' -require 'rack/mock' - -require 'rack/urlmap' -require 'rack/file' - -context "Rack::Cascade" do - docroot = File.expand_path(File.dirname(__FILE__)) - app1 = Rack::File.new(docroot) - - app2 = Rack::URLMap.new("/crash" => lambda { |env| raise "boom" }) - - app3 = Rack::URLMap.new("/foo" => lambda { |env| - [200, { "Content-Type" => "text/plain"}, [""]]}) - - specify "should dispatch onward on 404 by default" do - cascade = Rack::Cascade.new([app1, app2, app3]) - Rack::MockRequest.new(cascade).get("/cgi/test").should.be.ok - Rack::MockRequest.new(cascade).get("/foo").should.be.ok - Rack::MockRequest.new(cascade).get("/toobad").should.be.not_found - Rack::MockRequest.new(cascade).get("/cgi/../bla").should.be.forbidden - end - - specify "should dispatch onward on whatever is passed" do - cascade = Rack::Cascade.new([app1, app2, app3], [404, 403]) - Rack::MockRequest.new(cascade).get("/cgi/../bla").should.be.not_found - end - - specify "should fail if empty" do - lambda { Rack::MockRequest.new(Rack::Cascade.new([])).get("/") }. - should.raise(ArgumentError) - end - - specify "should append new app" do - cascade = Rack::Cascade.new([], [404, 403]) - lambda { Rack::MockRequest.new(cascade).get('/cgi/test') }. - should.raise(ArgumentError) - cascade << app2 - Rack::MockRequest.new(cascade).get('/cgi/test').should.be.not_found - Rack::MockRequest.new(cascade).get('/cgi/../bla').should.be.not_found - cascade << app1 - Rack::MockRequest.new(cascade).get('/cgi/test').should.be.ok - Rack::MockRequest.new(cascade).get('/cgi/../bla').should.be.forbidden - Rack::MockRequest.new(cascade).get('/foo').should.be.not_found - cascade << app3 - Rack::MockRequest.new(cascade).get('/foo').should.be.ok - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_cgi.rb b/vendor/rack-0.9.1/test/spec_rack_cgi.rb deleted file mode 100644 index 331f98860..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_cgi.rb +++ /dev/null @@ -1,89 +0,0 @@ -require 'test/spec' -require 'testrequest' - -context "Rack::Handler::CGI" do - include TestRequest::Helpers - - setup do - @host = '0.0.0.0' - @port = 9203 - end - - # Keep this first. - specify "startup" do - $pid = fork { - Dir.chdir(File.join(File.dirname(__FILE__), "..", "test", "cgi")) - exec "lighttpd -D -f lighttpd.conf" - } - end - - specify "should respond" do - sleep 1 - lambda { - GET("/test") - }.should.not.raise - end - - specify "should be a lighttpd" do - GET("/test") - status.should.be 200 - response["SERVER_SOFTWARE"].should =~ /lighttpd/ - response["HTTP_VERSION"].should.equal "HTTP/1.1" - response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" - response["SERVER_PORT"].should.equal @port.to_s - response["SERVER_NAME"].should =~ @host - end - - specify "should have rack headers" do - GET("/test") - response["rack.version"].should.equal [0,1] - response["rack.multithread"].should.be false - response["rack.multiprocess"].should.be true - response["rack.run_once"].should.be true - end - - specify "should have CGI headers on GET" do - GET("/test") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.be.nil - response["QUERY_STRING"].should.equal "" - response["test.postdata"].should.equal "" - - GET("/test/foo?quux=1") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.equal "/foo" - response["QUERY_STRING"].should.equal "quux=1" - end - - specify "should have CGI headers on POST" do - POST("/test", {"rack-form-data" => "23"}, {'X-test-header' => '42'}) - status.should.equal 200 - response["REQUEST_METHOD"].should.equal "POST" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["QUERY_STRING"].should.equal "" - response["HTTP_X_TEST_HEADER"].should.equal "42" - response["test.postdata"].should.equal "rack-form-data=23" - end - - specify "should support HTTP auth" do - GET("/test", {:user => "ruth", :passwd => "secret"}) - response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ=" - end - - specify "should set status" do - GET("/test?secret") - status.should.equal 403 - response["rack.url_scheme"].should.equal "http" - end - - # Keep this last. - specify "shutdown" do - Process.kill 15, $pid - Process.wait($pid).should.equal $pid - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_commonlogger.rb b/vendor/rack-0.9.1/test/spec_rack_commonlogger.rb deleted file mode 100644 index ba03b78a1..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_commonlogger.rb +++ /dev/null @@ -1,32 +0,0 @@ -require 'test/spec' -require 'stringio' - -require 'rack/commonlogger' -require 'rack/lobster' -require 'rack/mock' - -context "Rack::CommonLogger" do - app = lambda { |env| - [200, - {"Content-Type" => "text/html"}, - ["foo"]]} - - specify "should log to rack.errors by default" do - log = StringIO.new - res = Rack::MockRequest.new(Rack::CommonLogger.new(app)).get("/") - - res.errors.should.not.be.empty - res.errors.should =~ /GET / - res.errors.should =~ / 200 / # status - res.errors.should =~ / 3 / # length - end - - specify "should log to anything with <<" do - log = "" - res = Rack::MockRequest.new(Rack::CommonLogger.new(app, log)).get("/") - - log.should =~ /GET / - log.should =~ / 200 / # status - log.should =~ / 3 / # length - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_conditionalget.rb b/vendor/rack-0.9.1/test/spec_rack_conditionalget.rb deleted file mode 100644 index 196493415..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_conditionalget.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'test/spec' -require 'time' - -require 'rack/mock' -require 'rack/conditionalget' - -context "Rack::ConditionalGet" do - specify "should set a 304 status and truncate body when If-Modified-Since hits" do - timestamp = Time.now.httpdate - app = Rack::ConditionalGet.new(lambda { |env| - [200, {'Last-Modified'=>timestamp}, 'TEST'] }) - - response = Rack::MockRequest.new(app). - get("/", 'HTTP_IF_MODIFIED_SINCE' => timestamp) - - response.status.should.be == 304 - response.body.should.be.empty - end - - specify "should set a 304 status and truncate body when If-None-Match hits" do - app = Rack::ConditionalGet.new(lambda { |env| - [200, {'Etag'=>'1234'}, 'TEST'] }) - - response = Rack::MockRequest.new(app). - get("/", 'HTTP_IF_NONE_MATCH' => '1234') - - response.status.should.be == 304 - response.body.should.be.empty - end - - specify "should not affect non-GET/HEAD requests" do - app = Rack::ConditionalGet.new(lambda { |env| - [200, {'Etag'=>'1234'}, 'TEST'] }) - - response = Rack::MockRequest.new(app). - post("/", 'HTTP_IF_NONE_MATCH' => '1234') - - response.status.should.be == 200 - response.body.should.be == 'TEST' - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_content_length.rb b/vendor/rack-0.9.1/test/spec_rack_content_length.rb deleted file mode 100644 index 7db9345f8..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_content_length.rb +++ /dev/null @@ -1,43 +0,0 @@ -require 'rack/mock' -require 'rack/content_length' - -context "Rack::ContentLength" do - specify "sets Content-Length on String bodies if none is set" do - app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, "Hello, World!"] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.equal '13' - end - - specify "sets Content-Length on Array bodies if none is set" do - app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, ["Hello, World!"]] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.equal '13' - end - - specify "does not set Content-Length on variable length bodies" do - body = lambda { "Hello World!" } - def body.each ; yield call ; end - - app = lambda { |env| [200, {'Content-Type' => 'text/plain'}, body] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.be.nil - end - - specify "does not change Content-Length if it is already set" do - app = lambda { |env| [200, {'Content-Type' => 'text/plain', 'Content-Length' => '1'}, "Hello, World!"] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.equal '1' - end - - specify "does not set Content-Length on 304 responses" do - app = lambda { |env| [304, {'Content-Type' => 'text/plain'}, []] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.equal nil - end - - specify "does not set Content-Length when Transfer-Encoding is chunked" do - app = lambda { |env| [200, {'Transfer-Encoding' => 'chunked'}, []] } - response = Rack::ContentLength.new(app).call({}) - response[1]['Content-Length'].should.equal nil - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_deflater.rb b/vendor/rack-0.9.1/test/spec_rack_deflater.rb deleted file mode 100644 index 97be5fa75..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_deflater.rb +++ /dev/null @@ -1,105 +0,0 @@ -require 'test/spec' - -require 'rack/mock' -require 'rack/deflater' -require 'stringio' -require 'time' # for Time#httpdate - -context "Rack::Deflater" do - def build_response(status, body, accept_encoding, headers = {}) - app = lambda { |env| [status, {}, body] } - request = Rack::MockRequest.env_for("", headers.merge("HTTP_ACCEPT_ENCODING" => accept_encoding)) - response = Rack::Deflater.new(app).call(request) - - return response - end - - specify "should be able to deflate bodies that respond to each" do - body = Object.new - class << body; def each; yield("foo"); yield("bar"); end; end - - response = build_response(200, body, "deflate") - - response[0].should.equal(200) - response[1].should.equal({ "Content-Encoding" => "deflate", "Vary" => "Accept-Encoding" }) - response[2].to_s.should.equal("K\313\317OJ,\002\000") - end - - # TODO: This is really just a special case of the above... - specify "should be able to deflate String bodies" do - response = build_response(200, "Hello world!", "deflate") - - response[0].should.equal(200) - response[1].should.equal({ "Content-Encoding" => "deflate", "Vary" => "Accept-Encoding" }) - response[2].to_s.should.equal("\363H\315\311\311W(\317/\312IQ\004\000") - end - - specify "should be able to gzip bodies that respond to each" do - body = Object.new - class << body; def each; yield("foo"); yield("bar"); end; end - - response = build_response(200, body, "gzip") - - response[0].should.equal(200) - response[1].should.equal({ "Content-Encoding" => "gzip", "Vary" => "Accept-Encoding" }) - - io = StringIO.new(response[2].to_s) - gz = Zlib::GzipReader.new(io) - gz.read.should.equal("foobar") - gz.close - end - - specify "should be able to fallback to no deflation" do - response = build_response(200, "Hello world!", "superzip") - - response[0].should.equal(200) - response[1].should.equal({ "Vary" => "Accept-Encoding" }) - response[2].should.equal("Hello world!") - end - - specify "should be able to skip when there is no response entity body" do - response = build_response(304, [], "gzip") - - response[0].should.equal(304) - response[1].should.equal({}) - response[2].should.equal([]) - end - - specify "should handle the lack of an acceptable encoding" do - response1 = build_response(200, "Hello world!", "identity;q=0", "PATH_INFO" => "/") - response1[0].should.equal(406) - response1[1].should.equal({"Content-Type" => "text/plain"}) - response1[2].should.equal(["An acceptable encoding for the requested resource / could not be found."]) - - response2 = build_response(200, "Hello world!", "identity;q=0", "SCRIPT_NAME" => "/foo", "PATH_INFO" => "/bar") - response2[0].should.equal(406) - response2[1].should.equal({"Content-Type" => "text/plain"}) - response2[2].should.equal(["An acceptable encoding for the requested resource /foo/bar could not be found."]) - end - - specify "should handle gzip response with Last-Modified header" do - last_modified = Time.now.httpdate - - app = lambda { |env| [200, { "Last-Modified" => last_modified }, "Hello World!"] } - request = Rack::MockRequest.env_for("", "HTTP_ACCEPT_ENCODING" => "gzip") - response = Rack::Deflater.new(app).call(request) - - response[0].should.equal(200) - response[1].should.equal({ "Content-Encoding" => "gzip", "Vary" => "Accept-Encoding", "Last-Modified" => last_modified }) - - io = StringIO.new(response[2].to_s) - gz = Zlib::GzipReader.new(io) - gz.read.should.equal("Hello World!") - gz.close - end - - specify "should do nothing when no-transform Cache-Control directive present" do - app = lambda { |env| [200, {'Cache-Control' => 'no-transform'}, ['Hello World!']] } - request = Rack::MockRequest.env_for("", "HTTP_ACCEPT_ENCODING" => "gzip") - response = Rack::Deflater.new(app).call(request) - - response[0].should.equal(200) - response[1].should.not.include "Content-Encoding" - response[2].join.should.equal("Hello World!") - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_directory.rb b/vendor/rack-0.9.1/test/spec_rack_directory.rb deleted file mode 100644 index f9828f5b3..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_directory.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'test/spec' - -require 'rack/directory' -require 'rack/lint' - -require 'rack/mock' - -context "Rack::Directory" do - DOCROOT = File.expand_path(File.dirname(__FILE__)) - FILE_CATCH = proc{|env| [200, {'Content-Type'=>'text/plain', "Content-Length" => "7"}, 'passed!'] } - app = Rack::Directory.new DOCROOT, FILE_CATCH - - specify "serves directory indices" do - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/") - - res.should.be.ok - res.should =~ // - end - - specify "passes to app if file found" do - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/test") - - res.should.be.ok - res.should =~ /passed!/ - end - - specify "serves uri with URL encoded filenames" do - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/%63%67%69/") # "/cgi/test" - - res.should.be.ok - res.should =~ // - - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/%74%65%73%74") # "/cgi/test" - - res.should.be.ok - res.should =~ /passed!/ - end - - specify "does not allow directory traversal" do - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/../test") - - res.should.be.forbidden - - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/%2E%2E/test") - - res.should.be.forbidden - end - - specify "404s if it can't find the file" do - res = Rack::MockRequest.new(Rack::Lint.new(app)). - get("/cgi/blubb") - - res.should.be.not_found - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_fastcgi.rb b/vendor/rack-0.9.1/test/spec_rack_fastcgi.rb deleted file mode 100644 index 66ab4f79c..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_fastcgi.rb +++ /dev/null @@ -1,89 +0,0 @@ -require 'test/spec' -require 'testrequest' - -context "Rack::Handler::FastCGI" do - include TestRequest::Helpers - - setup do - @host = '0.0.0.0' - @port = 9203 - end - - # Keep this first. - specify "startup" do - $pid = fork { - Dir.chdir(File.join(File.dirname(__FILE__), "..", "test", "cgi")) - exec "lighttpd -D -f lighttpd.conf" - } - end - - specify "should respond" do - sleep 1 - lambda { - GET("/test.fcgi") - }.should.not.raise - end - - specify "should be a lighttpd" do - GET("/test.fcgi") - status.should.be 200 - response["SERVER_SOFTWARE"].should =~ /lighttpd/ - response["HTTP_VERSION"].should.equal "HTTP/1.1" - response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" - response["SERVER_PORT"].should.equal @port.to_s - response["SERVER_NAME"].should =~ @host - end - - specify "should have rack headers" do - GET("/test.fcgi") - response["rack.version"].should.equal [0,1] - response["rack.multithread"].should.be false - response["rack.multiprocess"].should.be true - response["rack.run_once"].should.be false - end - - specify "should have CGI headers on GET" do - GET("/test.fcgi") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test.fcgi" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.be.nil - response["QUERY_STRING"].should.equal "" - response["test.postdata"].should.equal "" - - GET("/test.fcgi/foo?quux=1") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test.fcgi" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.equal "/foo" - response["QUERY_STRING"].should.equal "quux=1" - end - - specify "should have CGI headers on POST" do - POST("/test.fcgi", {"rack-form-data" => "23"}, {'X-test-header' => '42'}) - status.should.equal 200 - response["REQUEST_METHOD"].should.equal "POST" - response["SCRIPT_NAME"].should.equal "/test.fcgi" - response["REQUEST_PATH"].should.equal "/" - response["QUERY_STRING"].should.equal "" - response["HTTP_X_TEST_HEADER"].should.equal "42" - response["test.postdata"].should.equal "rack-form-data=23" - end - - specify "should support HTTP auth" do - GET("/test.fcgi", {:user => "ruth", :passwd => "secret"}) - response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ=" - end - - specify "should set status" do - GET("/test.fcgi?secret") - status.should.equal 403 - response["rack.url_scheme"].should.equal "http" - end - - # Keep this last. - specify "shutdown" do - Process.kill 15, $pid - Process.wait($pid).should.equal $pid - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_file.rb b/vendor/rack-0.9.1/test/spec_rack_file.rb deleted file mode 100644 index 8fbd514f0..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_file.rb +++ /dev/null @@ -1,64 +0,0 @@ -require 'test/spec' - -require 'rack/file' -require 'rack/lint' - -require 'rack/mock' - -context "Rack::File" do - DOCROOT = File.expand_path(File.dirname(__FILE__)) - - specify "serves files" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi/test") - - res.should.be.ok - res.should =~ /ruby/ - end - - specify "sets Last-Modified header" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi/test") - - path = File.join(DOCROOT, "/cgi/test") - - res.should.be.ok - res["Last-Modified"].should.equal File.mtime(path).httpdate - end - - specify "serves files with URL encoded filenames" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi/%74%65%73%74") # "/cgi/test" - - res.should.be.ok - res.should =~ /ruby/ - end - - specify "does not allow directory traversal" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi/../test") - - res.should.be.forbidden - end - - specify "does not allow directory traversal with encoded periods" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/%2E%2E/README") - - res.should.be.forbidden - end - - specify "404s if it can't find the file" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi/blubb") - - res.should.be.not_found - end - - specify "detects SystemCallErrors" do - res = Rack::MockRequest.new(Rack::Lint.new(Rack::File.new(DOCROOT))). - get("/cgi") - - res.should.be.not_found - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_handler.rb b/vendor/rack-0.9.1/test/spec_rack_handler.rb deleted file mode 100644 index 95052c73e..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_handler.rb +++ /dev/null @@ -1,24 +0,0 @@ -require 'test/spec' - -require 'rack/handler' - -class Rack::Handler::Lobster; end -class RockLobster; end - -context "Rack::Handler" do - specify "has registered default handlers" do - Rack::Handler.get('cgi').should.equal Rack::Handler::CGI - Rack::Handler.get('fastcgi').should.equal Rack::Handler::FastCGI - Rack::Handler.get('mongrel').should.equal Rack::Handler::Mongrel - Rack::Handler.get('webrick').should.equal Rack::Handler::WEBrick - end - - specify "should get unregistered handler by name" do - Rack::Handler.get('lobster').should.equal Rack::Handler::Lobster - end - - specify "should register custom handler" do - Rack::Handler.register('rock_lobster', 'RockLobster') - Rack::Handler.get('rock_lobster').should.equal RockLobster - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_head.rb b/vendor/rack-0.9.1/test/spec_rack_head.rb deleted file mode 100644 index 48d3f81ff..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_head.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'rack/head' -require 'rack/mock' - -context "Rack::Head" do - def test_response(headers = {}) - app = lambda { |env| [200, {"Content-type" => "test/plain", "Content-length" => "3"}, ["foo"]] } - request = Rack::MockRequest.env_for("/", headers) - response = Rack::Head.new(app).call(request) - - return response - end - - specify "passes GET, POST, PUT, DELETE, OPTIONS, TRACE requests" do - %w[GET POST PUT DELETE OPTIONS TRACE].each do |type| - resp = test_response("REQUEST_METHOD" => type) - - resp[0].should.equal(200) - resp[1].should.equal({"Content-type" => "test/plain", "Content-length" => "3"}) - resp[2].should.equal(["foo"]) - end - end - - specify "removes body from HEAD requests" do - resp = test_response("REQUEST_METHOD" => "HEAD") - - resp[0].should.equal(200) - resp[1].should.equal({"Content-type" => "test/plain", "Content-length" => "3"}) - resp[2].should.equal([]) - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_lint.rb b/vendor/rack-0.9.1/test/spec_rack_lint.rb deleted file mode 100644 index b4c97573a..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_lint.rb +++ /dev/null @@ -1,380 +0,0 @@ -require 'test/spec' -require 'stringio' - -require 'rack/lint' -require 'rack/mock' - -context "Rack::Lint" do - def env(*args) - Rack::MockRequest.env_for("/", *args) - end - - specify "passes valid request" do - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "test/plain", "Content-length" => "3"}, "foo"] - }).call(env({})) - }.should.not.raise - end - - specify "notices fatal errors" do - lambda { Rack::Lint.new(nil).call }.should.raise(Rack::Lint::LintError). - message.should.match(/No env given/) - end - - specify "notices environment errors" do - lambda { Rack::Lint.new(nil).call 5 }.should.raise(Rack::Lint::LintError). - message.should.match(/not a Hash/) - - lambda { - e = env - e.delete("REQUEST_METHOD") - Rack::Lint.new(nil).call(e) - }.should.raise(Rack::Lint::LintError). - message.should.match(/missing required key REQUEST_METHOD/) - - lambda { - e = env - e.delete("SERVER_NAME") - Rack::Lint.new(nil).call(e) - }.should.raise(Rack::Lint::LintError). - message.should.match(/missing required key SERVER_NAME/) - - - lambda { - Rack::Lint.new(nil).call(env("HTTP_CONTENT_TYPE" => "text/plain")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/contains HTTP_CONTENT_TYPE/) - - lambda { - Rack::Lint.new(nil).call(env("HTTP_CONTENT_LENGTH" => "42")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/contains HTTP_CONTENT_LENGTH/) - - lambda { - Rack::Lint.new(nil).call(env("FOO" => Object.new)) - }.should.raise(Rack::Lint::LintError). - message.should.match(/non-string value/) - - lambda { - Rack::Lint.new(nil).call(env("rack.version" => "0.2")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must be an Array/) - - lambda { - Rack::Lint.new(nil).call(env("rack.url_scheme" => "gopher")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/url_scheme unknown/) - - lambda { - Rack::Lint.new(nil).call(env("REQUEST_METHOD" => "FUCKUP?")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/REQUEST_METHOD/) - - lambda { - Rack::Lint.new(nil).call(env("SCRIPT_NAME" => "howdy")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must start with/) - - lambda { - Rack::Lint.new(nil).call(env("PATH_INFO" => "../foo")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must start with/) - - lambda { - Rack::Lint.new(nil).call(env("CONTENT_LENGTH" => "xcii")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/Invalid CONTENT_LENGTH/) - - lambda { - e = env - e.delete("PATH_INFO") - e.delete("SCRIPT_NAME") - Rack::Lint.new(nil).call(e) - }.should.raise(Rack::Lint::LintError). - message.should.match(/One of .* must be set/) - - lambda { - Rack::Lint.new(nil).call(env("SCRIPT_NAME" => "/")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/cannot be .* make it ''/) - end - - specify "notices input errors" do - lambda { - Rack::Lint.new(nil).call(env("rack.input" => "")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/does not respond to #gets/) - end - - specify "notices error errors" do - lambda { - Rack::Lint.new(nil).call(env("rack.errors" => "")) - }.should.raise(Rack::Lint::LintError). - message.should.match(/does not respond to #puts/) - end - - specify "notices status errors" do - lambda { - Rack::Lint.new(lambda { |env| - ["cc", {}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must be >=100 seen as integer/) - - lambda { - Rack::Lint.new(lambda { |env| - [42, {}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must be >=100 seen as integer/) - end - - specify "notices header errors" do - lambda { - Rack::Lint.new(lambda { |env| - [200, Object.new, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.equal("headers object should respond to #each, but doesn't (got Object as headers)") - - lambda { - Rack::Lint.new(lambda { |env| - [200, {true=>false}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.equal("header key must be a string, was TrueClass") - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Status" => "404"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must not contain Status/) - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-Type:" => "text/plain"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must not contain :/) - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-" => "text/plain"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/must not end/) - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"..%%quark%%.." => "text/plain"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.equal("invalid header name: ..%%quark%%..") - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Foo" => Object.new}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.equal("header values must respond to #each, but the value of 'Foo' doesn't (is Object)") - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Foo" => [1,2,3]}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.equal("header values must consist of Strings, but 'Foo' also contains a Fixnum") - - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Foo-Bar" => "text\000plain"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/invalid header/) - end - - specify "notices content-type errors" do - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/No Content-Type/) - - [100, 101, 204, 304].each do |status| - lambda { - Rack::Lint.new(lambda { |env| - [status, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/Content-Type header found/) - end - end - - specify "notices content-length errors" do - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "text/plain"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/No Content-Length/) - - [100, 101, 204, 304].each do |status| - lambda { - Rack::Lint.new(lambda { |env| - [status, {"Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/Content-Length header found/) - end - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "text/plain", "Content-Length" => "0", "Transfer-Encoding" => "chunked"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/Content-Length header should not be used/) - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "text/plain", "Content-Length" => "1"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/Content-Length header was 1, but should be 0/) - end - - specify "notices body errors" do - lambda { - status, header, body = Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "text/plain","Content-length" => "3"}, [1,2,3]] - }).call(env({})) - body.each { |part| } - }.should.raise(Rack::Lint::LintError). - message.should.match(/yielded non-string/) - end - - specify "notices input handling errors" do - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].gets("\r\n") - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/gets called with arguments/) - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].read("foo") - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/read called with non-integer argument/) - - weirdio = Object.new - class << weirdio - def gets - 42 - end - - def read - 23 - end - - def each - yield 23 - yield 42 - end - end - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].gets - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env("rack.input" => weirdio)) - }.should.raise(Rack::Lint::LintError). - message.should.match(/gets didn't return a String/) - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].each { |x| } - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env("rack.input" => weirdio)) - }.should.raise(Rack::Lint::LintError). - message.should.match(/each didn't yield a String/) - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].read - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env("rack.input" => weirdio)) - }.should.raise(Rack::Lint::LintError). - message.should.match(/read didn't return a String/) - - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.input"].close - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/close must not be called/) - end - - specify "notices error handling errors" do - lambda { - Rack::Lint.new(lambda { |env| - env["rack.errors"].write(42) - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/write not called with a String/) - - lambda { - Rack::Lint.new(lambda { |env| - env["rack.errors"].close - [201, {"Content-type" => "text/plain", "Content-length" => "0"}, ""] - }).call(env({})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/close must not be called/) - end - - specify "notices HEAD errors" do - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "test/plain", "Content-length" => "3"}, []] - }).call(env({"REQUEST_METHOD" => "HEAD"})) - }.should.not.raise - - lambda { - Rack::Lint.new(lambda { |env| - [200, {"Content-type" => "test/plain", "Content-length" => "3"}, "foo"] - }).call(env({"REQUEST_METHOD" => "HEAD"})) - }.should.raise(Rack::Lint::LintError). - message.should.match(/body was given for HEAD/) - end -end - -context "Rack::Lint::InputWrapper" do - specify "delegates :size to underlying IO object" do - class IOMock - def size - 101 - end - end - - wrapper = Rack::Lint::InputWrapper.new(IOMock.new) - wrapper.size.should == 101 - end - - specify "delegates :rewind to underlying IO object" do - io = StringIO.new("123") - wrapper = Rack::Lint::InputWrapper.new(io) - wrapper.read.should == "123" - wrapper.read.should == "" - wrapper.rewind - wrapper.read.should == "123" - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_lobster.rb b/vendor/rack-0.9.1/test/spec_rack_lobster.rb deleted file mode 100644 index 7be267a28..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_lobster.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'test/spec' - -require 'rack/lobster' -require 'rack/mock' - -context "Rack::Lobster::LambdaLobster" do - specify "should be a single lambda" do - Rack::Lobster::LambdaLobster.should.be.kind_of Proc - end - - specify "should look like a lobster" do - res = Rack::MockRequest.new(Rack::Lobster::LambdaLobster).get("/") - res.should.be.ok - res.body.should.include "(,(,,(,,,(" - res.body.should.include "?flip" - end - - specify "should be flippable" do - res = Rack::MockRequest.new(Rack::Lobster::LambdaLobster).get("/?flip") - res.should.be.ok - res.body.should.include "(,,,(,,(,(" - end -end - -context "Rack::Lobster" do - specify "should look like a lobster" do - res = Rack::MockRequest.new(Rack::Lobster.new).get("/") - res.should.be.ok - res.body.should.include "(,(,,(,,,(" - res.body.should.include "?flip" - res.body.should.include "crash" - end - - specify "should be flippable" do - res = Rack::MockRequest.new(Rack::Lobster.new).get("/?flip=left") - res.should.be.ok - res.body.should.include "(,,,(,,(,(" - end - - specify "should provide crashing for testing purposes" do - lambda { - Rack::MockRequest.new(Rack::Lobster.new).get("/?flip=crash") - }.should.raise - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_methodoverride.rb b/vendor/rack-0.9.1/test/spec_rack_methodoverride.rb deleted file mode 100644 index 57452394c..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_methodoverride.rb +++ /dev/null @@ -1,60 +0,0 @@ -require 'test/spec' - -require 'rack/mock' -require 'rack/methodoverride' -require 'stringio' - -context "Rack::MethodOverride" do - specify "should not affect GET requests" do - env = Rack::MockRequest.env_for("/?_method=delete", :method => "GET") - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["REQUEST_METHOD"].should.equal "GET" - end - - specify "_method parameter should modify REQUEST_METHOD for POST requests" do - env = Rack::MockRequest.env_for("/", :method => "POST", :input => "_method=put") - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["REQUEST_METHOD"].should.equal "PUT" - end - - specify "X-HTTP-Method-Override header should modify REQUEST_METHOD for POST requests" do - env = Rack::MockRequest.env_for("/", - :method => "POST", - "HTTP_X_HTTP_METHOD_OVERRIDE" => "PUT" - ) - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["REQUEST_METHOD"].should.equal "PUT" - end - - specify "should not modify REQUEST_METHOD if the method is unknown" do - env = Rack::MockRequest.env_for("/", :method => "POST", :input => "_method=foo") - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["REQUEST_METHOD"].should.equal "POST" - end - - specify "should not modify REQUEST_METHOD when _method is nil" do - env = Rack::MockRequest.env_for("/", :method => "POST", :input => "foo=bar") - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["REQUEST_METHOD"].should.equal "POST" - end - - specify "should store the original REQUEST_METHOD prior to overriding" do - env = Rack::MockRequest.env_for("/", - :method => "POST", - :input => "_method=options") - app = Rack::MethodOverride.new(lambda { |env| Rack::Request.new(env) }) - req = app.call(env) - - req.env["rack.methodoverride.original_method"].should.equal "POST" - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_mock.rb b/vendor/rack-0.9.1/test/spec_rack_mock.rb deleted file mode 100644 index 40c709df4..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_mock.rb +++ /dev/null @@ -1,152 +0,0 @@ -require 'yaml' -require 'rack/mock' -require 'rack/request' -require 'rack/response' - -app = lambda { |env| - req = Rack::Request.new(env) - - env["mock.postdata"] = env["rack.input"].read - if req.GET["error"] - env["rack.errors"].puts req.GET["error"] - env["rack.errors"].flush - end - - Rack::Response.new(env.to_yaml, - req.GET["status"] || 200, - "Content-Type" => "text/yaml").finish -} - -context "Rack::MockRequest" do - specify "should return a MockResponse" do - res = Rack::MockRequest.new(app).get("") - res.should.be.kind_of Rack::MockResponse - end - - specify "should be able to only return the environment" do - env = Rack::MockRequest.env_for("") - env.should.be.kind_of Hash - env.should.include "rack.version" - end - - specify "should provide sensible defaults" do - res = Rack::MockRequest.new(app).request - - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "GET" - env["SERVER_NAME"].should.equal "example.org" - env["SERVER_PORT"].should.equal "80" - env["QUERY_STRING"].should.equal "" - env["PATH_INFO"].should.equal "/" - env["SCRIPT_NAME"].should.equal "" - env["rack.url_scheme"].should.equal "http" - env["mock.postdata"].should.be.empty - end - - specify "should allow GET/POST/PUT/DELETE" do - res = Rack::MockRequest.new(app).get("", :input => "foo") - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "GET" - - res = Rack::MockRequest.new(app).post("", :input => "foo") - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "POST" - - res = Rack::MockRequest.new(app).put("", :input => "foo") - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "PUT" - - res = Rack::MockRequest.new(app).delete("", :input => "foo") - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "DELETE" - - Rack::MockRequest.env_for("/", :method => "OPTIONS")["REQUEST_METHOD"]. - should.equal "OPTIONS" - end - - specify "should allow posting" do - res = Rack::MockRequest.new(app).get("", :input => "foo") - env = YAML.load(res.body) - env["mock.postdata"].should.equal "foo" - - res = Rack::MockRequest.new(app).post("", :input => StringIO.new("foo")) - env = YAML.load(res.body) - env["mock.postdata"].should.equal "foo" - end - - specify "should use all parts of an URL" do - res = Rack::MockRequest.new(app). - get("https://bla.example.org:9292/meh/foo?bar") - res.should.be.kind_of Rack::MockResponse - - env = YAML.load(res.body) - env["REQUEST_METHOD"].should.equal "GET" - env["SERVER_NAME"].should.equal "bla.example.org" - env["SERVER_PORT"].should.equal "9292" - env["QUERY_STRING"].should.equal "bar" - env["PATH_INFO"].should.equal "/meh/foo" - env["rack.url_scheme"].should.equal "https" - end - - specify "should behave valid according to the Rack spec" do - lambda { - res = Rack::MockRequest.new(app). - get("https://bla.example.org:9292/meh/foo?bar", :lint => true) - }.should.not.raise(Rack::Lint::LintError) - end -end - -context "Rack::MockResponse" do - specify "should provide access to the HTTP status" do - res = Rack::MockRequest.new(app).get("") - res.should.be.successful - res.should.be.ok - - res = Rack::MockRequest.new(app).get("/?status=404") - res.should.not.be.successful - res.should.be.client_error - res.should.be.not_found - - res = Rack::MockRequest.new(app).get("/?status=501") - res.should.not.be.successful - res.should.be.server_error - - res = Rack::MockRequest.new(app).get("/?status=307") - res.should.be.redirect - - res = Rack::MockRequest.new(app).get("/?status=201", :lint => true) - res.should.be.empty - end - - specify "should provide access to the HTTP headers" do - res = Rack::MockRequest.new(app).get("") - res.should.include "Content-Type" - res.headers["Content-Type"].should.equal "text/yaml" - res.original_headers["Content-Type"].should.equal "text/yaml" - res["Content-Type"].should.equal "text/yaml" - res.content_type.should.equal "text/yaml" - res.content_length.should.be 381 # needs change often. - res.location.should.be.nil - end - - specify "should provide access to the HTTP body" do - res = Rack::MockRequest.new(app).get("") - res.body.should =~ /rack/ - res.should =~ /rack/ - res.should.match(/rack/) - res.should.satisfy { |r| r.match(/rack/) } - end - - specify "should provide access to the Rack errors" do - res = Rack::MockRequest.new(app).get("/?error=foo", :lint => true) - res.should.be.ok - res.errors.should.not.be.empty - res.errors.should.include "foo" - end - - specify "should optionally make Rack errors fatal" do - lambda { - Rack::MockRequest.new(app).get("/?error=foo", :fatal => true) - }.should.raise(Rack::MockRequest::FatalWarning) - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_mongrel.rb b/vendor/rack-0.9.1/test/spec_rack_mongrel.rb deleted file mode 100644 index 1da0af468..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_mongrel.rb +++ /dev/null @@ -1,189 +0,0 @@ -require 'test/spec' - -begin -require 'rack/handler/mongrel' -require 'rack/urlmap' -require 'rack/lint' -require 'testrequest' -require 'timeout' - -Thread.abort_on_exception = true -$tcp_defer_accept_opts = nil -$tcp_cork_opts = nil - -context "Rack::Handler::Mongrel" do - include TestRequest::Helpers - - setup do - server = Mongrel::HttpServer.new(@host='0.0.0.0', @port=9201) - server.register('/test', - Rack::Handler::Mongrel.new(Rack::Lint.new(TestRequest.new))) - server.register('/stream', - Rack::Handler::Mongrel.new(Rack::Lint.new(StreamingRequest))) - @acc = server.run - end - - specify "should respond" do - lambda { - GET("/test") - }.should.not.raise - end - - specify "should be a Mongrel" do - GET("/test") - status.should.be 200 - response["SERVER_SOFTWARE"].should =~ /Mongrel/ - response["HTTP_VERSION"].should.equal "HTTP/1.1" - response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" - response["SERVER_PORT"].should.equal "9201" - response["SERVER_NAME"].should.equal "0.0.0.0" - end - - specify "should have rack headers" do - GET("/test") - response["rack.version"].should.equal [0,1] - response["rack.multithread"].should.be true - response["rack.multiprocess"].should.be false - response["rack.run_once"].should.be false - end - - specify "should have CGI headers on GET" do - GET("/test") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/test" - response["PATH_INFO"].should.be.nil - response["QUERY_STRING"].should.equal "" - response["test.postdata"].should.equal "" - - GET("/test/foo?quux=1") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/test/foo" - response["PATH_INFO"].should.equal "/foo" - response["QUERY_STRING"].should.equal "quux=1" - end - - specify "should have CGI headers on POST" do - POST("/test", {"rack-form-data" => "23"}, {'X-test-header' => '42'}) - status.should.equal 200 - response["REQUEST_METHOD"].should.equal "POST" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/test" - response["QUERY_STRING"].should.equal "" - response["HTTP_X_TEST_HEADER"].should.equal "42" - response["test.postdata"].should.equal "rack-form-data=23" - end - - specify "should support HTTP auth" do - GET("/test", {:user => "ruth", :passwd => "secret"}) - response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ=" - end - - specify "should set status" do - GET("/test?secret") - status.should.equal 403 - response["rack.url_scheme"].should.equal "http" - end - - specify "should provide a .run" do - block_ran = false - Thread.new { - Rack::Handler::Mongrel.run(lambda {}, {:Port => 9211}) { |server| - server.should.be.kind_of Mongrel::HttpServer - block_ran = true - } - } - sleep 1 - block_ran.should.be true - end - - specify "should provide a .run that maps a hash" do - block_ran = false - Thread.new { - map = {'/'=>lambda{},'/foo'=>lambda{}} - Rack::Handler::Mongrel.run(map, :map => true, :Port => 9221) { |server| - server.should.be.kind_of Mongrel::HttpServer - server.classifier.uris.size.should.be 2 - server.classifier.uris.should.not.include '/arf' - server.classifier.uris.should.include '/' - server.classifier.uris.should.include '/foo' - block_ran = true - } - } - sleep 1 - block_ran.should.be true - end - - specify "should provide a .run that maps a urlmap" do - block_ran = false - Thread.new { - map = Rack::URLMap.new({'/'=>lambda{},'/bar'=>lambda{}}) - Rack::Handler::Mongrel.run(map, {:map => true, :Port => 9231}) { |server| - server.should.be.kind_of Mongrel::HttpServer - server.classifier.uris.size.should.be 2 - server.classifier.uris.should.not.include '/arf' - server.classifier.uris.should.include '/' - server.classifier.uris.should.include '/bar' - block_ran = true - } - } - sleep 1 - block_ran.should.be true - end - - specify "should provide a .run that maps a urlmap restricting by host" do - block_ran = false - Thread.new { - map = Rack::URLMap.new({ - '/' => lambda{}, - '/foo' => lambda{}, - '/bar' => lambda{}, - 'http://localhost/' => lambda{}, - 'http://localhost/bar' => lambda{}, - 'http://falsehost/arf' => lambda{}, - 'http://falsehost/qux' => lambda{} - }) - opt = {:map => true, :Port => 9241, :Host => 'localhost'} - Rack::Handler::Mongrel.run(map, opt) { |server| - server.should.be.kind_of Mongrel::HttpServer - server.classifier.uris.should.include '/' - server.classifier.handler_map['/'].size.should.be 2 - server.classifier.uris.should.include '/foo' - server.classifier.handler_map['/foo'].size.should.be 1 - server.classifier.uris.should.include '/bar' - server.classifier.handler_map['/bar'].size.should.be 2 - server.classifier.uris.should.not.include '/qux' - server.classifier.uris.should.not.include '/arf' - server.classifier.uris.size.should.be 3 - block_ran = true - } - } - sleep 1 - block_ran.should.be true - end - - specify "should stream #each part of the response" do - body = '' - begin - Timeout.timeout(1) do - Net::HTTP.start(@host, @port) do |http| - get = Net::HTTP::Get.new('/stream') - http.request(get) do |response| - response.read_body { |part| body << part } - end - end - end - rescue Timeout::Error - end - body.should.not.be.empty - end - - teardown do - @acc.raise Mongrel::StopServer - end -end - -rescue LoadError - $stderr.puts "Skipping Rack::Handler::Mongrel tests (Mongrel is required). `gem install mongrel` and try again." -end diff --git a/vendor/rack-0.9.1/test/spec_rack_recursive.rb b/vendor/rack-0.9.1/test/spec_rack_recursive.rb deleted file mode 100644 index afc1a0d9a..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_recursive.rb +++ /dev/null @@ -1,77 +0,0 @@ -require 'test/spec' - -require 'rack/recursive' -require 'rack/urlmap' -require 'rack/response' -require 'rack/mock' - -context "Rack::Recursive" do - setup do - - @app1 = lambda { |env| - res = Rack::Response.new - res["X-Path-Info"] = env["PATH_INFO"] - res["X-Query-String"] = env["QUERY_STRING"] - res.finish do |res| - res.write "App1" - end - } - - @app2 = lambda { |env| - Rack::Response.new.finish do |res| - res.write "App2" - _, _, body = env['rack.recursive.include'].call(env, "/app1") - body.each { |b| - res.write b - } - end - } - - @app3 = lambda { |env| - raise Rack::ForwardRequest.new("/app1") - } - - @app4 = lambda { |env| - raise Rack::ForwardRequest.new("http://example.org/app1/quux?meh") - } - - end - - specify "should allow for subrequests" do - res = Rack::MockRequest.new(Rack::Recursive.new( - Rack::URLMap.new("/app1" => @app1, - "/app2" => @app2))). - get("/app2") - - res.should.be.ok - res.body.should.equal "App2App1" - end - - specify "should raise error on requests not below the app" do - app = Rack::URLMap.new("/app1" => @app1, - "/app" => Rack::Recursive.new( - Rack::URLMap.new("/1" => @app1, - "/2" => @app2))) - - lambda { - Rack::MockRequest.new(app).get("/app/2") - }.should.raise(ArgumentError). - message.should =~ /can only include below/ - end - - specify "should support forwarding" do - app = Rack::Recursive.new(Rack::URLMap.new("/app1" => @app1, - "/app3" => @app3, - "/app4" => @app4)) - - res = Rack::MockRequest.new(app).get("/app3") - res.should.be.ok - res.body.should.equal "App1" - - res = Rack::MockRequest.new(app).get("/app4") - res.should.be.ok - res.body.should.equal "App1" - res["X-Path-Info"].should.equal "/quux" - res["X-Query-String"].should.equal "meh" - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_request.rb b/vendor/rack-0.9.1/test/spec_rack_request.rb deleted file mode 100644 index e63eee04e..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_request.rb +++ /dev/null @@ -1,446 +0,0 @@ -require 'test/spec' -require 'stringio' - -require 'rack/request' -require 'rack/mock' - -context "Rack::Request" do - specify "wraps the rack variables" do - req = Rack::Request.new(Rack::MockRequest.env_for("http://example.com:8080/")) - - req.body.should.respond_to? :gets - req.scheme.should.equal "http" - req.request_method.should.equal "GET" - - req.should.be.get - req.should.not.be.post - req.should.not.be.put - req.should.not.be.delete - req.should.not.be.head - - req.script_name.should.equal "" - req.path_info.should.equal "/" - req.query_string.should.equal "" - - req.host.should.equal "example.com" - req.port.should.equal 8080 - - req.content_length.should.be.nil - req.content_type.should.be.nil - end - - specify "can figure out the correct host" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", "HTTP_HOST" => "www2.example.org") - req.host.should.equal "www2.example.org" - - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", "SERVER_NAME" => "example.org:9292") - req.host.should.equal "example.org" - end - - specify "can parse the query string" do - req = Rack::Request.new(Rack::MockRequest.env_for("/?foo=bar&quux=bla")) - req.query_string.should.equal "foo=bar&quux=bla" - req.GET.should.equal "foo" => "bar", "quux" => "bla" - req.POST.should.be.empty - req.params.should.equal "foo" => "bar", "quux" => "bla" - end - - specify "can parse POST data" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/?foo=quux", :input => "foo=bar&quux=bla") - req.content_type.should.be.nil - req.media_type.should.be.nil - req.query_string.should.equal "foo=quux" - req.GET.should.equal "foo" => "quux" - req.POST.should.equal "foo" => "bar", "quux" => "bla" - req.params.should.equal "foo" => "bar", "quux" => "bla" - end - - specify "can parse POST data with explicit content type" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", - "CONTENT_TYPE" => 'application/x-www-form-urlencoded;foo=bar', - :input => "foo=bar&quux=bla") - req.content_type.should.equal 'application/x-www-form-urlencoded;foo=bar' - req.media_type.should.equal 'application/x-www-form-urlencoded' - req.media_type_params['foo'].should.equal 'bar' - req.POST.should.equal "foo" => "bar", "quux" => "bla" - req.params.should.equal "foo" => "bar", "quux" => "bla" - end - - specify "does not parse POST data when media type is not form-data" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/?foo=quux", - "CONTENT_TYPE" => 'text/plain;charset=utf-8', - :input => "foo=bar&quux=bla") - req.content_type.should.equal 'text/plain;charset=utf-8' - req.media_type.should.equal 'text/plain' - req.media_type_params['charset'].should.equal 'utf-8' - req.POST.should.be.empty - req.params.should.equal "foo" => "quux" - req.body.read.should.equal "foo=bar&quux=bla" - end - - specify "rewinds input after parsing POST data" do - input = StringIO.new("foo=bar&quux=bla") - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", - "CONTENT_TYPE" => 'application/x-www-form-urlencoded;foo=bar', - :input => input) - req.params.should.equal "foo" => "bar", "quux" => "bla" - input.read.should.equal "foo=bar&quux=bla" - end - - specify "does not rewind unwindable CGI input" do - input = StringIO.new("foo=bar&quux=bla") - input.instance_eval "undef :rewind" - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", - "CONTENT_TYPE" => 'application/x-www-form-urlencoded;foo=bar', - :input => input) - req.params.should.equal "foo" => "bar", "quux" => "bla" - end - - specify "can get value by key from params with #[]" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("?foo=quux") - req['foo'].should.equal 'quux' - req[:foo].should.equal 'quux' - end - - specify "can set value to key on params with #[]=" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("?foo=duh") - req['foo'].should.equal 'duh' - req[:foo].should.equal 'duh' - req.params.should.equal 'foo' => 'duh' - - req['foo'] = 'bar' - req.params.should.equal 'foo' => 'bar' - req['foo'].should.equal 'bar' - req[:foo].should.equal 'bar' - - req[:foo] = 'jaz' - req.params.should.equal 'foo' => 'jaz' - req['foo'].should.equal 'jaz' - req[:foo].should.equal 'jaz' - end - - specify "values_at answers values by keys in order given" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("?foo=baz&wun=der&bar=ful") - req.values_at('foo').should.equal ['baz'] - req.values_at('foo', 'wun').should.equal ['baz', 'der'] - req.values_at('bar', 'foo', 'wun').should.equal ['ful', 'baz', 'der'] - end - - specify "referrer should be extracted correct" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", "HTTP_REFERER" => "/some/path") - req.referer.should.equal "/some/path" - - req = Rack::Request.new \ - Rack::MockRequest.env_for("/") - req.referer.should.equal "/" - end - - specify "can cache, but invalidates the cache" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/?foo=quux", :input => "foo=bar&quux=bla") - req.GET.should.equal "foo" => "quux" - req.GET.should.equal "foo" => "quux" - req.env["QUERY_STRING"] = "bla=foo" - req.GET.should.equal "bla" => "foo" - req.GET.should.equal "bla" => "foo" - - req.POST.should.equal "foo" => "bar", "quux" => "bla" - req.POST.should.equal "foo" => "bar", "quux" => "bla" - req.env["rack.input"] = StringIO.new("foo=bla&quux=bar") - req.POST.should.equal "foo" => "bla", "quux" => "bar" - req.POST.should.equal "foo" => "bla", "quux" => "bar" - end - - specify "can figure out if called via XHR" do - req = Rack::Request.new(Rack::MockRequest.env_for("")) - req.should.not.be.xhr - - req = Rack::Request.new \ - Rack::MockRequest.env_for("", "HTTP_X_REQUESTED_WITH" => "XMLHttpRequest") - req.should.be.xhr - end - - specify "can parse cookies" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("", "HTTP_COOKIE" => "foo=bar;quux=h&m") - req.cookies.should.equal "foo" => "bar", "quux" => "h&m" - req.cookies.should.equal "foo" => "bar", "quux" => "h&m" - req.env.delete("HTTP_COOKIE") - req.cookies.should.equal({}) - end - - specify "parses cookies according to RFC 2109" do - req = Rack::Request.new \ - Rack::MockRequest.env_for('', 'HTTP_COOKIE' => 'foo=bar;foo=car') - req.cookies.should.equal 'foo' => 'bar' - end - - specify "provides setters" do - req = Rack::Request.new(e=Rack::MockRequest.env_for("")) - req.script_name.should.equal "" - req.script_name = "/foo" - req.script_name.should.equal "/foo" - e["SCRIPT_NAME"].should.equal "/foo" - - req.path_info.should.equal "/" - req.path_info = "/foo" - req.path_info.should.equal "/foo" - e["PATH_INFO"].should.equal "/foo" - end - - specify "provides the original env" do - req = Rack::Request.new(e=Rack::MockRequest.env_for("")) - req.env.should.be e - end - - specify "can restore the URL" do - Rack::Request.new(Rack::MockRequest.env_for("")).url. - should.equal "http://example.org/" - Rack::Request.new(Rack::MockRequest.env_for("", "SCRIPT_NAME" => "/foo")).url. - should.equal "http://example.org/foo/" - Rack::Request.new(Rack::MockRequest.env_for("/foo")).url. - should.equal "http://example.org/foo" - Rack::Request.new(Rack::MockRequest.env_for("?foo")).url. - should.equal "http://example.org/?foo" - Rack::Request.new(Rack::MockRequest.env_for("http://example.org:8080/")).url. - should.equal "http://example.org:8080/" - Rack::Request.new(Rack::MockRequest.env_for("https://example.org/")).url. - should.equal "https://example.org/" - - Rack::Request.new(Rack::MockRequest.env_for("https://example.com:8080/foo?foo")).url. - should.equal "https://example.com:8080/foo?foo" - end - - specify "can restore the full path" do - Rack::Request.new(Rack::MockRequest.env_for("")).fullpath. - should.equal "/" - Rack::Request.new(Rack::MockRequest.env_for("", "SCRIPT_NAME" => "/foo")).fullpath. - should.equal "/foo/" - Rack::Request.new(Rack::MockRequest.env_for("/foo")).fullpath. - should.equal "/foo" - Rack::Request.new(Rack::MockRequest.env_for("?foo")).fullpath. - should.equal "/?foo" - Rack::Request.new(Rack::MockRequest.env_for("http://example.org:8080/")).fullpath. - should.equal "/" - Rack::Request.new(Rack::MockRequest.env_for("https://example.org/")).fullpath. - should.equal "/" - - Rack::Request.new(Rack::MockRequest.env_for("https://example.com:8080/foo?foo")).fullpath. - should.equal "/foo?foo" - end - - specify "can handle multiple media type parameters" do - req = Rack::Request.new \ - Rack::MockRequest.env_for("/", - "CONTENT_TYPE" => 'text/plain; foo=BAR,baz=bizzle dizzle;BLING=bam') - req.should.not.be.form_data - req.media_type_params.should.include 'foo' - req.media_type_params['foo'].should.equal 'BAR' - req.media_type_params.should.include 'baz' - req.media_type_params['baz'].should.equal 'bizzle dizzle' - req.media_type_params.should.not.include 'BLING' - req.media_type_params.should.include 'bling' - req.media_type_params['bling'].should.equal 'bam' - end - - specify "can parse multipart form data" do - # Adapted from RFC 1867. - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => input) - - req.POST.should.include "fileupload" - req.POST.should.include "reply" - - req.should.be.form_data - req.content_length.should.equal input.size - req.media_type.should.equal 'multipart/form-data' - req.media_type_params.should.include 'boundary' - req.media_type_params['boundary'].should.equal 'AaB03x' - - req.POST["reply"].should.equal "yes" - - f = req.POST["fileupload"] - f.should.be.kind_of Hash - f[:type].should.equal "image/jpeg" - f[:filename].should.equal "dj.jpg" - f.should.include :tempfile - f[:tempfile].size.should.equal 76 - end - - specify "can parse big multipart form data" do - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => input) - - req.POST["huge"][:tempfile].size.should.equal 32768 - req.POST["mean"][:tempfile].size.should.equal 10 - req.POST["mean"][:tempfile].read.should.equal "--AaB03xha" - end - - specify "can detect invalid multipart form data" do - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => input) - - lambda { req.POST }.should.raise(EOFError) - - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => input) - - lambda { req.POST }.should.raise(EOFError) - - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => input) - - lambda { req.POST }.should.raise(EOFError) - end - - specify "should work around buggy 1.8.* Tempfile equality" do - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size, - :input => rack_input) - - lambda {req.POST}.should.not.raise - lambda {req.POST}.should.blaming("input re-processed!").not.raise - end - - specify "does conform to the Rack spec" do - app = lambda { |env| - content = Rack::Request.new(env).POST["file"].inspect - size = content.respond_to?(:bytesize) ? content.bytesize : content.size - [200, {"Content-Type" => "text/html", "Content-Length" => size.to_s}, content] - } - - input = < "multipart/form-data, boundary=AaB03x", - "CONTENT_LENGTH" => input.size.to_s, "rack.input" => StringIO.new(input) - - res.should.be.ok - end - - specify "should parse Accept-Encoding correctly" do - parser = lambda do |x| - Rack::Request.new(Rack::MockRequest.env_for("", "HTTP_ACCEPT_ENCODING" => x)).accept_encoding - end - - parser.call(nil).should.equal([]) - - parser.call("compress, gzip").should.equal([["compress", 1.0], ["gzip", 1.0]]) - parser.call("").should.equal([]) - parser.call("*").should.equal([["*", 1.0]]) - parser.call("compress;q=0.5, gzip;q=1.0").should.equal([["compress", 0.5], ["gzip", 1.0]]) - parser.call("gzip;q=1.0, identity; q=0.5, *;q=0").should.equal([["gzip", 1.0], ["identity", 0.5], ["*", 0] ]) - - lambda { parser.call("gzip ; q=1.0") }.should.raise(RuntimeError) - end - - specify 'should provide ip information' do - app = lambda { |env| - request = Rack::Request.new(env) - response = Rack::Response.new - response.write request.ip - response.finish - } - - mock = Rack::MockRequest.new(Rack::Lint.new(app)) - res = mock.get '/', 'REMOTE_ADDR' => '123.123.123.123' - res.body.should == '123.123.123.123' - - res = mock.get '/', - 'REMOTE_ADDR' => '123.123.123.123', - 'HTTP_X_FORWARDED_FOR' => '234.234.234.234' - - res.body.should == '234.234.234.234' - - res = mock.get '/', - 'REMOTE_ADDR' => '123.123.123.123', - 'HTTP_X_FORWARDED_FOR' => '234.234.234.234,212.212.212.212' - - res.body.should == '212.212.212.212' - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_response.rb b/vendor/rack-0.9.1/test/spec_rack_response.rb deleted file mode 100644 index 748007af2..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_response.rb +++ /dev/null @@ -1,174 +0,0 @@ -require 'test/spec' -require 'set' - -require 'rack/response' - -context "Rack::Response" do - specify "has sensible default values" do - response = Rack::Response.new - status, header, body = response.finish - status.should.equal 200 - header.should.equal "Content-Type" => "text/html", "Content-Length" => "0" - body.each { |part| - part.should.equal "" - } - - response = Rack::Response.new - status, header, body = *response - status.should.equal 200 - header.should.equal "Content-Type" => "text/html", "Content-Length" => "0" - body.each { |part| - part.should.equal "" - } - end - - specify "can be written to" do - response = Rack::Response.new - - status, header, body = response.finish do - response.write "foo" - response.write "bar" - response.write "baz" - end - - parts = [] - body.each { |part| parts << part } - - parts.should.equal ["foo", "bar", "baz"] - end - - specify "can set and read headers" do - response = Rack::Response.new - response["Content-Type"].should.equal "text/html" - response["Content-Type"] = "text/plain" - response["Content-Type"].should.equal "text/plain" - end - - specify "can set cookies" do - response = Rack::Response.new - - response.set_cookie "foo", "bar" - response["Set-Cookie"].should.equal "foo=bar" - response.set_cookie "foo2", "bar2" - response["Set-Cookie"].should.equal ["foo=bar", "foo2=bar2"] - response.set_cookie "foo3", "bar3" - response["Set-Cookie"].should.equal ["foo=bar", "foo2=bar2", "foo3=bar3"] - end - - specify "formats the Cookie expiration date accordingly to RFC 2109" do - response = Rack::Response.new - - response.set_cookie "foo", {:value => "bar", :expires => Time.now+10} - response["Set-Cookie"].should.match( - /expires=..., \d\d-...-\d\d\d\d \d\d:\d\d:\d\d .../) - end - - specify "can set secure cookies" do - response = Rack::Response.new - response.set_cookie "foo", {:value => "bar", :secure => true} - response["Set-Cookie"].should.equal "foo=bar; secure" - end - - specify "can delete cookies" do - response = Rack::Response.new - response.set_cookie "foo", "bar" - response.set_cookie "foo2", "bar2" - response.delete_cookie "foo" - response["Set-Cookie"].should.equal ["foo2=bar2", - "foo=; expires=Thu, 01-Jan-1970 00:00:00 GMT"] - end - - specify "has a useful constructor" do - r = Rack::Response.new("foo") - status, header, body = r.finish - str = ""; body.each { |part| str << part } - str.should.equal "foo" - - r = Rack::Response.new(["foo", "bar"]) - status, header, body = r.finish - str = ""; body.each { |part| str << part } - str.should.equal "foobar" - - r = Rack::Response.new(["foo", "bar"].to_set) - r.write "foo" - status, header, body = r.finish - str = ""; body.each { |part| str << part } - str.should.equal "foobarfoo" - - r = Rack::Response.new([], 500) - r.status.should.equal 500 - end - - specify "has a constructor that can take a block" do - r = Rack::Response.new { |res| - res.status = 404 - res.write "foo" - } - status, header, body = r.finish - str = ""; body.each { |part| str << part } - str.should.equal "foo" - status.should.equal 404 - end - - specify "doesn't return invalid responses" do - r = Rack::Response.new(["foo", "bar"], 204) - status, header, body = r.finish - str = ""; body.each { |part| str << part } - str.should.be.empty - header["Content-Type"].should.equal nil - - lambda { - Rack::Response.new(Object.new) - }.should.raise(TypeError). - message.should =~ /stringable or iterable required/ - end - - specify "knows if it's empty" do - r = Rack::Response.new - r.should.be.empty - r.write "foo" - r.should.not.be.empty - - r = Rack::Response.new - r.should.be.empty - r.finish - r.should.be.empty - - r = Rack::Response.new - r.should.be.empty - r.finish { } - r.should.not.be.empty - end - - specify "should provide access to the HTTP status" do - res = Rack::Response.new - res.status = 200 - res.should.be.successful - res.should.be.ok - - res.status = 404 - res.should.not.be.successful - res.should.be.client_error - res.should.be.not_found - - res.status = 501 - res.should.not.be.successful - res.should.be.server_error - - res.status = 307 - res.should.be.redirect - end - - specify "should provide access to the HTTP headers" do - res = Rack::Response.new - res["Content-Type"] = "text/yaml" - - res.should.include "Content-Type" - res.headers["Content-Type"].should.equal "text/yaml" - res["Content-Type"].should.equal "text/yaml" - res.content_type.should.equal "text/yaml" - res.content_length.should.be.nil - res.location.should.be.nil - end - -end diff --git a/vendor/rack-0.9.1/test/spec_rack_session_cookie.rb b/vendor/rack-0.9.1/test/spec_rack_session_cookie.rb deleted file mode 100644 index 3be88b432..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_session_cookie.rb +++ /dev/null @@ -1,82 +0,0 @@ -require 'test/spec' - -require 'rack/session/cookie' -require 'rack/mock' -require 'rack/response' - -context "Rack::Session::Cookie" do - incrementor = lambda { |env| - env["rack.session"]["counter"] ||= 0 - env["rack.session"]["counter"] += 1 - Rack::Response.new(env["rack.session"].inspect).to_a - } - - specify "creates a new cookie" do - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)).get("/") - res["Set-Cookie"].should.match("rack.session=") - res.body.should.equal '{"counter"=>1}' - end - - specify "loads from a cookie" do - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)).get("/") - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)). - get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>2}' - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)). - get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>3}' - end - - specify "survives broken cookies" do - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor)). - get("/", "HTTP_COOKIE" => "rack.session=blarghfasel") - res.body.should.equal '{"counter"=>1}' - end - - bigcookie = lambda { |env| - env["rack.session"]["cookie"] = "big" * 3000 - Rack::Response.new(env["rack.session"].inspect).to_a - } - - specify "barks on too big cookies" do - lambda { - Rack::MockRequest.new(Rack::Session::Cookie.new(bigcookie)). - get("/", :fatal => true) - }.should.raise(Rack::MockRequest::FatalWarning) - end - - specify "creates a new cookie with integrity hash" do - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')).get("/") - if RUBY_VERSION < "1.9" - res["Set-Cookie"].should.match("rack.session=BAh7BiIMY291bnRlcmkG%0A--1439b4d37b9d4b04c603848382f712d6fcd31088") - else - res["Set-Cookie"].should.match("rack.session=BAh7BkkiDGNvdW50ZXIGOg1lbmNvZGluZyINVVMtQVNDSUlpBg%3D%3D%0A--d7a6637b94d2728194a96c18484e1f7ed9074a83") - end - end - - specify "loads from a cookie wih integrity hash" do - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')).get("/") - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')). - get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>2}' - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(Rack::Session::Cookie.new(incrementor, :secret => 'test')). - get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>3}' - end - - specify "ignores tampered with session cookies" do - app = Rack::Session::Cookie.new(incrementor, :secret => 'test') - response1 = Rack::MockRequest.new(app).get("/") - _, digest = response1["Set-Cookie"].split("--") - tampered_with_cookie = "hackerman-was-here" + "--" + digest - response2 = Rack::MockRequest.new(app).get("/", "HTTP_COOKIE" => - tampered_with_cookie) - - # The tampered-with cookie is ignored, so we get back an identical Set-Cookie - response2["Set-Cookie"].should.equal(response1["Set-Cookie"]) - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_session_memcache.rb b/vendor/rack-0.9.1/test/spec_rack_session_memcache.rb deleted file mode 100644 index 443524134..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_session_memcache.rb +++ /dev/null @@ -1,132 +0,0 @@ -require 'test/spec' - -begin - require 'rack/session/memcache' - require 'rack/mock' - require 'rack/response' - require 'thread' - - context "Rack::Session::Memcache" do - incrementor = lambda { |env| - env["rack.session"]["counter"] ||= 0 - env["rack.session"]["counter"] += 1 - Rack::Response.new(env["rack.session"].inspect).to_a - } - - # Keep this first. - specify "startup" do - $pid = fork { - exec "memcached" - } - sleep 1 - end - - specify "faults on no connection" do - lambda do - Rack::Session::Memcache.new(incrementor, :memcache_server => '') - end.should.raise - end - - specify "creates a new cookie" do - cache = Rack::Session::Memcache.new(incrementor) - res = Rack::MockRequest.new(cache).get("/") - res["Set-Cookie"].should.match("rack.session=") - res.body.should.equal '{"counter"=>1}' - end - - specify "determines session from a cookie" do - cache = Rack::Session::Memcache.new(incrementor) - res = Rack::MockRequest.new(cache).get("/") - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(cache).get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>2}' - res = Rack::MockRequest.new(cache).get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>3}' - end - - specify "survives broken cookies" do - cache = Rack::Session::Memcache.new(incrementor) - res = Rack::MockRequest.new(cache). - get("/", "HTTP_COOKIE" => "rack.session=blarghfasel") - res.body.should.equal '{"counter"=>1}' - end - - specify "maintains freshness" do - cache = Rack::Session::Memcache.new(incrementor, :expire_after => 3) - res = Rack::MockRequest.new(cache).get('/') - res.body.should.include '"counter"=>1' - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(cache).get('/', "HTTP_COOKIE" => cookie) - res["Set-Cookie"].should.equal cookie - res.body.should.include '"counter"=>2' - puts 'Sleeping to expire session' if $DEBUG - sleep 4 - res = Rack::MockRequest.new(cache).get('/', "HTTP_COOKIE" => cookie) - res["Set-Cookie"].should.not.equal cookie - res.body.should.include '"counter"=>1' - end - - specify "multithread: should cleanly merge sessions" do - cache = Rack::Session::Memcache.new(incrementor) - drop_counter = Rack::Session::Memcache.new(proc do |env| - env['rack.session'].delete 'counter' - env['rack.session']['foo'] = 'bar' - [200, {'Content-Type'=>'text/plain'}, env['rack.session'].inspect] - end) - - res = Rack::MockRequest.new(cache).get('/') - res.body.should.equal '{"counter"=>1}' - cookie = res["Set-Cookie"] - sess_id = cookie[/#{cache.key}=([^,;]+)/, 1] - - res = Rack::MockRequest.new(cache).get('/', "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>2}' - - r = Array.new(rand(7).to_i+2) do |i| - app = proc do |env| - env['rack.session'][i] = Time.now - sleep 2 - env['rack.session'] = env['rack.session'].dup - env['rack.session'][i] -= Time.now - incrementor.call(env) - end - Thread.new(cache.context(app)) do |run| - Rack::MockRequest.new(run). - get('/', "HTTP_COOKIE" => cookie, 'rack.multithread' => true) - end - end - - r.reverse! - - r.map! do |t| - p t if $DEBUG - t.join.value - end - - r.each do |res| - res['Set-Cookie'].should.equal cookie - res.body.should.include '"counter"=>3' - end - - session = cache.pool[sess_id] - session.size.should.be r.size+1 - session['counter'].should.be 3 - - res = Rack::MockRequest.new(drop_counter).get('/', "HTTP_COOKIE" => cookie) - res.body.should.include '"foo"=>"bar"' - - session = cache.pool[sess_id] - session.size.should.be r.size+1 - session['counter'].should.be.nil? - session['foo'].should.equal 'bar' - end - - # Keep this last. - specify "shutdown" do - Process.kill 15, $pid - Process.wait($pid).should.equal $pid - end - end -rescue LoadError - $stderr.puts "Skipping Rack::Session::Memcache tests (Memcache is required). `gem install memcache-client` and try again." -end diff --git a/vendor/rack-0.9.1/test/spec_rack_session_pool.rb b/vendor/rack-0.9.1/test/spec_rack_session_pool.rb deleted file mode 100644 index 794f96193..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_session_pool.rb +++ /dev/null @@ -1,84 +0,0 @@ -require 'test/spec' - -require 'rack/session/pool' -require 'rack/mock' -require 'rack/response' -require 'thread' - -context "Rack::Session::Pool" do - incrementor = lambda { |env| - env["rack.session"]["counter"] ||= 0 - env["rack.session"]["counter"] += 1 - Rack::Response.new(env["rack.session"].inspect).to_a - } - - specify "creates a new cookie" do - pool = Rack::Session::Pool.new(incrementor) - res = Rack::MockRequest.new(pool).get("/") - res["Set-Cookie"].should.match("rack.session=") - res.body.should.equal '{"counter"=>1}' - end - - specify "determines session from a cookie" do - pool = Rack::Session::Pool.new(incrementor) - res = Rack::MockRequest.new(pool).get("/") - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(pool).get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>2}' - res = Rack::MockRequest.new(pool).get("/", "HTTP_COOKIE" => cookie) - res.body.should.equal '{"counter"=>3}' - end - - specify "survives broken cookies" do - pool = Rack::Session::Pool.new(incrementor) - res = Rack::MockRequest.new(pool). - get("/", "HTTP_COOKIE" => "rack.session=blarghfasel") - res.body.should.equal '{"counter"=>1}' - end - - specify "maintains freshness" do - pool = Rack::Session::Pool.new(incrementor, :expire_after => 3) - res = Rack::MockRequest.new(pool).get('/') - res.body.should.include '"counter"=>1' - cookie = res["Set-Cookie"] - res = Rack::MockRequest.new(pool).get('/', "HTTP_COOKIE" => cookie) - res["Set-Cookie"].should.equal cookie - res.body.should.include '"counter"=>2' - sleep 4 - res = Rack::MockRequest.new(pool).get('/', "HTTP_COOKIE" => cookie) - res["Set-Cookie"].should.not.equal cookie - res.body.should.include '"counter"=>1' - end - - specify "multithread: should merge sessions" do - delta_incrementor = lambda do |env| - # emulate disconjoinment of threading - env['rack.session'] = env['rack.session'].dup - Thread.stop - env['rack.session'][(Time.now.usec*rand).to_i] = true - incrementor.call(env) - end - pool = Rack::Session::Pool.new(incrementor) - res = Rack::MockRequest.new(pool).get('/') - res.body.should.equal '{"counter"=>1}' - cookie = res["Set-Cookie"] - sess_id = cookie[/#{pool.key}=([^,;]+)/,1] - - pool = pool.context(delta_incrementor) - r = Array.new(rand(7).to_i+3). - map! do - Thread.new do - Rack::MockRequest.new(pool).get('/', "HTTP_COOKIE" => cookie) - end - end. - reverse!. - map!{|t| t.run.join.value } - session = pool.for.pool[sess_id] # for is needed by Utils::Context - session.size.should.be r.size+1 # counter - session['counter'].should.be 2 # meeeh - r.each do |res| - res['Set-Cookie'].should.equal cookie - res.body.should.include '"counter"=>2' - end - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_showexceptions.rb b/vendor/rack-0.9.1/test/spec_rack_showexceptions.rb deleted file mode 100644 index bdbc12013..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_showexceptions.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'test/spec' - -require 'rack/showexceptions' -require 'rack/mock' - -context "Rack::ShowExceptions" do - specify "catches exceptions" do - res = nil - req = Rack::MockRequest.new(Rack::ShowExceptions.new(lambda { |env| - raise RuntimeError - })) - lambda { - res = req.get("/") - }.should.not.raise - res.should.be.a.server_error - res.status.should.equal 500 - - res.should =~ /RuntimeError/ - res.should =~ /ShowExceptions/ - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_showstatus.rb b/vendor/rack-0.9.1/test/spec_rack_showstatus.rb deleted file mode 100644 index 787001341..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_showstatus.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'test/spec' - -require 'rack/showstatus' -require 'rack/mock' - -context "Rack::ShowStatus" do - specify "should provide a default status message" do - req = Rack::MockRequest.new(Rack::ShowStatus.new(lambda { |env| - [404, {"Content-Type" => "text/plain", "Content-Length" => "0"}, []] - })) - - res = req.get("/", :lint => true) - res.should.be.not_found - res.should.be.not.empty - - res["Content-Type"].should.equal("text/html") - res.should =~ /404/ - res.should =~ /Not Found/ - end - - specify "should let the app provide additional information" do - req = Rack::MockRequest.new(Rack::ShowStatus.new(lambda { |env| - env["rack.showstatus.detail"] = "gone too meta." - [404, {"Content-Type" => "text/plain", "Content-Length" => "0"}, []] - })) - - res = req.get("/", :lint => true) - res.should.be.not_found - res.should.be.not.empty - - res["Content-Type"].should.equal("text/html") - res.should =~ /404/ - res.should =~ /Not Found/ - res.should =~ /too meta/ - end - - specify "should not replace existing messages" do - req = Rack::MockRequest.new(Rack::ShowStatus.new(lambda { |env| - [404, {"Content-Type" => "text/plain", "Content-Length" => "4"}, ["foo!"]] - })) - res = req.get("/", :lint => true) - res.should.be.not_found - - res.body.should == "foo!" - end - - specify "should pass on original headers" do - headers = {"WWW-Authenticate" => "Basic blah"} - - req = Rack::MockRequest.new(Rack::ShowStatus.new(lambda { |env| [401, headers, []] })) - res = req.get("/", :lint => true) - - res["WWW-Authenticate"].should.equal("Basic blah") - end - - specify "should replace existing messages if there is detail" do - req = Rack::MockRequest.new(Rack::ShowStatus.new(lambda { |env| - env["rack.showstatus.detail"] = "gone too meta." - [404, {"Content-Type" => "text/plain", "Content-Length" => "4"}, ["foo!"]] - })) - - res = req.get("/", :lint => true) - res.should.be.not_found - res.should.be.not.empty - - res["Content-Type"].should.equal("text/html") - res["Content-Length"].should.not.equal("4") - res.should =~ /404/ - res.should =~ /too meta/ - res.body.should.not =~ /foo/ - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_static.rb b/vendor/rack-0.9.1/test/spec_rack_static.rb deleted file mode 100644 index 67cf97ec0..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_static.rb +++ /dev/null @@ -1,37 +0,0 @@ -require 'test/spec' - -require 'rack/static' -require 'rack/mock' - -class DummyApp - def call(env) - [200, {}, "Hello World"] - end -end - -context "Rack::Static" do - root = File.expand_path(File.dirname(__FILE__)) - OPTIONS = {:urls => ["/cgi"], :root => root} - - setup do - @request = Rack::MockRequest.new(Rack::Static.new(DummyApp.new, OPTIONS)) - end - - specify "serves files" do - res = @request.get("/cgi/test") - res.should.be.ok - res.body.should =~ /ruby/ - end - - specify "404s if url root is known but it can't find the file" do - res = @request.get("/cgi/foo") - res.should.be.not_found - end - - specify "calls down the chain if url root is not known" do - res = @request.get("/something/else") - res.should.be.ok - res.body.should == "Hello World" - end - -end \ No newline at end of file diff --git a/vendor/rack-0.9.1/test/spec_rack_thin.rb b/vendor/rack-0.9.1/test/spec_rack_thin.rb deleted file mode 100644 index ee128d6be..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_thin.rb +++ /dev/null @@ -1,90 +0,0 @@ -require 'test/spec' - -begin -require 'rack/handler/thin' -require 'testrequest' -require 'timeout' - -context "Rack::Handler::Thin" do - include TestRequest::Helpers - - setup do - @app = Rack::Lint.new(TestRequest.new) - Thin::Logging.silent = true - @thread = Thread.new do - Rack::Handler::Thin.run(@app, :Host => @host='0.0.0.0', :Port => @port=9201) do |server| - @server = server - end - end - Thread.pass until @server && @server.running? - end - - specify "should respond" do - lambda { - GET("/") - }.should.not.raise - end - - specify "should be a Thin" do - GET("/") - status.should.be 200 - response["SERVER_SOFTWARE"].should =~ /thin/ - response["HTTP_VERSION"].should.equal "HTTP/1.1" - response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" - response["SERVER_PORT"].should.equal "9201" - response["SERVER_NAME"].should.equal "0.0.0.0" - end - - specify "should have rack headers" do - GET("/") - response["rack.version"].should.equal [0,3] - response["rack.multithread"].should.be false - response["rack.multiprocess"].should.be false - response["rack.run_once"].should.be false - end - - specify "should have CGI headers on GET" do - GET("/") - response["REQUEST_METHOD"].should.equal "GET" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.be.equal "/" - response["QUERY_STRING"].should.equal "" - response["test.postdata"].should.equal "" - - GET("/test/foo?quux=1") - response["REQUEST_METHOD"].should.equal "GET" - response["REQUEST_PATH"].should.equal "/test/foo" - response["PATH_INFO"].should.equal "/test/foo" - response["QUERY_STRING"].should.equal "quux=1" - end - - specify "should have CGI headers on POST" do - POST("/", {"rack-form-data" => "23"}, {'X-test-header' => '42'}) - status.should.equal 200 - response["REQUEST_METHOD"].should.equal "POST" - response["REQUEST_PATH"].should.equal "/" - response["QUERY_STRING"].should.equal "" - response["HTTP_X_TEST_HEADER"].should.equal "42" - response["test.postdata"].should.equal "rack-form-data=23" - end - - specify "should support HTTP auth" do - GET("/test", {:user => "ruth", :passwd => "secret"}) - response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ=" - end - - specify "should set status" do - GET("/test?secret") - status.should.equal 403 - response["rack.url_scheme"].should.equal "http" - end - - teardown do - @server.stop! - @thread.kill - end -end - -rescue LoadError - $stderr.puts "Skipping Rack::Handler::Thin tests (Thin is required). `gem install thin` and try again." -end diff --git a/vendor/rack-0.9.1/test/spec_rack_urlmap.rb b/vendor/rack-0.9.1/test/spec_rack_urlmap.rb deleted file mode 100644 index d2c206244..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_urlmap.rb +++ /dev/null @@ -1,175 +0,0 @@ -require 'test/spec' - -require 'rack/urlmap' -require 'rack/mock' - -context "Rack::URLMap" do - specify "dispatches paths correctly" do - app = lambda { |env| - [200, { - 'X-ScriptName' => env['SCRIPT_NAME'], - 'X-PathInfo' => env['PATH_INFO'], - 'Content-Type' => 'text/plain' - }, [""]] - } - map = Rack::URLMap.new({ - 'http://foo.org/bar' => app, - '/foo' => app, - '/foo/bar' => app - }) - - res = Rack::MockRequest.new(map).get("/") - res.should.be.not_found - - res = Rack::MockRequest.new(map).get("/qux") - res.should.be.not_found - - res = Rack::MockRequest.new(map).get("/foo") - res.should.be.ok - res["X-ScriptName"].should.equal "/foo" - res["X-PathInfo"].should.equal "" - - res = Rack::MockRequest.new(map).get("/foo/") - res.should.be.ok - res["X-ScriptName"].should.equal "/foo" - res["X-PathInfo"].should.equal "/" - - res = Rack::MockRequest.new(map).get("/foo/bar") - res.should.be.ok - res["X-ScriptName"].should.equal "/foo/bar" - res["X-PathInfo"].should.equal "" - - res = Rack::MockRequest.new(map).get("/foo/bar/") - res.should.be.ok - res["X-ScriptName"].should.equal "/foo/bar" - res["X-PathInfo"].should.equal "/" - - res = Rack::MockRequest.new(map).get("/foo/quux", "SCRIPT_NAME" => "/bleh") - res.should.be.ok - res["X-ScriptName"].should.equal "/bleh/foo" - res["X-PathInfo"].should.equal "/quux" - - res = Rack::MockRequest.new(map).get("/bar", 'HTTP_HOST' => 'foo.org') - res.should.be.ok - res["X-ScriptName"].should.equal "/bar" - res["X-PathInfo"].should.be.empty - - res = Rack::MockRequest.new(map).get("/bar/", 'HTTP_HOST' => 'foo.org') - res.should.be.ok - res["X-ScriptName"].should.equal "/bar" - res["X-PathInfo"].should.equal '/' - end - - - specify "dispatches hosts correctly" do - map = Rack::URLMap.new("http://foo.org/" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "foo.org", - "X-Host" => env["HTTP_HOST"] || env["SERVER_NAME"], - }, [""]]}, - "http://bar.org/" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "bar.org", - "X-Host" => env["HTTP_HOST"] || env["SERVER_NAME"], - }, [""]]}, - "/" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "default.org", - "X-Host" => env["HTTP_HOST"] || env["SERVER_NAME"], - }, [""]]} - ) - - res = Rack::MockRequest.new(map).get("/") - res.should.be.ok - res["X-Position"].should.equal "default.org" - - res = Rack::MockRequest.new(map).get("/", "HTTP_HOST" => "bar.org") - res.should.be.ok - res["X-Position"].should.equal "bar.org" - - res = Rack::MockRequest.new(map).get("/", "HTTP_HOST" => "foo.org") - res.should.be.ok - res["X-Position"].should.equal "foo.org" - - res = Rack::MockRequest.new(map).get("http://foo.org/") - res.should.be.ok - res["X-Position"].should.equal "default.org" - - res = Rack::MockRequest.new(map).get("/", "HTTP_HOST" => "example.org") - res.should.be.ok - res["X-Position"].should.equal "default.org" - - res = Rack::MockRequest.new(map).get("/", - "HTTP_HOST" => "example.org:9292", - "SERVER_PORT" => "9292") - res.should.be.ok - res["X-Position"].should.equal "default.org" - end - - specify "should be nestable" do - map = Rack::URLMap.new("/foo" => - Rack::URLMap.new("/bar" => - Rack::URLMap.new("/quux" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "/foo/bar/quux", - "X-PathInfo" => env["PATH_INFO"], - "X-ScriptName" => env["SCRIPT_NAME"], - }, [""]]} - ))) - - res = Rack::MockRequest.new(map).get("/foo/bar") - res.should.be.not_found - - res = Rack::MockRequest.new(map).get("/foo/bar/quux") - res.should.be.ok - res["X-Position"].should.equal "/foo/bar/quux" - res["X-PathInfo"].should.equal "" - res["X-ScriptName"].should.equal "/foo/bar/quux" - end - - specify "should route root apps correctly" do - map = Rack::URLMap.new("/" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "root", - "X-PathInfo" => env["PATH_INFO"], - "X-ScriptName" => env["SCRIPT_NAME"] - }, [""]]}, - "/foo" => lambda { |env| - [200, - { "Content-Type" => "text/plain", - "X-Position" => "foo", - "X-PathInfo" => env["PATH_INFO"], - "X-ScriptName" => env["SCRIPT_NAME"] - }, [""]]} - ) - - res = Rack::MockRequest.new(map).get("/foo/bar") - res.should.be.ok - res["X-Position"].should.equal "foo" - res["X-PathInfo"].should.equal "/bar" - res["X-ScriptName"].should.equal "/foo" - - res = Rack::MockRequest.new(map).get("/foo") - res.should.be.ok - res["X-Position"].should.equal "foo" - res["X-PathInfo"].should.equal "" - res["X-ScriptName"].should.equal "/foo" - - res = Rack::MockRequest.new(map).get("/bar") - res.should.be.ok - res["X-Position"].should.equal "root" - res["X-PathInfo"].should.equal "/bar" - res["X-ScriptName"].should.equal "" - - res = Rack::MockRequest.new(map).get("") - res.should.be.ok - res["X-Position"].should.equal "root" - res["X-PathInfo"].should.equal "/" - res["X-ScriptName"].should.equal "" - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_utils.rb b/vendor/rack-0.9.1/test/spec_rack_utils.rb deleted file mode 100644 index ced710f95..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_utils.rb +++ /dev/null @@ -1,176 +0,0 @@ -require 'test/spec' - -require 'rack/utils' -require 'rack/lint' -require 'rack/mock' - -context "Rack::Utils" do - specify "should escape correctly" do - Rack::Utils.escape("fobar").should.equal "fo%3Co%3Ebar" - Rack::Utils.escape("a space").should.equal "a+space" - Rack::Utils.escape("q1!2\"'w$5&7/z8)?\\"). - should.equal "q1%212%22%27w%245%267%2Fz8%29%3F%5C" - end - - specify "should unescape correctly" do - Rack::Utils.unescape("fo%3Co%3Ebar").should.equal "fobar" - Rack::Utils.unescape("a+space").should.equal "a space" - Rack::Utils.unescape("a%20space").should.equal "a space" - Rack::Utils.unescape("q1%212%22%27w%245%267%2Fz8%29%3F%5C"). - should.equal "q1!2\"'w$5&7/z8)?\\" - end - - specify "should parse query strings correctly" do - Rack::Utils.parse_query("foo=bar").should.equal "foo" => "bar" - Rack::Utils.parse_query("foo=bar&foo=quux"). - should.equal "foo" => ["bar", "quux"] - Rack::Utils.parse_query("foo=1&bar=2"). - should.equal "foo" => "1", "bar" => "2" - Rack::Utils.parse_query("my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F"). - should.equal "my weird field" => "q1!2\"'w$5&7/z8)?" - end - - specify "should build query strings correctly" do - Rack::Utils.build_query("foo" => "bar").should.equal "foo=bar" - Rack::Utils.build_query("foo" => ["bar", "quux"]). - should.equal "foo=bar&foo=quux" - Rack::Utils.build_query("foo" => "1", "bar" => "2"). - should.equal "foo=1&bar=2" - Rack::Utils.build_query("my weird field" => "q1!2\"'w$5&7/z8)?"). - should.equal "my+weird+field=q1%212%22%27w%245%267%2Fz8%29%3F" - end - - specify "should figure out which encodings are acceptable" do - helper = lambda do |a, b| - request = Rack::Request.new(Rack::MockRequest.env_for("", "HTTP_ACCEPT_ENCODING" => a)) - Rack::Utils.select_best_encoding(a, b) - end - - helper.call(%w(), [["x", 1]]).should.equal(nil) - helper.call(%w(identity), [["identity", 0.0]]).should.equal(nil) - helper.call(%w(identity), [["*", 0.0]]).should.equal(nil) - - helper.call(%w(identity), [["compress", 1.0], ["gzip", 1.0]]).should.equal("identity") - - helper.call(%w(compress gzip identity), [["compress", 1.0], ["gzip", 1.0]]).should.equal("compress") - helper.call(%w(compress gzip identity), [["compress", 0.5], ["gzip", 1.0]]).should.equal("gzip") - - helper.call(%w(foo bar identity), []).should.equal("identity") - helper.call(%w(foo bar identity), [["*", 1.0]]).should.equal("foo") - helper.call(%w(foo bar identity), [["*", 1.0], ["foo", 0.9]]).should.equal("bar") - - helper.call(%w(foo bar identity), [["foo", 0], ["bar", 0]]).should.equal("identity") - helper.call(%w(foo bar baz identity), [["*", 0], ["identity", 0.1]]).should.equal("identity") - end -end - -context "Rack::Utils::HeaderHash" do - specify "should retain header case" do - h = Rack::Utils::HeaderHash.new("Content-MD5" => "d5ff4e2a0 ...") - h['ETag'] = 'Boo!' - h.to_hash.should.equal "Content-MD5" => "d5ff4e2a0 ...", "ETag" => 'Boo!' - end - - specify "should check existence of keys case insensitively" do - h = Rack::Utils::HeaderHash.new("Content-MD5" => "d5ff4e2a0 ...") - h.should.include 'content-md5' - h.should.not.include 'ETag' - end - - specify "should merge case-insensitively" do - h = Rack::Utils::HeaderHash.new("ETag" => 'HELLO', "content-length" => '123') - merged = h.merge("Etag" => 'WORLD', 'Content-Length' => '321', "Foo" => 'BAR') - merged.should.equal "Etag"=>'WORLD', "Content-Length"=>'321', "Foo"=>'BAR' - end - - specify "should overwrite case insensitively and assume the new key's case" do - h = Rack::Utils::HeaderHash.new("Foo-Bar" => "baz") - h["foo-bar"] = "bizzle" - h["FOO-BAR"].should.equal "bizzle" - h.length.should.equal 1 - h.to_hash.should.equal "foo-bar" => "bizzle" - end - - specify "should be converted to real Hash" do - h = Rack::Utils::HeaderHash.new("foo" => "bar") - h.to_hash.should.be.instance_of Hash - end -end - -context "Rack::Utils::Context" do - test_app1 = Object.new - def test_app1.context app - Rack::Utils::Context.new self, app do |env| - app.call env - end - end - test_app2 = Object.new - def test_app2.context env; end - test_app3 = Object.new - test_target1 = proc{|e| e.to_s+' world' } - test_target2 = proc{|e| e.to_i+2 } - test_target3 = proc{|e| nil } - test_target4 = proc{|e| [200,{'Content-Type'=>'text/plain', 'Content-Length'=>'0'},['']] } - test_target5 = Object.new - - specify "should perform checks on both arguments" do - lambda { Rack::Utils::Context.new(nil, nil){} }.should.raise - lambda { Rack::Utils::Context.new(test_app1, nil){} }.should.raise - lambda { Rack::Utils::Context.new(nil, test_target1){} }.should.raise - lambda { Rack::Utils::Context.new(test_app1, test_target1){} }.should.not.raise - lambda { Rack::Utils::Context.new(test_app3, test_target1){} }.should.raise - lambda { Rack::Utils::Context.new(test_app1, test_target5){} }.should.raise - lambda { test_app1.context(nil){} }.should.raise - lambda { test_app1.context(test_target1){} }.should.not.raise - lambda { test_app1.context(test_target5){} }.should.raise - end - - specify "should set context correctly" do - c1 = Rack::Utils::Context.new(test_app1, test_target1){} - c1.for.should.equal test_app1 - c1.app.should.equal test_target1 - c2 = Rack::Utils::Context.new(test_app1, test_target2){} - c2.for.should.equal test_app1 - c2.app.should.equal test_target2 - c3 = Rack::Utils::Context.new(test_app2, test_target3){} - c3.for.should.equal test_app2 - c3.app.should.equal test_target3 - c4 = Rack::Utils::Context.new(test_app2, test_target4){} - c4.for.should.equal test_app2 - c4.app.should.equal test_target4 - end - - specify "should alter app on recontexting" do - c1 = Rack::Utils::Context.new(test_app1, test_target1){} - c1.for.should.equal test_app1 - c1.app.should.equal test_target1 - c2 = c1.context(test_target2) - c2.for.should.equal test_app1 - c2.app.should.not.equal test_target1 - c2.app.should.equal test_target2 - c3 = c2.context(test_target3) - c3.for.should.equal test_app1 - c3.app.should.not.equal test_target2 - c3.app.should.equal test_target3 - c4 = c3.context(test_target4) - c4.for.should.equal test_app1 - c4.app.should.not.equal test_target3 - c4.app.should.equal test_target4 - end - - specify "should run different apps" do - c1 = test_app1.context(test_target1) - c2 = c1.context test_target2 - c3 = c2.context test_target3 - c4 = c3.context test_target4 - a4 = Rack::Lint.new c4 - r1 = c1.call('hello') - r1.should.equal 'hello world' - r2 = c2.call(2) - r2.should.equal 4 - r3 = c3.call(:misc_symbol) - r3.should.be.nil - r4 = Rack::MockRequest.new(a4).get('/') - r4.status.should.be 200 - end -end diff --git a/vendor/rack-0.9.1/test/spec_rack_webrick.rb b/vendor/rack-0.9.1/test/spec_rack_webrick.rb deleted file mode 100644 index 32b418e33..000000000 --- a/vendor/rack-0.9.1/test/spec_rack_webrick.rb +++ /dev/null @@ -1,123 +0,0 @@ -require 'test/spec' - -require 'rack/handler/webrick' -require 'rack/lint' -require 'rack/response' -require 'testrequest' - -Thread.abort_on_exception = true - -context "Rack::Handler::WEBrick" do - include TestRequest::Helpers - - setup do - @server = WEBrick::HTTPServer.new(:Host => @host='0.0.0.0', - :Port => @port=9202, - :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN), - :AccessLog => []) - @server.mount "/test", Rack::Handler::WEBrick, - Rack::Lint.new(TestRequest.new) - Thread.new { @server.start } - trap(:INT) { @server.shutdown } - end - - specify "should respond" do - lambda { - GET("/test") - }.should.not.raise - end - - specify "should be a WEBrick" do - GET("/test") - status.should.be 200 - response["SERVER_SOFTWARE"].should =~ /WEBrick/ - response["HTTP_VERSION"].should.equal "HTTP/1.1" - response["SERVER_PROTOCOL"].should.equal "HTTP/1.1" - response["SERVER_PORT"].should.equal "9202" - response["SERVER_NAME"].should.equal "0.0.0.0" - end - - specify "should have rack headers" do - GET("/test") - response["rack.version"].should.equal [0,1] - response["rack.multithread"].should.be true - response["rack.multiprocess"].should.be false - response["rack.run_once"].should.be false - end - - specify "should have CGI headers on GET" do - GET("/test") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.be.nil - response["QUERY_STRING"].should.equal "" - response["test.postdata"].should.equal "" - - GET("/test/foo?quux=1") - response["REQUEST_METHOD"].should.equal "GET" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["PATH_INFO"].should.equal "/foo" - response["QUERY_STRING"].should.equal "quux=1" - end - - specify "should have CGI headers on POST" do - POST("/test", {"rack-form-data" => "23"}, {'X-test-header' => '42'}) - status.should.equal 200 - response["REQUEST_METHOD"].should.equal "POST" - response["SCRIPT_NAME"].should.equal "/test" - response["REQUEST_PATH"].should.equal "/" - response["QUERY_STRING"].should.equal "" - response["HTTP_X_TEST_HEADER"].should.equal "42" - response["test.postdata"].should.equal "rack-form-data=23" - end - - specify "should support HTTP auth" do - GET("/test", {:user => "ruth", :passwd => "secret"}) - response["HTTP_AUTHORIZATION"].should.equal "Basic cnV0aDpzZWNyZXQ=" - end - - specify "should set status" do - GET("/test?secret") - status.should.equal 403 - response["rack.url_scheme"].should.equal "http" - end - - specify "should correctly set cookies" do - @server.mount "/cookie-test", Rack::Handler::WEBrick, - Rack::Lint.new(lambda { |req| - res = Rack::Response.new - res.set_cookie "one", "1" - res.set_cookie "two", "2" - res.finish - }) - - Net::HTTP.start(@host, @port) { |http| - res = http.get("/cookie-test") - res.code.to_i.should.equal 200 - res.get_fields("set-cookie").should.equal ["one=1", "two=2"] - } - end - - specify "should provide a .run" do - block_ran = false - catch(:done) { - Rack::Handler::WEBrick.run(lambda {}, - {:Port => 9210, - :Logger => WEBrick::Log.new(nil, WEBrick::BasicLog::WARN), - :AccessLog => []}) { |server| - block_ran = true - server.should.be.kind_of WEBrick::HTTPServer - @s = server - throw :done - } - } - block_ran.should.be true - @s.shutdown - end - - teardown do - @server.shutdown - end -end diff --git a/vendor/rack-0.9.1/test/testrequest.rb b/vendor/rack-0.9.1/test/testrequest.rb deleted file mode 100644 index 7b7190cbb..000000000 --- a/vendor/rack-0.9.1/test/testrequest.rb +++ /dev/null @@ -1,57 +0,0 @@ -require 'yaml' -require 'net/http' - -class TestRequest - def call(env) - status = env["QUERY_STRING"] =~ /secret/ ? 403 : 200 - env["test.postdata"] = env["rack.input"].read - body = env.to_yaml - size = body.respond_to?(:bytesize) ? body.bytesize : body.size - [status, {"Content-Type" => "text/yaml", "Content-Length" => size.to_s}, [body]] - end - - module Helpers - attr_reader :status, :response - - def GET(path, header={}) - Net::HTTP.start(@host, @port) { |http| - user = header.delete(:user) - passwd = header.delete(:passwd) - - get = Net::HTTP::Get.new(path, header) - get.basic_auth user, passwd if user && passwd - http.request(get) { |response| - @status = response.code.to_i - @response = YAML.load(response.body) - } - } - end - - def POST(path, formdata={}, header={}) - Net::HTTP.start(@host, @port) { |http| - user = header.delete(:user) - passwd = header.delete(:passwd) - - post = Net::HTTP::Post.new(path, header) - post.form_data = formdata - post.basic_auth user, passwd if user && passwd - http.request(post) { |response| - @status = response.code.to_i - @response = YAML.load(response.body) - } - } - end - end -end - -class StreamingRequest - def self.call(env) - [200, {"Content-Type" => "text/plain"}, new] - end - - def each - yield "hello there!\n" - sleep 5 - yield "that is all.\n" - end -end diff --git a/vendor/rubyforge/lib/rubyforge.rb b/vendor/rubyforge/lib/rubyforge.rb deleted file mode 100644 index 61b0e9714..000000000 --- a/vendor/rubyforge/lib/rubyforge.rb +++ /dev/null @@ -1,74 +0,0 @@ -# This code was pretty much copied from Ara Howard's -# RubyForge gem... thanks Ara! :) - -require 'net/https' -require 'openssl' -require 'webrick/cookie' - -class RubyForge - def initialize(username, password) - @cookies = Array.new - login(username, password) - end - - def post_news(group_id, subject, body) - url = URI.parse('http://rubyforge.org/news/submit.php') - form = { - 'group_id' => group_id.to_s, - 'post_changes' => 'y', - 'summary' => subject, - 'details' => body, - 'submit' => 'Submit' - } - execute(url, form) - end - - ####### - private - ####### - - def login(username, password) - url = URI.parse('https://rubyforge.org/account/login.php') - form = { - 'return_to' => '', - 'form_loginname' => username, - 'form_pw' => password, - 'login' => 'Login' - } - response = execute(url, form) - bake_cookies(url, response) - end - - def execute(url, parameters) - request = Net::HTTP::Post.new(url.request_uri) - request['Content-Type'] = 'application/x-www-form-urlencoded' - @cookies.each do |cookie| - request['Cookie'] = cookie - end - http = Net::HTTP.new(url.host, url.port) - if url.scheme == 'https' - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - request_data = query_string_for(parameters) - request['Content-Length'] = request_data.length.to_s - http.request(request, request_data) - end - - def bake_cookies(url, response) - (response.get_fields('Set-Cookie') || []).each do |raw_cookie| - WEBrick::Cookie.parse_set_cookies(raw_cookie).each do |baked_cookie| - baked_cookie.domain ||= url.host - baked_cookie.path ||= url.path - @cookies << baked_cookie - end - end - end - - def query_string_for(parameters) - parameters.sort_by { |k,v| k.to_s }.map { |k,v| - k && [ WEBrick::HTTPUtils.escape_form(k.to_s), - WEBrick::HTTPUtils.escape_form(v.to_s) ].join('=') - }.compact.join('&') - end -end diff --git a/vendor/sinatra-0.9.1.1/AUTHORS b/vendor/sinatra-0.9.1.1/AUTHORS deleted file mode 100644 index 372390f28..000000000 --- a/vendor/sinatra-0.9.1.1/AUTHORS +++ /dev/null @@ -1,41 +0,0 @@ -Sinatra was designed and developed by Blake Mizerany (bmizerany) in -California. Continued development would not be possible without the ongoing -financial support provided by [Heroku](http://heroku.com) and the emotional -support provided by Adam Wiggins (adamwiggins) of Heroku, Chris Wanstrath (defunkt), -PJ Hyett (pjhyett), and the rest of the GitHub crew. - -Special thanks to the following extraordinary individuals, who-out which -Sinatra would not be possible: - -* Ryan Tomayko (rtomayko) for constantly fixing whitespace errors 60d5006 -* Ezra Zygmuntowicz (ezmobius) for initial help and letting Blake steal - some of merbs internal code. -* Christopher Schneid (cschneid) for The Book, the blog (gittr.com), - irclogger.com, and a bunch of useful patches. -* Markus Prinz (cypher) for patches over the years, caring about - the README, and hanging in there when times were rough. -* Simon Rozet (sr) for a ton of doc patches, HAML options, and all that - advocacy stuff he's going to do for 1.0. -* Erik Kastner (kastner) for fixing `MIME_TYPES` under Rack 0.5. -* Ben Bleything (bleything) for caring about HTTP status codes and doc fixes. -* Igal Koshevoy (igal) for root path detection under Thin/Passenger. -* Jon Crosby (jcrosby) for coffee breaks, doc fixes, and just because, man. -* Karel Minarik (karmi) for screaming until the website came back up. -* Jeremy Evans (jeremyevans) for unbreaking optional path params (twice!) -* The GitHub guys for stealing Blake's table. -* Nickolas Means (nmeans) for Sass template support. -* Victor Hugo Borja (vic) for splat'n routes specs and doco. -* Avdi Grimm (avdi) for basic RSpec support. -* Jack Danger Canty for a more accurate root directory and for making me - watch [this](http://www.youtube.com/watch?v=ueaHLHgskkw) just now. -* Mathew Walker for making escaped paths work with static files. -* Millions of Us for having the problem that led to Sinatra's conception. -* Songbird for the problems that helped Sinatra's future become realized. -* Rick Olson (technoweenie) for the killer plug at RailsConf '08. -* Steven Garcia for the amazing custom artwork you see on 404's and 500's -* Pat Nakajima (nakajima) for fixing non-nested params in nested params Hash's. - -and last but not least: - -* Frank Sinatra (chairman of the board) for having so much class he - deserves a web-framework named after him. diff --git a/vendor/sinatra-0.9.1.1/CHANGES b/vendor/sinatra-0.9.1.1/CHANGES deleted file mode 100644 index 6657e33cc..000000000 --- a/vendor/sinatra-0.9.1.1/CHANGES +++ /dev/null @@ -1,287 +0,0 @@ -= 0.9.1.1 / 2009-03-09 - - * Fix directory traversal vulnerability in default static files - route. See [#177] for more info. - -= 0.9.1 / 2009-03-01 - - * Sinatra now runs under Ruby 1.9.1 [#61] - - * Route patterns (splats, :named, or Regexp captures) are now - passed as arguments to the block. [#140] - - * The "helpers" method now takes a variable number of modules - along with the normal block syntax. [#133] - - * New request-level #forward method for middleware components: passes - the env to the downstream app and merges the response status, headers, - and body into the current context. [#126] - - * Requests are now automatically forwarded to the downstream app when - running as middleware and no matching route is found or all routes - pass. - - * New simple API for extensions/plugins to add DSL-level and - request-level methods. Use Sinatra.register(mixin) to extend - the DSL with all public methods defined in the mixin module; - use Sinatra.helpers(mixin) to make all public methods defined - in the mixin module available at the request level. [#138] - See http://www.sinatrarb.com/extensions.html for details. - - * Named parameters in routes now capture the "." character. This makes - routes like "/:path/:filename" match against requests like - "/foo/bar.txt"; in this case, "params[:filename]" is "bar.txt". - Previously, the route would not match at all. - - * Added request-level "redirect back" to redirect to the referring - URL. - - * Added a new "clean_trace" option that causes backtraces dumped - to rack.errors and displayed on the development error page to - omit framework and core library backtrace lines. The option is - enabled by default. [#77] - - * The ERB output buffer is now available to helpers via the @_out_buf - instance variable. - - * It's now much easier to test sessions in unit tests by passing a - ":session" option to any of the mock request methods. e.g., - get '/', {}, :session => { 'foo' => 'bar' } - - * The testing framework specific files ('sinatra/test/spec', - 'sinatra/test/bacon', 'sinatra/test/rspec', etc.) have been deprecated. - See http://sinatrarb.com/testing.html for instructions on setting up - a testing environment with these frameworks. - - * The request-level #send_data method from Sinatra 0.3.3 has been added - for compatibility but is deprecated. - - * Fix :provides causing crash on any request when request has no - Accept header [#139] - - * Fix that ERB templates were evaluated twice per "erb" call. - - * Fix app-level middleware not being run when the Sinatra application is - run as middleware. - - * Fixed some issues with running under Rack's CGI handler caused by - writing informational stuff to stdout. - - * Fixed that reloading was sometimes enabled when starting from a - rackup file [#110] - - * Fixed that "." in route patterns erroneously matched any character - instead of a literal ".". [#124] - -= 0.9.0.4 / 2009-01-25 - - * Using halt with more than 1 args causes ArgumentError [#131] - * using halt in a before filter doesn't modify response [#127] - * Add deprecated Sinatra::EventContext to unbreak plugins [#130] - * Give access to GET/POST params in filters [#129] - * Preserve non-nested params in nested params hash [#117] - * Fix backtrace dump with Rack::Lint [#116] - -= 0.9.0.3 / 2009-01-21 - - * Fall back on mongrel then webrick when thin not found. [#75] - * Use :environment instead of :env in test helpers to - fix deprecation warnings coming from framework. - * Make sinatra/test/rspec work again [#113] - * Fix app_file detection on windows [#118] - * Fix static files with Rack::Lint in pipeline [#121] - -= 0.9.0.2 / 2009-01-18 - - * Halting a before block should stop processing of routes [#85] - * Fix redirect/halt in before filters [#85] - -= 0.9.0 / 2009-01-18 - - * Works with and requires Rack >= 0.9.1 - - * Multiple Sinatra applications can now co-exist peacefully within a - single process. The new "Sinatra::Base" class can be subclassed to - establish a blank-slate Rack application or middleware component. - Documentation on using these features is forth-coming; the following - provides the basic gist: http://gist.github.com/38605 - - * Parameters with subscripts are now parsed into a nested/recursive - Hash structure. e.g., "post[title]=Hello&post[body]=World" yields - params: {'post' => {'title' => 'Hello', 'body' => 'World'}}. - - * Regular expressions may now be used in route pattens; captures are - available at "params[:captures]". - - * New ":provides" route condition takes an array of mime types and - matches only when an Accept request header is present with a - corresponding type. [cypher] - - * New request-level "pass" method; immediately exits the current block - and passes control to the next matching route. - - * The request-level "body" method now takes a block; evaluation is - deferred until an attempt is made to read the body. The block must - return a String or Array. - - * New "route conditions" system for attaching rules for when a route - matches. The :agent and :host route options now use this system. - - * New "dump_errors" option controls whether the backtrace is dumped to - rack.errors when an exception is raised from a route. The option is - enabled by default for top-level apps. - - * Better default "app_file", "root", "public", and "views" location - detection; changes to "root" and "app_file" automatically cascade to - other options that depend on them. - - * Error mappings are now split into two distinct layers: exception - mappings and custom error pages. Exception mappings are registered - with "error(Exception)" and are run only when the app raises an - exception. Custom error pages are registered with "error(status_code)", - where "status_code" is an integer, and are run any time the response - has the status code specified. It's also possible to register an error - page for a range of status codes: "error(500..599)". - - * In-file templates are now automatically imported from the file that - requires 'sinatra'. The use_in_file_templates! method is still available - for loading templates from other files. - - * Sinatra's testing support is no longer dependent on Test::Unit. Requiring - 'sinatra/test' adds the Sinatra::Test module and Sinatra::TestHarness - class, which can be used with any test framework. The 'sinatra/test/unit', - 'sinatra/test/spec', 'sinatra/test/rspec', or 'sinatra/test/bacon' files - can be required to setup a framework-specific testing environment. See the - README for more information. - - * Added support for Bacon (test framework). The 'sinatra/test/bacon' file - can be required to setup Sinatra test helpers on Bacon::Context. - - * Deprecated "set_option" and "set_options"; use "set" instead. - - * Deprecated the "env" option ("options.env"); use "environment" instead. - - * Deprecated the request level "stop" method; use "halt" instead. - - * Deprecated the request level "entity_tag" method; use "etag" instead. - Both "entity_tag" and "etag" were previously supported. - - * Deprecated the request level "headers" method (HTTP response headers); - use "response['Header-Name']" instead. - - * Deprecated "Sinatra.application"; use "Sinatra::Application" instead. - - * Deprecated setting Sinatra.application = nil to reset an application. - This should no longer be necessary. - - * Deprecated "Sinatra.default_options"; use - "Sinatra::Default.set(key, value)" instead. - - * Deprecated the "ServerError" exception. All Exceptions are now - treated as internal server errors and result in a 500 response - status. - - * Deprecated the "get_it", "post_it", "put_it", "delete_it", and "head_it" - test helper methods. Use "get", "post", "put", "delete", and "head", - respectively, instead. - - * Removed Event and EventContext classes. Applications are defined in a - subclass of Sinatra::Base; each request is processed within an - instance. - -= 0.3.3 / 2009-01-06 - - * Pin to Rack 0.4.0 (this is the last release on Rack 0.4) - - * Log unhandled exception backtraces to rack.errors. - - * Use RACK_ENV environment variable to establish Sinatra - environment when given. Thin sets this when started with - the -e argument. - - * BUG: raising Sinatra::NotFound resulted in a 500 response - code instead of 404. - - * BUG: use_in_file_templates! fails with CR/LF (#45) - - * BUG: Sinatra detects the app file and root path when run under - thin/passenger. - -= 0.3.2 - - * BUG: Static and send_file read entire file into String before - sending. Updated to stream with 8K chunks instead. - - * Rake tasks and assets for building basic documentation website. - See http://sinatra.rubyforge.org - - * Various minor doc fixes. - -= 0.3.1 - - * Unbreak optional path parameters [jeremyevans] - -= 0.3.0 - - * Add sinatra.gemspec w/ support for github gem builds. Forks can now - enable the build gem option in github to get free username-sinatra.gem - builds: gem install username-sinatra.gem --source=http://gems.github.com/ - - * Require rack-0.4 gem; removes frozen rack dir. - - * Basic RSpec support; require 'sinatra/test/rspec' instead of - 'sinatra/test/spec' to use. [avdi] - - * before filters can modify request environment vars used for - routing (e.g., PATH_INFO, REQUEST_METHOD, etc.) for URL rewriting - type functionality. - - * In-file templates now uses @@ instead of ## as template separator. - - * Top-level environment test predicates: development?, test?, production? - - * Top-level "set", "enable", and "disable" methods for tweaking - app options. [rtomayko] - - * Top-level "use" method for building Rack middleware pipelines - leading to app. See README for usage. [rtomayko] - - * New "reload" option - set false to disable reloading in development. - - * New "host" option - host/ip to bind to [cschneid] - - * New "app_file" option - override the file to reload in development - mode [cschneid] - - * Development error/not_found page cleanup [sr, adamwiggins] - - * Remove a bunch of core extensions (String#to_param, String#from_param, - Hash#from_params, Hash#to_params, Hash#symbolize_keys, Hash#pass) - - * Various grammar and formatting fixes to README; additions on - community and contributing [cypher] - - * Build RDoc using Hanna template: http://sinatrarb.rubyforge.org/api - - * Specs, documentation and fixes for splat'n routes [vic] - - * Fix whitespace errors across all source files. [rtomayko] - - * Fix streaming issues with Mongrel (body not closed). [bmizerany] - - * Fix various issues with environment not being set properly (configure - blocks not running, error pages not registering, etc.) [cypher] - - * Fix to allow locals to be passed to ERB templates [cschneid] - - * Fix locking issues causing random errors during reload in development. - - * Fix for escaped paths not resolving static files [Matthew Walker] - -= 0.2.1 - - * File upload fix and minor tweaks. - -= 0.2.0 - - * Initial gem release of 0.2 codebase. diff --git a/vendor/sinatra-0.9.1.1/LICENSE b/vendor/sinatra-0.9.1.1/LICENSE deleted file mode 100644 index 86cc7dcb6..000000000 --- a/vendor/sinatra-0.9.1.1/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2007 Blake Mizerany - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/README.rdoc b/vendor/sinatra-0.9.1.1/README.rdoc deleted file mode 100644 index d82899ee2..000000000 --- a/vendor/sinatra-0.9.1.1/README.rdoc +++ /dev/null @@ -1,483 +0,0 @@ -= Sinatra - -Sinatra is a DSL for quickly creating web-applications in Ruby with minimal -effort: - - # myapp.rb - require 'rubygems' - require 'sinatra' - get '/' do - 'Hello world!' - end - -Install the gem and run with: - - sudo gem install sinatra - ruby myapp.rb - -View at: http://localhost:4567 - -== Routes - -In Sinatra, a route is an HTTP method paired with an URL matching pattern. -Each route is associated with a block: - - get '/' do - .. show something .. - end - - post '/' do - .. create something .. - end - - put '/' do - .. update something .. - end - - delete '/' do - .. annihilate something .. - end - -Routes are matched in the order they are defined. The first route that -matches the request is invoked. - -Route patterns may include named parameters, accessible via the -params hash: - - get '/hello/:name' do - # matches "GET /foo" and "GET /bar" - # params[:name] is 'foo' or 'bar' - "Hello #{params[:name]}!" - end - -You can also access named parameters via block parameters: - - get '/hello/:name' do |n| - "Hello #{n}!" - end - -Route patterns may also include splat (or wildcard) parameters, accessible -via the params[:splat] array. - - get '/say/*/to/*' do - # matches /say/hello/to/world - params[:splat] # => ["hello", "world"] - end - - get '/download/*.*' do - # matches /download/path/to/file.xml - params[:splat] # => ["path/to/file", "xml"] - end - -Route matching with Regular Expressions: - - get %r{/hello/([\w]+)} do - "Hello, #{params[:captures].first}!" - end - -Or with a block parameter: - - get %r{/hello/([\w]+)} do |c| - "Hello, #{c}!" - end - -Routes may include a variety of matching conditions, such as the user agent: - - get '/foo', :agent => /Songbird (\d\.\d)[\d\/]*?/ do - "You're using Songbird version #{params[:agent][0]}" - end - - get '/foo' do - # Matches non-songbird browsers - end - -== Static Files - -Static files are served from the ./public directory. You can specify -a different location by setting the :public option: - - set :public, File.dirname(__FILE__) + '/static' - -Note that the public directory name is not included in the URL. A file -./public/css/style.css is made available as -http://example.com/css/style.css. - -== Views / Templates - -Templates are assumed to be located directly under the ./views -directory. To use a different views directory: - - set :views, File.dirname(__FILE__) + '/templates' - -=== Haml Templates - -The haml gem/library is required to render HAML templates: - - get '/' do - haml :index - end - -Renders ./views/index.haml. - -=== Erb Templates - - get '/' do - erb :index - end - -Renders ./views/index.erb - -=== Builder Templates - -The builder gem/library is required to render builder templates: - - get '/' do - content_type 'application/xml', :charset => 'utf-8' - builder :index - end - -Renders ./views/index.builder. - -=== Sass Templates - -The sass gem/library is required to render Sass templates: - - get '/stylesheet.css' do - content_type 'text/css', :charset => 'utf-8' - sass :stylesheet - end - -Renders ./views/stylesheet.sass. - -=== Inline Templates - - get '/' do - haml '%div.title Hello World' - end - -Renders the inlined template string. - -=== Accessing Variables in Templates - -Templates are evaluated within the same context as route handlers. Instance -variables set in route handlers are direcly accessible by templates: - - get '/:id' do - @foo = Foo.find(params[:id]) - haml '%h1= @foo.name' - end - -Or, specify an explicit Hash of local variables: - - get '/:id' do - foo = Foo.find(params[:id]) - haml '%h1= foo.name', :locals => { :foo => foo } - end - -This is typically used when rendering templates as partials from within -other templates. - -=== In-file Templates - -Templates may be defined at the end of the source file: - - require 'rubygems' - require 'sinatra' - - get '/' do - haml :index - end - - __END__ - - @@ layout - %html - = yield - - @@ index - %div.title Hello world!!!!! - -NOTE: In-file templates defined in the source file that requires sinatra -are automatically loaded. Call the use_in_file_templates! -method explicitly if you have in-file templates in other source files. - -=== Named Templates - -Templates may also be defined using the top-level template method: - - template :layout do - "%html\n =yield\n" - end - - template :index do - '%div.title Hello World!' - end - - get '/' do - haml :index - end - -If a template named "layout" exists, it will be used each time a template -is rendered. You can disable layouts by passing :layout => false. - - get '/' do - haml :index, :layout => !request.xhr? - end - -== Helpers - -Use the top-level helpers method to define helper methods for use in -route handlers and templates: - - helpers do - def bar(name) - "#{name}bar" - end - end - - get '/:name' do - bar(params[:name]) - end - -== Filters - -Before filters are evaluated before each request within the context of the -request and can modify the request and response. Instance variables set in -filters are accessible by routes and templates: - - before do - @note = 'Hi!' - request.path_info = '/foo/bar/baz' - end - - get '/foo/*' do - @note #=> 'Hi!' - params[:splat] #=> 'bar/baz' - end - -== Halting - -To immediately stop a request during a before filter or route use: - - halt - -You can also specify a body when halting ... - - halt 'this will be the body' - -Or set the status and body ... - - halt 401, 'go away!' - -== Passing - -A route can punt processing to the next matching route using pass: - - get '/guess/:who' do - pass unless params[:who] == 'Frank' - "You got me!" - end - - get '/guess/*' do - "You missed!" - end - -The route block is immediately exited and control continues with the next -matching route. If no matching route is found, a 404 is returned. - -== Configuration and Reloading - -Sinatra supports multiple environments and reloading. Reloading happens -before each request when running under the :development -environment. Wrap your configurations (e.g., database connections, constants, -etc.) in configure blocks to protect them from reloading or to -target specific environments. - -Run once, at startup, in any environment: - - configure do - ... - end - -Run only when the environment (RACK_ENV environment variable) is set to -:production. - - configure :production do - ... - end - -Run when the environment (RACK_ENV environment variable) is set to -either :production or :test. - - configure :production, :test do - ... - end - -== Error handling - -Error handlers run within the same context as routes and before filters, which -means you get all the goodies it has to offer, like haml, erb, -halt, etc. - -=== Not Found - -When a Sinatra::NotFound exception is raised, or the response's status -code is 404, the not_found handler is invoked: - - not_found do - 'This is nowhere to be found' - end - -=== Error - -The +error+ handler is invoked any time an exception is raised from a route -block or before filter. The exception object can be obtained from the -sinatra.error Rack variable: - - error do - 'Sorry there was a nasty error - ' + env['sinatra.error'].name - end - -Custom errors: - - error MyCustomError do - 'So what happened was...' + request.env['sinatra.error'].message - end - -Then, if this happens: - - get '/' do - raise MyCustomError, 'something bad' - end - -You get this: - - So what happened was... something bad - -Sinatra installs special not_found and error handlers when -running under the development environment. - -== Mime types - -When using send_file or static files you may have mime types Sinatra -doesn't understand. Use +mime+ to register them by file extension: - - mime :foo, 'text/foo' - -== Rack Middleware - -Sinatra rides on Rack[http://rack.rubyforge.org/], a minimal standard -interface for Ruby web frameworks. One of Rack's most interesting capabilities -for application developers is support for "middleware" -- components that sit -between the server and your application monitoring and/or manipulating the -HTTP request/response to provide various types of common functionality. - -Sinatra makes building Rack middleware pipelines a cinch via a top-level -+use+ method: - - require 'sinatra' - require 'my_custom_middleware' - - use Rack::Lint - use MyCustomMiddleware - - get '/hello' do - 'Hello World' - end - -The semantics of +use+ are identical to those defined for the -Rack::Builder[http://rack.rubyforge.org/doc/classes/Rack/Builder.html] DSL -(most frequently used from rackup files). For example, the +use+ method -accepts multiple/variable args as well as blocks: - - use Rack::Auth::Basic do |username, password| - username == 'admin' && password == 'secret' - end - -Rack is distributed with a variety of standard middleware for logging, -debugging, URL routing, authentication, and session handling. Sinatra uses -many of of these components automatically based on configuration so you -typically don't have to +use+ them explicitly. - -== Testing - -The Sinatra::Test mixin and Sinatra::TestHarness class include a variety of -helper methods for testing your Sinatra app: - - require 'my_sinatra_app' - require 'test/unit' - require 'sinatra/test' - - class MyAppTest < Test::Unit::TestCase - include Sinatra::Test - - def test_my_default - get '/' - assert_equal 'Hello World!', @response.body - end - - def test_with_params - get '/meet', {:name => 'Frank'} - assert_equal 'Hello Frank!', @response.body - end - - def test_with_rack_env - get '/', {}, :agent => 'Songbird' - assert_equal "You're using Songbird!", @response.body - end - end - -See http://www.sinatrarb.com/testing.html for more on Sinatra::Test and using it -with other test frameworks such as RSpec, Bacon, and test/spec. - -== Command line - -Sinatra applications can be run directly: - - ruby myapp.rb [-h] [-x] [-e ENVIRONMENT] [-p PORT] [-s HANDLER] - -Options are: - - -h # help - -p # set the port (default is 4567) - -e # set the environment (default is development) - -s # specify rack server/handler (default is thin) - -x # turn on the mutex lock (default is off) - -== The Bleeding Edge - -If you would like to use Sinatra's latest bleeding code, create a local -clone and run your app with the sinatra/lib directory on the -LOAD_PATH: - - cd myapp - git clone git://github.com/sinatra/sinatra.git - ruby -Isinatra/lib myapp.rb - -Alternatively, you can add the sinatra/lib directory to the -LOAD_PATH in your application: - - $LOAD_PATH.unshift File.dirname(__FILE__) + '/sinatra/lib' - require 'rubygems' - require 'sinatra' - - get '/about' do - "I'm running version " + Sinatra::VERSION - end - -To update the Sinatra sources in the future: - - cd myproject/sinatra - git pull - -== More - -* {Project Website}[http://sinatra.github.com/] - Additional documentation, - news, and links to other resources. -* {Contributing}[http://sinatra.github.com/contributing.html] - Find a bug? Need - help? Have a patch? -* {Lighthouse}[http://sinatra.lighthouseapp.com] - Issue tracking and release - planning. -* {Twitter}[http://twitter.com/sinatra] -* {Mailing List}[http://groups.google.com/group/sinatrarb] -* {IRC: #sinatra}[irc://chat.freenode.net/#sinatra] on http://freenode.net diff --git a/vendor/sinatra-0.9.1.1/Rakefile b/vendor/sinatra-0.9.1.1/Rakefile deleted file mode 100644 index 7a288a2b3..000000000 --- a/vendor/sinatra-0.9.1.1/Rakefile +++ /dev/null @@ -1,136 +0,0 @@ -require 'rake/clean' -require 'rake/testtask' -require 'fileutils' - -task :default => [:test] -task :spec => :test - -# SPECS =============================================================== - -Rake::TestTask.new(:test) do |t| - t.test_files = FileList['test/*_test.rb'] - t.ruby_opts = ['-rubygems'] if defined? Gem -end - -desc 'Run compatibility specs (requires test/spec)' -task :compat do |t| - pattern = ENV['TEST'] || '.*' - sh "specrb --testcase '#{pattern}' -Ilib:test compat/*_test.rb" -end - -# PACKAGING ============================================================ - -# Load the gemspec using the same limitations as github -def spec - @spec ||= - begin - require 'rubygems/specification' - data = File.read('sinatra.gemspec') - spec = nil - Thread.new { spec = eval("$SAFE = 3\n#{data}") }.join - spec - end -end - -def package(ext='') - "dist/sinatra-#{spec.version}" + ext -end - -desc 'Build packages' -task :package => %w[.gem .tar.gz].map {|e| package(e)} - -desc 'Build and install as local gem' -task :install => package('.gem') do - sh "gem install #{package('.gem')}" -end - -directory 'dist/' -CLOBBER.include('dist') - -file package('.gem') => %w[dist/ sinatra.gemspec] + spec.files do |f| - sh "gem build sinatra.gemspec" - mv File.basename(f.name), f.name -end - -file package('.tar.gz') => %w[dist/] + spec.files do |f| - sh <<-SH - git archive \ - --prefix=sinatra-#{source_version}/ \ - --format=tar \ - HEAD | gzip > #{f.name} - SH -end - -# Rubyforge Release / Publish Tasks ================================== - -desc 'Publish gem and tarball to rubyforge' -task 'publish:gem' => [package('.gem'), package('.tar.gz')] do |t| - sh <<-end - rubyforge add_release sinatra sinatra #{spec.version} #{package('.gem')} && - rubyforge add_file sinatra sinatra #{spec.version} #{package('.tar.gz')} - end -end - -# Website ============================================================ -# Building docs requires HAML and the hanna gem: -# gem install mislav-hanna --source=http://gems.github.com - -task 'doc' => ['doc:api'] - -desc 'Generate Hanna RDoc under doc/api' -task 'doc:api' => ['doc/api/index.html'] - -file 'doc/api/index.html' => FileList['lib/**/*.rb','README.rdoc'] do |f| - rb_files = f.prerequisites - sh((<<-end).gsub(/\s+/, ' ')) - hanna --charset utf8 \ - --fmt html \ - --inline-source \ - --line-numbers \ - --main README.rdoc \ - --op doc/api \ - --title 'Sinatra API Documentation' \ - #{rb_files.join(' ')} - end -end -CLEAN.include 'doc/api' - -def rdoc_to_html(file_name) - require 'rdoc/markup/to_html' - rdoc = RDoc::Markup::ToHtml.new - rdoc.convert(File.read(file_name)) -end - -# Gemspec Helpers ==================================================== - -def source_version - line = File.read('lib/sinatra/base.rb')[/^\s*VERSION = .*/] - line.match(/.*VERSION = '(.*)'/)[1] -end - -project_files = - FileList[ - '{lib,test,compat,images}/**', - 'Rakefile', 'CHANGES', 'README.rdoc' - ] -file 'sinatra.gemspec' => project_files do |f| - # read spec file and split out manifest section - spec = File.read(f.name) - head, manifest, tail = spec.split(" # = MANIFEST =\n") - # replace version and date - head.sub!(/\.version = '.*'/, ".version = '#{source_version}'") - head.sub!(/\.date = '.*'/, ".date = '#{Date.today.to_s}'") - # determine file list from git ls-files - files = `git ls-files`. - split("\n"). - sort. - reject{ |file| file =~ /^\./ }. - reject { |file| file =~ /^doc/ }. - map{ |file| " #{file}" }. - join("\n") - # piece file back together and write... - manifest = " s.files = %w[\n#{files}\n ]\n" - spec = [head,manifest,tail].join(" # = MANIFEST =\n") - File.open(f.name, 'w') { |io| io.write(spec) } - puts "updated #{f.name}" -end diff --git a/vendor/sinatra-0.9.1.1/compat/app_test.rb b/vendor/sinatra-0.9.1.1/compat/app_test.rb deleted file mode 100644 index 1a17eb639..000000000 --- a/vendor/sinatra-0.9.1.1/compat/app_test.rb +++ /dev/null @@ -1,282 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Sinatra" do - - setup do - Sinatra.application = nil - end - - specify "should put all DSL methods on (main)" do - object = Object.new - methods = %w[get put post head delete configure template helpers set] - methods.each do |method| - object.private_methods.map { |m| m.to_sym }.should.include(method.to_sym) - end - end - - specify "should handle result of nil" do - get '/' do - nil - end - - get_it '/' - should.be.ok - body.should == '' - end - - specify "handles events" do - get '/:name' do - 'Hello ' + params["name"] - end - - get_it '/Blake' - - should.be.ok - body.should.equal 'Hello Blake' - end - - - specify "handles splats" do - get '/hi/*' do - params["splat"].kind_of?(Array).should.equal true - params["splat"].first - end - - get_it '/hi/Blake' - - should.be.ok - body.should.equal 'Blake' - end - - specify "handles multiple splats" do - get '/say/*/to/*' do - params["splat"].join(' ') - end - - get_it '/say/hello/to/world' - - should.be.ok - body.should.equal 'hello world' - end - - specify "allow empty splats" do - get '/say/*/to*/*' do - params["splat"].join(' ') - end - - get_it '/say/hello/to/world' - - should.be.ok - body.should.equal 'hello world' # second splat is empty - - get_it '/say/hello/tomy/world' - - should.be.ok - body.should.equal 'hello my world' - end - - specify "gives access to underlying response header Hash" do - get '/' do - header['X-Test'] = 'Is this thing on?' - headers 'X-Test2' => 'Foo', 'X-Test3' => 'Bar' - '' - end - - get_it '/' - should.be.ok - headers.should.include 'X-Test' - headers['X-Test'].should.equal 'Is this thing on?' - headers.should.include 'X-Test3' - headers['X-Test3'].should.equal 'Bar' - end - - specify "follows redirects" do - get '/' do - redirect '/blake' - end - - get '/blake' do - 'Mizerany' - end - - get_it '/' - should.be.redirection - body.should.equal '' - - follow! - should.be.ok - body.should.equal 'Mizerany' - end - - specify "renders a body with a redirect" do - helpers do - def foo ; 'blah' ; end - end - get "/" do - redirect 'foo', :foo - end - get_it '/' - should.be.redirection - headers['Location'].should.equal 'foo' - body.should.equal 'blah' - end - - specify "redirects permanently with 301 status code" do - get "/" do - redirect 'foo', 301 - end - get_it '/' - should.be.redirection - headers['Location'].should.equal 'foo' - status.should.equal 301 - body.should.be.empty - end - - specify "stop sets content and ends event" do - get '/set_body' do - stop 'Hello!' - stop 'World!' - fail 'stop should have halted' - end - - get_it '/set_body' - - should.be.ok - body.should.equal 'Hello!' - - end - - specify "should easily set response Content-Type" do - get '/foo.html' do - content_type 'text/html', :charset => 'utf-8' - "

Hello, World

" - end - - get_it '/foo.html' - should.be.ok - headers['Content-Type'].should.equal 'text/html;charset=utf-8' - body.should.equal '

Hello, World

' - - get '/foo_test.xml' do - content_type :xml - "" - end - - get_it '/foo_test.xml' - should.be.ok - headers['Content-Type'].should.equal 'application/xml' - body.should.equal '' - end - - specify "supports conditional GETs with last_modified" do - modified_at = Time.now - get '/maybe' do - last_modified modified_at - 'response body, maybe' - end - - get_it '/maybe' - should.be.ok - body.should.equal 'response body, maybe' - - get_it '/maybe', :env => { 'HTTP_IF_MODIFIED_SINCE' => modified_at.httpdate } - status.should.equal 304 - body.should.equal '' - end - - specify "supports conditional GETs with entity_tag" do - get '/strong' do - entity_tag 'FOO' - 'foo response' - end - - get_it '/strong' - should.be.ok - body.should.equal 'foo response' - - get_it '/strong', {}, - 'HTTP_IF_NONE_MATCH' => '"BAR"' - should.be.ok - body.should.equal 'foo response' - - get_it '/strong', {}, - 'HTTP_IF_NONE_MATCH' => '"FOO"' - status.should.equal 304 - body.should.equal '' - - get_it '/strong', {}, - 'HTTP_IF_NONE_MATCH' => '"BAR", *' - status.should.equal 304 - body.should.equal '' - end - - specify "delegates HEAD requests to GET handlers" do - get '/invisible' do - "I am invisible to the world" - end - - head_it '/invisible' - should.be.ok - body.should.not.equal "I am invisible to the world" - body.should.equal '' - end - - - specify "supports PUT" do - put '/' do - 'puted' - end - put_it '/' - assert_equal 'puted', body - end - - specify "rewrites POSTs with _method param to PUT" do - put '/' do - 'puted' - end - post_it '/', :_method => 'PUT' - assert_equal 'puted', body - end - - specify "rewrites POSTs with lowercase _method param to PUT" do - put '/' do - 'puted' - end - post_it '/', :_method => 'put' - body.should.equal 'puted' - end - - specify "does not rewrite GETs with _method param to PUT" do - get '/' do - 'getted' - end - get_it '/', :_method => 'put' - should.be.ok - body.should.equal 'getted' - end - - specify "ignores _method query string parameter on non-POST requests" do - post '/' do - 'posted' - end - put '/' do - 'booo' - end - post_it "/?_method=PUT" - should.be.ok - body.should.equal 'posted' - end - - specify "does not read body if content type is not url encoded" do - post '/foo.xml' do - request.env['CONTENT_TYPE'].should.be == 'application/xml' - request.content_type.should.be == 'application/xml' - request.body.read - end - - post_it '/foo.xml', '', :content_type => 'application/xml' - @response.should.be.ok - @response.body.should.be == '' - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/application_test.rb b/vendor/sinatra-0.9.1.1/compat/application_test.rb deleted file mode 100644 index af8d33b26..000000000 --- a/vendor/sinatra-0.9.1.1/compat/application_test.rb +++ /dev/null @@ -1,262 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -require 'uri' - -class TesterWithEach - def each - yield 'foo' - yield 'bar' - yield 'baz' - end -end - -context "An app returns" do - - setup do - Sinatra.application = nil - end - - specify "404 if no events found" do - request = Rack::MockRequest.new(@app) - get_it '/' - should.be.not_found - body.should.equal '

Not Found

' - end - - specify "200 if success" do - get '/' do - 'Hello World' - end - get_it '/' - should.be.ok - body.should.equal 'Hello World' - end - - specify "an objects result from each if it has it" do - - get '/' do - TesterWithEach.new - end - - get_it '/' - should.be.ok - body.should.equal 'foobarbaz' - - end - - specify "404 if NotFound is raised" do - - get '/' do - raise Sinatra::NotFound - end - - get_it '/' - should.be.not_found - - end - -end - -context "Application#configure blocks" do - - setup do - Sinatra.application = nil - end - - specify "run when no environment specified" do - ref = false - configure { ref = true } - ref.should.equal true - end - - specify "run when matching environment specified" do - ref = false - configure(:test) { ref = true } - ref.should.equal true - end - - specify "do not run when no matching environment specified" do - configure(:foo) { flunk "block should not have been executed" } - configure(:development, :production, :foo) { flunk "block should not have been executed" } - end - - specify "accept multiple environments" do - ref = false - configure(:foo, :test, :bar) { ref = true } - ref.should.equal true - end - -end - -context "Events in an app" do - - setup do - Sinatra.application = nil - end - - specify "evaluate in a clean context" do - helpers do - def foo - 'foo' - end - end - - get '/foo' do - foo - end - - get_it '/foo' - should.be.ok - body.should.equal 'foo' - end - - specify "get access to request, response, and params" do - get '/:foo' do - params["foo"] + params["bar"] - end - - get_it '/foo?bar=baz' - should.be.ok - body.should.equal 'foobaz' - end - - specify "can filters by agent" do - - get '/', :agent => /Windows/ do - request.env['HTTP_USER_AGENT'] - end - - get_it '/', :env => { :agent => 'Windows' } - should.be.ok - body.should.equal 'Windows' - - get_it '/', :env => { :agent => 'Mac' } - should.not.be.ok - - end - - specify "can use regex to get parts of user-agent" do - - get '/', :agent => /Windows (NT)/ do - params[:agent].first - end - - get_it '/', :env => { :agent => 'Windows NT' } - - body.should.equal 'NT' - - end - - specify "can deal with spaces in paths" do - - path = '/path with spaces' - - get path do - "Look ma, a path with spaces!" - end - - get_it URI.encode(path) - - body.should.equal "Look ma, a path with spaces!" - end - - specify "route based on host" do - - get '/' do - 'asdf' - end - - get_it '/' - assert ok? - assert_equal('asdf', body) - - get '/foo', :host => 'foo.sinatrarb.com' do - 'in foo!' - end - - get '/foo', :host => 'bar.sinatrarb.com' do - 'in bar!' - end - - get_it '/foo', {}, 'HTTP_HOST' => 'foo.sinatrarb.com' - assert ok? - assert_equal 'in foo!', body - - get_it '/foo', {}, 'HTTP_HOST' => 'bar.sinatrarb.com' - assert ok? - assert_equal 'in bar!', body - - get_it '/foo' - assert not_found? - - end - -end - - -context "Options in an app" do - - setup do - Sinatra.application = nil - @app = Sinatra::application - end - - specify "can be set singly on app" do - @app.set :foo, 1234 - @app.options.foo.should.equal 1234 - end - - specify "can be set singly from top-level" do - set_option :foo, 1234 - @app.options.foo.should.equal 1234 - end - - specify "can be set multiply on app" do - @app.options.foo.should.be.nil - @app.set :foo => 1234, - :bar => 'hello, world' - @app.options.foo.should.equal 1234 - @app.options.bar.should.equal 'hello, world' - end - - specify "can be set multiply from top-level" do - @app.options.foo.should.be.nil - set_options :foo => 1234, - :bar => 'hello, world' - @app.options.foo.should.equal 1234 - @app.options.bar.should.equal 'hello, world' - end - - specify "can be enabled on app" do - @app.options.foo.should.be.nil - @app.enable :sessions, :foo, :bar - @app.options.sessions.should.equal true - @app.options.foo.should.equal true - @app.options.bar.should.equal true - end - - specify "can be enabled from top-level" do - @app.options.foo.should.be.nil - enable :sessions, :foo, :bar - @app.options.sessions.should.equal true - @app.options.foo.should.equal true - @app.options.bar.should.equal true - end - - specify "can be disabled on app" do - @app.options.foo.should.be.nil - @app.disable :sessions, :foo, :bar - @app.options.sessions.should.equal false - @app.options.foo.should.equal false - @app.options.bar.should.equal false - end - - specify "can be enabled from top-level" do - @app.options.foo.should.be.nil - disable :sessions, :foo, :bar - @app.options.sessions.should.equal false - @app.options.foo.should.equal false - @app.options.bar.should.equal false - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/builder_test.rb b/vendor/sinatra-0.9.1.1/compat/builder_test.rb deleted file mode 100644 index 5abc83bdb..000000000 --- a/vendor/sinatra-0.9.1.1/compat/builder_test.rb +++ /dev/null @@ -1,101 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Builder" do - - setup do - Sinatra.application = nil - end - - context "without layouts" do - - setup do - Sinatra.application = nil - end - - specify "should render" do - - get '/no_layout' do - builder 'xml.instruct!' - end - - get_it '/no_layout' - should.be.ok - body.should == %(\n) - - end - - specify "should render inline block" do - - get '/no_layout_and_inlined' do - @name = "Frank & Mary" - builder do |xml| - xml.couple @name - end - end - - get_it '/no_layout_and_inlined' - should.be.ok - body.should == %(Frank & Mary\n) - - end - - end - - - - context "Templates (in general)" do - - setup do - Sinatra.application = nil - end - - specify "are read from files if Symbols" do - - get '/from_file' do - @name = 'Blue' - builder :foo, :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/from_file' - should.be.ok - body.should.equal %(You rock Blue!\n) - - end - - specify "use layout.ext by default if available" do - - get '/' do - builder :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/' - should.be.ok - body.should.equal "\nis foo!\n\n" - - end - - specify "renders without layout" do - - get '/' do - builder :no_layout, :views_directory => File.dirname(__FILE__) + "/views/no_layout" - end - - get_it '/' - should.be.ok - body.should.equal "No Layout!\n" - - end - - specify "raises error if template not found" do - - get '/' do - builder :not_found - end - - lambda { get_it '/' }.should.raise(Errno::ENOENT) - - end - - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/compat_test.rb b/vendor/sinatra-0.9.1.1/compat/compat_test.rb deleted file mode 100644 index 009781971..000000000 --- a/vendor/sinatra-0.9.1.1/compat/compat_test.rb +++ /dev/null @@ -1,12 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Compat" do - setup do - Sinatra.application = nil - @app = Sinatra.application - end - - specify "makes EventContext available" do - assert_same Sinatra::Default, Sinatra::EventContext - end -end diff --git a/vendor/sinatra-0.9.1.1/compat/custom_error_test.rb b/vendor/sinatra-0.9.1.1/compat/custom_error_test.rb deleted file mode 100644 index e4fdb759c..000000000 --- a/vendor/sinatra-0.9.1.1/compat/custom_error_test.rb +++ /dev/null @@ -1,62 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Custom Errors" do - - setup do - Sinatra.application = nil - end - - specify "override the default 404" do - - get_it '/' - should.be.not_found - body.should.equal '

Not Found

' - - error Sinatra::NotFound do - 'Custom 404' - end - - get_it '/' - should.be.not_found - body.should.equal 'Custom 404' - - end - - specify "override the default 500" do - Sinatra.application.options.raise_errors = false - - get '/' do - raise 'asdf' - end - - get_it '/' - status.should.equal 500 - body.should.equal '

Internal Server Error

' - - - error do - 'Custom 500 for ' + request.env['sinatra.error'].message - end - - get_it '/' - - get_it '/' - status.should.equal 500 - body.should.equal 'Custom 500 for asdf' - - Sinatra.application.options.raise_errors = true - end - - class UnmappedError < RuntimeError; end - - specify "should bring unmapped error back to the top" do - get '/' do - raise UnmappedError, 'test' - end - - assert_raises(UnmappedError) do - get_it '/' - end - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/erb_test.rb b/vendor/sinatra-0.9.1.1/compat/erb_test.rb deleted file mode 100644 index 51a79593f..000000000 --- a/vendor/sinatra-0.9.1.1/compat/erb_test.rb +++ /dev/null @@ -1,136 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Erb" do - - setup do - Sinatra.application = nil - end - - context "without layouts" do - - setup do - Sinatra.application = nil - end - - specify "should render" do - - get '/no_layout' do - erb '<%= 1 + 1 %>' - end - - get_it '/no_layout' - should.be.ok - body.should == '2' - - end - - specify "should take an options hash with :locals set with a string" do - get '/locals' do - erb '<%= foo %>', :locals => {:foo => "Bar"} - end - - get_it '/locals' - should.be.ok - body.should == 'Bar' - end - - specify "should take an options hash with :locals set with a complex object" do - get '/locals-complex' do - erb '<%= foo[0] %>', :locals => {:foo => ["foo", "bar", "baz"]} - end - - get_it '/locals-complex' - should.be.ok - body.should == 'foo' - end - end - - context "with layouts" do - - setup do - Sinatra.application = nil - end - - specify "can be inline" do - - layout do - %Q{This is <%= yield %>!} - end - - get '/lay' do - erb 'Blake' - end - - get_it '/lay' - should.be.ok - body.should.equal 'This is Blake!' - - end - - specify "can use named layouts" do - - layout :pretty do - %Q{

<%= yield %>

} - end - - get '/pretty' do - erb 'Foo', :layout => :pretty - end - - get '/not_pretty' do - erb 'Bar' - end - - get_it '/pretty' - body.should.equal '

Foo

' - - get_it '/not_pretty' - body.should.equal 'Bar' - - end - - specify "can be read from a file if they're not inlined" do - - get '/foo' do - @title = 'Welcome to the Hello Program' - erb 'Blake', :layout => :foo_layout, - :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/foo' - body.should.equal "Welcome to the Hello Program\nHi Blake\n" - - end - - end - - context "Templates (in general)" do - - specify "are read from files if Symbols" do - - get '/from_file' do - @name = 'Alena' - erb :foo, :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/from_file' - - body.should.equal 'You rock Alena!' - - end - - specify "use layout.ext by default if available" do - - get '/layout_from_file' do - erb :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/layout_from_file' - should.be.ok - body.should.equal "x This is foo! x \n" - - end - - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/events_test.rb b/vendor/sinatra-0.9.1.1/compat/events_test.rb deleted file mode 100644 index 42cdb95c3..000000000 --- a/vendor/sinatra-0.9.1.1/compat/events_test.rb +++ /dev/null @@ -1,78 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Simple Events" do - def simple_request_hash(method, path) - Rack::Request.new({ - 'REQUEST_METHOD' => method.to_s.upcase, - 'PATH_INFO' => path - }) - end - - class MockResult < Struct.new(:block, :params) - end - - def invoke_simple(path, request_path, &b) - params = nil - get path do - params = self.params - b.call if b - end - get_it request_path - MockResult.new(b, params) - end - - setup { Sinatra.application = nil } - - specify "return last value" do - block = Proc.new { 'Simple' } - result = invoke_simple('/', '/', &block) - result.should.not.be.nil - result.block.should.be block - result.params.should.equal Hash.new - end - - specify "takes params in path" do - result = invoke_simple('/:foo/:bar', '/a/b') - result.should.not.be.nil - result.params.should.equal "foo" => 'a', "bar" => 'b' - - # unscapes - Sinatra.application = nil - result = invoke_simple('/:foo/:bar', '/a/blake%20mizerany') - result.should.not.be.nil - result.params.should.equal "foo" => 'a', "bar" => 'blake mizerany' - end - - specify "takes optional params in path" do - result = invoke_simple('/?:foo?/?:bar?', '/a/b') - result.should.not.be.nil - result.params.should.equal "foo" => 'a', "bar" => 'b' - - Sinatra.application = nil - result = invoke_simple('/?:foo?/?:bar?', '/a/') - result.should.not.be.nil - result.params.should.equal "foo" => 'a', "bar" => nil - - Sinatra.application = nil - result = invoke_simple('/?:foo?/?:bar?', '/a') - result.should.not.be.nil - result.params.should.equal "foo" => 'a', "bar" => nil - - Sinatra.application = nil - result = invoke_simple('/:foo?/?:bar?', '/') - result.should.not.be.nil - result.params.should.equal "foo" => nil, "bar" => nil - end - - specify "ignores to many /'s" do - result = invoke_simple('/x/y', '/x//y') - result.should.not.be.nil - end - - specify "understands splat" do - invoke_simple('/foo/*', '/foo/bar').should.not.be.nil - invoke_simple('/foo/*', '/foo/bar/baz').should.not.be.nil - invoke_simple('/foo/*', '/foo/baz').should.not.be.nil - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/filter_test.rb b/vendor/sinatra-0.9.1.1/compat/filter_test.rb deleted file mode 100644 index 0a52ec6f8..000000000 --- a/vendor/sinatra-0.9.1.1/compat/filter_test.rb +++ /dev/null @@ -1,30 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "before filters" do - - setup do - Sinatra.application = nil - @app = Sinatra.application - end - - specify "should be executed in the order defined" do - invoked = 0x0 - @app.before { invoked = 0x01 } - @app.before { invoked |= 0x02 } - @app.get('/') { 'Hello World' } - get_it '/' - should.be.ok - body.should.be == 'Hello World' - invoked.should.be == 0x03 - end - - specify "should be capable of modifying the request" do - @app.get('/foo') { 'foo' } - @app.get('/bar') { 'bar' } - @app.before { request.path_info = '/bar' } - get_it '/foo' - should.be.ok - body.should.be == 'bar' - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/haml_test.rb b/vendor/sinatra-0.9.1.1/compat/haml_test.rb deleted file mode 100644 index 4e738ba7c..000000000 --- a/vendor/sinatra-0.9.1.1/compat/haml_test.rb +++ /dev/null @@ -1,233 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Haml" do - - setup do - Sinatra.application = nil - end - - context "without layouts" do - - setup do - Sinatra.application = nil - end - - specify "should render" do - - get '/no_layout' do - haml '== #{1+1}' - end - - get_it '/no_layout' - should.be.ok - body.should == "2\n" - - end - end - - context "with layouts" do - - setup do - Sinatra.application = nil - end - - specify "can be inline" do - - layout do - '== This is #{yield}!' - end - - get '/lay' do - haml 'Blake' - end - - get_it '/lay' - should.be.ok - body.should.equal "This is Blake\n!\n" - - end - - specify "can use named layouts" do - - layout :pretty do - '%h1== #{yield}' - end - - get '/pretty' do - haml 'Foo', :layout => :pretty - end - - get '/not_pretty' do - haml 'Bar' - end - - get_it '/pretty' - body.should.equal "

Foo

\n" - - get_it '/not_pretty' - body.should.equal "Bar\n" - - end - - specify "can be read from a file if they're not inlined" do - - get '/foo' do - @title = 'Welcome to the Hello Program' - haml 'Blake', :layout => :foo_layout, - :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/foo' - body.should.equal "Welcome to the Hello Program\nHi Blake\n" - - end - - specify "can be read from file and layout from text" do - get '/foo' do - haml 'Test', :layout => '== Foo #{yield}' - end - - get_it '/foo' - - body.should.equal "Foo Test\n" - end - - end - - context "Templates (in general)" do - - setup do - Sinatra.application = nil - end - - specify "are read from files if Symbols" do - - get '/from_file' do - @name = 'Alena' - haml :foo, :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/from_file' - - body.should.equal "You rock Alena!\n" - - end - - specify "use layout.ext by default if available" do - - get '/' do - haml :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/' - should.be.ok - body.should.equal "x This is foo!\n x\n" - - end - - specify "renders without layout" do - - get '/' do - haml :no_layout, :views_directory => File.dirname(__FILE__) + "/views/no_layout" - end - - get_it '/' - should.be.ok - body.should.equal "

No Layout!

\n" - - end - - specify "can render with no layout" do - layout do - "X\n= yield\nX" - end - - get '/' do - haml 'blake', :layout => false - end - - get_it '/' - - body.should.equal "blake\n" - end - - specify "raises error if template not found" do - get '/' do - haml :not_found - end - - lambda { get_it '/' }.should.raise(Errno::ENOENT) - end - - specify "use layout.ext by default if available" do - - template :foo do - 'asdf' - end - - get '/' do - haml :foo, :layout => false, - :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/' - should.be.ok - body.should.equal "asdf\n" - - end - - end - - describe 'Options passed to the HAML interpreter' do - setup do - Sinatra.application = nil - end - - specify 'are empty be default' do - - get '/' do - haml 'foo' - end - - Haml::Engine.expects(:new).with('foo', {}).returns(stub(:render => 'foo')) - - get_it '/' - should.be.ok - - end - - specify 'can be configured by passing :options to haml' do - - get '/' do - haml 'foo', :options => {:format => :html4} - end - - Haml::Engine.expects(:new).with('foo', {:format => :html4}).returns(stub(:render => 'foo')) - - get_it '/' - should.be.ok - - end - - specify 'can be configured using set_option :haml' do - - configure do - set_option :haml, :format => :html4, - :escape_html => true - end - - get '/' do - haml 'foo' - end - - Haml::Engine.expects(:new).with('foo', {:format => :html4, - :escape_html => true}).returns(stub(:render => 'foo')) - - get_it '/' - should.be.ok - - end - - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/helper.rb b/vendor/sinatra-0.9.1.1/compat/helper.rb deleted file mode 100644 index 420c484cc..000000000 --- a/vendor/sinatra-0.9.1.1/compat/helper.rb +++ /dev/null @@ -1,30 +0,0 @@ -require 'rubygems' -require 'mocha' - -# disable warnings in compat specs. -$VERBOSE = nil - -$:.unshift File.dirname(File.dirname(__FILE__)) + "/lib" - -ENV['RACK_ENV'] ||= 'test' - -require 'sinatra' -require 'sinatra/test' -require 'sinatra/test/unit' -require 'sinatra/test/spec' - -module Sinatra::Test - # we need to remove the new test helper methods since they conflict with - # the top-level methods of the same name. - %w(get head post put delete).each do |verb| - remove_method verb - end - include Sinatra::Delegator -end - -class Test::Unit::TestCase - include Sinatra::Test - def setup - @app = lambda { |env| Sinatra::Application.call(env) } - end -end diff --git a/vendor/sinatra-0.9.1.1/compat/mapped_error_test.rb b/vendor/sinatra-0.9.1.1/compat/mapped_error_test.rb deleted file mode 100644 index e6256b474..000000000 --- a/vendor/sinatra-0.9.1.1/compat/mapped_error_test.rb +++ /dev/null @@ -1,72 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -class FooError < RuntimeError; end - -context "Mapped errors" do - - setup do - Sinatra.application = nil - Sinatra.application.options.raise_errors = false - end - - specify "are rescued and run in context" do - - error FooError do - 'MAPPED ERROR!' - end - - get '/' do - raise FooError - end - - get_it '/' - - should.be.server_error - body.should.equal 'MAPPED ERROR!' - - end - - specify "renders empty if no each method on result" do - - error FooError do - nil - end - - get '/' do - raise FooError - end - - get_it '/' - - should.be.server_error - body.should.be.empty - - end - - specify "doesn't override status if set" do - - error FooError do - status(200) - end - - get '/' do - raise FooError - end - - get_it '/' - - should.be.ok - - end - - specify "raises errors when the raise_errors option is set" do - Sinatra.application.options.raise_errors = true - error FooError do - end - get '/' do - raise FooError - end - assert_raises(FooError) { get_it('/') } - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/pipeline_test.rb b/vendor/sinatra-0.9.1.1/compat/pipeline_test.rb deleted file mode 100644 index a9eb360a2..000000000 --- a/vendor/sinatra-0.9.1.1/compat/pipeline_test.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -class UpcaseMiddleware - def initialize(app, *args, &block) - @app = app - @args = args - @block = block - end - def call(env) - env['PATH_INFO'] = env['PATH_INFO'].to_s.upcase - @app.call(env) - end -end - -context "Middleware Pipelines" do - - setup do - Sinatra.application = nil - @app = Sinatra.application - end - - teardown do - Sinatra.application = nil - end - - specify "should add middleware with use" do - block = Proc.new { |env| } - @app.use UpcaseMiddleware - @app.use UpcaseMiddleware, "foo", "bar" - @app.use UpcaseMiddleware, "foo", "bar", &block - @app.send(:middleware).should.include([UpcaseMiddleware, [], nil]) - @app.send(:middleware).should.include([UpcaseMiddleware, ["foo", "bar"], nil]) - @app.send(:middleware).should.include([UpcaseMiddleware, ["foo", "bar"], block]) - end - - specify "should run middleware added with use" do - get('/foo') { "FAIL!" } - get('/FOO') { "PASS!" } - use UpcaseMiddleware - get_it '/foo' - should.be.ok - body.should.equal "PASS!" - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/public/foo.xml b/vendor/sinatra-0.9.1.1/compat/public/foo.xml deleted file mode 100644 index 74d9a6d37..000000000 --- a/vendor/sinatra-0.9.1.1/compat/public/foo.xml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/vendor/sinatra-0.9.1.1/compat/sass_test.rb b/vendor/sinatra-0.9.1.1/compat/sass_test.rb deleted file mode 100644 index ee6d4f412..000000000 --- a/vendor/sinatra-0.9.1.1/compat/sass_test.rb +++ /dev/null @@ -1,57 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Sass" do - - setup do - Sinatra.application = nil - end - - context "Templates (in general)" do - - setup do - Sinatra.application = nil - end - - specify "are read from files if Symbols" do - - get '/from_file' do - sass :foo, :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/from_file' - should.be.ok - body.should.equal "#sass {\n background_color: #FFF; }\n" - - end - - specify "raise an error if template not found" do - get '/' do - sass :not_found - end - - lambda { get_it '/' }.should.raise(Errno::ENOENT) - end - - specify "ignore default layout file with .sass extension" do - get '/' do - sass :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/' - should.be.ok - body.should.equal "#sass {\n background_color: #FFF; }\n" - end - - specify "ignore explicitly specified layout file" do - get '/' do - sass :foo, :layout => :layout, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/' - should.be.ok - body.should.equal "#sass {\n background_color: #FFF; }\n" - end - - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/sessions_test.rb b/vendor/sinatra-0.9.1.1/compat/sessions_test.rb deleted file mode 100644 index 9d9622db8..000000000 --- a/vendor/sinatra-0.9.1.1/compat/sessions_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Sessions" do - - setup { Sinatra.application = nil } - - specify "should be off by default" do - get '/asdf' do - session[:test] = true - "asdf" - end - - get '/test' do - session[:test] == true ? "true" : "false" - end - - get_it '/asdf', {}, 'HTTP_HOST' => 'foo.sinatrarb.com' - assert ok? - assert !include?('Set-Cookie') - end - - specify "should be able to store data accross requests" do - set_option :sessions, true - set_option :environment, :not_test # necessary because sessions are disabled - - get '/foo' do - session[:test] = true - "asdf" - end - - get '/bar' do - session[:test] == true ? "true" : "false" - end - - get_it '/foo', :env => { :host => 'foo.sinatrarb.com' } - assert ok? - assert include?('Set-Cookie') - - set_option :environment, :test - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/streaming_test.rb b/vendor/sinatra-0.9.1.1/compat/streaming_test.rb deleted file mode 100644 index cf3727be5..000000000 --- a/vendor/sinatra-0.9.1.1/compat/streaming_test.rb +++ /dev/null @@ -1,133 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Static files (by default)" do - - setup do - Sinatra.application = nil - Sinatra.application.options.public = File.dirname(__FILE__) + '/public' - end - - specify "are served from root/public" do - get_it '/foo.xml' - should.be.ok - headers['Content-Length'].should.equal '12' - headers['Content-Type'].should.equal 'application/xml' - body.should.equal "\n" - end - - specify "are not served when verb is not GET or HEAD" do - post_it '/foo.xml' - # these should actually be giving back a 405 Method Not Allowed but that - # complicates the routing logic quite a bit. - should.be.not_found - status.should.equal 404 - end - - specify "are served when verb is HEAD but missing a body" do - head_it '/foo.xml' - should.be.ok - headers['Content-Length'].should.equal '12' - headers['Content-Type'].should.equal 'application/xml' - body.should.equal "" - end - - # static files override dynamic/internal events and ... - specify "are served when conflicting events exists" do - get '/foo.xml' do - 'this is not foo.xml!' - end - get_it '/foo.xml' - should.be.ok - body.should.equal "\n" - end - - specify "are irrelevant when request_method is not GET/HEAD" do - put '/foo.xml' do - 'putted!' - end - put_it '/foo.xml' - should.be.ok - body.should.equal 'putted!' - - get_it '/foo.xml' - should.be.ok - body.should.equal "\n" - end - - specify "include a Last-Modified header" do - last_modified = File.mtime(Sinatra.application.options.public + '/foo.xml') - get_it('/foo.xml') - should.be.ok - body.should.not.be.empty - headers['Last-Modified'].should.equal last_modified.httpdate - end - - # Deprecated. Use: ConditionalGet middleware. - specify "are not served when If-Modified-Since matches" do - last_modified = File.mtime(Sinatra.application.options.public + '/foo.xml') - @request = Rack::MockRequest.new(Sinatra.application) - @response = @request.get('/foo.xml', 'HTTP_IF_MODIFIED_SINCE' => last_modified.httpdate) - status.should.equal 304 - body.should.be.empty - end - - specify "should omit Content-Disposition headers" do - get_it('/foo.xml') - should.be.ok - headers['Content-Disposition'].should.be.nil - headers['Content-Transfer-Encoding'].should.be.nil - end - - specify "should be served even if their path is url escaped" do - get_it('/fo%6f.xml') - should.be.ok - body.should.equal "\n" - end - -end - -context "SendData" do - - setup do - Sinatra.application = nil - end - - # Deprecated. send_data is going away. - specify "should send the data with options" do - get '/' do - send_data 'asdf', :status => 500 - end - - get_it '/' - - should.be.server_error - body.should.equal 'asdf' - end - - # Deprecated. The Content-Disposition is no longer handled by sendfile. - specify "should include a Content-Disposition header" do - get '/' do - send_file File.dirname(__FILE__) + '/public/foo.xml', - :disposition => 'attachment' - end - - get_it '/' - - should.be.ok - headers['Content-Disposition'].should.not.be.nil - headers['Content-Disposition'].should.equal 'attachment; filename="foo.xml"' - end - - specify "should include a Content-Disposition header when :disposition set to attachment" do - get '/' do - send_file File.dirname(__FILE__) + '/public/foo.xml', - :disposition => 'attachment' - end - - get_it '/' - - should.be.ok - headers['Content-Disposition'].should.not.be.nil - headers['Content-Disposition'].should.equal 'attachment; filename="foo.xml"' - end -end diff --git a/vendor/sinatra-0.9.1.1/compat/sym_params_test.rb b/vendor/sinatra-0.9.1.1/compat/sym_params_test.rb deleted file mode 100644 index 2172be0c0..000000000 --- a/vendor/sinatra-0.9.1.1/compat/sym_params_test.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Symbol Params" do - - setup do - Sinatra.application = nil - end - - specify "should be accessable as Strings or Symbols" do - get '/' do - params[:foo] + params['foo'] - end - - get_it '/', :foo => "X" - assert_equal('XX', body) - end - -end - diff --git a/vendor/sinatra-0.9.1.1/compat/template_test.rb b/vendor/sinatra-0.9.1.1/compat/template_test.rb deleted file mode 100644 index 1e27578fb..000000000 --- a/vendor/sinatra-0.9.1.1/compat/template_test.rb +++ /dev/null @@ -1,30 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Templates" do - - specify "are read from files if Symbols" do - - get '/from_file' do - @name = 'Alena' - erb :foo, :views_directory => File.dirname(__FILE__) + "/views" - end - - get_it '/from_file' - - body.should.equal 'You rock Alena!' - - end - - specify "use layout.ext by default if available" do - - get '/layout_from_file' do - erb :foo, :views_directory => File.dirname(__FILE__) + "/views/layout_test" - end - - get_it '/layout_from_file' - should.be.ok - body.should.equal "x This is foo! x \n" - - end - -end diff --git a/vendor/sinatra-0.9.1.1/compat/use_in_file_templates_test.rb b/vendor/sinatra-0.9.1.1/compat/use_in_file_templates_test.rb deleted file mode 100644 index 265f07dee..000000000 --- a/vendor/sinatra-0.9.1.1/compat/use_in_file_templates_test.rb +++ /dev/null @@ -1,47 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -context "Rendering in file templates" do - - setup do - Sinatra.application = nil - use_in_file_templates! - end - - specify "should set template" do - assert Sinatra.application.templates[:foo] - end - - specify "should set layout" do - assert Sinatra.application.templates[:layout] - end - - specify "should render without layout if specified" do - get '/' do - haml :foo, :layout => false - end - - get_it '/' - assert_equal "this is foo\n", body - end - - specify "should render with layout if specified" do - get '/' do - haml :foo - end - - get_it '/' - assert_equal "X\nthis is foo\nX\n", body - end - -end - -__END__ - -@@ foo -this is foo - -@@ layout -X -= yield -X - diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo.builder b/vendor/sinatra-0.9.1.1/compat/views/foo.builder deleted file mode 100644 index dfa91a643..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo.builder +++ /dev/null @@ -1 +0,0 @@ -xml.exclaim "You rock #{@name}!" diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo.erb b/vendor/sinatra-0.9.1.1/compat/views/foo.erb deleted file mode 100644 index fac96378e..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo.erb +++ /dev/null @@ -1 +0,0 @@ -You rock <%= @name %>! \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo.haml b/vendor/sinatra-0.9.1.1/compat/views/foo.haml deleted file mode 100644 index 0fcc4f400..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo.haml +++ /dev/null @@ -1 +0,0 @@ -== You rock #{@name}! \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo.sass b/vendor/sinatra-0.9.1.1/compat/views/foo.sass deleted file mode 100644 index 12340f702..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo.sass +++ /dev/null @@ -1,2 +0,0 @@ -#sass - :background_color #FFF \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo_layout.erb b/vendor/sinatra-0.9.1.1/compat/views/foo_layout.erb deleted file mode 100644 index 6e39e8c7a..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo_layout.erb +++ /dev/null @@ -1,2 +0,0 @@ -<%= @title %> -Hi <%= yield %> diff --git a/vendor/sinatra-0.9.1.1/compat/views/foo_layout.haml b/vendor/sinatra-0.9.1.1/compat/views/foo_layout.haml deleted file mode 100644 index 5c041fb07..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/foo_layout.haml +++ /dev/null @@ -1,2 +0,0 @@ -== #{@title} -== Hi #{yield} diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.builder b/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.builder deleted file mode 100644 index 910eb1dee..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.builder +++ /dev/null @@ -1 +0,0 @@ -xml.this "is foo!" diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.erb b/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.erb deleted file mode 100644 index 10872edd1..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.erb +++ /dev/null @@ -1 +0,0 @@ -This is foo! \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.haml b/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.haml deleted file mode 100644 index 10872edd1..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.haml +++ /dev/null @@ -1 +0,0 @@ -This is foo! \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.sass b/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.sass deleted file mode 100644 index 12340f702..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/foo.sass +++ /dev/null @@ -1,2 +0,0 @@ -#sass - :background_color #FFF \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.builder b/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.builder deleted file mode 100644 index 9491f5740..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.builder +++ /dev/null @@ -1,3 +0,0 @@ -xml.layout do - xml << yield -end diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.erb b/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.erb deleted file mode 100644 index 7fec122ac..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.erb +++ /dev/null @@ -1 +0,0 @@ -x <%= yield %> x diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.haml b/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.haml deleted file mode 100644 index 75efae534..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.haml +++ /dev/null @@ -1 +0,0 @@ -== x #{yield} x diff --git a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.sass b/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.sass deleted file mode 100644 index b2ee9d07f..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/layout_test/layout.sass +++ /dev/null @@ -1,2 +0,0 @@ -b0rked! -= yield \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.builder b/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.builder deleted file mode 100644 index cbf4be6d9..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.builder +++ /dev/null @@ -1 +0,0 @@ -xml.foo "No Layout!" diff --git a/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.haml b/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.haml deleted file mode 100644 index 0e6bd3426..000000000 --- a/vendor/sinatra-0.9.1.1/compat/views/no_layout/no_layout.haml +++ /dev/null @@ -1 +0,0 @@ -%h1 No Layout! \ No newline at end of file diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra.rb b/vendor/sinatra-0.9.1.1/lib/sinatra.rb deleted file mode 100644 index 8ba172442..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra.rb +++ /dev/null @@ -1,8 +0,0 @@ -libdir = File.dirname(__FILE__) -$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir) - -require 'sinatra/base' -require 'sinatra/main' -require 'sinatra/compat' - -use_in_file_templates! diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/base.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/base.rb deleted file mode 100644 index c30e8dfd5..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/base.rb +++ /dev/null @@ -1,1026 +0,0 @@ -require 'thread' -require 'time' -require 'uri' -require 'rack' -require 'rack/builder' - -module Sinatra - VERSION = '0.9.1.1' - - # The request object. See Rack::Request for more info: - # http://rack.rubyforge.org/doc/classes/Rack/Request.html - class Request < Rack::Request - def user_agent - @env['HTTP_USER_AGENT'] - end - - def accept - @env['HTTP_ACCEPT'].to_s.split(',').map { |a| a.strip } - end - - # Override Rack 0.9.x's #params implementation (see #72 in lighthouse) - def params - self.GET.update(self.POST) - rescue EOFError => boom - self.GET - end - end - - # The response object. See Rack::Response and Rack::ResponseHelpers for - # more info: - # http://rack.rubyforge.org/doc/classes/Rack/Response.html - # http://rack.rubyforge.org/doc/classes/Rack/Response/Helpers.html - class Response < Rack::Response - def initialize - @status, @body = 200, [] - @header = Rack::Utils::HeaderHash.new({'Content-Type' => 'text/html'}) - end - - def write(str) - @body << str.to_s - str - end - - def finish - @body = block if block_given? - if [204, 304].include?(status.to_i) - header.delete "Content-Type" - [status.to_i, header.to_hash, []] - else - body = @body || [] - body = [body] if body.respond_to? :to_str - if body.respond_to?(:to_ary) - header["Content-Length"] = body.to_ary. - inject(0) { |len, part| len + part.bytesize }.to_s - end - [status.to_i, header.to_hash, body] - end - end - end - - class NotFound < NameError #:nodoc: - def code ; 404 ; end - end - - # Methods available to routes, before filters, and views. - module Helpers - # Set or retrieve the response status code. - def status(value=nil) - response.status = value if value - response.status - end - - # Set or retrieve the response body. When a block is given, - # evaluation is deferred until the body is read with #each. - def body(value=nil, &block) - if block_given? - def block.each ; yield call ; end - response.body = block - else - response.body = value - end - end - - # Halt processing and redirect to the URI provided. - def redirect(uri, *args) - status 302 - response['Location'] = uri - halt(*args) - end - - # Halt processing and return the error status provided. - def error(code, body=nil) - code, body = 500, code.to_str if code.respond_to? :to_str - response.body = body unless body.nil? - halt code - end - - # Halt processing and return a 404 Not Found. - def not_found(body=nil) - error 404, body - end - - # Set multiple response headers with Hash. - def headers(hash=nil) - response.headers.merge! hash if hash - response.headers - end - - # Access the underlying Rack session. - def session - env['rack.session'] ||= {} - end - - # Look up a media type by file extension in Rack's mime registry. - def media_type(type) - Base.media_type(type) - end - - # Set the Content-Type of the response body given a media type or file - # extension. - def content_type(type, params={}) - media_type = self.media_type(type) - fail "Unknown media type: %p" % type if media_type.nil? - if params.any? - params = params.collect { |kv| "%s=%s" % kv }.join(', ') - response['Content-Type'] = [media_type, params].join(";") - else - response['Content-Type'] = media_type - end - end - - # Set the Content-Disposition to "attachment" with the specified filename, - # instructing the user agents to prompt to save. - def attachment(filename=nil) - response['Content-Disposition'] = 'attachment' - if filename - params = '; filename="%s"' % File.basename(filename) - response['Content-Disposition'] << params - end - end - - # Use the contents of the file at +path+ as the response body. - def send_file(path, opts={}) - stat = File.stat(path) - last_modified stat.mtime - - content_type media_type(opts[:type]) || - media_type(File.extname(path)) || - response['Content-Type'] || - 'application/octet-stream' - - response['Content-Length'] ||= (opts[:length] || stat.size).to_s - - if opts[:disposition] == 'attachment' || opts[:filename] - attachment opts[:filename] || path - elsif opts[:disposition] == 'inline' - response['Content-Disposition'] = 'inline' - end - - halt StaticFile.open(path, 'rb') - rescue Errno::ENOENT - not_found - end - - class StaticFile < ::File #:nodoc: - alias_method :to_path, :path - def each - rewind - while buf = read(8192) - yield buf - end - end - end - - # Set the last modified time of the resource (HTTP 'Last-Modified' header) - # and halt if conditional GET matches. The +time+ argument is a Time, - # DateTime, or other object that responds to +to_time+. - # - # When the current request includes an 'If-Modified-Since' header that - # matches the time specified, execution is immediately halted with a - # '304 Not Modified' response. - def last_modified(time) - time = time.to_time if time.respond_to?(:to_time) - time = time.httpdate if time.respond_to?(:httpdate) - response['Last-Modified'] = time - halt 304 if time == request.env['HTTP_IF_MODIFIED_SINCE'] - time - end - - # Set the response entity tag (HTTP 'ETag' header) and halt if conditional - # GET matches. The +value+ argument is an identifier that uniquely - # identifies the current version of the resource. The +strength+ argument - # indicates whether the etag should be used as a :strong (default) or :weak - # cache validator. - # - # When the current request includes an 'If-None-Match' header with a - # matching etag, execution is immediately halted. If the request method is - # GET or HEAD, a '304 Not Modified' response is sent. - def etag(value, kind=:strong) - raise TypeError, ":strong or :weak expected" if ![:strong,:weak].include?(kind) - value = '"%s"' % value - value = 'W/' + value if kind == :weak - response['ETag'] = value - - # Conditional GET check - if etags = env['HTTP_IF_NONE_MATCH'] - etags = etags.split(/\s*,\s*/) - halt 304 if etags.include?(value) || etags.include?('*') - end - end - - ## Sugar for redirect (example: redirect back) - def back ; request.referer ; end - - end - - # Template rendering methods. Each method takes a the name of a template - # to render as a Symbol and returns a String with the rendered output. - module Templates - def erb(template, options={}) - require 'erb' unless defined? ::ERB - render :erb, template, options - end - - def haml(template, options={}) - require 'haml' unless defined? ::Haml - options[:options] ||= self.class.haml if self.class.respond_to? :haml - render :haml, template, options - end - - def sass(template, options={}, &block) - require 'sass' unless defined? ::Sass - options[:layout] = false - render :sass, template, options - end - - def builder(template=nil, options={}, &block) - require 'builder' unless defined? ::Builder - options, template = template, nil if template.is_a?(Hash) - template = lambda { block } if template.nil? - render :builder, template, options - end - - private - def render(engine, template, options={}) #:nodoc: - data = lookup_template(engine, template, options) - output = __send__("render_#{engine}", template, data, options) - layout, data = lookup_layout(engine, options) - if layout - __send__("render_#{engine}", layout, data, options) { output } - else - output - end - end - - def lookup_template(engine, template, options={}) - case template - when Symbol - if cached = self.class.templates[template] - lookup_template(engine, cached, options) - else - ::File.read(template_path(engine, template, options)) - end - when Proc - template.call - when String - template - else - raise ArgumentError - end - end - - def lookup_layout(engine, options) - return if options[:layout] == false - options.delete(:layout) if options[:layout] == true - template = options[:layout] || :layout - data = lookup_template(engine, template, options) - [template, data] - rescue Errno::ENOENT - nil - end - - def template_path(engine, template, options={}) - views_dir = - options[:views_directory] || self.options.views || "./views" - "#{views_dir}/#{template}.#{engine}" - end - - def render_erb(template, data, options, &block) - original_out_buf = @_out_buf - data = data.call if data.kind_of? Proc - - instance = ::ERB.new(data, nil, nil, '@_out_buf') - locals = options[:locals] || {} - locals_assigns = locals.to_a.collect { |k,v| "#{k} = locals[:#{k}]" } - - src = "#{locals_assigns.join("\n")}\n#{instance.src}" - eval src, binding, '(__ERB__)', locals_assigns.length + 1 - @_out_buf, result = original_out_buf, @_out_buf - result - end - - def render_haml(template, data, options, &block) - engine = ::Haml::Engine.new(data, options[:options] || {}) - engine.render(self, options[:locals] || {}, &block) - end - - def render_sass(template, data, options, &block) - engine = ::Sass::Engine.new(data, options[:sass] || {}) - engine.render - end - - def render_builder(template, data, options, &block) - xml = ::Builder::XmlMarkup.new(:indent => 2) - if data.respond_to?(:to_str) - eval data.to_str, binding, '', 1 - elsif data.kind_of?(Proc) - data.call(xml) - end - xml.target! - end - end - - # Base class for all Sinatra applications and middleware. - class Base - include Rack::Utils - include Helpers - include Templates - - attr_accessor :app - - def initialize(app=nil) - @app = app - yield self if block_given? - end - - # Rack call interface. - def call(env) - dup.call!(env) - end - - attr_accessor :env, :request, :response, :params - - def call!(env) - @env = env - @request = Request.new(env) - @response = Response.new - @params = nil - - invoke { dispatch! } - invoke { error_block!(response.status) } - - status, header, body = @response.finish - - # Never produce a body on HEAD requests. Do retain the Content-Length - # unless it's "0", in which case we assume it was calculated erroneously - # for a manual HEAD response and remove it entirely. - if @env['REQUEST_METHOD'] == 'HEAD' - body = [] - header.delete('Content-Length') if header['Content-Length'] == '0' - end - - [status, header, body] - end - - # Access options defined with Base.set. - def options - self.class - end - - # Exit the current block and halt the response. - def halt(*response) - response = response.first if response.length == 1 - throw :halt, response - end - - # Pass control to the next matching route. - def pass - throw :pass - end - - # Forward the request to the downstream app -- middleware only. - def forward - fail "downstream app not set" unless @app.respond_to? :call - status, headers, body = @app.call(@request.env) - @response.status = status - @response.body = body - @response.headers.merge! headers - nil - end - - private - # Run before filters and then locate and run a matching route. - def route! - @params = nested_params(@request.params) - - # before filters - self.class.filters.each { |block| instance_eval(&block) } - - # routes - if routes = self.class.routes[@request.request_method] - original_params = @params - path = unescape(@request.path_info) - - routes.each do |pattern, keys, conditions, block| - if match = pattern.match(path) - values = match.captures.to_a - params = - if keys.any? - keys.zip(values).inject({}) do |hash,(k,v)| - if k == 'splat' - (hash[k] ||= []) << v - else - hash[k] = v - end - hash - end - elsif values.any? - {'captures' => values} - else - {} - end - @params = original_params.merge(params) - @block_params = values - - catch(:pass) do - conditions.each { |cond| - throw :pass if instance_eval(&cond) == false } - throw :halt, instance_eval(&block) - end - end - end - end - - # No matching route found or all routes passed -- forward downstream - # when running as middleware; 404 when running as normal app. - if @app - forward - else - raise NotFound - end - end - - def nested_params(params) - return indifferent_hash.merge(params) if !params.keys.join.include?('[') - params.inject indifferent_hash do |res, (key,val)| - if key.include?('[') - head = key.split(/[\]\[]+/) - last = head.pop - head.inject(res){ |hash,k| hash[k] ||= indifferent_hash }[last] = val - else - res[key] = val - end - res - end - end - - def indifferent_hash - Hash.new {|hash,key| hash[key.to_s] if Symbol === key } - end - - # Run the block with 'throw :halt' support and apply result to the response. - def invoke(&block) - res = catch(:halt) { instance_eval(&block) } - return if res.nil? - - case - when res.respond_to?(:to_str) - @response.body = [res] - when res.respond_to?(:to_ary) - res = res.to_ary - if Fixnum === res.first - if res.length == 3 - @response.status, headers, body = res - @response.body = body if body - headers.each { |k, v| @response.headers[k] = v } if headers - elsif res.length == 2 - @response.status = res.first - @response.body = res.last - else - raise TypeError, "#{res.inspect} not supported" - end - else - @response.body = res - end - when res.respond_to?(:each) - @response.body = res - when (100...599) === res - @response.status = res - end - - res - end - - # Dispatch a request with error handling. - def dispatch! - route! - rescue NotFound => boom - handle_not_found!(boom) - rescue ::Exception => boom - handle_exception!(boom) - end - - def handle_not_found!(boom) - @env['sinatra.error'] = boom - @response.status = 404 - @response.body = ['

Not Found

'] - error_block! boom.class, NotFound - end - - def handle_exception!(boom) - @env['sinatra.error'] = boom - - dump_errors!(boom) if options.dump_errors? - raise boom if options.raise_errors? - - @response.status = 500 - error_block! boom.class, Exception - end - - # Find an custom error block for the key(s) specified. - def error_block!(*keys) - errmap = self.class.errors - keys.each do |key| - if block = errmap[key] - res = instance_eval(&block) - return res - end - end - nil - end - - def dump_errors!(boom) - backtrace = clean_backtrace(boom.backtrace) - msg = ["#{boom.class} - #{boom.message}:", - *backtrace].join("\n ") - @env['rack.errors'].write(msg) - end - - def clean_backtrace(trace) - return trace unless options.clean_trace? - - trace.reject { |line| - line =~ /lib\/sinatra.*\.rb/ || - (defined?(Gem) && line.include?(Gem.dir)) - }.map! { |line| line.gsub(/^\.\//, '') } - end - - @routes = {} - @filters = [] - @conditions = [] - @templates = {} - @middleware = [] - @errors = {} - @prototype = nil - - class << self - attr_accessor :routes, :filters, :conditions, :templates, - :middleware, :errors - - public - def set(option, value=self) - if value.kind_of?(Proc) - metadef(option, &value) - metadef("#{option}?") { !!__send__(option) } - metadef("#{option}=") { |val| set(option, Proc.new{val}) } - elsif value == self && option.respond_to?(:to_hash) - option.to_hash.each { |k,v| set(k, v) } - elsif respond_to?("#{option}=") - __send__ "#{option}=", value - else - set option, Proc.new{value} - end - self - end - - def enable(*opts) - opts.each { |key| set(key, true) } - end - - def disable(*opts) - opts.each { |key| set(key, false) } - end - - def error(codes=Exception, &block) - if codes.respond_to? :each - codes.each { |err| error(err, &block) } - else - @errors[codes] = block - end - end - - def not_found(&block) - error 404, &block - end - - def template(name, &block) - templates[name] = block - end - - def layout(name=:layout, &block) - template name, &block - end - - def use_in_file_templates! - ignore = [/lib\/sinatra.*\.rb/, /\(.*\)/, /rubygems\/custom_require\.rb/] - file = caller. - map { |line| line.sub(/:\d+.*$/, '') }. - find { |line| ignore.all? { |pattern| line !~ pattern } } - if data = ::IO.read(file).split('__END__')[1] - data.gsub!(/\r\n/, "\n") - template = nil - data.each_line do |line| - if line =~ /^@@\s*(.*)/ - template = templates[$1.to_sym] = '' - elsif template - template << line - end - end - end - end - - # Look up a media type by file extension in Rack's mime registry. - def media_type(type) - return type if type.nil? || type.to_s.include?('/') - type = ".#{type}" unless type.to_s[0] == ?. - Rack::Mime.mime_type(type, nil) - end - - def before(&block) - @filters << block - end - - def condition(&block) - @conditions << block - end - - private - def host_name(pattern) - condition { pattern === request.host } - end - - def user_agent(pattern) - condition { - if request.user_agent =~ pattern - @params[:agent] = $~[1..-1] - true - else - false - end - } - end - - def accept_mime_types(types) - types = [types] unless types.kind_of? Array - types.map!{|t| media_type(t)} - - condition { - matching_types = (request.accept & types) - unless matching_types.empty? - response.headers['Content-Type'] = matching_types.first - true - else - false - end - } - end - - public - def get(path, opts={}, &block) - conditions = @conditions.dup - route('GET', path, opts, &block) - - @conditions = conditions - route('HEAD', path, opts, &block) - end - - def put(path, opts={}, &bk); route 'PUT', path, opts, &bk; end - def post(path, opts={}, &bk); route 'POST', path, opts, &bk; end - def delete(path, opts={}, &bk); route 'DELETE', path, opts, &bk; end - def head(path, opts={}, &bk); route 'HEAD', path, opts, &bk; end - - private - def route(verb, path, opts={}, &block) - host_name opts[:host] if opts.key?(:host) - user_agent opts[:agent] if opts.key?(:agent) - accept_mime_types opts[:provides] if opts.key?(:provides) - - pattern, keys = compile(path) - conditions, @conditions = @conditions, [] - - define_method "#{verb} #{path}", &block - unbound_method = instance_method("#{verb} #{path}") - block = - if block.arity != 0 - lambda { unbound_method.bind(self).call(*@block_params) } - else - lambda { unbound_method.bind(self).call } - end - - (routes[verb] ||= []). - push([pattern, keys, conditions, block]).last - end - - def compile(path) - keys = [] - if path.respond_to? :to_str - special_chars = %w{. + ( )} - pattern = - path.gsub(/((:\w+)|[\*#{special_chars.join}])/) do |match| - case match - when "*" - keys << 'splat' - "(.*?)" - when *special_chars - Regexp.escape(match) - else - keys << $2[1..-1] - "([^/?&#]+)" - end - end - [/^#{pattern}$/, keys] - elsif path.respond_to? :match - [path, keys] - else - raise TypeError, path - end - end - - public - def helpers(*extensions, &block) - class_eval(&block) if block_given? - include *extensions if extensions.any? - end - - def register(*extensions, &block) - extensions << Module.new(&block) if block_given? - extensions.each do |extension| - extend extension - extension.registered(self) if extension.respond_to?(:registered) - end - end - - def development? ; environment == :development ; end - def test? ; environment == :test ; end - def production? ; environment == :production ; end - - def configure(*envs, &block) - return if reloading? - yield if envs.empty? || envs.include?(environment.to_sym) - end - - def use(middleware, *args, &block) - @prototype = nil - @middleware << [middleware, args, block] - end - - def run!(options={}) - set options - handler = detect_rack_handler - handler_name = handler.name.gsub(/.*::/, '') - puts "== Sinatra/#{Sinatra::VERSION} has taken the stage " + - "on #{port} for #{environment} with backup from #{handler_name}" unless handler_name =~/cgi/i - handler.run self, :Host => host, :Port => port do |server| - trap(:INT) do - ## Use thins' hard #stop! if available, otherwise just #stop - server.respond_to?(:stop!) ? server.stop! : server.stop - puts "\n== Sinatra has ended his set (crowd applauds)" unless handler_name =~/cgi/i - end - end - rescue Errno::EADDRINUSE => e - puts "== Someone is already performing on port #{port}!" - end - - # The prototype instance used to process requests. - def prototype - @prototype ||= new - end - - # Create a new instance of the class fronted by its middleware - # pipeline. The object is guaranteed to respond to #call but may not be - # an instance of the class new was called on. - def new(*args, &bk) - builder = Rack::Builder.new - builder.use Rack::Session::Cookie if sessions? && !test? - builder.use Rack::CommonLogger if logging? - builder.use Rack::MethodOverride if methodoverride? - @middleware.each { |c, args, bk| builder.use(c, *args, &bk) } - builder.run super - builder.to_app - end - - def call(env) - synchronize do - reload! if reload? - prototype.call(env) - end - end - - def reloading? - @reloading - end - - def reload! - @reloading = true - reset! - $LOADED_FEATURES.delete("sinatra.rb") - ::Kernel.load app_file - @reloading = false - end - - def reset!(base=superclass) - @routes = base.dupe_routes - @templates = base.templates.dup - @conditions = [] - @filters = base.filters.dup - @errors = base.errors.dup - @middleware = base.middleware.dup - @prototype = nil - end - - protected - def dupe_routes - routes.inject({}) do |hash,(request_method,routes)| - hash[request_method] = routes.dup - hash - end - end - - private - def detect_rack_handler - servers = Array(self.server) - servers.each do |server_name| - begin - return Rack::Handler.get(server_name) - rescue LoadError - rescue NameError - end - end - fail "Server handler (#{servers.join(',')}) not found." - end - - def inherited(subclass) - subclass.reset! self - super - end - - @@mutex = Mutex.new - def synchronize(&block) - if lock? - @@mutex.synchronize(&block) - else - yield - end - end - - def metadef(message, &block) - (class << self; self; end). - send :define_method, message, &block - end - end - - set :raise_errors, true - set :dump_errors, false - set :clean_trace, true - set :sessions, false - set :logging, false - set :methodoverride, false - set :static, false - set :environment, (ENV['RACK_ENV'] || :development).to_sym - - set :run, false - set :server, %w[thin mongrel webrick] - set :host, '0.0.0.0' - set :port, 4567 - - set :app_file, nil - set :root, Proc.new { app_file && File.expand_path(File.dirname(app_file)) } - set :views, Proc.new { root && File.join(root, 'views') } - set :public, Proc.new { root && File.join(root, 'public') } - set :reload, Proc.new { app_file? && app_file !~ /\.ru$/i && development? } - set :lock, Proc.new { reload? } - - # static files route - get(/.*[^\/]$/) do - pass unless options.static? && options.public? - public_dir = File.expand_path(options.public) - path = File.expand_path(public_dir + unescape(request.path_info)) - pass if path[0, public_dir.length] != public_dir - pass unless File.file?(path) - send_file path, :disposition => nil - end - - error ::Exception do - response.status = 500 - content_type 'text/html' - '

Internal Server Error

' - end - - configure :development do - get '/__sinatra__/:image.png' do - filename = File.dirname(__FILE__) + "/images/#{params[:image]}.png" - content_type :png - send_file filename - end - - error NotFound do - (<<-HTML).gsub(/^ {8}/, '') - - - - - - -

Sinatra doesn't know this ditty.

- -
- Try this: -
#{request.request_method.downcase} '#{request.path_info}' do\n  "Hello World"\nend
-
- - - HTML - end - - error do - next unless err = request.env['sinatra.error'] - heading = err.class.name + ' - ' + err.message.to_s - (<<-HTML).gsub(/^ {8}/, '') - - - - - - -
- -

#{escape_html(heading)}

-
#{escape_html(clean_backtrace(err.backtrace) * "\n")}
-

Params

-
#{escape_html(params.inspect)}
-
- - - HTML - end - end - end - - # Base class for classic style (top-level) applications. - class Default < Base - set :raise_errors, Proc.new { test? } - set :dump_errors, true - set :sessions, false - set :logging, Proc.new { ! test? } - set :methodoverride, true - set :static, true - set :run, Proc.new { ! test? } - - def self.register(*extensions, &block) #:nodoc: - added_methods = extensions.map {|m| m.public_instance_methods }.flatten - Delegator.delegate *added_methods - super(*extensions, &block) - end - end - - # The top-level Application. All DSL methods executed on main are delegated - # to this class. - class Application < Default - end - - module Delegator #:nodoc: - def self.delegate(*methods) - methods.each do |method_name| - eval <<-RUBY, binding, '(__DELEGATE__)', 1 - def #{method_name}(*args, &b) - ::Sinatra::Application.#{method_name}(*args, &b) - end - private :#{method_name} - RUBY - end - end - - delegate :get, :put, :post, :delete, :head, :template, :layout, :before, - :error, :not_found, :configures, :configure, :set, :set_option, - :set_options, :enable, :disable, :use, :development?, :test?, - :production?, :use_in_file_templates!, :helpers - end - - def self.new(base=Base, options={}, &block) - base = Class.new(base) - base.send :class_eval, &block if block_given? - base - end - - # Extend the top-level DSL with the modules provided. - def self.register(*extensions, &block) - Default.register(*extensions, &block) - end - - # Include the helper modules provided in Sinatra's request context. - def self.helpers(*extensions, &block) - Default.helpers(*extensions, &block) - end -end - -class String #:nodoc: - # Define String#each under 1.9 for Rack compatibility. This should be - # removed once Rack is fully 1.9 compatible. - alias_method :each, :each_line unless ''.respond_to? :each - - # Define String#bytesize as an alias to String#length for Ruby 1.8.6 and - # earlier. - alias_method :bytesize, :length unless ''.respond_to? :bytesize -end diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/compat.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/compat.rb deleted file mode 100644 index 6961996a4..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/compat.rb +++ /dev/null @@ -1,250 +0,0 @@ -# Sinatra 0.3.x compatibility module. -# -# The following code makes Sinatra 0.9.x compatible with Sinatra 0.3.x to -# ease the transition to the final 1.0 release. Everything defined in this -# file will be removed for the 1.0 release. - -require 'ostruct' -require 'sinatra/base' -require 'sinatra/main' - -# Like Kernel#warn but outputs the location that triggered the warning. -def sinatra_warn(*message) #:nodoc: - line = caller. - detect { |line| line !~ /(?:lib\/sinatra\/|__DELEGATE__)/ }. - sub(/:in .*/, '') - warn "#{line}: warning: #{message.join(' ')}" -end - -# Rack now supports evented and swiftiplied mongrels through separate -# handler. -if ENV['SWIFT'] - sinatra_warn 'the SWIFT environment variable is deprecated;', - 'use Rack::Handler::SwiftipliedMongrel instead.' - require 'swiftcore/swiftiplied_mongrel' - puts "Using Swiftiplied Mongrel" -elsif ENV['EVENT'] - sinatra_warn 'the EVENT environment variable is deprecated;', - 'use Rack::Handler::EventedMongrel instead.' - require 'swiftcore/evented_mongrel' - puts "Using Evented Mongrel" -end - -# Make Rack 0.9.0 backward compatibile with 0.4.0 mime types. This isn't -# technically a Sinatra issue but many Sinatra apps access the old -# MIME_TYPES constants due to Sinatra example code. -require 'rack/file' -module Rack #:nodoc: - class File #:nodoc: - def self.const_missing(const_name) - if const_name == :MIME_TYPES - hash = Hash.new { |hash,key| Rack::Mime::MIME_TYPES[".#{key}"] } - const_set :MIME_TYPES, hash - sinatra_warn 'Rack::File::MIME_TYPES is deprecated; use Rack::Mime instead.' - hash - else - super - end - end - end -end - -module Sinatra - module Compat #:nodoc: - end - - # Make Sinatra::EventContext an alias for Sinatra::Default to unbreak plugins. - def self.const_missing(const_name) #:nodoc: - if const_name == :EventContext - const_set :EventContext, Sinatra::Default - sinatra_warn 'Sinatra::EventContext is deprecated; use Sinatra::Default instead.' - Sinatra::Default - else - super - end - end - - # The ServerError exception is deprecated. Any exception is considered an - # internal server error. - class ServerError < RuntimeError - def initialize(*args, &block) - sinatra_warn 'Sinatra::ServerError is deprecated;', - 'use another exception, error, or Kernel#fail instead.' - end - def code ; 500 ; end - end - - class Default < Base - def self.const_missing(const_name) #:nodoc: - if const_name == :FORWARD_METHODS - sinatra_warn 'Sinatra::Application::FORWARD_METHODS is deprecated;', - 'use Sinatra::Delegator::METHODS instead.' - const_set :FORWARD_METHODS, Sinatra::Delegator::METHODS - Sinatra::Delegator::METHODS - else - super - end - end - - # Deprecated. Use: response['Header-Name'] - def header(header=nil) - sinatra_warn "The 'header' method is deprecated; use 'headers' instead." - headers(header) - end - - # Deprecated. Use: halt - def stop(*args, &block) - sinatra_warn "The 'stop' method is deprecated; use 'halt' instead." - halt(*args, &block) - end - - # Deprecated. Use: etag - def entity_tag(*args, &block) - sinatra_warn "The 'entity_tag' method is deprecated; use 'etag' instead." - etag(*args, &block) - end - - # Deprecated. Use the #attachment helper and return the data as a String or - # Array. - def send_data(data, options={}) - sinatra_warn "The 'send_data' method is deprecated. use attachment, status, content_type, etc. helpers instead." - - status options[:status] if options[:status] - attachment options[:filename] if options[:disposition] == 'attachment' - content_type options[:type] if options[:type] - halt data - end - - # Throwing halt with a Symbol and the to_result convention are - # deprecated. Override the invoke method to detect those types of return - # values. - def invoke(&block) #:nodoc: - res = super - case - when res.kind_of?(Symbol) - sinatra_warn "Invoking the :#{res} helper by returning a Symbol is deprecated;", - "call the helper directly instead." - @response.body = __send__(res) - when res.respond_to?(:to_result) - sinatra_warn "The to_result convention is deprecated." - @response.body = res.to_result(self) - end - res - end - - def options #:nodoc: - Options.new(self.class) - end - - class Options < Struct.new(:target) #:nodoc: - def method_missing(name, *args, &block) - if target.respond_to?(name) - target.__send__(name, *args, &block) - elsif args.empty? && name.to_s !~ /=$/ - sinatra_warn 'accessing undefined options will raise a NameError in Sinatra 1.0' - nil - else - super - end - end - end - - class << self - # Deprecated. Options are stored directly on the class object. - def options - sinatra_warn "The 'options' class method is deprecated; use 'self' instead." - Options.new(self) - end - - # Deprecated. Use: configure - def configures(*args, &block) - sinatra_warn "The 'configures' method is deprecated; use 'configure' instead." - configure(*args, &block) - end - - # Deprecated. Use: set - def default_options - sinatra_warn "Sinatra::Application.default_options is deprecated; use 'set' instead." - fake = lambda { |options| set(options) } - def fake.merge!(options) ; call(options) ; end - fake - end - - # Deprecated. Use: set - def set_option(*args, &block) - sinatra_warn "The 'set_option' method is deprecated; use 'set' instead." - set(*args, &block) - end - - def set_options(*args, &block) - sinatra_warn "The 'set_options' method is deprecated; use 'set' instead." - set(*args, &block) - end - - # Deprecated. Use: set :environment, ENV - def env=(value) - sinatra_warn "The :env option is deprecated; use :environment instead." - set :environment, value - end - - # Deprecated. Use: options.environment - def env - sinatra_warn "The :env option is deprecated; use :environment instead." - environment - end - end - - # Deprecated. Missing messages are no longer delegated to @response. - def method_missing(name, *args, &b) #:nodoc: - if @response.respond_to?(name) - sinatra_warn "The '#{name}' method is deprecated; use 'response.#{name}' instead." - @response.send(name, *args, &b) - else - super - end - end - end - - class << self - # Deprecated. Use: Sinatra::Application - def application - sinatra_warn "Sinatra.application is deprecated; use Sinatra::Application instead." - Sinatra::Application - end - - # Deprecated. Use: Sinatra::Application.reset! - def application=(value) - raise ArgumentError unless value.nil? - sinatra_warn "Setting Sinatra.application to nil is deprecated; create a new instance instead." - Sinatra.class_eval do - remove_const :Application - const_set :Application, Class.new(Sinatra::Default) - end - end - - def build_application - sinatra_warn "Sinatra.build_application is deprecated; use Sinatra::Application instead." - Sinatra::Application - end - - def options - sinatra_warn "Sinatra.options is deprecated; use Sinatra::Application.option_name instead." - Sinatra::Application.options - end - - def port - sinatra_warn "Sinatra.port is deprecated; use Sinatra::Application.port instead." - options.port - end - - def host - sinatra_warn "Sinatra.host is deprecated; use Sinatra::Application.host instead." - options.host - end - - def env - sinatra_warn "Sinatra.env is deprecated; use Sinatra::Application.environment instead." - options.environment - end - end -end diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/images/404.png b/vendor/sinatra-0.9.1.1/lib/sinatra/images/404.png deleted file mode 100644 index 902110e16..000000000 Binary files a/vendor/sinatra-0.9.1.1/lib/sinatra/images/404.png and /dev/null differ diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/images/500.png b/vendor/sinatra-0.9.1.1/lib/sinatra/images/500.png deleted file mode 100644 index 57c84c3d9..000000000 Binary files a/vendor/sinatra-0.9.1.1/lib/sinatra/images/500.png and /dev/null differ diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/main.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/main.rb deleted file mode 100644 index 2a48a392d..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/main.rb +++ /dev/null @@ -1,47 +0,0 @@ -require 'sinatra/base' - -module Sinatra - class Default < Base - - # we assume that the first file that requires 'sinatra' is the - # app_file. all other path related options are calculated based - # on this path by default. - set :app_file, lambda { - ignore = [ - /lib\/sinatra.*\.rb$/, # all sinatra code - /\(.*\)/, # generated code - /custom_require\.rb$/ # rubygems require hacks - ] - path = - caller.map{ |line| line.split(/:\d/, 2).first }.find do |file| - next if ignore.any? { |pattern| file =~ pattern } - file - end - path || $0 - }.call - - set :run, Proc.new { $0 == app_file } - - if run? && ARGV.any? - require 'optparse' - OptionParser.new { |op| - op.on('-x') { set :mutex, true } - op.on('-e env') { |val| set :environment, val.to_sym } - op.on('-s server') { |val| set :server, val } - op.on('-p port') { |val| set :port, val.to_i } - }.parse!(ARGV.dup) - end - end -end - -include Sinatra::Delegator - -def mime(ext, type) - ext = ".#{ext}" unless ext.to_s[0] == ?. - Rack::Mime::MIME_TYPES[ext.to_s] = type -end - -at_exit do - raise $! if $! - Sinatra::Application.run! if Sinatra::Application.run? -end diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/test.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/test.rb deleted file mode 100644 index 6939028a3..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/test.rb +++ /dev/null @@ -1,126 +0,0 @@ -require 'sinatra/base' - -module Sinatra - module Test - include Rack::Utils - - def self.included(base) - Sinatra::Default.set(:environment, :test) - end - - attr_reader :app, :request, :response - - def self.deprecate(framework) - warn <<-EOF -Warning: support for the #{framework} testing framework is deprecated and -will be dropped in Sinatra 1.0. See -for more information. - EOF - end - - def make_request(verb, path, body=nil, options={}) - @app = Sinatra::Application if @app.nil? && defined?(Sinatra::Application) - fail "@app not set - cannot make request" if @app.nil? - - @request = Rack::MockRequest.new(@app) - options = { :lint => true }.merge(options || {}) - - case - when body.respond_to?(:to_hash) - options.merge! body.delete(:env) if body.key?(:env) - options[:input] = param_string(body) - when body.respond_to?(:to_str) - options[:input] = body - when body.nil? - options[:input] = '' - else - raise ArgumentError, "body must be a Hash, String, or nil" - end - - yield @request if block_given? - @response = @request.request(verb, path, rack_options(options)) - end - - def get(path, *args, &b) ; make_request('GET', path, *args, &b) ; end - def head(path, *args, &b) ; make_request('HEAD', path, *args, &b) ; end - def post(path, *args, &b) ; make_request('POST', path, *args, &b) ; end - def put(path, *args, &b) ; make_request('PUT', path, *args, &b) ; end - def delete(path, *args, &b) ; make_request('DELETE', path, *args, &b) ; end - - def follow! - make_request 'GET', @response.location - end - - def body ; @response.body ; end - def status ; @response.status ; end - - # Delegate other missing methods to @response. - def method_missing(name, *args, &block) - if @response && @response.respond_to?(name) - @response.send(name, *args, &block) - else - super - end - end - - # Also check @response since we delegate there. - def respond_to?(symbol, include_private=false) - super || (@response && @response.respond_to?(symbol, include_private)) - end - - private - - RACK_OPTIONS = { - :accept => 'HTTP_ACCEPT', - :agent => 'HTTP_USER_AGENT', - :host => 'HTTP_HOST', - :session => 'rack.session', - :cookies => 'HTTP_COOKIE', - :content_type => 'CONTENT_TYPE' - } - - def rack_options(opts) - opts.merge(:lint => true).inject({}) do |hash,(key,val)| - key = RACK_OPTIONS[key] || key - hash[key] = val - hash - end - end - - def param_string(value, prefix = nil) - case value - when Array - value.map { |v| - param_string(v, "#{prefix}[]") - } * "&" - when Hash - value.map { |k, v| - param_string(v, prefix ? "#{prefix}[#{escape(k)}]" : escape(k)) - } * "&" - else - "#{prefix}=#{escape(value)}" - end - end - - if defined? Sinatra::Compat - # Deprecated. Use: "get" instead of "get_it". - %w(get head post put delete).each do |verb| - eval <<-RUBY, binding, __FILE__, __LINE__ - def #{verb}_it(*args, &block) - sinatra_warn "The #{verb}_it method is deprecated; use #{verb} instead." - make_request('#{verb.upcase}', *args, &block) - end - RUBY - end - end - end - - class TestHarness - include Test - - def initialize(app=nil) - @app = app || Sinatra::Application - @app.set(:environment, :test) - end - end -end diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/test/bacon.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/test/bacon.rb deleted file mode 100644 index 66c0b135e..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/test/bacon.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'bacon' -require 'sinatra/test' - -Sinatra::Test.deprecate('Bacon') - -Sinatra::Default.set( - :environment => :test, - :run => false, - :raise_errors => true, - :logging => false -) - -module Sinatra::Test - def should - @response.should - end -end - -Bacon::Context.send(:include, Sinatra::Test) diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/test/rspec.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/test/rspec.rb deleted file mode 100644 index 971b96f61..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/test/rspec.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'sinatra/test' -require 'sinatra/test/unit' -require 'spec' -require 'spec/interop/test' - -Sinatra::Test.deprecate('RSpec') - -Sinatra::Default.set( - :environment => :test, - :run => false, - :raise_errors => true, - :logging => false -) diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/test/spec.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/test/spec.rb deleted file mode 100644 index daffe32cc..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/test/spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'test/spec' -require 'sinatra/test' -require 'sinatra/test/unit' - -Sinatra::Test.deprecate('test/spec') - -module Sinatra::Test - def should - @response.should - end -end diff --git a/vendor/sinatra-0.9.1.1/lib/sinatra/test/unit.rb b/vendor/sinatra-0.9.1.1/lib/sinatra/test/unit.rb deleted file mode 100644 index a7e60b3a0..000000000 --- a/vendor/sinatra-0.9.1.1/lib/sinatra/test/unit.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'sinatra/test' -require 'test/unit' - -Sinatra::Test.deprecate('test/unit') - -Test::Unit::TestCase.send :include, Sinatra::Test - -Sinatra::Default.set( - :environment => :test, - :run => false, - :raise_errors => true, - :logging => false -) diff --git a/vendor/sinatra-0.9.1.1/sinatra.gemspec b/vendor/sinatra-0.9.1.1/sinatra.gemspec deleted file mode 100644 index c7056a0f4..000000000 --- a/vendor/sinatra-0.9.1.1/sinatra.gemspec +++ /dev/null @@ -1,115 +0,0 @@ -Gem::Specification.new do |s| - s.specification_version = 2 if s.respond_to? :specification_version= - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - - s.name = 'sinatra' - s.version = '0.9.1.1' - s.date = '2009-03-09' - - s.description = "Classy web-development dressed in a DSL" - s.summary = "Classy web-development dressed in a DSL" - - s.authors = ["Blake Mizerany"] - s.email = "sinatrarb@googlegroups.com" - - # = MANIFEST = - s.files = %w[ - AUTHORS - CHANGES - LICENSE - README.rdoc - Rakefile - compat/app_test.rb - compat/application_test.rb - compat/builder_test.rb - compat/compat_test.rb - compat/custom_error_test.rb - compat/erb_test.rb - compat/events_test.rb - compat/filter_test.rb - compat/haml_test.rb - compat/helper.rb - compat/mapped_error_test.rb - compat/pipeline_test.rb - compat/public/foo.xml - compat/sass_test.rb - compat/sessions_test.rb - compat/streaming_test.rb - compat/sym_params_test.rb - compat/template_test.rb - compat/use_in_file_templates_test.rb - compat/views/foo.builder - compat/views/foo.erb - compat/views/foo.haml - compat/views/foo.sass - compat/views/foo_layout.erb - compat/views/foo_layout.haml - compat/views/layout_test/foo.builder - compat/views/layout_test/foo.erb - compat/views/layout_test/foo.haml - compat/views/layout_test/foo.sass - compat/views/layout_test/layout.builder - compat/views/layout_test/layout.erb - compat/views/layout_test/layout.haml - compat/views/layout_test/layout.sass - compat/views/no_layout/no_layout.builder - compat/views/no_layout/no_layout.haml - lib/sinatra.rb - lib/sinatra/base.rb - lib/sinatra/compat.rb - lib/sinatra/images/404.png - lib/sinatra/images/500.png - lib/sinatra/main.rb - lib/sinatra/test.rb - lib/sinatra/test/bacon.rb - lib/sinatra/test/rspec.rb - lib/sinatra/test/spec.rb - lib/sinatra/test/unit.rb - sinatra.gemspec - test/base_test.rb - test/builder_test.rb - test/data/reload_app_file.rb - test/erb_test.rb - test/extensions_test.rb - test/filter_test.rb - test/haml_test.rb - test/helper.rb - test/helpers_test.rb - test/mapped_error_test.rb - test/middleware_test.rb - test/options_test.rb - test/reload_test.rb - test/request_test.rb - test/response_test.rb - test/result_test.rb - test/routing_test.rb - test/sass_test.rb - test/server_test.rb - test/sinatra_test.rb - test/static_test.rb - test/templates_test.rb - test/test_test.rb - test/views/hello.builder - test/views/hello.erb - test/views/hello.haml - test/views/hello.sass - test/views/hello.test - test/views/layout2.builder - test/views/layout2.erb - test/views/layout2.haml - test/views/layout2.test - ] - # = MANIFEST = - - s.test_files = s.files.select {|path| path =~ /^test\/.*_test.rb/} - - s.extra_rdoc_files = %w[README.rdoc LICENSE] - s.add_dependency 'rack', '>= 0.9.1', '< 1.0' - - s.has_rdoc = true - s.homepage = "http://sinatra.rubyforge.org" - s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Sinatra", "--main", "README.rdoc"] - s.require_paths = %w[lib] - s.rubyforge_project = 'sinatra' - s.rubygems_version = '1.1.1' -end diff --git a/vendor/sinatra-0.9.1.1/test/base_test.rb b/vendor/sinatra-0.9.1.1/test/base_test.rb deleted file mode 100644 index 856f04997..000000000 --- a/vendor/sinatra-0.9.1.1/test/base_test.rb +++ /dev/null @@ -1,130 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Sinatra::Base subclasses' do - - class TestApp < Sinatra::Base - get '/' do - 'Hello World' - end - end - - it 'include Rack::Utils' do - assert TestApp.included_modules.include?(Rack::Utils) - end - - it 'processes requests with #call' do - assert TestApp.respond_to?(:call) - - request = Rack::MockRequest.new(TestApp) - response = request.get('/') - assert response.ok? - assert_equal 'Hello World', response.body - end - - class TestApp < Sinatra::Base - get '/state' do - body = "Foo: #{@foo}" - @foo = 'discard' - body - end - end - - it 'does not maintain state between requests' do - request = Rack::MockRequest.new(TestApp) - 2.times do - response = request.get('/state') - assert response.ok? - assert_equal 'Foo: ', response.body - end - end -end - -describe "Sinatra::Base as Rack middleware" do - - app = lambda { |env| - [210, {'X-Downstream' => 'true'}, ['Hello from downstream']] } - - class TestMiddleware < Sinatra::Base - end - - it 'creates a middleware that responds to #call with .new' do - middleware = TestMiddleware.new(app) - assert middleware.respond_to?(:call) - end - - it 'exposes the downstream app' do - middleware = TestMiddleware.new(app) - assert_same app, middleware.app - end - - class TestMiddleware < Sinatra::Base - get '/' do - 'Hello from middleware' - end - end - - middleware = TestMiddleware.new(app) - request = Rack::MockRequest.new(middleware) - - it 'intercepts requests' do - response = request.get('/') - assert response.ok? - assert_equal 'Hello from middleware', response.body - end - - it 'automatically forwards requests downstream when no matching route found' do - response = request.get('/missing') - assert_equal 210, response.status - assert_equal 'Hello from downstream', response.body - end - - class TestMiddleware < Sinatra::Base - get '/low-level-forward' do - app.call(env) - end - end - - it 'can call the downstream app directly and return result' do - response = request.get('/low-level-forward') - assert_equal 210, response.status - assert_equal 'true', response['X-Downstream'] - assert_equal 'Hello from downstream', response.body - end - - class TestMiddleware < Sinatra::Base - get '/explicit-forward' do - response['X-Middleware'] = 'true' - res = forward - assert_nil res - assert_equal 210, response.status - assert_equal 'true', response['X-Downstream'] - assert_equal ['Hello from downstream'], response.body - 'Hello after explicit forward' - end - end - - it 'forwards the request downstream and integrates the response into the current context' do - response = request.get('/explicit-forward') - assert_equal 210, response.status - assert_equal 'true', response['X-Downstream'] - assert_equal 'Hello after explicit forward', response.body - assert_equal '28', response['Content-Length'] - end - - app_content_length = lambda {|env| - [200, {'Content-Length' => '16'}, 'From downstream!']} - class TestMiddlewareContentLength < Sinatra::Base - get '/forward' do - res = forward - 'From after explicit forward!' - end - end - - middleware_content_length = TestMiddlewareContentLength.new(app_content_length) - request_content_length = Rack::MockRequest.new(middleware_content_length) - - it "sets content length for last response" do - response = request_content_length.get('/forward') - assert_equal '28', response['Content-Length'] - end -end diff --git a/vendor/sinatra-0.9.1.1/test/builder_test.rb b/vendor/sinatra-0.9.1.1/test/builder_test.rb deleted file mode 100644 index 8ab7c1947..000000000 --- a/vendor/sinatra-0.9.1.1/test/builder_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "Builder Templates" do - def builder_app(&block) - mock_app { - set :views, File.dirname(__FILE__) + '/views' - get '/', &block - } - get '/' - end - - it 'renders inline Builder strings' do - builder_app { builder 'xml.instruct!' } - assert ok? - assert_equal %{\n}, body - end - - it 'renders inline blocks' do - builder_app { - @name = "Frank & Mary" - builder do |xml| - xml.couple @name - end - } - assert ok? - assert_equal "Frank & Mary\n", body - end - - it 'renders .builder files in views path' do - builder_app { - @name = "Blue" - builder :hello - } - assert ok? - assert_equal %(You're my boy, Blue!\n), body - end - - it "renders with inline layouts" do - mock_app { - layout do - %(xml.layout { xml << yield }) - end - get('/') { builder %(xml.em 'Hello World') } - } - get '/' - assert ok? - assert_equal "\nHello World\n\n", body - end - - it "renders with file layouts" do - builder_app { - builder %(xml.em 'Hello World'), :layout => :layout2 - } - assert ok? - assert_equal "\nHello World\n\n", body - end - - it "raises error if template not found" do - mock_app { - get('/') { builder :no_such_template } - } - assert_raise(Errno::ENOENT) { get('/') } - end -end diff --git a/vendor/sinatra-0.9.1.1/test/data/reload_app_file.rb b/vendor/sinatra-0.9.1.1/test/data/reload_app_file.rb deleted file mode 100644 index 673ab7cd9..000000000 --- a/vendor/sinatra-0.9.1.1/test/data/reload_app_file.rb +++ /dev/null @@ -1,3 +0,0 @@ -$reload_count += 1 - -$reload_app.get('/') { 'Hello from reload file' } diff --git a/vendor/sinatra-0.9.1.1/test/erb_test.rb b/vendor/sinatra-0.9.1.1/test/erb_test.rb deleted file mode 100644 index 95b5f2e0d..000000000 --- a/vendor/sinatra-0.9.1.1/test/erb_test.rb +++ /dev/null @@ -1,81 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "ERB Templates" do - def erb_app(&block) - mock_app { - set :views, File.dirname(__FILE__) + '/views' - get '/', &block - } - get '/' - end - - it 'renders inline ERB strings' do - erb_app { erb '<%= 1 + 1 %>' } - assert ok? - assert_equal '2', body - end - - it 'renders .erb files in views path' do - erb_app { erb :hello } - assert ok? - assert_equal "Hello World\n", body - end - - it 'takes a :locals option' do - erb_app { - locals = {:foo => 'Bar'} - erb '<%= foo %>', :locals => locals - } - assert ok? - assert_equal 'Bar', body - end - - it "renders with inline layouts" do - mock_app { - layout { 'THIS. IS. <%= yield.upcase %>!' } - get('/') { erb 'Sparta' } - } - get '/' - assert ok? - assert_equal 'THIS. IS. SPARTA!', body - end - - it "renders with file layouts" do - erb_app { - erb 'Hello World', :layout => :layout2 - } - assert ok? - assert_equal "ERB Layout!\nHello World\n", body - end - - it "renders erb with blocks" do - mock_app { - def container - @_out_buf << "THIS." - yield - @_out_buf << "SPARTA!" - end - def is; "IS." end - get '/' do - erb '<% container do %> <%= is %> <% end %>' - end - } - get '/' - assert ok? - assert_equal 'THIS. IS. SPARTA!', body - end - - it "can be used in a nested fashion for partials and whatnot" do - mock_app { - template(:inner) { "<%= 'hi' %>" } - template(:outer) { "<%= erb :inner %>" } - get '/' do - erb :outer - end - } - - get '/' - assert ok? - assert_equal 'hi', body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/extensions_test.rb b/vendor/sinatra-0.9.1.1/test/extensions_test.rb deleted file mode 100644 index ec9d8296f..000000000 --- a/vendor/sinatra-0.9.1.1/test/extensions_test.rb +++ /dev/null @@ -1,84 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Registering extensions' do - module FooExtensions - def foo - end - - private - def im_hiding_in_ur_foos - end - end - - module BarExtensions - def bar - end - end - - module BazExtensions - def baz - end - end - - module QuuxExtensions - def quux - end - end - - it 'will add the methods to the DSL for the class in which you register them and its subclasses' do - Sinatra::Base.register FooExtensions - assert Sinatra::Base.respond_to?(:foo) - - Sinatra::Default.register BarExtensions - assert Sinatra::Default.respond_to?(:bar) - assert Sinatra::Default.respond_to?(:foo) - assert !Sinatra::Base.respond_to?(:bar) - end - - it 'allows extending by passing a block' do - Sinatra::Base.register { - def im_in_ur_anonymous_module; end - } - assert Sinatra::Base.respond_to?(:im_in_ur_anonymous_module) - end - - it 'will make sure any public methods added via Default#register are delegated to Sinatra::Delegator' do - Sinatra::Default.register FooExtensions - assert Sinatra::Delegator.private_instance_methods. - map { |m| m.to_sym }.include?(:foo) - assert !Sinatra::Delegator.private_instance_methods. - map { |m| m.to_sym }.include?(:im_hiding_in_ur_foos) - end - - it 'will not delegate methods on Base#register' do - Sinatra::Base.register QuuxExtensions - assert !Sinatra::Delegator.private_instance_methods.include?("quux") - end - - it 'will extend the Sinatra::Default application by default' do - Sinatra.register BazExtensions - assert !Sinatra::Base.respond_to?(:baz) - assert Sinatra::Default.respond_to?(:baz) - end - - module BizzleExtension - def bizzle - bizzle_option - end - - def self.registered(base) - fail "base should be BizzleApp" unless base == BizzleApp - fail "base should have already extended BizzleExtension" unless base.respond_to?(:bizzle) - base.set :bizzle_option, 'bizzle!' - end - end - - class BizzleApp < Sinatra::Base - end - - it 'sends .registered to the extension module after extending the class' do - BizzleApp.register BizzleExtension - assert_equal 'bizzle!', BizzleApp.bizzle_option - assert_equal 'bizzle!', BizzleApp.bizzle - end -end diff --git a/vendor/sinatra-0.9.1.1/test/filter_test.rb b/vendor/sinatra-0.9.1.1/test/filter_test.rb deleted file mode 100644 index 61885c71d..000000000 --- a/vendor/sinatra-0.9.1.1/test/filter_test.rb +++ /dev/null @@ -1,99 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "Filters" do - it "executes filters in the order defined" do - count = 0 - mock_app do - get('/') { 'Hello World' } - before { - assert_equal 0, count - count = 1 - } - before { - assert_equal 1, count - count = 2 - } - end - - get '/' - assert ok? - assert_equal 2, count - assert_equal 'Hello World', body - end - - it "allows filters to modify the request" do - mock_app { - get('/foo') { 'foo' } - get('/bar') { 'bar' } - before { request.path_info = '/bar' } - } - - get '/foo' - assert ok? - assert_equal 'bar', body - end - - it "can modify instance variables available to routes" do - mock_app { - before { @foo = 'bar' } - get('/foo') { @foo } - } - - get '/foo' - assert ok? - assert_equal 'bar', body - end - - it "allows redirects in filters" do - mock_app { - before { redirect '/bar' } - get('/foo') do - fail 'before block should have halted processing' - 'ORLY?!' - end - } - - get '/foo' - assert redirect? - assert_equal '/bar', response['Location'] - assert_equal '', body - end - - it "does not modify the response with its return value" do - mock_app { - before { 'Hello World!' } - get '/foo' do - assert_equal [], response.body - 'cool' - end - } - - get '/foo' - assert ok? - assert_equal 'cool', body - end - - it "does modify the response with halt" do - mock_app { - before { halt 302, 'Hi' } - get '/foo' do - "should not happen" - end - } - - get '/foo' - assert_equal 302, response.status - assert_equal 'Hi', body - end - - it "gives you access to params" do - mock_app { - before { @foo = params['foo'] } - get('/foo') { @foo } - } - - get '/foo?foo=cool' - assert ok? - assert_equal 'cool', body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/haml_test.rb b/vendor/sinatra-0.9.1.1/test/haml_test.rb deleted file mode 100644 index eea91982c..000000000 --- a/vendor/sinatra-0.9.1.1/test/haml_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "HAML Templates" do - def haml_app(&block) - mock_app { - set :views, File.dirname(__FILE__) + '/views' - get '/', &block - } - get '/' - end - - it 'renders inline HAML strings' do - haml_app { haml '%h1 Hiya' } - assert ok? - assert_equal "

Hiya

\n", body - end - - it 'renders .haml files in views path' do - haml_app { haml :hello } - assert ok? - assert_equal "

Hello From Haml

\n", body - end - - it "renders with inline layouts" do - mock_app { - layout { %q(%h1= 'THIS. IS. ' + yield.upcase) } - get('/') { haml '%em Sparta' } - } - get '/' - assert ok? - assert_equal "

THIS. IS. SPARTA

\n", body - end - - it "renders with file layouts" do - haml_app { - haml 'Hello World', :layout => :layout2 - } - assert ok? - assert_equal "

HAML Layout!

\n

Hello World

\n", body - end - - it "raises error if template not found" do - mock_app { - get('/') { haml :no_such_template } - } - assert_raise(Errno::ENOENT) { get('/') } - end - - it "passes HAML options to the Haml engine" do - haml_app { - haml "!!!\n%h1 Hello World", :options => {:format => :html5} - } - assert ok? - assert_equal "\n

Hello World

\n", body - end - - it "passes default HAML options to the Haml engine" do - mock_app { - set :haml, {:format => :html5} - get '/' do - haml "!!!\n%h1 Hello World" - end - } - get '/' - assert ok? - assert_equal "\n

Hello World

\n", body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/helper.rb b/vendor/sinatra-0.9.1.1/test/helper.rb deleted file mode 100644 index a28fedc86..000000000 --- a/vendor/sinatra-0.9.1.1/test/helper.rb +++ /dev/null @@ -1,81 +0,0 @@ -begin - require 'rack' -rescue LoadError - require 'rubygems' - require 'rack' -end - -libdir = File.dirname(File.dirname(__FILE__)) + '/lib' -$LOAD_PATH.unshift libdir unless $LOAD_PATH.include?(libdir) - -require 'test/unit' -require 'sinatra/test' - -class Sinatra::Base - # Allow assertions in request context - include Test::Unit::Assertions -end - -class Test::Unit::TestCase - include Sinatra::Test - - # Sets up a Sinatra::Base subclass defined with the block - # given. Used in setup or individual spec methods to establish - # the application. - def mock_app(base=Sinatra::Base, &block) - @app = Sinatra.new(base, &block) - end - - def restore_default_options - Sinatra::Default.set( - :environment => :development, - :raise_errors => Proc.new { test? }, - :dump_errors => true, - :sessions => false, - :logging => Proc.new { ! test? }, - :methodoverride => true, - :static => true, - :run => Proc.new { ! test? } - ) - end -end - -## -# test/spec/mini -# http://pastie.caboo.se/158871 -# chris@ozmm.org -# -def describe(*args, &block) - return super unless (name = args.first.capitalize) && block - name = "#{name.gsub(/\W/, '')}Test" - Object.send :const_set, name, Class.new(Test::Unit::TestCase) - klass = Object.const_get(name) - klass.class_eval do - def self.it(name, &block) - define_method("test_#{name.gsub(/\W/,'_').downcase}", &block) - end - def self.xspecify(*args) end - def self.before(&block) define_method(:setup, &block) end - def self.after(&block) define_method(:teardown, &block) end - end - klass.class_eval &block - klass -end - -def describe_option(name, &block) - klass = describe("Option #{name}", &block) - klass.before do - restore_default_options - @base = Sinatra.new - @default = Class.new(Sinatra::Default) - end - klass -end - -# Do not output warnings for the duration of the block. -def silence_warnings - $VERBOSE, v = nil, $VERBOSE - yield -ensure - $VERBOSE = v -end diff --git a/vendor/sinatra-0.9.1.1/test/helpers_test.rb b/vendor/sinatra-0.9.1.1/test/helpers_test.rb deleted file mode 100644 index f9aea2d62..000000000 --- a/vendor/sinatra-0.9.1.1/test/helpers_test.rb +++ /dev/null @@ -1,497 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Helpers#status' do - before do - mock_app { - get '/' do - status 207 - nil - end - } - end - - it 'sets the response status code' do - get '/' - assert_equal 207, response.status - end -end - -describe 'Helpers#body' do - it 'takes a block for defered body generation' do - mock_app { - get '/' do - body { 'Hello World' } - end - } - - get '/' - assert_equal 'Hello World', body - end - - it 'takes a String, Array, or other object responding to #each' do - mock_app { - get '/' do - body 'Hello World' - end - } - - get '/' - assert_equal 'Hello World', body - end -end - -describe 'Helpers#redirect' do - it 'uses a 302 when only a path is given' do - mock_app { - get '/' do - redirect '/foo' - fail 'redirect should halt' - end - } - - get '/' - assert_equal 302, status - assert_equal '', body - assert_equal '/foo', response['Location'] - end - - it 'uses the code given when specified' do - mock_app { - get '/' do - redirect '/foo', 301 - fail 'redirect should halt' - end - } - - get '/' - assert_equal 301, status - assert_equal '', body - assert_equal '/foo', response['Location'] - end - - it 'redirects back to request.referer when passed back' do - mock_app { - get '/try_redirect' do - redirect back - end - } - - request = Rack::MockRequest.new(@app) - response = request.get('/try_redirect', 'HTTP_REFERER' => '/foo') - assert_equal 302, response.status - assert_equal '/foo', response['Location'] - end - -end - -describe 'Helpers#error' do - it 'sets a status code and halts' do - mock_app { - get '/' do - error 501 - fail 'error should halt' - end - } - - get '/' - assert_equal 501, status - assert_equal '', body - end - - it 'takes an optional body' do - mock_app { - get '/' do - error 501, 'FAIL' - fail 'error should halt' - end - } - - get '/' - assert_equal 501, status - assert_equal 'FAIL', body - end - - it 'uses a 500 status code when first argument is a body' do - mock_app { - get '/' do - error 'FAIL' - fail 'error should halt' - end - } - - get '/' - assert_equal 500, status - assert_equal 'FAIL', body - end -end - -describe 'Helpers#not_found' do - it 'halts with a 404 status' do - mock_app { - get '/' do - not_found - fail 'not_found should halt' - end - } - - get '/' - assert_equal 404, status - assert_equal '', body - end -end - -describe 'Helpers#headers' do - it 'sets headers on the response object when given a Hash' do - mock_app { - get '/' do - headers 'X-Foo' => 'bar', 'X-Baz' => 'bling' - 'kthx' - end - } - - get '/' - assert ok? - assert_equal 'bar', response['X-Foo'] - assert_equal 'bling', response['X-Baz'] - assert_equal 'kthx', body - end - - it 'returns the response headers hash when no hash provided' do - mock_app { - get '/' do - headers['X-Foo'] = 'bar' - 'kthx' - end - } - - get '/' - assert ok? - assert_equal 'bar', response['X-Foo'] - end -end - -describe 'Helpers#session' do - it 'uses the existing rack.session' do - mock_app { - get '/' do - session[:foo] - end - } - - get '/', :env => { 'rack.session' => { :foo => 'bar' } } - assert_equal 'bar', body - end - - it 'creates a new session when none provided' do - mock_app { - get '/' do - assert session.empty? - session[:foo] = 'bar' - 'Hi' - end - } - - get '/' - assert_equal 'Hi', body - end -end - -describe 'Helpers#media_type' do - include Sinatra::Helpers - - it "looks up media types in Rack's MIME registry" do - Rack::Mime::MIME_TYPES['.foo'] = 'application/foo' - assert_equal 'application/foo', media_type('foo') - assert_equal 'application/foo', media_type('.foo') - assert_equal 'application/foo', media_type(:foo) - end - - it 'returns nil when given nil' do - assert media_type(nil).nil? - end - - it 'returns nil when media type not registered' do - assert media_type(:bizzle).nil? - end - - it 'returns the argument when given a media type string' do - assert_equal 'text/plain', media_type('text/plain') - end -end - -describe 'Helpers#content_type' do - it 'sets the Content-Type header' do - mock_app { - get '/' do - content_type 'text/plain' - 'Hello World' - end - } - - get '/' - assert_equal 'text/plain', response['Content-Type'] - assert_equal 'Hello World', body - end - - it 'takes media type parameters (like charset=)' do - mock_app { - get '/' do - content_type 'text/html', :charset => 'utf-8' - "

Hello, World

" - end - } - - get '/' - assert ok? - assert_equal 'text/html;charset=utf-8', response['Content-Type'] - assert_equal "

Hello, World

", body - end - - it "looks up symbols in Rack's mime types dictionary" do - Rack::Mime::MIME_TYPES['.foo'] = 'application/foo' - mock_app { - get '/foo.xml' do - content_type :foo - "I AM FOO" - end - } - - get '/foo.xml' - assert ok? - assert_equal 'application/foo', response['Content-Type'] - assert_equal 'I AM FOO', body - end - - it 'fails when no mime type is registered for the argument provided' do - mock_app { - get '/foo.xml' do - content_type :bizzle - "I AM FOO" - end - } - assert_raise(RuntimeError) { get '/foo.xml' } - end -end - -describe 'Helpers#send_file' do - before do - @file = File.dirname(__FILE__) + '/file.txt' - File.open(@file, 'wb') { |io| io.write('Hello World') } - end - - after do - File.unlink @file - @file = nil - end - - def send_file_app(opts={}) - path = @file - mock_app { - get '/file.txt' do - send_file path, opts - end - } - end - - it "sends the contents of the file" do - send_file_app - get '/file.txt' - assert ok? - assert_equal 'Hello World', body - end - - it 'sets the Content-Type response header if a mime-type can be located' do - send_file_app - get '/file.txt' - assert_equal 'text/plain', response['Content-Type'] - end - - it 'sets the Content-Length response header' do - send_file_app - get '/file.txt' - assert_equal 'Hello World'.length.to_s, response['Content-Length'] - end - - it 'sets the Last-Modified response header' do - send_file_app - get '/file.txt' - assert_equal File.mtime(@file).httpdate, response['Last-Modified'] - end - - it "returns a 404 when not found" do - mock_app { - get '/' do - send_file 'this-file-does-not-exist.txt' - end - } - get '/' - assert not_found? - end - - it "does not set the Content-Disposition header by default" do - send_file_app - get '/file.txt' - assert_nil response['Content-Disposition'] - end - - it "sets the Content-Disposition header when :disposition set to 'attachment'" do - send_file_app :disposition => 'attachment' - get '/file.txt' - assert_equal 'attachment; filename="file.txt"', response['Content-Disposition'] - end - - it "sets the Content-Disposition header when :filename provided" do - send_file_app :filename => 'foo.txt' - get '/file.txt' - assert_equal 'attachment; filename="foo.txt"', response['Content-Disposition'] - end -end - -describe 'Helpers#last_modified' do - before do - now = Time.now - mock_app { - get '/' do - body { 'Hello World' } - last_modified now - 'Boo!' - end - } - @now = now - end - - it 'sets the Last-Modified header to a valid RFC 2616 date value' do - get '/' - assert_equal @now.httpdate, response['Last-Modified'] - end - - it 'returns a body when conditional get misses' do - get '/' - assert_equal 200, status - assert_equal 'Boo!', body - end - - it 'halts when a conditional GET matches' do - get '/', :env => { 'HTTP_IF_MODIFIED_SINCE' => @now.httpdate } - assert_equal 304, status - assert_equal '', body - end -end - -describe 'Helpers#etag' do - before do - mock_app { - get '/' do - body { 'Hello World' } - etag 'FOO' - 'Boo!' - end - } - end - - it 'sets the ETag header' do - get '/' - assert_equal '"FOO"', response['ETag'] - end - - it 'returns a body when conditional get misses' do - get '/' - assert_equal 200, status - assert_equal 'Boo!', body - end - - it 'halts when a conditional GET matches' do - get '/', :env => { 'HTTP_IF_NONE_MATCH' => '"FOO"' } - assert_equal 304, status - assert_equal '', body - end - - it 'should handle multiple ETag values in If-None-Match header' do - get '/', :env => { 'HTTP_IF_NONE_MATCH' => '"BAR", *' } - assert_equal 304, status - assert_equal '', body - end - - it 'uses a weak etag with the :weak option' do - mock_app { - get '/' do - etag 'FOO', :weak - "that's weak, dude." - end - } - get '/' - assert_equal 'W/"FOO"', response['ETag'] - end -end - -describe 'Helpers#back' do - it "makes redirecting back pretty" do - mock_app { - get '/foo' do - redirect back - end - } - - get '/foo', {}, 'HTTP_REFERER' => 'http://github.com' - assert redirect? - assert_equal "http://github.com", response.location - end -end - -module HelperOne; def one; '1'; end; end -module HelperTwo; def two; '2'; end; end - -describe 'Adding new helpers' do - it 'takes a list of modules to mix into the app' do - mock_app { - helpers HelperOne, HelperTwo - - get '/one' do - one - end - - get '/two' do - two - end - } - - get '/one' - assert_equal '1', body - - get '/two' - assert_equal '2', body - end - - it 'takes a block to mix into the app' do - mock_app { - helpers do - def foo - 'foo' - end - end - - get '/' do - foo - end - } - - get '/' - assert_equal 'foo', body - end - - it 'evaluates the block in class context so that methods can be aliased' do - mock_app { - helpers do - alias_method :h, :escape_html - end - - get '/' do - h('42 < 43') - end - } - - get '/' - assert ok? - assert_equal '42 < 43', body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/mapped_error_test.rb b/vendor/sinatra-0.9.1.1/test/mapped_error_test.rb deleted file mode 100644 index c176aed8a..000000000 --- a/vendor/sinatra-0.9.1.1/test/mapped_error_test.rb +++ /dev/null @@ -1,160 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -class FooError < RuntimeError -end - -class FooNotFound < Sinatra::NotFound -end - -describe 'Exception Mappings' do - it 'invokes handlers registered with ::error when raised' do - mock_app { - set :raise_errors, false - error(FooError) { 'Foo!' } - get '/' do - raise FooError - end - } - get '/' - assert_equal 500, status - assert_equal 'Foo!', body - end - - it 'uses the Exception handler if no matching handler found' do - mock_app { - set :raise_errors, false - error(Exception) { 'Exception!' } - get '/' do - raise FooError - end - } - get '/' - assert_equal 500, status - assert_equal 'Exception!', body - end - - it "sets env['sinatra.error'] to the rescued exception" do - mock_app { - set :raise_errors, false - error(FooError) { - assert env.include?('sinatra.error') - assert env['sinatra.error'].kind_of?(FooError) - 'looks good' - } - get '/' do - raise FooError - end - } - get '/' - assert_equal 'looks good', body - end - - it 'dumps errors to rack.errors when dump_errors is enabled' do - mock_app { - set :raise_errors, false - set :dump_errors, true - get('/') { raise FooError, 'BOOM!' } - } - - get '/' - assert_equal 500, status - assert @response.errors =~ /FooError - BOOM!:/ - end - - it "raises without calling the handler when the raise_errors options is set" do - mock_app { - set :raise_errors, true - error(FooError) { "she's not there." } - get '/' do - raise FooError - end - } - assert_raise(FooError) { get '/' } - end - - it "never raises Sinatra::NotFound beyond the application" do - mock_app { - set :raise_errors, true - get '/' do - raise Sinatra::NotFound - end - } - assert_nothing_raised { get '/' } - assert_equal 404, status - end - - it "cascades for subclasses of Sinatra::NotFound" do - mock_app { - set :raise_errors, true - error(FooNotFound) { "foo! not found." } - get '/' do - raise FooNotFound - end - } - assert_nothing_raised { get '/' } - assert_equal 404, status - assert_equal 'foo! not found.', body - end - - it 'has a not_found method for backwards compatibility' do - mock_app { - not_found do - "Lost, are we?" - end - } - - get '/test' - assert_equal 404, status - assert_equal "Lost, are we?", body - end -end - -describe 'Custom Error Pages' do - it 'allows numeric status code mappings to be registered with ::error' do - mock_app { - set :raise_errors, false - error(500) { 'Foo!' } - get '/' do - [500, {}, 'Internal Foo Error'] - end - } - get '/' - assert_equal 500, status - assert_equal 'Foo!', body - end - - it 'allows ranges of status code mappings to be registered with :error' do - mock_app { - set :raise_errors, false - error(500..550) { "Error: #{response.status}" } - get '/' do - [507, {}, 'A very special error'] - end - } - get '/' - assert_equal 507, status - assert_equal 'Error: 507', body - end - - class FooError < RuntimeError - end - - it 'runs after exception mappings and overwrites body' do - mock_app { - set :raise_errors, false - error FooError do - response.status = 502 - 'from exception mapping' - end - error(500) { 'from 500 handler' } - error(502) { 'from custom error page' } - - get '/' do - raise FooError - end - } - get '/' - assert_equal 502, status - assert_equal 'from custom error page', body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/middleware_test.rb b/vendor/sinatra-0.9.1.1/test/middleware_test.rb deleted file mode 100644 index 4ec8c89df..000000000 --- a/vendor/sinatra-0.9.1.1/test/middleware_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "Middleware" do - before do - @app = mock_app(Sinatra::Default) { - get '/*' do - response.headers['X-Tests'] = env['test.ran']. - map { |n| n.split('::').last }. - join(', ') - env['PATH_INFO'] - end - } - end - - class MockMiddleware < Struct.new(:app) - def call(env) - (env['test.ran'] ||= []) << self.class.to_s - app.call(env) - end - end - - class UpcaseMiddleware < MockMiddleware - def call(env) - env['PATH_INFO'] = env['PATH_INFO'].upcase - super - end - end - - it "is added with Sinatra::Application.use" do - @app.use UpcaseMiddleware - get '/hello-world' - assert ok? - assert_equal '/HELLO-WORLD', body - end - - class DowncaseMiddleware < MockMiddleware - def call(env) - env['PATH_INFO'] = env['PATH_INFO'].downcase - super - end - end - - it "runs in the order defined" do - @app.use UpcaseMiddleware - @app.use DowncaseMiddleware - get '/Foo' - assert_equal "/foo", body - assert_equal "UpcaseMiddleware, DowncaseMiddleware", response['X-Tests'] - end - - it "resets the prebuilt pipeline when new middleware is added" do - @app.use UpcaseMiddleware - get '/Foo' - assert_equal "/FOO", body - @app.use DowncaseMiddleware - get '/Foo' - assert_equal '/foo', body - assert_equal "UpcaseMiddleware, DowncaseMiddleware", response['X-Tests'] - end - - it "works when app is used as middleware" do - @app.use UpcaseMiddleware - @app = @app.new - get '/Foo' - assert_equal "/FOO", body - assert_equal "UpcaseMiddleware", response['X-Tests'] - end -end diff --git a/vendor/sinatra-0.9.1.1/test/options_test.rb b/vendor/sinatra-0.9.1.1/test/options_test.rb deleted file mode 100644 index 16a0252eb..000000000 --- a/vendor/sinatra-0.9.1.1/test/options_test.rb +++ /dev/null @@ -1,374 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Options' do - before do - restore_default_options - @app = Sinatra.new - end - - it 'sets options to literal values' do - @app.set(:foo, 'bar') - assert @app.respond_to?(:foo) - assert_equal 'bar', @app.foo - end - - it 'sets options to Procs' do - @app.set(:foo, Proc.new { 'baz' }) - assert @app.respond_to?(:foo) - assert_equal 'baz', @app.foo - end - - it "sets multiple options with a Hash" do - @app.set :foo => 1234, - :bar => 'Hello World', - :baz => Proc.new { 'bizzle' } - assert_equal 1234, @app.foo - assert_equal 'Hello World', @app.bar - assert_equal 'bizzle', @app.baz - end - - it 'inherits option methods when subclassed' do - @app.set :foo, 'bar' - @app.set :biz, Proc.new { 'baz' } - - sub = Class.new(@app) - assert sub.respond_to?(:foo) - assert_equal 'bar', sub.foo - assert sub.respond_to?(:biz) - assert_equal 'baz', sub.biz - end - - it 'overrides options in subclass' do - @app.set :foo, 'bar' - @app.set :biz, Proc.new { 'baz' } - sub = Class.new(@app) - sub.set :foo, 'bling' - assert_equal 'bling', sub.foo - assert_equal 'bar', @app.foo - end - - it 'creates setter methods when first defined' do - @app.set :foo, 'bar' - assert @app.respond_to?('foo=') - @app.foo = 'biz' - assert_equal 'biz', @app.foo - end - - it 'creates predicate methods when first defined' do - @app.set :foo, 'hello world' - assert @app.respond_to?(:foo?) - assert @app.foo? - @app.set :foo, nil - assert !@app.foo? - end - - it 'uses existing setter methods if detected' do - class << @app - def foo - @foo - end - def foo=(value) - @foo = 'oops' - end - end - - @app.set :foo, 'bam' - assert_equal 'oops', @app.foo - end - - it "sets multiple options to true with #enable" do - @app.enable :sessions, :foo, :bar - assert @app.sessions - assert @app.foo - assert @app.bar - end - - it "sets multiple options to false with #disable" do - @app.disable :sessions, :foo, :bar - assert !@app.sessions - assert !@app.foo - assert !@app.bar - end - - it 'enables MethodOverride middleware when :methodoverride is enabled' do - @app.set :methodoverride, true - @app.put('/') { 'okay' } - post '/', {'_method'=>'PUT'}, {} - assert_equal 200, status - assert_equal 'okay', body - end -end - -describe_option 'clean_trace' do - def clean_backtrace(trace) - @base.new.send(:clean_backtrace, trace) - end - - it 'is enabled on Base' do - assert @base.clean_trace? - end - - it 'is enabled on Default' do - assert @default.clean_trace? - end - - it 'does nothing when disabled' do - backtrace = [ - "./lib/sinatra/base.rb", - "./myapp:42", - ("#{Gem.dir}/some/lib.rb" if defined?(Gem)) - ].compact - @base.set :clean_trace, false - assert_equal backtrace, clean_backtrace(backtrace) - end - - it 'removes sinatra lib paths from backtrace when enabled' do - backtrace = [ - "./lib/sinatra/base.rb", - "./lib/sinatra/compat.rb:42", - "./lib/sinatra/main.rb:55 in `foo'" - ] - assert clean_backtrace(backtrace).empty? - end - - it 'removes ./ prefix from backtrace paths when enabled' do - assert_equal ['myapp.rb:42'], clean_backtrace(['./myapp.rb:42']) - end - - if defined?(Gem) - it 'removes gem lib paths from backtrace when enabled' do - assert clean_backtrace(["#{Gem.dir}/some/lib"]).empty? - end - end -end - -describe_option 'run' do - it 'is disabled on Base' do - assert ! @base.run? - end - - it 'is enabled on Default when not in test environment' do - assert @default.development? - assert @default.run? - - @default.set :environment, :development - assert @default.run? - end - - # TODO: it 'is enabled when $0 == app_file' -end - -describe_option 'raise_errors' do - it 'is enabled on Base' do - assert @base.raise_errors? - end - - it 'is enabled on Default only in test' do - @default.set(:environment, :development) - assert @default.development? - assert ! @default.raise_errors?, "disabled development" - - @default.set(:environment, :production) - assert ! @default.raise_errors? - - @default.set(:environment, :test) - assert @default.raise_errors? - end -end - -describe_option 'dump_errors' do - it 'is disabled on Base' do - assert ! @base.dump_errors? - end - - it 'is enabled on Default' do - assert @default.dump_errors? - end - - it 'dumps exception with backtrace to rack.errors' do - Sinatra::Default.disable(:raise_errors) - - mock_app(Sinatra::Default) { - error do - error = @env['rack.errors'].instance_variable_get(:@error) - error.rewind - - error.read - end - - get '/' do - raise - end - } - - get '/' - assert body.include?("RuntimeError") && body.include?("options_test.rb") - end -end - -describe_option 'sessions' do - it 'is disabled on Base' do - assert ! @base.sessions? - end - - it 'is disabled on Default' do - assert ! @default.sessions? - end - - # TODO: it 'uses Rack::Session::Cookie when enabled' do -end - -describe_option 'logging' do - it 'is disabled on Base' do - assert ! @base.logging? - end - - it 'is enabled on Default when not in test environment' do - assert @default.logging? - - @default.set :environment, :test - assert ! @default.logging - end - - # TODO: it 'uses Rack::CommonLogger when enabled' do -end - -describe_option 'static' do - it 'is disabled on Base' do - assert ! @base.static? - end - - it 'is enabled on Default' do - assert @default.static? - end - - # TODO: it setup static routes if public is enabled - # TODO: however, that's already tested in static_test so... -end - -describe_option 'host' do - it 'defaults to 0.0.0.0' do - assert_equal '0.0.0.0', @base.host - assert_equal '0.0.0.0', @default.host - end -end - -describe_option 'port' do - it 'defaults to 4567' do - assert_equal 4567, @base.port - assert_equal 4567, @default.port - end -end - -describe_option 'server' do - it 'is one of thin, mongrel, webrick' do - assert_equal %w[thin mongrel webrick], @base.server - assert_equal %w[thin mongrel webrick], @default.server - end -end - -describe_option 'app_file' do - it 'is nil' do - assert @base.app_file.nil? - assert @default.app_file.nil? - end -end - -describe_option 'root' do - it 'is nil if app_file is not set' do - assert @base.root.nil? - assert @default.root.nil? - end - - it 'is equal to the expanded basename of app_file' do - @base.app_file = __FILE__ - assert_equal File.expand_path(File.dirname(__FILE__)), @base.root - - @default.app_file = __FILE__ - assert_equal File.expand_path(File.dirname(__FILE__)), @default.root - end -end - -describe_option 'views' do - it 'is nil if root is not set' do - assert @base.views.nil? - assert @default.views.nil? - end - - it 'is set to root joined with views/' do - @base.root = File.dirname(__FILE__) - assert_equal File.dirname(__FILE__) + "/views", @base.views - - @default.root = File.dirname(__FILE__) - assert_equal File.dirname(__FILE__) + "/views", @default.views - end -end - -describe_option 'public' do - it 'is nil if root is not set' do - assert @base.public.nil? - assert @default.public.nil? - end - - it 'is set to root joined with public/' do - @base.root = File.dirname(__FILE__) - assert_equal File.dirname(__FILE__) + "/public", @base.public - - @default.root = File.dirname(__FILE__) - assert_equal File.dirname(__FILE__) + "/public", @default.public - end -end - -describe_option 'reload' do - it 'is enabled when - app_file is set, - is not a rackup file, - and we are in development' do - @base.app_file = __FILE__ - @base.set(:environment, :development) - assert @base.reload? - - @default.app_file = __FILE__ - @default.set(:environment, :development) - assert @default.reload? - end - - it 'is disabled if app_file is not set' do - assert ! @base.reload? - assert ! @default.reload? - end - - it 'is disabled if app_file is a rackup file' do - @base.app_file = 'config.ru' - assert ! @base.reload? - - @default.app_file = 'config.ru' - assert ! @base.reload? - end - - it 'is disabled if we are not in development' do - @base.set(:environment, :foo) - assert ! @base.reload - - @default.set(:environment, :bar) - assert ! @default.reload - end -end - -describe_option 'lock' do - it 'is enabled when reload is enabled' do - @base.enable(:reload) - assert @base.lock? - - @default.enable(:reload) - assert @default.lock? - end - - it 'is disabled when reload is disabled' do - @base.disable(:reload) - assert ! @base.lock? - - @default.disable(:reload) - assert ! @default.lock? - end -end diff --git a/vendor/sinatra-0.9.1.1/test/reload_test.rb b/vendor/sinatra-0.9.1.1/test/reload_test.rb deleted file mode 100644 index 976d3fa04..000000000 --- a/vendor/sinatra-0.9.1.1/test/reload_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -$reload_count = 0 -$reload_app = nil - -describe "Reloading" do - before { - @app = mock_app(Sinatra::Default) - $reload_app = @app - } - - after { - $reload_app = nil - } - - it 'is enabled by default when in development and the app_file is set' do - @app.set :app_file, __FILE__ - @app.set :environment, :development - assert_same true, @app.reload - assert_same true, @app.reload? - end - - it 'is disabled by default when running in non-development environment' do - @app.set :app_file, __FILE__ - @app.set :environment, :test - assert !@app.reload - assert_same false, @app.reload? - end - - it 'is disabled by default when no app_file is available' do - @app.set :app_file, nil - @app.set :environment, :development - assert !@app.reload - assert_same false, @app.reload? - end - - it 'is disabled when app_file is a rackup (.ru) file' do - @app.set :app_file, __FILE__.sub(/\.rb$/, '.ru') - @app.set :environment, :development - assert !@app.reload - assert_same false, @app.reload? - end - - it 'can be turned off explicitly' do - @app.set :app_file, __FILE__ - @app.set :environment, :development - assert_same true, @app.reload - @app.set :reload, false - assert_same false, @app.reload - assert_same false, @app.reload? - end - - it 'reloads the app_file each time a request is made' do - @app.set :app_file, File.dirname(__FILE__) + '/data/reload_app_file.rb' - @app.set :reload, true - @app.get('/') { 'Hello World' } - - get '/' - assert_equal 200, status - assert_equal 'Hello from reload file', body - assert_equal 1, $reload_count - - get '/' - assert_equal 200, status - assert_equal 'Hello from reload file', body - assert_equal 2, $reload_count - end -end diff --git a/vendor/sinatra-0.9.1.1/test/request_test.rb b/vendor/sinatra-0.9.1.1/test/request_test.rb deleted file mode 100644 index 7fb1b15a6..000000000 --- a/vendor/sinatra-0.9.1.1/test/request_test.rb +++ /dev/null @@ -1,18 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Sinatra::Request' do - it 'responds to #user_agent' do - request = Sinatra::Request.new({'HTTP_USER_AGENT' => 'Test'}) - assert request.respond_to?(:user_agent) - assert_equal 'Test', request.user_agent - end - - it 'parses POST params when Content-Type is form-dataish' do - request = Sinatra::Request.new( - 'REQUEST_METHOD' => 'PUT', - 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', - 'rack.input' => StringIO.new('foo=bar') - ) - assert_equal 'bar', request.params['foo'] - end -end diff --git a/vendor/sinatra-0.9.1.1/test/response_test.rb b/vendor/sinatra-0.9.1.1/test/response_test.rb deleted file mode 100644 index 5368ef0ec..000000000 --- a/vendor/sinatra-0.9.1.1/test/response_test.rb +++ /dev/null @@ -1,42 +0,0 @@ -# encoding: utf-8 - -require File.dirname(__FILE__) + '/helper' - -describe 'Sinatra::Response' do - before do - @response = Sinatra::Response.new - end - - it "initializes with 200, text/html, and empty body" do - assert_equal 200, @response.status - assert_equal 'text/html', @response['Content-Type'] - assert_equal [], @response.body - end - - it 'uses case insensitive headers' do - @response['content-type'] = 'application/foo' - assert_equal 'application/foo', @response['Content-Type'] - assert_equal 'application/foo', @response['CONTENT-TYPE'] - end - - it 'writes to body' do - @response.body = 'Hello' - @response.write ' World' - assert_equal 'Hello World', @response.body - end - - [204, 304].each do |status_code| - it "removes the Content-Type header and body when response status is #{status_code}" do - @response.status = status_code - @response.body = ['Hello World'] - assert_equal [status_code, {}, []], @response.finish - end - end - - it 'Calculates the Content-Length using the bytesize of the body' do - @response.body = ['Hello', 'World!', '✈'] - status, headers, body = @response.finish - assert_equal '14', headers['Content-Length'] - assert_equal @response.body, body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/result_test.rb b/vendor/sinatra-0.9.1.1/test/result_test.rb deleted file mode 100644 index 0a9260110..000000000 --- a/vendor/sinatra-0.9.1.1/test/result_test.rb +++ /dev/null @@ -1,98 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Result Handling' do - it "sets response.body when result is a String" do - mock_app { - get '/' do - 'Hello World' - end - } - - get '/' - assert ok? - assert_equal 'Hello World', body - end - - it "sets response.body when result is an Array of Strings" do - mock_app { - get '/' do - ['Hello', 'World'] - end - } - - get '/' - assert ok? - assert_equal 'HelloWorld', body - end - - it "sets response.body when result responds to #each" do - mock_app { - get '/' do - res = lambda { 'Hello World' } - def res.each ; yield call ; end - res - end - } - - get '/' - assert ok? - assert_equal 'Hello World', body - end - - it "sets response.body to [] when result is nil" do - mock_app { - get '/' do - nil - end - } - - get '/' - assert ok? - assert_equal '', body - end - - it "sets status, headers, and body when result is a Rack response tuple" do - mock_app { - get '/' do - [205, {'Content-Type' => 'foo/bar'}, 'Hello World'] - end - } - - get '/' - assert_equal 205, status - assert_equal 'foo/bar', response['Content-Type'] - assert_equal 'Hello World', body - end - - it "sets status and body when result is a two-tuple" do - mock_app { - get '/' do - [409, 'formula of'] - end - } - - get '/' - assert_equal 409, status - assert_equal 'formula of', body - end - - it "raises a TypeError when result is a non two or three tuple Array" do - mock_app { - get '/' do - [409, 'formula of', 'something else', 'even more'] - end - } - - assert_raise(TypeError) { get '/' } - end - - it "sets status when result is a Fixnum status code" do - mock_app { - get('/') { 205 } - } - - get '/' - assert_equal 205, status - assert_equal '', body - end -end diff --git a/vendor/sinatra-0.9.1.1/test/routing_test.rb b/vendor/sinatra-0.9.1.1/test/routing_test.rb deleted file mode 100644 index 20aa5667e..000000000 --- a/vendor/sinatra-0.9.1.1/test/routing_test.rb +++ /dev/null @@ -1,712 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -# Helper method for easy route pattern matching testing -def route_def(pattern) - mock_app { get(pattern) { } } -end - -describe "Routing" do - %w[get put post delete].each do |verb| - it "defines #{verb.upcase} request handlers with #{verb}" do - mock_app { - send verb, '/hello' do - 'Hello World' - end - } - - request = Rack::MockRequest.new(@app) - response = request.request(verb.upcase, '/hello', {}) - assert response.ok? - assert_equal 'Hello World', response.body - end - end - - it "defines HEAD request handlers with HEAD" do - mock_app { - head '/hello' do - response['X-Hello'] = 'World!' - 'remove me' - end - } - - request = Rack::MockRequest.new(@app) - response = request.request('HEAD', '/hello', {}) - assert response.ok? - assert_equal 'World!', response['X-Hello'] - assert_equal '', response.body - end - - it "404s when no route satisfies the request" do - mock_app { - get('/foo') { } - } - get '/bar' - assert_equal 404, status - end - - it 'takes multiple definitions of a route' do - mock_app { - user_agent(/Foo/) - get '/foo' do - 'foo' - end - - get '/foo' do - 'not foo' - end - } - - get '/foo', {}, 'HTTP_USER_AGENT' => 'Foo' - assert ok? - assert_equal 'foo', body - - get '/foo' - assert ok? - assert_equal 'not foo', body - end - - it "exposes params with indifferent hash" do - mock_app { - get '/:foo' do - assert_equal 'bar', params['foo'] - assert_equal 'bar', params[:foo] - 'well, alright' - end - } - get '/bar' - assert_equal 'well, alright', body - end - - it "merges named params and query string params in params" do - mock_app { - get '/:foo' do - assert_equal 'bar', params['foo'] - assert_equal 'biz', params['baz'] - end - } - get '/bar?baz=biz' - assert ok? - end - - it "supports named params like /hello/:person" do - mock_app { - get '/hello/:person' do - "Hello #{params['person']}" - end - } - get '/hello/Frank' - assert_equal 'Hello Frank', body - end - - it "supports optional named params like /?:foo?/?:bar?" do - mock_app { - get '/?:foo?/?:bar?' do - "foo=#{params[:foo]};bar=#{params[:bar]}" - end - } - - get '/hello/world' - assert ok? - assert_equal "foo=hello;bar=world", body - - get '/hello' - assert ok? - assert_equal "foo=hello;bar=", body - - get '/' - assert ok? - assert_equal "foo=;bar=", body - end - - it "supports single splat params like /*" do - mock_app { - get '/*' do - assert params['splat'].kind_of?(Array) - params['splat'].join "\n" - end - } - - get '/foo' - assert_equal "foo", body - - get '/foo/bar/baz' - assert_equal "foo/bar/baz", body - end - - it "supports mixing multiple splat params like /*/foo/*/*" do - mock_app { - get '/*/foo/*/*' do - assert params['splat'].kind_of?(Array) - params['splat'].join "\n" - end - } - - get '/bar/foo/bling/baz/boom' - assert_equal "bar\nbling\nbaz/boom", body - - get '/bar/foo/baz' - assert not_found? - end - - it "supports mixing named and splat params like /:foo/*" do - mock_app { - get '/:foo/*' do - assert_equal 'foo', params['foo'] - assert_equal ['bar/baz'], params['splat'] - end - } - - get '/foo/bar/baz' - assert ok? - end - - it "matches a dot ('.') as part of a named param" do - mock_app { - get '/:foo/:bar' do - params[:foo] - end - } - - get '/user@example.com/name' - assert_equal 200, response.status - assert_equal 'user@example.com', body - end - - it "matches a literal dot ('.') outside of named params" do - mock_app { - get '/:file.:ext' do - assert_equal 'pony', params[:file] - assert_equal 'jpg', params[:ext] - 'right on' - end - } - - get '/pony.jpg' - assert_equal 200, response.status - assert_equal 'right on', body - end - - it "literally matches . in paths" do - route_def '/test.bar' - - get '/test.bar' - assert ok? - get 'test0bar' - assert not_found? - end - - it "literally matches $ in paths" do - route_def '/test$/' - - get '/test$/' - assert ok? - end - - it "literally matches + in paths" do - route_def '/te+st/' - - get '/te%2Bst/' - assert ok? - get '/teeeeeeest/' - assert not_found? - end - - it "literally matches () in paths" do - route_def '/test(bar)/' - - get '/test(bar)/' - assert ok? - end - - it "supports basic nested params" do - mock_app { - get '/hi' do - params["person"]["name"] - end - } - - get "/hi?person[name]=John+Doe" - assert ok? - assert_equal "John Doe", body - end - - it "exposes nested params with indifferent hash" do - mock_app { - get '/testme' do - assert_equal 'baz', params['bar']['foo'] - assert_equal 'baz', params['bar'][:foo] - 'well, alright' - end - } - get '/testme?bar[foo]=baz' - assert_equal 'well, alright', body - end - - it "supports deeply nested params" do - input = { - 'browser[chrome][engine][name]' => 'V8', - 'browser[chrome][engine][version]' => '1.0', - 'browser[firefox][engine][name]' => 'spidermonkey', - 'browser[firefox][engine][version]' => '1.7.0', - 'emacs[map][goto-line]' => 'M-g g', - 'emacs[version]' => '22.3.1', - 'paste[name]' => 'hello world', - 'paste[syntax]' => 'ruby' - } - expected = { - "emacs" => { - "map" => { "goto-line" => "M-g g" }, - "version" => "22.3.1" - }, - "browser" => { - "firefox" => {"engine" => {"name"=>"spidermonkey", "version"=>"1.7.0"}}, - "chrome" => {"engine" => {"name"=>"V8", "version"=>"1.0"}} - }, - "paste" => {"name"=>"hello world", "syntax"=>"ruby"} - } - mock_app { - get '/foo' do - assert_equal expected, params - 'looks good' - end - } - get "/foo?#{build_query(input)}" - assert ok? - assert_equal 'looks good', body - end - - it "preserves non-nested params" do - mock_app { - get '/foo' do - assert_equal "2", params["article_id"] - assert_equal "awesome", params['comment']['body'] - assert_nil params['comment[body]'] - 'looks good' - end - } - - get '/foo?article_id=2&comment[body]=awesome' - assert ok? - assert_equal 'looks good', body - end - - it "matches paths that include spaces encoded with %20" do - mock_app { - get '/path with spaces' do - 'looks good' - end - } - - get '/path%20with%20spaces' - assert ok? - assert_equal 'looks good', body - end - - it "matches paths that include spaces encoded with +" do - mock_app { - get '/path with spaces' do - 'looks good' - end - } - - get '/path+with+spaces' - assert ok? - assert_equal 'looks good', body - end - - it "URL decodes named parameters and splats" do - mock_app { - get '/:foo/*' do - assert_equal 'hello world', params['foo'] - assert_equal ['how are you'], params['splat'] - nil - end - } - - get '/hello%20world/how%20are%20you' - assert ok? - end - - it 'supports regular expressions' do - mock_app { - get(/^\/foo...\/bar$/) do - 'Hello World' - end - } - - get '/foooom/bar' - assert ok? - assert_equal 'Hello World', body - end - - it 'makes regular expression captures available in params[:captures]' do - mock_app { - get(/^\/fo(.*)\/ba(.*)/) do - assert_equal ['orooomma', 'f'], params[:captures] - 'right on' - end - } - - get '/foorooomma/baf' - assert ok? - assert_equal 'right on', body - end - - it 'raises a TypeError when pattern is not a String or Regexp' do - @app = mock_app - assert_raise(TypeError) { @app.get(42){} } - end - - it "returns response immediately on halt" do - mock_app { - get '/' do - halt 'Hello World' - 'Boo-hoo World' - end - } - - get '/' - assert ok? - assert_equal 'Hello World', body - end - - it "halts with a response tuple" do - mock_app { - get '/' do - halt 295, {'Content-Type' => 'text/plain'}, 'Hello World' - end - } - - get '/' - assert_equal 295, status - assert_equal 'text/plain', response['Content-Type'] - assert_equal 'Hello World', body - end - - it "halts with an array of strings" do - mock_app { - get '/' do - halt %w[Hello World How Are You] - end - } - - get '/' - assert_equal 'HelloWorldHowAreYou', body - end - - it "transitions to the next matching route on pass" do - mock_app { - get '/:foo' do - pass - 'Hello Foo' - end - - get '/*' do - assert !params.include?('foo') - 'Hello World' - end - } - - get '/bar' - assert ok? - assert_equal 'Hello World', body - end - - it "transitions to 404 when passed and no subsequent route matches" do - mock_app { - get '/:foo' do - pass - 'Hello Foo' - end - } - - get '/bar' - assert not_found? - end - - it "passes when matching condition returns false" do - mock_app { - condition { params[:foo] == 'bar' } - get '/:foo' do - 'Hello World' - end - } - - get '/bar' - assert ok? - assert_equal 'Hello World', body - - get '/foo' - assert not_found? - end - - it "does not pass when matching condition returns nil" do - mock_app { - condition { nil } - get '/:foo' do - 'Hello World' - end - } - - get '/bar' - assert ok? - assert_equal 'Hello World', body - end - - it "passes to next route when condition calls pass explicitly" do - mock_app { - condition { pass unless params[:foo] == 'bar' } - get '/:foo' do - 'Hello World' - end - } - - get '/bar' - assert ok? - assert_equal 'Hello World', body - - get '/foo' - assert not_found? - end - - it "passes to the next route when host_name does not match" do - mock_app { - host_name 'example.com' - get '/foo' do - 'Hello World' - end - } - get '/foo' - assert not_found? - - get '/foo', :env => { 'HTTP_HOST' => 'example.com' } - assert_equal 200, status - assert_equal 'Hello World', body - end - - it "passes to the next route when user_agent does not match" do - mock_app { - user_agent(/Foo/) - get '/foo' do - 'Hello World' - end - } - get '/foo' - assert not_found? - - get '/foo', :env => { 'HTTP_USER_AGENT' => 'Foo Bar' } - assert_equal 200, status - assert_equal 'Hello World', body - end - - it "makes captures in user agent pattern available in params[:agent]" do - mock_app { - user_agent(/Foo (.*)/) - get '/foo' do - 'Hello ' + params[:agent].first - end - } - get '/foo', :env => { 'HTTP_USER_AGENT' => 'Foo Bar' } - assert_equal 200, status - assert_equal 'Hello Bar', body - end - - it "filters by accept header" do - mock_app { - get '/', :provides => :xml do - request.env['HTTP_ACCEPT'] - end - } - - get '/', :env => { :accept => 'application/xml' } - assert ok? - assert_equal 'application/xml', body - assert_equal 'application/xml', response.headers['Content-Type'] - - get '/', :env => { :accept => 'text/html' } - assert !ok? - end - - it "allows multiple mime types for accept header" do - types = ['image/jpeg', 'image/pjpeg'] - - mock_app { - get '/', :provides => types do - request.env['HTTP_ACCEPT'] - end - } - - types.each do |type| - get '/', :env => { :accept => type } - assert ok? - assert_equal type, body - assert_equal type, response.headers['Content-Type'] - end - end - - it 'degrades gracefully when optional accept header is not provided' do - mock_app { - get '/', :provides => :xml do - request.env['HTTP_ACCEPT'] - end - get '/' do - 'default' - end - } - get '/' - assert ok? - assert_equal 'default', body - end - - it 'passes a single url param as block parameters when one param is specified' do - mock_app { - get '/:foo' do |foo| - assert_equal 'bar', foo - end - } - - get '/bar' - assert ok? - end - - it 'passes multiple params as block parameters when many are specified' do - mock_app { - get '/:foo/:bar/:baz' do |foo, bar, baz| - assert_equal 'abc', foo - assert_equal 'def', bar - assert_equal 'ghi', baz - end - } - - get '/abc/def/ghi' - assert ok? - end - - it 'passes regular expression captures as block parameters' do - mock_app { - get(/^\/fo(.*)\/ba(.*)/) do |foo, bar| - assert_equal 'orooomma', foo - assert_equal 'f', bar - 'looks good' - end - } - - get '/foorooomma/baf' - assert ok? - assert_equal 'looks good', body - end - - it "supports mixing multiple splat params like /*/foo/*/* as block parameters" do - mock_app { - get '/*/foo/*/*' do |foo, bar, baz| - assert_equal 'bar', foo - assert_equal 'bling', bar - assert_equal 'baz/boom', baz - 'looks good' - end - } - - get '/bar/foo/bling/baz/boom' - assert ok? - assert_equal 'looks good', body - end - - it 'raises an ArgumentError with block arity > 1 and too many values' do - mock_app { - get '/:foo/:bar/:baz' do |foo, bar| - 'quux' - end - } - - assert_raise(ArgumentError) { get '/a/b/c' } - end - - it 'raises an ArgumentError with block param arity > 1 and too few values' do - mock_app { - get '/:foo/:bar' do |foo, bar, baz| - 'quux' - end - } - - assert_raise(ArgumentError) { get '/a/b' } - end - - it 'succeeds if no block parameters are specified' do - mock_app { - get '/:foo/:bar' do - 'quux' - end - } - - get '/a/b' - assert ok? - assert_equal 'quux', body - end - - it 'passes all params with block param arity -1 (splat args)' do - mock_app { - get '/:foo/:bar' do |*args| - args.join - end - } - - get '/a/b' - assert ok? - assert_equal 'ab', body - end - - # NOTE Block params behaves differently under 1.8 and 1.9. Under 1.8, block - # param arity is lax: declaring a mismatched number of block params results - # in a warning. Under 1.9, block param arity is strict: mismatched block - # arity raises an ArgumentError. - - if RUBY_VERSION >= '1.9' - - it 'raises an ArgumentError with block param arity 1 and no values' do - mock_app { - get '/foo' do |foo| - 'quux' - end - } - - assert_raise(ArgumentError) { get '/foo' } - end - - it 'raises an ArgumentError with block param arity 1 and too many values' do - mock_app { - get '/:foo/:bar/:baz' do |foo| - 'quux' - end - } - - assert_raise(ArgumentError) { get '/a/b/c' } - end - - else - - it 'does not raise an ArgumentError with block param arity 1 and no values' do - mock_app { - get '/foo' do |foo| - 'quux' - end - } - - silence_warnings { get '/foo' } - assert ok? - assert_equal 'quux', body - end - - it 'does not raise an ArgumentError with block param arity 1 and too many values' do - mock_app { - get '/:foo/:bar/:baz' do |foo| - 'quux' - end - } - - silence_warnings { get '/a/b/c' } - assert ok? - assert_equal 'quux', body - end - - end -end diff --git a/vendor/sinatra-0.9.1.1/test/sass_test.rb b/vendor/sinatra-0.9.1.1/test/sass_test.rb deleted file mode 100644 index aaf745fb7..000000000 --- a/vendor/sinatra-0.9.1.1/test/sass_test.rb +++ /dev/null @@ -1,36 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe "Sass Templates" do - def sass_app(&block) - mock_app { - set :views, File.dirname(__FILE__) + '/views' - get '/', &block - } - get '/' - end - - it 'renders inline Sass strings' do - sass_app { sass "#sass\n :background-color #FFF\n" } - assert ok? - assert_equal "#sass {\n background-color: #FFF; }\n", body - end - - it 'renders .sass files in views path' do - sass_app { sass :hello } - assert ok? - assert_equal "#sass {\n background-color: #FFF; }\n", body - end - - it 'ignores the layout option' do - sass_app { sass :hello, :layout => :layout2 } - assert ok? - assert_equal "#sass {\n background-color: #FFF; }\n", body - end - - it "raises error if template not found" do - mock_app { - get('/') { sass :no_such_template } - } - assert_raise(Errno::ENOENT) { get('/') } - end -end diff --git a/vendor/sinatra-0.9.1.1/test/server_test.rb b/vendor/sinatra-0.9.1.1/test/server_test.rb deleted file mode 100644 index 223f24057..000000000 --- a/vendor/sinatra-0.9.1.1/test/server_test.rb +++ /dev/null @@ -1,41 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -class Rack::Handler::Mock - extend Test::Unit::Assertions - - def self.run(app, options={}) - assert(app < Sinatra::Base) - assert_equal 9001, options[:Port] - assert_equal 'foo.local', options[:Host] - yield new - end - - def stop - end -end - -describe 'Sinatra::Base.run!' do - before do - mock_app { - set :server, 'mock' - set :host, 'foo.local' - set :port, 9001 - } - $stdout = File.open('/dev/null', 'wb') - end - - after { $stdout = STDOUT } - - it "locates the appropriate Rack handler and calls ::run" do - @app.run! - end - - it "sets options on the app before running" do - @app.run! :sessions => true - assert @app.sessions? - end - - it "falls back on the next server handler when not found" do - @app.run! :server => %w[foo bar mock] - end -end diff --git a/vendor/sinatra-0.9.1.1/test/sinatra_test.rb b/vendor/sinatra-0.9.1.1/test/sinatra_test.rb deleted file mode 100644 index a8a4c2096..000000000 --- a/vendor/sinatra-0.9.1.1/test/sinatra_test.rb +++ /dev/null @@ -1,13 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Sinatra' do - it 'creates a new Sinatra::Base subclass on new' do - app = - Sinatra.new do - get '/' do - 'Hello World' - end - end - assert_same Sinatra::Base, app.superclass - end -end diff --git a/vendor/sinatra-0.9.1.1/test/static_test.rb b/vendor/sinatra-0.9.1.1/test/static_test.rb deleted file mode 100644 index 2fde797f5..000000000 --- a/vendor/sinatra-0.9.1.1/test/static_test.rb +++ /dev/null @@ -1,80 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Static' do - before do - mock_app { - set :static, true - set :public, File.dirname(__FILE__) - } - end - - it 'serves GET requests for files in the public directory' do - get "/#{File.basename(__FILE__)}" - assert ok? - assert_equal File.read(__FILE__), body - assert_equal File.size(__FILE__).to_s, response['Content-Length'] - assert response.headers.include?('Last-Modified') - end - - it 'produces a body that can be iterated over multiple times' do - env = Rack::MockRequest.env_for("/#{File.basename(__FILE__)}") - status, headers, body = @app.call(env) - buf1, buf2 = [], [] - body.each { |part| buf1 << part } - body.each { |part| buf2 << part } - assert_equal buf1.join, buf2.join - assert_equal File.read(__FILE__), buf1.join - end - - it 'serves HEAD requests for files in the public directory' do - head "/#{File.basename(__FILE__)}" - assert ok? - assert_equal '', body - assert_equal File.size(__FILE__).to_s, response['Content-Length'] - assert response.headers.include?('Last-Modified') - end - - it 'serves files in preference to custom routes' do - @app.get("/#{File.basename(__FILE__)}") { 'Hello World' } - get "/#{File.basename(__FILE__)}" - assert ok? - assert body != 'Hello World' - end - - it 'does not serve directories' do - get "/" - assert not_found? - end - - it 'passes to the next handler when the static option is disabled' do - @app.set :static, false - get "/#{File.basename(__FILE__)}" - assert not_found? - end - - it 'passes to the next handler when the public option is nil' do - @app.set :public, nil - get "/#{File.basename(__FILE__)}" - assert not_found? - end - - it '404s when a file is not found' do - get "/foobarbaz.txt" - assert not_found? - end - - it 'serves files when .. path traverses within public directory' do - get "/data/../#{File.basename(__FILE__)}" - assert ok? - assert_equal File.read(__FILE__), body - end - - it '404s when .. path traverses outside of public directory' do - mock_app { - set :static, true - set :public, File.dirname(__FILE__) + '/data' - } - get "/../#{File.basename(__FILE__)}" - assert not_found? - end -end diff --git a/vendor/sinatra-0.9.1.1/test/templates_test.rb b/vendor/sinatra-0.9.1.1/test/templates_test.rb deleted file mode 100644 index 924434487..000000000 --- a/vendor/sinatra-0.9.1.1/test/templates_test.rb +++ /dev/null @@ -1,88 +0,0 @@ -require File.dirname(__FILE__) + '/helper' - -describe 'Templating' do - def render_app(&block) - mock_app { - def render_test(template, data, options, &block) - inner = block ? block.call : '' - data + inner - end - set :views, File.dirname(__FILE__) + '/views' - get '/', &block - template(:layout3) { "Layout 3!\n" } - } - get '/' - end - - def with_default_layout - layout = File.dirname(__FILE__) + '/views/layout.test' - File.open(layout, 'wb') { |io| io.write "Layout!\n" } - yield - ensure - File.unlink(layout) rescue nil - end - - it 'renders String templates directly' do - render_app { render :test, 'Hello World' } - assert ok? - assert_equal 'Hello World', body - end - - it 'renders Proc templates using the call result' do - render_app { render :test, Proc.new {'Hello World'} } - assert ok? - assert_equal 'Hello World', body - end - - it 'looks up Symbol templates in views directory' do - render_app { render :test, :hello } - assert ok? - assert_equal "Hello World!\n", body - end - - it 'uses the default layout template if not explicitly overridden' do - with_default_layout do - render_app { render :test, :hello } - assert ok? - assert_equal "Layout!\nHello World!\n", body - end - end - - it 'uses the default layout template if not really overriden' do - with_default_layout do - render_app { render :test, :hello, :layout => true } - assert ok? - assert_equal "Layout!\nHello World!\n", body - end - end - - it 'uses the layout template specified' do - render_app { render :test, :hello, :layout => :layout2 } - assert ok? - assert_equal "Layout 2!\nHello World!\n", body - end - - it 'uses layout templates defined with the #template method' do - render_app { render :test, :hello, :layout => :layout3 } - assert ok? - assert_equal "Layout 3!\nHello World!\n", body - end - - it 'loads templates from source file with use_in_file_templates!' do - mock_app { - use_in_file_templates! - } - assert_equal "this is foo\n\n", @app.templates[:foo] - assert_equal "X\n= yield\nX\n", @app.templates[:layout] - end -end - -__END__ - -@@ foo -this is foo - -@@ layout -X -= yield -X diff --git a/vendor/sinatra-0.9.1.1/test/test_test.rb b/vendor/sinatra-0.9.1.1/test/test_test.rb deleted file mode 100644 index 0a4dd2932..000000000 --- a/vendor/sinatra-0.9.1.1/test/test_test.rb +++ /dev/null @@ -1,144 +0,0 @@ -require 'yaml' -require File.dirname(__FILE__) + '/helper' - -describe 'Sinatra::Test' do - def request - YAML.load(body) - end - - def request_body - request['test.body'] - end - - def request_params - YAML.load(request['test.params']) - end - - before do - mock_app { - %w[get head post put delete].each { |verb| - send(verb, '/') do - redirect '/redirected' if params[:redirect] - env.update('test.body' => request.body.read) - env.update('test.params' => params.to_yaml) - env.to_yaml - end - } - - get '/redirected' do - "you've been redirected" - end - } - end - - it 'allows GET/HEAD/POST/PUT/DELETE' do - get '/' - assert_equal('GET', request['REQUEST_METHOD']) - - post '/' - assert_equal('POST', request['REQUEST_METHOD']) - - put '/' - assert_equal('PUT', request['REQUEST_METHOD']) - - delete '/' - assert_equal('DELETE', request['REQUEST_METHOD']) - - head '/' - assert_equal('596', response.headers['Content-Length']) - assert_equal('', response.body) - end - - it 'allows to specify a body' do - post '/', '42' - assert_equal '42', request_body - end - - it 'allows to specify params' do - get '/', :foo => 'bar' - assert_equal 'bar', request_params['foo'] - end - - it 'supports nested params' do - get '/', :foo => { :x => 'y', :chunky => 'bacon' } - assert_equal "y", request_params['foo']['x'] - assert_equal "bacon", request_params['foo']['chunky'] - end - - it 'provides easy access to response status and body' do - get '/' - assert_equal 200, status - assert body =~ /^---/ - end - - it 'delegates methods to @response' do - get '/' - assert ok? - end - - it 'follows redirect' do - get '/', :redirect => true - follow! - assert_equal "you've been redirected", body - end - - it 'provides sugar for common HTTP headers' do - get '/', :env => { :accept => 'text/plain' } - assert_equal 'text/plain', request['HTTP_ACCEPT'] - - get '/', :env => { :agent => 'TATFT' } - assert_equal 'TATFT', request['HTTP_USER_AGENT'] - - get '/', :env => { :host => '1.2.3.4' } - assert_equal '1.2.3.4', request['HTTP_HOST'] - - get '/', :env => { :session => 'foo' } - assert_equal 'foo', request['rack.session'] - - get '/', :env => { :cookies => 'foo' } - assert_equal 'foo', request['HTTP_COOKIE'] - - get '/', :env => { :content_type => 'text/plain' } - assert_equal 'text/plain', request['CONTENT_TYPE'] - end - - it 'allow to test session easily' do - app = mock_app(Sinatra::Default) { - get '/' do - session['foo'] = 'bar' - 200 - end - - post '/' do - assert_equal 'bar', session['foo'] - session['foo'] || "blah" - end - } - - browser = Sinatra::TestHarness.new(app) - browser.get '/' - browser.post '/', {}, :session => { 'foo' => 'bar' } - assert_equal 'bar', browser.response.body - end - - it 'yields the request object to the block before invoking the application' do - called = false - get '/' do |req| - called = true - assert req.kind_of?(Rack::MockRequest) - end - assert called - end - - it 'sets the environment to :test on include' do - Sinatra::Default.set(:environment, :production) - Class.new { include Sinatra::Test } - assert_equal :test, Sinatra::Default.environment - end - - def test_TestHarness - session = Sinatra::TestHarness.new(@app) - response = session.get('/') - assert_equal 200, response.status - end -end diff --git a/vendor/sinatra-0.9.1.1/test/views/hello.builder b/vendor/sinatra-0.9.1.1/test/views/hello.builder deleted file mode 100644 index 16b86d036..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/hello.builder +++ /dev/null @@ -1 +0,0 @@ -xml.exclaim "You're my boy, #{@name}!" diff --git a/vendor/sinatra-0.9.1.1/test/views/hello.erb b/vendor/sinatra-0.9.1.1/test/views/hello.erb deleted file mode 100644 index bcbbc926f..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/hello.erb +++ /dev/null @@ -1 +0,0 @@ -Hello <%= 'World' %> diff --git a/vendor/sinatra-0.9.1.1/test/views/hello.haml b/vendor/sinatra-0.9.1.1/test/views/hello.haml deleted file mode 100644 index d6852a609..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/hello.haml +++ /dev/null @@ -1 +0,0 @@ -%h1 Hello From Haml diff --git a/vendor/sinatra-0.9.1.1/test/views/hello.sass b/vendor/sinatra-0.9.1.1/test/views/hello.sass deleted file mode 100644 index 5a4fd574a..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/hello.sass +++ /dev/null @@ -1,2 +0,0 @@ -#sass - :background-color #FFF diff --git a/vendor/sinatra-0.9.1.1/test/views/hello.test b/vendor/sinatra-0.9.1.1/test/views/hello.test deleted file mode 100644 index 980a0d5f1..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/hello.test +++ /dev/null @@ -1 +0,0 @@ -Hello World! diff --git a/vendor/sinatra-0.9.1.1/test/views/layout2.builder b/vendor/sinatra-0.9.1.1/test/views/layout2.builder deleted file mode 100644 index 9491f5740..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/layout2.builder +++ /dev/null @@ -1,3 +0,0 @@ -xml.layout do - xml << yield -end diff --git a/vendor/sinatra-0.9.1.1/test/views/layout2.erb b/vendor/sinatra-0.9.1.1/test/views/layout2.erb deleted file mode 100644 index e097f3b6e..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/layout2.erb +++ /dev/null @@ -1,2 +0,0 @@ -ERB Layout! -<%= yield %> diff --git a/vendor/sinatra-0.9.1.1/test/views/layout2.haml b/vendor/sinatra-0.9.1.1/test/views/layout2.haml deleted file mode 100644 index 58bfc04de..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/layout2.haml +++ /dev/null @@ -1,2 +0,0 @@ -%h1 HAML Layout! -%p= yield diff --git a/vendor/sinatra-0.9.1.1/test/views/layout2.test b/vendor/sinatra-0.9.1.1/test/views/layout2.test deleted file mode 100644 index fb432e3a7..000000000 --- a/vendor/sinatra-0.9.1.1/test/views/layout2.test +++ /dev/null @@ -1 +0,0 @@ -Layout 2! diff --git a/vendor/tinder-1.3.1/.gitignore b/vendor/tinder-1.3.1/.gitignore deleted file mode 100644 index c919bb39e..000000000 --- a/vendor/tinder-1.3.1/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -pkg -rdoc -test/remote/credentials.rb \ No newline at end of file diff --git a/vendor/tinder-1.3.1/CHANGELOG.txt b/vendor/tinder-1.3.1/CHANGELOG.txt deleted file mode 100644 index df25df948..000000000 --- a/vendor/tinder-1.3.1/CHANGELOG.txt +++ /dev/null @@ -1,39 +0,0 @@ -1.2.1 - 2009-08-27 -* Fixes for listening after campfire updates [Jordan Byron] - -1.2.0 - 2009-01-28 -* Get the list of available files [Christopher MacGown] -* Upload files [Joshua Wand] -* Find rooms even when full [Josh Owens] -* Join rooms as a guest [Ian Lesperance] - -1.1.7 - 2008-07-24 -* Don't join the room when only speaking [Brian Donovan] -* Added support for HTTP proxies -* Fix listening for messages that contain URLs [Jared Kuolt] - -0.1.6 - 2008-03-07 -* Added Room#topic for getting the current topic [Even Weaver] -* Trap INT in #listen(&block) [borrowed from Chris Shea's Pyre] - -0.1.5 - 2008-01-25 -* Fixed Room#listen, which was broken by latest Campfire deploy -* Fixed timeout when listening but not speaking that will eventually log you out [Clinton R. Nixon] - -0.1.4 - 2007-07-23 -* Support for transcripts -* Fixed Room#leave, which was broken by a Campfire deployment [Andy Smith] - -0.1.3 - 2007-02-12 -* added ssl support [Tero Parviainen] - -0.1.2 - 2007-01-27 -* fixed bug preventing #listen from working without a block - -0.1.1 - 2007-01-27 -* fix bug preventing speak from working -* incorporated "watching" from http://soylentfoo.jnewland.com/articles/2006/12/07/updates-to-marshmallow-the-campfire-bot - -0.1.0 - 2007-01-23 -* Initial release as gem -* Get the users in a room [Tero Parviainen] diff --git a/vendor/tinder-1.3.1/Manifest.txt b/vendor/tinder-1.3.1/Manifest.txt deleted file mode 100644 index 2cd9c9064..000000000 --- a/vendor/tinder-1.3.1/Manifest.txt +++ /dev/null @@ -1,10 +0,0 @@ -CHANGELOG.txt -Manifest.txt -README.txt -Rakefile -init.rb -lib/tinder.rb -lib/tinder/campfire.rb -lib/tinder/multipart.rb -lib/tinder/room.rb -lib/tinder/version.rb diff --git a/vendor/tinder-1.3.1/README.txt b/vendor/tinder-1.3.1/README.txt deleted file mode 100644 index 45de0e625..000000000 --- a/vendor/tinder-1.3.1/README.txt +++ /dev/null @@ -1,54 +0,0 @@ -= Tinder - get the Campfire started - - -This branch is a rewrite of Tinder to use the official Campfire API. The API is intended to be backwards compatible so consumers can easily migrate off the HTML API. - --- Joshua Peek (Programmer, 37signals) - - -Tinder is a library for interfacing with Campfire, the chat application from 37Signals. Unlike Marshmallow, it is designed to be a full-featured API (since 37Signals doesn't provide a real one), allowing you to programatically manage and speak/listen in chat rooms. - -== Usage - - campfire = Tinder::Campfire.new 'mysubdomain' - campfire.login 'myemail@example.com', 'mypassword' - - room = campfire.create_room 'New Room', 'My new campfire room to test tinder' - room.rename 'New Room Name' - room.speak 'Hello world!' - room.paste "my pasted\ncode" - room.destroy - - room = campfire.find_room_by_guest_hash 'abc123', 'John Doe' - room.speak 'Hello world!' - - See the RDoc for more details. - -== Installation - -Tinder can be installed as a gem or a Rails plugin: - - gem install tinder - - script/plugin install git://github.com/collectiveidea/tinder.git - -== How to contribute - -If you find what looks like a bug: - -1. Check the GitHub issue tracker to see if anyone else has had the same issue. - http://github.com/collectiveidea/tinder/issues/ -2. If you don't see anything, create an issue with information on how to reproduce it. - -If you want to contribute an enhancement or a fix: - -1. Fork the project on github. - http://github.com/collectiveidea/tinder -2. Make your changes with tests. -3. Commit the changes without making changes to the Rakefile, VERSION, or any other files that aren't related to your enhancement or fix -4. Send a pull request. - -== ToDo - -* Tests! (unit and remote) -* Marshmallow-style integration scripts for exception notification and continuous integration diff --git a/vendor/tinder-1.3.1/Rakefile b/vendor/tinder-1.3.1/Rakefile deleted file mode 100644 index 18eda34d6..000000000 --- a/vendor/tinder-1.3.1/Rakefile +++ /dev/null @@ -1,65 +0,0 @@ -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "tinder" - gem.summary = "An (unofficial) Campfire API" - gem.description = "An API for interfacing with Campfire, the 37Signals chat application." - gem.authors = ['Brandon Keepers'] - gem.email = 'brandon@opensoul.org' - gem.homepage = 'http://github.com/collectiveidea/tinder' - gem.rubyforge_project = "tinder" - gem.add_dependency "activesupport" - gem.add_dependency "httparty" - gem.add_dependency "mime-types" - gem.add_development_dependency "rspec" - end - Jeweler::GemcutterTasks.new -rescue LoadError - puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler" -end - -require 'rake/testtask' -Rake::TestTask.new(:test) do |test| - test.libs << 'lib' << 'test' - test.pattern = 'test/**/*_test.rb' - test.verbose = true -end - -begin - require 'rcov/rcovtask' - Rcov::RcovTask.new do |test| - test.libs << 'test' - test.pattern = 'test/**/*_test.rb' - test.verbose = true - end -rescue LoadError - task :rcov do - abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" - end -end - -task :test => :check_dependencies - -require 'rake/rdoctask' -Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION') - version = File.read('VERSION') - else - version = "" - end - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "tinder #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -require 'spec/rake/spectask' -desc "Run the specs under spec" -Spec::Rake::SpecTask.new do |t| - t.spec_opts = ['--options', "spec/spec.opts"] - t.spec_files = FileList['spec/**/*_spec.rb'] -end - -desc "Run tests" -task :default => [:spec, :test] diff --git a/vendor/tinder-1.3.1/VERSION b/vendor/tinder-1.3.1/VERSION deleted file mode 100644 index 3a3cd8cc8..000000000 --- a/vendor/tinder-1.3.1/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.3.1 diff --git a/vendor/tinder-1.3.1/init.rb b/vendor/tinder-1.3.1/init.rb deleted file mode 100644 index ca1a0da6f..000000000 --- a/vendor/tinder-1.3.1/init.rb +++ /dev/null @@ -1 +0,0 @@ -require 'tinder' \ No newline at end of file diff --git a/vendor/tinder-1.3.1/lib/tinder.rb b/vendor/tinder-1.3.1/lib/tinder.rb deleted file mode 100644 index 1227b2dcb..000000000 --- a/vendor/tinder-1.3.1/lib/tinder.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'rubygems' -require 'active_support' -require 'uri' -require 'net/http' -require 'net/https' -require 'open-uri' - -require 'tinder/connection' -require 'tinder/multipart' -require 'tinder/campfire' -require 'tinder/room' - -module Tinder - class Error < StandardError; end - class SSLRequiredError < Error; end -end diff --git a/vendor/tinder-1.3.1/lib/tinder/campfire.rb b/vendor/tinder-1.3.1/lib/tinder/campfire.rb deleted file mode 100644 index 4881cd54c..000000000 --- a/vendor/tinder-1.3.1/lib/tinder/campfire.rb +++ /dev/null @@ -1,106 +0,0 @@ -module Tinder - - # == Usage - # - # campfire = Tinder::Campfire.new 'mysubdomain' - # campfire.login 'myemail@example.com', 'mypassword' - # - # room = campfire.create_room 'New Room', 'My new campfire room to test tinder' - # room.speak 'Hello world!' - # room.destroy - # - # room = campfire.find_room_by_guest_hash 'abc123', 'John Doe' - # room.speak 'Hello world!' - class Campfire - HOST = "campfirenow.com" - - attr_reader :connection, :subdomain, :uri - - # Create a new connection to the campfire account with the given +subdomain+. - # - # == Options: - # * +:ssl+: use SSL for the connection, which is required if you have a Campfire SSL account. - # Defaults to false - # * +:proxy+: a proxy URI. (e.g. :proxy => 'http://user:pass@example.com:8000') - # - # c = Tinder::Campfire.new("mysubdomain", :ssl => true) - def initialize(subdomain, options = {}) - options = { :ssl => false }.merge(options) - @connection = Connection.new - @cookie = nil - @subdomain = subdomain - @uri = URI.parse("#{options[:ssl] ? 'https' : 'http' }://#{subdomain}.#{HOST}") - connection.base_uri @uri.to_s - if options[:proxy] - uri = URI.parse(options[:proxy]) - @http = Net::HTTP::Proxy(uri.host, uri.port, uri.user, uri.password) - else - @http = Net::HTTP - end - @logged_in = false - end - - # Log in to campfire using your +email+ and +password+ - def login(username, password) - connection.basic_auth(username, password) - @logged_in = true - end - - # Returns true when successfully logged in - def logged_in? - @logged_in == true - end - - def logout - connection.default_options.delete(:basic_auth) - @logged_in = false - end - - # Get an array of all the available rooms - # TODO: detect rooms that are full (no link) - def rooms - connection.get('/rooms.json')['rooms'].map do |room| - Room.new(self, room) - end - end - - # Find a campfire room by name - def find_room_by_name(name) - rooms.detect { |room| room.name == name } - end - - # Find a campfire room by its guest hash - def find_room_by_guest_hash(hash, name) - rooms.detect { |room| room.guest_invite_code == hash } - end - - # Creates and returns a new Room with the given +name+ and optionally a +topic+ - def create_room(name, topic = nil) - connection.post('/rooms.json', :body => { :room => { :name => name, :topic => topic } }.to_json) - find_room_by_name(name) - end - - def find_or_create_room_by_name(name) - find_room_by_name(name) || create_room(name) - end - - # List the users that are currently chatting in any room - def users(*room_names) - rooms.map(&:users).flatten.compact.uniq.sort - end - - # Get the dates of the available transcripts by room - # - # campfire.available_transcripts - # #=> {"15840" => [#, #]} - # - def available_transcripts(room = nil) - raise NotImplementedError - end - - # Is the connection to campfire using ssl? - def ssl? - uri.scheme == 'https' - end - end -end diff --git a/vendor/tinder-1.3.1/lib/tinder/connection.rb b/vendor/tinder-1.3.1/lib/tinder/connection.rb deleted file mode 100644 index 066c0406d..000000000 --- a/vendor/tinder-1.3.1/lib/tinder/connection.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'httparty' - -module Tinder - class Connection - def initialize - class << self - include HTTParty - - headers 'Content-Type' => 'application/json' - end - end - - def metaclass - class << self; self; end - end - - def method_missing(*args, &block) - metaclass.send(*args, &block) - end - end -end diff --git a/vendor/tinder-1.3.1/lib/tinder/multipart.rb b/vendor/tinder-1.3.1/lib/tinder/multipart.rb deleted file mode 100644 index 124380188..000000000 --- a/vendor/tinder-1.3.1/lib/tinder/multipart.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'mime/types' -require 'net/http' -require 'cgi' - -module Multipart #:nodoc: - # From: http://deftcode.com/code/flickr_upload/multipartpost.rb - ## Helper class to prepare an HTTP POST request with a file upload - ## Mostly taken from - #http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/113774 - ### WAS: - ## Anything that's broken and wrong probably the fault of Bill Stilwell - ##(bill@marginalia.org) - ### NOW: - ## Everything wrong is due to keith@oreilly.com - - class Param #:nodoc: - attr_accessor :k, :v - def initialize(k, v) - @k = k - @v = v - end - - def to_multipart - "Content-Disposition: form-data; name=\"#{k}\"\r\n\r\n#{v}\r\n" - end - end - - class FileParam #:nodoc: - attr_accessor :k, :filename, :content - def initialize(k, filename, content) - @k = k - @filename = filename - @content = content - end - - def to_multipart - "Content-Disposition: form-data; name=\"#{k}\"; filename=\"#{filename}\"\r\n" + - "Content-Transfer-Encoding: binary\r\n" + - "Content-Type: #{MIME::Types.type_for(@filename)}\r\n\r\n" + - @content + "\r\n" - end - end - - class MultipartPost #:nodoc: - BOUNDARY = 'campfire-is-awesome' - HEADER = {"Content-type" => "multipart/form-data, boundary=" + BOUNDARY + " "} - TIMEOUT_SECONDS = 30 - - attr_accessor :params, :query, :headers - def initialize(params) - @params = params - @query = {} - self.prepare_query - end - - def prepare_query() - @query = @params.map do |k,v| - param = v.respond_to?(:read) ? FileParam.new(k, v.path, v.read) : Param.new(k, v) - "--#{BOUNDARY}\r\n#{param.to_multipart}" - end.join("") + "--#{BOUNDARY}--" - end - end -end diff --git a/vendor/tinder-1.3.1/lib/tinder/room.rb b/vendor/tinder-1.3.1/lib/tinder/room.rb deleted file mode 100644 index f86da59cc..000000000 --- a/vendor/tinder-1.3.1/lib/tinder/room.rb +++ /dev/null @@ -1,205 +0,0 @@ -module Tinder - # A campfire room - class Room - attr_reader :id, :name - - def initialize(campfire, attributes = {}) - @campfire = campfire - @id = attributes['id'] - @name = attributes['name'] - @loaded = false - end - - # Join the room. Pass +true+ to join even if you've already joined. - def join(force = false) - post 'join' - end - - # Leave a room - def leave - post 'leave' - end - - # Toggle guest access on or off - def toggle_guest_access - raise NotImplementedError - end - - # Get the url for guest access - def guest_url - if guest_access_enabled? - "http://#{@campfire.subdomain}.campfirenow.com/#{guest_invite_code}" - else - nil - end - end - - def guest_access_enabled? - load - @open_to_guests ? true : false - end - - # The invite code use for guest - def guest_invite_code - load - @active_token_value - end - - # Change the name of the room - def name=(name) - connection.post("/room/#{@id}.json", :body => { :room => { :name => name } }) - end - alias_method :rename, :name= - - # Change the topic - def topic=(topic) - connection.post("/room/#{@id}.json", :body => { :room => { :topic => name } }) - end - - # Get the current topic - def topic - load - @topic - end - - # Lock the room to prevent new users from entering and to disable logging - def lock - post :lock - end - - # Unlock the room - def unlock - post :unlock - end - - def ping(force = false) - raise NotImplementedError - end - - def destroy - raise NotImplementedError - end - - # Post a new message to the chat room - def speak(message, options = {}) - send_message(message) - end - - def paste(message) - send_message(message, 'PasteMessage') - end - - # Get the list of users currently chatting for this room - def users - reload! - @users - end - - # Get and array of the messages that have been posted to the room. Each - # messages is a hash with: - # * +:person+: the display name of the person that posted the message - # * +:message+: the body of the message - # * +:user_id+: Campfire user id - # * +:id+: Campfire message id - # - # room.listen - # #=> [{:person=>"Brandon", :message=>"I'm getting very sleepy", :user_id=>"148583", :id=>"16434003"}] - # - # Called without a block, listen will return an array of messages that have been - # posted since you joined. listen also takes an optional block, which then polls - # for new messages every 5 seconds and calls the block for each message. - # - # room.listen do |m| - # room.speak "#{m[:person]}, Go away!" if m[:message] =~ /Java/i - # end - # - def listen(interval = 5) - require 'yajl/http_stream' - - auth = connection.default_options[:basic_auth] - url = URI.parse("http://#{auth[:username]}:#{auth[:password]}@streaming.#{Campfire::HOST}/room/#{@id}/live.json") - Yajl::HttpStream.get(url) do |message| - { :id => message['id'], - :user_id => message['user_id'], - :message => message['body'] } - end - end - - # Get the dates for the available transcripts for this room - def available_transcripts - raise NotImplementedError - end - - # Get the transcript for the given date (Returns a hash in the same format as #listen) - # - # room.transcript(room.available_transcripts.first) - # #=> [{:message=>"foobar!", - # :user_id=>"99999", - # :person=>"Brandon", - # :id=>"18659245", - # :timestamp=>=>Tue May 05 07:15:00 -0700 2009}] - # - # The timestamp slot will typically have a granularity of five minutes. - # - def transcript(transcript_date) - url = "/room/#{@id}/transcript/#{transcript_date.to_date.strftime('%Y/%m/%d')}.json" - connection.get(url)['messages'].map do |room| - { :id => room['id'], - :user_id => room['user_id'], - :message => room['body'], - :timestamp => Time.parse(room['created_at']) } - end - end - - def upload(filename) - File.open(filename, "rb") do |file| - params = Multipart::MultipartPost.new('upload' => file) - connection.post("/room/#{@id}/uploads.json", :body => params.query) - end - end - - # Get the list of latest files for this room - def files(count = 5) - connection.get(room_url_for(:uploads))['uploads'].map { |u| u['full_url'] } - end - - protected - def load - reload! unless @loaded - end - - def reload! - attributes = connection.get("/room/#{@id}.json")['room'] - - @id = attributes['id'] - @name = attributes['name'] - @topic = attributes['topic'] - @full = attributes['full'] - @open_to_guests = attributes['open-to-guests'] - @active_token_value = attributes['active-token-value'] - @users = attributes['users'].map { |u| u['name'] } - - @loaded = true - end - - def send_message(message, type = 'Textmessage') - post 'speak', :body => {:message => {:body => message, :type => type}}.to_json - end - - def get(action, options = {}) - connection.get(room_url_for(action), options) - end - - def post(action, options = {}) - connection.post(room_url_for(action), options) - end - - def room_url_for(action) - "/room/#{@id}/#{action}.json" - end - - def connection - @campfire.connection - end - end -end diff --git a/vendor/tinder-1.3.1/site/index.html b/vendor/tinder-1.3.1/site/index.html deleted file mode 100644 index 783f63bda..000000000 --- a/vendor/tinder-1.3.1/site/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - Tinder - - - - - - - - -
- - -
-
- -
-

Tinder is an API for interfacing with Campfire, the 37Signals chat application.

-

Example

- -
campfire = Tinder::Campfire.new 'mysubdomain'
-campfire.login 'myemail@example.com', 'mypassword'
- -

Create, find and destroy rooms

-
room = campfire.create_room 'New Room', 'My new campfire room to test tinder'
-room = campfire.find_room_by_name 'Other Room'
-room.destroy
- -

Speak and Paste

-
room.speak 'Hello world!'
-room.paste File.read("path/to/your/file.txt")
- -

Listening

-
room.listen
-#=> [{:person=>"Brandon", :message=>"I'm getting very sleepy", :user_id=>"148583", :id=>"16434003"}]
-
-# or in block form
-room.listen do |m|
-  room.speak 'Welcome!' if m[:message] == /hello/
-end
- -

Guest Access

-
room.toggle_guest_access
-room.guest_url         #=> http://mysubdomain.campfirenow.com/11111
-room.guest_invite_code #=> 11111
- -

Change the name and topic

-
room.name = 'Tinder Demo'
-room.topic = 'Showing how to change the room name and topic with tinder…'
- -

Users

-
room.users
-campfire.users # users in all rooms
- -

Transcripts

-
transcript = room.transcript(room.available_transcripts.first)
-#=> [{:message=>"foobar!", :user_id=>"99999", :person=>"Brandon", :id=>"18659245", :timestamp=>Tue May 05 07:15:00 -0700 2009}]
-
- -

See the API documentation for more details.

- -

Installation

- -

Tinder can be installed as a gem or a Rails plugin. Install the gem by executing:

- -
gem install tinder
- -

Or, download it from RubyForge.

- -

Source

- -

Contributions are welcome and appreciated! The source is available from:

- -
http://github.com/collectiveidea/tinder
-
-
- - - - diff --git a/vendor/tinder-1.3.1/site/stylesheets/style.css b/vendor/tinder-1.3.1/site/stylesheets/style.css deleted file mode 100644 index b40900c79..000000000 --- a/vendor/tinder-1.3.1/site/stylesheets/style.css +++ /dev/null @@ -1,77 +0,0 @@ -body { - font-family: "Lucida Grande", Helvetica, Arial, sans-serif; - font-size: 76%; - background: #2A2A2A; - margin: 0; - padding: 0; -} - -#collectiveidea { - border-bottom: 1px solid #444; -} - -a { - color: #2D5385; -} - -#main { - background-color: #FFF; - width: 700px; - margin: 0 auto; - border: 5px #CCC; - border-left-style: solid; - border-right-style: solid; - padding: 0 1em; -} - -#header { - position: relative; - border-bottom: 1px solid #999; - padding: 1em; -} - -#header h1 { - margin: 0; - padding: 0; - color: #2D5385; -} - -#header h1 a { - text-decoration: none; -} - -#header p { - margin: 0; - padding: 0; - font-size: 0.8em; - color: #999; -} - -#nav { - list-style: none; - position: absolute; - right: 0; - top: 0.6em; -} -#nav li { - display: inline; - padding: 0 0.5em; -} - -#content { - padding: 1em 0; -} - -dl { - background-color: #DDD; - padding: 1em; - border: 1px solid #CCC; -} -dl .pronunciation { - color: #C00; -} -dl .description { - text-transform: uppercase; - font-size: 0.8em; - font-family: fixed; -} diff --git a/vendor/tinder-1.3.1/spec/campfire_spec.rb b/vendor/tinder-1.3.1/spec/campfire_spec.rb deleted file mode 100644 index 06b4a451c..000000000 --- a/vendor/tinder-1.3.1/spec/campfire_spec.rb +++ /dev/null @@ -1,225 +0,0 @@ -require 'spec_helper' - -describe "Preparing a campfire request" do - before do - @campfire = Tinder::Campfire.new("foobar") - @request = Net::HTTP::Get.new("does_not_matter") - end - - def prepare_request - @campfire.send(:prepare_request, @request) - end - - it "should return the request" do - prepare_request.should equal(@request) - end - - it "should set the cookie" do - @campfire.instance_variable_set("@cookie", "foobar") - prepare_request['Cookie'].should == 'foobar' - end - - it "should set the user agent" do - prepare_request['User-Agent'].should =~ /^Tinder/ - end -end - -# describe "Performing a campfire request" do -# -# before do -# @response = mock("response") -# Net::HTTP.any_instance.stubs(:request).returns(response) -# request = Net::HTTP::Get.new("does_not_matter") -# response.expects(:[]).with('set-cookie').and_return('foobar') -# @campfire.send(:perform_request) { request } -# end -# -# it "should set cookie" do -# @campfire.instance_variable_get("@cookie").should == 'foobar' -# end -# -# end - -describe "Verifying a 200 response" do - - before do - @campfire = Tinder::Campfire.new("foobar") - @response = mock("response") - @response.should_receive(:code).and_return(200) - end - - it "should return true when expecting success" do - @campfire.send(:verify_response, @response, :success).should equal(true) - end - - it "should return false when expecting a redirect" do - @campfire.send(:verify_response, @response, :redirect).should equal(false) - end - - it "should return false when expecting a redirect to a specific path" do - @campfire.send(:verify_response, @response, :redirect_to => '/foobar').should equal(false) - end - -end - -describe "Verifying a 302 response" do - - before do - @campfire = Tinder::Campfire.new("foobar") - @response = mock("response") - @response.should_receive(:code).and_return(302) - end - - it "should return true when expecting redirect" do - @campfire.send(:verify_response, @response, :redirect).should equal(true) - end - - it "should return false when expecting success" do - @campfire.send(:verify_response, @response, :success).should equal(false) - end - - it "should return true when expecting a redirect to a specific path" do - @response.should_receive(:[]).with('location').and_return("/foobar") - @campfire.send(:verify_response, @response, :redirect_to => '/foobar').should equal(true) - end - - it "should return false when redirecting to a different path than expected" do - @response.should_receive(:[]).with('location').and_return("/baz") - @campfire.send(:verify_response, @response, :redirect_to => '/foobar').should equal(false) - end - -end - -describe "A failed login" do - - before do - @campfire = Tinder::Campfire.new 'foobar' - @response = mock("response") - @campfire.should_receive(:post).and_return(@response) - @response.should_receive(:code).and_return("302") - @response.should_receive(:[]).with("location").and_return("/login") - end - - it "should raise an error" do - lambda do - @campfire.login "doesn't", "matter" - end.should raise_error(Tinder::Error) - end - - it "should not set logged in status" do - @campfire.login 'foo', 'bar' rescue - @campfire.logged_in?.should equal(false) - end - -end - -describe "Accessing a room with guest access" do - - before do - @room_id = 123 - @campfire = Tinder::Campfire.new 'foobar' - @response = mock("response") - @campfire.stub!(:post).and_return(@response) - end - - it "should return a room for the public room" do - @response.should_receive(:code).and_return(302) - @response.should_receive(:[]).with("location").and_return("/rooms/#{@room_id}") - - room = @campfire.find_room_by_guest_hash "valid_hash", "John Doe" - room.should be_kind_of(Tinder::Room) - end - - it "should raise an error if given an invalid room hash" do - @response.should_receive(:code).and_return(500) - - room = @campfire.find_room_by_guest_hash "invalid_hash", "John Doe" - room.should be_nil - end - -end - -describe "Accessing a room" do - - before do - @request = mock("request") - @response = mock("response") - Net::HTTP.stub!(:new).and_return(@request) - @request.stub!(:use_ssl=) - @request.stub!(:request).and_return(@response) - @response.stub!(:[]).and_return(true) - end - - describe "when the room is full" do - - before do - @html = File.read(File.dirname(__FILE__) + '/html/full_lobby.html') - @response.stub!(:body).and_return(@html) - @campfire = Tinder::Campfire.new 'foobar' - end - - it "should return a room" do - @campfire.rooms.should_not be_empty - end - - it "should find a room by name" do - @campfire.find_room_by_name("Just Fishin").class.should == Tinder::Room - end - - end - - describe "when the room is not full" do - - before do - @html = File.read(File.dirname(__FILE__) + '/html/normal_lobby.html') - @response.stub!(:body).and_return(@html) - @campfire = Tinder::Campfire.new 'foobar' - end - - it "should return a room" do - @campfire.rooms.should_not be_empty - end - - it "should find a room by name" do - @campfire.find_room_by_name("Just Fishin").class.should == Tinder::Room - end - end - -end - -describe "Accessing a room's transcript" do - - before do - @room = Tinder::Room.new nil, 42 - @html = File.read(File.dirname(__FILE__) + '/html/transcript.html') - @response = mock("response") - @response.stub!(:body).and_return(@html) - @room.stub!(:get).with("room/42/transcript/2009/05/05"). - and_return(@response) - require 'time' - @transcript = @room.transcript(Time.parse("2009-05-05")) - end - - it "should return some messages" do - @transcript.should_not be_empty - end - - describe "the first message" do - # This is a timestamp message - it "should include a timestamp" do - @transcript.first[:timestamp].should == Time.parse("2009-05-05 09:35") - end - end - - describe "the second message" do - it "should include a timestamp" do - @transcript.second[:timestamp].should == Time.parse("2009-05-05 09:35") - end - end - - describe "when entering the room" do - it "a transcript message should include the person who entered" do - @transcript.second[:person].should == "Marcel" - end - end -end diff --git a/vendor/tinder-1.3.1/spec/html/full_lobby.html b/vendor/tinder-1.3.1/spec/html/full_lobby.html deleted file mode 100644 index dae95ea1a..000000000 --- a/vendor/tinder-1.3.1/spec/html/full_lobby.html +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - Chat rooms - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- -
-

- Create a new room - Chat rooms -

- -
- 4 people currently chatting - -
You're near your simultaneous chatter limit of 4. - Ask Billy Bob to upgrade the account. -
- -
-
- -
- - - - - - -
-

- Just Fishin -

- -
- - Full - Active 7 minutes ago -
-

Sargasm: Deriving far too much satisfaction from glibly berating another with sarcasm. - -Ex: "Oh, thanks a lot for drinking my last beer! No, it's my fault... if I wanted it for myself, I shouldn't have put it in the fridge!" -"Dude, don't have a sargasm

- - -
    -
  • - - Caribou Barbie - -
  • -
  • - - git - -
  • -
  • - - Joe Sixpack - -
  • -
  • - - Billy Bob - -
  • -
- -
-
  
- -
-
- - - - -

 

- -
- -
 
- - -
- - -
-
- - - - \ No newline at end of file diff --git a/vendor/tinder-1.3.1/spec/html/normal_lobby.html b/vendor/tinder-1.3.1/spec/html/normal_lobby.html deleted file mode 100644 index 495b752d4..000000000 --- a/vendor/tinder-1.3.1/spec/html/normal_lobby.html +++ /dev/null @@ -1,192 +0,0 @@ - - - - - - Chat rooms - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- -
-

- Create a new room - Chat rooms -

- -
- 3 people currently chatting - -
You're near your simultaneous chatter limit of 4. - Ask Billy Bob to upgrade the account. -
- -
-
- -
- - - - - - -
-

- - Just Fishin -

- -
- Active 12 minutes ago -
-

Sargasm: Deriving far too much satisfaction from glibly berating another with sarcasm. - -Ex: "Oh, thanks a lot for drinking my last beer! No, it's my fault... if I wanted it for myself, I shouldn't have put it in the fridge!" -"Dude, don't have a sargasm

- - -
    -
  • - - Caribou Barbie - -
  • -
  • - - Joe Sixpack - -
  • -
  • - - Billy Bob - -
  • -
- -
-
  
- -
-
- - - - -

 

- -
- -
 
- - -
- - -
-
- - - - \ No newline at end of file diff --git a/vendor/tinder-1.3.1/spec/html/transcript.html b/vendor/tinder-1.3.1/spec/html/transcript.html deleted file mode 100644 index 044d67bac..000000000 --- a/vendor/tinder-1.3.1/spec/html/transcript.html +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - Campfire: Today, May 5 - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- -

Desk:Marcel — Today, May 5

- -

Yesterday, May 4

- - -
- - - - - - - - - - - - - - - - - - - - - - -
May 5
9:35 AM
Marcel
has entered the room
May 5
11:20 AM
Marcel
Hello World
- - - -

Yesterday, May 4

- -
- - -
-
 
-
- - - - -
-
-
-
-

Desk:Marcel

-
-
- -
-

People in this transcript

- -
    -
  • Marcel
  • -
-
- -
-
- -
-
- -
-
- - - - diff --git a/vendor/tinder-1.3.1/spec/spec.opts b/vendor/tinder-1.3.1/spec/spec.opts deleted file mode 100644 index 53607ea52..000000000 --- a/vendor/tinder-1.3.1/spec/spec.opts +++ /dev/null @@ -1 +0,0 @@ ---colour diff --git a/vendor/tinder-1.3.1/spec/spec_helper.rb b/vendor/tinder-1.3.1/spec/spec_helper.rb deleted file mode 100644 index 96a5dfdb3..000000000 --- a/vendor/tinder-1.3.1/spec/spec_helper.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'rubygems' -require 'spec' -require 'tinder' diff --git a/vendor/tinder-1.3.1/test/remote/credentials.rb.example b/vendor/tinder-1.3.1/test/remote/credentials.rb.example deleted file mode 100644 index 6a5e48164..000000000 --- a/vendor/tinder-1.3.1/test/remote/credentials.rb.example +++ /dev/null @@ -1,4 +0,0 @@ -# Rename to credentials.rb -SUBDOMAIN = 'test' -USER, PASS = 'user@example.com', 'secret' -SSL = false diff --git a/vendor/tinder-1.3.1/test/remote/remote_campfire_test.rb b/vendor/tinder-1.3.1/test/remote/remote_campfire_test.rb deleted file mode 100644 index 1c50e944e..000000000 --- a/vendor/tinder-1.3.1/test/remote/remote_campfire_test.rb +++ /dev/null @@ -1,59 +0,0 @@ -require 'test_helper' -require 'remote/credentials' - -class RemoteCampfireTest < Test::Unit::TestCase - - def setup - @subdomain = SUBDOMAIN - @user, @pass = USER, PASS - @ssl = SSL - raise "Set your campfire credentials in /test/remote/credentials.rb before running the remote tests" unless @user && @pass && @subdomain - @campfire = Tinder::Campfire.new @subdomain, :ssl => @ssl - end - - def test_ssl_required - if @ssl - campfire = Tinder::Campfire.new @subdomain - assert_raises(Tinder::SSLRequiredError) do - campfire.login(@user, @pass) - end - end - end - - def test_create_and_delete_room - assert login - assert @campfire.logged_in? - - room = @campfire.create_room("Testing#{Time.now.to_i}") - - assert_instance_of Tinder::Room, room - assert_not_nil room.id - - room.name = "new name" - assert_equal "new name", room.name - - room.destroy - assert_nil @campfire.find_room_by_name(room.name) - - assert @campfire.logout - ensure - room.destroy rescue nil - end - - def test_failed_login - assert_raises(Tinder::Error) { @campfire.login(@user, 'notmypassword') } - assert !@campfire.logged_in? - end - - def test_find_nonexistent_room - login - assert_nil @campfire.find_room_by_name('No Room Should Have This Name') - end - -private - - def login(user = @user, pass = @pass) - @campfire.login(user, pass) - end - -end diff --git a/vendor/tinder-1.3.1/test/test_helper.rb b/vendor/tinder-1.3.1/test/test_helper.rb deleted file mode 100644 index b04e5311d..000000000 --- a/vendor/tinder-1.3.1/test/test_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'test/unit' -require 'tinder' diff --git a/vendor/tinder-1.3.1/tinder.gemspec b/vendor/tinder-1.3.1/tinder.gemspec deleted file mode 100644 index b3c1b7e4b..000000000 --- a/vendor/tinder-1.3.1/tinder.gemspec +++ /dev/null @@ -1,79 +0,0 @@ -# Generated by jeweler -# DO NOT EDIT THIS FILE DIRECTLY -# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = %q{tinder} - s.version = "1.3.1" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Brandon Keepers"] - s.date = %q{2009-12-17} - s.description = %q{An API for interfacing with Campfire, the 37Signals chat application.} - s.email = %q{brandon@opensoul.org} - s.extra_rdoc_files = [ - "README.txt" - ] - s.files = [ - ".gitignore", - "CHANGELOG.txt", - "Manifest.txt", - "README.txt", - "Rakefile", - "VERSION", - "init.rb", - "lib/tinder.rb", - "lib/tinder/campfire.rb", - "lib/tinder/connection.rb", - "lib/tinder/multipart.rb", - "lib/tinder/room.rb", - "site/index.html", - "site/stylesheets/style.css", - "spec/campfire_spec.rb", - "spec/html/full_lobby.html", - "spec/html/normal_lobby.html", - "spec/html/transcript.html", - "spec/spec.opts", - "spec/spec_helper.rb", - "test/remote/credentials.rb.example", - "test/remote/remote_campfire_test.rb", - "test/test_helper.rb", - "tinder.gemspec" - ] - s.homepage = %q{http://github.com/collectiveidea/tinder} - s.rdoc_options = ["--charset=UTF-8"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{tinder} - s.rubygems_version = %q{1.3.5} - s.summary = %q{An (unofficial) Campfire API} - s.test_files = [ - "spec/campfire_spec.rb", - "spec/spec_helper.rb", - "test/remote/remote_campfire_test.rb", - "test/test_helper.rb" - ] - - if s.respond_to? :specification_version then - current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION - s.specification_version = 3 - - if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then - s.add_runtime_dependency(%q, [">= 0"]) - s.add_runtime_dependency(%q, [">= 0"]) - s.add_runtime_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - end -end - diff --git a/vendor/tmail-1.2.3.1/.require_paths b/vendor/tmail-1.2.3.1/.require_paths deleted file mode 100644 index 35b493f0b..000000000 --- a/vendor/tmail-1.2.3.1/.require_paths +++ /dev/null @@ -1,3 +0,0 @@ -lib -ext/tmailscanner -bin diff --git a/vendor/tmail-1.2.3.1/CHANGES b/vendor/tmail-1.2.3.1/CHANGES deleted file mode 100644 index e8597730d..000000000 --- a/vendor/tmail-1.2.3.1/CHANGES +++ /dev/null @@ -1,74 +0,0 @@ -=== 1.2.3.1 / 2008-04-11 - -* Closed #19429 - Installing TMail on Windows with the gem - -=== 1.2.3 / 2008-04-11 - -* Closed #18881 - TMail goes into an endless loop if sent an crafted email -* Closed #19203 - TMail errors in Ruby 1.9.1 on invalid multibyte chars. -* Closed #18814 - Fixed attchment.rb failing on mail part that had a nil content-type -* Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) (233) -* Applied patch #18515 to remove ftools from test case (Charles Lowe) (232) -* A lot of documentation patches to the mail and utils and net files. Also added "log/BugTrackingLog.txt" for myself as my bug log got clobbered by the new changelog.txt format. (231) - -=== 1.2.2 / 2008-03-07 - -* Fixed install bug with gem pacakge (1.2.1 was not compiling on gem install) -* A _LOT_ more documentation...! -* More documentation - (Mikel) -* Applied Ruby 1.9 patches to the library - All tests passing now - (Mikel) -* Closed #17719 - Fixed UNIXMbox code - readonly was not working and raising an exception. Now works. -* Closed #18038 - Multiple froms not being parsed correctly, added a test case to cover this and show the correct handling - (Mikel) - -=== 1.2.1 / 2008-01-11 - -* More documentation (Mikel) -* Added 15 test cases from the Rails ActionMailer to TMail -* Changed mailscanner to tmailscanner (mailscanner is copyrighted) -* Closed Bug - Handled quote boundary being gready on content-type header (M. Mondragon) -* Closed #16025 - Fixed scanner.rb so it passes same tests as scanner.c -* Closed #16283 - Handled incorrect decoding of attachments (M. Aoki - garyo) -* Closed #16899 - HeaderField.new_from_port and added test cases to cover this code (Maarten O.) -* Closed #16900 - UNIXMbox.fromaddr missing port param and does not return Envelope Sender (Maarten O.) - -=== 1.2.0 / 2007-11-29 - -* 5 major enhancements: - * Extensive documentation work. (mikel) - * Renamed scanner_c.c to mailscanner.c. (trans) - * Removed base64 c extension. It's speed benefit was negligable (only 0.2 sec over 10000 sizable encode/decode runs) (trans) - * Closed 15445 - TMail::Mail#create_forward now returns a new Mail object that has the original mail as an encoded 7 bit multipart attachment. Also moved create_forward and create_reply from tmail/net into tmail/interface as it makes more sense to have it there. (mikel) - * Closed 15643 - TMail::Mail#reply_addresses was returning an empty array if reply_to was set to nil (ie, the header field existed but was empty) instead of returning the from address or default. (mikel) - * Closed 16025 - TMail scanner.rb would not parse ATOM chars correctly making it fail tests where the C version passed them. Fixed this by updating the Scanner.rb version to be in step with the C version (there was an extra @ symbol in the ATOM CHARS definition that was not in the C version.) (mikel) - * Fixed scanner.rb so that it would pass the same tests that the C version does - had a sundry @ symbol inside of the ATOM CHARS -* 3 minor enhancements: - * Renamed scanner_c.c to tmailscanner.c (trans) - * Changed TMail::Mail#sender to have a default "default" value of nil to be in alignment with all the other interface methods (mikel) - * Made base64_decode and base64_encode into ! versions as they are destructive on the mail body (encodes the body to base64 or decodes it), made aliases for base64_decode and base64_encode to point back to the bang versions. Doing this with a view to change base64_encode to a non destructive version (returns the encoded body) in future versions. (mikel) - -=== 1.1.1 / 2007-11-05 - -* 3 major enhancement: - * Created unified package, for installation in any platform. - * Added require_arch.rb to facilitate multi-platform support. - * If compilation fails, set NORUBYEXT="true" and reinstall. -* 3 minor enhancement: - * Fixed line wrapping of long header fields so that they wrap at the correct whitespace points. - * Fixed bug where re-assigning the mail.body to existing mail object that already had a parsed body would not re-parse the body. - * Started documenting the source code... lots more to do. - -=== 1.1.0 / 2007-10-28 - -* 1 minor enhancements: - * Changed the quoting of paramaters in the header fields to wrap double quotes around fields that are needed to be quoted. - * Removed keeping double quotes around a filename that does not need double quotes per RFC 1521 - * More clean up and getting tests passing. Now standing at 2 failures out of 3366 assertions. One is the incorrect handling of "@"@test.com (returns @@test.com) and the other is a japanese encoding issue. - -=== 1.0.0 / 2007-10-28 - -* 1 major enhancement: - * TMail is now released as a GEM! -* 2 minor enhancements: - * Fixed bug 15077 - TMail now recognizes attachments as soon as they are added to the body. - * Refactored handling of quotations in header fields - now cleaner - diff --git a/vendor/tmail-1.2.3.1/LICENSE b/vendor/tmail-1.2.3.1/LICENSE deleted file mode 100644 index b4e758d16..000000000 --- a/vendor/tmail-1.2.3.1/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2001-2007 Minero Aoki -Changes Copyright (c) 2007 Mikel Lindsaar - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/tmail-1.2.3.1/MANIFEST b/vendor/tmail-1.2.3.1/MANIFEST deleted file mode 100644 index a25494f2f..000000000 --- a/vendor/tmail-1.2.3.1/MANIFEST +++ /dev/null @@ -1,191 +0,0 @@ -CHANGES -doc -ext -ext/Makefile -ext/tmailscanner -ext/tmailscanner/tmail -ext/tmailscanner/tmail/depend -ext/tmailscanner/tmail/extconf.rb -ext/tmailscanner/tmail/MANIFEST -ext/tmailscanner/tmail/tmailscanner.c -lib -lib/tmail -lib/tmail/address.rb -lib/tmail/attachments.rb -lib/tmail/base64.rb -lib/tmail/compat.rb -lib/tmail/config.rb -lib/tmail/core_extensions.rb -lib/tmail/encode.rb -lib/tmail/header.rb -lib/tmail/index.rb -lib/tmail/interface.rb -lib/tmail/loader.rb -lib/tmail/mail.rb -lib/tmail/mailbox.rb -lib/tmail/main.rb -lib/tmail/Makefile -lib/tmail/mbox.rb -lib/tmail/net.rb -lib/tmail/obsolete.rb -lib/tmail/parser.rb -lib/tmail/parser.y -lib/tmail/port.rb -lib/tmail/quoting.rb -lib/tmail/require_arch.rb -lib/tmail/scanner.rb -lib/tmail/scanner_r.rb -lib/tmail/stringio.rb -lib/tmail/utils.rb -lib/tmail/version.rb -lib/tmail.rb -LICENSE -log -log/BugTrackingLog.txt -log/Changelog.txt -log/fixme.rdoc -log/Fixme.txt -log/Testlog.txt -log/Todo.txt -meta -meta/MANIFEST -meta/project.yaml -meta/unixname -meta/VERSION -NOTES -Rakefile -README -sample -sample/bench_base64.rb -sample/data -sample/data/multipart -sample/data/normal -sample/data/sendtest -sample/data/simple -sample/data/test -sample/extract-attachements.rb -sample/from-check.rb -sample/multipart.rb -sample/parse-bench.rb -sample/parse-test.rb -sample/sendmail.rb -setup.rb -site -site/contributing -site/contributing/index.html -site/css -site/css/clean.css -site/css/layout.css -site/css/style.css -site/download -site/download/index.html -site/img -site/img/envelope.jpg -site/img/mailman.gif -site/img/stamp-sm.jpg -site/img/stamp.jpg -site/img/stampborder.jpg -site/img/tfire.jpg -site/img/tmail.png -site/index.html -site/js -site/js/jquery.js -site/log -site/log/changelog.xml -site/log/Changelog.xsl -site/outdated -site/outdated/BUGS -site/outdated/DEPENDS -site/outdated/doc.ja -site/outdated/doc.ja/address.html -site/outdated/doc.ja/basics.html -site/outdated/doc.ja/config.html -site/outdated/doc.ja/details.html -site/outdated/doc.ja/index.html -site/outdated/doc.ja/mail.html -site/outdated/doc.ja/mailbox.html -site/outdated/doc.ja/port.html -site/outdated/doc.ja/tmail.html -site/outdated/doc.ja/usage.html -site/outdated/Incompatibilities -site/outdated/Incompatibilities.ja -site/outdated/NEWS -site/outdated/rdd -site/outdated/rdd/address.rrd.m -site/outdated/rdd/basics.rd.m -site/outdated/rdd/config.rrd.m -site/outdated/rdd/details.rd.m -site/outdated/rdd/index.rhtml.m -site/outdated/rdd/mail.rrd.m -site/outdated/rdd/mailbox.rrd.m -site/outdated/rdd/port.rrd.m -site/outdated/rdd/tmail.rrd.m -site/outdated/rdd/usage.rd.m -site/outdated/README.ja -site/quickstart -site/quickstart/index.html -site/quickstart/quickstart.html -site/quickstart/usage.html -site/reference -site/reference/address.html -site/reference/config.html -site/reference/index.html -site/reference/mail.html -site/reference/mailbox.html -site/reference/port.html -site/reference/tmail.html -test -test/extctrl.rb -test/fixtures -test/fixtures/mailbox -test/fixtures/mailbox_without_any_from_or_sender -test/fixtures/mailbox_without_from -test/fixtures/mailbox_without_return_path -test/fixtures/raw_attack_email_with_zero_length_whitespace -test/fixtures/raw_base64_decoded_string -test/fixtures/raw_base64_email -test/fixtures/raw_base64_encoded_string -test/fixtures/raw_email -test/fixtures/raw_email10 -test/fixtures/raw_email11 -test/fixtures/raw_email12 -test/fixtures/raw_email13 -test/fixtures/raw_email2 -test/fixtures/raw_email3 -test/fixtures/raw_email4 -test/fixtures/raw_email5 -test/fixtures/raw_email6 -test/fixtures/raw_email7 -test/fixtures/raw_email8 -test/fixtures/raw_email9 -test/fixtures/raw_email_multiple_from -test/fixtures/raw_email_quoted_with_0d0a -test/fixtures/raw_email_reply -test/fixtures/raw_email_simple -test/fixtures/raw_email_with_bad_date -test/fixtures/raw_email_with_illegal_boundary -test/fixtures/raw_email_with_mimepart_without_content_type -test/fixtures/raw_email_with_multipart_mixed_quoted_boundary -test/fixtures/raw_email_with_nested_attachment -test/fixtures/raw_email_with_partially_quoted_subject -test/fixtures/raw_email_with_quoted_illegal_boundary -test/kcode.rb -test/temp_test_one.rb -test/test_address.rb -test/test_attachments.rb -test/test_base64.rb -test/test_encode.rb -test/test_header.rb -test/test_helper.rb -test/test_mail.rb -test/test_mbox.rb -test/test_port.rb -test/test_quote.rb -test/test_scanner.rb -test/test_utils.rb -work -work/script -work/script/make -work/script/rdoc -work/script/setup -work/script/test \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/NOTES b/vendor/tmail-1.2.3.1/NOTES deleted file mode 100644 index 6e1e73ba0..000000000 --- a/vendor/tmail-1.2.3.1/NOTES +++ /dev/null @@ -1,7 +0,0 @@ -[ANN] TMail 1.2.3.1 - Minor Fix to Installer - -This release just handles a bug with installing the gem on a Windows platform. - -It is otherwise identical to 1.2.3 - -Mikel diff --git a/vendor/tmail-1.2.3.1/README b/vendor/tmail-1.2.3.1/README deleted file mode 100644 index 7eba664f6..000000000 --- a/vendor/tmail-1.2.3.1/README +++ /dev/null @@ -1,169 +0,0 @@ -= TMail - - http://tmail.rubyforge.org/ - - Mikel Lindsaar maintainer - Trans assitant developer - Minero Aoki original developer - -== DESCRIPTION: - -TMail is a mail handling library for Ruby. It abstracts a mail message into a usable object allowing you to read, set, add and delete headers and the mail body. - -TMail is used by the Ruby on Rails web framework as the Email abstraction layer for their ActionMailer module. It is also used by the Nitro framework and many other applications on and off the web. - -The goal of the TMail handling library is to be able to parse and handle raw Email sources and produce RFC compliant Emails as a result. If you find something that TMail does that violates an RFC, we want to know and we'll get it fixed fast. - -== DOCUMENTATION: - -The place you will want to look first is the TMail::Mail class. This has the vast majority of methods you will be using to talk to your TMail object. - -== FEATURES/PROBLEMS: - -TMail is fairly RFC compliant on the handling of emails. - -There are also some problems in the header handling, but for 99.9% of email, you will be fine. Usually, the problems revolve around parsing incomming emails and making sense of them. - -I really welcome any examples of Emails that "didn't work" with TMail so I can use them as test cases. - -== SYNOPSIS: - -TMail is very easy to use. You simply require the library and then pass a raw email text message into the TMail::Mail.parse method. This returns a TMail::Mail object which you can now query and run methods against to modify, inspect or add to the Email. - -You can find almost all of the methods that you will use to talk to and update a TMail instance in the TMail::Mail class. I am constantly updating this code, with comments, added a fair bit and have a lot more to go!. - -=== Short Version: - - irb(main):001:0> require 'tmail' - irb(main):002:0> raw_email = File.open("my_raw_email", 'r') { |f| @mail = f.read } - irb(main):003:0> email = TMail::Mail.parse(raw_email) - irb(main):004:0> puts email['to'] - mikel@example.com - => nil - irb(main):005:0> email['to'] = 'mikel@somewhere.else.com' - => "mikel@somewhere.else.com" - irb(main):006:0> puts email['to'] - mikel@somewhere.else.com - => nil - -=== Longer Version: - -Assuming you have a single raw email in the variable my_message, you can do the following: - - require 'tmail' - email = TMail::Mail.parse(my_message) - -This will give you a TMail::Mail class containing your parsed message. There are other methods of opening emails through Ports. - -You can view this email by a simple puts: - - puts email - - Return-Path: - Date: Sun, 21 Oct 2007 19:38:13 +1000 - From: Mikel Lindsaar - To: mikel@somewhere.com - Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> - Subject: Testing Email - - Hello Mikel - -Easy right? - -=== Adding a header to the EMail: - -Say now that you have opened your message, you want to put in a Reply-To field. You do this like so: - - email['reply-to'] = "My Email Address " - -Is it really there? Well, find out with a puts: - - puts email - - Return-Path: - Date: Sun, 21 Oct 2007 19:38:13 +1000 - From: Mikel Lindsaar - Reply-To: My Email Address - To: mikel@somewhere.com - Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> - Subject: Testing Email - - Hello Mikel - -Yup looks good. - -=== Inspecting a header: - -You can then inspect your added header by doing: - - email['reply-to'] # => #"> - -If you just want to the actual value, not the AddressHeader object, pass to_s to this. - - email['reply-to'].to_s # => "My Email Address " - -=== Deleting a header: - -One way of deleting a header from an Email is just assigning it nil like so: - - email['reply-to'] = nil # => nil - -If you now puts the email again, it will not be included: - - puts email - - Return-Path: - Date: Sun, 21 Oct 2007 19:38:13 +1000 - From: Mikel Lindsaar - To: mikel@somewhere.com - Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> - Subject: Testing Email - - Hello Mikel - -=== Writing out an Email: - -You can just call to_s on any email to have it serialized out as a single string with the right number of line breaks and encodings. - -== CONTRIBUTING: - -You can visit the {Contributing to TMail}[link:http://tmail.rubyforge.org/contributing/] to find out how to contribute to TMail, developers are welcome and wanted! - -== REQUIREMENTS: - -* C compiler if you want the Ruby extension for Scanner -* Ruby 1.8 or later - -== INSTALLATION: - -* sudo gem install tmail - -Or manually, - -* sudo script/setup - -== LICENSE: - -(The MIT License) - -Copyright (c) 2007 FIX - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/vendor/tmail-1.2.3.1/ext/Makefile b/vendor/tmail-1.2.3.1/ext/Makefile deleted file mode 100644 index cac33a9af..000000000 --- a/vendor/tmail-1.2.3.1/ext/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# -# ext/tmail/Makefile -# - -.PHONY: tmailscanner clean distclean - -all: tmailscanner - -tmailscanner: tmailscanner/tmail/Makefile - cd tmailscanner/tmail; $(MAKE) - -tmailscanner/tmail/Makefile: tmailscanner/tmail/extconf.rb - cd tmailscanner/tmail; ruby extconf.rb - -clean: - cd tmailscanner/tmail; $(MAKE) clean - -distclean: - cd tmailscanner/tmail; $(MAKE) distclean - diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST deleted file mode 100644 index f839ffc61..000000000 --- a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/MANIFEST +++ /dev/null @@ -1,4 +0,0 @@ -MANIFEST -tmailscanner.c -extconf.rb -depend diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/Makefile b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/Makefile deleted file mode 100644 index e5278a216..000000000 --- a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/Makefile +++ /dev/null @@ -1,154 +0,0 @@ - -SHELL = /bin/sh - -#### Start of system configuration section. #### - -srcdir = . -topdir = /opt/local/lib/ruby/1.8/i686-darwin9.2.2 -hdrdir = $(topdir) -VPATH = $(srcdir):$(topdir):$(hdrdir) -prefix = $(DESTDIR)/opt/local -exec_prefix = $(prefix) -sitedir = $(prefix)/lib/ruby/site_ruby -rubylibdir = $(libdir)/ruby/$(ruby_version) -docdir = $(datarootdir)/doc/$(PACKAGE) -dvidir = $(docdir) -datarootdir = $(prefix)/share -archdir = $(rubylibdir)/$(arch) -sbindir = $(exec_prefix)/sbin -psdir = $(docdir) -vendordir = $(prefix)/lib/ruby/vendor_ruby -localedir = $(datarootdir)/locale -htmldir = $(docdir) -datadir = $(datarootdir) -includedir = $(prefix)/include -infodir = $(datarootdir)/info -sysconfdir = $(prefix)/etc -mandir = $(DESTDIR)/opt/local/share/man -libdir = $(exec_prefix)/lib -sharedstatedir = $(prefix)/com -oldincludedir = $(DESTDIR)/usr/include -pdfdir = $(docdir) -sitearchdir = $(sitelibdir)/$(sitearch) -vendorarchdir = $(vendorlibdir)/$(vendorarch) -bindir = $(exec_prefix)/bin -localstatedir = $(prefix)/var -vendorlibdir = $(vendordir)/$(ruby_version) -sitelibdir = $(sitedir)/$(ruby_version) -libexecdir = $(exec_prefix)/libexec - -CC = /usr/bin/gcc-4.0 -LIBRUBY = $(LIBRUBY_SO) -LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a -LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME) -LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static - -RUBY_EXTCONF_H = -CFLAGS = -fno-common -O2 -fno-common -pipe -fno-common -D_FILE_OFFSET_BITS=64 -INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) -CPPFLAGS = -I/opt/local/include -CXXFLAGS = $(CFLAGS) -DLDFLAGS = -L. -L/opt/local/lib -LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace -AR = ar -EXEEXT = - -RUBY_INSTALL_NAME = ruby -RUBY_SO_NAME = ruby -arch = i686-darwin9.2.2 -sitearch = i686-darwin9.2.2 -vendorarch = i686-darwin9.2.2 -ruby_version = 1.8 -ruby = /opt/local/bin/ruby -RUBY = $(ruby) -RM = rm -f -MAKEDIRS = mkdir -p -INSTALL = /usr/bin/install -INSTALL_PROG = $(INSTALL) -m 0755 -INSTALL_DATA = $(INSTALL) -m 644 -COPY = cp - -#### End of system configuration section. #### - -preload = - -libpath = . $(libdir) -LIBPATH = -L"." -L"$(libdir)" -DEFFILE = - -CLEANFILES = mkmf.log -DISTCLEANFILES = - -extout = -extout_prefix = -target_prefix = -LOCAL_LIBS = -LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc -SRCS = tmailscanner.c -OBJS = tmailscanner.o -TARGET = tmailscanner -DLLIB = $(TARGET).bundle -EXTSTATIC = -STATIC_LIB = - -RUBYCOMMONDIR = $(sitedir)$(target_prefix) -RUBYLIBDIR = /opt/local/lib/ruby/gems/1.8/gems/tmail-1.2.3.1/lib$(target_prefix) -RUBYARCHDIR = /opt/local/lib/ruby/gems/1.8/gems/tmail-1.2.3.1/lib$(target_prefix) - -TARGET_SO = $(DLLIB) -CLEANLIBS = $(TARGET).bundle $(TARGET).il? $(TARGET).tds $(TARGET).map -CLEANOBJS = *.o *.a *.s[ol] *.pdb *.exp *.bak - -all: $(DLLIB) -static: $(STATIC_LIB) - -clean: - @-$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) - -distclean: clean - @-$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log - @-$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES) - -realclean: distclean -install: install-so install-rb - -install-so: $(RUBYARCHDIR) -install-so: $(RUBYARCHDIR)/$(DLLIB) -$(RUBYARCHDIR)/$(DLLIB): $(DLLIB) - $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR) -install-rb: pre-install-rb install-rb-default -install-rb-default: pre-install-rb-default -pre-install-rb: Makefile -pre-install-rb-default: Makefile -$(RUBYARCHDIR): - $(MAKEDIRS) $@ - -site-install: site-install-so site-install-rb -site-install-so: install-so -site-install-rb: install-rb - -.SUFFIXES: .c .m .cc .cxx .cpp .C .o - -.cc.o: - $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< - -.cxx.o: - $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< - -.cpp.o: - $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< - -.C.o: - $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $< - -.c.o: - $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $< - -$(DLLIB): $(OBJS) - @-$(RM) $@ - $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS) - - - -### -tmailscanner.o: tmailscanner.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h Makefile diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/depend b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/depend deleted file mode 100644 index 4e238a6af..000000000 --- a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/depend +++ /dev/null @@ -1 +0,0 @@ -tmailscanner.o: tmailscanner.c $(hdrdir)/ruby.h $(topdir)/config.h $(hdrdir)/defines.h Makefile diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb deleted file mode 100644 index abdd0070b..000000000 --- a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/extconf.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'mkmf' -require 'rbconfig' - -extension_name = 'tmailscanner' - -windows = (/djgpp|(cyg|ms|bcc)win|mingw/ =~ RUBY_PLATFORM) - -# For now use pure Ruby tmailscanner if on Windows, since -# most Window's users don't have developer tools needed. - -if (ENV['NORUBYEXT'] == 'true' || windows) - if windows - File.open('make.bat', 'w') do |f| - f << 'echo Native extension will be omitted.' - end - File.open('nmake.bat', 'w') do |f| - f << 'echo Native extension will be omitted.' - end - end - File.open('Makefile', 'w') do |f| - f << "all:\n" - f << "install:\n" - end -else - #dir_config(extension_name) - if windows && ENV['make'].nil? - $LIBS += " msvcprt.lib" - else - $CFLAGS += " -D_FILE_OFFSET_BITS=64" #??? - end - create_makefile(extension_name) -end - diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.bundle b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.bundle deleted file mode 100755 index f3c89ebbb..000000000 Binary files a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.bundle and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c deleted file mode 100644 index 8ad40a030..000000000 --- a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.c +++ /dev/null @@ -1,583 +0,0 @@ -/* - - tmailscanner.c - - Copyright (c) 1998-2007 Minero Aoki - - This program is free software. - You can distribute/modify this program under the terms of - the GNU Lesser General Public License version 2.1. - -*/ - -#include -#ifdef __STDC__ -# include -#endif - -#include "ruby.h" -#include "re.h" - - -#define TMAIL_VERSION "1.2.3" - -static VALUE TMailScanner; -static VALUE ScanError; - -struct scanner -{ - char *pbeg; - char *p; - char *pend; - unsigned int flags; - VALUE comments; -}; - -#define MODE_MIME (1 << 0) -#define MODE_RECV (1 << 1) -#define MODE_ISO2022 (1 << 2) -#define MODE_DEBUG (1 << 4) - -#define MIME_MODE_P(s) ((s)->flags & MODE_MIME) -#define RECV_MODE_P(s) ((s)->flags & MODE_RECV) -#define ISO2022_MODE_P(s) ((s)->flags & MODE_ISO2022) - -#define GET_SCANNER(val, s) Data_Get_Struct(val, struct scanner, s) - - -static void -mails_free(sc) - struct scanner *sc; -{ - free(sc); -} - -#ifndef StringValue -# define StringValue(s) Check_Type(str, T_STRING); -#endif - -/* - * Document-method: mails_s_new - * - * Creates a new mail - * - */ -static VALUE -mails_s_new(klass, str, ident, cmt) - VALUE klass, str, ident, cmt; -{ - struct scanner *sc; - const char *tmp; - - sc = ALLOC_N(struct scanner, 1); - - StringValue(str); - sc->pbeg = RSTRING(str)->ptr; - sc->p = sc->pbeg; - sc->pend = sc->p + RSTRING(str)->len; - - sc->flags = 0; - Check_Type(ident, T_SYMBOL); - tmp = rb_id2name(SYM2ID(ident)); - if (strcmp(tmp, "RECEIVED") == 0) sc->flags |= MODE_RECV; - else if (strcmp(tmp, "CTYPE") == 0) sc->flags |= MODE_MIME; - else if (strcmp(tmp, "CENCODING") == 0) sc->flags |= MODE_MIME; - else if (strcmp(tmp, "CDISPOSITION") == 0) sc->flags |= MODE_MIME; - - tmp = rb_get_kcode(); - if (strcmp(tmp, "EUC") == 0 || strcmp(tmp, "SJIS") == 0) { - sc->flags |= MODE_ISO2022; - } - - sc->comments = Qnil; - if (! NIL_P(cmt)) { - Check_Type(cmt, T_ARRAY); - sc->comments = cmt; - } - - return Data_Wrap_Struct(TMailScanner, 0, mails_free, sc); -} - -/* - * Document-method: mails_debug_get - * - * TODO: Documentation needed - * - */ -static VALUE -mails_debug_get(self) - VALUE self; -{ - struct scanner *sc; - - GET_SCANNER(self, sc); - if (sc->flags & MODE_DEBUG) - return Qtrue; - else - return Qfalse; -} - -/* - * Document-method: mails_debug_set - * - * TODO: Documentation needed - * - */ -static VALUE -mails_debug_set(self, flag) - VALUE self, flag; -{ - struct scanner *sc; - - GET_SCANNER(self, sc); - if (RTEST(flag)) - sc->flags |= MODE_DEBUG; - else - sc->flags &= ~MODE_DEBUG; - return Qnil; -} - - -/* ----------------------------------------------------------------------- - scanning routines ----------------------------------------------------------------------- -*/ - -#define ESC '\033' -#define ATOM_SYMBOLS "_#!$%&'`*+-{|}~^/=?" -#define TOKEN_SYMBOLS "_#!$%&'`*+-{|}~^." -#define ATOM_SPECIAL "()<>[]@,;:\"\\." -#define TOKEN_SPECIAL "()<>[]@,;:\"\\/?=" -#define LWSP " \t\r\n" - -#define IS_ALPHA(ch) (('a' <= ch && ch <= 'z') || ('A' <= ch && ch <= 'Z')) -#define IS_UPPER(ch) ('A' <= ch && ch <= 'Z') -#define TO_LOWER(ch) (IS_UPPER(ch) ? ch + 32 : ch) -#define IS_LWSP(ch) (strchr(LWSP, ch)) -#define IS_DIGIT(ch) ('0' <= ch && ch <= '9') -#define IS_WORDCHAR(ch, symlist) \ - (IS_ALPHA(ch) || IS_DIGIT(ch) || strchr(symlist, ch)) -#define IS_ATOMCHAR(ch) IS_WORDCHAR(ch, ATOM_SYMBOLS) -#define IS_TOKENCHAR(ch) IS_WORDCHAR(ch, TOKEN_SYMBOLS) -#define IS_JCHAR(ch) ismbchar(ch) - - -/* I know this implement is ugly, but usually useful. */ - -/* skip until "\e(B" (us-ascii) */ -static void -skip_iso2022jp_string(sc) - struct scanner *sc; -{ - for (; sc->p < sc->pend; sc->p++) { - if (*sc->p == ESC) { - if (strncmp(sc->p, "\033(B", 3) == 0) { - sc->p += 3; - return; - } - } - } -} - -static void -skip_japanese_string(sc) - struct scanner *sc; -{ - while (sc->p < sc->pend) { - if (! ismbchar(*sc->p)) return; - sc->p += mbclen(*sc->p); - } -} - - -#define scan_atom(sc) scan_word(sc, ATOM_SYMBOLS) -#define scan_token(sc) scan_word(sc, TOKEN_SYMBOLS) - -static VALUE -scan_word(sc, syms) - struct scanner *sc; - char *syms; -{ - char *beg = sc->p; - - while (sc->p < sc->pend) { - if (ISO2022_MODE_P(sc) && *sc->p == ESC) { - skip_iso2022jp_string(sc); - } - else if (IS_JCHAR(*sc->p)) { - skip_japanese_string(sc); - } - else if (IS_WORDCHAR(*sc->p, syms)) { - sc->p++; - } - else { - break; - } - } - - return rb_str_new(beg, sc->p - beg); -} - - -#define BUFSIZE 256 - -static VALUE -scan_quoted_word(sc) - struct scanner *sc; -{ - char buf[BUFSIZE]; - char *p; - char *save; - VALUE result = rb_str_new("", 0); - - sc->p++; /* discard first dquote */ - p = buf; - while (sc->p < sc->pend) { - if (*sc->p == '"') { - sc->p++; /* discard terminal dquote */ - rb_str_cat(result, buf, p - buf); - return result; - } - if (ISO2022_MODE_P(sc) && *sc->p == ESC) { - save = sc->p; - skip_iso2022jp_string(sc); - while (save < sc->p) { - *p++ = *save++; - if (p >= buf + BUFSIZE) { - /* flush buffer */ - rb_str_cat(result, buf, BUFSIZE); - p = buf; - } - } - continue; - } - - if (*sc->p == '\\') - sc->p++; /* discard quoting backslash */ - *p++ = *sc->p++; - if (p >= buf + BUFSIZE) { - /* flush buffer */ - rb_str_cat(result, buf, BUFSIZE); - p = buf; - } - } - - rb_raise(ScanError, "unterminated quoted-word"); - return Qnil; -} - -static VALUE -scan_domain_literal(sc) - struct scanner *sc; -{ - char buf[BUFSIZE]; - char *p; - VALUE result = rb_str_new("", 0); - - p = buf; - while (sc->p < sc->pend) { - if (*sc->p == ']') { - *p++ = *sc->p++; - rb_str_cat(result, buf, p - buf); - return result; - } - - if (*sc->p == '\\') - sc->p++; /* discard backslash */ - *p++ = *sc->p++; - if (p >= buf + BUFSIZE) { - /* flush buffer */ - rb_str_cat(result, buf, BUFSIZE); - p = buf; - } - } - - rb_raise(ScanError, "unterminated domain literal"); - return Qnil; -} - - -static VALUE -scan_comment(sc) - struct scanner *sc; -{ - int nest = 1; - char *p; - VALUE ret = rb_str_new("", 0); - - sc->p++; - p = sc->p; - while (sc->p < sc->pend) { - if (ISO2022_MODE_P(sc) && *sc->p == ESC) { - skip_iso2022jp_string(sc); - } - else if (IS_JCHAR(*sc->p)) { - skip_japanese_string(sc); - } - else { - switch (*sc->p) { - case '(': - nest++; - break; - case ')': - nest--; - if (nest == 0) { - rb_str_cat(ret, p, sc->p - p); - sc->p++; - return ret; - } - break; - case '\\': - rb_str_cat(ret, p, sc->p - p); - sc->p++; - if (sc->p == sc->pend) - rb_raise(ScanError, "incomplete char quote"); - p = sc->p; - break; - default: - break; - } - sc->p++; - } - } - - rb_raise(ScanError, "unterminated comment"); - return Qnil; -} - - -static void -skip_lwsp(sc) - struct scanner *sc; -{ - while (sc->p < sc->pend) { - if (IS_LWSP(*sc->p)) sc->p++; - else break; - } -} - -static int -nccmp(a, b) - char *a, *b; -{ - while (*a && *b) { - if ((*a != *b) && (TO_LOWER(*a) != TO_LOWER(*b))) - return 0; - a++; b++; - } - return (*a == *b); -} - -static int -digit_p(str) - VALUE str; -{ - char *p; - int i; - - p = RSTRING(str)->ptr; - for (i = 0; i < RSTRING(str)->len; i++) { - if (! IS_DIGIT(RSTRING(str)->ptr[i])) - return 0; - } - return 1; -} - -static VALUE tok_atom, tok_digit, tok_token, tok_quoted, tok_domlit; -static VALUE tok_from, tok_by, tok_via, tok_with, tok_id, tok_for; - -static VALUE -atomsym(sc, str) - struct scanner *sc; - VALUE str; -{ - if (digit_p(str)) { - return tok_digit; - } - else if (RECV_MODE_P(sc)) { - char *p = RSTRING(str)->ptr; - if (nccmp(p, "from")) return tok_from; - else if (nccmp(p, "by")) return tok_by; - else if (nccmp(p, "via")) return tok_via; - else if (nccmp(p, "with")) return tok_with; - else if (nccmp(p, "id")) return tok_id; - else if (nccmp(p, "for")) return tok_for; - } - return tok_atom; -} - -static void -debug_print(sc, sym, val) - struct scanner *sc; - VALUE sym, val; -{ - VALUE s; - - s = rb_funcall(sym, rb_intern("inspect"), 0), - printf("%7ld %-10s token=<%s>\n", - (unsigned long)(sc->pend - sc->p), - RSTRING(s)->ptr, - RSTRING(val)->ptr); -} - -#define D(expr) do {\ - if (sc->flags & MODE_DEBUG) {expr;}\ -} while (0) - -static void -pass_token(sc, sym, tok, arr) - struct scanner *sc; - VALUE sym, tok, arr; -{ - D(debug_print(sc, sym, tok)); - rb_ary_store(arr, 0, sym); - rb_ary_store(arr, 1, tok); - rb_yield(arr); -} - -/* - * Document-method: mails_scan - * - * TODO: Documentation needed - * - */ -static VALUE -mails_scan(self) - VALUE self; -{ - struct scanner *sc; - VALUE arr; - -#define PASS(s,v) pass_token(sc,s,v,arr) - GET_SCANNER(self, sc); - if (!sc->p) { - rb_raise(ScanError, "Mails#scan called before reset"); - } - arr = rb_assoc_new(Qnil, Qnil); - - while (sc->p < sc->pend) { - D(puts("new loop")); - D(printf("char='%c'\n", *sc->p)); - if (IS_LWSP(*sc->p)) { - D(puts("lwsp")); - skip_lwsp(sc); - if (sc->p >= sc->pend) - break; - } - - if (MIME_MODE_P(sc)) { - if (IS_TOKENCHAR(*sc->p) || - (ISO2022_MODE_P(sc) && (*sc->p == ESC)) || - IS_JCHAR(*sc->p)) { - D(puts("token")); - PASS(tok_token, scan_token(sc)); - continue; - } - } - else { - if (IS_ATOMCHAR(*sc->p) || - (ISO2022_MODE_P(sc) && (*sc->p == ESC)) || - IS_JCHAR(*sc->p)) { - VALUE tmp; - D(puts("atom")); - tmp = scan_atom(sc); - PASS(atomsym(sc, tmp), tmp); - continue; - } - } - - if (*sc->p == '"') { - D(puts("quoted")); - PASS(tok_quoted, scan_quoted_word(sc)); - D(puts("quoted")); - } - else if (*sc->p == '(') { - VALUE c; - D(puts("comment")); - c = scan_comment(sc); - if (! NIL_P(sc->comments)) - rb_ary_push(sc->comments, c); - } - else if (*sc->p == '[') { - D(puts("domlit")); - PASS(tok_domlit, scan_domain_literal(sc)); - } - else { - VALUE ch; - D(puts("char")); - ch = rb_str_new(sc->p, 1); - sc->p++; - PASS(ch, ch); - } - } - - PASS(Qfalse, rb_str_new("$", 1)); - return Qnil; -} - - -/* ------------------------------------------------------------------- - ruby interface ------------------------------------------------------------------- -*/ - -static VALUE -cstr2symbol(str) - char *str; -{ - ID tmp; - - tmp = rb_intern(str); -#ifdef ID2SYM - return ID2SYM(tmp); -#else - return INT2FIX(tmp); -#endif -} - -void -Init_tmailscanner() -{ - VALUE TMail; - VALUE tmp; - - if (rb_const_defined(rb_cObject, rb_intern("TMail"))) { - TMail = rb_const_get(rb_cObject, rb_intern("TMail")); - } - else { - TMail = rb_define_module("TMail"); - } - TMailScanner = rb_define_class_under(TMail, "TMailScanner", rb_cObject); - - tmp = rb_str_new2(TMAIL_VERSION); - rb_obj_freeze(tmp); - rb_define_const(TMailScanner, "Version", tmp); - - rb_define_singleton_method(TMailScanner, "new", mails_s_new, 3); - rb_define_method(TMailScanner, "scan", mails_scan, 0); - rb_define_method(TMailScanner, "debug", mails_debug_get, 0); - rb_define_method(TMailScanner, "debug=", mails_debug_set, 1); - - if (rb_const_defined(TMail, rb_intern("SyntaxError"))) { - ScanError = rb_const_get(rb_cObject, rb_intern("SyntaxError")); - } - else { - ScanError = rb_define_class_under(TMail, "SyntaxError", rb_eStandardError); - } - - tok_atom = cstr2symbol("ATOM"); - tok_digit = cstr2symbol("DIGIT"); - tok_token = cstr2symbol("TOKEN"); - tok_quoted = cstr2symbol("QUOTED"); - tok_domlit = cstr2symbol("DOMLIT"); - - tok_from = cstr2symbol("FROM"); - tok_by = cstr2symbol("BY"); - tok_via = cstr2symbol("VIA"); - tok_with = cstr2symbol("WITH"); - tok_id = cstr2symbol("ID"); - tok_for = cstr2symbol("FOR"); -} - diff --git a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.o b/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.o deleted file mode 100644 index fb308bef6..000000000 Binary files a/vendor/tmail-1.2.3.1/ext/tmailscanner/tmail/tmailscanner.o and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/lib/tmail.rb b/vendor/tmail-1.2.3.1/lib/tmail.rb deleted file mode 100644 index 18003659a..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'tmail/version' -require 'tmail/mail' -require 'tmail/mailbox' -require 'tmail/core_extensions' -require 'tmail/net' diff --git a/vendor/tmail-1.2.3.1/lib/tmail/Makefile b/vendor/tmail-1.2.3.1/lib/tmail/Makefile deleted file mode 100644 index 8688b7fc4..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# lib/tmail/Makefile -# - -debug: - rm -f parser.rb - make parser.rb DEBUG=true - -parser.rb: parser.y - if [ "$(DEBUG)" = true ]; then \ - racc -v -g -o$@ parser.y ;\ - else \ - racc -E -o$@ parser.y ;\ - fi - -clean: - rm -f parser.rb parser.output - -distclean: clean diff --git a/vendor/tmail-1.2.3.1/lib/tmail/address.rb b/vendor/tmail-1.2.3.1/lib/tmail/address.rb deleted file mode 100644 index fa8e5bcd8..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/address.rb +++ /dev/null @@ -1,426 +0,0 @@ -=begin rdoc - -= Address handling class - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -require 'tmail/encode' -require 'tmail/parser' - - -module TMail - - # = Class Address - # - # Provides a complete handling library for email addresses. Can parse a string of an - # address directly or take in preformatted addresses themseleves. Allows you to add - # and remove phrases from the front of the address and provides a compare function for - # email addresses. - # - # == Parsing and Handling a Valid Address: - # - # Just pass the email address in as a string to Address.parse: - # - # email = TMail::Address.parse('Mikel Lindsaar ) - # #=> # - # email.address - # #=> "mikel@lindsaar.net" - # email.local - # #=> "mikel" - # email.domain - # #=> "lindsaar.net" - # email.name # Aliased as phrase as well - # #=> "Mikel Lindsaar" - # - # == Detecting an Invalid Address - # - # If you want to check the syntactical validity of an email address, just pass it to - # Address.parse and catch any SyntaxError: - # - # begin - # TMail::Mail.parse("mikel 2@@@@@ me .com") - # rescue TMail::SyntaxError - # puts("Invalid Email Address Detected") - # else - # puts("Address is valid") - # end - # #=> "Invalid Email Address Detected" - class Address - - include TextUtils #:nodoc: - - # Sometimes you need to parse an address, TMail can do it for you and provide you with - # a fairly robust method of detecting a valid address. - # - # Takes in a string, returns a TMail::Address object. - # - # Raises a TMail::SyntaxError on invalid email format - def Address.parse( str ) - Parser.parse :ADDRESS, special_quote_address(str) - end - - def Address.special_quote_address(str) #:nodoc: - # Takes a string which is an address and adds quotation marks to special - # edge case methods that the RACC parser can not handle. - # - # Right now just handles two edge cases: - # - # Full stop as the last character of the display name: - # Mikel L. - # Returns: - # "Mikel L." - # - # Unquoted @ symbol in the display name: - # mikel@me.com - # Returns: - # "mikel@me.com" - # - # Any other address not matching these patterns just gets returned as is. - case - # This handles the missing "" in an older version of Apple Mail.app - # around the display name when the display name contains a '@' - # like 'mikel@me.com ' - # Just quotes it to: '"mikel@me.com" ' - when str =~ /\A([^"].+@.+[^"])\s(<.*?>)\Z/ - return "\"#{$1}\" #{$2}" - # This handles cases where 'Mikel A. ' which is a trailing - # full stop before the address section. Just quotes it to - # '"Mikel A. " - when str =~ /\A(.*?\.)\s(<.*?>)\Z/ - return "\"#{$1}\" #{$2}" - else - str - end - end - - def address_group? #:nodoc: - false - end - - # Address.new(local, domain) - # - # Accepts: - # - # * local - Left of the at symbol - # - # * domain - Array of the domain split at the periods. - # - # For example: - # - # Address.new("mikel", ["lindsaar", "net"]) - # #=> "#" - def initialize( local, domain ) - if domain - domain.each do |s| - raise SyntaxError, 'empty word in domain' if s.empty? - end - end - - # This is to catch an unquoted "@" symbol in the local part of the - # address. Handles addresses like <"@"@me.com> and makes sure they - # stay like <"@"@me.com> (previously were becomming <@@me.com>) - if local && (local.join == '@' || local.join =~ /\A[^"].*?@.*?[^"]\Z/) - @local = "\"#{local.join}\"" - else - @local = local - end - - @domain = domain - @name = nil - @routes = [] - end - - # Provides the name or 'phrase' of the email address. - # - # For Example: - # - # email = TMail::Address.parse("Mikel Lindsaar ") - # email.name - # #=> "Mikel Lindsaar" - def name - @name - end - - # Setter method for the name or phrase of the email - # - # For Example: - # - # email = TMail::Address.parse("mikel@lindsaar.net") - # email.name - # #=> nil - # email.name = "Mikel Lindsaar" - # email.to_s - # #=> "Mikel Lindsaar " - def name=( str ) - @name = str - @name = nil if str and str.empty? - end - - #:stopdoc: - alias phrase name - alias phrase= name= - #:startdoc: - - # This is still here from RFC 822, and is now obsolete per RFC2822 Section 4. - # - # "When interpreting addresses, the route portion SHOULD be ignored." - # - # It is still here, so you can access it. - # - # Routes return the route portion at the front of the email address, if any. - # - # For Example: - # email = TMail::Address.parse( "<@sa,@another:Mikel@me.com>") - # => # - # email.to_s - # => "<@sa,@another:Mikel@me.com>" - # email.routes - # => ["sa", "another"] - def routes - @routes - end - - def inspect #:nodoc: - "#<#{self.class} #{address()}>" - end - - # Returns the local part of the email address - # - # For Example: - # - # email = TMail::Address.parse("mikel@lindsaar.net") - # email.local - # #=> "mikel" - def local - return nil unless @local - return '""' if @local.size == 1 and @local[0].empty? - # Check to see if it is an array before trying to map it - if @local.respond_to?(:map) - @local.map {|i| quote_atom(i) }.join('.') - else - quote_atom(@local) - end - end - - # Returns the domain part of the email address - # - # For Example: - # - # email = TMail::Address.parse("mikel@lindsaar.net") - # email.local - # #=> "lindsaar.net" - def domain - return nil unless @domain - join_domain(@domain) - end - - # Returns the full specific address itself - # - # For Example: - # - # email = TMail::Address.parse("mikel@lindsaar.net") - # email.address - # #=> "mikel@lindsaar.net" - def spec - s = self.local - d = self.domain - if s and d - s + '@' + d - else - s - end - end - - alias address spec - - # Provides == function to the email. Only checks the actual address - # and ignores the name/phrase component - # - # For Example - # - # addr1 = TMail::Address.parse("My Address ") - # #=> "#" - # addr2 = TMail::Address.parse("Another ") - # #=> "#" - # addr1 == addr2 - # #=> true - def ==( other ) - other.respond_to? :spec and self.spec == other.spec - end - - alias eql? == - - # Provides a unique hash value for this record against the local and domain - # parts, ignores the name/phrase value - # - # email = TMail::Address.parse("mikel@lindsaar.net") - # email.hash - # #=> 18767598 - def hash - @local.hash ^ @domain.hash - end - - # Duplicates a TMail::Address object returning the duplicate - # - # addr1 = TMail::Address.parse("mikel@lindsaar.net") - # addr2 = addr1.dup - # addr1.id == addr2.id - # #=> false - def dup - obj = self.class.new(@local.dup, @domain.dup) - obj.name = @name.dup if @name - obj.routes.replace @routes - obj - end - - include StrategyInterface #:nodoc: - - def accept( strategy, dummy1 = nil, dummy2 = nil ) #:nodoc: - unless @local - strategy.meta '<>' # empty return-path - return - end - - spec_p = (not @name and @routes.empty?) - if @name - strategy.phrase @name - strategy.space - end - tmp = spec_p ? '' : '<' - unless @routes.empty? - tmp << @routes.map {|i| '@' + i }.join(',') << ':' - end - tmp << self.spec - tmp << '>' unless spec_p - strategy.meta tmp - strategy.lwsp '' - end - - end - - - class AddressGroup - - include Enumerable - - def address_group? - true - end - - def initialize( name, addrs ) - @name = name - @addresses = addrs - end - - attr_reader :name - - def ==( other ) - other.respond_to? :to_a and @addresses == other.to_a - end - - alias eql? == - - def hash - map {|i| i.hash }.hash - end - - def []( idx ) - @addresses[idx] - end - - def size - @addresses.size - end - - def empty? - @addresses.empty? - end - - def each( &block ) - @addresses.each(&block) - end - - def to_a - @addresses.dup - end - - alias to_ary to_a - - def include?( a ) - @addresses.include? a - end - - def flatten - set = [] - @addresses.each do |a| - if a.respond_to? :flatten - set.concat a.flatten - else - set.push a - end - end - set - end - - def each_address( &block ) - flatten.each(&block) - end - - def add( a ) - @addresses.push a - end - - alias push add - - def delete( a ) - @addresses.delete a - end - - include StrategyInterface - - def accept( strategy, dummy1 = nil, dummy2 = nil ) - strategy.phrase @name - strategy.meta ':' - strategy.space - first = true - each do |mbox| - if first - first = false - else - strategy.meta ',' - end - strategy.space - mbox.accept strategy - end - strategy.meta ';' - strategy.lwsp '' - end - - end - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/attachments.rb b/vendor/tmail-1.2.3.1/lib/tmail/attachments.rb deleted file mode 100644 index 5dc5efae5..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/attachments.rb +++ /dev/null @@ -1,46 +0,0 @@ -=begin rdoc - -= Attachment handling file - -=end - -require 'stringio' - -module TMail - class Attachment < StringIO - attr_accessor :original_filename, :content_type - end - - class Mail - def has_attachments? - multipart? && parts.any? { |part| attachment?(part) } - end - - def attachment?(part) - part.disposition_is_attachment? || part.content_type_is_text? - end - - def attachments - if multipart? - parts.collect { |part| - if part.multipart? - part.attachments - elsif attachment?(part) - content = part.body # unquoted automatically by TMail#body - file_name = (part['content-location'] && - part['content-location'].body) || - part.sub_header("content-type", "name") || - part.sub_header("content-disposition", "filename") - - next if file_name.blank? || content.blank? - - attachment = Attachment.new(content) - attachment.original_filename = file_name.strip - attachment.content_type = part.content_type - attachment - end - }.flatten.compact - end - end - end -end diff --git a/vendor/tmail-1.2.3.1/lib/tmail/base64.rb b/vendor/tmail-1.2.3.1/lib/tmail/base64.rb deleted file mode 100644 index e294c6296..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/base64.rb +++ /dev/null @@ -1,46 +0,0 @@ -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -module TMail - module Base64 - - module_function - - def folding_encode( str, eol = "\n", limit = 60 ) - [str].pack('m') - end - - def encode( str ) - [str].pack('m').tr( "\r\n", '' ) - end - - def decode( str, strict = false ) - str.unpack('m').first - end - - end -end -#:startdoc: diff --git a/vendor/tmail-1.2.3.1/lib/tmail/compat.rb b/vendor/tmail-1.2.3.1/lib/tmail/compat.rb deleted file mode 100644 index 1275df79a..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/compat.rb +++ /dev/null @@ -1,41 +0,0 @@ -#:stopdoc: -unless Enumerable.method_defined?(:map) - module Enumerable #:nodoc: - alias map collect - end -end - -unless Enumerable.method_defined?(:select) - module Enumerable #:nodoc: - alias select find_all - end -end - -unless Enumerable.method_defined?(:reject) - module Enumerable #:nodoc: - def reject - result = [] - each do |i| - result.push i unless yield(i) - end - result - end - end -end - -unless Enumerable.method_defined?(:sort_by) - module Enumerable #:nodoc: - def sort_by - map {|i| [yield(i), i] }.sort.map {|val, i| i } - end - end -end - -unless File.respond_to?(:read) - def File.read(fname) #:nodoc: - File.open(fname) {|f| - return f.read - } - end -end -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/config.rb b/vendor/tmail-1.2.3.1/lib/tmail/config.rb deleted file mode 100644 index 3a876dcdb..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/config.rb +++ /dev/null @@ -1,67 +0,0 @@ -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -module TMail - - class Config - - def initialize( strict ) - @strict_parse = strict - @strict_base64decode = strict - end - - def strict_parse? - @strict_parse - end - - attr_writer :strict_parse - - def strict_base64decode? - @strict_base64decode - end - - attr_writer :strict_base64decode - - def new_body_port( mail ) - StringPort.new - end - - alias new_preamble_port new_body_port - alias new_part_port new_body_port - - end - - DEFAULT_CONFIG = Config.new(false) - DEFAULT_STRICT_CONFIG = Config.new(true) - - def Config.to_config( arg ) - return DEFAULT_STRICT_CONFIG if arg == true - return DEFAULT_CONFIG if arg == false - arg or DEFAULT_CONFIG - end - -end -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/core_extensions.rb b/vendor/tmail-1.2.3.1/lib/tmail/core_extensions.rb deleted file mode 100644 index da62c33bb..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/core_extensions.rb +++ /dev/null @@ -1,63 +0,0 @@ -#:stopdoc: -unless Object.respond_to?(:blank?) - class Object - # Check first to see if we are in a Rails environment, no need to - # define these methods if we are - - # An object is blank if it's nil, empty, or a whitespace string. - # For example, "", " ", nil, [], and {} are blank. - # - # This simplifies - # if !address.nil? && !address.empty? - # to - # if !address.blank? - def blank? - if respond_to?(:empty?) && respond_to?(:strip) - empty? or strip.empty? - elsif respond_to?(:empty?) - empty? - else - !self - end - end - end - - class NilClass - def blank? - true - end - end - - class FalseClass - def blank? - true - end - end - - class TrueClass - def blank? - false - end - end - - class Array - alias_method :blank?, :empty? - end - - class Hash - alias_method :blank?, :empty? - end - - class String - def blank? - empty? || strip.empty? - end - end - - class Numeric - def blank? - false - end - end -end -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/encode.rb b/vendor/tmail-1.2.3.1/lib/tmail/encode.rb deleted file mode 100644 index 458dbbfe6..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/encode.rb +++ /dev/null @@ -1,581 +0,0 @@ -#-- -# = COPYRIGHT: -# -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -require 'nkf' -require 'tmail/base64' -require 'tmail/stringio' -require 'tmail/utils' -#:startdoc: - - -module TMail - - #:stopdoc: - class << self - attr_accessor :KCODE - end - self.KCODE = 'NONE' - - module StrategyInterface - - def create_dest( obj ) - case obj - when nil - StringOutput.new - when String - StringOutput.new(obj) - when IO, StringOutput - obj - else - raise TypeError, 'cannot handle this type of object for dest' - end - end - module_function :create_dest - - #:startdoc: - # Returns the TMail object encoded and ready to be sent via SMTP etc. - # You should call this before you are packaging up your email to - # correctly escape all the values that need escaping in the email, line - # wrap the email etc. - # - # It is also a good idea to call this before you marshal or serialize - # a TMail object. - # - # For Example: - # - # email = TMail::Load(my_email_file) - # email_to_send = email.encoded - def encoded( eol = "\r\n", charset = 'j', dest = nil ) - accept_strategy Encoder, eol, charset, dest - end - - # Returns the TMail object decoded and ready to be used by you, your - # program etc. - # - # You should call this before you are packaging up your email to - # correctly escape all the values that need escaping in the email, line - # wrap the email etc. - # - # For Example: - # - # email = TMail::Load(my_email_file) - # email_to_send = email.encoded - def decoded( eol = "\n", charset = 'e', dest = nil ) - # Turn the E-Mail into a string and return it with all - # encoded characters decoded. alias for to_s - accept_strategy Decoder, eol, charset, dest - end - - alias to_s decoded - - def accept_strategy( klass, eol, charset, dest = nil ) #:nodoc: - dest ||= '' - accept klass.new( create_dest(dest), charset, eol ) - dest - end - - end - - #:stopdoc: - - ### - ### MIME B encoding decoder - ### - - class Decoder - - include TextUtils - - encoded = '=\?(?:iso-2022-jp|euc-jp|shift_jis)\?[QB]\?[a-z0-9+/=]+\?=' - ENCODED_WORDS = /#{encoded}(?:\s+#{encoded})*/i - - OUTPUT_ENCODING = { - 'EUC' => 'e', - 'SJIS' => 's', - } - - def self.decode( str, encoding = nil ) - encoding ||= (OUTPUT_ENCODING[TMail.KCODE] || 'j') - opt = '-mS' + encoding - str.gsub(ENCODED_WORDS) {|s| NKF.nkf(opt, s) } - end - - def initialize( dest, encoding = nil, eol = "\n" ) - @f = StrategyInterface.create_dest(dest) - @encoding = (/\A[ejs]/ === encoding) ? encoding[0,1] : nil - @eol = eol - end - - def decode( str ) - self.class.decode(str, @encoding) - end - private :decode - - def terminate - end - - def header_line( str ) - @f << decode(str) - end - - def header_name( nm ) - @f << nm << ': ' - end - - def header_body( str ) - @f << decode(str) - end - - def space - @f << ' ' - end - - alias spc space - - def lwsp( str ) - @f << str - end - - def meta( str ) - @f << str - end - - def text( str ) - @f << decode(str) - end - - def phrase( str ) - @f << quote_phrase(decode(str)) - end - - def kv_pair( k, v ) - v = dquote(v) unless token_safe?(v) - @f << k << '=' << v - end - - def puts( str = nil ) - @f << str if str - @f << @eol - end - - def write( str ) - @f << str - end - - end - - - ### - ### MIME B-encoding encoder - ### - - # - # FIXME: This class can handle only (euc-jp/shift_jis -> iso-2022-jp). - # - class Encoder - - include TextUtils - - BENCODE_DEBUG = false unless defined?(BENCODE_DEBUG) - - def Encoder.encode( str ) - e = new() - e.header_body str - e.terminate - e.dest.string - end - - SPACER = "\t" - MAX_LINE_LEN = 78 - RFC_2822_MAX_LENGTH = 998 - - OPTIONS = { - 'EUC' => '-Ej -m0', - 'SJIS' => '-Sj -m0', - 'UTF8' => nil, # FIXME - 'NONE' => nil - } - - def initialize( dest = nil, encoding = nil, eol = "\r\n", limit = nil ) - @f = StrategyInterface.create_dest(dest) - @opt = OPTIONS[TMail.KCODE] - @eol = eol - @folded = false - @preserve_quotes = true - reset - end - - def preserve_quotes=( bool ) - @preserve_quotes - end - - def preserve_quotes - @preserve_quotes - end - - def normalize_encoding( str ) - if @opt - then NKF.nkf(@opt, str) - else str - end - end - - def reset - @text = '' - @lwsp = '' - @curlen = 0 - end - - def terminate - add_lwsp '' - reset - end - - def dest - @f - end - - def puts( str = nil ) - @f << str if str - @f << @eol - end - - def write( str ) - @f << str - end - - # - # add - # - - def header_line( line ) - scanadd line - end - - def header_name( name ) - add_text name.split(/-/).map {|i| i.capitalize }.join('-') - add_text ':' - add_lwsp ' ' - end - - def header_body( str ) - scanadd normalize_encoding(str) - end - - def space - add_lwsp ' ' - end - - alias spc space - - def lwsp( str ) - add_lwsp str.sub(/[\r\n]+[^\r\n]*\z/, '') - end - - def meta( str ) - add_text str - end - - def text( str ) - scanadd normalize_encoding(str) - end - - def phrase( str ) - str = normalize_encoding(str) - if CONTROL_CHAR === str - scanadd str - else - add_text quote_phrase(str) - end - end - - # FIXME: implement line folding - # - def kv_pair( k, v ) - return if v.nil? - v = normalize_encoding(v) - if token_safe?(v) - add_text k + '=' + v - elsif not CONTROL_CHAR === v - add_text k + '=' + quote_token(v) - else - # apply RFC2231 encoding - kv = k + '*=' + "iso-2022-jp'ja'" + encode_value(v) - add_text kv - end - end - - def encode_value( str ) - str.gsub(TOKEN_UNSAFE) {|s| '%%%02x' % s[0] } - end - - private - - def scanadd( str, force = false ) - types = '' - strs = [] - if str.respond_to?(:encoding) - enc = str.encoding - str.force_encoding(Encoding::ASCII_8BIT) - end - until str.empty? - if m = /\A[^\e\t\r\n ]+/.match(str) - types << (force ? 'j' : 'a') - if str.respond_to?(:encoding) - strs.push m[0].force_encoding(enc) - else - strs.push m[0] - end - elsif m = /\A[\t\r\n ]+/.match(str) - types << 's' - if str.respond_to?(:encoding) - strs.push m[0].force_encoding(enc) - else - strs.push m[0] - end - - elsif m = /\A\e../.match(str) - esc = m[0] - str = m.post_match - if esc != "\e(B" and m = /\A[^\e]+/.match(str) - types << 'j' - if str.respond_to?(:encoding) - strs.push m[0].force_encoding(enc) - else - strs.push m[0] - end - end - - else - raise 'TMail FATAL: encoder scan fail' - end - (str = m.post_match) unless m.nil? - end - - do_encode types, strs - end - - def do_encode( types, strs ) - # - # result : (A|E)(S(A|E))* - # E : W(SW)* - # W : (J|A)+ but must contain J # (J|A)*J(J|A)* - # A : <> - # J : <> - # S : <> - # - # An encoding unit is `E'. - # Input (parameter `types') is (J|A)(J|A|S)*(J|A) - # - if BENCODE_DEBUG - puts - puts '-- do_encode ------------' - puts types.split(//).join(' ') - p strs - end - - e = /[ja]*j[ja]*(?:s[ja]*j[ja]*)*/ - - while m = e.match(types) - pre = m.pre_match - concat_A_S pre, strs[0, pre.size] unless pre.empty? - concat_E m[0], strs[m.begin(0) ... m.end(0)] - types = m.post_match - strs.slice! 0, m.end(0) - end - concat_A_S types, strs - end - - def concat_A_S( types, strs ) - if RUBY_VERSION < '1.9' - a = ?a; s = ?s - else - a = 'a'.ord; s = 's'.ord - end - i = 0 - types.each_byte do |t| - case t - when a then add_text strs[i] - when s then add_lwsp strs[i] - else - raise "TMail FATAL: unknown flag: #{t.chr}" - end - i += 1 - end - end - - METHOD_ID = { - ?j => :extract_J, - ?e => :extract_E, - ?a => :extract_A, - ?s => :extract_S - } - - def concat_E( types, strs ) - if BENCODE_DEBUG - puts '---- concat_E' - puts "types=#{types.split(//).join(' ')}" - puts "strs =#{strs.inspect}" - end - - flush() unless @text.empty? - - chunk = '' - strs.each_with_index do |s,i| - mid = METHOD_ID[types[i]] - until s.empty? - unless c = __send__(mid, chunk.size, s) - add_with_encode chunk unless chunk.empty? - flush - chunk = '' - fold - c = __send__(mid, 0, s) - raise 'TMail FATAL: extract fail' unless c - end - chunk << c - end - end - add_with_encode chunk unless chunk.empty? - end - - def extract_J( chunksize, str ) - size = max_bytes(chunksize, str.size) - 6 - size = (size % 2 == 0) ? (size) : (size - 1) - return nil if size <= 0 - if str.respond_to?(:encoding) - enc = str.encoding - str.force_encoding(Encoding::ASCII_8BIT) - "\e$B#{str.slice!(0, size)}\e(B".force_encoding(enc) - else - "\e$B#{str.slice!(0, size)}\e(B" - end - end - - def extract_A( chunksize, str ) - size = max_bytes(chunksize, str.size) - return nil if size <= 0 - str.slice!(0, size) - end - - alias extract_S extract_A - - def max_bytes( chunksize, ssize ) - (restsize() - '=?iso-2022-jp?B??='.size) / 4 * 3 - chunksize - end - - # - # free length buffer - # - - def add_text( str ) - @text << str - # puts '---- text -------------------------------------' - # puts "+ #{str.inspect}" - # puts "txt >>>#{@text.inspect}<<<" - end - - def add_with_encode( str ) - @text << "=?iso-2022-jp?B?#{Base64.encode(str)}?=" - end - - def add_lwsp( lwsp ) - # puts '---- lwsp -------------------------------------' - # puts "+ #{lwsp.inspect}" - fold if restsize() <= 0 - flush(@folded) - @lwsp = lwsp - end - - def flush(folded = false) - # puts '---- flush ----' - # puts "spc >>>#{@lwsp.inspect}<<<" - # puts "txt >>>#{@text.inspect}<<<" - @f << @lwsp << @text - if folded - @curlen = 0 - else - @curlen += (@lwsp.size + @text.size) - end - @text = '' - @lwsp = '' - end - - def fold - # puts '---- fold ----' - unless @f.string =~ /^.*?:$/ - @f << @eol - @lwsp = SPACER - else - fold_header - @folded = true - end - @curlen = 0 - end - - def fold_header - # Called because line is too long - so we need to wrap. - # First look for whitespace in the text - # if it has text, fold there - # check the remaining text, if too long, fold again - # if it doesn't, then don't fold unless the line goes beyond 998 chars - - # Check the text to see if there is whitespace, or if not - @wrapped_text = [] - until @text.blank? - fold_the_string - end - @text = @wrapped_text.join("#{@eol}#{SPACER}") - end - - def fold_the_string - whitespace_location = @text =~ /\s/ || @text.length - # Is the location of the whitespace shorter than the RCF_2822_MAX_LENGTH? - # if there is no whitespace in the string, then this - unless mazsize(whitespace_location) <= 0 - @text.strip! - @wrapped_text << @text.slice!(0...whitespace_location) - # If it is not less, we have to wrap it destructively - else - slice_point = RFC_2822_MAX_LENGTH - @curlen - @lwsp.length - @text.strip! - @wrapped_text << @text.slice!(0...slice_point) - end - end - - def restsize - MAX_LINE_LEN - (@curlen + @lwsp.size + @text.size) - end - - def mazsize(whitespace_location) - # Per RFC2822, the maximum length of a line is 998 chars - RFC_2822_MAX_LENGTH - (@curlen + @lwsp.size + whitespace_location) - end - - end - #:startdoc: -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/header.rb b/vendor/tmail-1.2.3.1/lib/tmail/header.rb deleted file mode 100644 index 9153dcd7c..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/header.rb +++ /dev/null @@ -1,960 +0,0 @@ -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -require 'tmail/encode' -require 'tmail/address' -require 'tmail/parser' -require 'tmail/config' -require 'tmail/utils' - -#:startdoc: -module TMail - - # Provides methods to handle and manipulate headers in the email - class HeaderField - - include TextUtils - - class << self - - alias newobj new - - def new( name, body, conf = DEFAULT_CONFIG ) - klass = FNAME_TO_CLASS[name.downcase] || UnstructuredHeader - klass.newobj body, conf - end - - # Returns a HeaderField object matching the header you specify in the "name" param. - # Requires an initialized TMail::Port to be passed in. - # - # The method searches the header of the Port you pass into it to find a match on - # the header line you pass. Once a match is found, it will unwrap the matching line - # as needed to return an initialized HeaderField object. - # - # If you want to get the Envelope sender of the email object, pass in "EnvelopeSender", - # if you want the From address of the email itself, pass in 'From'. - # - # This is because a mailbox doesn't have the : after the From that designates the - # beginning of the envelope sender (which can be different to the from address of - # the emial) - # - # Other fields can be passed as normal, "Reply-To", "Received" etc. - # - # Note: Change of behaviour in 1.2.1 => returns nil if it does not find the specified - # header field, otherwise returns an instantiated object of the correct header class - # - # For example: - # port = TMail::FilePort.new("/test/fixtures/raw_email_simple") - # h = TMail::HeaderField.new_from_port(port, "From") - # h.addrs.to_s #=> "Mikel Lindsaar " - # h = TMail::HeaderField.new_from_port(port, "EvelopeSender") - # h.addrs.to_s #=> "mike@anotherplace.com.au" - # h = TMail::HeaderField.new_from_port(port, "SomeWeirdHeaderField") - # h #=> nil - def new_from_port( port, name, conf = DEFAULT_CONFIG ) - if name == "EnvelopeSender" - name = "From" - re = Regexp.new('\A(From) ', 'i') - else - re = Regexp.new('\A(' + Regexp.quote(name) + '):', 'i') - end - str = nil - port.ropen {|f| - f.each do |line| - if m = re.match(line) then str = m.post_match.strip - elsif str and /\A[\t ]/ === line then str << ' ' << line.strip - elsif /\A-*\s*\z/ === line then break - elsif str then break - end - end - } - new(name, str, Config.to_config(conf)) if str - end - - def internal_new( name, conf ) - FNAME_TO_CLASS[name].newobj('', conf, true) - end - - end # class << self - - def initialize( body, conf, intern = false ) - @body = body - @config = conf - - @illegal = false - @parsed = false - - if intern - @parsed = true - parse_init - end - end - - def inspect - "#<#{self.class} #{@body.inspect}>" - end - - def illegal? - @illegal - end - - def empty? - ensure_parsed - return true if @illegal - isempty? - end - - private - - def ensure_parsed - return if @parsed - @parsed = true - parse - end - - # defabstract parse - # end - - def clear_parse_status - @parsed = false - @illegal = false - end - - public - - def body - ensure_parsed - v = Decoder.new(s = '') - do_accept v - v.terminate - s - end - - def body=( str ) - @body = str - clear_parse_status - end - - include StrategyInterface - - def accept( strategy ) - ensure_parsed - do_accept strategy - strategy.terminate - end - - # abstract do_accept - - end - - - class UnstructuredHeader < HeaderField - - def body - ensure_parsed - @body - end - - def body=( arg ) - ensure_parsed - @body = arg - end - - private - - def parse_init - end - - def parse - @body = Decoder.decode(@body.gsub(/\n|\r\n|\r/, '')) - end - - def isempty? - not @body - end - - def do_accept( strategy ) - strategy.text @body - end - - end - - - class StructuredHeader < HeaderField - - def comments - ensure_parsed - if @comments[0] - [Decoder.decode(@comments[0])] - else - @comments - end - end - - private - - def parse - save = nil - - begin - parse_init - do_parse - rescue SyntaxError - if not save and mime_encoded? @body - save = @body - @body = Decoder.decode(save) - retry - elsif save - @body = save - end - - @illegal = true - raise if @config.strict_parse? - end - end - - def parse_init - @comments = [] - init - end - - def do_parse - quote_boundary - obj = Parser.parse(self.class::PARSE_TYPE, @body, @comments) - set obj if obj - end - - end - - - class DateTimeHeader < StructuredHeader - - PARSE_TYPE = :DATETIME - - def date - ensure_parsed - @date - end - - def date=( arg ) - ensure_parsed - @date = arg - end - - private - - def init - @date = nil - end - - def set( t ) - @date = t - end - - def isempty? - not @date - end - - def do_accept( strategy ) - strategy.meta time2str(@date) - end - - end - - - class AddressHeader < StructuredHeader - - PARSE_TYPE = :MADDRESS - - def addrs - ensure_parsed - @addrs - end - - private - - def init - @addrs = [] - end - - def set( a ) - @addrs = a - end - - def isempty? - @addrs.empty? - end - - def do_accept( strategy ) - first = true - @addrs.each do |a| - if first - first = false - else - strategy.meta ',' - strategy.space - end - a.accept strategy - end - - @comments.each do |c| - strategy.space - strategy.meta '(' - strategy.text c - strategy.meta ')' - end - end - - end - - - class ReturnPathHeader < AddressHeader - - PARSE_TYPE = :RETPATH - - def addr - addrs()[0] - end - - def spec - a = addr() or return nil - a.spec - end - - def routes - a = addr() or return nil - a.routes - end - - private - - def do_accept( strategy ) - a = addr() - - strategy.meta '<' - unless a.routes.empty? - strategy.meta a.routes.map {|i| '@' + i }.join(',') - strategy.meta ':' - end - spec = a.spec - strategy.meta spec if spec - strategy.meta '>' - end - - end - - - class SingleAddressHeader < AddressHeader - - def addr - addrs()[0] - end - - private - - def do_accept( strategy ) - a = addr() - a.accept strategy - @comments.each do |c| - strategy.space - strategy.meta '(' - strategy.text c - strategy.meta ')' - end - end - - end - - - class MessageIdHeader < StructuredHeader - - def id - ensure_parsed - @id - end - - def id=( arg ) - ensure_parsed - @id = arg - end - - private - - def init - @id = nil - end - - def isempty? - not @id - end - - def do_parse - @id = @body.slice(MESSAGE_ID) or - raise SyntaxError, "wrong Message-ID format: #{@body}" - end - - def do_accept( strategy ) - strategy.meta @id - end - - end - - - class ReferencesHeader < StructuredHeader - - def refs - ensure_parsed - @refs - end - - def each_id - self.refs.each do |i| - yield i if MESSAGE_ID === i - end - end - - def ids - ensure_parsed - @ids - end - - def each_phrase - self.refs.each do |i| - yield i unless MESSAGE_ID === i - end - end - - def phrases - ret = [] - each_phrase {|i| ret.push i } - ret - end - - private - - def init - @refs = [] - @ids = [] - end - - def isempty? - @ids.empty? - end - - def do_parse - str = @body - while m = MESSAGE_ID.match(str) - pre = m.pre_match.strip - @refs.push pre unless pre.empty? - @refs.push s = m[0] - @ids.push s - str = m.post_match - end - str = str.strip - @refs.push str unless str.empty? - end - - def do_accept( strategy ) - first = true - @ids.each do |i| - if first - first = false - else - strategy.space - end - strategy.meta i - end - end - - end - - - class ReceivedHeader < StructuredHeader - - PARSE_TYPE = :RECEIVED - - def from - ensure_parsed - @from - end - - def from=( arg ) - ensure_parsed - @from = arg - end - - def by - ensure_parsed - @by - end - - def by=( arg ) - ensure_parsed - @by = arg - end - - def via - ensure_parsed - @via - end - - def via=( arg ) - ensure_parsed - @via = arg - end - - def with - ensure_parsed - @with - end - - def id - ensure_parsed - @id - end - - def id=( arg ) - ensure_parsed - @id = arg - end - - def _for - ensure_parsed - @_for - end - - def _for=( arg ) - ensure_parsed - @_for = arg - end - - def date - ensure_parsed - @date - end - - def date=( arg ) - ensure_parsed - @date = arg - end - - private - - def init - @from = @by = @via = @with = @id = @_for = nil - @with = [] - @date = nil - end - - def set( args ) - @from, @by, @via, @with, @id, @_for, @date = *args - end - - def isempty? - @with.empty? and not (@from or @by or @via or @id or @_for or @date) - end - - def do_accept( strategy ) - list = [] - list.push 'from ' + @from if @from - list.push 'by ' + @by if @by - list.push 'via ' + @via if @via - @with.each do |i| - list.push 'with ' + i - end - list.push 'id ' + @id if @id - list.push 'for <' + @_for + '>' if @_for - - first = true - list.each do |i| - strategy.space unless first - strategy.meta i - first = false - end - if @date - strategy.meta ';' - strategy.space - strategy.meta time2str(@date) - end - end - - end - - - class KeywordsHeader < StructuredHeader - - PARSE_TYPE = :KEYWORDS - - def keys - ensure_parsed - @keys - end - - private - - def init - @keys = [] - end - - def set( a ) - @keys = a - end - - def isempty? - @keys.empty? - end - - def do_accept( strategy ) - first = true - @keys.each do |i| - if first - first = false - else - strategy.meta ',' - end - strategy.meta i - end - end - - end - - - class EncryptedHeader < StructuredHeader - - PARSE_TYPE = :ENCRYPTED - - def encrypter - ensure_parsed - @encrypter - end - - def encrypter=( arg ) - ensure_parsed - @encrypter = arg - end - - def keyword - ensure_parsed - @keyword - end - - def keyword=( arg ) - ensure_parsed - @keyword = arg - end - - private - - def init - @encrypter = nil - @keyword = nil - end - - def set( args ) - @encrypter, @keyword = args - end - - def isempty? - not (@encrypter or @keyword) - end - - def do_accept( strategy ) - if @key - strategy.meta @encrypter + ',' - strategy.space - strategy.meta @keyword - else - strategy.meta @encrypter - end - end - - end - - - class MimeVersionHeader < StructuredHeader - - PARSE_TYPE = :MIMEVERSION - - def major - ensure_parsed - @major - end - - def major=( arg ) - ensure_parsed - @major = arg - end - - def minor - ensure_parsed - @minor - end - - def minor=( arg ) - ensure_parsed - @minor = arg - end - - def version - sprintf('%d.%d', major, minor) - end - - private - - def init - @major = nil - @minor = nil - end - - def set( args ) - @major, @minor = *args - end - - def isempty? - not (@major or @minor) - end - - def do_accept( strategy ) - strategy.meta sprintf('%d.%d', @major, @minor) - end - - end - - - class ContentTypeHeader < StructuredHeader - - PARSE_TYPE = :CTYPE - - def main_type - ensure_parsed - @main - end - - def main_type=( arg ) - ensure_parsed - @main = arg.downcase - end - - def sub_type - ensure_parsed - @sub - end - - def sub_type=( arg ) - ensure_parsed - @sub = arg.downcase - end - - def content_type - ensure_parsed - @sub ? sprintf('%s/%s', @main, @sub) : @main - end - - def params - ensure_parsed - unless @params.blank? - @params.each do |k, v| - @params[k] = unquote(v) - end - end - @params - end - - def []( key ) - ensure_parsed - @params and unquote(@params[key]) - end - - def []=( key, val ) - ensure_parsed - (@params ||= {})[key] = val - end - - private - - def init - @main = @sub = @params = nil - end - - def set( args ) - @main, @sub, @params = *args - end - - def isempty? - not (@main or @sub) - end - - def do_accept( strategy ) - if @sub - strategy.meta sprintf('%s/%s', @main, @sub) - else - strategy.meta @main - end - @params.each do |k,v| - if v - strategy.meta ';' - strategy.space - strategy.kv_pair k, v - end - end - end - - end - - - class ContentTransferEncodingHeader < StructuredHeader - - PARSE_TYPE = :CENCODING - - def encoding - ensure_parsed - @encoding - end - - def encoding=( arg ) - ensure_parsed - @encoding = arg - end - - private - - def init - @encoding = nil - end - - def set( s ) - @encoding = s - end - - def isempty? - not @encoding - end - - def do_accept( strategy ) - strategy.meta @encoding.capitalize - end - - end - - - class ContentDispositionHeader < StructuredHeader - - PARSE_TYPE = :CDISPOSITION - - def disposition - ensure_parsed - @disposition - end - - def disposition=( str ) - ensure_parsed - @disposition = str.downcase - end - - def params - ensure_parsed - unless @params.blank? - @params.each do |k, v| - @params[k] = unquote(v) - end - end - @params - end - - def []( key ) - ensure_parsed - @params and unquote(@params[key]) - end - - def []=( key, val ) - ensure_parsed - (@params ||= {})[key] = val - end - - private - - def init - @disposition = @params = nil - end - - def set( args ) - @disposition, @params = *args - end - - def isempty? - not @disposition and (not @params or @params.empty?) - end - - def do_accept( strategy ) - strategy.meta @disposition - @params.each do |k,v| - strategy.meta ';' - strategy.space - strategy.kv_pair k, unquote(v) - end - end - - end - - - class HeaderField # redefine - - FNAME_TO_CLASS = { - 'date' => DateTimeHeader, - 'resent-date' => DateTimeHeader, - 'to' => AddressHeader, - 'cc' => AddressHeader, - 'bcc' => AddressHeader, - 'from' => AddressHeader, - 'reply-to' => AddressHeader, - 'resent-to' => AddressHeader, - 'resent-cc' => AddressHeader, - 'resent-bcc' => AddressHeader, - 'resent-from' => AddressHeader, - 'resent-reply-to' => AddressHeader, - 'sender' => SingleAddressHeader, - 'resent-sender' => SingleAddressHeader, - 'return-path' => ReturnPathHeader, - 'message-id' => MessageIdHeader, - 'resent-message-id' => MessageIdHeader, - 'in-reply-to' => ReferencesHeader, - 'received' => ReceivedHeader, - 'references' => ReferencesHeader, - 'keywords' => KeywordsHeader, - 'encrypted' => EncryptedHeader, - 'mime-version' => MimeVersionHeader, - 'content-type' => ContentTypeHeader, - 'content-transfer-encoding' => ContentTransferEncodingHeader, - 'content-disposition' => ContentDispositionHeader, - 'content-id' => MessageIdHeader, - 'subject' => UnstructuredHeader, - 'comments' => UnstructuredHeader, - 'content-description' => UnstructuredHeader - } - - end - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/index.rb b/vendor/tmail-1.2.3.1/lib/tmail/index.rb deleted file mode 100644 index 554e2fd69..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/index.rb +++ /dev/null @@ -1,9 +0,0 @@ -#:stopdoc: -# This is here for Rolls. -# Rolls uses this instead of lib/tmail.rb. - -require 'tmail/version' -require 'tmail/mail' -require 'tmail/mailbox' -require 'tmail/core_extensions' -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/interface.rb b/vendor/tmail-1.2.3.1/lib/tmail/interface.rb deleted file mode 100644 index 206653bd5..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/interface.rb +++ /dev/null @@ -1,1125 +0,0 @@ -=begin rdoc - -= interface.rb Provides an interface to the TMail object - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -# TMail::Mail objects get accessed primarily through the methods in this file. -# -# - -require 'tmail/utils' - -module TMail - - class Mail - - # Allows you to query the mail object with a string to get the contents - # of the field you want. - # - # Returns a string of the exact contnts of the field - # - # mail.from = "mikel " - # mail.header_string("From") #=> "mikel " - def header_string( name, default = nil ) - h = @header[name.downcase] or return default - h.to_s - end - - #:stopdoc: - #-- - #== Attributes - - include TextUtils - - def set_string_array_attr( key, strs ) - strs.flatten! - if strs.empty? - @header.delete key.downcase - else - store key, strs.join(', ') - end - strs - end - private :set_string_array_attr - - def set_string_attr( key, str ) - if str - store key, str - else - @header.delete key.downcase - end - str - end - private :set_string_attr - - def set_addrfield( name, arg ) - if arg - h = HeaderField.internal_new(name, @config) - h.addrs.replace [arg].flatten - @header[name] = h - else - @header.delete name - end - arg - end - private :set_addrfield - - def addrs2specs( addrs ) - return nil unless addrs - list = addrs.map {|addr| - if addr.address_group? - then addr.map {|a| a.spec } - else addr.spec - end - }.flatten - return nil if list.empty? - list - end - private :addrs2specs - - #:startdoc: - - #== Date and Time methods - - # Returns the date of the email message as per the "date" header value or returns - # nil by default (if no date field exists). - # - # You can also pass whatever default you want into this method and it will return - # that instead of nil if there is no date already set. - def date( default = nil ) - if h = @header['date'] - h.date - else - default - end - end - - # Destructively sets the date of the mail object with the passed Time instance, - # returns a Time instance set to the date/time of the mail - # - # Example: - # - # now = Time.now - # mail.date = now - # mail.date #=> Sat Nov 03 18:47:50 +1100 2007 - # mail.date.class #=> Time - def date=( time ) - if time - store 'Date', time2str(time) - else - @header.delete 'date' - end - time - end - - # Returns the time of the mail message formatted to your taste using a - # strftime format string. If no date set returns nil by default or whatever value - # you pass as the second optional parameter. - # - # time = Time.now # (on Nov 16 2007) - # mail.date = time - # mail.strftime("%D") #=> "11/16/07" - def strftime( fmt, default = nil ) - if t = date - t.strftime(fmt) - else - default - end - end - - #== Destination methods - - # Return a TMail::Addresses instance for each entry in the "To:" field of the mail object header. - # - # If the "To:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.to_addrs #=> nil - # mail.to_addrs([]) #=> [] - # mail.to = "Mikel , another Mikel " - # mail.to_addrs #=> [#, #] - def to_addrs( default = nil ) - if h = @header['to'] - h.addrs - else - default - end - end - - # Return a TMail::Addresses instance for each entry in the "Cc:" field of the mail object header. - # - # If the "Cc:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.cc_addrs #=> nil - # mail.cc_addrs([]) #=> [] - # mail.cc = "Mikel , another Mikel " - # mail.cc_addrs #=> [#, #] - def cc_addrs( default = nil ) - if h = @header['cc'] - h.addrs - else - default - end - end - - # Return a TMail::Addresses instance for each entry in the "Bcc:" field of the mail object header. - # - # If the "Bcc:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.bcc_addrs #=> nil - # mail.bcc_addrs([]) #=> [] - # mail.bcc = "Mikel , another Mikel " - # mail.bcc_addrs #=> [#, #] - def bcc_addrs( default = nil ) - if h = @header['bcc'] - h.addrs - else - default - end - end - - # Destructively set the to field of the "To:" header to equal the passed in string. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.to = "Mikel , another Mikel " - # mail.to_addrs #=> [#, #] - def to_addrs=( arg ) - set_addrfield 'to', arg - end - - # Destructively set the to field of the "Cc:" header to equal the passed in string. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.cc = "Mikel , another Mikel " - # mail.cc_addrs #=> [#, #] - def cc_addrs=( arg ) - set_addrfield 'cc', arg - end - - # Destructively set the to field of the "Bcc:" header to equal the passed in string. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.bcc = "Mikel , another Mikel " - # mail.bcc_addrs #=> [#, #] - def bcc_addrs=( arg ) - set_addrfield 'bcc', arg - end - - # Returns who the email is to as an Array of email addresses as opposed to an Array of - # TMail::Address objects which is what Mail#to_addrs returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.to = "Mikel , another Mikel " - # mail.to #=> ["mikel@me.org", "mikel@you.org"] - def to( default = nil ) - addrs2specs(to_addrs(nil)) || default - end - - # Returns who the email cc'd as an Array of email addresses as opposed to an Array of - # TMail::Address objects which is what Mail#to_addrs returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.cc = "Mikel , another Mikel " - # mail.cc #=> ["mikel@me.org", "mikel@you.org"] - def cc( default = nil ) - addrs2specs(cc_addrs(nil)) || default - end - - # Returns who the email bcc'd as an Array of email addresses as opposed to an Array of - # TMail::Address objects which is what Mail#to_addrs returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.bcc = "Mikel , another Mikel " - # mail.bcc #=> ["mikel@me.org", "mikel@you.org"] - def bcc( default = nil ) - addrs2specs(bcc_addrs(nil)) || default - end - - # Destructively sets the "To:" field to the passed array of strings (which should be valid - # email addresses) - # - # Example: - # - # mail = TMail::Mail.new - # mail.to = ["mikel@abc.com", "Mikel "] - # mail.to #=> ["mikel@abc.org", "mikel@xyz.org"] - # mail['to'].to_s #=> "mikel@abc.com, Mikel " - def to=( *strs ) - set_string_array_attr 'To', strs - end - - # Destructively sets the "Cc:" field to the passed array of strings (which should be valid - # email addresses) - # - # Example: - # - # mail = TMail::Mail.new - # mail.cc = ["mikel@abc.com", "Mikel "] - # mail.cc #=> ["mikel@abc.org", "mikel@xyz.org"] - # mail['cc'].to_s #=> "mikel@abc.com, Mikel " - def cc=( *strs ) - set_string_array_attr 'Cc', strs - end - - # Destructively sets the "Bcc:" field to the passed array of strings (which should be valid - # email addresses) - # - # Example: - # - # mail = TMail::Mail.new - # mail.bcc = ["mikel@abc.com", "Mikel "] - # mail.bcc #=> ["mikel@abc.org", "mikel@xyz.org"] - # mail['bcc'].to_s #=> "mikel@abc.com, Mikel " - def bcc=( *strs ) - set_string_array_attr 'Bcc', strs - end - - #== Originator methods - - # Return a TMail::Addresses instance for each entry in the "From:" field of the mail object header. - # - # If the "From:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.from_addrs #=> nil - # mail.from_addrs([]) #=> [] - # mail.from = "Mikel , another Mikel " - # mail.from_addrs #=> [#, #] - def from_addrs( default = nil ) - if h = @header['from'] - h.addrs - else - default - end - end - - # Destructively set the to value of the "From:" header to equal the passed in string. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.from_addrs = "Mikel , another Mikel " - # mail.from_addrs #=> [#, #] - def from_addrs=( arg ) - set_addrfield 'from', arg - end - - # Returns who the email is from as an Array of email address strings instead to an Array of - # TMail::Address objects which is what Mail#from_addrs returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.from = "Mikel , another Mikel " - # mail.from #=> ["mikel@me.org", "mikel@you.org"] - def from( default = nil ) - addrs2specs(from_addrs(nil)) || default - end - - # Destructively sets the "From:" field to the passed array of strings (which should be valid - # email addresses) - # - # Example: - # - # mail = TMail::Mail.new - # mail.from = ["mikel@abc.com", "Mikel "] - # mail.from #=> ["mikel@abc.org", "mikel@xyz.org"] - # mail['from'].to_s #=> "mikel@abc.com, Mikel " - def from=( *strs ) - set_string_array_attr 'From', strs - end - - # Returns the "friendly" human readable part of the address - # - # Example: - # - # mail = TMail::Mail.new - # mail.from = "Mikel Lindsaar " - # mail.friendly_from #=> "Mikel Lindsaar" - def friendly_from( default = nil ) - h = @header['from'] - a, = h.addrs - return default unless a - return a.phrase if a.phrase - return h.comments.join(' ') unless h.comments.empty? - a.spec - end - - # Return a TMail::Addresses instance for each entry in the "Reply-To:" field of the mail object header. - # - # If the "Reply-To:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.reply_to_addrs #=> nil - # mail.reply_to_addrs([]) #=> [] - # mail.reply_to = "Mikel , another Mikel " - # mail.reply_to_addrs #=> [#, #] - def reply_to_addrs( default = nil ) - if h = @header['reply-to'] - h.addrs.blank? ? default : h.addrs - else - default - end - end - - # Destructively set the to value of the "Reply-To:" header to equal the passed in argument. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.reply_to_addrs = "Mikel , another Mikel " - # mail.reply_to_addrs #=> [#, #] - def reply_to_addrs=( arg ) - set_addrfield 'reply-to', arg - end - - # Returns who the email is from as an Array of email address strings instead to an Array of - # TMail::Address objects which is what Mail#reply_to_addrs returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.reply_to = "Mikel , another Mikel " - # mail.reply_to #=> ["mikel@me.org", "mikel@you.org"] - def reply_to( default = nil ) - addrs2specs(reply_to_addrs(nil)) || default - end - - # Destructively sets the "Reply-To:" field to the passed array of strings (which should be valid - # email addresses) - # - # Example: - # - # mail = TMail::Mail.new - # mail.reply_to = ["mikel@abc.com", "Mikel "] - # mail.reply_to #=> ["mikel@abc.org", "mikel@xyz.org"] - # mail['reply_to'].to_s #=> "mikel@abc.com, Mikel " - def reply_to=( *strs ) - set_string_array_attr 'Reply-To', strs - end - - # Return a TMail::Addresses instance of the "Sender:" field of the mail object header. - # - # If the "Sender:" field does not exist, will return nil by default or the value you - # pass as the optional parameter. - # - # Example: - # - # mail = TMail::Mail.new - # mail.sender #=> nil - # mail.sender([]) #=> [] - # mail.sender = "Mikel " - # mail.reply_to_addrs #=> [#] - def sender_addr( default = nil ) - f = @header['sender'] or return default - f.addr or return default - end - - # Destructively set the to value of the "Sender:" header to equal the passed in argument. - # - # TMail will parse your contents and turn each valid email address into a TMail::Address - # object before assigning it to the mail message. - # - # Example: - # - # mail = TMail::Mail.new - # mail.sender_addrs = "Mikel , another Mikel " - # mail.sender_addrs #=> [#, #] - def sender_addr=( addr ) - if addr - h = HeaderField.internal_new('sender', @config) - h.addr = addr - @header['sender'] = h - else - @header.delete 'sender' - end - addr - end - - # Returns who the sender of this mail is as string instead to an Array of - # TMail::Address objects which is what Mail#sender_addr returns - # - # Example: - # - # mail = TMail::Mail.new - # mail.sender = "Mikel " - # mail.sender #=> "mikel@me.org" - def sender( default = nil ) - f = @header['sender'] or return default - a = f.addr or return default - a.spec - end - - # Destructively sets the "Sender:" field to the passed string (which should be a valid - # email address) - # - # Example: - # - # mail = TMail::Mail.new - # mail.sender = "mikel@abc.com" - # mail.sender #=> "mikel@abc.org" - # mail['sender'].to_s #=> "mikel@abc.com" - def sender=( str ) - set_string_attr 'Sender', str - end - - #== Subject methods - - # Returns the subject of the mail instance. - # - # If the subject field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.subject #=> nil - # mail.subject("") #=> "" - # mail.subject = "Hello" - # mail.subject #=> "Hello" - def subject( default = nil ) - if h = @header['subject'] - h.body - else - default - end - end - alias quoted_subject subject - - # Destructively sets the passed string as the subject of the mail message. - # - # Example - # - # mail = TMail::Mail.new - # mail.subject #=> "This subject" - # mail.subject = "Another subject" - # mail.subject #=> "Another subject" - def subject=( str ) - set_string_attr 'Subject', str - end - - #== Message Identity & Threading Methods - - # Returns the message ID for this mail object instance. - # - # If the message_id field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.message_id #=> nil - # mail.message_id(TMail.new_message_id) #=> "<47404c5326d9c_2ad4fbb80161@baci.local.tmail>" - # mail.message_id = TMail.new_message_id - # mail.message_id #=> "<47404c5326d9c_2ad4fbb80161@baci.local.tmail>" - def message_id( default = nil ) - if h = @header['message-id'] - h.id || default - else - default - end - end - - # Destructively sets the message ID of the mail object instance to the passed in string - # - # Example: - # - # mail = TMail::Mail.new - # mail.message_id = "this_is_my_badly_formatted_message_id" - # mail.message_id #=> "this_is_my_badly_formatted_message_id" - def message_id=( str ) - set_string_attr 'Message-Id', str - end - - # Returns the "In-Reply-To:" field contents as an array of this mail instance if it exists - # - # If the in_reply_to field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.in_reply_to #=> nil - # mail.in_reply_to([]) #=> [] - # TMail::Mail.load("../test/fixtures/raw_email_reply") - # mail.in_reply_to #=> ["<348F04F142D69C21-291E56D292BC@xxxx.net>"] - def in_reply_to( default = nil ) - if h = @header['in-reply-to'] - h.ids - else - default - end - end - - # Destructively sets the value of the "In-Reply-To:" field of an email. - # - # Accepts an array of a single string of a message id - # - # Example: - # - # mail = TMail::Mail.new - # mail.in_reply_to = ["<348F04F142D69C21-291E56D292BC@xxxx.net>"] - # mail.in_reply_to #=> ["<348F04F142D69C21-291E56D292BC@xxxx.net>"] - def in_reply_to=( *idstrs ) - set_string_array_attr 'In-Reply-To', idstrs - end - - # Returns the references of this email (prior messages relating to this message) - # as an array of message ID strings. Useful when you are trying to thread an - # email. - # - # If the references field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.references #=> nil - # mail.references([]) #=> [] - # mail = TMail::Mail.load("../test/fixtures/raw_email_reply") - # mail.references #=> ["<473FF3B8.9020707@xxx.org>", "<348F04F142D69C21-291E56D292BC@xxxx.net>"] - def references( default = nil ) - if h = @header['references'] - h.refs - else - default - end - end - - # Destructively sets the value of the "References:" field of an email. - # - # Accepts an array of strings of message IDs - # - # Example: - # - # mail = TMail::Mail.new - # mail.references = ["<348F04F142D69C21-291E56D292BC@xxxx.net>"] - # mail.references #=> ["<348F04F142D69C21-291E56D292BC@xxxx.net>"] - def references=( *strs ) - set_string_array_attr 'References', strs - end - - #== MIME header methods - - # Returns the listed MIME version of this email from the "Mime-Version:" header field - # - # If the mime_version field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.mime_version #=> nil - # mail.mime_version([]) #=> [] - # mail = TMail::Mail.load("../test/fixtures/raw_email") - # mail.mime_version #=> "1.0" - def mime_version( default = nil ) - if h = @header['mime-version'] - h.version || default - else - default - end - end - - def mime_version=( m, opt = nil ) - if opt - if h = @header['mime-version'] - h.major = m - h.minor = opt - else - store 'Mime-Version', "#{m}.#{opt}" - end - else - store 'Mime-Version', m - end - m - end - - # Returns the current "Content-Type" of the mail instance. - # - # If the content_type field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.content_type #=> nil - # mail.content_type([]) #=> [] - # mail = TMail::Mail.load("../test/fixtures/raw_email") - # mail.content_type #=> "text/plain" - def content_type( default = nil ) - if h = @header['content-type'] - h.content_type || default - else - default - end - end - - # Returns the current main type of the "Content-Type" of the mail instance. - # - # If the content_type field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.main_type #=> nil - # mail.main_type([]) #=> [] - # mail = TMail::Mail.load("../test/fixtures/raw_email") - # mail.main_type #=> "text" - def main_type( default = nil ) - if h = @header['content-type'] - h.main_type || default - else - default - end - end - - # Returns the current sub type of the "Content-Type" of the mail instance. - # - # If the content_type field does not exist, returns nil by default or you can pass in as - # the parameter for what you want the default value to be. - # - # Example: - # - # mail = TMail::Mail.new - # mail.sub_type #=> nil - # mail.sub_type([]) #=> [] - # mail = TMail::Mail.load("../test/fixtures/raw_email") - # mail.sub_type #=> "plain" - def sub_type( default = nil ) - if h = @header['content-type'] - h.sub_type || default - else - default - end - end - - # Destructively sets the "Content-Type:" header field of this mail object - # - # Allows you to set the main type, sub type as well as parameters to the field. - # The main type and sub type need to be a string. - # - # The optional params hash can be passed with keys as symbols and values as a string, - # or strings as keys and values. - # - # Example: - # - # mail = TMail::Mail.new - # mail.set_content_type("text", "plain") - # mail.to_s #=> "Content-Type: text/plain\n\n" - # - # mail.set_content_type("text", "plain", {:charset => "EUC-KR", :format => "flowed"}) - # mail.to_s #=> "Content-Type: text/plain; charset=EUC-KR; format=flowed\n\n" - # - # mail.set_content_type("text", "plain", {"charset" => "EUC-KR", "format" => "flowed"}) - # mail.to_s #=> "Content-Type: text/plain; charset=EUC-KR; format=flowed\n\n" - def set_content_type( str, sub = nil, param = nil ) - if sub - main, sub = str, sub - else - main, sub = str.split(%r, 2) - raise ArgumentError, "sub type missing: #{str.inspect}" unless sub - end - if h = @header['content-type'] - h.main_type = main - h.sub_type = sub - h.params.clear - else - store 'Content-Type', "#{main}/#{sub}" - end - @header['content-type'].params.replace param if param - str - end - - alias content_type= set_content_type - - # Returns the named type parameter as a string, from the "Content-Type:" header. - # - # Example: - # - # mail = TMail::Mail.new - # mail.type_param("charset") #=> nil - # mail.type_param("charset", []) #=> [] - # mail.set_content_type("text", "plain", {:charset => "EUC-KR", :format => "flowed"}) - # mail.type_param("charset") #=> "EUC-KR" - # mail.type_param("format") #=> "flowed" - def type_param( name, default = nil ) - if h = @header['content-type'] - h[name] || default - else - default - end - end - - # Returns the character set of the email. Returns nil if no encoding set or returns - # whatever default you pass as a parameter - note passing the parameter does NOT change - # the mail object in any way. - # - # Example: - # - # mail = TMail::Mail.load("path_to/utf8_email") - # mail.charset #=> "UTF-8" - # - # mail = TMail::Mail.new - # mail.charset #=> nil - # mail.charset("US-ASCII") #=> "US-ASCII" - def charset( default = nil ) - if h = @header['content-type'] - h['charset'] or default - else - default - end - end - - # Destructively sets the character set used by this mail object to the passed string, you - # should note though that this does nothing to the mail body, just changes the header - # value, you will need to transliterate the body as well to match whatever you put - # in this header value if you are changing character sets. - # - # Example: - # - # mail = TMail::Mail.new - # mail.charset #=> nil - # mail.charset = "UTF-8" - # mail.charset #=> "UTF-8" - def charset=( str ) - if str - if h = @header[ 'content-type' ] - h['charset'] = str - else - store 'Content-Type', "text/plain; charset=#{str}" - end - end - str - end - - # Returns the transfer encoding of the email. Returns nil if no encoding set or returns - # whatever default you pass as a parameter - note passing the parameter does NOT change - # the mail object in any way. - # - # Example: - # - # mail = TMail::Mail.load("path_to/base64_encoded_email") - # mail.transfer_encoding #=> "base64" - # - # mail = TMail::Mail.new - # mail.transfer_encoding #=> nil - # mail.transfer_encoding("base64") #=> "base64" - def transfer_encoding( default = nil ) - if h = @header['content-transfer-encoding'] - h.encoding || default - else - default - end - end - - # Destructively sets the transfer encoding of the mail object to the passed string, you - # should note though that this does nothing to the mail body, just changes the header - # value, you will need to encode or decode the body as well to match whatever you put - # in this header value. - # - # Example: - # - # mail = TMail::Mail.new - # mail.transfer_encoding #=> nil - # mail.transfer_encoding = "base64" - # mail.transfer_encoding #=> "base64" - def transfer_encoding=( str ) - set_string_attr 'Content-Transfer-Encoding', str - end - - alias encoding transfer_encoding - alias encoding= transfer_encoding= - alias content_transfer_encoding transfer_encoding - alias content_transfer_encoding= transfer_encoding= - - # Returns the content-disposition of the mail object, returns nil or the passed - # default value if given - # - # Example: - # - # mail = TMail::Mail.load("path_to/raw_mail_with_attachment") - # mail.disposition #=> "attachment" - # - # mail = TMail::Mail.load("path_to/plain_simple_email") - # mail.disposition #=> nil - # mail.disposition(false) #=> false - def disposition( default = nil ) - if h = @header['content-disposition'] - h.disposition || default - else - default - end - end - - alias content_disposition disposition - - # Allows you to set the content-disposition of the mail object. Accepts a type - # and a hash of parameters. - # - # Example: - # - # mail.set_disposition("attachment", {:filename => "test.rb"}) - # mail.disposition #=> "attachment" - # mail['content-disposition'].to_s #=> "attachment; filename=test.rb" - def set_disposition( str, params = nil ) - if h = @header['content-disposition'] - h.disposition = str - h.params.clear - else - store('Content-Disposition', str) - h = @header['content-disposition'] - end - h.params.replace params if params - end - - alias disposition= set_disposition - alias set_content_disposition set_disposition - alias content_disposition= set_disposition - - # Returns the value of a parameter in an existing content-disposition header - # - # Example: - # - # mail.set_disposition("attachment", {:filename => "test.rb"}) - # mail['content-disposition'].to_s #=> "attachment; filename=test.rb" - # mail.disposition_param("filename") #=> "test.rb" - # mail.disposition_param("missing_param_key") #=> nil - # mail.disposition_param("missing_param_key", false) #=> false - # mail.disposition_param("missing_param_key", "Nothing to see here") #=> "Nothing to see here" - def disposition_param( name, default = nil ) - if h = @header['content-disposition'] - h[name] || default - else - default - end - end - - # Convert the Mail object's body into a Base64 encoded email - # returning the modified Mail object - def base64_encode! - store 'Content-Transfer-Encoding', 'Base64' - self.body = base64_encode - end - - # Return the result of encoding the TMail::Mail object body - # without altering the current body - def base64_encode - Base64.folding_encode(self.body) - end - - # Convert the Mail object's body into a Base64 decoded email - # returning the modified Mail object - def base64_decode! - if /base64/i === self.transfer_encoding('') - store 'Content-Transfer-Encoding', '8bit' - self.body = base64_decode - end - end - - # Returns the result of decoding the TMail::Mail object body - # without altering the current body - def base64_decode - Base64.decode(self.body, @config.strict_base64decode?) - end - - # Returns an array of each destination in the email message including to: cc: or bcc: - # - # Example: - # - # mail.to = "Mikel " - # mail.cc = "Trans " - # mail.bcc = "bob " - # mail.destinations #=> ["mikel@lindsaar.net", "t@t.com", "bob@me.com"] - def destinations( default = nil ) - ret = [] - %w( to cc bcc ).each do |nm| - if h = @header[nm] - h.addrs.each {|i| ret.push i.address } - end - end - ret.empty? ? default : ret - end - - # Yields a block of destination, yielding each as a string. - # (from the destinations example) - # mail.each_destination { |d| puts "#{d.class}: #{d}" } - # String: mikel@lindsaar.net - # String: t@t.com - # String: bob@me.com - def each_destination( &block ) - destinations([]).each do |i| - if Address === i - yield i - else - i.each(&block) - end - end - end - - alias each_dest each_destination - - # Returns an array of reply to addresses that the Mail object has, - # or if the Mail message has no reply-to, returns an array of the - # Mail objects from addresses. Else returns the default which can - # either be passed as a parameter or defaults to nil - # - # Example: - # mail.from = "Mikel " - # mail.reply_to = nil - # mail.reply_addresses #=> [""] - # - def reply_addresses( default = nil ) - reply_to_addrs(nil) or from_addrs(nil) or default - end - - # Returns the "sender" field as an array -> useful to find out who to - # send an error email to. - def error_reply_addresses( default = nil ) - if s = sender(nil) - [s] - else - from_addrs(default) - end - end - - # Returns true if the Mail object is a multipart message - def multipart? - main_type('').downcase == 'multipart' - end - - # Creates a new email in reply to self. Sets the In-Reply-To and - # References headers for you automagically. - # - # Example: - # mail = TMail::Mail.load("my_email") - # reply_email = mail.create_reply - # reply_email.class #=> TMail::Mail - # reply_email.references #=> [""] - # reply_email.in_reply_to #=> [""] - def create_reply - setup_reply create_empty_mail() - end - - # Creates a new email in reply to self. Sets the In-Reply-To and - # References headers for you automagically. - # - # Example: - # mail = TMail::Mail.load("my_email") - # forward_email = mail.create_forward - # forward_email.class #=> TMail::Mail - # forward_email.content_type #=> "multipart/mixed" - # forward_email.body #=> "Attachment: (unnamed)" - # forward_email.encoded #=> Returns the original email as a MIME attachment - def create_forward - setup_forward create_empty_mail() - end - - #:stopdoc: - private - - def create_empty_mail - self.class.new(StringPort.new(''), @config) - end - - def setup_reply( mail ) - if tmp = reply_addresses(nil) - mail.to_addrs = tmp - end - - mid = message_id(nil) - tmp = references(nil) || [] - tmp.push mid if mid - mail.in_reply_to = [mid] if mid - mail.references = tmp unless tmp.empty? - mail.subject = 'Re: ' + subject('').sub(/\A(?:\[[^\]]+\])?(?:\s*Re:)*\s*/i, '') - mail.mime_version = '1.0' - mail - end - - def setup_forward( mail ) - m = Mail.new(StringPort.new('')) - m.body = decoded - m.set_content_type 'message', 'rfc822' - m.encoding = encoding('7bit') - mail.parts.push m - # call encoded to reparse the message - mail.encoded - mail - end - - #:startdoc: - end # class Mail - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/loader.rb b/vendor/tmail-1.2.3.1/lib/tmail/loader.rb deleted file mode 100644 index 6c0e25110..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/loader.rb +++ /dev/null @@ -1,3 +0,0 @@ -#:stopdoc: -require 'tmail/mailbox' -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/mail.rb b/vendor/tmail-1.2.3.1/lib/tmail/mail.rb deleted file mode 100644 index 5a319907a..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/mail.rb +++ /dev/null @@ -1,578 +0,0 @@ -=begin rdoc - -= Mail class - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - - - -require 'tmail/interface' -require 'tmail/encode' -require 'tmail/header' -require 'tmail/port' -require 'tmail/config' -require 'tmail/utils' -require 'tmail/attachments' -require 'tmail/quoting' -require 'socket' - -module TMail - - # == Mail Class - # - # Accessing a TMail object done via the TMail::Mail class. As email can be fairly complex - # creatures, you will find a large amount of accessor and setter methods in this class! - # - # Most of the below methods handle the header, in fact, what TMail does best is handle the - # header of the email object. There are only a few methods that deal directly with the body - # of the email, such as base64_encode and base64_decode. - # - # === Using TMail inside your code - # - # The usual way is to install the gem (see the {README}[link:/README] on how to do this) and - # then put at the top of your class: - # - # require 'tmail' - # - # You can then create a new TMail object in your code with: - # - # @email = TMail::Mail.new - # - # Or if you have an email as a string, you can initialize a new TMail::Mail object and get it - # to parse that string for you like so: - # - # @email = TMail::Mail.parse(email_text) - # - # You can also read a single email off the disk, for example: - # - # @email = TMail::Mail.load('filename.txt') - # - # Also, you can read a mailbox (usual unix mbox format) and end up with an array of TMail - # objects by doing something like this: - # - # # Note, we pass true as the last variable to open the mailbox read only - # mailbox = TMail::UNIXMbox.new("mailbox", nil, true) - # @emails = [] - # mailbox.each_port { |m| @emails << TMail::Mail.new(m) } - # - class Mail - - class << self - - # Opens an email that has been saved out as a file by itself. - # - # This function will read a file non-destructively and then parse - # the contents and return a TMail::Mail object. - # - # Does not handle multiple email mailboxes (like a unix mbox) for that - # use the TMail::UNIXMbox class. - # - # Example: - # mail = TMail::Mail.load('filename') - # - def load( fname ) - new(FilePort.new(fname)) - end - - alias load_from load - alias loadfrom load - - # Parses an email from the supplied string and returns a TMail::Mail - # object. - # - # Example: - # require 'rubygems'; require 'tmail' - # email_string =< # bodyport=nil> - # mail.body - # #=> "Hello there Mikel!\n\n" - def parse( str ) - new(StringPort.new(str)) - end - - end - - def initialize( port = nil, conf = DEFAULT_CONFIG ) #:nodoc: - @port = port || StringPort.new - @config = Config.to_config(conf) - - @header = {} - @body_port = nil - @body_parsed = false - @epilogue = '' - @parts = [] - - @port.ropen {|f| - parse_header f - parse_body f unless @port.reproducible? - } - end - - # Provides access to the port this email is using to hold it's data - # - # Example: - # mail = TMail::Mail.parse(email_string) - # mail.port - # #=> # - attr_reader :port - - def inspect - "\#<#{self.class} port=#{@port.inspect} bodyport=#{@body_port.inspect}>" - end - - # - # to_s interfaces - # - - public - - include StrategyInterface - - def write_back( eol = "\n", charset = 'e' ) - parse_body - @port.wopen {|stream| encoded eol, charset, stream } - end - - def accept( strategy ) - with_multipart_encoding(strategy) { - ordered_each do |name, field| - next if field.empty? - strategy.header_name canonical(name) - field.accept strategy - strategy.puts - end - strategy.puts - body_port().ropen {|r| - strategy.write r.read - } - } - end - - private - - def canonical( name ) - name.split(/-/).map {|s| s.capitalize }.join('-') - end - - def with_multipart_encoding( strategy ) - if parts().empty? # DO NOT USE @parts - yield - - else - bound = ::TMail.new_boundary - if @header.key? 'content-type' - @header['content-type'].params['boundary'] = bound - else - store 'Content-Type', % - end - - yield - - parts().each do |tm| - strategy.puts - strategy.puts '--' + bound - tm.accept strategy - end - strategy.puts - strategy.puts '--' + bound + '--' - strategy.write epilogue() - end - end - - ### - ### header - ### - - public - - ALLOW_MULTIPLE = { - 'received' => true, - 'resent-date' => true, - 'resent-from' => true, - 'resent-sender' => true, - 'resent-to' => true, - 'resent-cc' => true, - 'resent-bcc' => true, - 'resent-message-id' => true, - 'comments' => true, - 'keywords' => true - } - USE_ARRAY = ALLOW_MULTIPLE - - def header - @header.dup - end - - # Returns a TMail::AddressHeader object of the field you are querying. - # Examples: - # @mail['from'] #=> # - # @mail['to'] #=> # - # - # You can get the string value of this by passing "to_s" to the query: - # Example: - # @mail['to'].to_s #=> "mikel@test.com.au" - def []( key ) - @header[key.downcase] - end - - def sub_header(key, param) - (hdr = self[key]) ? hdr[param] : nil - end - - alias fetch [] - - # Allows you to set or delete TMail header objects at will. - # Eamples: - # @mail = TMail::Mail.new - # @mail['to'].to_s # => 'mikel@test.com.au' - # @mail['to'] = 'mikel@elsewhere.org' - # @mail['to'].to_s # => 'mikel@elsewhere.org' - # @mail.encoded # => "To: mikel@elsewhere.org\r\n\r\n" - # @mail['to'] = nil - # @mail['to'].to_s # => nil - # @mail.encoded # => "\r\n" - # - # Note: setting mail[] = nil actualy deletes the header field in question from the object, - # it does not just set the value of the hash to nil - def []=( key, val ) - dkey = key.downcase - - if val.nil? - @header.delete dkey - return nil - end - - case val - when String - header = new_hf(key, val) - when HeaderField - ; - when Array - ALLOW_MULTIPLE.include? dkey or - raise ArgumentError, "#{key}: Header must not be multiple" - @header[dkey] = val - return val - else - header = new_hf(key, val.to_s) - end - if ALLOW_MULTIPLE.include? dkey - (@header[dkey] ||= []).push header - else - @header[dkey] = header - end - - val - end - - alias store []= - - # Allows you to loop through each header in the TMail::Mail object in a block - # Example: - # @mail['to'] = 'mikel@elsewhere.org' - # @mail['from'] = 'me@me.com' - # @mail.each_header { |k,v| puts "#{k} = #{v}" } - # # => from = me@me.com - # # => to = mikel@elsewhere.org - def each_header - @header.each do |key, val| - [val].flatten.each {|v| yield key, v } - end - end - - alias each_pair each_header - - def each_header_name( &block ) - @header.each_key(&block) - end - - alias each_key each_header_name - - def each_field( &block ) - @header.values.flatten.each(&block) - end - - alias each_value each_field - - FIELD_ORDER = %w( - return-path received - resent-date resent-from resent-sender resent-to - resent-cc resent-bcc resent-message-id - date from sender reply-to to cc bcc - message-id in-reply-to references - subject comments keywords - mime-version content-type content-transfer-encoding - content-disposition content-description - ) - - def ordered_each - list = @header.keys - FIELD_ORDER.each do |name| - if list.delete(name) - [@header[name]].flatten.each {|v| yield name, v } - end - end - list.each do |name| - [@header[name]].flatten.each {|v| yield name, v } - end - end - - def clear - @header.clear - end - - def delete( key ) - @header.delete key.downcase - end - - def delete_if - @header.delete_if do |key,val| - if Array === val - val.delete_if {|v| yield key, v } - val.empty? - else - yield key, val - end - end - end - - def keys - @header.keys - end - - def key?( key ) - @header.key? key.downcase - end - - def values_at( *args ) - args.map {|k| @header[k.downcase] }.flatten - end - - alias indexes values_at - alias indices values_at - - private - - def parse_header( f ) - name = field = nil - unixfrom = nil - - while line = f.gets - case line - when /\A[ \t]/ # continue from prev line - raise SyntaxError, 'mail is began by space' unless field - field << ' ' << line.strip - - when /\A([^\: \t]+):\s*/ # new header line - add_hf name, field if field - name = $1 - field = $' #.strip - - when /\A\-*\s*\z/ # end of header - add_hf name, field if field - name = field = nil - break - - when /\AFrom (\S+)/ - unixfrom = $1 - - when /^charset=.*/ - - else - raise SyntaxError, "wrong mail header: '#{line.inspect}'" - end - end - add_hf name, field if name - - if unixfrom - add_hf 'Return-Path', "<#{unixfrom}>" unless @header['return-path'] - end - end - - def add_hf( name, field ) - key = name.downcase - field = new_hf(name, field) - - if ALLOW_MULTIPLE.include? key - (@header[key] ||= []).push field - else - @header[key] = field - end - end - - def new_hf( name, field ) - HeaderField.new(name, field, @config) - end - - ### - ### body - ### - - public - - def body_port - parse_body - @body_port - end - - def each( &block ) - body_port().ropen {|f| f.each(&block) } - end - - def quoted_body - body_port.ropen {|f| return f.read } - end - - def quoted_body= str - body_port.wopen { |f| f.write str } - str - end - - def body=( str ) - # Sets the body of the email to a new (encoded) string. - # - # We also reparses the email if the body is ever reassigned, this is a performance hit, however when - # you assign the body, you usually want to be able to make sure that you can access the attachments etc. - # - # Usage: - # - # mail.body = "Hello, this is\nthe body text" - # # => "Hello, this is\nthe body" - # mail.body - # # => "Hello, this is\nthe body" - @body_parsed = false - parse_body(StringInput.new(str)) - parse_body - @body_port.wopen {|f| f.write str } - str - end - - alias preamble quoted_body - alias preamble= quoted_body= - - def epilogue - parse_body - @epilogue.dup - end - - def epilogue=( str ) - parse_body - @epilogue = str - str - end - - def parts - parse_body - @parts - end - - def each_part( &block ) - parts().each(&block) - end - - # Returns true if the content type of this part of the email is - # a disposition attachment - def disposition_is_attachment? - (self['content-disposition'] && self['content-disposition'].disposition == "attachment") - end - - # Returns true if this part's content main type is text, else returns false. - # By main type is meant "text/plain" is text. "text/html" is text - def content_type_is_text? - self.header['content-type'] && (self.header['content-type'].main_type != "text") - end - - private - - def parse_body( f = nil ) - return if @body_parsed - if f - parse_body_0 f - else - @port.ropen {|f| - skip_header f - parse_body_0 f - } - end - @body_parsed = true - end - - def skip_header( f ) - while line = f.gets - return if /\A[\r\n]*\z/ === line - end - end - - def parse_body_0( f ) - if multipart? - read_multipart f - else - @body_port = @config.new_body_port(self) - @body_port.wopen {|w| - w.write f.read - } - end - end - - def read_multipart( src ) - bound = @header['content-type'].params['boundary'] - is_sep = /\A--#{Regexp.quote bound}(?:--)?[ \t]*(?:\n|\r\n|\r)/ - lastbound = "--#{bound}--" - - ports = [ @config.new_preamble_port(self) ] - begin - f = ports.last.wopen - while line = src.gets - if is_sep === line - f.close - break if line.strip == lastbound - ports.push @config.new_part_port(self) - f = ports.last.wopen - else - f << line - end - end - @epilogue = (src.read || '') - ensure - f.close if f and not f.closed? - end - - @body_port = ports.shift - @parts = ports.map {|p| self.class.new(p, @config) } - end - - end # class Mail - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/mailbox.rb b/vendor/tmail-1.2.3.1/lib/tmail/mailbox.rb deleted file mode 100644 index b0bc6a7f7..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/mailbox.rb +++ /dev/null @@ -1,495 +0,0 @@ -=begin rdoc - -= Mailbox and Mbox interaction class - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -require 'tmail/port' -require 'socket' -require 'mutex_m' - - -unless [].respond_to?(:sort_by) -module Enumerable#:nodoc: - def sort_by - map {|i| [yield(i), i] }.sort {|a,b| a.first <=> b.first }.map {|i| i[1] } - end -end -end - - -module TMail - - class MhMailbox - - PORT_CLASS = MhPort - - def initialize( dir ) - edir = File.expand_path(dir) - raise ArgumentError, "not directory: #{dir}"\ - unless FileTest.directory? edir - @dirname = edir - @last_file = nil - @last_atime = nil - end - - def directory - @dirname - end - - alias dirname directory - - attr_accessor :last_atime - - def inspect - "#<#{self.class} #{@dirname}>" - end - - def close - end - - def new_port - PORT_CLASS.new(next_file_name()) - end - - def each_port - mail_files().each do |path| - yield PORT_CLASS.new(path) - end - @last_atime = Time.now - end - - alias each each_port - - def reverse_each_port - mail_files().reverse_each do |path| - yield PORT_CLASS.new(path) - end - @last_atime = Time.now - end - - alias reverse_each reverse_each_port - - # old #each_mail returns Port - #def each_mail - # each_port do |port| - # yield Mail.new(port) - # end - #end - - def each_new_port( mtime = nil, &block ) - mtime ||= @last_atime - return each_port(&block) unless mtime - return unless File.mtime(@dirname) >= mtime - - mail_files().each do |path| - yield PORT_CLASS.new(path) if File.mtime(path) > mtime - end - @last_atime = Time.now - end - - private - - def mail_files - Dir.entries(@dirname)\ - .select {|s| /\A\d+\z/ === s }\ - .map {|s| s.to_i }\ - .sort\ - .map {|i| "#{@dirname}/#{i}" }\ - .select {|path| FileTest.file? path } - end - - def next_file_name - unless n = @last_file - n = 0 - Dir.entries(@dirname)\ - .select {|s| /\A\d+\z/ === s }\ - .map {|s| s.to_i }.sort\ - .each do |i| - next unless FileTest.file? "#{@dirname}/#{i}" - n = i - end - end - begin - n += 1 - end while FileTest.exist? "#{@dirname}/#{n}" - @last_file = n - - "#{@dirname}/#{n}" - end - - end # MhMailbox - - MhLoader = MhMailbox - - - class UNIXMbox - - class << self - alias newobj new - end - - # Creates a new mailbox object that you can iterate through to collect the - # emails from with "each_port". - # - # You need to pass it a filename of a unix mailbox format file, the format of this - # file can be researched at this page at {wikipedia}[link:http://en.wikipedia.org/wiki/Mbox] - # - # ==== Parameters - # - # +filename+: The filename of the mailbox you want to open - # - # +tmpdir+: Can be set to override TMail using the system environment's temp dir. TMail will first - # use the temp dir specified by you (if any) or then the temp dir specified in the Environment's TEMP - # value then the value in the Environment's TMP value or failing all of the above, '/tmp' - # - # +readonly+: If set to false, each email you take from the mail box will be removed from the mailbox. - # default is *false* - ie, it *WILL* truncate your mailbox file to ZERO once it has read the emails out. - # - # ==== Options: - # - # None - # - # ==== Examples: - # - # # First show using readonly true: - # - # require 'ftools' - # File.size("../test/fixtures/mailbox") - # #=> 20426 - # - # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox", nil, true) - # #=> # - # - # mailbox.each_port do |port| - # mail = TMail::Mail.new(port) - # puts mail.subject - # end - # #Testing mailbox 1 - # #Testing mailbox 2 - # #Testing mailbox 3 - # #Testing mailbox 4 - # require 'ftools' - # File.size?("../test/fixtures/mailbox") - # #=> 20426 - # - # # Now show with readonly set to the default false - # - # mailbox = TMail::UNIXMbox.new("../test/fixtures/mailbox") - # #=> # - # - # mailbox.each_port do |port| - # mail = TMail::Mail.new(port) - # puts mail.subject - # end - # #Testing mailbox 1 - # #Testing mailbox 2 - # #Testing mailbox 3 - # #Testing mailbox 4 - # - # File.size?("../test/fixtures/mailbox") - # #=> nil - def UNIXMbox.new( filename, tmpdir = nil, readonly = false ) - tmpdir = ENV['TEMP'] || ENV['TMP'] || '/tmp' - newobj(filename, "#{tmpdir}/ruby_tmail_#{$$}_#{rand()}", readonly, false) - end - - def UNIXMbox.lock( fname ) - begin - f = File.open(fname, 'r+') - f.flock File::LOCK_EX - yield f - ensure - f.flock File::LOCK_UN - f.close if f and not f.closed? - end - end - - def UNIXMbox.static_new( fname, dir, readonly = false ) - newobj(fname, dir, readonly, true) - end - - def initialize( fname, mhdir, readonly, static ) - @filename = fname - @readonly = readonly - @closed = false - - Dir.mkdir mhdir - @real = MhMailbox.new(mhdir) - @finalizer = UNIXMbox.mkfinal(@real, @filename, !@readonly, !static) - ObjectSpace.define_finalizer self, @finalizer - end - - def UNIXMbox.mkfinal( mh, mboxfile, writeback_p, cleanup_p ) - lambda { - if writeback_p - lock(mboxfile) {|f| - mh.each_port do |port| - f.puts create_from_line(port) - port.ropen {|r| - f.puts r.read - } - end - } - end - if cleanup_p - Dir.foreach(mh.dirname) do |fname| - next if /\A\.\.?\z/ === fname - File.unlink "#{mh.dirname}/#{fname}" - end - Dir.rmdir mh.dirname - end - } - end - - # make _From line - def UNIXMbox.create_from_line( port ) - sprintf 'From %s %s', - fromaddr(), TextUtils.time2str(File.mtime(port.filename)) - end - - def UNIXMbox.fromaddr(port) - h = HeaderField.new_from_port(port, 'Return-Path') || - HeaderField.new_from_port(port, 'From') || - HeaderField.new_from_port(port, 'EnvelopeSender') or return 'nobody' - a = h.addrs[0] or return 'nobody' - a.spec - end - - def close - return if @closed - - ObjectSpace.undefine_finalizer self - @finalizer.call - @finalizer = nil - @real = nil - @closed = true - @updated = nil - end - - def each_port( &block ) - close_check - update - @real.each_port(&block) - end - - alias each each_port - - def reverse_each_port( &block ) - close_check - update - @real.reverse_each_port(&block) - end - - alias reverse_each reverse_each_port - - # old #each_mail returns Port - #def each_mail( &block ) - # each_port do |port| - # yield Mail.new(port) - # end - #end - - def each_new_port( mtime = nil ) - close_check - update - @real.each_new_port(mtime) {|p| yield p } - end - - def new_port - close_check - @real.new_port - end - - private - - def close_check - @closed and raise ArgumentError, 'accessing already closed mbox' - end - - def update - return if FileTest.zero?(@filename) - return if @updated and File.mtime(@filename) < @updated - w = nil - port = nil - time = nil - UNIXMbox.lock(@filename) {|f| - begin - f.each do |line| - if /\AFrom / === line - w.close if w - File.utime time, time, port.filename if time - - port = @real.new_port - w = port.wopen - time = fromline2time(line) - else - w.print line if w - end - end - ensure - if w and not w.closed? - w.close - File.utime time, time, port.filename if time - end - end - f.truncate(0) unless @readonly - @updated = Time.now - } - end - - def fromline2time( line ) - m = /\AFrom \S+ \w+ (\w+) (\d+) (\d+):(\d+):(\d+) (\d+)/.match(line) \ - or return nil - Time.local(m[6].to_i, m[1], m[2].to_i, m[3].to_i, m[4].to_i, m[5].to_i) - end - - end # UNIXMbox - - MboxLoader = UNIXMbox - - - class Maildir - - extend Mutex_m - - PORT_CLASS = MaildirPort - - @seq = 0 - def Maildir.unique_number - synchronize { - @seq += 1 - return @seq - } - end - - def initialize( dir = nil ) - @dirname = dir || ENV['MAILDIR'] - raise ArgumentError, "not directory: #{@dirname}"\ - unless FileTest.directory? @dirname - @new = "#{@dirname}/new" - @tmp = "#{@dirname}/tmp" - @cur = "#{@dirname}/cur" - end - - def directory - @dirname - end - - def inspect - "#<#{self.class} #{@dirname}>" - end - - def close - end - - def each_port - mail_files(@cur).each do |path| - yield PORT_CLASS.new(path) - end - end - - alias each each_port - - def reverse_each_port - mail_files(@cur).reverse_each do |path| - yield PORT_CLASS.new(path) - end - end - - alias reverse_each reverse_each_port - - def new_port - fname = nil - tmpfname = nil - newfname = nil - - begin - fname = "#{Time.now.to_i}.#{$$}_#{Maildir.unique_number}.#{Socket.gethostname}" - - tmpfname = "#{@tmp}/#{fname}" - newfname = "#{@new}/#{fname}" - end while FileTest.exist? tmpfname - - if block_given? - File.open(tmpfname, 'w') {|f| yield f } - File.rename tmpfname, newfname - PORT_CLASS.new(newfname) - else - File.open(tmpfname, 'w') {|f| f.write "\n\n" } - PORT_CLASS.new(tmpfname) - end - end - - def each_new_port - mail_files(@new).each do |path| - dest = @cur + '/' + File.basename(path) - File.rename path, dest - yield PORT_CLASS.new(dest) - end - - check_tmp - end - - TOO_OLD = 60 * 60 * 36 # 36 hour - - def check_tmp - old = Time.now.to_i - TOO_OLD - - each_filename(@tmp) do |full, fname| - if FileTest.file? full and - File.stat(full).mtime.to_i < old - File.unlink full - end - end - end - - private - - def mail_files( dir ) - Dir.entries(dir)\ - .select {|s| s[0] != ?. }\ - .sort_by {|s| s.slice(/\A\d+/).to_i }\ - .map {|s| "#{dir}/#{s}" }\ - .select {|path| FileTest.file? path } - end - - def each_filename( dir ) - Dir.foreach(dir) do |fname| - path = "#{dir}/#{fname}" - if fname[0] != ?. and FileTest.file? path - yield path, fname - end - end - end - - end # Maildir - - MaildirLoader = Maildir - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/main.rb b/vendor/tmail-1.2.3.1/lib/tmail/main.rb deleted file mode 100644 index e52772793..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/main.rb +++ /dev/null @@ -1,6 +0,0 @@ -#:stopdoc: -require 'tmail/version' -require 'tmail/mail' -require 'tmail/mailbox' -require 'tmail/core_extensions' -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/mbox.rb b/vendor/tmail-1.2.3.1/lib/tmail/mbox.rb deleted file mode 100644 index 6c0e25110..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/mbox.rb +++ /dev/null @@ -1,3 +0,0 @@ -#:stopdoc: -require 'tmail/mailbox' -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/net.rb b/vendor/tmail-1.2.3.1/lib/tmail/net.rb deleted file mode 100644 index 65147228a..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/net.rb +++ /dev/null @@ -1,248 +0,0 @@ -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -#:stopdoc: -require 'nkf' -#:startdoc: - -module TMail - - class Mail - - def send_to( smtp ) - do_send_to(smtp) do - ready_to_send - end - end - - def send_text_to( smtp ) - do_send_to(smtp) do - ready_to_send - mime_encode - end - end - - def do_send_to( smtp ) - from = from_address or raise ArgumentError, 'no from address' - (dests = destinations).empty? and raise ArgumentError, 'no receipient' - yield - send_to_0 smtp, from, dests - end - private :do_send_to - - def send_to_0( smtp, from, to ) - smtp.ready(from, to) do |f| - encoded "\r\n", 'j', f, '' - end - end - - def ready_to_send - delete_no_send_fields - add_message_id - add_date - end - - NOSEND_FIELDS = %w( - received - bcc - ) - - def delete_no_send_fields - NOSEND_FIELDS.each do |nm| - delete nm - end - delete_if {|n,v| v.empty? } - end - - def add_message_id( fqdn = nil ) - self.message_id = ::TMail::new_message_id(fqdn) - end - - def add_date - self.date = Time.now - end - - def mime_encode - if parts.empty? - mime_encode_singlepart - else - mime_encode_multipart true - end - end - - def mime_encode_singlepart - self.mime_version = '1.0' - b = body - if NKF.guess(b) != NKF::BINARY - mime_encode_text b - else - mime_encode_binary b - end - end - - def mime_encode_text( body ) - self.body = NKF.nkf('-j -m0', body) - self.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'} - self.encoding = '7bit' - end - - def mime_encode_binary( body ) - self.body = [body].pack('m') - self.set_content_type 'application', 'octet-stream' - self.encoding = 'Base64' - end - - def mime_encode_multipart( top = true ) - self.mime_version = '1.0' if top - self.set_content_type 'multipart', 'mixed' - e = encoding(nil) - if e and not /\A(?:7bit|8bit|binary)\z/i === e - raise ArgumentError, - 'using C.T.Encoding with multipart mail is not permitted' - end - end - - end - - #:stopdoc: - class DeleteFields - - NOSEND_FIELDS = %w( - received - bcc - ) - - def initialize( nosend = nil, delempty = true ) - @no_send_fields = nosend || NOSEND_FIELDS.dup - @delete_empty_fields = delempty - end - - attr :no_send_fields - attr :delete_empty_fields, true - - def exec( mail ) - @no_send_fields.each do |nm| - delete nm - end - delete_if {|n,v| v.empty? } if @delete_empty_fields - end - - end - #:startdoc: - - #:stopdoc: - class AddMessageId - - def initialize( fqdn = nil ) - @fqdn = fqdn - end - - attr :fqdn, true - - def exec( mail ) - mail.message_id = ::TMail::new_msgid(@fqdn) - end - - end - #:startdoc: - - #:stopdoc: - class AddDate - - def exec( mail ) - mail.date = Time.now - end - - end - #:startdoc: - - #:stopdoc: - class MimeEncodeAuto - - def initialize( s = nil, m = nil ) - @singlepart_composer = s || MimeEncodeSingle.new - @multipart_composer = m || MimeEncodeMulti.new - end - - attr :singlepart_composer - attr :multipart_composer - - def exec( mail ) - if mail._builtin_multipart? - then @multipart_composer - else @singlepart_composer end.exec mail - end - - end - #:startdoc: - - #:stopdoc: - class MimeEncodeSingle - - def exec( mail ) - mail.mime_version = '1.0' - b = mail.body - if NKF.guess(b) != NKF::BINARY - on_text b - else - on_binary b - end - end - - def on_text( body ) - mail.body = NKF.nkf('-j -m0', body) - mail.set_content_type 'text', 'plain', {'charset' => 'iso-2022-jp'} - mail.encoding = '7bit' - end - - def on_binary( body ) - mail.body = [body].pack('m') - mail.set_content_type 'application', 'octet-stream' - mail.encoding = 'Base64' - end - - end - #:startdoc: - - #:stopdoc: - class MimeEncodeMulti - - def exec( mail, top = true ) - mail.mime_version = '1.0' if top - mail.set_content_type 'multipart', 'mixed' - e = encoding(nil) - if e and not /\A(?:7bit|8bit|binary)\z/i === e - raise ArgumentError, - 'using C.T.Encoding with multipart mail is not permitted' - end - mail.parts.each do |m| - exec m, false if m._builtin_multipart? - end - end - - end - #:startdoc: -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/obsolete.rb b/vendor/tmail-1.2.3.1/lib/tmail/obsolete.rb deleted file mode 100644 index 22b0a126c..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/obsolete.rb +++ /dev/null @@ -1,132 +0,0 @@ -=begin rdoc - -= Obsolete methods that are depriciated - -If you really want to see them, go to lib/tmail/obsolete.rb and view to your -heart's content. - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -module TMail #:nodoc: - - class Mail - alias include? key? - alias has_key? key? - - def values - ret = [] - each_field {|v| ret.push v } - ret - end - - def value?( val ) - HeaderField === val or return false - - [ @header[val.name.downcase] ].flatten.include? val - end - - alias has_value? value? - end - - class Mail - def from_addr( default = nil ) - addr, = from_addrs(nil) - addr || default - end - - def from_address( default = nil ) - if a = from_addr(nil) - a.spec - else - default - end - end - - alias from_address= from_addrs= - - def from_phrase( default = nil ) - if a = from_addr(nil) - a.phrase - else - default - end - end - - alias msgid message_id - alias msgid= message_id= - - alias each_dest each_destination - end - - class Address - alias route routes - alias addr spec - - def spec=( str ) - @local, @domain = str.split(/@/,2).map {|s| s.split(/\./) } - end - - alias addr= spec= - alias address= spec= - end - - class MhMailbox - alias new_mail new_port - alias each_mail each_port - alias each_newmail each_new_port - end - class UNIXMbox - alias new_mail new_port - alias each_mail each_port - alias each_newmail each_new_port - end - class Maildir - alias new_mail new_port - alias each_mail each_port - alias each_newmail each_new_port - end - - extend TextUtils - - class << self - alias msgid? message_id? - alias boundary new_boundary - alias msgid new_message_id - alias new_msgid new_message_id - end - - def Mail.boundary - ::TMail.new_boundary - end - - def Mail.msgid - ::TMail.new_message_id - end - -end # module TMail -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/parser.rb b/vendor/tmail-1.2.3.1/lib/tmail/parser.rb deleted file mode 100644 index ab1a82847..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/parser.rb +++ /dev/null @@ -1,1476 +0,0 @@ -#:stopdoc: -# DO NOT MODIFY!!!! -# This file is automatically generated by racc 1.4.5 -# from racc grammer file "parser.y". -# -# -# parser.rb: generated by racc (runtime embedded) -# -###### racc/parser.rb begin -unless $".index 'racc/parser.rb' -$".push 'racc/parser.rb' - -self.class.module_eval <<'..end racc/parser.rb modeval..id8076474214', 'racc/parser.rb', 1 -# -# $Id: parser.rb,v 1.7 2005/11/20 17:31:32 aamine Exp $ -# -# Copyright (c) 1999-2005 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the same terms of ruby. -# -# As a special exception, when this code is copied by Racc -# into a Racc output file, you may use that output file -# without restriction. -# - -unless defined?(NotImplementedError) - NotImplementedError = NotImplementError -end - -module Racc - class ParseError < StandardError; end -end -unless defined?(::ParseError) - ParseError = Racc::ParseError -end - -module Racc - - unless defined?(Racc_No_Extentions) - Racc_No_Extentions = false - end - - class Parser - - Racc_Runtime_Version = '1.4.5' - Racc_Runtime_Revision = '$Revision: 1.7 $'.split[1] - - Racc_Runtime_Core_Version_R = '1.4.5' - Racc_Runtime_Core_Revision_R = '$Revision: 1.7 $'.split[1] - begin - require 'racc/cparse' - # Racc_Runtime_Core_Version_C = (defined in extention) - Racc_Runtime_Core_Revision_C = Racc_Runtime_Core_Id_C.split[2] - unless new.respond_to?(:_racc_do_parse_c, true) - raise LoadError, 'old cparse.so' - end - if Racc_No_Extentions - raise LoadError, 'selecting ruby version of racc runtime core' - end - - Racc_Main_Parsing_Routine = :_racc_do_parse_c - Racc_YY_Parse_Method = :_racc_yyparse_c - Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_C - Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_C - Racc_Runtime_Type = 'c' - rescue LoadError - Racc_Main_Parsing_Routine = :_racc_do_parse_rb - Racc_YY_Parse_Method = :_racc_yyparse_rb - Racc_Runtime_Core_Version = Racc_Runtime_Core_Version_R - Racc_Runtime_Core_Revision = Racc_Runtime_Core_Revision_R - Racc_Runtime_Type = 'ruby' - end - - def Parser.racc_runtime_type - Racc_Runtime_Type - end - - private - - def _racc_setup - @yydebug = false unless self.class::Racc_debug_parser - @yydebug = false unless defined?(@yydebug) - if @yydebug - @racc_debug_out = $stderr unless defined?(@racc_debug_out) - @racc_debug_out ||= $stderr - end - arg = self.class::Racc_arg - arg[13] = true if arg.size < 14 - arg - end - - def _racc_init_sysvars - @racc_state = [0] - @racc_tstack = [] - @racc_vstack = [] - - @racc_t = nil - @racc_val = nil - - @racc_read_next = true - - @racc_user_yyerror = false - @racc_error_status = 0 - end - - ### - ### do_parse - ### - - def do_parse - __send__(Racc_Main_Parsing_Routine, _racc_setup(), false) - end - - def next_token - raise NotImplementedError, "#{self.class}\#next_token is not defined" - end - - def _racc_do_parse_rb(arg, in_debug) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - - _racc_init_sysvars - tok = act = i = nil - nerr = 0 - - catch(:racc_end_parse) { - while true - if i = action_pointer[@racc_state[-1]] - if @racc_read_next - if @racc_t != 0 # not EOF - tok, @racc_val = next_token() - unless tok # EOF - @racc_t = 0 - else - @racc_t = (token_table[tok] or 1) # error token - end - racc_read_token(@racc_t, tok, @racc_val) if @yydebug - @racc_read_next = false - end - end - i += @racc_t - unless i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] - end - else - act = action_default[@racc_state[-1]] - end - while act = _racc_evalact(act, arg) - ; - end - end - } - end - - ### - ### yyparse - ### - - def yyparse(recv, mid) - __send__(Racc_YY_Parse_Method, recv, mid, _racc_setup(), true) - end - - def _racc_yyparse_rb(recv, mid, arg, c_debug) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - - _racc_init_sysvars - tok = nil - act = nil - i = nil - nerr = 0 - - catch(:racc_end_parse) { - until i = action_pointer[@racc_state[-1]] - while act = _racc_evalact(action_default[@racc_state[-1]], arg) - ; - end - end - recv.__send__(mid) do |tok, val| - unless tok - @racc_t = 0 - else - @racc_t = (token_table[tok] or 1) # error token - end - @racc_val = val - @racc_read_next = false - - i += @racc_t - unless i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] - end - while act = _racc_evalact(act, arg) - ; - end - - while not (i = action_pointer[@racc_state[-1]]) or - not @racc_read_next or - @racc_t == 0 # $ - unless i and i += @racc_t and - i >= 0 and - act = action_table[i] and - action_check[i] == @racc_state[-1] - act = action_default[@racc_state[-1]] - end - while act = _racc_evalact(act, arg) - ; - end - end - end - } - end - - ### - ### common - ### - - def _racc_evalact(act, arg) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - nerr = 0 # tmp - - if act > 0 and act < shift_n - # - # shift - # - if @racc_error_status > 0 - @racc_error_status -= 1 unless @racc_t == 1 # error token - end - @racc_vstack.push @racc_val - @racc_state.push act - @racc_read_next = true - if @yydebug - @racc_tstack.push @racc_t - racc_shift @racc_t, @racc_tstack, @racc_vstack - end - - elsif act < 0 and act > -reduce_n - # - # reduce - # - code = catch(:racc_jump) { - @racc_state.push _racc_do_reduce(arg, act) - false - } - if code - case code - when 1 # yyerror - @racc_user_yyerror = true # user_yyerror - return -reduce_n - when 2 # yyaccept - return shift_n - else - raise '[Racc Bug] unknown jump code' - end - end - - elsif act == shift_n - # - # accept - # - racc_accept if @yydebug - throw :racc_end_parse, @racc_vstack[0] - - elsif act == -reduce_n - # - # error - # - case @racc_error_status - when 0 - unless arg[21] # user_yyerror - nerr += 1 - on_error @racc_t, @racc_val, @racc_vstack - end - when 3 - if @racc_t == 0 # is $ - throw :racc_end_parse, nil - end - @racc_read_next = true - end - @racc_user_yyerror = false - @racc_error_status = 3 - while true - if i = action_pointer[@racc_state[-1]] - i += 1 # error token - if i >= 0 and - (act = action_table[i]) and - action_check[i] == @racc_state[-1] - break - end - end - throw :racc_end_parse, nil if @racc_state.size <= 1 - @racc_state.pop - @racc_vstack.pop - if @yydebug - @racc_tstack.pop - racc_e_pop @racc_state, @racc_tstack, @racc_vstack - end - end - return act - - else - raise "[Racc Bug] unknown action #{act.inspect}" - end - - racc_next_state(@racc_state[-1], @racc_state) if @yydebug - - nil - end - - def _racc_do_reduce(arg, act) - action_table, action_check, action_default, action_pointer, - goto_table, goto_check, goto_default, goto_pointer, - nt_base, reduce_table, token_table, shift_n, - reduce_n, use_result, * = arg - state = @racc_state - vstack = @racc_vstack - tstack = @racc_tstack - - i = act * -3 - len = reduce_table[i] - reduce_to = reduce_table[i+1] - method_id = reduce_table[i+2] - void_array = [] - - tmp_t = tstack[-len, len] if @yydebug - tmp_v = vstack[-len, len] - tstack[-len, len] = void_array if @yydebug - vstack[-len, len] = void_array - state[-len, len] = void_array - - # tstack must be updated AFTER method call - if use_result - vstack.push __send__(method_id, tmp_v, vstack, tmp_v[0]) - else - vstack.push __send__(method_id, tmp_v, vstack) - end - tstack.push reduce_to - - racc_reduce(tmp_t, reduce_to, tstack, vstack) if @yydebug - - k1 = reduce_to - nt_base - if i = goto_pointer[k1] - i += state[-1] - if i >= 0 and (curstate = goto_table[i]) and goto_check[i] == k1 - return curstate - end - end - goto_default[k1] - end - - def on_error(t, val, vstack) - raise ParseError, sprintf("\nparse error on value %s (%s)", - val.inspect, token_to_str(t) || '?') - end - - def yyerror - throw :racc_jump, 1 - end - - def yyaccept - throw :racc_jump, 2 - end - - def yyerrok - @racc_error_status = 0 - end - - # - # for debugging output - # - - def racc_read_token(t, tok, val) - @racc_debug_out.print 'read ' - @racc_debug_out.print tok.inspect, '(', racc_token2str(t), ') ' - @racc_debug_out.puts val.inspect - @racc_debug_out.puts - end - - def racc_shift(tok, tstack, vstack) - @racc_debug_out.puts "shift #{racc_token2str tok}" - racc_print_stacks tstack, vstack - @racc_debug_out.puts - end - - def racc_reduce(toks, sim, tstack, vstack) - out = @racc_debug_out - out.print 'reduce ' - if toks.empty? - out.print ' ' - else - toks.each {|t| out.print ' ', racc_token2str(t) } - end - out.puts " --> #{racc_token2str(sim)}" - - racc_print_stacks tstack, vstack - @racc_debug_out.puts - end - - def racc_accept - @racc_debug_out.puts 'accept' - @racc_debug_out.puts - end - - def racc_e_pop(state, tstack, vstack) - @racc_debug_out.puts 'error recovering mode: pop token' - racc_print_states state - racc_print_stacks tstack, vstack - @racc_debug_out.puts - end - - def racc_next_state(curstate, state) - @racc_debug_out.puts "goto #{curstate}" - racc_print_states state - @racc_debug_out.puts - end - - def racc_print_stacks(t, v) - out = @racc_debug_out - out.print ' [' - t.each_index do |i| - out.print ' (', racc_token2str(t[i]), ' ', v[i].inspect, ')' - end - out.puts ' ]' - end - - def racc_print_states(s) - out = @racc_debug_out - out.print ' [' - s.each {|st| out.print ' ', st } - out.puts ' ]' - end - - def racc_token2str(tok) - self.class::Racc_token_to_s_table[tok] or - raise "[Racc Bug] can't convert token #{tok} to string" - end - - def token_to_str(t) - self.class::Racc_token_to_s_table[t] - end - - end - -end -..end racc/parser.rb modeval..id8076474214 -end -###### racc/parser.rb end - - -# -# parser.rb -# -# Copyright (c) 1998-2007 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU Lesser General Public License version 2.1. -# - -require 'tmail/scanner' -require 'tmail/utils' - - -module TMail - - class Parser < Racc::Parser - -module_eval <<'..end parser.y modeval..id7b0b3dccb7', 'parser.y', 340 - - include TextUtils - - def self.parse( ident, str, cmt = nil ) - new.parse(ident, str, cmt) - end - - MAILP_DEBUG = false - - def initialize - self.debug = MAILP_DEBUG - end - - def debug=( flag ) - @yydebug = flag && Racc_debug_parser - @scanner_debug = flag - end - - def debug - @yydebug - end - - def parse( ident, str, comments = nil ) - @scanner = Scanner.new(str, ident, comments) - @scanner.debug = @scanner_debug - @first = [ident, ident] - result = yyparse(self, :parse_in) - comments.map! {|c| to_kcode(c) } if comments - result - end - - private - - def parse_in( &block ) - yield @first - @scanner.scan(&block) - end - - def on_error( t, val, vstack ) - raise SyntaxError, "parse error on token #{racc_token2str t}" - end - -..end parser.y modeval..id7b0b3dccb7 - -##### racc 1.4.5 generates ### - -racc_reduce_table = [ - 0, 0, :racc_error, - 2, 35, :_reduce_1, - 2, 35, :_reduce_2, - 2, 35, :_reduce_3, - 2, 35, :_reduce_4, - 2, 35, :_reduce_5, - 2, 35, :_reduce_6, - 2, 35, :_reduce_7, - 2, 35, :_reduce_8, - 2, 35, :_reduce_9, - 2, 35, :_reduce_10, - 2, 35, :_reduce_11, - 2, 35, :_reduce_12, - 6, 36, :_reduce_13, - 0, 48, :_reduce_none, - 2, 48, :_reduce_none, - 3, 49, :_reduce_16, - 5, 49, :_reduce_17, - 1, 50, :_reduce_18, - 7, 37, :_reduce_19, - 0, 51, :_reduce_none, - 2, 51, :_reduce_21, - 0, 52, :_reduce_none, - 2, 52, :_reduce_23, - 1, 58, :_reduce_24, - 3, 58, :_reduce_25, - 2, 58, :_reduce_26, - 0, 53, :_reduce_none, - 2, 53, :_reduce_28, - 0, 54, :_reduce_29, - 3, 54, :_reduce_30, - 0, 55, :_reduce_none, - 2, 55, :_reduce_32, - 2, 55, :_reduce_33, - 0, 56, :_reduce_none, - 2, 56, :_reduce_35, - 1, 61, :_reduce_36, - 1, 61, :_reduce_37, - 0, 57, :_reduce_none, - 2, 57, :_reduce_39, - 1, 38, :_reduce_none, - 1, 38, :_reduce_none, - 3, 38, :_reduce_none, - 1, 46, :_reduce_none, - 1, 46, :_reduce_none, - 1, 46, :_reduce_none, - 1, 39, :_reduce_none, - 2, 39, :_reduce_47, - 1, 64, :_reduce_48, - 3, 64, :_reduce_49, - 1, 68, :_reduce_none, - 1, 68, :_reduce_none, - 1, 69, :_reduce_52, - 3, 69, :_reduce_53, - 1, 47, :_reduce_none, - 1, 47, :_reduce_none, - 2, 47, :_reduce_56, - 2, 67, :_reduce_none, - 3, 65, :_reduce_58, - 2, 65, :_reduce_59, - 1, 70, :_reduce_60, - 2, 70, :_reduce_61, - 4, 62, :_reduce_62, - 3, 62, :_reduce_63, - 2, 72, :_reduce_none, - 2, 73, :_reduce_65, - 4, 73, :_reduce_66, - 3, 63, :_reduce_67, - 1, 63, :_reduce_68, - 1, 74, :_reduce_none, - 2, 74, :_reduce_70, - 1, 71, :_reduce_71, - 3, 71, :_reduce_72, - 1, 59, :_reduce_73, - 3, 59, :_reduce_74, - 1, 76, :_reduce_75, - 2, 76, :_reduce_76, - 1, 75, :_reduce_none, - 1, 75, :_reduce_none, - 1, 75, :_reduce_none, - 1, 77, :_reduce_none, - 1, 77, :_reduce_none, - 1, 77, :_reduce_none, - 1, 66, :_reduce_none, - 2, 66, :_reduce_none, - 3, 60, :_reduce_85, - 1, 40, :_reduce_86, - 3, 40, :_reduce_87, - 1, 79, :_reduce_none, - 2, 79, :_reduce_89, - 1, 41, :_reduce_90, - 2, 41, :_reduce_91, - 3, 42, :_reduce_92, - 5, 43, :_reduce_93, - 3, 43, :_reduce_94, - 0, 80, :_reduce_95, - 5, 80, :_reduce_96, - 5, 80, :_reduce_97, - 1, 44, :_reduce_98, - 3, 45, :_reduce_99, - 0, 81, :_reduce_none, - 1, 81, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none, - 1, 78, :_reduce_none ] - -racc_reduce_n = 109 - -racc_shift_n = 167 - -racc_action_table = [ - -70, -69, 23, 25, 145, 146, 29, 31, 105, 106, - 16, 17, 20, 22, 136, 27, -70, -69, 32, 101, - -70, -69, 153, 100, 113, 115, -70, -69, -70, 109, - 75, 23, 25, 101, 154, 29, 31, 142, 143, 16, - 17, 20, 22, 107, 27, 23, 25, 32, 98, 29, - 31, 96, 94, 16, 17, 20, 22, 78, 27, 23, - 25, 32, 112, 29, 31, 74, 91, 16, 17, 20, - 22, 88, 117, 92, 81, 32, 23, 25, 80, 123, - 29, 31, 100, 125, 16, 17, 20, 22, 126, 23, - 25, 109, 32, 29, 31, 91, 128, 16, 17, 20, - 22, 129, 27, 23, 25, 32, 101, 29, 31, 101, - 130, 16, 17, 20, 22, 79, 52, 23, 25, 32, - 78, 29, 31, 133, 78, 16, 17, 20, 22, 77, - 23, 25, 75, 32, 29, 31, 65, 62, 16, 17, - 20, 22, 139, 23, 25, 101, 32, 29, 31, 60, - 100, 16, 17, 20, 22, 44, 27, 101, 147, 32, - 23, 25, 120, 148, 29, 31, 151, 152, 16, 17, - 20, 22, 42, 27, 156, 158, 32, 23, 25, 120, - 40, 29, 31, 15, 163, 16, 17, 20, 22, 40, - 27, 23, 25, 32, 68, 29, 31, 165, 166, 16, - 17, 20, 22, nil, 27, 23, 25, 32, nil, 29, - 31, 74, nil, 16, 17, 20, 22, nil, 23, 25, - nil, 32, 29, 31, nil, nil, 16, 17, 20, 22, - nil, 23, 25, nil, 32, 29, 31, nil, nil, 16, - 17, 20, 22, nil, 23, 25, nil, 32, 29, 31, - nil, nil, 16, 17, 20, 22, nil, 23, 25, nil, - 32, 29, 31, nil, nil, 16, 17, 20, 22, nil, - 27, 23, 25, 32, nil, 29, 31, nil, nil, 16, - 17, 20, 22, nil, 23, 25, nil, 32, 29, 31, - nil, nil, 16, 17, 20, 22, nil, 23, 25, nil, - 32, 29, 31, nil, nil, 16, 17, 20, 22, nil, - 84, 25, nil, 32, 29, 31, nil, 87, 16, 17, - 20, 22, 4, 6, 7, 8, 9, 10, 11, 12, - 13, 1, 2, 3, 84, 25, nil, nil, 29, 31, - nil, 87, 16, 17, 20, 22, 84, 25, nil, nil, - 29, 31, nil, 87, 16, 17, 20, 22, 84, 25, - nil, nil, 29, 31, nil, 87, 16, 17, 20, 22, - 84, 25, nil, nil, 29, 31, nil, 87, 16, 17, - 20, 22, 84, 25, nil, nil, 29, 31, nil, 87, - 16, 17, 20, 22, 84, 25, nil, nil, 29, 31, - nil, 87, 16, 17, 20, 22 ] - -racc_action_check = [ - 75, 28, 68, 68, 136, 136, 68, 68, 72, 72, - 68, 68, 68, 68, 126, 68, 75, 28, 68, 67, - 75, 28, 143, 66, 86, 86, 75, 28, 75, 75, - 28, 3, 3, 86, 143, 3, 3, 134, 134, 3, - 3, 3, 3, 73, 3, 151, 151, 3, 62, 151, - 151, 60, 56, 151, 151, 151, 151, 51, 151, 52, - 52, 151, 80, 52, 52, 52, 50, 52, 52, 52, - 52, 45, 89, 52, 42, 52, 71, 71, 41, 96, - 71, 71, 97, 98, 71, 71, 71, 71, 100, 7, - 7, 101, 71, 7, 7, 102, 104, 7, 7, 7, - 7, 105, 7, 8, 8, 7, 108, 8, 8, 111, - 112, 8, 8, 8, 8, 40, 8, 9, 9, 8, - 36, 9, 9, 117, 121, 9, 9, 9, 9, 33, - 10, 10, 70, 9, 10, 10, 13, 12, 10, 10, - 10, 10, 130, 2, 2, 131, 10, 2, 2, 11, - 135, 2, 2, 2, 2, 6, 2, 138, 139, 2, - 90, 90, 90, 140, 90, 90, 141, 142, 90, 90, - 90, 90, 5, 90, 147, 150, 90, 127, 127, 127, - 4, 127, 127, 1, 156, 127, 127, 127, 127, 158, - 127, 26, 26, 127, 26, 26, 26, 162, 163, 26, - 26, 26, 26, nil, 26, 27, 27, 26, nil, 27, - 27, 27, nil, 27, 27, 27, 27, nil, 154, 154, - nil, 27, 154, 154, nil, nil, 154, 154, 154, 154, - nil, 122, 122, nil, 154, 122, 122, nil, nil, 122, - 122, 122, 122, nil, 76, 76, nil, 122, 76, 76, - nil, nil, 76, 76, 76, 76, nil, 38, 38, nil, - 76, 38, 38, nil, nil, 38, 38, 38, 38, nil, - 38, 55, 55, 38, nil, 55, 55, nil, nil, 55, - 55, 55, 55, nil, 94, 94, nil, 55, 94, 94, - nil, nil, 94, 94, 94, 94, nil, 59, 59, nil, - 94, 59, 59, nil, nil, 59, 59, 59, 59, nil, - 114, 114, nil, 59, 114, 114, nil, 114, 114, 114, - 114, 114, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, nil, nil, 77, 77, - nil, 77, 77, 77, 77, 77, 44, 44, nil, nil, - 44, 44, nil, 44, 44, 44, 44, 44, 113, 113, - nil, nil, 113, 113, nil, 113, 113, 113, 113, 113, - 88, 88, nil, nil, 88, 88, nil, 88, 88, 88, - 88, 88, 74, 74, nil, nil, 74, 74, nil, 74, - 74, 74, 74, 74, 129, 129, nil, nil, 129, 129, - nil, 129, 129, 129, 129, 129 ] - -racc_action_pointer = [ - 320, 152, 129, 17, 165, 172, 137, 75, 89, 103, - 116, 135, 106, 105, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, 177, 191, 1, nil, - nil, nil, nil, 109, nil, nil, 94, nil, 243, nil, - 99, 64, 74, nil, 332, 52, nil, nil, nil, nil, - 50, 31, 45, nil, nil, 257, 36, nil, nil, 283, - 22, nil, 16, nil, nil, nil, -3, -10, -12, nil, - 103, 62, -8, 15, 368, 0, 230, 320, nil, nil, - 47, nil, nil, nil, nil, nil, 4, nil, 356, 50, - 146, nil, nil, nil, 270, nil, 65, 56, 52, nil, - 57, 62, 79, nil, 68, 81, nil, nil, 77, nil, - nil, 80, 96, 344, 296, nil, nil, 108, nil, nil, - nil, 98, 217, nil, nil, nil, -19, 163, nil, 380, - 128, 116, nil, nil, 14, 124, -26, nil, 128, 141, - 148, 141, 152, 7, nil, nil, nil, 160, nil, nil, - 149, 31, nil, nil, 204, nil, 167, nil, 174, nil, - nil, nil, 169, 184, nil, nil, nil ] - -racc_action_default = [ - -109, -109, -109, -109, -14, -109, -20, -109, -109, -109, - -109, -109, -109, -109, -10, -95, -105, -106, -77, -44, - -107, -11, -108, -79, -43, -102, -109, -109, -60, -103, - -55, -104, -78, -68, -54, -71, -45, -12, -109, -1, - -109, -109, -109, -2, -109, -22, -51, -48, -50, -3, - -40, -41, -109, -46, -4, -86, -5, -88, -6, -90, - -109, -7, -95, -8, -9, -98, -100, -61, -59, -56, - -69, -109, -109, -109, -109, -75, -109, -109, -57, -15, - -109, 167, -73, -80, -82, -21, -24, -81, -109, -27, - -109, -83, -47, -89, -109, -91, -109, -100, -109, -99, - -101, -75, -58, -52, -109, -109, -64, -63, -65, -76, - -72, -67, -109, -109, -109, -26, -23, -109, -29, -49, - -84, -42, -87, -92, -94, -95, -109, -109, -62, -109, - -109, -25, -74, -28, -31, -100, -109, -53, -66, -109, - -109, -34, -109, -109, -93, -96, -97, -109, -18, -13, - -38, -109, -30, -33, -109, -32, -16, -19, -14, -35, - -36, -37, -109, -109, -39, -85, -17 ] - -racc_goto_table = [ - 39, 67, 70, 73, 38, 66, 69, 24, 37, 57, - 59, 36, 55, 67, 99, 90, 85, 157, 69, 108, - 83, 134, 111, 76, 49, 53, 141, 70, 73, 150, - 118, 89, 45, 155, 159, 149, 140, 21, 14, 19, - 119, 102, 64, 63, 61, 124, 70, 104, 58, 132, - 83, 56, 97, 83, 54, 93, 43, 5, 131, 95, - 116, nil, 76, nil, 83, 76, nil, 127, nil, 38, - nil, nil, nil, 103, 138, nil, 110, nil, nil, nil, - nil, nil, nil, 144, nil, nil, nil, nil, nil, 83, - 83, nil, nil, nil, 57, nil, nil, 122, nil, 121, - nil, nil, nil, nil, nil, 83, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 135, nil, nil, nil, nil, - nil, nil, 93, nil, nil, nil, 70, 161, 38, 70, - 162, 160, 137, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, 164 ] - -racc_goto_check = [ - 2, 37, 37, 29, 36, 46, 28, 13, 13, 41, - 41, 31, 45, 37, 47, 32, 24, 23, 28, 25, - 44, 20, 25, 42, 4, 4, 21, 37, 29, 22, - 19, 18, 17, 26, 27, 16, 15, 12, 11, 33, - 34, 35, 10, 9, 8, 47, 37, 29, 7, 43, - 44, 6, 46, 44, 5, 41, 3, 1, 25, 41, - 24, nil, 42, nil, 44, 42, nil, 32, nil, 36, - nil, nil, nil, 13, 25, nil, 41, nil, nil, nil, - nil, nil, nil, 47, nil, nil, nil, nil, nil, 44, - 44, nil, nil, nil, 41, nil, nil, 45, nil, 31, - nil, nil, nil, nil, nil, 44, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 46, nil, nil, nil, nil, - nil, nil, 41, nil, nil, nil, 37, 29, 36, 37, - 29, 28, 13, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, nil, 2 ] - -racc_goto_pointer = [ - nil, 57, -4, 50, 17, 46, 42, 38, 33, 31, - 29, 37, 35, 5, nil, -94, -105, 26, -14, -59, - -97, -108, -112, -133, -28, -55, -110, -117, -20, -24, - nil, 9, -35, 37, -50, -27, 1, -25, nil, nil, - nil, 0, -5, -65, -24, 3, -10, -52 ] - -racc_goto_default = [ - nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, 48, 41, nil, nil, nil, nil, nil, - nil, nil, nil, nil, nil, 86, nil, nil, 30, 34, - 50, 51, nil, 46, 47, nil, 26, 28, 71, 72, - 33, 35, 114, 82, 18, nil, nil, nil ] - -racc_token_table = { - false => 0, - Object.new => 1, - :DATETIME => 2, - :RECEIVED => 3, - :MADDRESS => 4, - :RETPATH => 5, - :KEYWORDS => 6, - :ENCRYPTED => 7, - :MIMEVERSION => 8, - :CTYPE => 9, - :CENCODING => 10, - :CDISPOSITION => 11, - :ADDRESS => 12, - :MAILBOX => 13, - :DIGIT => 14, - :ATOM => 15, - "," => 16, - ":" => 17, - :FROM => 18, - :BY => 19, - "@" => 20, - :DOMLIT => 21, - :VIA => 22, - :WITH => 23, - :ID => 24, - :FOR => 25, - ";" => 26, - "<" => 27, - ">" => 28, - "." => 29, - :QUOTED => 30, - :TOKEN => 31, - "/" => 32, - "=" => 33 } - -racc_use_result_var = false - -racc_nt_base = 34 - -Racc_arg = [ - racc_action_table, - racc_action_check, - racc_action_default, - racc_action_pointer, - racc_goto_table, - racc_goto_check, - racc_goto_default, - racc_goto_pointer, - racc_nt_base, - racc_reduce_table, - racc_token_table, - racc_shift_n, - racc_reduce_n, - racc_use_result_var ] - -Racc_token_to_s_table = [ -'$end', -'error', -'DATETIME', -'RECEIVED', -'MADDRESS', -'RETPATH', -'KEYWORDS', -'ENCRYPTED', -'MIMEVERSION', -'CTYPE', -'CENCODING', -'CDISPOSITION', -'ADDRESS', -'MAILBOX', -'DIGIT', -'ATOM', -'","', -'":"', -'FROM', -'BY', -'"@"', -'DOMLIT', -'VIA', -'WITH', -'ID', -'FOR', -'";"', -'"<"', -'">"', -'"."', -'QUOTED', -'TOKEN', -'"/"', -'"="', -'$start', -'content', -'datetime', -'received', -'addrs_TOP', -'retpath', -'keys', -'enc', -'version', -'ctype', -'cencode', -'cdisp', -'addr_TOP', -'mbox', -'day', -'hour', -'zone', -'from', -'by', -'via', -'with', -'id', -'for', -'received_datetime', -'received_domain', -'domain', -'msgid', -'received_addrspec', -'routeaddr', -'spec', -'addrs', -'group_bare', -'commas', -'group', -'addr', -'mboxes', -'addr_phrase', -'local_head', -'routes', -'at_domains', -'local', -'word', -'dots', -'domword', -'atom', -'phrase', -'params', -'opt_semicolon'] - -Racc_debug_parser = false - -##### racc system variables end ##### - - # reduce 0 omitted - -module_eval <<'.,.,', 'parser.y', 16 - def _reduce_1( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 17 - def _reduce_2( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 18 - def _reduce_3( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 19 - def _reduce_4( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 20 - def _reduce_5( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 21 - def _reduce_6( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 22 - def _reduce_7( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 23 - def _reduce_8( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 24 - def _reduce_9( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 25 - def _reduce_10( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 26 - def _reduce_11( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 27 - def _reduce_12( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 36 - def _reduce_13( val, _values) - t = Time.gm(val[3].to_i, val[2], val[1].to_i, 0, 0, 0) - (t + val[4] - val[5]).localtime - end -.,., - - # reduce 14 omitted - - # reduce 15 omitted - -module_eval <<'.,.,', 'parser.y', 45 - def _reduce_16( val, _values) - (val[0].to_i * 60 * 60) + - (val[2].to_i * 60) - end -.,., - -module_eval <<'.,.,', 'parser.y', 51 - def _reduce_17( val, _values) - (val[0].to_i * 60 * 60) + - (val[2].to_i * 60) + - (val[4].to_i) - end -.,., - -module_eval <<'.,.,', 'parser.y', 56 - def _reduce_18( val, _values) - timezone_string_to_unixtime(val[0]) - end -.,., - -module_eval <<'.,.,', 'parser.y', 61 - def _reduce_19( val, _values) - val - end -.,., - - # reduce 20 omitted - -module_eval <<'.,.,', 'parser.y', 67 - def _reduce_21( val, _values) - val[1] - end -.,., - - # reduce 22 omitted - -module_eval <<'.,.,', 'parser.y', 73 - def _reduce_23( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 79 - def _reduce_24( val, _values) - join_domain(val[0]) - end -.,., - -module_eval <<'.,.,', 'parser.y', 83 - def _reduce_25( val, _values) - join_domain(val[2]) - end -.,., - -module_eval <<'.,.,', 'parser.y', 87 - def _reduce_26( val, _values) - join_domain(val[0]) - end -.,., - - # reduce 27 omitted - -module_eval <<'.,.,', 'parser.y', 93 - def _reduce_28( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 98 - def _reduce_29( val, _values) - [] - end -.,., - -module_eval <<'.,.,', 'parser.y', 103 - def _reduce_30( val, _values) - val[0].push val[2] - val[0] - end -.,., - - # reduce 31 omitted - -module_eval <<'.,.,', 'parser.y', 109 - def _reduce_32( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 113 - def _reduce_33( val, _values) - val[1] - end -.,., - - # reduce 34 omitted - -module_eval <<'.,.,', 'parser.y', 119 - def _reduce_35( val, _values) - val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 125 - def _reduce_36( val, _values) - val[0].spec - end -.,., - -module_eval <<'.,.,', 'parser.y', 129 - def _reduce_37( val, _values) - val[0].spec - end -.,., - - # reduce 38 omitted - -module_eval <<'.,.,', 'parser.y', 136 - def _reduce_39( val, _values) - val[1] - end -.,., - - # reduce 40 omitted - - # reduce 41 omitted - - # reduce 42 omitted - - # reduce 43 omitted - - # reduce 44 omitted - - # reduce 45 omitted - - # reduce 46 omitted - -module_eval <<'.,.,', 'parser.y', 146 - def _reduce_47( val, _values) - [ Address.new(nil, nil) ] - end -.,., - -module_eval <<'.,.,', 'parser.y', 152 - def _reduce_48( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 157 - def _reduce_49( val, _values) - val[0].push val[2] - val[0] - end -.,., - - # reduce 50 omitted - - # reduce 51 omitted - -module_eval <<'.,.,', 'parser.y', 165 - def _reduce_52( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 170 - def _reduce_53( val, _values) - val[0].push val[2] - val[0] - end -.,., - - # reduce 54 omitted - - # reduce 55 omitted - -module_eval <<'.,.,', 'parser.y', 178 - def _reduce_56( val, _values) - val[1].phrase = Decoder.decode(val[0]) - val[1] - end -.,., - - # reduce 57 omitted - -module_eval <<'.,.,', 'parser.y', 185 - def _reduce_58( val, _values) - AddressGroup.new(val[0], val[2]) - end -.,., - -module_eval <<'.,.,', 'parser.y', 185 - def _reduce_59( val, _values) - AddressGroup.new(val[0], []) - end -.,., - -module_eval <<'.,.,', 'parser.y', 188 - def _reduce_60( val, _values) - val[0].join('.') - end -.,., - -module_eval <<'.,.,', 'parser.y', 189 - def _reduce_61( val, _values) - val[0] << ' ' << val[1].join('.') - end -.,., - -module_eval <<'.,.,', 'parser.y', 196 - def _reduce_62( val, _values) - val[2].routes.replace val[1] - val[2] - end -.,., - -module_eval <<'.,.,', 'parser.y', 200 - def _reduce_63( val, _values) - val[1] - end -.,., - - # reduce 64 omitted - -module_eval <<'.,.,', 'parser.y', 203 - def _reduce_65( val, _values) - [ val[1].join('.') ] - end -.,., - -module_eval <<'.,.,', 'parser.y', 204 - def _reduce_66( val, _values) - val[0].push val[3].join('.'); val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 206 - def _reduce_67( val, _values) - Address.new( val[0], val[2] ) - end -.,., - -module_eval <<'.,.,', 'parser.y', 207 - def _reduce_68( val, _values) - Address.new( val[0], nil ) - end -.,., - - # reduce 69 omitted - -module_eval <<'.,.,', 'parser.y', 210 - def _reduce_70( val, _values) - val[0].push ''; val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 213 - def _reduce_71( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 222 - def _reduce_72( val, _values) - val[1].times do - val[0].push '' - end - val[0].push val[2] - val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 224 - def _reduce_73( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 233 - def _reduce_74( val, _values) - val[1].times do - val[0].push '' - end - val[0].push val[2] - val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 234 - def _reduce_75( val, _values) - 0 - end -.,., - -module_eval <<'.,.,', 'parser.y', 235 - def _reduce_76( val, _values) - 1 - end -.,., - - # reduce 77 omitted - - # reduce 78 omitted - - # reduce 79 omitted - - # reduce 80 omitted - - # reduce 81 omitted - - # reduce 82 omitted - - # reduce 83 omitted - - # reduce 84 omitted - -module_eval <<'.,.,', 'parser.y', 253 - def _reduce_85( val, _values) - val[1] = val[1].spec - val.join('') - end -.,., - -module_eval <<'.,.,', 'parser.y', 254 - def _reduce_86( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 255 - def _reduce_87( val, _values) - val[0].push val[2]; val[0] - end -.,., - - # reduce 88 omitted - -module_eval <<'.,.,', 'parser.y', 258 - def _reduce_89( val, _values) - val[0] << ' ' << val[1] - end -.,., - -module_eval <<'.,.,', 'parser.y', 265 - def _reduce_90( val, _values) - val.push nil - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 269 - def _reduce_91( val, _values) - val - end -.,., - -module_eval <<'.,.,', 'parser.y', 274 - def _reduce_92( val, _values) - [ val[0].to_i, val[2].to_i ] - end -.,., - -module_eval <<'.,.,', 'parser.y', 279 - def _reduce_93( val, _values) - [ val[0].downcase, val[2].downcase, decode_params(val[3]) ] - end -.,., - -module_eval <<'.,.,', 'parser.y', 283 - def _reduce_94( val, _values) - [ val[0].downcase, nil, decode_params(val[1]) ] - end -.,., - -module_eval <<'.,.,', 'parser.y', 288 - def _reduce_95( val, _values) - {} - end -.,., - -module_eval <<'.,.,', 'parser.y', 293 - def _reduce_96( val, _values) - val[0][ val[2].downcase ] = ('"' + val[4].to_s + '"') - val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 298 - def _reduce_97( val, _values) - val[0][ val[2].downcase ] = val[4] - val[0] - end -.,., - -module_eval <<'.,.,', 'parser.y', 303 - def _reduce_98( val, _values) - val[0].downcase - end -.,., - -module_eval <<'.,.,', 'parser.y', 308 - def _reduce_99( val, _values) - [ val[0].downcase, decode_params(val[1]) ] - end -.,., - - # reduce 100 omitted - - # reduce 101 omitted - - # reduce 102 omitted - - # reduce 103 omitted - - # reduce 104 omitted - - # reduce 105 omitted - - # reduce 106 omitted - - # reduce 107 omitted - - # reduce 108 omitted - - def _reduce_none( val, _values) - val[0] - end - - end # class Parser - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/parser.y b/vendor/tmail-1.2.3.1/lib/tmail/parser.y deleted file mode 100644 index 77a145779..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/parser.y +++ /dev/null @@ -1,381 +0,0 @@ -# -# parser.y -# -# Copyright (c) 1998-2007 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU Lesser General Public License version 2.1. -# - -class TMail::Parser - - options no_result_var - -rule - - content : DATETIME datetime { val[1] } - | RECEIVED received { val[1] } - | MADDRESS addrs_TOP { val[1] } - | RETPATH retpath { val[1] } - | KEYWORDS keys { val[1] } - | ENCRYPTED enc { val[1] } - | MIMEVERSION version { val[1] } - | CTYPE ctype { val[1] } - | CENCODING cencode { val[1] } - | CDISPOSITION cdisp { val[1] } - | ADDRESS addr_TOP { val[1] } - | MAILBOX mbox { val[1] } - - datetime : day DIGIT ATOM DIGIT hour zone - # 0 1 2 3 4 5 - # date month year - { - t = Time.gm(val[3].to_i, val[2], val[1].to_i, 0, 0, 0) - (t + val[4] - val[5]).localtime - } - - day : /* none */ - | ATOM ',' - - hour : DIGIT ':' DIGIT - { - (val[0].to_i * 60 * 60) + - (val[2].to_i * 60) - } - | DIGIT ':' DIGIT ':' DIGIT - { - (val[0].to_i * 60 * 60) + - (val[2].to_i * 60) + - (val[4].to_i) - } - - zone : ATOM - { - timezone_string_to_unixtime(val[0]) - } - - received : from by via with id for received_datetime - { - val - } - - from : /* none */ - | FROM received_domain - { - val[1] - } - - by : /* none */ - | BY received_domain - { - val[1] - } - - received_domain - : domain - { - join_domain(val[0]) - } - | domain '@' domain - { - join_domain(val[2]) - } - | domain DOMLIT - { - join_domain(val[0]) - } - - via : /* none */ - | VIA ATOM - { - val[1] - } - - with : /* none */ - { - [] - } - | with WITH ATOM - { - val[0].push val[2] - val[0] - } - - id : /* none */ - | ID msgid - { - val[1] - } - | ID ATOM - { - val[1] - } - - for : /* none */ - | FOR received_addrspec - { - val[1] - } - - received_addrspec - : routeaddr - { - val[0].spec - } - | spec - { - val[0].spec - } - - received_datetime - : /* none */ - | ';' datetime - { - val[1] - } - - addrs_TOP : addrs - | group_bare - | addrs commas group_bare - - addr_TOP : mbox - | group - | group_bare - - retpath : addrs_TOP - | '<' '>' { [ Address.new(nil, nil) ] } - - addrs : addr - { - val - } - | addrs commas addr - { - val[0].push val[2] - val[0] - } - - addr : mbox - | group - - mboxes : mbox - { - val - } - | mboxes commas mbox - { - val[0].push val[2] - val[0] - } - - mbox : spec - | routeaddr - | addr_phrase routeaddr - { - val[1].phrase = Decoder.decode(val[0]) - val[1] - } - - group : group_bare ';' - - group_bare: addr_phrase ':' mboxes - { - AddressGroup.new(val[0], val[2]) - } - | addr_phrase ':' { AddressGroup.new(val[0], []) } - - addr_phrase - : local_head { val[0].join('.') } - | addr_phrase local_head { val[0] << ' ' << val[1].join('.') } - - routeaddr : '<' routes spec '>' - { - val[2].routes.replace val[1] - val[2] - } - | '<' spec '>' - { - val[1] - } - - routes : at_domains ':' - - at_domains: '@' domain { [ val[1].join('.') ] } - | at_domains ',' '@' domain { val[0].push val[3].join('.'); val[0] } - - spec : local '@' domain { Address.new( val[0], val[2] ) } - | local { Address.new( val[0], nil ) } - - local: local_head - | local_head '.' { val[0].push ''; val[0] } - - local_head: word - { val } - | local_head dots word - { - val[1].times do - val[0].push '' - end - val[0].push val[2] - val[0] - } - - domain : domword - { val } - | domain dots domword - { - val[1].times do - val[0].push '' - end - val[0].push val[2] - val[0] - } - - dots : '.' { 0 } - | '.' '.' { 1 } - - word : atom - | QUOTED - | DIGIT - - domword : atom - | DOMLIT - | DIGIT - - commas : ',' - | commas ',' - - msgid : '<' spec '>' - { - val[1] = val[1].spec - val.join('') - } - - keys : phrase { val } - | keys ',' phrase { val[0].push val[2]; val[0] } - - phrase : word - | phrase word { val[0] << ' ' << val[1] } - - enc : word - { - val.push nil - val - } - | word word - { - val - } - - version : DIGIT '.' DIGIT - { - [ val[0].to_i, val[2].to_i ] - } - - ctype : TOKEN '/' TOKEN params opt_semicolon - { - [ val[0].downcase, val[2].downcase, decode_params(val[3]) ] - } - | TOKEN params opt_semicolon - { - [ val[0].downcase, nil, decode_params(val[1]) ] - } - - params : /* none */ - { - {} - } - | params ';' TOKEN '=' QUOTED - { - val[0][ val[2].downcase ] = ('"' + val[4].to_s + '"') - val[0] - } - | params ';' TOKEN '=' TOKEN - { - val[0][ val[2].downcase ] = val[4] - val[0] - } - - cencode : TOKEN - { - val[0].downcase - } - - cdisp : TOKEN params opt_semicolon - { - [ val[0].downcase, decode_params(val[1]) ] - } - - opt_semicolon - : - | ';' - - atom : ATOM - | FROM - | BY - | VIA - | WITH - | ID - | FOR - -end - - ----- header -# -# parser.rb -# -# Copyright (c) 1998-2007 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU Lesser General Public License version 2.1. -# - -require 'tmail/scanner' -require 'tmail/utils' - ----- inner - - include TextUtils - - def self.parse( ident, str, cmt = nil ) - new.parse(ident, str, cmt) - end - - MAILP_DEBUG = false - - def initialize - self.debug = MAILP_DEBUG - end - - def debug=( flag ) - @yydebug = flag && Racc_debug_parser - @scanner_debug = flag - end - - def debug - @yydebug - end - - def parse( ident, str, comments = nil ) - @scanner = Scanner.new(str, ident, comments) - @scanner.debug = @scanner_debug - @first = [ident, ident] - result = yyparse(self, :parse_in) - comments.map! {|c| to_kcode(c) } if comments - result - end - - private - - def parse_in( &block ) - yield @first - @scanner.scan(&block) - end - - def on_error( t, val, vstack ) - raise SyntaxError, "parse error on token #{racc_token2str t}" - end - diff --git a/vendor/tmail-1.2.3.1/lib/tmail/port.rb b/vendor/tmail-1.2.3.1/lib/tmail/port.rb deleted file mode 100644 index 445f0e632..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/port.rb +++ /dev/null @@ -1,379 +0,0 @@ -=begin rdoc - -= Port class - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -require 'tmail/stringio' - - -module TMail - - class Port - def reproducible? - false - end - end - - - ### - ### FilePort - ### - - class FilePort < Port - - def initialize( fname ) - @filename = File.expand_path(fname) - super() - end - - attr_reader :filename - - alias ident filename - - def ==( other ) - other.respond_to?(:filename) and @filename == other.filename - end - - alias eql? == - - def hash - @filename.hash - end - - def inspect - "#<#{self.class}:#{@filename}>" - end - - def reproducible? - true - end - - def size - File.size @filename - end - - - def ropen( &block ) - File.open(@filename, &block) - end - - def wopen( &block ) - File.open(@filename, 'w', &block) - end - - def aopen( &block ) - File.open(@filename, 'a', &block) - end - - - def read_all - ropen {|f| - return f.read - } - end - - - def remove - File.unlink @filename - end - - def move_to( port ) - begin - File.link @filename, port.filename - rescue Errno::EXDEV - copy_to port - end - File.unlink @filename - end - - alias mv move_to - - def copy_to( port ) - if FilePort === port - copy_file @filename, port.filename - else - File.open(@filename) {|r| - port.wopen {|w| - while s = r.sysread(4096) - w.write << s - end - } } - end - end - - alias cp copy_to - - private - - # from fileutils.rb - def copy_file( src, dest ) - st = r = w = nil - - File.open(src, 'rb') {|r| - File.open(dest, 'wb') {|w| - st = r.stat - begin - while true - w.write r.sysread(st.blksize) - end - rescue EOFError - end - } } - end - - end - - - module MailFlags - - def seen=( b ) - set_status 'S', b - end - - def seen? - get_status 'S' - end - - def replied=( b ) - set_status 'R', b - end - - def replied? - get_status 'R' - end - - def flagged=( b ) - set_status 'F', b - end - - def flagged? - get_status 'F' - end - - private - - def procinfostr( str, tag, true_p ) - a = str.upcase.split(//) - a.push true_p ? tag : nil - a.delete tag unless true_p - a.compact.sort.join('').squeeze - end - - end - - - class MhPort < FilePort - - include MailFlags - - private - - def set_status( tag, flag ) - begin - tmpfile = @filename + '.tmailtmp.' + $$.to_s - File.open(tmpfile, 'w') {|f| - write_status f, tag, flag - } - File.unlink @filename - File.link tmpfile, @filename - ensure - File.unlink tmpfile - end - end - - def write_status( f, tag, flag ) - stat = '' - File.open(@filename) {|r| - while line = r.gets - if line.strip.empty? - break - elsif m = /\AX-TMail-Status:/i.match(line) - stat = m.post_match.strip - else - f.print line - end - end - - s = procinfostr(stat, tag, flag) - f.puts 'X-TMail-Status: ' + s unless s.empty? - f.puts - - while s = r.read(2048) - f.write s - end - } - end - - def get_status( tag ) - File.foreach(@filename) {|line| - return false if line.strip.empty? - if m = /\AX-TMail-Status:/i.match(line) - return m.post_match.strip.include?(tag[0]) - end - } - false - end - - end - - - class MaildirPort < FilePort - - def move_to_new - new = replace_dir(@filename, 'new') - File.rename @filename, new - @filename = new - end - - def move_to_cur - new = replace_dir(@filename, 'cur') - File.rename @filename, new - @filename = new - end - - def replace_dir( path, dir ) - "#{File.dirname File.dirname(path)}/#{dir}/#{File.basename path}" - end - private :replace_dir - - - include MailFlags - - private - - MAIL_FILE = /\A(\d+\.[\d_]+\.[^:]+)(?:\:(\d),(\w+)?)?\z/ - - def set_status( tag, flag ) - if m = MAIL_FILE.match(File.basename(@filename)) - s, uniq, type, info, = m.to_a - return if type and type != '2' # do not change anything - newname = File.dirname(@filename) + '/' + - uniq + ':2,' + procinfostr(info.to_s, tag, flag) - else - newname = @filename + ':2,' + tag - end - - File.link @filename, newname - File.unlink @filename - @filename = newname - end - - def get_status( tag ) - m = MAIL_FILE.match(File.basename(@filename)) or return false - m[2] == '2' and m[3].to_s.include?(tag[0]) - end - - end - - - ### - ### StringPort - ### - - class StringPort < Port - - def initialize( str = '' ) - @buffer = str - super() - end - - def string - @buffer - end - - def to_s - @buffer.dup - end - - alias read_all to_s - - def size - @buffer.size - end - - def ==( other ) - StringPort === other and @buffer.equal? other.string - end - - alias eql? == - - def hash - @buffer.object_id.hash - end - - def inspect - "#<#{self.class}:id=#{sprintf '0x%x', @buffer.object_id}>" - end - - def reproducible? - true - end - - def ropen( &block ) - @buffer or raise Errno::ENOENT, "#{inspect} is already removed" - StringInput.open(@buffer, &block) - end - - def wopen( &block ) - @buffer = '' - StringOutput.new(@buffer, &block) - end - - def aopen( &block ) - @buffer ||= '' - StringOutput.new(@buffer, &block) - end - - def remove - @buffer = nil - end - - alias rm remove - - def copy_to( port ) - port.wopen {|f| - f.write @buffer - } - end - - alias cp copy_to - - def move_to( port ) - if StringPort === port - str = @buffer - port.instance_eval { @buffer = str } - else - copy_to port - end - remove - end - - end - -end # module TMail diff --git a/vendor/tmail-1.2.3.1/lib/tmail/quoting.rb b/vendor/tmail-1.2.3.1/lib/tmail/quoting.rb deleted file mode 100644 index cb9f4288f..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/quoting.rb +++ /dev/null @@ -1,118 +0,0 @@ -=begin rdoc - -= Quoting methods - -=end -module TMail - class Mail - def subject(to_charset = 'utf-8') - Unquoter.unquote_and_convert_to(quoted_subject, to_charset) - end - - def unquoted_body(to_charset = 'utf-8') - from_charset = sub_header("content-type", "charset") - case (content_transfer_encoding || "7bit").downcase - when "quoted-printable" - # the default charset is set to iso-8859-1 instead of 'us-ascii'. - # This is needed as many mailer do not set the charset but send in ISO. This is only used if no charset is set. - if !from_charset.blank? && from_charset.downcase == 'us-ascii' - from_charset = 'iso-8859-1' - end - - Unquoter.unquote_quoted_printable_and_convert_to(quoted_body, - to_charset, from_charset, true) - when "base64" - Unquoter.unquote_base64_and_convert_to(quoted_body, to_charset, - from_charset) - when "7bit", "8bit" - Unquoter.convert_to(quoted_body, to_charset, from_charset) - when "binary" - quoted_body - else - quoted_body - end - end - - def body(to_charset = 'utf-8', &block) - attachment_presenter = block || Proc.new { |file_name| "Attachment: #{file_name}\n" } - - if multipart? - parts.collect { |part| - header = part["content-type"] - - if part.multipart? - part.body(to_charset, &attachment_presenter) - elsif header.nil? - "" - elsif !attachment?(part) - part.unquoted_body(to_charset) - else - attachment_presenter.call(header["name"] || "(unnamed)") - end - }.join - else - unquoted_body(to_charset) - end - end - end - - class Unquoter - class << self - def unquote_and_convert_to(text, to_charset, from_charset = "iso-8859-1", preserve_underscores=false) - return "" if text.nil? - text.gsub(/(.*?)(?:(?:=\?(.*?)\?(.)\?(.*?)\?=)|$)/) do - before = $1 - from_charset = $2 - quoting_method = $3 - text = $4 - - before = convert_to(before, to_charset, from_charset) if before.length > 0 - before + case quoting_method - when "q", "Q" then - unquote_quoted_printable_and_convert_to(text, to_charset, from_charset, preserve_underscores) - when "b", "B" then - unquote_base64_and_convert_to(text, to_charset, from_charset) - when nil then - # will be nil at the end of the string, due to the nature of - # the regex used. - "" - else - raise "unknown quoting method #{quoting_method.inspect}" - end - end - end - - def unquote_quoted_printable_and_convert_to(text, to, from, preserve_underscores=false) - text = text.gsub(/_/, " ") unless preserve_underscores - text = text.gsub(/\r\n|\r/, "\n") # normalize newlines - convert_to(text.unpack("M*").first, to, from) - end - - def unquote_base64_and_convert_to(text, to, from) - convert_to(Base64.decode(text), to, from) - end - - begin - require 'iconv' - def convert_to(text, to, from) - return text unless to && from - text ? Iconv.iconv(to, from, text).first : "" - rescue Iconv::IllegalSequence, Iconv::InvalidEncoding, Errno::EINVAL - # the 'from' parameter specifies a charset other than what the text - # actually is...not much we can do in this case but just return the - # unconverted text. - # - # Ditto if either parameter represents an unknown charset, like - # X-UNKNOWN. - text - end - rescue LoadError - # Not providing quoting support - def convert_to(text, to, from) - warn "Action Mailer: iconv not loaded; ignoring conversion from #{from} to #{to} (#{__FILE__}:#{__LINE__})" - text - end - end - end - end -end diff --git a/vendor/tmail-1.2.3.1/lib/tmail/require_arch.rb b/vendor/tmail-1.2.3.1/lib/tmail/require_arch.rb deleted file mode 100644 index b4fffb8ab..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/require_arch.rb +++ /dev/null @@ -1,58 +0,0 @@ -#:stopdoc: -require 'rbconfig' - -# Attempts to require anative extension. -# Falls back to pure-ruby version, if it fails. -# -# This uses Config::CONFIG['arch'] from rbconfig. - -def require_arch(fname) - arch = Config::CONFIG['arch'] - begin - path = File.join("tmail", arch, fname) - require path - rescue LoadError => e - # try pre-built Windows binaries - if arch =~ /mswin/ - require File.join("tmail", 'mswin32', fname) - else - raise e - end - end -end - - -# def require_arch(fname) -# dext = Config::CONFIG['DLEXT'] -# begin -# if File.extname(fname) == dext -# path = fname -# else -# path = File.join("tmail","#{fname}.#{dext}") -# end -# require path -# rescue LoadError => e -# begin -# arch = Config::CONFIG['arch'] -# path = File.join("tmail", arch, "#{fname}.#{dext}") -# require path -# rescue LoadError -# case path -# when /i686/ -# path.sub!('i686', 'i586') -# when /i586/ -# path.sub!('i586', 'i486') -# when /i486/ -# path.sub!('i486', 'i386') -# else -# begin -# require fname + '.rb' -# rescue LoadError -# raise e -# end -# end -# retry -# end -# end -# end -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/scanner.rb b/vendor/tmail-1.2.3.1/lib/tmail/scanner.rb deleted file mode 100644 index a5d01396b..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/scanner.rb +++ /dev/null @@ -1,49 +0,0 @@ -=begin rdoc - -= Scanner for TMail - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -#require 'tmail/require_arch' -require 'tmail/utils' -require 'tmail/config' - -module TMail - # NOTE: It woiuld be nice if these two libs could boith be called "tmailscanner", and - # the native extension would have precedence. However RubyGems boffs that up b/c - # it does not gaurantee load_path order. - begin - raise LoadError, 'Turned off native extentions by user choice' if ENV['NORUBYEXT'] - require('tmail/tmailscanner') # c extension - Scanner = TMailScanner - rescue LoadError - require 'tmail/scanner_r' - Scanner = TMailScanner - end -end -#:stopdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/scanner_r.rb b/vendor/tmail-1.2.3.1/lib/tmail/scanner_r.rb deleted file mode 100644 index f2075502d..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/scanner_r.rb +++ /dev/null @@ -1,261 +0,0 @@ -# scanner_r.rb -# -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ -#:stopdoc: -require 'tmail/config' - -module TMail - - class TMailScanner - - Version = '1.2.3' - Version.freeze - - MIME_HEADERS = { - :CTYPE => true, - :CENCODING => true, - :CDISPOSITION => true - } - - alnum = 'a-zA-Z0-9' - atomsyms = %q[ _#!$%&`'*+-{|}~^/=? ].strip - tokensyms = %q[ _#!$%&`'*+-{|}~^@. ].strip - atomchars = alnum + Regexp.quote(atomsyms) - tokenchars = alnum + Regexp.quote(tokensyms) - iso2022str = '\e(?!\(B)..(?:[^\e]+|\e(?!\(B)..)*\e\(B' - - eucstr = "(?:[\xa1-\xfe][\xa1-\xfe])+" - sjisstr = "(?:[\x81-\x9f\xe0-\xef][\x40-\x7e\x80-\xfc])+" - utf8str = "(?:[\xc0-\xdf][\x80-\xbf]|[\xe0-\xef][\x80-\xbf][\x80-\xbf])+" - - quoted_with_iso2022 = /\A(?:[^\\\e"]+|#{iso2022str})+/n - domlit_with_iso2022 = /\A(?:[^\\\e\]]+|#{iso2022str})+/n - comment_with_iso2022 = /\A(?:[^\\\e()]+|#{iso2022str})+/n - - quoted_without_iso2022 = /\A[^\\"]+/n - domlit_without_iso2022 = /\A[^\\\]]+/n - comment_without_iso2022 = /\A[^\\()]+/n - - PATTERN_TABLE = {} - PATTERN_TABLE['EUC'] = - [ - /\A(?:[#{atomchars}]+|#{iso2022str}|#{eucstr})+/n, - /\A(?:[#{tokenchars}]+|#{iso2022str}|#{eucstr})+/n, - quoted_with_iso2022, - domlit_with_iso2022, - comment_with_iso2022 - ] - PATTERN_TABLE['SJIS'] = - [ - /\A(?:[#{atomchars}]+|#{iso2022str}|#{sjisstr})+/n, - /\A(?:[#{tokenchars}]+|#{iso2022str}|#{sjisstr})+/n, - quoted_with_iso2022, - domlit_with_iso2022, - comment_with_iso2022 - ] - PATTERN_TABLE['UTF8'] = - [ - /\A(?:[#{atomchars}]+|#{utf8str})+/n, - /\A(?:[#{tokenchars}]+|#{utf8str})+/n, - quoted_without_iso2022, - domlit_without_iso2022, - comment_without_iso2022 - ] - PATTERN_TABLE['NONE'] = - [ - /\A[#{atomchars}]+/n, - /\A[#{tokenchars}]+/n, - quoted_without_iso2022, - domlit_without_iso2022, - comment_without_iso2022 - ] - - - def initialize( str, scantype, comments ) - init_scanner str - @comments = comments || [] - @debug = false - - # fix scanner mode - @received = (scantype == :RECEIVED) - @is_mime_header = MIME_HEADERS[scantype] - - atom, token, @quoted_re, @domlit_re, @comment_re = PATTERN_TABLE[TMail.KCODE] - @word_re = (MIME_HEADERS[scantype] ? token : atom) - end - - attr_accessor :debug - - def scan( &block ) - if @debug - scan_main do |arr| - s, v = arr - printf "%7d %-10s %s\n", - rest_size(), - s.respond_to?(:id2name) ? s.id2name : s.inspect, - v.inspect - yield arr - end - else - scan_main(&block) - end - end - - private - - RECV_TOKEN = { - 'from' => :FROM, - 'by' => :BY, - 'via' => :VIA, - 'with' => :WITH, - 'id' => :ID, - 'for' => :FOR - } - - def scan_main - until eof? - if skip(/\A[\n\r\t ]+/n) # LWSP - break if eof? - end - - if s = readstr(@word_re) - if @is_mime_header - yield [:TOKEN, s] - else - # atom - if /\A\d+\z/ === s - yield [:DIGIT, s] - elsif @received - yield [RECV_TOKEN[s.downcase] || :ATOM, s] - else - yield [:ATOM, s] - end - end - - elsif skip(/\A"/) - yield [:QUOTED, scan_quoted_word()] - - elsif skip(/\A\[/) - yield [:DOMLIT, scan_domain_literal()] - - elsif skip(/\A\(/) - @comments.push scan_comment() - - else - c = readchar() - yield [c, c] - end - end - - yield [false, '$'] - end - - def scan_quoted_word - scan_qstr(@quoted_re, /\A"/, 'quoted-word') - end - - def scan_domain_literal - '[' + scan_qstr(@domlit_re, /\A\]/, 'domain-literal') + ']' - end - - def scan_qstr( pattern, terminal, type ) - result = '' - until eof? - if s = readstr(pattern) then result << s - elsif skip(terminal) then return result - elsif skip(/\A\\/) then result << readchar() - else - raise "TMail FATAL: not match in #{type}" - end - end - scan_error! "found unterminated #{type}" - end - - def scan_comment - result = '' - nest = 1 - content = @comment_re - - until eof? - if s = readstr(content) then result << s - elsif skip(/\A\)/) then nest -= 1 - return result if nest == 0 - result << ')' - elsif skip(/\A\(/) then nest += 1 - result << '(' - elsif skip(/\A\\/) then result << readchar() - else - raise 'TMail FATAL: not match in comment' - end - end - scan_error! 'found unterminated comment' - end - - # string scanner - - def init_scanner( str ) - @src = str - end - - def eof? - @src.empty? - end - - def rest_size - @src.size - end - - def readstr( re ) - if m = re.match(@src) - @src = m.post_match - m[0] - else - nil - end - end - - def readchar - readstr(/\A./) - end - - def skip( re ) - if m = re.match(@src) - @src = m.post_match - true - else - false - end - end - - def scan_error!( msg ) - raise SyntaxError, msg - end - - end - -end # module TMail -#:startdoc: \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/lib/tmail/stringio.rb b/vendor/tmail-1.2.3.1/lib/tmail/stringio.rb deleted file mode 100644 index 835739878..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/stringio.rb +++ /dev/null @@ -1,280 +0,0 @@ -# encoding: utf-8 -=begin rdoc - -= String handling class - -=end -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -class StringInput#:nodoc: - - include Enumerable - - class << self - - def new( str ) - if block_given? - begin - f = super - yield f - ensure - f.close if f - end - else - super - end - end - - alias open new - - end - - def initialize( str ) - @src = str - @pos = 0 - @closed = false - @lineno = 0 - end - - attr_reader :lineno - - def string - @src - end - - def inspect - "#<#{self.class}:#{@closed ? 'closed' : 'open'},src=#{@src[0,30].inspect}>" - end - - def close - stream_check! - @pos = nil - @closed = true - end - - def closed? - @closed - end - - def pos - stream_check! - [@pos, @src.size].min - end - - alias tell pos - - def seek( offset, whence = IO::SEEK_SET ) - stream_check! - case whence - when IO::SEEK_SET - @pos = offset - when IO::SEEK_CUR - @pos += offset - when IO::SEEK_END - @pos = @src.size - offset - else - raise ArgumentError, "unknown seek flag: #{whence}" - end - @pos = 0 if @pos < 0 - @pos = [@pos, @src.size + 1].min - offset - end - - def rewind - stream_check! - @pos = 0 - end - - def eof? - stream_check! - @pos > @src.size - end - - def each( &block ) - stream_check! - begin - @src.each(&block) - ensure - @pos = 0 - end - end - - def gets - stream_check! - if idx = @src.index(?\n, @pos) - idx += 1 # "\n".size - line = @src[ @pos ... idx ] - @pos = idx - @pos += 1 if @pos == @src.size - else - line = @src[ @pos .. -1 ] - @pos = @src.size + 1 - end - @lineno += 1 - - line - end - - def getc - stream_check! - ch = @src[@pos] - @pos += 1 - @pos += 1 if @pos == @src.size - ch - end - - def read( len = nil ) - stream_check! - return read_all unless len - str = @src[@pos, len] - @pos += len - @pos += 1 if @pos == @src.size - str - end - - alias sysread read - - def read_all - stream_check! - return nil if eof? - rest = @src[@pos ... @src.size] - @pos = @src.size + 1 - rest - end - - def stream_check! - @closed and raise IOError, 'closed stream' - end - -end - - -class StringOutput#:nodoc: - - class << self - - def new( str = '' ) - if block_given? - begin - f = super - yield f - ensure - f.close if f - end - else - super - end - end - - alias open new - - end - - def initialize( str = '' ) - @dest = str - @closed = false - end - - def close - @closed = true - end - - def closed? - @closed - end - - def string - @dest - end - - alias value string - alias to_str string - - def size - @dest.size - end - - alias pos size - - def inspect - "#<#{self.class}:#{@dest ? 'open' : 'closed'},#{object_id}>" - end - - def print( *args ) - stream_check! - raise ArgumentError, 'wrong # of argument (0 for >1)' if args.empty? - args.each do |s| - raise ArgumentError, 'nil not allowed' if s.nil? - @dest << s.to_s - end - nil - end - - def puts( *args ) - stream_check! - args.each do |str| - @dest << (s = str.to_s) - @dest << "\n" unless s[-1] == ?\n - end - @dest << "\n" if args.empty? - nil - end - - def putc( ch ) - stream_check! - @dest << ch.chr - nil - end - - def printf( *args ) - stream_check! - @dest << sprintf(*args) - nil - end - - def write( str ) - stream_check! - s = str.to_s - @dest << s - s.size - end - - alias syswrite write - - def <<( str ) - stream_check! - @dest << str.to_s - self - end - - private - - def stream_check! - @closed and raise IOError, 'closed stream' - end - -end diff --git a/vendor/tmail-1.2.3.1/lib/tmail/utils.rb b/vendor/tmail-1.2.3.1/lib/tmail/utils.rb deleted file mode 100644 index dc594a422..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/utils.rb +++ /dev/null @@ -1,337 +0,0 @@ -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -# = TMail - The EMail Swiss Army Knife for Ruby -# -# The TMail library provides you with a very complete way to handle and manipulate EMails -# from within your Ruby programs. -# -# Used as the backbone for email handling by the Ruby on Rails and Nitro web frameworks as -# well as a bunch of other Ruby apps including the Ruby-Talk mailing list to newsgroup email -# gateway, it is a proven and reliable email handler that won't let you down. -# -# Originally created by Minero Aoki, TMail has been recently picked up by Mikel Lindsaar and -# is being actively maintained. Numerous backlogged bug fixes have been applied as well as -# Ruby 1.9 compatibility and a swath of documentation to boot. -# -# TMail allows you to treat an email totally as an object and allow you to get on with your -# own programming without having to worry about crafting the perfect email address validation -# parser, or assembling an email from all it's component parts. -# -# TMail handles the most complex part of the email - the header. It generates and parses -# headers and provides you with instant access to their innards through simple and logically -# named accessor and setter methods. -# -# TMail also provides a wrapper to Net/SMTP as well as Unix Mailbox handling methods to -# directly read emails from your unix mailbox, parse them and use them. -# -# Following is the comprehensive list of methods to access TMail::Mail objects. You can also -# check out TMail::Mail, TMail::Address and TMail::Headers for other lists. -module TMail - - # Provides an exception to throw on errors in Syntax within TMail's parsers - class SyntaxError < StandardError; end - - # Provides a new email boundary to separate parts of the email. This is a random - # string based off the current time, so should be fairly unique. - # - # For Example: - # - # TMail.new_boundary - # #=> "mimepart_47bf656968207_25a8fbb80114" - # TMail.new_boundary - # #=> "mimepart_47bf66051de4_25a8fbb80240" - def TMail.new_boundary - 'mimepart_' + random_tag - end - - # Provides a new email message ID. You can use this to generate unique email message - # id's for your email so you can track them. - # - # Optionally takes a fully qualified domain name (default to the current hostname - # returned by Socket.gethostname) that will be appended to the message ID. - # - # For Example: - # - # email.message_id = TMail.new_message_id - # #=> "<47bf66845380e_25a8fbb80332@baci.local.tmail>" - # email.to_s - # #=> "Message-Id: <47bf668b633f1_25a8fbb80475@baci.local.tmail>\n\n" - # email.message_id = TMail.new_message_id("lindsaar.net") - # #=> "<47bf668b633f1_25a8fbb80475@lindsaar.net.tmail>" - # email.to_s - # #=> "Message-Id: <47bf668b633f1_25a8fbb80475@lindsaar.net.tmail>\n\n" - def TMail.new_message_id( fqdn = nil ) - fqdn ||= ::Socket.gethostname - "<#{random_tag()}@#{fqdn}.tmail>" - end - - #:stopdoc: - def TMail.random_tag #:nodoc: - @uniq += 1 - t = Time.now - sprintf('%x%x_%x%x%d%x', - t.to_i, t.tv_usec, - $$, Thread.current.object_id, @uniq, rand(255)) - end - private_class_method :random_tag - - @uniq = 0 - - #:startdoc: - - # Text Utils provides a namespace to define TOKENs, ATOMs, PHRASEs and CONTROL characters that - # are OK per RFC 2822. - # - # It also provides methods you can call to determine if a string is safe - module TextUtils - - aspecial = %Q|()<>[]:;.\\,"| - tspecial = %Q|()<>[];:\\,"/?=| - lwsp = %Q| \t\r\n| - control = %Q|\x00-\x1f\x7f-\xff| - - CONTROL_CHAR = /[#{control}]/n - ATOM_UNSAFE = /[#{Regexp.quote aspecial}#{control}#{lwsp}]/n - PHRASE_UNSAFE = /[#{Regexp.quote aspecial}#{control}]/n - TOKEN_UNSAFE = /[#{Regexp.quote tspecial}#{control}#{lwsp}]/n - - # Returns true if the string supplied is free from characters not allowed as an ATOM - def atom_safe?( str ) - not ATOM_UNSAFE === str - end - - # If the string supplied has ATOM unsafe characters in it, will return the string quoted - # in double quotes, otherwise returns the string unmodified - def quote_atom( str ) - (ATOM_UNSAFE === str) ? dquote(str) : str - end - - # If the string supplied has PHRASE unsafe characters in it, will return the string quoted - # in double quotes, otherwise returns the string unmodified - def quote_phrase( str ) - (PHRASE_UNSAFE === str) ? dquote(str) : str - end - - # Returns true if the string supplied is free from characters not allowed as a TOKEN - def token_safe?( str ) - not TOKEN_UNSAFE === str - end - - # If the string supplied has TOKEN unsafe characters in it, will return the string quoted - # in double quotes, otherwise returns the string unmodified - def quote_token( str ) - (TOKEN_UNSAFE === str) ? dquote(str) : str - end - - # Wraps supplied string in double quotes unless it is already wrapped - # Returns double quoted string - def dquote( str ) #:nodoc: - unless str =~ /^".*?"$/ - '"' + str.gsub(/["\\]/n) {|s| '\\' + s } + '"' - else - str - end - end - private :dquote - - # Unwraps supplied string from inside double quotes - # Returns unquoted string - def unquote( str ) - str =~ /^"(.*?)"$/ ? $1 : str - end - - # Provides a method to join a domain name by it's parts and also makes it - # ATOM safe by quoting it as needed - def join_domain( arr ) - arr.map {|i| - if /\A\[.*\]\z/ === i - i - else - quote_atom(i) - end - }.join('.') - end - - #:stopdoc: - ZONESTR_TABLE = { - 'jst' => 9 * 60, - 'eet' => 2 * 60, - 'bst' => 1 * 60, - 'met' => 1 * 60, - 'gmt' => 0, - 'utc' => 0, - 'ut' => 0, - 'nst' => -(3 * 60 + 30), - 'ast' => -4 * 60, - 'edt' => -4 * 60, - 'est' => -5 * 60, - 'cdt' => -5 * 60, - 'cst' => -6 * 60, - 'mdt' => -6 * 60, - 'mst' => -7 * 60, - 'pdt' => -7 * 60, - 'pst' => -8 * 60, - 'a' => -1 * 60, - 'b' => -2 * 60, - 'c' => -3 * 60, - 'd' => -4 * 60, - 'e' => -5 * 60, - 'f' => -6 * 60, - 'g' => -7 * 60, - 'h' => -8 * 60, - 'i' => -9 * 60, - # j not use - 'k' => -10 * 60, - 'l' => -11 * 60, - 'm' => -12 * 60, - 'n' => 1 * 60, - 'o' => 2 * 60, - 'p' => 3 * 60, - 'q' => 4 * 60, - 'r' => 5 * 60, - 's' => 6 * 60, - 't' => 7 * 60, - 'u' => 8 * 60, - 'v' => 9 * 60, - 'w' => 10 * 60, - 'x' => 11 * 60, - 'y' => 12 * 60, - 'z' => 0 * 60 - } - #:startdoc: - - # Takes a time zone string from an EMail and converts it to Unix Time (seconds) - def timezone_string_to_unixtime( str ) - if m = /([\+\-])(\d\d?)(\d\d)/.match(str) - sec = (m[2].to_i * 60 + m[3].to_i) * 60 - m[1] == '-' ? -sec : sec - else - min = ZONESTR_TABLE[str.downcase] or - raise SyntaxError, "wrong timezone format '#{str}'" - min * 60 - end - end - - #:stopdoc: - WDAY = %w( Sun Mon Tue Wed Thu Fri Sat TMailBUG ) - MONTH = %w( TMailBUG Jan Feb Mar Apr May Jun - Jul Aug Sep Oct Nov Dec TMailBUG ) - - def time2str( tm ) - # [ruby-list:7928] - gmt = Time.at(tm.to_i) - gmt.gmtime - offset = tm.to_i - Time.local(*gmt.to_a[0,6].reverse).to_i - - # DO NOT USE strftime: setlocale() breaks it - sprintf '%s, %s %s %d %02d:%02d:%02d %+.2d%.2d', - WDAY[tm.wday], tm.mday, MONTH[tm.month], - tm.year, tm.hour, tm.min, tm.sec, - *(offset / 60).divmod(60) - end - - - MESSAGE_ID = /<[^\@>]+\@[^>\@]+>/ - - def message_id?( str ) - MESSAGE_ID === str - end - - - MIME_ENCODED = /=\?[^\s?=]+\?[QB]\?[^\s?=]+\?=/i - - def mime_encoded?( str ) - MIME_ENCODED === str - end - - - def decode_params( hash ) - new = Hash.new - encoded = nil - hash.each do |key, value| - if m = /\*(?:(\d+)\*)?\z/.match(key) - ((encoded ||= {})[m.pre_match] ||= [])[(m[1] || 0).to_i] = value - else - new[key] = to_kcode(value) - end - end - if encoded - encoded.each do |key, strings| - new[key] = decode_RFC2231(strings.join('')) - end - end - - new - end - - NKF_FLAGS = { - 'EUC' => '-e -m', - 'SJIS' => '-s -m' - } - - def to_kcode( str ) - flag = NKF_FLAGS[TMail.KCODE] or return str - NKF.nkf(flag, str) - end - - RFC2231_ENCODED = /\A(?:iso-2022-jp|euc-jp|shift_jis|us-ascii)?'[a-z]*'/in - - def decode_RFC2231( str ) - m = RFC2231_ENCODED.match(str) or return str - begin - to_kcode(m.post_match.gsub(/%[\da-f]{2}/in) {|s| s[1,2].hex.chr }) - rescue - m.post_match.gsub(/%[\da-f]{2}/in, "") - end - end - - def quote_boundary - # Make sure the Content-Type boundary= parameter is quoted if it contains illegal characters - # (to ensure any special characters in the boundary text are escaped from the parser - # (such as = in MS Outlook's boundary text)) - if @body =~ /^(.*)boundary=(.*)$/m - preamble = $1 - remainder = $2 - if remainder =~ /;/ - remainder =~ /^(.*?)(;.*)$/m - boundary_text = $1 - post = $2.chomp - else - boundary_text = remainder.chomp - end - if boundary_text =~ /[\/\?\=]/ - boundary_text = "\"#{boundary_text}\"" unless boundary_text =~ /^".*?"$/ - @body = "#{preamble}boundary=#{boundary_text}#{post}" - end - end - end - #:startdoc: - - - end - -end diff --git a/vendor/tmail-1.2.3.1/lib/tmail/version.rb b/vendor/tmail-1.2.3.1/lib/tmail/version.rb deleted file mode 100644 index 95228497c..000000000 --- a/vendor/tmail-1.2.3.1/lib/tmail/version.rb +++ /dev/null @@ -1,39 +0,0 @@ -# -# version.rb -# -#-- -# Copyright (c) 1998-2003 Minero Aoki -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Note: Originally licensed under LGPL v2+. Using MIT license for Rails -# with permission of Minero Aoki. -#++ - -#:stopdoc: -module TMail - module VERSION - MAJOR = 1 - MINOR = 2 - TINY = 3 - - STRING = [MAJOR, MINOR, TINY].join('.') - end -end diff --git a/vendor/tmail-1.2.3.1/lib/tmailscanner.bundle b/vendor/tmail-1.2.3.1/lib/tmailscanner.bundle deleted file mode 100755 index f3c89ebbb..000000000 Binary files a/vendor/tmail-1.2.3.1/lib/tmailscanner.bundle and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/log/BugTrackingLog.txt b/vendor/tmail-1.2.3.1/log/BugTrackingLog.txt deleted file mode 100644 index ec10737e2..000000000 --- a/vendor/tmail-1.2.3.1/log/BugTrackingLog.txt +++ /dev/null @@ -1,1231 +0,0 @@ -== Fri Apr 11 12:16:27 GMT 2008 Mikel Lindsaar - -* RELEASE TMAIL 1.2.3.1 - -* Closed #19429 - Gem will not install in windows - -== Fri Apr 10 12:16:13 GMT 2008 Mikel Lindsaar - -* RELEASE TMAIL 1.2.3 - -== Mon Mar 31 04:26:19 GMT 2008 Mikel Lindsaar - -* Closed #19203 - TMail errors in Ruby 1.9.1 on invalid multibyte chars - -== Mon Mar 17 09:08:04 GMT 2008 Mikel Lindsaar - -* Closed #18881 - TMail goes into an endless loop if extra whitespace on a line to be wrapped - -== Fri Mar 14 12:01:31 GMT 2008 Mikel Lindsaar - -* Closed #18814 - Fixed attchment.rb failing on mail part that had a nil content-type (Mikel Lindsaar) - -== Sat Mar 1 23:34:40 GMT 2008 Mikel Lindsaar - -* Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) - -* Closed #18515 - Removed ftools from test case (Charles Lowe) - -== Fri Feb 22 15:28:16 GMT 2008 Mikel Lindsaar - -* A _LOT_ more documentation, almost ready for the next release - -== Thu Feb 21 10:40:21 GMT 2008 Mikel Lindsaar - -* Closed #18038 - Multiple froms not being parsed correctly, added a test case to cover this and show the correct handling - (Mikel) - -== Wed Feb 13 00:40:08 GMT 2008 Mikel Lindsaar - -* Closed #17719 - Reading unix mailbox fails using File.truncate - (Mikel) - -* Updated documentation for UNIXMbox.new - -== Tue Jan 15 04:09:28 GMT 2008 Mikel Lindsaar - -* Added another test case from ActionMailer into test_quote.rb - -== Tue Jan 15 01:50:23 GMT 2008 Mikel Lindsaar - -* Closed #17011 - test_quote.rb fails on 1.9 - (Mikel) - -* Closed #17007 - test_header.rb fails on 1.9 - (Mikel) - -* Closed #17008 - test_mail.rb fails on 1.9 - (Mikel) - -== Sat Jan 12 04:13:47 GMT 2008 Mikel Lindsaar - -* Closed #17012 - test_scanner.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -* Closed #17010 - test_port.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -* Closed #17009 - test_mbox.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -* Closed #17006 - test_encode.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -* Closed #17005 - test_attachments.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -* Closed #17004 - test_address.rb fails on 1.9 - (Mikel and Kornelius Kalnbach) - -== Sat Jan 12 02:07:24 GMT 2008 Mikel Lindsaar - -* Closed #17044 - Fixed Minero's TODO: "allow this type of header: "Minero A. " - -* Closed #17045 - Fixed the Address class to pre quote the email address 'mikel@me.com ' into '"mikel@me.com" ' which handles this problem - -== Sat Jan 10 10:13:12 GMT 2008 Mikel Lindsaar - -=== TMail 1.2.1 Released - -== Thu Jan 10 15:09:02 GMT 2008 Mikel Lindsaar - -* Closed #16899 - HeaderField.new_from_port and added test cases to cover this code. Also changed behaviour of HeaderField.new_from_port to return nil if it does not find a matching header in the port provided. Extended UNIXMbox.fromaddr to also search for EnvelopeSender and also made it a public method, not private - Thanks to Maarten O. for alerting these bugs - -* Closed #16900 - UNIXMbox.fromaddr missing port param and does not return Envelope Sender. This report was initially to correct typo on "Regep" to "Regexp". Also added test cases to cover this class method. Also added ability to scan for the EnvelopeSender explictly as it would not come up on searching for "From" due to Regexp confilct with From: (with the colon). Thanks to Maarten O. for reporting this. - -== Thu Dec 25 23:10:16 GMT 2007 Mikel Lindsaar - -* Closed Bug - Handled quote boundary being gready on content-type header fields (M. Mondragon) - -== Thu Dec 25 20:10:46 GMT 2007 Mikel Lindsaar - -* Change the name of mailscanner to tmailscanner to handle a copyright issue. MailScanner is a copyrighted name. - -== Thu Dec 02 11:11:36 GMT 2008 Mikel Lindsaar - -* Added about 15 test cases from the Rails community. Added failing test case for an unquoted @ char in the From header field. Need to check fully if this is needed or not, but it is there anyway - to be resolved. I have emailed 822 mailing list to check this out. - -== Fri Nov 30 08:04:09 GMT 2007 Mikel Lindsaar - -* Closed 16025 - TMail scanner.rb would not parse ATOM chars correctly making it fail tests where the C version passed them. Fixed this by updating the Scanner.rb version to be in step with the C version (there was an extra @ symbol in the ATOM CHARS definition that was not in the C version.) (mikel) - -== Fri Nov 25 05:41:15 GMT 2007 Mikel Lindsaar - -* Closed 16283 - TMail would not decode correctly due to bug in text-utils - put in previous patch from old tmail trunk version. Thanks to garyo for spotting this. - -== Mon Nov 19 23:15:29 GMT 2007 Mikel Lindsaar - -* Added about 500 lines of documentation to the interface.rb file. - -* Changed TMail::Mail#sender to have a default "default" value of nil to be in alignment with all the other interface values. - -== Thu Nov 15 13:26:45 GMT 2007 Mikel Lindsaar - -* Closed 15445 - TMail::Mail#create_forward now returns a new Mail object that has the original mail as an encoded 7 bit multipart attachment. Also moved create_forward and create_reply from tmail/net into tmail/interface as it makes more sense to have it there. - -* Closed 15643 - TMail::Mail#reply_addresses was returning an empty array if reply_to was set to nil (ie, the header field existed but was empty) instead of returning the from address or default. - -* Did a BUNCH of documentation of the tmail/interface.rb file. - -* Made base64_decode and base64_encode into ! versions as they are destructive on the mail body (encodes the body to base64 or decodes it), made aliases for base64_decode and base64_encode to point back to the bang versions. Doing this with a view to change base64_encode to a non destructive version (returns the encoded body) in future versions. - -= Version 1.1.1. Released Mon Oct 24 21:14:00 2007 +1100 - -== Thu Nov 1 10:02:26 GMT 2007 Mikel Lindsaar - -* Closed Did another patch on the folding, re-read the RFC's and got clarification on when SHOULD and MUST fold. New folding section at the bottom of encode handles various line lengths which include or do not include whitespace - -== Wed Oct 31 05:10:34 GMT 2007 Mikel Lindsaar - -* Put in an escape clause in the def fold method of class Encode to skip folding of any X- header line. - -== Sun Oct 28 03:45:16 GMT 2007 Mikel Lindsaar - -* Refactored how the package was going to_s - made the handling of quotation marks inside of the header more consistent and in accordance with the RFCs on the matter (ie, a filename in a content-disposition field paramater filename=README.TXT will not be quoted unless it contains special characters per RFC 1521 ) - -== Sun Oct 28 03:45:16 GMT 2007 Mikel Lindsaar - -* Made the package into a GEM - -== Sat Oct 27 05:43:36 GMT 2007 Mikel Lindsaar - -* Re-factored the quotation handling - learnt more about how this is implemented by Minero, and re-wrote my handling of it to preserve quotation marks in the headers - -== Sat Oct 27 05:43:36 GMT 2007 Mikel Lindsaar - -* Closed 15077 - Assigning the body via mail.body would not reparse the email body text. Changed mail.rb to reparse body if assigned via body= String. - -== Thu Oct 25 05:52:02 GMT 2007 Mikel Lindsaar - -* Moved facade.rb to interface.rb - updated mail.rb to reflect this - -== Thu Oct 25 05:39:09 GMT 2007 Mikel Lindsaar - -* Totally rewrote the README file to be in RDoc format and provide a beginning place for the RDoc documentation - -* Cleaned up the root directory of all the spurious files. - -* Merged the Changelog files and made it into RDoc format. - -* Cleaned up the Bugs and TODO files - -* Added RDoc headers to each source file. - -* Started doing the RDoc on the utils.rb file - -== Thu Oct 25 11:12:00 2007 +1100 Mikel Lindsaar - -* Added quickstart page to WWW as well as applied styling to all existing pages in the site. - -* Uploaded site to rubyforge - -== Thu Oct 25 9:00:00 2007 Tom - -* Added website to trunk, basic styling and templates, logos and general layout. - -= Version 0.11.0. Released Mon Oct 24 21:14:00 2007 +1100 - -== Wed Oct 24 17:50:00 2007 +1100 Mikel Lindsaar - -* Fixed all but two tests which are one encoding problem with relating to RFC 2231 and another problem where special characters are not properly quoted if they are the name portion of an email address (ie, TMail does not handle the address <"@"@example.com> properly) - -* Closed #14964 - The TMail from ActionMailer Preview Release 2.0 is now fully merged. All previous tests and examples relating to TMail that were part of ActionMailer 2.0 Preview Release now pass. - -* Closed #15008 - Fixed handling of multipart content type headers. Now tested against many types of email. TMails' behaviour now is to take any boundary type, if it contains illegal characters, it will wrap it in "" when requesting the content type by mail['content-type] you will receive it unquoted, when outputting the email to_s as a whole you will receive the content-type field with the boundary section quoted if it contains illegal characters. - -* Replaced id with object_id line 221 in stringio.rb - -== Wed Oct 24 15:35:00 2007 +1100 Mikel Lindsaar - -* Copied over the TMail/*.rb files from the TRUNK version of Rails ActionMailer (2.0 Preview Release) into branch for 0.11.0 - -* Fixed up many broken tests so that they pass (testing errors, including wrong paths etc) - -* Closed #15002 - Fixed error where handling of MIME content-type headers that had quoted parameters due to including RFC 2045 special characters were being stripped of their quotation marks when the mail object was sent "to_s". Now any quotation marks that were in the original are maintained in the result - -* Closed #14999 - TMail now "fixes" illegal Content-Type bondary= parameter by wrapping it in double quotation marks per RFC 2045 and also produces this in the mail.to_s method - -* Added in tmail/core_extensions.rb which installs Object.blank? unless Object already responds_to?(:blank?) ie, we are already in a Rails environment. - -* Updated names of the test files as a start to cleaning up the tests directory. - -= Version 0.10.9. Released Mon Oct 22 00:36:00 2007 +1100 - -== Mon Oct 22 22:32:00 2007 Mikel Lindsaar - -* General cleanup - converted all files to UTF-8 from the various encodings. - -== Mon Oct 22 22:00:00 2007 +1100 Mikel Lindsaar - -* Fixed all tests so that they now pass - were problems with the times being checked were hard coded for Tokyo time and so would fail in a different time zone. All of these now pass - -* Fixed handling of MIME content-type header handling so that TMail now quotes any content-type it finds to contain invalid characters per RFC 2045 which are "/", "?" or "=". Per RFC, handling is to put double quotes are put around it with the quote_boundary method, we now do this. - -* Updated Copyright year for Minero Aoki - -= Version 0.10.8. Released Fri Feb 20 09:37:34 2004 - -== Fri Feb 20 09:34:40 2004 Minero Aoki - -* lib/tmail/*.rb, ext/.c: Lesser GPL is LGPL 2.1. - -* lib/tmail/*.rb, ext/*.c: update Copyright year. - -== Fri Feb 20 09:33:42 2004 Minero Aoki - -* Makefile: new target `import'. - -* Makefile (dist): exectest.rb is useless now because tests do not use runit. - -* Makefile (dist): remove web/. - -== Fri Feb 20 09:31:58 2004 Minero Aoki - -* lib/tmail/stringio.rb: import amstd/stringio.rb rev 1.12. - -== Fri Feb 20 09:16:20 2004 Minero Aoki - -* NEWS: new file. - -== Fri Feb 20 09:02:35 2004 Minero Aoki - -* Makefile (clean): cleans documentation - -== Fri Feb 20 09:02:03 2004 Minero Aoki - -* doc/* .rrd.m: use 'a|b' to expressing "type a or b". - -== Fri Feb 20 08:57:24 2004 Minero Aoki - -* doc/* .rrd.m: ( arg ) -> (arg). - -== Fri Feb 20 08:49:09 2004 Minero Aoki - -* lib/tmail/mailbox.rb: require 'tmail/textutils' to be independent. - -== Fri Feb 20 08:35:00 2004 Minero Aoki - -* Makefile: version 0.10.8. - -* ext/tmail/scanner_c/scanner_c.c: ditto. - -* lib/tmail/info.rb: ditto. - -* lib/tmail/scanner_r.rb: ditto. - -== Fri Feb 20 08:34:00 2004 Minero Aoki - -* test/testbase64.rb: moved from ext/tmail/base64. - -== Mon Nov 3 18:37:46 2003 Minero Aoki - -* ext/tmail/base64/base64.c: eliminate cc warning. - -* ext/tmail/base64/base64.c: use StringValue instead of rb_str2cstr if exists. - -== Mon Nov 3 18:36:15 2003 Minero Aoki - -* Makefile: replace `make' with $(MAKE) macro. - -* Makefile: new target `clean'. - -* ext/tmail/Makefile: replace `make' with $(MAKE) macro. - -* ext/tmail/Makefile: new target `clean', `distclean'. - -* lib/tmail/Makefile: add header. - -== Mon Nov 3 18:34:12 2003 Minero Aoki - -* lib/tmail/port.rb: #filename -> #path (alias filename) - -* lib/tmail/port.rb: @filename -> @path - -* lib/tmail/port.rb (copy_file): simplify. - -* lib/tmail/port.rb: apply latest coding style. - -== Sun Oct 12 12:50:35 2003 Minero Aoki - -* Makefile: new target "test". - -== Sun Oct 12 12:46:02 2003 Minero Aoki - -* lib/tmail/textutils.rb: @uniq -> @@uniq, to allow including TextUtils. - -* test/testtextutils.rb: new file. - -* test/testtextutils.rb: test TextUtils#new_boundary. - -== Thu Oct 9 05:10:51 2003 Brian F. Feldman - -* mailbox.rb (fromaddr): should take parameter. - -* header.rb (new_from_port): modify typo. - -== Fri Sep 12 16:54:07 2003 Minero Aoki - -* sample/sendmail.rb (setup_mail): small refactoring. - -== Fri Sep 12 16:48:49 2003 Minero Aoki - -* sample/extract-attachments.rb: new file. - -== Fri Sep 12 16:23:46 2003 Minero Aoki - -* lib/tmail/mailbox.rb (UNIXMbox): should be able to trancate mbox file. The patch is contributed -by Brian Fundakowski. - -== Thu Aug 28 16:52:55 2003 Minero Aoki - -* Makefile: install.rb -> setup.rb - -== Tue Aug 12 09:20:05 2003 Minero Aoki - -* lib/tmail/mail.rb ([]=): raise BadMessage if multiple headers set. - -== Thu Aug 7 18:52:10 2003 Minero Aoki - -* lib/tmail/mail.rb (read_multipart): return if the message have not boundary. [ruby-list:38050] - -* test/testmail.rb: test it. - -== Thu Aug 7 18:50:46 2003 Minero Aoki - -* doc/mailbox.rrd.m: adjust header level. - -* doc/port.rrd.m: ditto. - -== Sat Aug 2 21:43:16 2003 Minero Aoki - -* doc/address.rrd.m: use new ReferenceRD type designator. - -* doc/config.rrd.m: ditto. - -* doc/mail.rrd.m: ditto. - -* doc/mailbox.rrd.m: ditto. - -* doc/port.rrd.m: ditto. - -* doc/tmail.rrd.m: ditto. - -== Tue Jun 24 03:12:24 2003 Minero Aoki - -* lib/tmail/Makefile: rm -> rm -f. - -* lib/tmail/Makefile: BSD make does not accept $<. - -== Wed May 21 16:10:56 2003 Minero Aoki - -* lib/tmail/mail.rb (set_disposition): tested. - -* lib/tmail/textutils.rb: new const RFC2231_UNSAFE - -* lib/tmail/encode.rb (encode_value): use RFC2231_UNSAFE. - -* lib/tmail/encode.rb (encode_value): encoded hex must use capital A-F. - -* test/testmail.rb: new method #test_set_disposition. - -* test/testheader.rb: typo: attached -> attachment - -* test/testheader.rb: test RFC2231 decoding. - -== Mon May 19 07:34:01 2003 Minero Aoki - -* sample/sendmail.rb: rewritten. - -== Mon May 19 06:36:41 2003 Minero Aoki - -* lib/tmail/mail.rb: include facade.rb. - -* lib/tmail/facade.rb: removed. - -* lib/tmail/utils.rb: move TextUtils modules in to tmail/textutils.rb. - -* lib/tmail/textutils.rb: new file. - -* lib/tmail/encode.rb: tmail/utils -> tmail/textutils - -* lib/tmail/header.rb: ditto. - -* lib/tmail/parser.y: ditto. - -* lib/tmail/scanner.rb: ditto. - -* lib/tmail/obsolete.rb: obsolete Mail.loadfrom, load_from. - -* lib/tmail/obsolete.rb: Mail#from_address is not obsolete. - -== Mon May 19 06:22:06 2003 Minero Aoki - -* lib/tmail/Makefile: new task `clean' and `distclean'. [ruby-list:37687] - -* ext/tmail/Makefile: ditto. - -== Sun May 18 03:02:57 2003 Minero Aoki - -* lib/tmail/Makefile: change racc log file name. - -== Sun May 18 03:01:27 2003 Minero Aoki - -* lib/tmail/parser.y: remove useless (last added) rule `received_spec'. - -== Sun May 18 03:00:16 2003 Minero Aoki - -* lib/tmail/parser.y (local): allow "foo.bar." and "foo..bar". - -* lib/tmail/address.rb: allow empty "word". - -* lib/tmail/address.rb (local): return '""' on empty local. - -* test/testaddress.rb (test_parse__dot): test "foo.bar." and "foo..bar". - -* test/testaddress.rb (test_parse__outofspec): Now empty local is legal. - -== Sun May 18 02:56:07 2003 Minero Aoki - -* Makefile (dist): version tag is like V1-2-3 ('_' -> '-') - -== Sun May 18 02:04:34 2003 Minero Aoki - -* lib/tmail/info.rb: update version. - -* lib/tmail/scanner_r.rb: ditto. - -* ext/tmail/scanner_c/scanner_c.c: ditto. - -== Sun May 18 02:03:42 2003 Minero Aoki - -* Makefile: new task `update'. - -* Makefile (dist): export selected version. - -== Sun May 18 01:00:47 2003 Minero Aoki - -* lib/tmail/Makefile: fix quoting bug. - -== Sun May 18 00:56:24 2003 Minero Aoki - -* Makefile: define DEBUG=true on local compilation. - -* lib/tmail/Makefile: add debug options if defined(DEBUG) - -== Sun May 18 00:47:26 2003 Minero Aoki - -* Makefile: put install.rb into packages. - -* Makefile: put COPYING into packages. - -== Sun May 18 00:44:28 2003 Minero Aoki - -* Makefile: create lib/tmail/parser.rb before packing. - -* lib/tmail/Makefile: use racc -E. - -== Sun May 18 00:36:56 2003 Minero Aoki - -* test/kcode.rb: "class RUNIT::TestCase" syntax is 1.8 feature. - -== Sun May 18 00:28:22 2003 Minero Aoki - -* Makefile: new task `doc'. - -* Makefile: new task `site'. - -* doc/index.html.m -> doc/index.rhtml.m - -== Sat May 17 23:54:22 2003 Minero Aoki - -* Remake: removed. - -== Sat May 17 20:50:43 2003 Minero Aoki - -* doc/address.rrd.m: add 'j' and '.' mark explicitly. - -* doc/basics.rd.m: ditto. - -* doc/config.rrd.m: ditto. - -* doc/details.rd.m: ditto. - -* doc/index.html.m: ditto. - -* doc/mail.rrd.m: ditto. - -* doc/mailbox.rrd.m: ditto. - -* doc/port.rrd.m: ditto. - -* doc/tmail.rrd.m: ditto. - -* doc/usage.rd.m: ditto. - -== Sat May 17 20:48:34 2003 Minero Aoki - -* Makefile: cvs export option was wrong. - -== Sat May 17 20:37:23 2003 Minero Aoki - -* rename doc/ -* -> doc/ -* .m - -== Sat May 17 20:13:40 2003 Minero Aoki - -* Makefile: wrote .PHONY. - -* ext/tmail/Makefile: wrote .PHONY. - -== Fri May 16 22:55:52 2003 Minero Aoki - -* Makefile: remove useless old code. - -* lib/tmail/Makefile: new file. - -* lib/tmail/stringio.rb: imported from amstd. - -* ext/tmail/Makefile: new file. - -== Fri May 16 22:27:28 2003 Minero Aoki - -* .cvsignore -> lib/tmail/.cvsignore - -== Fri May 16 22:23:57 2003 Minero Aoki - -* accept setup.rb hierarchy in the repository. - -== Fri May 16 21:18:44 2003 Minero Aoki - -* encode.rb (concat_E): force to flush @text before process. - -* encode.rb: update coding style. - -* test/testmail.rb: test if comments are decoded/encoded. - -== Fri May 16 21:01:55 2003 Minero Aoki - -* test/testkcode.rb: new file. - -* test/testmail.rb: use kcode.rb. - -* test/testheader.rb: ditto. - -== Fri May 16 20:58:01 2003 Minero Aoki - -* mailbox.rb (MhMailbox#inspect): fix. - -* mailbox.rb (UNIXMbox): new method UNIXMbox.static_new - -* mailbox.rb (UNIXMbox): does update check of mail spool. - -* mailbox.rb (UNIXMbox): fix temporal directory clean up. - -== Fri May 16 20:50:40 2003 Minero Aoki - -* facade.rb (Mail#friendly_from): use comments. - -== Fri May 16 20:49:58 2003 Minero Aoki - -* header.rb: update coding style. - -== Fri May 16 20:44:49 2003 Minero Aoki - -* parser.y (Parser#parse): decode comments. - -* test/testheader.rb: test if comments are decoded. - -== Fri May 16 20:42:59 2003 Minero Aoki - -* mail.rb: rename method: Mail#select -> values_at - -== Mon Apr 28 07:55:52 2003 Minero Aoki - -* facade.rb (to, cc, bcc, from, reply_to): support AddressGroup. - -* test/testmail.rb (to, cc, bcc, from, reply_to): ditto. - -== Mon Apr 28 07:54:31 2003 Minero Aoki - -* facade.rb: escape ']' following warning. - -* scanner_r.rb: ditto. - -== Sat Apr 5 01:40:44 2003 Minero Aoki - -* Makefile: implement task `dist'. - -== Sat Apr 5 01:24:08 2003 Minero Aoki - -* b64 -> base64 - -* b64/tmbase64.c -> base64/base64.c - -* base64/extconf.rb: Shared object name is 'base64.so'. - -* encode.rb: require tmail/base64.rb explicitly. - -== Sat Apr 5 01:22:40 2003 Minero Aoki - -* Makefile: new task 'dist'. - -== Sat Apr 5 01:02:40 2003 Minero Aoki - -* Makefile: new file. - -== Sat Apr 5 01:01:48 2003 Minero Aoki - -* mv rmails.rb scanner_r.rb - -* mv sc scanner_c - -* mv sc/cmails.c scanner_c/scanner_c.c - -* mv T test - -== Sat Apr 5 00:30:53 2003 Minero Aoki - -* mbox.rb: new file. Added for backward compatibility. - -== Sat Apr 5 00:30:06 2003 Minero Aoki - -* mbox.rb: renamed to mailbox.rb. - -* mailbox.rb: new file. - -== Sat Apr 5 00:30:06 2003 Minero Aoki - -* mp.y -> parser.y - -== Fri Nov 15 17:56:01 2002 Minero Aoki - -* sc/mails.c: missing prototype. - -= Version 0.10.6. Released Sun Nov 10 23:19:45 2002 - -== Sun Nov 10 23:19:17 2002 Minero Aoki - -* doc/mail.rrd: format examples correctly. - -== Sun Nov 10 22:59:08 2002 Minero Aoki - -* doc/mail.rrd: add Mail#type_param, disposition_param. - -== Sun Nov 10 22:37:42 2002 Minero Aoki - -* address.rb: adjust to new coding rule. - -* encode.rb: ditto. - -* header.rb: ditto. - -* mail.rb: ditto. - -* mbox.rb: ditto. - -* mp.y: ditto. - -* net.rb: ditto. - -* obsolete.rb: ditto. - -* port.rb: ditto. - -* rmails.rb: ditto. - -== Sun Nov 10 22:37:01 2002 Minero Aoki - -* T/testmail.rb: test whether the `default' arg is working. - -* utils.rb: decode (wrongly encoded) parameters for Content-Disposition. - -* T/testmail.rb: test MIME-B decode for disposition parameters. - -* facade.rb: set_disposition should overwrites params. - -* facade.rb: set_content_type should overwrites params. - -== Sun Nov 10 20:46:25 2002 Minero Aoki - -* facade.rb (set_content_type): reject wrong text like "text". - -== Sun Nov 10 20:15:15 2002 Minero Aoki - -* facade.rb: TMail::Mail#message_id, mime_version, content_type, sub_type, transfer_encoding, -disposition: default value did not work. - -* facade.rb: new method TMail::Mail#disposition_params, disposition_param - -== Sun Nov 10 20:13:35 2002 Minero Aoki - -* mail.rb: new method TMail::Mail#each_port. - -== Sun Nov 10 20:12:50 2002 Minero Aoki - -* address.rb: type -> self.class - -* header.rb: ditto. - -* port.rb: ditto. - -== Sun Nov 10 20:11:13 2002 Minero Aoki - -* T/testmail.rb: check "Content-Type: text" (missing subtype). - -== Sun Nov 10 20:10:22 2002 Minero Aoki - -* sc/mails.c: Check_Type -> StringValue. - -* sc/mails.c: reformat. - -== Thu Nov 7 05:11:21 2002 Minero Aoki - -* mbox.rb (UNIXMbox): fix typo. (thanks: Brian Fundakowski Feldman) - -== Wed Aug 14 18:58:35 2002 Minero Aoki - -* mail.rb: does not delay to read message body unless @port.reproducible? - -* port.rb: new method Port#reproducible? - - (thanks: Simon Conrad-Armes) - -== Wed Aug 14 18:53:52 2002 Minero Aoki - -* facade.rb: modify format. - -= Version 0.10.5. Released Wed Jul 10 20:47:15 2002 - -== Wed Jul 10 20:25:16 2002 Minero Aoki - -* facade.rb: new method Mail#header_string. - -* facade.rb: new method Mail#type_params, type_param. - -== Wed Jul 10 20:23:29 2002 Minero Aoki - -* port.rb: reduce warnings. - -== Wed Jul 10 20:23:03 2002 Minero Aoki - -* b64/depend, sc/depend: -* .o depend on Makefile and -* .h - -== Thu May 30 22:25:11 2002 Minero Aoki - -* mbox.rb (Maildir#new_port): use unique sequence number instead of sleep & try. (patched by -Kikutani, Makoto) - -* mbox.rb (Maildir#new_port): takes optional block to initialize mail file. - -* port.rb (MaildirPort): new method #move_to_new, #move_to_cur. - -== Thu May 30 21:28:52 2002 Minero Aoki - -* header.rb: internal_new had not initialized @comment. (reported by Kikutani, Makoto) - -* encode.rb (HFdecoder): quote phrase. - -== Thu May 30 20:44:27 2002 Minero Aoki - -* header.rb (ReturnPathHeader): support null address spec. (reported by Kikutani, Makoto) - -== 0.10.4 (2002-05-17) - -* Maildir ãŒå‹•ã„ã¦ã„ãªã‹ã£ãŸ - -* Maildir#each_port ã®æ¸¡ã™ãƒ•ァイルãŒåå‰ã§ã‚½ãƒ¼ãƒˆã•れã¦ã„ãŸã®ã‚’ 時間順ã«ãªã‚‹ã‚ˆã†ã«ã—㟠(patched by Kukutani, Makoto) - -* 空㮠Return-Path ã§è½ã¡ãªã„よã†ã«ã—㟠(reported by Morikawa-san) English: Maildir did not work correctly. - -* Maildir#each_port yields filenames sorted by time, not filename. (patched by Kukutani, Makoto) - -* allows empty return path (Return-Path: <>). (reported by Morikawa-san) - -== 0.10.3 (2002-05-07) - -* ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.0 ã§å‰Šé™¤ã™ã‚‹äºˆå®šã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ obsolete.rb ã«ã¾ã¨ã‚ãŸã€‚ ã“れを require ã—ãªã„ã“ã¨ã§ 1.0 ã®æŒ™å‹•をテストã§ãる。(デフォルトã§ã¯ require ã™ã‚‹) - -* Mail ã® set 系メソッドã»ã¨ã‚“ã©ãŒãƒã‚°ã®ãŸã‚å‹•ã‹ãªã‹ã£ãŸ* æ–°ã—ã„メソッド MhMailbox,UNIXMbox,Maildir#reverse_each_port (suggested by Takabayashi, Satoru) - -* ドキュメントã«ã‚ã‚‹ TMail::Mail#content_type ãŒå®šç¾©ã•れã¦ã„ãªã‹ã£ãŸ (reported by yoshihisa masuda) - -* Content-Type ã® main/sub ã®ã‚ã¨ã« ';' を許ã™ã‚ˆã†ã«ã—㟠(suggested by Lars Christensen) - -* Mutt ã®ä½œã‚‹ Maildir ファイルをパースã§ããªã‹ã£ãŸ* マルãƒãƒ‘ートメールãŒçµ‚端ã•れã¦ã„ãªã„ã¨ãã€to_s ã§è½ã¡ã‚‹ (reported by Kikutani, Makoto) English: devide obsolete methods into obsolete.rb.* Mail#to=, cc=, bcc=, ... did not work.* new methods MhMailbox,UNIXMbox,Maildir#reverse_each_port (suggested by Takabayashi, Satoru) - -* TMail::Mail#content_type is described in document but not defined. (reported by yoshihisa masuda) - -* allow ';' after content type. (suggested by Lars Christensen) - -* TMail::Maildir fails to parse maildir filename created by Mutt. - -* Unterminted multipart mail causes unexpected exception. (reported by Kikutani, Makoto) - -== 0.10.2 (2002-02-21) - -* UnstructuredHeader#to_s ãŒè½ã¡ã‚‹ãƒã‚°ã‚’修正 (patched by Satoru Takabayashi) - -* ReceivedHeader ã§ã€via ãŒã‚ã‚‹ã®ã« by ãŒãªã„ã¨ã〠ã¾ãŸã¯ãã®é€†ã®ã¨ãã«çµæžœãŒãŠã‹ã—ããªã‚‹ãƒã‚°ã‚’修正 (patched by Satoru Takabayashi) - -* TMail::TextUtils.quote_phrase ãŒè½ã¡ã‚‹ãƒã‚°ã‚’修正 (reported by Matt Armstrong) English: UnstructuredHeader#to_s did not work. (patched by Satoru Takabayashi) - -* ReceivedHeader#to_s did not work when h.via exists and h.by not exists (and vice versa). (patched by Satoru Takabayashi) - -* TMail::TextUtils.quote_phrase did not work. (reported by Matt Armstrong) - -== 0.10.1 (2002-02-03) - -* テストスクリプトをパッケージã«è¿½åŠ ã€‚ãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ãƒ‘ース㫠関ã™ã‚‹ãƒ†ã‚¹ãƒˆã‚¹ã‚¯ãƒªãƒ—トã¯å¤§éƒ¨åˆ†ã‚’ RubyMail 0.2 (by Matt Armstrong) ã‹ã‚‰ã‚‚らã„ã¾ã—ãŸã€‚ - -* æ–°ã—ã„クラス TMail::Config - -* ç´°ã‹ã„パーサã®ãƒã‚°ã‚’ãŸãã•ã‚“ç›´ã—㟠- -* クオート中ã®ç”Ÿ JIS 文字列を許ã™ã‚ˆã†ã«ã—㟠- -* TMail::File - -* Stream ã¯å‰Šé™¤ (通常㮠File ã§ç½®ãã‹ãˆãŸ)。 English: test scripts added. Many test cases are imported from RubyMail 0.2, written by Matt Armstrong. - -* new class TMail::Config - -* Minor parser bugs are -eliminated. - -* Parser supports raw iso2022jp strings appeared in quoted-words. - -* TMail::File - -* Stream classes removed. - -== 0.10.0 (2002-01-06) - -* ã„ãã¤ã‹éžäº’æ›ã®å¤‰æ›´ã‚’加ãˆãŸã€‚ 詳細ã¯ãƒ•ァイル Incompatibilities ã‚’å‚ç…§ã®ã“ã¨ã€‚ - -* amstd strscan を使ã†ã®ã‚’ã‚„ã‚㟠- -* mail.so 㯠1.7 最新ã§ã¯ (å•題ãªãå‹•ããŒ) ã¡ã‚‡ã£ã¨å±é™º English: changes many method features of TMail::Mail. see file Incompatibilities. - -* TMail does not depend on amstd/strscan library. - -* mails.so was riskful under latest 1.7 - -== 0.9.9 (2001-11-15) - -* typo in tmail_attr_writer (patched by Shirai, Kaoru) English: typo in tmail_attr_writer (patched by Shirai, Kaoru) - -== 0.9.8 (2001-09-07) - -* é–“é•ã£ã¦ 0.9.7 ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を上書ãã—ã¦å£Šã—ã¦ãŸã®ã§ãã®å†ä¿®æ­£ (thanks Masahiro Sekiya, Joseph McDonald) - -* amstd/futils ã‹ã‚‰ fileutils ã«ç§»è¡Œ - -* インストーラを setup.rb ã‹ã‚‰ install.rb (3.0.0) ã«ç§»è¡Œ English: modify 0.9.7(2) pack miss. (thanks Masahiro Sekiya, Joseph McDonald) - -* amstd/futils -> fileutils - -* setup.rb -> install.rb 3.0.0 - -== 0.9.7 (2001-07-06) - -* HeaderField#body ãŒè½ã¡ã‚‹ãƒã‚°ã‚’修正 - -* Mail クラスã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã‚’åŒæœŸ English: modify bug in HeaderField#body - -* sync TMail::Mail class reference manual - -== 0.9.6 (2001-06-20) - -* æ–°ã—ã„モジュール TMail::Base64 - -* デフォルトã§ã¯æœ¬ä½“ã®æ”¹è¡Œã‚³ãƒ¼ãƒ‰å¤‰æ›ã‚’行ã‚ãªã„ English: new module TMail::Base64 - -* does not convert line terminator by default. - -== 0.9.5 (2001-05-27) - -* ヘッダエンコード㧠fold ã™ã‚‹ã¨ç©ºç™½ãŒæ¶ˆãˆã‚‹ãƒã‚°ã‚’修正 (thanks Akira Yamada) - -* RFC2231 ã«åŠåˆ†å¯¾å¿œ (fold ã«å¯¾å¿œã—ã¦ãªã„) (thanks Yasuhiro Arima) English: spaces were too removed when folding (thanks Akira Yamada) - -* support RFC2231 (still imcomplete) (reported by Yasuhiro Arima) - -== 0.9.4 (2001-04-25) - -* インストーラをアップデート - -* Mail.load - -* Mail#strftime - -* Ruby 1.4 ã«å¯¾å¿œ English: update installer - -* Mail.load - -* Mail#strftime - -* supports Ruby 1.4 again - -== 0.9.3 (2001-03-10) - -* インストーラをアップデート - -* TMail::Mail.boundary ã®ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆãŒæ®‹ã£ã¦ãŸ (TMail.new_boundary ã«ç§»è¡Œ) - -* ãƒ˜ãƒƒãƒ€ã®æœ€å¾Œã«æ”¹è¡ŒãŒãªã„å ´åˆã‚’考慮 English: update installer - -* remove TMail::Mail.boundary,msgid from document (use TMail.new_boundary, new_msgid) - -* no need of NL at the tail of header - -== 0.9.2 (2001-03-08) - -* HF#inspect・Address#inspect ã®å‹•作を変更 - -* Ruby ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã®ã‚¹ã‚­ãƒ£ãƒŠã‚’ KCODE ã«å‹•的対応ã•ã›ãŸ - -* ライブラリã®ã‚¨ãƒ³ãƒˆãƒªãƒã‚¤ãƒ³ãƒˆã‚’ 'tmail' ã«å¤‰æ›´ ('tmail/tmail' も使ãˆã‚‹ãŒ 1.0 ã‚ãŸã‚Šã§ãªãã™ã‹ã‚‚) English: HF#inspect, Address#inspect changed - -* support SJIS in scanner - -* library entry point is 'tmail' again (<- 'tmail/tmail') - -== 0.9.1 (2001-03-02) - -* マルãƒãƒ‘ートã®ãƒ‘ースã«ãƒã‚° English: bug in parsing MIME multipart - -== 0.9.0 (2001-02-24) - -* to_s, inspect ã®å‹•作変更 - -* Mail#to, from ãªã©ã®ãƒ‡ãƒ•ォルト値㌠'' ã‹ã‚‰ nil ã«å¤‰æ›´ English: change Mail#to_s/inspect action - -* default value of Mail#to, from is now nil (not '') - -== 0.8.18 (2001-01-27) - -* push ã«å¼•æ•°ã®ãªã„ã¨ã“ã‚ãŒã‚ã£ãŸ - -* Array#filter を使ã‚ãªã„よã†ã«ã—㟠(thanks l@kondara) English: modify push without arg - -* do not use Array#filter (thanks l@kondara) - -== 0.8.17 (2001-01-26) - -* 日本語文字ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã§è½ã¡ã‚‹ãƒã‚°ã‚’修正 (thanks å°æ²¢ã•ã‚“) English: modify MIME encoding bug - -== 0.8.16 (2001-01-22) - -* mails.so をスタティックリンクã§ã‚‚大丈夫ãªã‚ˆã†ã«ä¿®æ­£ English: modify mails.so for static link - -== 0.8.15 (2000-11-28) - -* HFencoder ã®ãƒã‚°ã‚’修正 (thanks å‰ç”°ä¿®å¾ã•ã‚“) English: debug HFencoder (thanks Shugo Maeda) - -== 0.8.14 (2000-11-18) - -* DateH#date= ã«ãƒã‚° (thanks å‰ç”°ä¿®å¾ã•ã‚“) - -* StringH をデコードã™ã‚‹æ™‚ EOL を消ã—ã¦ã‹ã‚‰ nkf ã«æ¸¡ã™ - -* Mail#ordered_each - -* eof ã®æ™‚ StringPort#read_allã€copy_to ãŒå¤±æ•—ã™ã‚‹ English: bug in DateH#date= (thanks Shugo Maeda) - -* gsub(EOL, '') before nkf - -* Mail#ordered_each - -* StringPort#read_all, copy_to failed if eof - -== 0.8.13 (2000-09-19) - -* MboxLoader ãŒå‹•ã‹ãªã‹ã£ãŸ (thanks 長沢研二ã•ã‚“) - -* HeaderField#new_header English: MboxLoader was not work (reported by Kenji Nagasawa) - -* HeaderField#new_header - -== 0.8.12 (2000-07-13) - -* scanner.rb ã®ç§»å‹•ã«å¯¾å¿œ (thanks ã‚„ã¾ã ã‚ãらã•ã‚“) English: racc/scanner.rb -> scanner.rb (thanks akira yamada) - -== 0.8.11 (2000-05-29) - -* HFencoder#value ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰éƒ¨åˆ†ãŒé–“é•ã£ã¦ãŸ - -* TMail::CONTROL - -* 日本語マニュアルãŒè‹±èªžã«ãªã£ã¦ã„㟠(泣。thanks ã‚‹ã³ãã¡ã•ã‚“) English: HFencoder#value encoding was wrong - -* TMail::CONTROL - -* all doc.ja/ - -* .html were ENGLISH (reported by rubikitch) - -== 0.8.10 (2000-05-18) - -* TMail.zonestr2i ã®è¿”り値ãŒé–“é•ã£ã¦ã„㟠(thanks 刀野暢洋ã•ã‚“) - -* datetime ã®ç§’ãŒæ¨ã¦ã‚‰ã‚Œã¦ã„㟠English: return values of TMail.zonestr2i was wrong (patched by tachino Nobuhiro) - -* seconds in date-time was wrongly discarded - -== 0.8.9 (2000-05-16) - -* インストーラã®ã‚¢ãƒƒãƒ—デートã¨ä¿®æ­£ (thanks rubikitch) English: update installer (thanks rubikitch) - -== 0.8.8 (2000-05-12) - -* sample/sendmail - -* TMail#date=, mime_version= - -* phrase ã®ã‚¯ã‚ªãƒ¼ãƒˆã‚’修正 - -* amstd アップデート (1.7.0) English: sample/sendmail - -* TMail#date=, mime_version= - -* modify phrase quoting - -* update amstd package (1.7.0) - -== 0.8.7 (2000-05-08) - -* mails.rb: = ã˜ã‚ƒãªã㦠== (thanks rubikitch) - -* Racc ランタイムアップデート (1.0) - -* amstd アップデート (1.6.2) English: mails.rb: not =, == (thanks rubikitch) - -* update Racc runtime (1.0) - -* update amstd package (1.6.2) - -== 0.8.6 (2000-03-17) - -* Racc ランタイムアップデート (0.12) - -* strscan アップデート (0.5.5) English: update Racc runtime (0.12) - -* update strscan package (0.5.5) - -== 0.8.5 (2000-03-09) - -* accept ãŒãƒžãƒ«ãƒãƒ‘ãƒ¼ãƒˆã®æ™‚変ã«ãªã‚‹ãƒã‚°ä¿®æ­£ - -* HeaderField#illegal?, empty? - -* 致命的ãªã¨ã“ã ã‘スレッドã«å¯¾å¿œã—㟠English: Mail#accept had bug when multipart - -* HeaderField#illegal?, empty? - -* thread safe (only critical part) - -== 0.8.4 (2000-03-09) - -* ruby 1.5 ã§ã® Symbol å°Žå…¥ã«å¯¾å¿œ English: for Symbol in ruby 1.5 - -== 0.8.3 (2000-03-04) - -* Address#local,domain - -* phraseã€value ãªã©ã®æ–‡å­—列化ã®ç²¾åº¦ã‚’改善ã—㟠English: Address#local,domain - -* better string convertion - -== 0.8.2 (2000-02-23) - -* FilePort#filename 㯠public English: FilePort#filename is public - -== 0.8.1 (2000-02-20) - -* アドレスãŒãªã„時ã§ã‚‚ Mail#to,from ãªã©ãŒè½ã¡ãªã„よã†ä¿®æ­£ English: modify Mail#to, from... for no addresses - -== 0.8.0 (2000-02-19) - -* å…¨ã¦ã®ã‚¯ãƒ©ã‚¹ã‚’ TMail モジュールã®ä¸­ã§å®šç¾© - -* スキャナを拡張モジュールã«ã—㟠- -* TMail::Mail#body_port - -* TMail::Mail#encoded, decoded - -* ãƒ˜ãƒƒãƒ€ã®æ–‡å­—列化システムãŒå¤§ãã変ã‚ã£ãŸ English: moves all classes into module TMail - -* make scanner ruby extention - -* TMail::Mail#body_port - -* TMail::Mail#encoded, decoded - -== 0.7.5 (2000-01-09) - -* Racc ã®æœ€æ–°ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã«å¯¾å¿œ English: modify for racc 0.10.8 - -== 0.7.4 (1999-11-10) - -* æ•°å­—ã®ã¿ã®ã‚¢ã‚«ã‚¦ãƒ³ãƒˆãŒå¤‰ã«ãªã‚‹ - -* inspect ãŒã¾ãŸãƒã‚°ã£ã¦ãŸ - -* port.rb ã® typo - -* amstd ã«å¯¾å¿œ (must.rb -> amstd/must.rb) (all modifications are patched by Shugo Maeda) English: digit only account was wrong handled - -* TMail#inspect contained bug - -* type in port.rb - -* amstd (must.rb -> amstd/must.rb) (all modifications are patched by Shugo Maeda) - -== 0.7.3 (1999-11-06) - -* ホストåãªã—ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’通ã™ã‚ˆã†ã«ä¿®æ­£ (thanks ts ã•ã‚“) - -* ファイルをディレクトリã«å…¥ã‚ŒãŸ (tmail.rb -> tmail/tmail.rb) - -* racc 0.10 ã«å¯¾å¿œ - -* パッケージングãŒã‹ãªã‚Šå¤‰åŒ– English: parse error on address without hostname (patched by ts) - -* main files are in tmail/ (tmail.rb -> tmail/tmail.rb) - -* modified for racc 0.10 - -* wrote setup.rb - -== 0.7.2 (1999-09-29) - -* タイムゾーン関連ã®ãƒã‚°ã‚’修正 - -* Received: ãŒã²ã¨ã¤ã ã‘ã«ãªã£ã¦ã—ã¾ã†ãƒã‚°ã‚’修正 - -* to_s ãŒã„ã‚ã„ã‚エンãƒã‚°ã—ã¦ãŸã®ã‚’修正 (thanks å‰ç”°ä¿®å¾ã•ã‚“) English: about timezone - -* multi Received: handling was wrong - -* to_s contains bugs (patched by Shugo Maeda) - -== 0.7.1 (1999-09-28) - -* ç´°ã‹ã„ãƒã‚°ä¿®æ­£ - -* ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã®æ›´æ–°ã‚’忘れã¦ãŸ - -* コメントをã¨ã‚Šã ã›ã‚‹ã‚ˆã†ã«ã—㟠English: modify little bugs - -* update documents - -* can handle comments for structured header - -== 0.7.0 (1999-09-02) - -* ヘッダオブジェクトã®é…å»¶ç”Ÿæˆ - -* mailp.y: FROM VIA ãªã©ã‚‚ ATOM ã¨ã—ã¦è©•価ã™ã‚‹ã‚ˆã†ã«ã—ãŸã€‚atom 追加 English: lazy header contruction - -== 0.6.0 (1999-07-31) - -* 入出力を port.rb ã«ä¸€æœ¬åŒ– English: use port.rb - -== 0.5.2 (1999-06-26) - -* strscan ã«å¯¾å¿œ - -* buffer.rb ã‚’ã‚„ã‚ extiter.rb を使用 English: use strscan - -* use extiter.rb, not buffer.rb - -== 0.5.1 (1999-06-14) - -* mailp.y ã‚’ Racc 0.9 ã«å¯¾å¿œ - -* æ­»ã¬æ°—ã§è‹±èªžãƒžãƒ‹ãƒ¥ã‚¢ãƒ«ã‚’ã¤ã‘㟠English: rewrite mailp.y for racc0.9.x - -* wrote English manual - -== 0.5.0 (1999-06-03) - -* Header クラスを廃止 - -* recycle.rb buffer.rb を使用 English: now Header class is obsolute - -* use recycle.rb, buffer.rb - -== 0.4.8 (1999-05-?) - -* パーサã®ç²¾åº¦ãŒå‘上 - -* タイプミスãªã©ã‚’ã„ãã¤ã‹ä¿®æ­£ English: modify mail parser - -* modify some typos - -== 0.3.0 (?) - -== 0.2.0 (1998-10-30) - -* ã¾ã  mail modules ã¨å‘¼ã°ã‚Œã¦ã„㟠English: still named "Mail Modules" - -== 0.1.0 (1998-10-26) . - -* bug fix - -== 0.0.0 (1998-10-23) . - -* first release diff --git a/vendor/tmail-1.2.3.1/log/Changelog.txt b/vendor/tmail-1.2.3.1/log/Changelog.txt deleted file mode 100644 index 7548cc3c3..000000000 --- a/vendor/tmail-1.2.3.1/log/Changelog.txt +++ /dev/null @@ -1,534 +0,0 @@ -= Subversion Changelog - -== 2008-03-01 mikel - -* Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) (233) -* Applied patch #18515 to remove ftools from test case (Charles Lowe) (232) -* A lot of documentation patches to the mail and utils and net files. Also added "log/BugTrackingLog.txt" for myself as my bug log got clobbered by the new changelog.txt format. (231) - -== 2008-02-22 transami - -* Update the doc feature of setup.rb. -* installing rdoc labels the directory config.docdir/ruby-{package}/. -* generateing rdocs places them in doc/rdoc. -* this was done to prevent potential name clashes with other system docs. (230) - -== 2008-02-22 mikel - -* Added a lot more documentation, getting there (229) - -== 2008-02-21 transami - -* Added homepage entry to project file. (228) -* Fixed missing rake task entry in setup.rb. (227) - -== 2008-02-19 transami - -* Moved script/ to work/ --as reap and setup.rb should now suffice. (226) -* Added a work directory. This is a sort of code depot. (225) -* Add some entries to svn:ignore. (224) -* Fixed setup.rb uninstaller. (223) -* Updated Rakefile and setup.rb. (222) - -== 2008-02-18 transami - -* Update Rakefile fixing test bug. (221) -* Added new "uber" Rakefile. (220) -* Moved doc to site. (219) - -== 2008-02-14 mikel - -* Moving changelog to a capital (218) -* fixing changelog (217) - -== 2008-02-13 mikel - -* Removing bad add (SVN is trying to add this twice to my repo) (216) - -== 2008-02-10 transami - -* Added test log. (215) -* Update to .reap to add test/ to loadpath when testing. (214) -* Added xml log and update CHANGES. (213) -* Touched up changelogs. (212) -* Add make script and convert others to pure ruby. (211) -* Remove old ratch scripts. (210) -* Update metadata. (209) - -== 2008-01-17 mikel - -* Updated development section (208) -* Updated website to add "contributing" to the list (207) -* More website updates (206) -* Update reference index to take some confusion out (205) -* Cleaning up the docs more - adding mailing list (204) -* Cleaning up the docs more - adding quickstart guide (203) -* Cleaning up the docs more (202) -* Adding some documentation to the website (201) -* Added update to the website and an extra test to test_quote taken from the ActionMailer version of TMail (200) - -== 2008-01-15 mikel - -* Updated index page (199) -* Updated website for 1.9 compatibility (198) -* That's 1.9 compatibility done (197) -* 1.9 Patching - down to two tests failing (196) - -== 2008-01-12 mikel - -* Updated changelog with latest patches (195) -* Cleaned up how address.rb handles quoting strings and arrays (194) -* Updating to handle Ruby 1.9 - Three tests failing at the moment (193) -* Closed #17044 and #17045 ALL TESTS PASSING!!!! (192) - -== 2008-01-11 transami - -* Updated pack tasks (note these are now for 0.5 series of ratch) (186) -* Gems requires author field to be an array (probably a gems bug) (184) - -== 2008-01-11 mikel - -* Closes #15157 - The email address "@"@test.com does not parse. It now does (mikel) (191) -* Added Rakefile for testing only (190) -* Ready for gem (188) -* Fixed version (187) -* Final commit for version 1.2.1 (185) -* VERSION 1.2.1 (183) -* VERSION 1.2.1 (182) -* Updated test_quote.rb to make it copmpatible with Ruby 1.9 (181) - -== 2008-01-10 mikel - -* Updated logs to reflect recent changes (180) -* Added tests for UNIXMbox.fromaddr method. Also changed behaviour of HeaderField.new_from_port to return nil if it does not find a matching header in the port provided. Extended UNIXMbox.fromaddr to also search for EnvelopeSender and also made it a public method, not private - Thanks to Maarten O. for alerting these bugs (179) -* Fixed TMail::HeaderField.new_from_port to correct typo on "Regep" to "Regexp". Also added test cases to cover this class method. Also added ability to scan for the EnvelopeSender explictly as it would not come up on searching for "From" due to Regexp confilct with From: (with the colon). Thanks to Maarten O. for reporting this. (178) - -== 2007-12-25 transami - -* Added stamp script. (177) -* Updated tmail.roll for version 1.2.1. (176) -* Moved ROLLRC to tmail.roll. (175) - -== 2007-12-25 mikel - -* Applied Mr Aoki's patch from TMail revision 3674 - Handles the incorrect decoding of attachments (174) -* Applied patch from Mike Mondragon handling quote boundary being greedy on content-type header fields. (173) -* Removed the mailscanner directory (172) -* moved mailscanner.c file to tmailscanner.c (171) -* Changed name of the mailscanner directory to tmailscanner (170) -* Change the name of mailscanner to tmailscanner to handle a copyright issue. MailScanner is a copyrighted name (169) -* Included a require 'stringio' to hack resolve a load order problem when running autotest (168) - -== 2007-12-14 mikel - -* Added links into all the pages back to RDoc and also added notes to the index page. (164) - -== 2007-12-14 transami - -* Added package tasks. Fixe prepare task. (167) -* Minor enhancement to publish task to make it's usage clearer. (166) -* Moved script/config.yaml ti meta/ per Ratch 0.4.0. (165) - -== 2007-12-02 transami - -* Updated release script (require newest release of ratch) (160) - -== 2007-12-02 mikel - -* Added about 15 test cases from the Rails community. Added failing test case for an unquoted @ char in the From header field. Need to check fully if this is needed or not, but it is there anyway - to be resolved. I have emailed 822 mailing list to check this out. (163) -* Fixed error in release notes for tag 1.2.0 (162) -* added news item (159) -* Updated version number (157) - -== 2007-12-01 transami - -* Couple more additions. (156) -* Err.. sorry forgot to add some very importnat files! (155) - -== 2007-11-30 mikel - -* Updated changelog and history (153) -* Fixed scanner.rb so that it passes the same tests as scanner.c. Also fixed up all the tests to require test_helper.rb so that the load path is correct. (152) - -== 2007-11-30 transami - -* Some task updates. (154) - -== 2007-11-29 transami - -* Update Hisotry.txt, NOTES, etc. in prep for release. (151) -* Fixed test script and updated MANIFEST. (150) -* Renamed scanner_c to mailscanner. (149) -* Prepare for next release. (148) -* Adjusted scanner libs for renamed extension. (147) -* Renamed scanner_c.c to mailscanner.c. (146) -* Moved scanner_c/ to mailscanner/. (145) -* Updated meta/ files. (144) - -== 2007-11-22 transami - -* Updated history log. (143) -* Updated scripts to reflect removed base64 lib. (142) -* Remove base64 c extension, as it's speed benefit was negligable. (141) - -== 2007-11-21 transami - -* Fixed bug in base64_c.c. (140) -* update to base64 benchmark (139) -* Added base64 benchmark. (138) -* Moved manifest to meta/ --in future this will be auto generated. (137) - -== 2007-11-20 mikel - -* updated web page css (136) -* updated style on page (135) - -== 2007-11-19 mikel - -* Added a bunch of documentation to interface.rb (134) - -== 2007-11-18 transami - -* Fixed scanner_c load error. (133) -* Updated Manifest. (132) -* Adjustments for base64_c. (131) -* Completed compile rearrangements. (130) -* Moved ext/ file to proper place. (129) -* Added needed ext/ dirs. (128) -* Round about rearrange, sorry. (127) -* Move Makefile. (126) -* Rearranged ext/. (125) -* Working on corect base64 requiring and test passing. (124) -* Minor add ext/ to test includes (should make an option) (123) - -== 2007-11-18 mikel - -* Added a log more documentation to the interface.rb file - Mikel (122) - -== 2007-11-17 mikel - -* Added google analytics urchin to every page as well as adding tracker codes to the outbound links. Also added blog page. (121) - -== 2007-11-16 transami - -* Upped version on roll file in anticipation of next release. (120) -* Quick fix just to make base64 work. (119) - -== 2007-11-15 mikel - -* Closed ticket 15445 - tmail not returning a mail object on create_forward -Closed ticket 15643 - tmail not returning from address if reply_to is set to nil when you ask a mail object for reply_addresses -Added a lot of documentation to the interface.rb file (115) -* updated index page (114) - -== 2007-11-15 transami - -* Fixed compile process. (118) -* Improved test and compile scripts. (116) - -== 2007-11-12 transami - -* Moved bat/ to script/. (113) - -== 2007-11-09 transami - -* Additional tasks. (112) - -== 2007-11-08 mikel - -* Added links to the website and updated the notes file. (108) - -== 2007-11-08 transami - -* Started versoin 1.1.2. (111) -* Added zip format to roll file. (110) -* Fixed pubish and rdoc config settings. (109) -* Updated Manifest. (107) -* Added a clobber/distclean batch file. (106) -* Should be final fine-tuning to extconf.rb (105) - -== 2007-11-07 transami - -* Finally! Finally! Got Windows to install. (104) -* Force Windows into no extension mode. (103) -* Added log/Note.txt (this is the note for release). (102) -* Added changelog task (still needs one piece). (101) -* Renamed TODO to Todo.txt (oh, the struggle for consistancy). (100) -* Added final note to History.txt. (99) -* Fine-tuning extconf.rb and require_arch.rb. (98) -* Create fallback gem install. (97) -* Changed RUBYGEMS_NO_COMPILE to NORUBYEXT. (96) -* Updated manifest. Capitalized information files (not sure which I like best). (95) -* Finish organization clean-up. (94) -* Add clobber subtasks. (93) -* Updated require_arch and removed linux binaries. (92) - -== 2007-11-06 transami - -* Updated manifest. (91) -* Updated extconf.rb files to copy extension to arch directories. (90) -* Updated version.rb. (89) -* Added index.rb for Rolls. (88) -* Added require_arch.rb. (87) -* Minor organization details (yet to be fully determined). (86) -* Added config_dir setting to extconf.rb (although it dodn't seem to do any good). (85) -* Added platform tiers to lib/tmail/. (84) -* Moved www to doc/ (RDocs go in doc/rdoc). (83) -* Removed tasks directory. (82) -* Added tag ans compile batch files. (81) -* Removed Rakefile. (80) -* Removed Manifest.txt (will be replaced by new manifest). (79) -* Removed config/ directory. (78) -* Removed script/ dir. (77) -* Added compilation batch script, and require_arch.rb. (76) - -== 2007-11-05 transami - -* Added platforms to roll file. Alaso remove doc/. (75) - -== 2007-11-04 mikel - -* Added some documentation to the lib/mail.rb file and also updated the quickstart guide to reflect the fact we are now a gem. -Also added another test case to make sure a bug that was reported in ruby-talk relating to TMail had nothing to do with TMail. (74) - -== 2007-11-01 mikel - -* * Closed 1524 - Did another patch on the folding, re-read the RFC's and got clarification on when SHOULD and MUST fold. New folding section at the bottom of encode handles various line lengths which include or do not include whitespace (73) - -== 2007-10-31 mikel - -* * Put in an escape clause in the def fold method of class Encode to skip folding of any X- header line. (72) - -== 2007-10-30 transami - -* Added separate MANIFEST file, unfortunately it varies slightly from Hoe's. (71) -* Minor update to header of README. (70) -* Added formats to roll file, for packaging with box. (69) -* Added initial set of build tools in bat/. (68) -* Updated website, adding rdocs. (67) -* Up'd version to 1.1.1. (66) -* Minor update to roll file. (65) -* Added bat/ folder, which we can use ratch scripts for now. (64) -* Changed extension or roll file (was index). (63) - -== 2007-10-29 transami - -* Added meta directory and index file. (61) -* Removed extraneous lib directory from website. (60) -* Updates to website. - * Cleaned up how ruby code was diplayed. - * Cleaned up how shell code was displayed. - * Improved toplevel menu. (59) - -== 2007-10-29 mikel - -* TMail - Index page update the news (62) -* Updated against the code that is currently on the website (58) -* Removed an old make file and tagged TMail 1.1.0 (57) -* * Updated version (56) -* * Refactored how the package was going to_s - made the handling of quotation marks inside of the header more consistent and in accordance with the RFCs on the matter (ie, a filename in a content-disposition field paramater filename=README.TXT will not be quoted unless it contains special characters per RFC 1521 ) (55) - -== 2007-10-28 mikel - -* * Made the package into a GEM! (54) - -== 2007-10-27 mikel - -* * Preparing for export as a GEM, final changes for the 0.12 release (52) -* * Re-factored the quotation handling - learnt more about how this is implemented by Minero, and re-wrote my handling of it to preserve quotation marks in the headers [Mikel] (50) -* * Closed 15077 - Assigning the body via mail.body would not reparse the email body text. Changed mail.rb to reparse body if assigned via body= String. (49) - -== 2007-10-27 transami - -* Update usage.html, changed mail.encoded to mail.to_s. (51) - -== 2007-10-26 mikel - -* ==== Fri Oct 26 02:21:13 GMT 2007 Mikel Lindsaar - -* Deleted incompatabilities from the root folder (it is in www/outdated) (48) - -== 2007-10-25 mikel - -* ==== Thu Oct 25 05:52:02 GMT 2007 Mikel Lindsaar - -* Moved facade.rb to interface.rb - updated mail.rb to reflect this (40) -* ==== Thu Oct 25 05:39:09 GMT 2007 Mikel Lindsaar - -* Totally rewrote the README file to be in RDoc format and provide a beginning place for the RDoc documentation - -* Cleaned up the root directory of all the spurious files. - -* Merged the Changelog files and made it into RDoc format. - -* Cleaned up the Bugs and TODO files - -* Added RDoc headers to each source file. - -* Started doing the RDoc on the utils.rb file (39) -* Thu Oct 25 03:18:18 GMT 2007 Mikel Lindsaar - - * Cleaned up the tree some in terms of documents. Merged the - change logs, moved the 0.9 to 0.10 docs into the outdated - folder, modified the TODO (38) -* Mon Oct 25 13:06:00 2007 Mikel Lindsaar - -* Moved doc directory to WWW so that running RDoc by default doesn't - overwrite all the files. (37) -* Mon Oct 25 11:12:00 2007 Mikel Lindsaar - - * Added quickstart page to WWW as well as applied styling - to all existing pages in the site. - - * Uploaded site to rubyforge (35) - -== 2007-10-25 transami - -* Adjusted some colors. (47) -* Moved BUGS and DEPENDS to outdated. (46) -* Move old doc files (Having trouble with SVN) (45) -* Moved NEWS to outdated. It's just too old to be of much use. (44) -* Added jquery.js to website. (43) -* Uncluttered trunk by moving some documentation files. (42) -* Contined work on website -- using jQuery to keep DRY. (41) - -== 2007-10-24 transami - -* Closed div end-tag in index.html. (34) -* Updated header of index.html and added some new images. (33) -* Added new website (rough-draft). (32) -* Moved doc/doc.ja and doc/rdd to outdated/. (31) -* Added doc/outdated to hold old documentation files. (30) -* Moved doc/doc.en/ to doc/manual/. (29) -* Edited manual/index.html. (28) -* Moved doc.en/, doc.ja/ and rdd/ to new doc/ directory. (27) -* Moved doc to rdd. (26) - -== 2007-10-24 mikel - -* Mon Oct 24 22:40:00 2007 Mikel Lindsaar - - * Updated website to reflect release. (23) -* ========================================== - Version 0.11.0. Released -Mon Oct 24 21:14:00 2007 Mikel Lindsaar -========================================== (21) -* Moving 0.11 branch into trunk (20) -* Mon Oct 24 17:50:00 2007 Mikel Lindsaar - - * Remaining failing tests are one encoding problem with - relating to RFC 2231 and another problem where special - characters are not properly quoted if they are the name - portion of an email address (ie, TMail does not handle - the address <"@"@example.com> properly) - - * Closed #14964 - The TMail from ActionMailer Preview Release - 2.0 is now fully merged into TMail branch 0.11. - All previous tests and examples relating to TMail that - were part of ActionMailer 2.0 Preview Release now pass. - - * Closed #15008 - Fixed handling of multipart content type - headers. Now tested against many types of email. - TMails' behaviour now is to take any boundary type, if - it contains illegal characters, it will wrap it in "" - when requesting the content type by mail['content-type] - you will receive it unquoted, when outputting the email - to_s as a whole you will receive the content-type field - with the boundary section quoted if it contains illegal - characters. - - * Replaced id with object_id line 221 in stringio.rb (18) -* Fix up on revision 16 - forgot to add in files (17) -* Mon Oct 24 15:35:00 2007 Mikel Lindsaar - - * Copied over the TMail/*.rb files from the TRUNK version of Rails - ActionMailer (2.0 Preview Release) into branch for 0.11.0 - - * Fixed up many broken tests so that they pass (testing errors, - including wrong paths etc) - - * Closed #15002 - Fixed error where handling of MIME content-type - headers that had quoted parameters due to including RFC 2045 - special characters were being stripped of their quotation marks - when the mail object was sent "to_s". Now any quotation marks - that were in the original are maintained in the result - - * Closed #14999 - TMail now "fixes" illegal Content-Type bondary= - parameter by wrapping it in double quotation marks per RFC 2045 - and also produces this in the mail.to_s method - - * Added in tmail/core_extensions.rb which installs Object.blank? - unless Object already responds_to?(:blank?) ie, we are already - in a Rails environment. - - * Updated names of the test files as a start to cleaning up the - tests directory. (16) - -== 2007-10-23 mikel - -* Mon Oct 24 0:40:00 2007 Mikel Lindsaar - - * Copied over Rails modified TMail into branch for 0.11. (15) -* Mon Oct 23 17:13:00 2007 Mikel Lindsaar - - * Applied Rails revisions 965. Protect against nil strings and - empty conversion bases. - - * Applied Rails revisions 964. Made the unquoted string and - body the default. (14) -* Mon Oct 23 14:56:00 2007 Mikel Lindsaar - - * Applied Rails revision 919. Don't fail on an empty body or - empty subject line, default to an empty string body or subject (13) -* Mon Oct 23 14:56:00 2007 Mikel Lindsaar - - * Applied Rails revision 918. Don't include blank attachments - in the email (12) -* Mon Oct 23 14:56:00 2007 Mikel Lindsaar - - * Applied Rails ticket #916. Handles better quoting and handling - of attachments. (11) -* Mon Oct 23 14:41:00 2007 Mikel Lindsaar - - * Merged net.rb - code clean up - Closes Task#1736 (10) -* Mon Oct 23 14:35:00 2007 Mikel Lindsaar - - * Merged stringio.rb - code clean up - Closes Task#1742 (9) -* Mon Oct 23 14:23:00 2007 Mikel Lindsaar - - * Merged config.rb - code clean up - Closes Task#1726 (8) -* Mon Oct 23 14:01:00 2007 Mikel Lindsaar - - * Merged address.rb - code clean up - Closes Task#1723 - - * Copied in the Rails test Email fixtures - - * Added in outlook test email for invalid boundary type (7) - -== 2007-10-22 mikel - -* Mikel Lindsaar -Updated version for release (4) -* Mon Oct 22 22:00:00 2007 Mikel Lindsaar - - * General cleanup - converted all files to UTF-8 from the various - encodings. (3) -* Mon Oct 22 22:00:00 2007 Mikel Lindsaar - - * Fixed all tests so that they now pass - were problems with the times - being checked were hard coded for Tokyo time and so would fail in a - different time zone. All of the tests that were failing due to this - now pass. - - * Fixed handling of MIME content-type header handling so that TMail now - quotes any content-type it finds to contain invalid characters per - RFC 2045 which are "/", "?" or "=". Per RFC, handling is to put - double quotes are put around it with the quote_boundary method, we - now do this. - - * Updated Copyright year for Minero Aoki (2) - -== 2007-09-26 transami - -* initial import (1) - diff --git a/vendor/tmail-1.2.3.1/log/Fixme.txt b/vendor/tmail-1.2.3.1/log/Fixme.txt deleted file mode 100644 index da743c636..000000000 --- a/vendor/tmail-1.2.3.1/log/Fixme.txt +++ /dev/null @@ -1,6 +0,0 @@ - -= FIXME - -file://lib/tmail/encode.rb -* FIXME: This class can handle only (euc-jp/shift_jis -> iso-2022-jp). (198) -* FIXME: implement line folding (317) diff --git a/vendor/tmail-1.2.3.1/log/Testlog.txt b/vendor/tmail-1.2.3.1/log/Testlog.txt deleted file mode 100644 index bc938b25f..000000000 --- a/vendor/tmail-1.2.3.1/log/Testlog.txt +++ /dev/null @@ -1,2340 +0,0 @@ -= Solo Test @ Sun Feb 10 17:10:47 -0500 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_utils.rb 3 3 0 0 [PASS] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_encode.rb 1 26 0 0 [PASS] -test/test_mbox.rb 9 59 0 0 [PASS] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_mail.rb 44 209 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -TOTAL 204 3975 1 1 - --- Failures and Errors -- - -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.065895 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:825:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite test/test_address -Started -...............E............. -Finished in 0.120607 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:44:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:248:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors - - -= Solo Test @ Sat Feb 23 02:29:09 +1100 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_encode.rb 1 26 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_mail.rb 44 212 0 0 [PASS] -test/test_mbox.rb 12 63 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 207 3982 1 1 - --- Failures and Errors -- - -Loaded suite test/test_address -Started -...............E............. -Finished in 0.092597 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:248:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.045103 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:825:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors - - -= Solo Test @ Fri Mar 14 22:59:26 +1100 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_encode.rb 1 26 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_mail.rb 47 215 0 0 [PASS] -test/test_mbox.rb 12 63 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 210 3985 1 1 - --- Failures and Errors -- - -Loaded suite test/test_address -Started -...............E............. -Finished in 0.09372 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:248:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.044237 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:825:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors - - -= Cross Test @ Fri Mar 14 23:00:58 +1100 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb test/test_address.rb 29 1686 0 1 [FAIL] -test/test_address.rb test/test_attachments.rb 32 1690 0 1 [FAIL] -test/test_address.rb test/test_base64.rb 32 3116 0 1 [FAIL] -test/test_address.rb test/test_encode.rb 30 1712 0 1 [FAIL] -test/test_address.rb test/test_header.rb 96 1998 1 1 [FAIL] -test/test_address.rb test/test_helper.rb 29 1686 0 1 [FAIL] -test/test_address.rb test/test_mail.rb 76 1901 0 1 [FAIL] -test/test_address.rb test/test_mbox.rb 41 1749 0 1 [FAIL] -test/test_address.rb test/test_port.rb 60 1804 0 1 [FAIL] -test/test_address.rb test/test_quote.rb 40 1697 0 1 [FAIL] -test/test_address.rb test/test_scanner.rb 32 1803 0 1 [FAIL] -test/test_address.rb test/test_utils.rb 32 1689 0 1 [FAIL] -test/test_attachments.rb test/test_address.rb 32 1690 0 1 [FAIL] -test/test_attachments.rb test/test_attachments.rb 3 4 0 0 [PASS] -test/test_attachments.rb test/test_base64.rb 6 1434 0 0 [PASS] -test/test_attachments.rb test/test_encode.rb 4 30 0 0 [PASS] -test/test_attachments.rb test/test_header.rb 70 316 1 0 [FAIL] -test/test_attachments.rb test/test_helper.rb 3 4 0 0 [PASS] -test/test_attachments.rb test/test_mail.rb 50 219 0 0 [PASS] -test/test_attachments.rb test/test_mbox.rb 15 67 0 0 [PASS] -test/test_attachments.rb test/test_port.rb 34 122 0 0 [PASS] -test/test_attachments.rb test/test_quote.rb 14 15 0 0 [PASS] -test/test_attachments.rb test/test_scanner.rb 6 121 0 0 [PASS] -test/test_attachments.rb test/test_utils.rb 6 7 0 0 [PASS] -test/test_base64.rb test/test_address.rb 32 3116 0 1 [FAIL] -test/test_base64.rb test/test_attachments.rb 6 1434 0 0 [PASS] -test/test_base64.rb test/test_base64.rb 3 1430 0 0 [PASS] -test/test_base64.rb test/test_encode.rb 4 1456 0 0 [PASS] -test/test_base64.rb test/test_header.rb 70 1742 1 0 [FAIL] -test/test_base64.rb test/test_helper.rb 3 1430 0 0 [PASS] -test/test_base64.rb test/test_mail.rb 50 1645 0 0 [PASS] -test/test_base64.rb test/test_mbox.rb 15 1493 0 0 [PASS] -test/test_base64.rb test/test_port.rb 34 1548 0 0 [PASS] -test/test_base64.rb test/test_quote.rb 14 1441 0 0 [PASS] -test/test_base64.rb test/test_scanner.rb 6 1547 0 0 [PASS] -test/test_base64.rb test/test_utils.rb 6 1433 0 0 [PASS] -test/test_encode.rb test/test_address.rb 30 1712 0 1 [FAIL] -test/test_encode.rb test/test_attachments.rb 4 30 0 0 [PASS] -test/test_encode.rb test/test_base64.rb 4 1456 0 0 [PASS] -test/test_encode.rb test/test_encode.rb 1 26 0 0 [PASS] -test/test_encode.rb test/test_header.rb 68 338 1 0 [FAIL] -test/test_encode.rb test/test_helper.rb 1 26 0 0 [PASS] -test/test_encode.rb test/test_mail.rb 48 241 0 0 [PASS] -test/test_encode.rb test/test_mbox.rb 13 89 0 0 [PASS] -test/test_encode.rb test/test_port.rb 32 144 0 0 [PASS] -test/test_encode.rb test/test_quote.rb 12 37 0 0 [PASS] -test/test_encode.rb test/test_scanner.rb 4 143 0 0 [PASS] -test/test_encode.rb test/test_utils.rb 4 29 0 0 [PASS] -test/test_header.rb test/test_address.rb 96 1998 1 1 [FAIL] -test/test_header.rb test/test_attachments.rb 70 316 1 0 [FAIL] -test/test_header.rb test/test_base64.rb 70 1742 1 0 [FAIL] -test/test_header.rb test/test_encode.rb 68 338 1 0 [FAIL] -test/test_header.rb test/test_header.rb 67 312 1 0 [FAIL] -test/test_header.rb test/test_helper.rb 67 312 1 0 [FAIL] -test/test_header.rb test/test_mail.rb 114 527 1 0 [FAIL] -test/test_header.rb test/test_mbox.rb 79 375 1 0 [FAIL] -test/test_header.rb test/test_port.rb 98 430 1 0 [FAIL] -test/test_header.rb test/test_quote.rb 78 323 1 0 [FAIL] -test/test_header.rb test/test_scanner.rb 70 429 1 0 [FAIL] -test/test_header.rb test/test_utils.rb 70 315 1 0 [FAIL] -test/test_helper.rb test/test_address.rb 29 1686 0 1 [FAIL] -test/test_helper.rb test/test_attachments.rb 3 4 0 0 [PASS] -test/test_helper.rb test/test_base64.rb 3 1430 0 0 [PASS] -test/test_helper.rb test/test_encode.rb 1 26 0 0 [PASS] -test/test_helper.rb test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb test/test_helper.rb 210 3985 1 1 [FAIL] -test/test_helper.rb test/test_mail.rb 47 215 0 0 [PASS] -test/test_helper.rb test/test_mbox.rb 12 63 0 0 [PASS] -test/test_helper.rb test/test_port.rb 31 118 0 0 [PASS] -test/test_helper.rb test/test_quote.rb 11 11 0 0 [PASS] -test/test_helper.rb test/test_scanner.rb 3 117 0 0 [PASS] -test/test_helper.rb test/test_utils.rb 3 3 0 0 [PASS] -test/test_mail.rb test/test_address.rb 76 1901 0 1 [FAIL] -test/test_mail.rb test/test_attachments.rb 50 219 0 0 [PASS] -test/test_mail.rb test/test_base64.rb 50 1645 0 0 [PASS] -test/test_mail.rb test/test_encode.rb 48 241 0 0 [PASS] -test/test_mail.rb test/test_header.rb 114 527 1 0 [FAIL] -test/test_mail.rb test/test_helper.rb 47 215 0 0 [PASS] -test/test_mail.rb test/test_mail.rb 47 215 0 0 [PASS] -test/test_mail.rb test/test_mbox.rb 59 278 0 0 [PASS] -test/test_mail.rb test/test_port.rb 78 333 0 0 [PASS] -test/test_mail.rb test/test_quote.rb 58 226 0 0 [PASS] -test/test_mail.rb test/test_scanner.rb 50 332 0 0 [PASS] -test/test_mail.rb test/test_utils.rb 50 218 0 0 [PASS] -test/test_mbox.rb test/test_address.rb 41 1749 0 1 [FAIL] -test/test_mbox.rb test/test_attachments.rb 15 67 0 0 [PASS] -test/test_mbox.rb test/test_base64.rb 15 1493 0 0 [PASS] -test/test_mbox.rb test/test_encode.rb 13 89 0 0 [PASS] -test/test_mbox.rb test/test_header.rb 79 375 1 0 [FAIL] -test/test_mbox.rb test/test_helper.rb 12 63 0 0 [PASS] -test/test_mbox.rb test/test_mail.rb 59 278 0 0 [PASS] -test/test_mbox.rb test/test_mbox.rb 12 63 0 0 [PASS] -test/test_mbox.rb test/test_port.rb 43 181 0 0 [PASS] -test/test_mbox.rb test/test_quote.rb 23 74 0 0 [PASS] -test/test_mbox.rb test/test_scanner.rb 15 180 0 0 [PASS] -test/test_mbox.rb test/test_utils.rb 15 66 0 0 [PASS] -test/test_port.rb test/test_address.rb 60 1804 0 1 [FAIL] -test/test_port.rb test/test_attachments.rb 34 122 0 0 [PASS] -test/test_port.rb test/test_base64.rb 34 1548 0 0 [PASS] -test/test_port.rb test/test_encode.rb 32 144 0 0 [PASS] -test/test_port.rb test/test_header.rb 98 430 1 0 [FAIL] -test/test_port.rb test/test_helper.rb 31 118 0 0 [PASS] -test/test_port.rb test/test_mail.rb 78 333 0 0 [PASS] -test/test_port.rb test/test_mbox.rb 43 181 0 0 [PASS] -test/test_port.rb test/test_port.rb 31 118 0 0 [PASS] -test/test_port.rb test/test_quote.rb 42 129 0 0 [PASS] -test/test_port.rb test/test_scanner.rb 34 235 0 0 [PASS] -test/test_port.rb test/test_utils.rb 34 121 0 0 [PASS] -test/test_quote.rb test/test_address.rb 40 1697 0 1 [FAIL] -test/test_quote.rb test/test_attachments.rb 14 15 0 0 [PASS] -test/test_quote.rb test/test_base64.rb 14 1441 0 0 [PASS] -test/test_quote.rb test/test_encode.rb 12 37 0 0 [PASS] -test/test_quote.rb test/test_header.rb 78 323 1 0 [FAIL] -test/test_quote.rb test/test_helper.rb 11 11 0 0 [PASS] -test/test_quote.rb test/test_mail.rb 58 226 0 0 [PASS] -test/test_quote.rb test/test_mbox.rb 23 74 0 0 [PASS] -test/test_quote.rb test/test_port.rb 42 129 0 0 [PASS] -test/test_quote.rb test/test_quote.rb 11 11 0 0 [PASS] -test/test_quote.rb test/test_scanner.rb 14 128 0 0 [PASS] -test/test_quote.rb test/test_utils.rb 14 14 0 0 [PASS] -test/test_scanner.rb test/test_address.rb 32 1803 0 1 [FAIL] -test/test_scanner.rb test/test_attachments.rb 6 121 0 0 [PASS] -test/test_scanner.rb test/test_base64.rb 6 1547 0 0 [PASS] -test/test_scanner.rb test/test_encode.rb 4 143 0 0 [PASS] -test/test_scanner.rb test/test_header.rb 70 429 1 0 [FAIL] -test/test_scanner.rb test/test_helper.rb 3 117 0 0 [PASS] -test/test_scanner.rb test/test_mail.rb 50 332 0 0 [PASS] -test/test_scanner.rb test/test_mbox.rb 15 180 0 0 [PASS] -test/test_scanner.rb test/test_port.rb 34 235 0 0 [PASS] -test/test_scanner.rb test/test_quote.rb 14 128 0 0 [PASS] -test/test_scanner.rb test/test_scanner.rb 3 117 0 0 [PASS] -test/test_scanner.rb test/test_utils.rb 6 120 0 0 [PASS] -test/test_utils.rb test/test_address.rb 32 1689 0 1 [FAIL] -test/test_utils.rb test/test_attachments.rb 6 7 0 0 [PASS] -test/test_utils.rb test/test_base64.rb 6 1433 0 0 [PASS] -test/test_utils.rb test/test_encode.rb 4 29 0 0 [PASS] -test/test_utils.rb test/test_header.rb 70 315 1 0 [FAIL] -test/test_utils.rb test/test_helper.rb 3 3 0 0 [PASS] -test/test_utils.rb test/test_mail.rb 50 218 0 0 [PASS] -test/test_utils.rb test/test_mbox.rb 15 66 0 0 [PASS] -test/test_utils.rb test/test_port.rb 34 121 0 0 [PASS] -test/test_utils.rb test/test_quote.rb 14 14 0 0 [PASS] -test/test_utils.rb test/test_scanner.rb 6 120 0 0 [PASS] -test/test_utils.rb test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 5040 95640 24 24 - --- Failures and Errors -- - -Loaded suite -e -Started -...............E............. -Finished in 0.09302 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.104716 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1690 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.179128 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 3116 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E.............. -Finished in 0.102972 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -30 tests, 1712 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F.............................................................................E............... -Finished in 0.125127 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -96 tests, 1998 assertions, 1 failures, 1 errors -Loaded suite -e -Started -...............E............. -Finished in 0.092103 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E............................................................ -Finished in 0.145643 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -76 tests, 1901 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...........................E............. -Finished in 0.155874 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -41 tests, 1749 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..............................................E............. -Finished in 0.18006 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -60 tests, 1804 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E........................ -Finished in 0.101734 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -40 tests, 1697 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..................E............. -Finished in 0.100893 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1803 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.092059 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1689 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.096896 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1690 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.050509 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 316 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E................ -Finished in 0.177225 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 3116 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.122517 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 1742 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E.............. -Finished in 0.102566 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -30 tests, 1712 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................. -Finished in 0.048416 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -68 tests, 338 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F.............................................................................E............... -Finished in 0.124603 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -96 tests, 1998 assertions, 1 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.050084 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 316 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.122198 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 1742 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................. -Finished in 0.048844 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -68 tests, 338 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.042681 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.044667 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................................................... -Finished in 0.081823 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -114 tests, 527 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................ -Finished in 0.086606 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -79 tests, 375 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................................... -Finished in 0.106947 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -98 tests, 430 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F........................................................................... -Finished in 0.047306 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -78 tests, 323 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.047525 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 429 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.045308 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 315 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E............. -Finished in 0.09224 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.044664 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite . -Started -..F...........................................................................................................................E................................................................................... -Finished in 0.431701 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -210 tests, 3985 assertions, 1 failures, 1 errors -Loaded suite -e -Started -...............E............................................................ -Finished in 0.138379 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -76 tests, 1901 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................................................... -Finished in 0.082695 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -114 tests, 527 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...........................E............. -Finished in 0.160588 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -41 tests, 1749 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................ -Finished in 0.097336 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -79 tests, 375 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..............................................E............. -Finished in 0.168924 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -60 tests, 1804 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................................... -Finished in 0.104936 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -98 tests, 430 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E........................ -Finished in 0.100879 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -40 tests, 1697 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F........................................................................... -Finished in 0.047438 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -78 tests, 323 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..................E............. -Finished in 0.100312 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1803 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.047378 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 429 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E................ -Finished in 0.0925590000000001 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:248:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1689 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.045748 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:825:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 315 assertions, 1 failures, 0 errors - - -= Solo Test @ Fri Mar 14 23:01:10 +1100 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_encode.rb 1 26 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_mail.rb 47 215 0 0 [PASS] -test/test_mbox.rb 12 63 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 210 3985 1 1 - --- Failures and Errors -- - -Loaded suite test/test_address -Started -...............E............. -Finished in 0.090869 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:248:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.044878 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:825:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors - - -= Solo Test @ Sat Mar 15 01:21:40 +1100 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_encode.rb 1 26 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_mail.rb 47 215 0 0 [PASS] -test/test_mbox.rb 12 63 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 210 3985 1 1 - --- Failures and Errors -- - -Loaded suite test/test_address -Started -...............E............. -Finished in 0.092228 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:248:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.045673 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:825:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors - - -= Solo Test @ Mon Apr 07 09:47:05 +1000 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb 29 1686 0 1 [FAIL] -test/test_attachments.rb 3 4 0 0 [PASS] -test/test_base64.rb 3 1430 0 0 [PASS] -test/test_encode.rb 2 27 0 0 [PASS] -test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb 0 0 0 0 [PASS] -test/test_mail.rb 47 215 0 0 [PASS] -test/test_mbox.rb 12 63 0 0 [PASS] -test/test_port.rb 31 118 0 0 [PASS] -test/test_quote.rb 11 11 0 0 [PASS] -test/test_scanner.rb 3 117 0 0 [PASS] -test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 211 3986 1 1 - --- Failures and Errors -- - -Loaded suite test/test_address -Started -...............E............. -Finished in 0.0950920000000001 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - test/test_address.rb:90:in `validate_case__address' - test/test_address.rb:247:in `_test_parse__euc' - test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite test/test_header -Started -..F................................................................ -Finished in 0.073639 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [test/test_header.rb:824:in `_test_raw_iso2022jp' - test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors - - -= Cross Test @ Mon Apr 07 09:47:45 +1000 2008 - -TEST FILE TESTS ASSERTIONS FAILURES ERRORS -test/test_address.rb test/test_address.rb 29 1686 0 1 [FAIL] -test/test_address.rb test/test_attachments.rb 32 1690 0 1 [FAIL] -test/test_address.rb test/test_base64.rb 32 3116 0 1 [FAIL] -test/test_address.rb test/test_encode.rb 31 1713 0 1 [FAIL] -test/test_address.rb test/test_header.rb 96 1998 1 1 [FAIL] -test/test_address.rb test/test_helper.rb 29 1686 0 1 [FAIL] -test/test_address.rb test/test_mail.rb 76 1901 0 1 [FAIL] -test/test_address.rb test/test_mbox.rb 41 1749 0 1 [FAIL] -test/test_address.rb test/test_port.rb 60 1804 0 1 [FAIL] -test/test_address.rb test/test_quote.rb 40 1697 0 1 [FAIL] -test/test_address.rb test/test_scanner.rb 32 1803 0 1 [FAIL] -test/test_address.rb test/test_utils.rb 32 1689 0 1 [FAIL] -test/test_attachments.rb test/test_address.rb 32 1690 0 1 [FAIL] -test/test_attachments.rb test/test_attachments.rb 3 4 0 0 [PASS] -test/test_attachments.rb test/test_base64.rb 6 1434 0 0 [PASS] -test/test_attachments.rb test/test_encode.rb 5 31 0 0 [PASS] -test/test_attachments.rb test/test_header.rb 70 316 1 0 [FAIL] -test/test_attachments.rb test/test_helper.rb 3 4 0 0 [PASS] -test/test_attachments.rb test/test_mail.rb 50 219 0 0 [PASS] -test/test_attachments.rb test/test_mbox.rb 15 67 0 0 [PASS] -test/test_attachments.rb test/test_port.rb 34 122 0 0 [PASS] -test/test_attachments.rb test/test_quote.rb 14 15 0 0 [PASS] -test/test_attachments.rb test/test_scanner.rb 6 121 0 0 [PASS] -test/test_attachments.rb test/test_utils.rb 6 7 0 0 [PASS] -test/test_base64.rb test/test_address.rb 32 3116 0 1 [FAIL] -test/test_base64.rb test/test_attachments.rb 6 1434 0 0 [PASS] -test/test_base64.rb test/test_base64.rb 3 1430 0 0 [PASS] -test/test_base64.rb test/test_encode.rb 5 1457 0 0 [PASS] -test/test_base64.rb test/test_header.rb 70 1742 1 0 [FAIL] -test/test_base64.rb test/test_helper.rb 3 1430 0 0 [PASS] -test/test_base64.rb test/test_mail.rb 50 1645 0 0 [PASS] -test/test_base64.rb test/test_mbox.rb 15 1493 0 0 [PASS] -test/test_base64.rb test/test_port.rb 34 1548 0 0 [PASS] -test/test_base64.rb test/test_quote.rb 14 1441 0 0 [PASS] -test/test_base64.rb test/test_scanner.rb 6 1547 0 0 [PASS] -test/test_base64.rb test/test_utils.rb 6 1433 0 0 [PASS] -test/test_encode.rb test/test_address.rb 31 1713 0 1 [FAIL] -test/test_encode.rb test/test_attachments.rb 5 31 0 0 [PASS] -test/test_encode.rb test/test_base64.rb 5 1457 0 0 [PASS] -test/test_encode.rb test/test_encode.rb 2 27 0 0 [PASS] -test/test_encode.rb test/test_header.rb 69 339 1 0 [FAIL] -test/test_encode.rb test/test_helper.rb 2 27 0 0 [PASS] -test/test_encode.rb test/test_mail.rb 49 242 0 0 [PASS] -test/test_encode.rb test/test_mbox.rb 14 90 0 0 [PASS] -test/test_encode.rb test/test_port.rb 33 145 0 0 [PASS] -test/test_encode.rb test/test_quote.rb 13 38 0 0 [PASS] -test/test_encode.rb test/test_scanner.rb 5 144 0 0 [PASS] -test/test_encode.rb test/test_utils.rb 5 30 0 0 [PASS] -test/test_header.rb test/test_address.rb 96 1998 1 1 [FAIL] -test/test_header.rb test/test_attachments.rb 70 316 1 0 [FAIL] -test/test_header.rb test/test_base64.rb 70 1742 1 0 [FAIL] -test/test_header.rb test/test_encode.rb 69 339 1 0 [FAIL] -test/test_header.rb test/test_header.rb 67 312 1 0 [FAIL] -test/test_header.rb test/test_helper.rb 67 312 1 0 [FAIL] -test/test_header.rb test/test_mail.rb 114 527 1 0 [FAIL] -test/test_header.rb test/test_mbox.rb 79 375 1 0 [FAIL] -test/test_header.rb test/test_port.rb 98 430 1 0 [FAIL] -test/test_header.rb test/test_quote.rb 78 323 1 0 [FAIL] -test/test_header.rb test/test_scanner.rb 70 429 1 0 [FAIL] -test/test_header.rb test/test_utils.rb 70 315 1 0 [FAIL] -test/test_helper.rb test/test_address.rb 29 1686 0 1 [FAIL] -test/test_helper.rb test/test_attachments.rb 3 4 0 0 [PASS] -test/test_helper.rb test/test_base64.rb 3 1430 0 0 [PASS] -test/test_helper.rb test/test_encode.rb 2 27 0 0 [PASS] -test/test_helper.rb test/test_header.rb 67 312 1 0 [FAIL] -test/test_helper.rb test/test_helper.rb 211 3986 1 1 [FAIL] -test/test_helper.rb test/test_mail.rb 47 215 0 0 [PASS] -test/test_helper.rb test/test_mbox.rb 12 63 0 0 [PASS] -test/test_helper.rb test/test_port.rb 31 118 0 0 [PASS] -test/test_helper.rb test/test_quote.rb 11 11 0 0 [PASS] -test/test_helper.rb test/test_scanner.rb 3 117 0 0 [PASS] -test/test_helper.rb test/test_utils.rb 3 3 0 0 [PASS] -test/test_mail.rb test/test_address.rb 76 1901 0 1 [FAIL] -test/test_mail.rb test/test_attachments.rb 50 219 0 0 [PASS] -test/test_mail.rb test/test_base64.rb 50 1645 0 0 [PASS] -test/test_mail.rb test/test_encode.rb 49 242 0 0 [PASS] -test/test_mail.rb test/test_header.rb 114 527 1 0 [FAIL] -test/test_mail.rb test/test_helper.rb 47 215 0 0 [PASS] -test/test_mail.rb test/test_mail.rb 47 215 0 0 [PASS] -test/test_mail.rb test/test_mbox.rb 59 278 0 0 [PASS] -test/test_mail.rb test/test_port.rb 78 333 0 0 [PASS] -test/test_mail.rb test/test_quote.rb 58 226 0 0 [PASS] -test/test_mail.rb test/test_scanner.rb 50 332 0 0 [PASS] -test/test_mail.rb test/test_utils.rb 50 218 0 0 [PASS] -test/test_mbox.rb test/test_address.rb 41 1749 0 1 [FAIL] -test/test_mbox.rb test/test_attachments.rb 15 67 0 0 [PASS] -test/test_mbox.rb test/test_base64.rb 15 1493 0 0 [PASS] -test/test_mbox.rb test/test_encode.rb 14 90 0 0 [PASS] -test/test_mbox.rb test/test_header.rb 79 375 1 0 [FAIL] -test/test_mbox.rb test/test_helper.rb 12 63 0 0 [PASS] -test/test_mbox.rb test/test_mail.rb 59 278 0 0 [PASS] -test/test_mbox.rb test/test_mbox.rb 12 63 0 0 [PASS] -test/test_mbox.rb test/test_port.rb 43 181 0 0 [PASS] -test/test_mbox.rb test/test_quote.rb 23 74 0 0 [PASS] -test/test_mbox.rb test/test_scanner.rb 15 180 0 0 [PASS] -test/test_mbox.rb test/test_utils.rb 15 66 0 0 [PASS] -test/test_port.rb test/test_address.rb 60 1804 0 1 [FAIL] -test/test_port.rb test/test_attachments.rb 34 122 0 0 [PASS] -test/test_port.rb test/test_base64.rb 34 1548 0 0 [PASS] -test/test_port.rb test/test_encode.rb 33 145 0 0 [PASS] -test/test_port.rb test/test_header.rb 98 430 1 0 [FAIL] -test/test_port.rb test/test_helper.rb 31 118 0 0 [PASS] -test/test_port.rb test/test_mail.rb 78 333 0 0 [PASS] -test/test_port.rb test/test_mbox.rb 43 181 0 0 [PASS] -test/test_port.rb test/test_port.rb 31 118 0 0 [PASS] -test/test_port.rb test/test_quote.rb 42 129 0 0 [PASS] -test/test_port.rb test/test_scanner.rb 34 235 0 0 [PASS] -test/test_port.rb test/test_utils.rb 34 121 0 0 [PASS] -test/test_quote.rb test/test_address.rb 40 1697 0 1 [FAIL] -test/test_quote.rb test/test_attachments.rb 14 15 0 0 [PASS] -test/test_quote.rb test/test_base64.rb 14 1441 0 0 [PASS] -test/test_quote.rb test/test_encode.rb 13 38 0 0 [PASS] -test/test_quote.rb test/test_header.rb 78 323 1 0 [FAIL] -test/test_quote.rb test/test_helper.rb 11 11 0 0 [PASS] -test/test_quote.rb test/test_mail.rb 58 226 0 0 [PASS] -test/test_quote.rb test/test_mbox.rb 23 74 0 0 [PASS] -test/test_quote.rb test/test_port.rb 42 129 0 0 [PASS] -test/test_quote.rb test/test_quote.rb 11 11 0 0 [PASS] -test/test_quote.rb test/test_scanner.rb 14 128 0 0 [PASS] -test/test_quote.rb test/test_utils.rb 14 14 0 0 [PASS] -test/test_scanner.rb test/test_address.rb 32 1803 0 1 [FAIL] -test/test_scanner.rb test/test_attachments.rb 6 121 0 0 [PASS] -test/test_scanner.rb test/test_base64.rb 6 1547 0 0 [PASS] -test/test_scanner.rb test/test_encode.rb 5 144 0 0 [PASS] -test/test_scanner.rb test/test_header.rb 70 429 1 0 [FAIL] -test/test_scanner.rb test/test_helper.rb 3 117 0 0 [PASS] -test/test_scanner.rb test/test_mail.rb 50 332 0 0 [PASS] -test/test_scanner.rb test/test_mbox.rb 15 180 0 0 [PASS] -test/test_scanner.rb test/test_port.rb 34 235 0 0 [PASS] -test/test_scanner.rb test/test_quote.rb 14 128 0 0 [PASS] -test/test_scanner.rb test/test_scanner.rb 3 117 0 0 [PASS] -test/test_scanner.rb test/test_utils.rb 6 120 0 0 [PASS] -test/test_utils.rb test/test_address.rb 32 1689 0 1 [FAIL] -test/test_utils.rb test/test_attachments.rb 6 7 0 0 [PASS] -test/test_utils.rb test/test_base64.rb 6 1433 0 0 [PASS] -test/test_utils.rb test/test_encode.rb 5 30 0 0 [PASS] -test/test_utils.rb test/test_header.rb 70 315 1 0 [FAIL] -test/test_utils.rb test/test_helper.rb 3 3 0 0 [PASS] -test/test_utils.rb test/test_mail.rb 50 218 0 0 [PASS] -test/test_utils.rb test/test_mbox.rb 15 66 0 0 [PASS] -test/test_utils.rb test/test_port.rb 34 121 0 0 [PASS] -test/test_utils.rb test/test_quote.rb 14 14 0 0 [PASS] -test/test_utils.rb test/test_scanner.rb 6 120 0 0 [PASS] -test/test_utils.rb test/test_utils.rb 3 3 0 0 [PASS] -TOTAL 5064 95664 24 24 - --- Failures and Errors -- - -Loaded suite -e -Started -...............E............. -Finished in 0.095256 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.105752 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1690 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.186971 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 3116 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E............... -Finished in 0.107076 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -31 tests, 1713 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F.............................................................................E............... -Finished in 0.127074 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -96 tests, 1998 assertions, 1 failures, 1 errors -Loaded suite -e -Started -...............E............. -Finished in 0.094599 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E............................................................ -Finished in 0.142425 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -76 tests, 1901 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...........................E............. -Finished in 0.164831 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -41 tests, 1749 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..............................................E............. -Finished in 0.167203 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -60 tests, 1804 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E........................ -Finished in 0.102978 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -40 tests, 1697 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..................E............. -Finished in 0.103419 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1803 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.094892 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1689 assertions, 0 failures, 1 errors -Loaded suite -e -Started -...............E................ -Finished in 0.107364 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1690 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.050516 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 316 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E................ -Finished in 0.181623 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 3116 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.123416 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 1742 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E............... -Finished in 0.108171 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -31 tests, 1713 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F.................................................................. -Finished in 0.051321 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -69 tests, 339 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F.............................................................................E............... -Finished in 0.127828 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -96 tests, 1998 assertions, 1 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.050633 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 316 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.123302 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 1742 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F.................................................................. -Finished in 0.051097 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -69 tests, 339 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.042483 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.045175 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................................................... -Finished in 0.082539 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -114 tests, 527 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................ -Finished in 0.08958 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -79 tests, 375 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F............................................................................................... -Finished in 0.08739 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -98 tests, 430 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F........................................................................... -Finished in 0.047858 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -78 tests, 323 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.047838 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 429 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.045607 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 315 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E............. -Finished in 0.094401 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -29 tests, 1686 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................ -Finished in 0.04508 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -67 tests, 312 assertions, 1 failures, 0 errors -Loaded suite . -Started -..F...........................................................................................................................E.................................................................................... -Finished in 0.425147 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - - 2) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -211 tests, 3986 assertions, 1 failures, 1 errors -Loaded suite -e -Started -...............E............................................................ -Finished in 0.142091 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -76 tests, 1901 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................................................... -Finished in 0.083532 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -114 tests, 527 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...........................E............. -Finished in 0.154959 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -41 tests, 1749 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................ -Finished in 0.086501 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -79 tests, 375 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..............................................E............. -Finished in 0.172243 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -60 tests, 1804 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F............................................................................................... -Finished in 0.105874 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -98 tests, 430 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E........................ -Finished in 0.103469 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -40 tests, 1697 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F........................................................................... -Finished in 0.047818 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -78 tests, 323 assertions, 1 failures, 0 errors -Loaded suite -e -Started -..................E............. -Finished in 0.103414 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1803 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.04758 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 429 assertions, 1 failures, 0 errors -Loaded suite -e -Started -...............E................ -Finished in 0.104814 seconds. - - 1) Error: -test_parse__rawjp(TestAddress): -TMail::SyntaxError: parse error on token error - parser.y:379:in `on_error' - parser.y:379:in `_racc_yyparse_c' - parser.y:375:in `scan' - parser.y:375:in `parse_in' - racc/parser.rb:152:in `_racc_yyparse_c' - racc/parser.rb:152:in `__send__' - racc/parser.rb:152:in `yyparse' - parser.y:366:in `parse' - parser.y:344:in `parse' - ./test/../lib/tmail/address.rb:84:in `parse' - ./test/test_address.rb:90:in `validate_case__address' - ./test/test_address.rb:247:in `_test_parse__euc' - ./test/test_address.rb:237:in `test_parse__rawjp' - -32 tests, 1689 assertions, 0 failures, 1 errors -Loaded suite -e -Started -..F................................................................... -Finished in 0.045485 seconds. - - 1) Failure: -test_ATTRS(ContentDispositionHeaderTester) - [./test/test_header.rb:824:in `_test_raw_iso2022jp' - ./test/test_header.rb:756:in `test_ATTRS']: -<"attachment"> expected but was -. - -70 tests, 315 assertions, 1 failures, 0 errors - - diff --git a/vendor/tmail-1.2.3.1/log/Todo.txt b/vendor/tmail-1.2.3.1/log/Todo.txt deleted file mode 100644 index 864ffb51e..000000000 --- a/vendor/tmail-1.2.3.1/log/Todo.txt +++ /dev/null @@ -1,30 +0,0 @@ -== TODO List - -* NORUBYEXT should probbly be renamed to TMAIL_NORUBYEXT or something to that effect. - -This is the original list left over from the 2004 version. - -Please refer to the website (http://tmail.rubyforge.org/) for the current TODO list. - -* RFC2231 decode -* delete File*Stream -* simplify field.rb -* allow raw JIS string in quoted word -* unify character encoding of japanese strings in header -* Loader -> Mailbox -* RFC2231 encode -* allow illegal MIME param value encoding (key="=?iso-2022-jp?B?....") -* purpose-oriented policy switching -* rewrite samples. -* address/address-group common handling scheme -* correct handling of Content-Type: message/* -* methods for mail creation, replying, forwarding -* tmail/net -* mail thread generator - -=== Bugs - -* mails may be deleted if other precesses are touching mailbox. -* mails may be corrupted if other precesses are touching mailbox. -* not thread safe - diff --git a/vendor/tmail-1.2.3.1/log/fixme.rdoc b/vendor/tmail-1.2.3.1/log/fixme.rdoc deleted file mode 100644 index c5e7cd306..000000000 --- a/vendor/tmail-1.2.3.1/log/fixme.rdoc +++ /dev/null @@ -1,6 +0,0 @@ - -= FIXME - -== file://lib/tmail/encode.rb -* FIXME: This class can handle only (euc-jp/shift_jis -> iso-2022-jp). (198) -* FIXME: implement line folding (317) diff --git a/vendor/tmail-1.2.3.1/meta/MANIFEST b/vendor/tmail-1.2.3.1/meta/MANIFEST deleted file mode 100644 index a74868465..000000000 --- a/vendor/tmail-1.2.3.1/meta/MANIFEST +++ /dev/null @@ -1,128 +0,0 @@ -# -x doc -x pkg -x log -CHANGES -LICENSE -NOTES -README -ext -ext/Makefile -ext/tmailscanner -ext/tmailscanner/tmail -ext/tmailscanner/tmail/MANIFEST -ext/tmailscanner/tmail/depend -ext/tmailscanner/tmail/extconf.rb -ext/tmailscanner/tmail/tmailscanner.c -lib -lib/tmail -lib/tmail/Makefile -lib/tmail/address.rb -lib/tmail/attachments.rb -lib/tmail/base64.rb -lib/tmail/compat.rb -lib/tmail/config.rb -lib/tmail/core_extensions.rb -lib/tmail/encode.rb -lib/tmail/header.rb -lib/tmail/index.rb -lib/tmail/interface.rb -lib/tmail/loader.rb -lib/tmail/mail.rb -lib/tmail/mailbox.rb -lib/tmail/main.rb -lib/tmail/mbox.rb -lib/tmail/net.rb -lib/tmail/obsolete.rb -lib/tmail/parser.rb -lib/tmail/parser.y -lib/tmail/port.rb -lib/tmail/quoting.rb -lib/tmail/require_arch.rb -lib/tmail/scanner.rb -lib/tmail/scanner_r.rb -lib/tmail/stringio.rb -lib/tmail/utils.rb -lib/tmail/version.rb -lib/tmail.rb -meta -meta/MANIFEST -meta/config.yaml -meta/icli.yaml -meta/project.yaml -meta/tmail.roll -sample -sample/bench_base64.rb -sample/data -sample/data/multipart -sample/data/normal -sample/data/sendtest -sample/data/simple -sample/data/test -sample/extract-attachements.rb -sample/from-check.rb -sample/multipart.rb -sample/parse-bench.rb -sample/parse-test.rb -sample/sendmail.rb -script -script/changelog -script/clobber -script/clobber/distclean -script/clobber/package -script/compile -script/pack -script/pack/gem -script/pack/tgz -script/pack/zip -script/prepare -script/publish -script/rdoc -script/release -script/setup -script/stamp -script/stats -script/tag -script/test -test -test/extctrl.rb -test/fixtures -test/fixtures/mailbox -test/fixtures/mailbox_without_any_from_or_sender -test/fixtures/mailbox_without_from -test/fixtures/mailbox_without_return_path -test/fixtures/raw_base64_decoded_string -test/fixtures/raw_base64_email -test/fixtures/raw_base64_encoded_string -test/fixtures/raw_email -test/fixtures/raw_email10 -test/fixtures/raw_email11 -test/fixtures/raw_email12 -test/fixtures/raw_email13 -test/fixtures/raw_email2 -test/fixtures/raw_email3 -test/fixtures/raw_email4 -test/fixtures/raw_email5 -test/fixtures/raw_email6 -test/fixtures/raw_email7 -test/fixtures/raw_email8 -test/fixtures/raw_email9 -test/fixtures/raw_email_quoted_with_0d0a -test/fixtures/raw_email_reply -test/fixtures/raw_email_simple -test/fixtures/raw_email_with_bad_date -test/fixtures/raw_email_with_illegal_boundary -test/fixtures/raw_email_with_multipart_mixed_quoted_boundary -test/fixtures/raw_email_with_nested_attachment -test/fixtures/raw_email_with_partially_quoted_subject -test/fixtures/raw_email_with_quoted_illegal_boundary -test/kcode.rb -test/test_address.rb -test/test_attachments.rb -test/test_base64.rb -test/test_encode.rb -test/test_header.rb -test/test_helper.rb -test/test_mail.rb -test/test_mbox.rb -test/test_port.rb -test/test_quote.rb -test/test_scanner.rb -test/test_utils.rb diff --git a/vendor/tmail-1.2.3.1/meta/VERSION b/vendor/tmail-1.2.3.1/meta/VERSION deleted file mode 100644 index 543894527..000000000 --- a/vendor/tmail-1.2.3.1/meta/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.2.3.1 stable (2008-04-11) \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/meta/project.yaml b/vendor/tmail-1.2.3.1/meta/project.yaml deleted file mode 100644 index e1af6fd47..000000000 --- a/vendor/tmail-1.2.3.1/meta/project.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -project : tmail -version : 1.2.3.1 -status : production -title : TMail -brief : Ruby Mail Handler -contact : Mikel Lindsaar -email : tmail-talk@rubyforge.org -homepage: http://tmail.rubyforge.org -authors : - - Minero Aoki - - Mikel Lindsaar - -description: - TMail is a Ruby-based mail handler. It allows you - to compose stadards compliant emails in a - very Ruby-way. - -loadpath: - - lib - - ext/tmailscanner - -exclude: [doc,work] - -hosts: - rubyforge: - type: rubyforge - rubytalk: - type: rubytalk - diff --git a/vendor/tmail-1.2.3.1/meta/unixname b/vendor/tmail-1.2.3.1/meta/unixname deleted file mode 100644 index 7b28f3ceb..000000000 --- a/vendor/tmail-1.2.3.1/meta/unixname +++ /dev/null @@ -1 +0,0 @@ -tmail diff --git a/vendor/tmail-1.2.3.1/sample/bench_base64.rb b/vendor/tmail-1.2.3.1/sample/bench_base64.rb deleted file mode 100644 index 74f66603a..000000000 --- a/vendor/tmail-1.2.3.1/sample/bench_base64.rb +++ /dev/null @@ -1,48 +0,0 @@ -# base64 benchmark -# -# pass 'c' as first argument to bench c lib. - -require 'benchmark' - -module TMail - module Base64 - end -end - -$lib = ARGV[0] -$count = 10000 -$size = 5000 - -def make_random_string(len) - buf = '' - len.times do - buf << rand(255) - end - buf -end - -def encode_and_decode(orig) - #ok = [orig].pack('m').delete("\r\n") -end - -if $lib == "c" - $lib = " c" - require 'ext/base64_c/tmail/base64_c.bundle' -else - $lib = "ruby" - require 'lib/tmail/base64_r.rb' -end - -def benchmark! - Benchmark.bm do |x| - x.report("#{$lib} #{$count.to_s}/#{$size}: ") do - $count.times do - orig = make_random_string($size) - result = TMail::Base64.encode(orig) - TMail::Base64.decode(result) - end - end - end -end - -benchmark! diff --git a/vendor/tmail-1.2.3.1/sample/data/multipart b/vendor/tmail-1.2.3.1/sample/data/multipart deleted file mode 100644 index 6beb31f7a..000000000 --- a/vendor/tmail-1.2.3.1/sample/data/multipart +++ /dev/null @@ -1,23 +0,0 @@ -Date: Tue, 26 Jan 1999 23:17:34 +0900 -From: aamine@dp.u-netsurf.ne.jp -To: ruby-list@netlab.co.jp -Mime-Version: 1.0 -Content-Type: multipart/mixed; - boundary="Multipart_Tue_Jan_26_23:14:41_1999-1" -Content-Transfer-Encoding: 7bit - -this is preamble - ---Multipart_Tue_Jan_26_23:14:41_1999-1 -Content-Type: text/plain; charset=iso-2022-jp - -this is multi part body 1 - ---Multipart_Tue_Jan_26_23:14:41_1999-1 -Content-Type: text/plain; charset=iso-2022-jp - -multi part body, 2 - ---Multipart_Tue_Jan_26_23:14:41_1999-1-- - -epilogue diff --git a/vendor/tmail-1.2.3.1/sample/data/normal b/vendor/tmail-1.2.3.1/sample/data/normal deleted file mode 100644 index d626556d7..000000000 --- a/vendor/tmail-1.2.3.1/sample/data/normal +++ /dev/null @@ -1,29 +0,0 @@ -Received: from hoyogw.netlab.co.jp (daemon@hoyogw.netlab.co.jp [202.218.249.220]) - by serv1.u-netsurf.ne.jp (8.8.8/3.6W-2.66(99/03/09)) with ESMTP id RAA10692 - for ; Thu, 18 Mar 1999 17:35:23 +0900 (JST) -Received: from hoyogw.netlab.co.jp (matz@localhost [127.0.0.1]) - by hoyogw.netlab.co.jp (8.9.1a+3.1W/3.7W/1.3) with SMTP id RAA13204; - Thu, 18 Mar 1999 17:21:58 +0900 -Received: from blade.nagaokaut.ac.jp (sinara@blade.nagaokaut.ac.jp [133.44.36.60]) - by hoyogw.netlab.co.jp (8.9.1a+3.1W/3.7W/1.3) with ESMTP id RAA13036 - for ; Thu, 18 Mar 1999 17:20:28 +0900 -Received: (from sinara@localhost) - by blade.nagaokaut.ac.jp (8.8.8/8.8.8/Debian/GNU) id RAA22078; - Thu, 18 Mar 1999 17:20:49 +0900 -Posted: Thu, 18 Mar 1999 17:20:49 +0900 -Reply-To: ruby-list@netlab.co.jp -Subject: [ruby-list:12994] Re: Sieve of Eratosthenes (Re: [ruby-dev:6094]) -Message-Id: <199903180820.RAA22078@blade.nagaokaut.ac.jp> -In-Reply-To: message of "Wed, 17 Mar 1999 18:42:07 +0900" - <199903170941.SAA12014@blade.nagaokaut.ac.jp> -Mime-Version: 1.0 -Content-Type: text/plain; charset = iso-2022-jp -Content-Transfer-Encoding: 7bit -Date: Thu, 18 Mar 1999 17:21:54 +0900 -To: ruby-list@netlab.co.jp (ruby mailing list) -From: (this is comment) local@dom1.dom2 -Subject: this is a test subject - -line 1 -line 2 -line 3 diff --git a/vendor/tmail-1.2.3.1/sample/data/sendtest b/vendor/tmail-1.2.3.1/sample/data/sendtest deleted file mode 100644 index 6b8e9da80..000000000 --- a/vendor/tmail-1.2.3.1/sample/data/sendtest +++ /dev/null @@ -1,5 +0,0 @@ -To: Minero Aoki -From: Minero Aoki -Subject: Sendmail test by tmail - -This is mail sent by tmail. diff --git a/vendor/tmail-1.2.3.1/sample/data/simple b/vendor/tmail-1.2.3.1/sample/data/simple deleted file mode 100644 index f2a3152fb..000000000 --- a/vendor/tmail-1.2.3.1/sample/data/simple +++ /dev/null @@ -1,14 +0,0 @@ -To: ã“れã¯ãƒ‡ã‚³ãƒ¼ãƒ‰æ¸ˆ -From: =?iso-2022-jp?B?GyRCJDMkbCRPJSglcyUzITwlSSQ1JGwkRiQkJD8bKEI=?= - -Received: from fromdom.fromdom by bydom.bydom - via VIAPATH with SMTP id for addr@spec - ; 23 Mar 1999 22:05:33 +0900 -Mime-Version: 1.0 -Content-Type: text/plain; charset=iso-2022-jp -Content-Transfer-Encoding: 7bit -Subject: this is a test subject - -body line 1 -body line 2 -body line 3 diff --git a/vendor/tmail-1.2.3.1/sample/data/test b/vendor/tmail-1.2.3.1/sample/data/test deleted file mode 100644 index 029e1a542..000000000 --- a/vendor/tmail-1.2.3.1/sample/data/test +++ /dev/null @@ -1,27 +0,0 @@ -Received: from hoyogw.netlab.co.jp (matz@localhost [127.0.0.1]) - by hoyogw.netlab.co.jp (8.9.1a+3.1W/3.7W/1.3) - with SMTP id RAA13204; - Thu, 18 Mar 1999 17:21:58 +0900 -Received: from fromdom.fromdom by bydom.bydom - via VIAPATH with SMTP id for addr@spec; - 23 Mar 1999 22:05:33 +0900 -Date: Thu, 18 Mar 1999 17:21:54 +0900 -To: ¤³¤ì¤Ï¥Ç¥³¡¼¥ÉºÑ <"aamine@"@dp.u-netsurf.ne.jp> (Minero Aoki) -Cc: -Bcc: =?iso-2022-jp?B?GyRCJDMkbCRPJUclMyE8JUk6URsoQg==?= - =?iso-2022-jp?B?PGFhbWluZUBkcC51LW5ldHN1cmYubmUuanA+?= -From: =?iso-2022-jp?B?GyRCJDMkbCRPJSglcyUzITwlSSQ1JGwkRiQkJD8bKEI=?= - (From comment) (comment2) -Posted: Thu, 18 Mar 1999 17:20:49 +0900 -Reply-To: ruby-list@netlab.co.jp -Subject: [ruby-list:12994] Re: Sieve of Eratosthenes -Message-Id: <199903180820.RAA22078@blade.nagaokaut.ac.jp> -In-Reply-To: "Wed, 17 Mar 1999 18:42:07 +0900" - <199903170941.SAA12014@blade.nagaokaut.ac.jp> -Mime-Version: 1.0 -Content-Type: text/plain; charset=iso-2022-jp -Content-Transfer-Encoding: 7bit - -line 1 -line 2 -line 3 diff --git a/vendor/tmail-1.2.3.1/sample/extract-attachements.rb b/vendor/tmail-1.2.3.1/sample/extract-attachements.rb deleted file mode 100644 index a305f4011..000000000 --- a/vendor/tmail-1.2.3.1/sample/extract-attachements.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# extract-attachments.rb -- Extracts attachment(s) from the message. -# -# Usage: ruby extract-attachments.rb mail mail... -# - -require 'tmail' - -def main - idx = 1 - ARGV.each do |fname| - TMail::Mail.load(fname).parts.each do |m| - m.base64_decode - File.open("#{idx}.#{ext(m)}", 'w') {|f| - f.write m.body - } - idx += 1 - end - end -end - -CTYPE_TO_EXT = { - 'image/jpeg' => 'jpeg', - 'image/gif' => 'gif', - 'image/png' => 'png', - 'image/tiff' => 'tiff' -} - -def ext( mail ) - CTYPE_TO_EXT[mail.content_type] || 'txt' -end - -main diff --git a/vendor/tmail-1.2.3.1/sample/from-check.rb b/vendor/tmail-1.2.3.1/sample/from-check.rb deleted file mode 100644 index d7b2b18be..000000000 --- a/vendor/tmail-1.2.3.1/sample/from-check.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# checking mail From: header -# - -require 'tmail' - -unless ARGV[0] then - $stderr.puts "usage: ruby fromcheck.rb " - exit 1 -end - -table = {} # from-addr-spec => [count, friendly-from] -ld = TMail::MhLoader.new( ARGV[0] ) -ld.each_port do |port| - mail = TMail::Mail.new( port ) - addr, = mail.from_addrs - if addr then - (table[addr.spec] ||= [0, mail.friendly_from])[0] += 1 - end -end - -table.to_a.sort {|a,b| - b[1][0] <=> a[1][0] -}.each_with_index do |(spec,(n,from)), i| - printf "%3d %-33s %d\n", i+1, from, n -end diff --git a/vendor/tmail-1.2.3.1/sample/multipart.rb b/vendor/tmail-1.2.3.1/sample/multipart.rb deleted file mode 100644 index e9383ac15..000000000 --- a/vendor/tmail-1.2.3.1/sample/multipart.rb +++ /dev/null @@ -1,26 +0,0 @@ -# -# MIME multipart parsing test -# - -require 'tmail' - -mail = TMail::Mail.load( ARGV[0] || 'data/multipart' ) - -puts '========= preamble ==============' -puts mail.body -puts - -puts '========== parts ================' -mail.parts.each_with_index do |i,idx| - puts "<#{idx+1}>" - puts i - puts -end - -puts '========= epilogue ==============' -puts mail.epilogue -puts - -puts "========= re-struct =============" -puts mail.decoded -puts diff --git a/vendor/tmail-1.2.3.1/sample/parse-bench.rb b/vendor/tmail-1.2.3.1/sample/parse-bench.rb deleted file mode 100644 index 933faad39..000000000 --- a/vendor/tmail-1.2.3.1/sample/parse-bench.rb +++ /dev/null @@ -1,68 +0,0 @@ -# -# parser benchmark -# - -require 'tmail' - - -if ARGV.empty? then - $stderr.puts "usage: #{$0} ..." - exit 0 -end -ARGV.each do |dname| - unless File.directory? dname then - $stderr.puts "not directory: #{dname}" - exit 1 - end -end - -$stdout.sync = true - -$count = 0 -$failnum = 0 -$dirfail = 0 -$fieldname = '' -$dirname = '' -$port = nil - -begin - ARGV.each do |dirname| - $dirname = dirname - - TMail::MhLoader.new( dirname ).each do |port| - begin - t = TMail::Mail.new( port ) - $port = port - - t.each_header do |key, field| - $fieldname = key - next if /received/i === key - if ::TMail::StructH === field then - field.instance_eval { parse unless @parsed } - end - end - rescue TMail::SyntaxError - $stderr.puts "fail in #{$count+1}, field #{$fieldname}" - $stderr.puts $!.to_s - $failnum += 1 - $dirfail += 1 - - if $failnum % 10 == 0 then - puts 'fail = ' + $failnum.to_s - #raise - end - end - - $count += 1 - puts "end #{$count}" if $count % 50 == 0 - end - - puts "directory #{dirname} end, fail=#{$dirfail}" - $dirfail = 0 - end -rescue - puts "at #{$port.inspect}, non ParseError raised" - raise -end - -puts "parse #{$count} files, fail=#{$failnum}" diff --git a/vendor/tmail-1.2.3.1/sample/parse-test.rb b/vendor/tmail-1.2.3.1/sample/parse-test.rb deleted file mode 100644 index 3ea40fa8d..000000000 --- a/vendor/tmail-1.2.3.1/sample/parse-test.rb +++ /dev/null @@ -1,19 +0,0 @@ -# -# parser test -# - -require 'tmail' - -puts "testing parser --------------------------------" -puts - -TMail::Mail.load( 'data/normal' ).each_header do |key, field| - if field.respond_to? :parse, true then - field.instance_eval { - parse - @written = true - } - end - printf "%s ok\n", field.name - # puts field.decoded -end diff --git a/vendor/tmail-1.2.3.1/sample/sendmail.rb b/vendor/tmail-1.2.3.1/sample/sendmail.rb deleted file mode 100644 index ce5003afb..000000000 --- a/vendor/tmail-1.2.3.1/sample/sendmail.rb +++ /dev/null @@ -1,94 +0,0 @@ -# -# sendmail.rb -# - -require 'tmail' -require 'net/smtp' -require 'nkf' -require 'etc' -require 'socket' -require 'getopts' - - -def usage( status, msg = nil ) - output = (status == 0 ? $stdout : $stderr) - output.puts msg if msg - output.print(<] [-f ] - - -h,--host=addr SMTP server address. (default=localhost) - -s,--subject=sbj subject of the message. (default=(none)) - -f,--from=from from address. - -j,--ja handle japanese message. (default=off) - -EOS - exit status -end - -def main - getopts('j', 'ja', 'h:', 'host:', - 's:', 'subject:', 'f:', 'from:', - 'help') or usage(1) - - smtphost = $OPT_host || $OPT_h || 'localhost' - subject = $OPT_subject || $OPT_s - from = $OPT_from || $OPT_f || guess_from_address() - usage(1, 'Sender address not given') unless from - to = ARGV - usage(1, 'Receipt address(es) not given') if to.empty? - ja_locale = $OPT_ja || $OPT_j - - send_mail smtphost, setup_mail(from, to, subject, $stdin.read, ja_locale) -end - -def setup_mail( from, to, subject, body, ja_locale ) - mail = TMail::Mail.new - mail.date = Time.now - mail.from = from - mail.to = to - mail.subject = subject if subject - mail.mime_version = '1.0' - if ja_locale - mail.body = NKF.nkf('-j', body) - mail.set_content_type 'text', 'plain', 'charset' => 'iso-2022-jp' - else - mail.body = body - mail.set_content_type 'text', 'plain' - end - mail -end - -def send_mail( host, mail ) - msg = mail.encoded - $stderr.print msg if $DEBUG - - smtp = Net::SMTP.new(host, 25) - smtp.set_debug_output $stderr if $DEBUG - smtp.start { - smtp.send_mail msg, mail.from_address, mail.destinations - } -end - -def guess_from_address - user = getlogin() - unless user - $stderr.puts 'cannot get user account; abort.' - exit 1 - end - if domain = (Socket.gethostname || ENV['HOSTNAME'] || ENV['HOST']) - user + '@' + domain - else - user - end -end - -def getlogin - begin - require 'etc' - Etc.getlogin - rescue LoadError - ENV['LOGNAME'] || ENV['USER'] - end -end - -main diff --git a/vendor/tmail-1.2.3.1/setup.rb b/vendor/tmail-1.2.3.1/setup.rb deleted file mode 100644 index 8ecfd270c..000000000 --- a/vendor/tmail-1.2.3.1/setup.rb +++ /dev/null @@ -1,1482 +0,0 @@ -#!/usr/bin/env ruby -# Setup.rb v3.5.0 -# Copyright (c) 2008 Minero Aoki, Trans -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. - -# Need the package name, and whether to generate documentation. -PACKAGE = File.read(Dir.glob('{.,meta/}unixname{,.txt}', File::FNM_CASEFOLD).first).strip -GENERATE_RDOCS = true # package developer may need to deactivate - -require 'optparse' -require 'rbconfig' - -class SetupError < StandardError; end - -# Typical installation procedure: -# -# $ ./setup.rb -# -# -- or -- -# -# $ ./setup.rb config -# $ ./setup.rb setup -# $ ./setup.rb install -# -# @all@ and @install@ may require root privileges. -# -# This update only works with Ruby 1.6.3 and above. -# -# TODO: Update shebangs on install of binaries. -# TODO: Make cleaning more comprehensive (?) - -module Setup - Version = "3.5.0" - - Copyright = "Copyright (c) 2000,2008 Minero Aoki, Trans" - - # ConfigTable stores platform information. - - class ConfigTable - - RBCONFIG = ::Config::CONFIG - - CONFIGFILE = '.config' - - DESCRIPTIONS = [ - [:prefix , :path, 'path prefix of target environment'], - [:bindir , :path, 'directory for commands'], - [:libdir , :path, 'directory for libraries'], - [:datadir , :path, 'directory for shared data'], - [:mandir , :path, 'directory for man pages'], - [:docdir , :path, 'Directory for documentation'], - [:sysconfdir , :path, 'directory for system configuration files'], - [:localstatedir , :path, 'directory for local state data'], - [:libruby , :path, 'directory for ruby libraries'], - [:librubyver , :path, 'directory for standard ruby libraries'], - [:librubyverarch , :path, 'directory for standard ruby extensions'], - [:siteruby , :path, 'directory for version-independent aux ruby libraries'], - [:siterubyver , :path, 'directory for aux ruby libraries'], - [:siterubyverarch , :path, 'directory for aux ruby binaries'], - [:rbdir , :path, 'directory for ruby scripts'], - [:sodir , :path, 'directory for ruby extentions'], - [:rubypath , :prog, 'path to set to #! line'], - [:rubyprog , :prog, 'ruby program using for installation'], - [:makeprog , :prog, 'make program to compile ruby extentions'], - [:extconfopt , :name, 'options to pass-thru to extconf.rb'], - [:without_ext , :bool, 'do not compile/install ruby extentions'], - [:without_doc , :bool, 'do not generate html documentation'], - [:shebang , :pick, 'shebang line (#!) editing mode (all,ruby,never)'], - [:doctemplate , :pick, 'document template to use (html|xml)'], - [:testrunner , :pick, 'Runner to use for testing (auto|console|tk|gtk|gtk2)'], - [:installdirs , :pick, 'install location mode (std,site,home :: libruby,site_ruby,$HOME)'] - ] - - # List of configurable options. - OPTIONS = DESCRIPTIONS.collect{ |(k,t,v)| k.to_s } - - # Pathname attribute. Pathnames are automatically expanded - # unless they start with '$', a path variable. - def self.attr_pathname(name) - class_eval %{ - def #{name} - @#{name}.gsub(%r<\\$([^/]+)>){ self[$1] } - end - def #{name}=(path) - raise SetupError, "bad config: #{name.to_s.upcase} requires argument" unless path - @#{name} = (path[0,1] == '$' ? path : File.expand_path(path)) - end - } - end - - # List of pathnames. These are not expanded though. - def self.attr_pathlist(name) - class_eval %{ - def #{name} - @#{name} - end - def #{name}=(pathlist) - case pathlist - when Array - @#{name} = pathlist - else - @#{name} = pathlist.to_s.split(/[:;,]/) - end - end - } - end - - # Adds boolean support. - def self.attr_accessor(*names) - bools, attrs = names.partition{ |name| name.to_s =~ /\?$/ } - attr_boolean *bools - super *attrs - end - - # Boolean attribute. Can be assigned true, false, nil, or - # a string matching yes|true|y|t or no|false|n|f. - def self.attr_boolean(*names) - names.each do |name| - name = name.to_s.chomp('?') - attr_reader name # MAYBE: Deprecate - code = %{ - def #{name}?; @#{name}; end - def #{name}=(val) - case val - when true, false, nil - @#{name} = val - else - case val.to_s.downcase - when 'y', 'yes', 't', 'true' - @#{name} = true - when 'n', 'no', 'f', 'false' - @#{name} = false - else - raise SetupError, "bad config: use #{name.upcase}=(yes|no) [\#{val}]" - end - end - end - } - class_eval code - end - end - - DESCRIPTIONS.each do |k,t,d| - case t - when :path - attr_pathname k - when :bool - attr_boolean k - else - attr_accessor k - end - end - - # # provide verbosity (default is true) - # attr_accessor :verbose? - - # # don't actually write files to system - # attr_accessor :no_harm? - - # shebang has only three options. - def shebang=(val) - if %w(all ruby never).include?(val) - @shebang = val - else - raise SetupError, "bad config: use SHEBANG=(all|ruby|never) [#{val}]" - end - end - - # installdirs has only three options; and it has side-effects. - def installdirs=(val) - @installdirs = val - case val.to_s - when 'std' - self.rbdir = '$librubyver' - self.sodir = '$librubyverarch' - when 'site' - self.rbdir = '$siterubyver' - self.sodir = '$siterubyverarch' - when 'home' - raise SetupError, 'HOME is not set.' unless ENV['HOME'] - self.prefix = ENV['HOME'] - self.rbdir = '$libdir/ruby' - self.sodir = '$libdir/ruby' - else - raise SetupError, "bad config: use INSTALLDIRS=(std|site|home|local) [#{val}]" - end - end - - # New ConfigTable - def initialize(values=nil) - initialize_defaults - if values - values.each{ |k,v| __send__("#{k}=", v) } - end - yeild(self) if block_given? - load_config if File.file?(CONFIGFILE) - end - - # Assign CONFIG defaults - # - # TODO: Does this handle 'nmake' on windows? - def initialize_defaults - prefix = RBCONFIG['prefix'] - - rubypath = File.join(RBCONFIG['bindir'], RBCONFIG['ruby_install_name'] + RBCONFIG['EXEEXT']) - - major = RBCONFIG['MAJOR'].to_i - minor = RBCONFIG['MINOR'].to_i - teeny = RBCONFIG['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - if RBCONFIG['rubylibdir'] - # V > 1.6.3 - libruby = "#{prefix}/lib/ruby" - librubyver = RBCONFIG['rubylibdir'] - librubyverarch = RBCONFIG['archdir'] - siteruby = RBCONFIG['sitedir'] - siterubyver = RBCONFIG['sitelibdir'] - siterubyverarch = RBCONFIG['sitearchdir'] - elsif newpath_p - # 1.4.4 <= V <= 1.6.3 - libruby = "#{prefix}/lib/ruby" - librubyver = "#{prefix}/lib/ruby/#{version}" - librubyverarch = "#{prefix}/lib/ruby/#{version}/#{c['arch']}" - siteruby = RBCONFIG['sitedir'] - siterubyver = "$siteruby/#{version}" - siterubyverarch = "$siterubyver/#{RBCONFIG['arch']}" - else - # V < 1.4.4 - libruby = "#{prefix}/lib/ruby" - librubyver = "#{prefix}/lib/ruby/#{version}" - librubyverarch = "#{prefix}/lib/ruby/#{version}/#{c['arch']}" - siteruby = "#{prefix}/lib/ruby/#{version}/site_ruby" - siterubyver = siteruby - siterubyverarch = "$siterubyver/#{RBCONFIG['arch']}" - end - - if arg = RBCONFIG['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } - makeprog = arg.sub(/'/, '').split(/=/, 2)[1] - else - makeprog = 'make' - end - - parameterize = lambda do |path| - val = RBCONFIG[path] - raise "Unknown path -- #{path}" if val.nil? - val.sub(/\A#{Regexp.quote(prefix)}/, '$prefix') - end - - self.prefix = prefix - self.bindir = parameterize['bindir'] - self.libdir = parameterize['libdir'] - self.datadir = parameterize['datadir'] - self.mandir = parameterize['mandir'] - self.docdir = File.dirname(parameterize['docdir']) # b/c of trailing $(PACKAGE) - self.sysconfdir = parameterize['sysconfdir'] - self.localstatedir = parameterize['localstatedir'] - self.libruby = libruby - self.librubyver = librubyver - self.librubyverarch = librubyverarch - self.siteruby = siteruby - self.siterubyver = siterubyver - self.siterubyverarch = siterubyverarch - self.rbdir = '$siterubyver' - self.sodir = '$siterubyverarch' - self.rubypath = rubypath - self.rubyprog = rubypath - self.makeprog = makeprog - self.extconfopt = '' - self.shebang = 'ruby' - self.without_ext = 'no' - self.without_doc = 'yes' - self.doctemplate = 'html' - self.testrunner = 'auto' - self.installdirs = 'site' - end - - # Get configuration from environment. - def env_config - OPTIONS.each do |name| - if value = ENV[name] - __send__("#{name}=",value) - end - end - end - - # Load configuration. - def load_config - #if File.file?(CONFIGFILE) - begin - File.foreach(CONFIGFILE) do |line| - k, v = *line.split(/=/, 2) - __send__("#{k}=",v.strip) #self[k] = v.strip - end - rescue Errno::ENOENT - raise SetupError, $!.message + "\n#{File.basename($0)} config first" - end - #end - end - - # Save configuration. - def save_config - File.open(CONFIGFILE, 'w') do |f| - OPTIONS.each do |name| - val = self[name] - f << "#{name}=#{val}\n" - end - end - end - - def show - fmt = "%-20s %s\n" - OPTIONS.each do |name| - value = self[name] - reslv = __send__(name) - case reslv - when String - reslv = "(none)" if reslv.empty? - when false, nil - reslv = "no" - when true - reslv = "yes" - end - printf fmt, name, reslv - end - end - - # - - def extconfs - @extconfs ||= Dir['ext/**/extconf.rb'] - end - - def extensions - @extensions ||= extconfs.collect{ |f| File.dirname(f) } - end - - def compiles? - !extensions.empty? - end - - private - - # Get unresloved attribute. - def [](name) - instance_variable_get("@#{name}") - end - - # Set attribute. - def []=(name, value) - instance_variable_set("@#{name}", value) - end - - # Resolved attribute. (for paths) - #def resolve(name) - # self[name].gsub(%r<\\$([^/]+)>){ self[$1] } - #end - - end - - # Installer class handles the actual install procedure, - # as well as the other tasks, such as testing. - - class Installer - - MANIFEST = '.installedfiles' - - FILETYPES = %w( bin lib ext data conf man doc ) - - TASK_DESCRIPTIONS = [ - [ 'all', 'do config, setup, then install' ], - [ 'config', 'saves your configurations' ], - [ 'show', 'shows current configuration' ], - [ 'setup', 'compiles ruby extentions and others' ], - [ 'doc', 'generate html documentation' ], - [ 'index', 'generate index documentation' ], - [ 'install', 'installs files' ], - [ 'test', 'run all tests in test/' ], - [ 'clean', "does `make clean' for each extention" ], - [ 'distclean',"does `make distclean' for each extention" ] - ] - - TASKS = %w(all config show setup test install uninstall doc index clean distclean) - - # Configuration - attr :config - - attr_writer :no_harm - attr_writer :verbose - attr_writer :quiet - - attr_accessor :install_prefix - - # New Installer. - def initialize #:yield: - srcroot = '.' - objroot = '.' - - @config = ConfigTable.new - - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - - self.quiet = ENV['quiet'] if ENV['quiet'] - self.verbose = ENV['verbose'] if ENV['verbose'] - self.no_harm = ENV['nowrite'] if ENV['nowrite'] - - yield(self) if block_given? - end - - def inspect - "#<#{self.class} #{File.basename(@srcdir)}>" - end - - # Are we running an installation? - def installation?; @installation; end - def installation!; @installation = true; end - - def no_harm?; @no_harm; end - def verbose?; @verbose; end - def quiet?; @quiet; end - - def verbose_off #:yield: - begin - save, @verbose = verbose?, false - yield - ensure - @verbose = save - end - end - - # Rake task handlers - def rake_define - require 'rake/clean' - - desc 'Config, setup and then install' - task :all => [:config, :setup, :install] - - desc 'Saves your configurations' - task :config do exec_config end - - desc 'Compiles ruby extentions' - task :setup do exec_setup end - - desc 'Runs unit tests' - task :test do exec_test end - - desc 'Generate html api docs' - task :doc do exec_doc end - - desc 'Generate api index docs' - task :index do exec_index end - - desc 'Installs files' - task :install do exec_install end - - desc 'Uninstalls files' - task :uninstall do exec_uninstall end - - #desc "Does `make clean' for each extention" - task :makeclean do exec_clean end - - task :clean => [:makeclean] - - #desc "Does `make distclean' for each extention" - task :distclean do exec_distclean end - - task :clobber => [:distclean] - - desc 'Shows current configuration' - task :show do exec_show end - end - - # Added these for future use in simplificaiton of design. - - def extensions - @extensions ||= Dir['ext/**/extconf.rb'] - end - - def compiles? - !extensions.empty? - end - - # - def noop(rel); end - - # - # Hook Script API bases - # - - def srcdir_root - @srcdir - end - - def objdir_root - @objdir - end - - def relpath - @currdir - end - - # - # Task all - # - - def exec_all - exec_config - exec_setup - exec_test # TODO: we need to stop here if tests fail (how?) - exec_doc if GENERATE_RDOCS && !config.without_doc? - exec_install - end - - # - # TASK config - # - - def exec_config - config.env_config - config.save_config - config.show unless quiet? - puts("Configuration saved.") unless quiet? - exec_task_traverse 'config' - end - - alias config_dir_bin noop - alias config_dir_lib noop - - def config_dir_ext(rel) - extconf if extdir?(curr_srcdir()) - end - - alias config_dir_data noop - alias config_dir_conf noop - alias config_dir_man noop - alias config_dir_doc noop - - def extconf - ruby "#{curr_srcdir()}/extconf.rb", config.extconfopt - end - - # - # TASK show - # - - def exec_show - config.show - end - - # - # TASK setup - # - # FIXME: Update shebang at time of install not before. - # for now I've commented it out the shebang. - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin(rel) - files_of(curr_srcdir()).each do |fname| - #update_shebang_line "#{curr_srcdir()}/#{fname}" - end - end - - alias setup_dir_lib noop - - def setup_dir_ext(rel) - make if extdir?(curr_srcdir()) - end - - alias setup_dir_data noop - alias setup_dir_conf noop - alias setup_dir_man noop - alias setup_dir_doc noop - - def update_shebang_line(path) - return if no_harm? - return if config.shebang == 'never' - old = Shebang.load(path) - if old - if old.args.size > 1 - $stderr.puts "warning: #{path}" - $stderr.puts "Shebang line has too many args." - $stderr.puts "It is not portable and your program may not work." - end - new = new_shebang(old) - return if new.to_s == old.to_s - else - return unless config.shebang == 'all' - new = Shebang.new(config.rubypath) - end - $stderr.puts "updating shebang: #{File.basename(path)}" if verbose? - open_atomic_writer(path) {|output| - File.open(path, 'rb') {|f| - f.gets if old # discard - output.puts new.to_s - output.print f.read - } - } - end - - def new_shebang(old) - if /\Aruby/ =~ File.basename(old.cmd) - Shebang.new(config.rubypath, old.args) - elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby' - Shebang.new(config.rubypath, old.args[1..-1]) - else - return old unless config.shebang == 'all' - Shebang.new(config.rubypath) - end - end - - def open_atomic_writer(path, &block) - tmpfile = File.basename(path) + '.tmp' - begin - File.open(tmpfile, 'wb', &block) - File.rename tmpfile, File.basename(path) - ensure - File.unlink tmpfile if File.exist?(tmpfile) - end - end - - class Shebang - def Shebang.load(path) - line = nil - File.open(path) {|f| - line = f.gets - } - return nil unless /\A#!/ =~ line - parse(line) - end - - def Shebang.parse(line) - cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ') - new(cmd, args) - end - - def initialize(cmd, args = []) - @cmd = cmd - @args = args - end - - attr_reader :cmd - attr_reader :args - - def to_s - "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}") - end - end - - # - # TASK test - # - # TODO: Add spec support. - - def exec_test - $stderr.puts 'Running tests...' if verbose? - - runner = config.testrunner - - case runner - when 'auto' - unless File.directory?('test') - $stderr.puts 'no test in this package' if verbose? - return - end - begin - require 'test/unit' - rescue LoadError - setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.' - end - autorunner = Test::Unit::AutoRunner.new(true) - autorunner.to_run << 'test' - autorunner.run - else # use testrb - opt = [] - opt << " -v" if verbose? - opt << " --runner #{runner}" - if File.file?('test/suite.rb') - notests = false - opt << "test/suite.rb" - else - notests = Dir["test/**/*.rb"].empty? - lib = ["lib"] + config.extensions.collect{ |d| File.dirname(d) } - opt << "-I" + lib.join(':') - opt << Dir["test/**/{test,tc}*.rb"] - end - opt = opt.flatten.join(' ').strip - # run tests - if notests - $stderr.puts 'no test in this package' if verbose? - else - cmd = "testrb #{opt}" - $stderr.puts cmd if verbose? - system cmd #config.ruby "-S tesrb", opt - end - end - end - - # MAYBE: We could traverse and run each test independently (?) - #def test_dir_test - #end - - # - # TASK doc - # - - def exec_doc - output = File.join('doc', 'rdoc') - title = (PACKAGE.capitalize + " API").strip - main = Dir.glob("README{,.txt}", File::FNM_CASEFOLD).first - template = config.doctemplate || 'html' - - opt = [] - opt << "-U" - opt << "-S" - opt << "--op=#{output}" - opt << "--template=#{template}" - opt << "--title=#{title}" - opt << "--main=#{main}" if main - - if File.exist?('.document') - files = File.read('.document').split("\n") - files.reject!{ |l| l =~ /^\s*[#]/ || l !~ /\S/ } - files.collect!{ |f| f.strip } - opt << files - else - opt << main if main - opt << ["lib", "ext"] - end - - opt = opt.flatten - - if no_harm? - puts "rdoc " + opt.join(' ').strip - else - #sh "rdoc {opt.join(' ').strip}" - require 'rdoc/rdoc' - ::RDoc::RDoc.new.document(opt) - end - end - - # - # TASK index - # - # TODO: Totally deprecate stadard ri support in favor of fastri. - - def exec_index - begin - require 'fastri/version' - fastri = true - rescue LoadError - fastri = false - end - if fastri - if no_harm? - $stderr.puts "fastri-server -b" - else - system "fastri-server -b" - end - else - case config.installdirs - when 'std' - output = "--ri-system" - when 'site' - output = "--ri-site" - when 'home' - output = "--ri" - else - abort "bad config: sould not be possible -- installdirs = #{config.installdirs}" - end - - if File.exist?('.document') - files = File.read('.document').split("\n") - files.reject!{ |l| l =~ /^\s*[#]/ || l !~ /\S/ } - files.collect!{ |f| f.strip } - else - files = ["lib", "ext"] - end - - opt = [] - opt << "-U" - opt << output - opt << files - opt = opt.flatten - - if no_harm? - puts "rdoc #{opt.join(' ').strip}" - else - #sh "rdoc #{opt.join(' ').strip}" - require 'rdoc/rdoc' - ::RDoc::RDoc.new.document(opt) - end - end - end - - # - # TASK install - # - - def exec_install - installation! # were are installing - #rm_f MANIFEST # we'll append rather then delete! - exec_task_traverse 'install' - end - - def install_dir_bin(rel) - install_files targetfiles(), "#{config.bindir}/#{rel}", 0755 - end - - def install_dir_lib(rel) - install_files libfiles(), "#{config.rbdir}/#{rel}", 0644 - end - - def install_dir_ext(rel) - return unless extdir?(curr_srcdir()) - install_files rubyextentions('.'), - "#{config.sodir}/#{File.dirname(rel)}", 0555 - end - - def install_dir_data(rel) - install_files targetfiles(), "#{config.datadir}/#{rel}", 0644 - end - - def install_dir_conf(rel) - # FIXME: should not remove current config files - # (rename previous file to .old/.org) - install_files targetfiles(), "#{config.sysconfdir}/#{rel}", 0644 - end - - def install_dir_man(rel) - install_files targetfiles(), "#{config.mandir}/#{rel}", 0644 - end - - # doc installs to directory named: "ruby-#{package}" - def install_dir_doc(rel) - return if config.without_doc? - dir = "#{config.docdir}/ruby-#{PACKAGE}/#{rel}" # "#{config.docdir}/#{rel}" - install_files targetfiles(), dir, 0644 - end - - def install_files(list, dest, mode) - mkdir_p dest, install_prefix - list.each do |fname| - install fname, dest, mode, install_prefix - end - end - - def libfiles - glob_reject(%w(*.y *.output), targetfiles()) - end - - def rubyextentions(dir) - ents = glob_select("*.#{dllext}", targetfiles()) - if ents.empty? - setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" - end - ents - end - - def dllext - ConfigTable::RBCONFIG['DLEXT'] - end - - def targetfiles - mapdir(existfiles() - hookfiles()) - end - - def mapdir(ents) - ents.map {|ent| - if File.exist?(ent) - then ent # objdir - else "#{curr_srcdir()}/#{ent}" # srcdir - end - } - end - - # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w( - core RCSLOG tags TAGS .make.state - .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb - *~ *.old *.bak *.BAK *.orig *.rej _$* *$ - - *.org *.in .* - ) - - def existfiles - glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.'))) - end - - def hookfiles - %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt| - %w( config setup install clean ).map {|t| sprintf(fmt, t) } - }.flatten - end - - def glob_select(pat, ents) - re = globs2re([pat]) - ents.select {|ent| re =~ ent } - end - - def glob_reject(pats, ents) - re = globs2re(pats) - ents.reject {|ent| re =~ ent } - end - - GLOB2REGEX = { - '.' => '\.', - '$' => '\$', - '#' => '\#', - '*' => '.*' - } - - def globs2re(pats) - /\A(?:#{ - pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|') - })\z/ - end - - # - # TASK uninstall - # - - def exec_uninstall - paths = File.read(MANIFEST).split("\n") - dirs, files = paths.partition{ |f| File.dir?(f) } - - files.each do |file| - next if /^\#/ =~ file # skip comments - rm_f(file) if File.exist?(file) - end - - dirs.each do |dir| - # okay this is over kill, but playing it safe... - empty = Dir[File.join(dir,'*')].empty? - begin - if no_harm? - $stderr.puts "rmdir #{dir}" - else - rmdir(dir) if empty - end - rescue Errno::ENOTEMPTY - $stderr.puts "may not be empty -- #{dir}" if verbose? - end - end - - rm_f(MANIFEST) - end - - # - # TASK clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f ConfigTable::CONFIGFILE - #rm_f MANIFEST # only on clobber! - end - - alias clean_dir_bin noop - alias clean_dir_lib noop - alias clean_dir_data noop - alias clean_dir_conf noop - alias clean_dir_man noop - alias clean_dir_doc noop - - def clean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'clean' if File.file?('Makefile') - end - - # - # TASK distclean - # - - def exec_distclean - exec_task_traverse 'distclean' - rm_f ConfigTable::CONFIGFILE - rm_f MANIFEST - end - - alias distclean_dir_bin noop - alias distclean_dir_lib noop - - def distclean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'distclean' if File.file?('Makefile') - end - - alias distclean_dir_data noop - alias distclean_dir_conf noop - alias distclean_dir_man noop - - def distclean_dir_doc(rel) - if GENERATE_RDOCS - rm_rf('rdoc') if File.directory?('rdoc') - end - end - - # - # Traversing - # - - def exec_task_traverse(task) - run_hook "pre-#{task}" - FILETYPES.each do |type| - if type == 'ext' and config.without_ext == 'yes' - $stderr.puts 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, "#{task}_dir_#{type}" - end - run_hook "post-#{task}" - end - - def traverse(task, rel, mid) - dive_into(rel) { - run_hook "pre-#{task}" - __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '') - directories_of(curr_srcdir()).each do |d| - traverse task, "#{rel}/#{d}", mid - end - run_hook "post-#{task}" - } - end - - def dive_into(rel) - return unless File.dir?("#{@srcdir}/#{rel}") - - dir = File.basename(rel) - Dir.mkdir dir unless File.dir?(dir) - prevdir = Dir.pwd - Dir.chdir dir - $stderr.puts '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir prevdir - $stderr.puts '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - def run_hook(id) - path = [ "#{curr_srcdir()}/#{id}", - "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) } - return unless path - begin - instance_eval File.read(path), path, 1 - rescue - raise if $DEBUG - setup_rb_error "hook #{path} failed:\n" + $!.message - end - end - - # File Operations - # - # This module requires: #verbose?, #no_harm? - - def binread(fname) - File.open(fname, 'rb'){ |f| - return f.read - } - end - - def mkdir_p(dirname, prefix = nil) - dirname = prefix + File.expand_path(dirname) if prefix - $stderr.puts "mkdir -p #{dirname}" if verbose? - return if no_harm? - - # Does not check '/', it's too abnormal. - dirs = File.expand_path(dirname).split(%r<(?=/)>) - if /\A[a-z]:\z/i =~ dirs[0] - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless File.dir?(path) - record_installation(path) # also record directories made - end - end - - def rm_f(path) - $stderr.puts "rm -f #{path}" if verbose? - return if no_harm? - force_remove_file path - end - - def rm_rf(path) - $stderr.puts "rm -rf #{path}" if verbose? - return if no_harm? - remove_tree path - end - - def rmdir(path) - $stderr.puts "rmdir #{path}" if verbose? - return if no_harm? - Dir.rmdir path - end - - def remove_tree(path) - if File.symlink?(path) - remove_file path - elsif File.dir?(path) - remove_tree0 path - else - force_remove_file path - end - end - - def remove_tree0(path) - Dir.foreach(path) do |ent| - next if ent == '.' - next if ent == '..' - entpath = "#{path}/#{ent}" - if File.symlink?(entpath) - remove_file entpath - elsif File.dir?(entpath) - remove_tree0 entpath - else - force_remove_file entpath - end - end - begin - Dir.rmdir path - rescue Errno::ENOTEMPTY - # directory may not be empty - end - end - - def move_file(src, dest) - force_remove_file dest - begin - File.rename src, dest - rescue - File.open(dest, 'wb') {|f| - f.write binread(src) - } - File.chmod File.stat(src).mode, dest - File.unlink src - end - end - - def force_remove_file(path) - begin - remove_file path - rescue - end - end - - def remove_file(path) - File.chmod 0777, path - File.unlink path - end - - def install(from, dest, mode, prefix = nil) - $stderr.puts "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix ? prefix + File.expand_path(dest) : dest - realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) - str = binread(from) - if diff?(str, realdest) - verbose_off { - rm_f realdest if File.exist?(realdest) - } - File.open(realdest, 'wb') {|f| - f.write str - } - File.chmod mode, realdest - - if prefix - path = realdest.sub(prefix, '') - else - path = realdest - end - - record_installation(path) - end - end - - def record_installation(path) - File.open("#{objdir_root()}/#{MANIFEST}", 'a') do |f| - f.puts(path) - end - end - - def diff?(new_content, path) - return true unless File.exist?(path) - new_content != binread(path) - end - - def command(*args) - $stderr.puts args.join(' ') if verbose? - system(*args) or raise RuntimeError, - "system(#{args.map{|a| a.inspect }.join(' ')}) failed" - end - - def ruby(*args) - command config.rubyprog, *args - end - - def make(task = nil) - command(*[config.makeprog, task].compact) - end - - def extdir?(dir) - File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") - end - - def files_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.file?("#{dir}/#{ent}") } - } - end - - DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn ) - - def directories_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT - } - end - - # - # Hook Script API - # - # These require: #srcdir_root, #objdir_root, #relpath - # - - # - def get_config(key) - config.__send__(key) - end - - # obsolete: use metaconfig to change configuration - # TODO: what to do with? - def set_config(key, val) - config[key] = val - end - - # - # srcdir/objdir (works only in the package directory) - # - - def curr_srcdir - "#{srcdir_root()}/#{relpath()}" - end - - def curr_objdir - "#{objdir_root()}/#{relpath()}" - end - - def srcfile(path) - "#{curr_srcdir()}/#{path}" - end - - def srcexist?(path) - File.exist?(srcfile(path)) - end - - def srcdirectory?(path) - File.dir?(srcfile(path)) - end - - def srcfile?(path) - File.file?(srcfile(path)) - end - - def srcentries(path = '.') - Dir.open("#{curr_srcdir()}/#{path}") {|d| - return d.to_a - %w(. ..) - } - end - - def srcfiles(path = '.') - srcentries(path).select {|fname| - File.file?(File.join(curr_srcdir(), path, fname)) - } - end - - def srcdirectories(path = '.') - srcentries(path).select {|fname| - File.dir?(File.join(curr_srcdir(), path, fname)) - } - end - - end - - # CLI runner. - def self.run_cli - installer = Setup::Installer.new - - task = ARGV.find{ |a| a !~ /^[-]/ } - task = 'all' unless task - - unless Setup::Installer::TASKS.include?(task) - $stderr.puts "Not a valid task -- #{task}" - exit 1 - end - - opts = OptionParser.new - - opts.banner = "Usage: #{File.basename($0)} [task] [options]" - - if task == 'config' or task == 'all' - opts.separator "" - opts.separator "Config options:" - Setup::ConfigTable::DESCRIPTIONS.each do |name, type, desc| - opts.on("--#{name} #{type.to_s.upcase}", desc) do |val| - ENV[name.to_s] = val.to_s - end - end - end - - if task == 'install' - opts.separator "" - opts.separator "Install options:" - - opts.on("--prefix PATH", "Installation prefix") do |val| - installer.install_prefix = val - end - end - - if task == 'test' - opts.separator "" - opts.separator "Install options:" - - opts.on("--runner TYPE", "Test runner (auto|console|gtk|gtk2|tk)") do |val| - installer.config.testrunner = val - end - end - - # common options - opts.separator "" - opts.separator "General options:" - - opts.on("-q", "--quiet", "Silence output") do |val| - installer.quiet = val - end - - opts.on("--verbose", "Provide verbose output") do |val| - installer.verbose = val - end - - opts.on("-n", "--no-write", "Do not write to disk") do |val| - installer.no_harm = !val - end - - opts.on("--dryrun", "Same as --no-write") do |val| - installer.no_harm = val - end - - # common options - opts.separator "" - opts.separator "Inform options:" - - # Tail options (eg. commands in option form) - opts.on_tail("-h", "--help", "display this help information") do - puts Setup.help - exit - end - - opts.on_tail("--version", "Show version") do - puts File.basename($0) + ' v' + Setup::Version.join('.') - exit - end - - opts.on_tail("--copyright", "Show copyright") do - puts Setup::Copyright - exit - end - - begin - opts.parse!(ARGV) - rescue OptionParser::InvalidOption - $stderr.puts $!.to_s.capitalize - exit 1 - end - - begin - installer.__send__("exec_#{task}") - rescue SetupError - raise if $DEBUG - $stderr.puts $!.message - $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." - exit 1 - end - end - - # Generate help text. - def self.help - fmt = " " * 10 + "%-10s %s" - commands = Installer::TASK_DESCRIPTIONS.collect do |k,d| - (fmt % ["#{k}", d]) - end.join("\n").strip - - fmt = " " * 13 + "%-20s %s" - configs = ConfigTable::DESCRIPTIONS.collect do |k,t,d| - (fmt % ["--#{k}", d]) - end.join("\n").strip - - text = <<-END - USAGE: #{File.basename($0)} [command] [options] - - Commands: - #{commands} - - Options for CONFIG: - #{configs} - - Options for INSTALL: - --prefix Set the install prefix - - Options in common: - -q --quiet Silence output - --verbose Provide verbose output - -n --no-write Do not write to disk - - END - - text.gsub(/^ \ \ \ \ \ /, '') - end - - # - def self.run_rake - installer = Setup::Installer.new - installer.rake_define - end - -end - -# -# Ruby Extensions -# - -unless File.respond_to?(:read) # Ruby 1.6 and less - def File.read(fname) - open(fname) {|f| - return f.read - } - end -end - -unless Errno.const_defined?(:ENOTEMPTY) # Windows? - module Errno - class ENOTEMPTY - # We do not raise this exception, implementation is not needed. - end - end -end - -# for corrupted Windows' stat(2) -def File.dir?(path) - File.directory?((path[-1,1] == '/') ? path : path + '/') -end - -# -# Runners -# - -if $0 == __FILE__ - - Setup.run_cli - -elsif defined?(Rake) - - Setup.run_rake - -end - diff --git a/vendor/tmail-1.2.3.1/site/contributing/index.html b/vendor/tmail-1.2.3.1/site/contributing/index.html deleted file mode 100644 index 620564db4..000000000 --- a/vendor/tmail-1.2.3.1/site/contributing/index.html +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - TMail — Contributing to the best Ruby email handler ever! - - - - - - - - -
- - - -
-

TMail

-

Ruby on Mail

-
- -
- -
-

Contributing to TMail

- -

- Here is a blunt truth, TMail is what we (that is you and me) make it. -

- -

- I have had a few people asking how to contribute to TMail, so I thought I - would quickly do a write up on how to go about it. -

- -

- First things first, go to the TMail Mailing list and subscribe and let us - know what you want to attack, while this is definitely not a requirement to - writing a patch, maybe someone else has the same problem and / or is mid - fixing it, plus, we're basically a nice bunch of people ;) -

- -

- Then, if you are new to this sort of thing you should go and read this great write up - by Dr Nic - which covers the basic steps on how to check out, patch and submit fixes to - code. This also applied very well to TMail. -

- -

- Then, you need to get a copy of the latest TMail trunk code. You do this like so: -

- -
-baci:~ mikel$ svn checkout http://tmail.rubyforge.org/svn/trunk tmail
-
- -

- This will check out the most recent version of TMail from the source tree at - RubyForge. Once you have this, the first thing you should do is run the test - suite. There are over 4000 assertions run by the test suite to make sure all - is OK. This also gives you a stable datum of "When I got it, it was working - so I just have to make sure it stays working...". To run the tests, do this: -

- - -
-baci:~ mikel$ cd tmail
-baci:~/tmail mikel$ rake test
-(in /Users/mikel/tmail)
-/usr/local/bin/ruby -Ilib:test ((SNIP))
-Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake/rake_test_loader
-Started
-........................................................................
-........................................................................
-............................................................
-Finished in 0.456426 seconds.
-
-204 tests, 4014 assertions, 0 failures, 0 errors
-
- -

- If you get any errors at this point, post to the TMail Mailing list and let us - know, tell us what version of Ruby you are running, and what platform you are on - as well as any error output from the tests. If you can fix it, go ahead! -

- -

- Now that you have the trunk version, you need to write your patch and submit it. - If you are making a code change, you should write a test driven change, if you - are new to this, you can find a great screen cast by James Edward Gray II on - TDD with Textmate. - This will give you the basics of what a test drive change is and how to go about it. - For all you RSpec fans, I am seriously considering moving the testing framework over - to BDD and RSpec, if you want to get on board and help out, that would be great! -

- -

- Once you have written your test, run rake test again and watch it fail. This is a - key part of Test Driven Development. Then write your change in the code. -

- -

- Once you have written your code, run rake test again, and your test should now pass - and every OTHER test should also pass. If this is the case, then well done! You - have just made a test driven change to the TMail library. -

- -

- Now you need to make the diff file of what you have done against the library. You - do this using the svn diff command. First however, you should update your code, just - in case someone else has updated the source tree between you checking it out and - writing your patch. So, you do both like this: -

- -
-baci:~/tmail mikel$ svn up
-At revision 206.
-baci:~/tmail mikel$ svn diff > my_well_named_patch_file.diff
-baci:~/tmail mikel$ 
-
- -

- Note: If while doing the SVN UP anything was updated, you should re-run your - tests using rake test to make sure your patch didn't just go stale :) -

- -

- Next step is peer review. Go open a patch ticket on the - - RubyForge tracker, in it, select the right category and group for the patch - you have made (if there isn't one that matches, leave it as none and then mention - this in the description field). Give your ticket a name, and then attach your file. -

- -

- It is a good idea to then go to the TMail Talk list and let everyone know about your - patch. Then we can check it out, suggest changes or commit it if all is good. -

- -

- That's it! Easy hey? Once you have submitted patches, it gets easier and you get - to bask in the glory of being a committer to Ruby's most popular mail handling - library. -

- -
- - - -
- - diff --git a/vendor/tmail-1.2.3.1/site/css/clean.css b/vendor/tmail-1.2.3.1/site/css/clean.css deleted file mode 100644 index a8249089c..000000000 --- a/vendor/tmail-1.2.3.1/site/css/clean.css +++ /dev/null @@ -1,27 +0,0 @@ -* { - background: transparent; -} - -body { - margin: 0; - padding: 0; - font-size: 12px; - color: #333333; -} - -div { - font-size: 15px; -} - -p { - font-size: 15px; - line-height: 19px; -} - -pre { - font-size: 13px; - font-family: Courier, sans-serif; - background-color: #EEE; - display: block; - border: 1px solid #999; -} \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/site/css/layout.css b/vendor/tmail-1.2.3.1/site/css/layout.css deleted file mode 100644 index 12110c6cc..000000000 --- a/vendor/tmail-1.2.3.1/site/css/layout.css +++ /dev/null @@ -1,31 +0,0 @@ - -.container{ - width: 800px; - margin: 0 auto; - padding: 10px 20px 10px 20px; -} - -.logo { - float: right; - width: 150px; - padding: 0 0 10px 0; - text-align: right; -} - -.menu { - margin-top: 30px; - width: 650px; -} - -.menu a { - text-decoration: none; -} - -.main { - clear: both; - padding: 10px 20px; -} - -.footer { - margin: 30px 0 10px 0; -} diff --git a/vendor/tmail-1.2.3.1/site/css/style.css b/vendor/tmail-1.2.3.1/site/css/style.css deleted file mode 100644 index 5e7dbe90e..000000000 --- a/vendor/tmail-1.2.3.1/site/css/style.css +++ /dev/null @@ -1,60 +0,0 @@ -body { - background: #FFFFFF; -} - -.container { - background: white; -} - -.title h1 { - color: red; - font-size: 72px; - font-family: Times New Roman; - font-weight: bold; - margin: 0; - padding: 0px; -} - -.title h2 { - color: #cc5500; - font-size: 16px; - font-family: Times New Roman; - font-weight: bold; - margin: 0; - padding: 0 12px; - letter-spacing: 8px; -} - -.menu { - text-align: left; - color: red; - font-size: 14px; -} - -.main { - border: 1px solid orange; -} - -.footer { - color: gray; - font-size: .9em; -} - -pre { - border: 1px solid #dddddd; - font-family: monospace; - font-size: 0.8em; - line-height: 1.6em; -} - -pre.ruby { - color: red; - background: #eeeeee; - padding: 10px; -} - -pre.shell { - color: green; - background: #eeeeee; - padding: 10px; -} diff --git a/vendor/tmail-1.2.3.1/site/download/index.html b/vendor/tmail-1.2.3.1/site/download/index.html deleted file mode 100644 index 6341fcdc5..000000000 --- a/vendor/tmail-1.2.3.1/site/download/index.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - TMail — A Ruby Email Handler - - - - - - - - - - - - - -
-
- - -
-

TMail

-

Ruby on Mail

-
- - -
-
-

Ruby Email Handler

- -
- - You are about to be redirected to the Ruby Forge download page at http://rubyforge.org/frs/?group_id=4512/. - -
- - -
- - diff --git a/vendor/tmail-1.2.3.1/site/img/envelope.jpg b/vendor/tmail-1.2.3.1/site/img/envelope.jpg deleted file mode 100644 index 7e421779b..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/envelope.jpg and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/mailman.gif b/vendor/tmail-1.2.3.1/site/img/mailman.gif deleted file mode 100644 index 203b7859b..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/mailman.gif and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/stamp-sm.jpg b/vendor/tmail-1.2.3.1/site/img/stamp-sm.jpg deleted file mode 100644 index afd2d3204..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/stamp-sm.jpg and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/stamp.jpg b/vendor/tmail-1.2.3.1/site/img/stamp.jpg deleted file mode 100644 index 35acf3379..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/stamp.jpg and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/stampborder.jpg b/vendor/tmail-1.2.3.1/site/img/stampborder.jpg deleted file mode 100644 index 47218dffa..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/stampborder.jpg and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/tfire.jpg b/vendor/tmail-1.2.3.1/site/img/tfire.jpg deleted file mode 100644 index f5de90395..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/tfire.jpg and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/img/tmail.png b/vendor/tmail-1.2.3.1/site/img/tmail.png deleted file mode 100644 index e70422c1e..000000000 Binary files a/vendor/tmail-1.2.3.1/site/img/tmail.png and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/site/index.html b/vendor/tmail-1.2.3.1/site/index.html deleted file mode 100644 index e6fe6d2b9..000000000 --- a/vendor/tmail-1.2.3.1/site/index.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - TMail — A Ruby Email Handler - - - - - - - - - - - - - - - - - - -
- -
- - -
-

TMail

-

Ruby on Mail

-
- - -
- -
-

Ruby Email Handler

- -
-

TMail is an email handler library for Ruby. TMail can - extract data from mail, and write data to mail following - the relevant RFCs on the subject.

- -

You can get the latest version of TMail from the TMail - RubyForge project - or via Ruby Gems "tmail"

- -

TMail is written in Ruby and a (very) small bit of supporting C - that has pure ruby replacements if you can't compile on your computer. - This means TMail will work, out of the box, on any platform that - can run Ruby 1.8 or Ruby 1.9.

- -

TMail is a commonly used library and is production ready. The - ActionMailer component of Ruby on Rails uses it as well as the the - Nitro web framework and many and others - including the Ruby-Talk mail gateway.

- -

What TMail does is allow you to play with Emails like you would - any Ruby object. So to change the To address of an email, instead - of something like:

- -
-  my_message = "From mikel@example.org\nReceived by.... etc"
-  my_message.sub(/^To: .*?@.*?$/, "To: mikel@elsewhere.org")
-
- -

Which (a) will break easily and (b) is just not the Ruby-Way™ You can do:

- -
-  email = TMail::Mail.parse("From mikel@example.org\nReceived by.... etc")
-  email['to'] = 'mikel@elsewhere.org'
-
- -

And TMail will take care of the details. Isn't that nicer?

- -

TMail was created by Minero Aoki. It is currently maintained - by Mikel and Trans as - a RubyForge Project   .

- -

For the impatient there is a - quickstart guide that will get you up and running with TMail - in a few minutes, for the rest, there is the full documentation by - RDoc (comming soon) as well as an online - user manual (needs updating).

-
- -
-

Important Note For Rails and Nitro Users

- -

If you are using the Rails or the Nitro Web Framework, and are reading this - page, you probably know that your framework of choice uses TMail as it's email - handler library already.

- -

What you may not know, is that if you install the latest TMail gem, your - library will use the latest Gem version. Nitro does this because it lists - TMail as a dependency, Rails does this because since 2.0RC1, the ActionMailer - section of Rails checks for a newer version of the TMail gem as it is loading - up and if it finds a Gem version newer than 1.1.0, it will load the Gem version - instead of the bundled version.

- -

So to take advantage of the bug fixes, you can do:

- -
-$ sudo gem install tmail
-
- -

And get the latest version installed (1.2) and your web framework will - automatically update.

- -

Rails 1.2 can not do this directly, but if you go to the - TMail blog, I have - written up how to patch ActionMailer 1.2.x to load the gem version of TMail - in preference to the bundled version.

- -
- -
-

News

- - - -
- More TMail News... -
- -
- -
-

Documentation

- -

Documentation is the focus of development right now, so be sure to check - back with what is happening. Each new release adds some more documentation - to the mix. If you want to help out, please let us know!

- -

In the mean time, you can select from below, you can also always ask questions - to the TMail-Talk - Mailing list and we will do our best to answer.

- - -
- -
- -
-

Developement

- -

- If you want to help with the TMail project, please see our - - contributing to TMail page. -

- -

Right now we could do with a lot of documentation work, dive in and send - your patches!

- -

For the impatient, anonymous subversion repository is accessable via:

- -
-$ svn checkout http://tmail.rubyforge.org/svn/trunk/ tmail
-
- -

Use the following links to view or sumbit Bugs, Patches and Feature Requests:

- -
- -
- -
- - diff --git a/vendor/tmail-1.2.3.1/site/js/jquery.js b/vendor/tmail-1.2.3.1/site/js/jquery.js deleted file mode 100644 index 0367037ff..000000000 --- a/vendor/tmail-1.2.3.1/site/js/jquery.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * jQuery 1.2.1 - New Wave Javascript - * - * Copyright (c) 2007 John Resig (jquery.com) - * Dual licensed under the MIT (MIT-LICENSE.txt) - * and GPL (GPL-LICENSE.txt) licenses. - * - * $Date: 2007-09-16 23:42:06 -0400 (Sun, 16 Sep 2007) $ - * $Rev: 3353 $ - */ -(function(){if(typeof jQuery!="undefined")var _jQuery=jQuery;var jQuery=window.jQuery=function(selector,context){return this instanceof jQuery?this.init(selector,context):new jQuery(selector,context);};if(typeof $!="undefined")var _$=$;window.$=jQuery;var quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#(\w+)$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(typeof selector=="string"){var m=quickExpr.exec(selector);if(m&&(m[1]||!context)){if(m[1])selector=jQuery.clean([m[1]],context);else{var tmp=document.getElementById(m[3]);if(tmp)if(tmp.id!=m[3])return jQuery().find(selector);else{this[0]=tmp;this.length=1;return this;}else -selector=[];}}else -return new jQuery(context).find(selector);}else if(jQuery.isFunction(selector))return new jQuery(document)[jQuery.fn.ready?"ready":"load"](selector);return this.setArray(selector.constructor==Array&&selector||(selector.jquery||selector.length&&selector!=window&&!selector.nodeType&&selector[0]!=undefined&&selector[0].nodeType)&&jQuery.makeArray(selector)||[selector]);},jquery:"1.2.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;Array.prototype.push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)if(value==undefined)return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}return this.each(function(index){for(var prop in obj)jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e!="object"&&e!=null)return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrapAll:function(html){if(this[0])jQuery(html,this[0].ownerDocument).clone().insertBefore(this[0]).map(function(){var elem=this;while(elem.firstChild)elem=elem.firstChild;return elem;}).append(this);return this;},wrapInner:function(html){return this.each(function(){jQuery(this).contents().wrapAll(html);});},wrap:function(html){return this.each(function(){jQuery(this).wrapAll(html);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(events){var ret=this.map(function(){return this.outerHTML?jQuery(this.outerHTML)[0]:this.cloneNode(true);});var clone=ret.find("*").andSelf().each(function(){if(this[expando]!=undefined)this[expando]=null;});if(events===true)this.find("*").andSelf().each(function(i){var events=jQuery.data(this,"events");for(var type in events)for(var handler in events[type])jQuery.event.add(clone[i],type,events[type][handler],events[type][handler].data);});return ret;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index]);})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||jQuery.nodeName(t,"form"))?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},hasClass:function(expr){return this.is("."+expr);},val:function(val){if(val==undefined){if(this.length){var elem=this[0];if(jQuery.nodeName(elem,"select")){var index=elem.selectedIndex,a=[],options=elem.options,one=elem.type=="select-one";if(index<0)return null;for(var i=one?index:0,max=one?index+1:options.length;i=0||jQuery.inArray(this.name,val)>=0);else if(jQuery.nodeName(this,"select")){var tmp=val.constructor==Array?val:[val];jQuery("option",this).each(function(){this.selected=(jQuery.inArray(this.value,tmp)>=0||jQuery.inArray(this.text,tmp)>=0);});if(!tmp.length)this.selectedIndex=-1;}else -this.value=val;});},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},replaceWith:function(val){return this.after(val).remove();},eq:function(i){return this.slice(i,i+1);},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments));},map:function(fn){return this.pushStack(jQuery.map(this,function(elem,i){return fn.call(elem,i,elem);}));},andSelf:function(){return this.add(this.prevObject);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)a.reverse();}var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){var elem=clone?this.cloneNode(true):this;if(!evalScript(0,elem))fn.call(obj,elem);});});}};function evalScript(i,elem){var script=jQuery.nodeName(elem,"script");if(script){if(elem.src)jQuery.ajax({url:elem.src,async:false,dataType:"script"});else -jQuery.globalEval(elem.text||elem.textContent||elem.innerHTML||"");if(elem.parentNode)elem.parentNode.removeChild(elem);}else if(elem.nodeType==1)jQuery("script",elem).each(evalScript);return script;}jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0]||{},a=1,al=arguments.length,deep=false;if(target.constructor==Boolean){deep=target;target=arguments[1]||{};}if(al==1){target=this;a=0;}var prop;for(;a-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}f.apply(e,[]);for(var i in o)e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret,stack=[],swap=[];function color(a){if(!jQuery.browser.safari)return false;var ret=document.defaultView.getComputedStyle(a,null);return!ret||ret.getPropertyValue("color")=="";}if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}if(prop.match(/float/i))prop=styleFloat;if(!force&&elem.style[prop])ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur&&!color(elem))ret=cur.getPropertyValue(prop);else{for(var a=elem;a&&color(a);a=a.parentNode)stack.unshift(a);for(a=0;a]*?)\/>/g,function(m,all,tag){return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area)$/i)?m:all+">";});var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("",""]||!s.indexOf("",""]||s.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"","
"]||!s.indexOf("",""]||(!s.indexOf("",""]||!s.indexOf("",""]||jQuery.browser.msie&&[1,"div
","
"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)div=div.lastChild;if(jQuery.browser.msie){if(!s.indexOf(""&&s.indexOf("=0;--n)if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)tb[n].parentNode.removeChild(tb[n]);if(/^\s/.test(arg))div.insertBefore(doc.createTextNode(arg.match(/^\s*/)[0]),div.firstChild);}arg=jQuery.makeArray(div.childNodes);}if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)r.push(arg);else -r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(name=="selected"&&jQuery.browser.safari)elem.parentNode.selectedIndex;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(jQuery.browser.msie&&name=="style")return jQuery.attr(elem.style,"cssText",value);else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined){if(name=="type"&&jQuery.nodeName(elem,"input")&&elem.parentNode)throw"type property can't be changed";elem.setAttribute(name,value);}if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return(t||"").replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")for(var i=0,al=a.length;i\\s*("+chars+"+)"),quickID=new RegExp("^("+chars+"+)(#)("+chars+"+)"),quickClass=new RegExp("^([#.]?)("+chars+"*)");jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"im[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||jQuery(a).text()||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)",has:"jQuery.find(m[3],a).length",header:"/h\\d/i.test(a.nodeName)",animated:"jQuery.grep(jQuery.timers,function(fn){return a==fn.elem;}).length"}},parse:[/^(\[) *@?([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+chars+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}return cur;},find:function(t,context){if(typeof t!="string")return[t];if(context&&!context.nodeType)context=null;context=context||document;var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t);var foundToken=false;var re=quickChild;var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)for(var c=ret[i].firstChild;c;c=c.nextSibling)if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^([>+~])\s*(\w*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[2],merge={};m=m[1];for(var j=0,rl=ret.length;j=0;if(!not&&pass||not&&!pass)tmp.push(r[i]);}return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}if(!m)break;if(m[1]==":"&&m[2]=="not")r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")r=jQuery.classFilter(r,m[2],not);else if(m[1]=="["){var tmp=[],type=m[3];for(var i=0,rl=r.length;i=0)^not)tmp.push(a);}r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var merge={},tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<\/script>");var script=document.getElementById("__ie_init");if(script)script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);}jQuery.fn.extend({load:function(url,params,callback){if(jQuery.isFunction(url))return this.bind("load",url);var off=url.indexOf(" ");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}callback=callback||function(){};var type="GET";if(params)if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}var self=this;jQuery.ajax({url:url,type:type,data:params,complete:function(res,status){if(status=="success"||status=="notmodified")self.html(selector?jQuery("
").append(res.responseText.replace(//g,"")).find(selector):res.responseText);setTimeout(function(){self.each(callback,[res.responseText,status,res]);},13);}});return this;},serialize:function(){return jQuery.param(this.serializeArray());},serializeArray:function(){return this.map(function(){return jQuery.nodeName(this,"form")?jQuery.makeArray(this.elements):this;}).filter(function(){return this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type));}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:val.constructor==Array?jQuery.map(val,function(val,i){return{name:elem.name,value:val};}):{name:elem.name,value:val};}).get();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});var jsc=(new Date).getTime();jQuery.extend({get:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data=null;}return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type});},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){var jsonp,jsre=/=(\?|%3F)/g,status,data;s=jQuery.extend(true,s,jQuery.extend(true,{},jQuery.ajaxSettings,s));if(s.data&&s.processData&&typeof s.data!="string")s.data=jQuery.param(s.data);if(s.dataType=="jsonp"){if(s.type.toLowerCase()=="get"){if(!s.url.match(jsre))s.url+=(s.url.match(/\?/)?"&":"?")+(s.jsonp||"callback")+"=?";}else if(!s.data||!s.data.match(jsre))s.data=(s.data?s.data+"&":"")+(s.jsonp||"callback")+"=?";s.dataType="json";}if(s.dataType=="json"&&(s.data&&s.data.match(jsre)||s.url.match(jsre))){jsonp="jsonp"+jsc++;if(s.data)s.data=s.data.replace(jsre,"="+jsonp);s.url=s.url.replace(jsre,"="+jsonp);s.dataType="script";window[jsonp]=function(tmp){data=tmp;success();complete();window[jsonp]=undefined;try{delete window[jsonp];}catch(e){}};}if(s.dataType=="script"&&s.cache==null)s.cache=false;if(s.cache===false&&s.type.toLowerCase()=="get")s.url+=(s.url.match(/\?/)?"&":"?")+"_="+(new Date()).getTime();if(s.data&&s.type.toLowerCase()=="get"){s.url+=(s.url.match(/\?/)?"&":"?")+s.data;s.data=null;}if(s.global&&!jQuery.active++)jQuery.event.trigger("ajaxStart");if(!s.url.indexOf("http")&&s.dataType=="script"){var head=document.getElementsByTagName("head")[0];var script=document.createElement("script");script.src=s.url;if(!jsonp&&(s.success||s.complete)){var done=false;script.onload=script.onreadystatechange=function(){if(!done&&(!this.readyState||this.readyState=="loaded"||this.readyState=="complete")){done=true;success();complete();head.removeChild(script);}};}head.appendChild(script);return;}var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)s.beforeSend(xml);if(s.global)jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(!requestDone&&xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}status=isTimeout=="timeout"&&"timeout"||!jQuery.httpSuccess(xml)&&"error"||s.ifModified&&jQuery.httpNotModified(xml,s.url)&&"notmodified"||"success";if(status=="success"){try{data=jQuery.httpData(xml,s.dataType);}catch(e){status="parsererror";}}if(status=="success"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}if(s.ifModified&&modRes)jQuery.lastModified[s.url]=modRes;if(!jsonp)success();}else -jQuery.handleError(s,xml,status);complete();if(s.async)xml=null;}};if(s.async){var ival=setInterval(onreadystatechange,13);if(s.timeout>0)setTimeout(function(){if(xml){xml.abort();if(!requestDone)onreadystatechange("timeout");}},s.timeout);}try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}if(!s.async)onreadystatechange();return xml;function success(){if(s.success)s.success(data,status);if(s.global)jQuery.event.trigger("ajaxSuccess",[xml,s]);}function complete(){if(s.complete)s.complete(xml,status);if(s.global)jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)jQuery.event.trigger("ajaxStop");}},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var xml=type=="xml"||!type&&ct&&ct.indexOf("xml")>=0;var data=xml?r.responseXML:r.responseText;if(xml&&data.documentElement.tagName=="parsererror")throw"parsererror";if(type=="script")jQuery.globalEval(data);if(type=="json")data=eval("("+data+")");return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else -for(var j in a)if(a[j]&&a[j].constructor==Array)jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else -s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&").replace(/%20/g,"+");}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){var opt=jQuery.speed(speed,easing,callback);return this[opt.queue===false?"each":"queue"](function(){opt=jQuery.extend({},opt);var hidden=jQuery(this).is(":hidden"),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}if(opt.overflow!=null)this.style.overflow="hidden";opt.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(/toggle|show|hide/.test(val))e[val=="toggle"?hidden?"show":"hide":val](prop);else{var parts=val.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/),start=e.cur(true)||0;if(parts){var end=parseFloat(parts[2]),unit=parts[3]||"px";if(unit!="px"){self.style[name]=(end||1)+unit;start=((end||1)/e.cur(true))*start;self.style[name]=start+unit;}if(parts[1])end=((parts[1]=="-="?-1:1)*end)+start;e.custom(start,end,unit);}else -e.custom(start,val,"");}});return true;});},queue:function(type,fn){if(jQuery.isFunction(type)){fn=type;type="fx";}if(!type||(typeof type=="string"&&!fn))return queue(this[0],type);return this.each(function(){if(fn.constructor==Array)queue(this,type,fn);else{queue(this,type).push(fn);if(queue(this,type).length==1)fn.apply(this);}});},stop:function(){var timers=jQuery.timers;return this.each(function(){for(var i=0;i-10000?r:parseFloat(jQuery.css(this.elem,this.prop))||0;},custom:function(from,to,unit){this.startTime=(new Date()).getTime();this.start=from;this.end=to;this.unit=unit||this.unit||"px";this.now=this.start;this.pos=this.state=0;this.update();var self=this;function t(){return self.step();}t.elem=this.elem;jQuery.timers.push(t);if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;ithis.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;var done=true;for(var i in this.options.curAnim)if(this.options.curAnim[i]!==true)done=false;if(done){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;this.elem.style.display=this.options.display;if(jQuery.css(this.elem,"display")=="none")this.elem.style.display="block";}if(this.options.hide)this.elem.style.display="none";if(this.options.hide||this.options.show)for(var p in this.options.curAnim)jQuery.attr(this.elem.style,p,this.options.orig[p]);}if(done&&jQuery.isFunction(this.options.complete))this.options.complete.apply(this.elem);return false;}else{var n=t-this.startTime;this.state=n/this.options.duration;this.pos=jQuery.easing[this.options.easing||(jQuery.easing.swing?"swing":"linear")](this.state,n,0,1,this.options.duration);this.now=this.start+((this.end-this.start)*this.pos);this.update();}return true;}};jQuery.fx.step={scrollLeft:function(fx){fx.elem.scrollLeft=fx.now;},scrollTop:function(fx){fx.elem.scrollTop=fx.now;},opacity:function(fx){jQuery.attr(fx.elem.style,"opacity",fx.now);},_default:function(fx){fx.elem.style[fx.prop]=fx.now+fx.unit;}};jQuery.fn.offset=function(){var left=0,top=0,elem=this[0],results;if(elem)with(jQuery.browser){var absolute=jQuery.css(elem,"position")=="absolute",parent=elem.parentNode,offsetParent=elem.offsetParent,doc=elem.ownerDocument,safari2=safari&&parseInt(version)<522;if(elem.getBoundingClientRect){box=elem.getBoundingClientRect();add(box.left+Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft),box.top+Math.max(doc.documentElement.scrollTop,doc.body.scrollTop));if(msie){var border=jQuery("html").css("borderWidth");border=(border=="medium"||jQuery.boxModel&&parseInt(version)>=7)&&2||border;add(-border,-border);}}else{add(elem.offsetLeft,elem.offsetTop);while(offsetParent){add(offsetParent.offsetLeft,offsetParent.offsetTop);if(mozilla&&/^t[d|h]$/i.test(parent.tagName)||!safari2)border(offsetParent);if(safari2&&!absolute&&jQuery.css(offsetParent,"position")=="absolute")absolute=true;offsetParent=offsetParent.offsetParent;}while(parent.tagName&&!/^body|html$/i.test(parent.tagName)){if(!/^inline|table-row.*$/i.test(jQuery.css(parent,"display")))add(-parent.scrollLeft,-parent.scrollTop);if(mozilla&&jQuery.css(parent,"overflow")!="visible")border(parent);parent=parent.parentNode;}if(safari2&&absolute)add(-doc.body.offsetLeft,-doc.body.offsetTop);}results={top:top,left:left};}return results;function border(elem){add(jQuery.css(elem,"borderLeftWidth"),jQuery.css(elem,"borderTopWidth"));}function add(l,t){left+=parseInt(l)||0;top+=parseInt(t)||0;}};})(); \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/site/log/Changelog.xsl b/vendor/tmail-1.2.3.1/site/log/Changelog.xsl deleted file mode 100644 index 0f47be434..000000000 --- a/vendor/tmail-1.2.3.1/site/log/Changelog.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Changelog - - - - -
-

Changelog

- - -
-
- - -
- - - -
- - - -
- -
diff --git a/vendor/tmail-1.2.3.1/site/log/changelog.xml b/vendor/tmail-1.2.3.1/site/log/changelog.xml deleted file mode 100644 index 416572e1a..000000000 --- a/vendor/tmail-1.2.3.1/site/log/changelog.xml +++ /dev/null @@ -1,1677 +0,0 @@ - - - - -mikel -2008-03-01T23:35:57.338362Z -* Closed #18516 - Fix TMail::Mail#preamble, and add #preamble= (Charles Lowe) - - -mikel -2008-03-01T23:22:05.399260Z -Applied patch #18515 to remove ftools from test case (Charles Lowe) - - -mikel -2008-03-01T23:20:15.692577Z -A lot of documentation patches to the mail and utils and net files. Also added "log/BugTrackingLog.txt" for myself as my bug log got clobbered by the new changelog.txt format. - - -transami -2008-02-22T18:30:47.894199Z -Update the doc feature of setup.rb. -* installing rdoc labels the directory config.docdir/ruby-{package}/. -* generateing rdocs places them in doc/rdoc. -* this was done to prevent potential name clashes with other system docs. - - - -mikel -2008-02-22T15:30:46.219389Z -Added a lot more documentation, getting there - - -transami -2008-02-21T14:19:36.251766Z -Added homepage entry to project file. - - - -transami -2008-02-21T14:09:23.780559Z -Fixed missing rake task entry in setup.rb. - - - -transami -2008-02-19T19:42:29.107812Z -Moved script/ to work/ --as reap and setup.rb should now suffice. - - - -transami -2008-02-19T19:41:49.625876Z -Added a work directory. This is a sort of code depot. - - - -transami -2008-02-19T19:39:29.710246Z -Add some entries to svn:ignore. - - - -transami -2008-02-19T18:40:59.772815Z -Fixed setup.rb uninstaller. - - - -transami -2008-02-19T18:00:13.992267Z -Updated Rakefile and setup.rb. - - - -transami -2008-02-18T23:05:48.593124Z -Update Rakefile fixing test bug. - - - -transami -2008-02-18T21:38:00.061336Z -Added new "uber" Rakefile. - - - -transami -2008-02-18T21:34:42.989237Z -Moved doc to site. - - - -mikel -2008-02-14T13:57:40.623037Z -Moving changelog to a capital - - - -mikel -2008-02-14T13:57:12.042609Z -fixing changelog - - - -mikel -2008-02-13T02:24:17.675482Z -Removing bad add (SVN is trying to add this twice to my repo) - - -transami -2008-02-10T22:12:30.281814Z -Added test log. - - - -transami -2008-02-10T22:12:00.149685Z -Update to .reap to add test/ to loadpath when testing. - - - -transami -2008-02-10T22:05:50.755942Z -Added xml log and update CHANGES. - - - -transami -2008-02-10T22:02:05.294735Z -Touched up changelogs. - - - -transami -2008-02-10T21:47:15.016233Z -Add make script and convert others to pure ruby. - - - -transami -2008-02-10T21:30:09.628179Z -Remove old ratch scripts. - - - -transami -2008-02-10T21:28:03.248297Z -Update metadata. - - - -mikel -2008-01-17T14:47:16.837325Z -Updated development section - - -mikel -2008-01-17T14:41:13.980608Z -Updated website to add "contributing" to the list - - -mikel -2008-01-17T06:37:16.019152Z -More website updates - - -mikel -2008-01-17T06:32:04.633705Z -Update reference index to take some confusion out - - -mikel -2008-01-17T06:28:21.587086Z -Cleaning up the docs more - adding mailing list - - -mikel -2008-01-17T06:24:11.649192Z -Cleaning up the docs more - adding quickstart guide - - -mikel -2008-01-17T06:23:49.433301Z -Cleaning up the docs more - - -mikel -2008-01-17T06:16:44.991857Z -Adding some documentation to the website - - -mikel -2008-01-17T05:55:57.695275Z -Added update to the website and an extra test to test_quote taken from the ActionMailer version of TMail - - -mikel -2008-01-15T02:46:15.142126Z -Updated index page - - -mikel -2008-01-15T02:35:43.622514Z -Updated website for 1.9 compatibility - - - -mikel -2008-01-15T02:16:49.653733Z -That's 1.9 compatibility done - - -mikel -2008-01-15T01:49:49.674084Z -1.9 Patching - down to two tests failing - - -mikel -2008-01-12T04:24:33.675527Z -Updated changelog with latest patches - - -mikel -2008-01-12T04:08:11.646208Z -Cleaned up how address.rb handles quoting strings and arrays - - -mikel -2008-01-12T04:01:51.058634Z -Updating to handle Ruby 1.9 - Three tests failing at the moment - - -mikel -2008-01-12T02:14:14.427356Z -Closed #17044 and #17045 ALL TESTS PASSING!!!! - - -mikel -2008-01-11T12:12:36.477171Z -Closes #15157 - The email address "@"@test.com does not parse. It now does (mikel) - - - -mikel -2008-01-11T09:24:20.532215Z -Added Rakefile for testing only - - -mikel -2008-01-11T08:11:52.827165Z -Ready for gem - - -mikel -2008-01-11T08:01:34.278664Z -Fixed version - - -transami -2008-01-11T07:02:25.592531Z -Updated pack tasks (note these are now for 0.5 series of ratch) - - - -mikel -2008-01-11T05:46:35.155557Z -Final commit for version 1.2.1 - - -transami -2008-01-11T05:03:54.818155Z -Gems requires author field to be an array (probably a gems bug) - - - -mikel -2008-01-11T04:41:33.160330Z -VERSION 1.2.1 - - -mikel -2008-01-11T04:40:56.093133Z -VERSION 1.2.1 - - -mikel -2008-01-11T01:29:15.113062Z -Updated test_quote.rb to make it copmpatible with Ruby 1.9 - - - -mikel -2008-01-10T23:12:55.939555Z -Updated logs to reflect recent changes - - -mikel -2008-01-10T15:19:37.306572Z -Added tests for UNIXMbox.fromaddr method. Also changed behaviour of HeaderField.new_from_port to return nil if it does not find a matching header in the port provided. Extended UNIXMbox.fromaddr to also search for EnvelopeSender and also made it a public method, not private - Thanks to Maarten O. for alerting these bugs - - -mikel -2008-01-10T14:29:47.199467Z -Fixed TMail::HeaderField.new_from_port to correct typo on "Regep" to "Regexp". Also added test cases to cover this class method. Also added ability to scan for the EnvelopeSender explictly as it would not come up on searching for "From" due to Regexp confilct with From: (with the colon). Thanks to Maarten O. for reporting this. - - -transami -2007-12-25T12:43:04.079524Z -Added stamp script. - - - -transami -2007-12-25T12:40:01.915296Z -Updated tmail.roll for version 1.2.1. - - - -transami -2007-12-25T12:38:07.578927Z -Moved ROLLRC to tmail.roll. - - - -mikel -2007-12-25T10:29:53.495165Z -Applied Mr Aoki's patch from TMail revision 3674 - Handles the incorrect decoding of attachments - - - -mikel -2007-12-25T10:13:56.962390Z -Applied patch from Mike Mondragon handling quote boundary being greedy on content-type header fields. - - - -mikel -2007-12-25T10:06:48.716182Z -Removed the mailscanner directory - - - -mikel -2007-12-25T10:05:54.666513Z -moved mailscanner.c file to tmailscanner.c - - - -mikel -2007-12-25T10:05:16.692886Z -Changed name of the mailscanner directory to tmailscanner - - - -mikel -2007-12-25T10:04:01.356685Z -Change the name of mailscanner to tmailscanner to handle a copyright issue. MailScanner is a copyrighted name - - - -mikel -2007-12-25T10:00:43.409356Z -Included a require 'stringio' to hack resolve a load order problem when running autotest - - - -transami -2007-12-14T15:48:48.310811Z -Added package tasks. Fixe prepare task. - - - -transami -2007-12-14T15:24:17.384697Z -Minor enhancement to publish task to make it's usage clearer. - - - -transami -2007-12-14T15:21:02.356120Z -Moved script/config.yaml ti meta/ per Ratch 0.4.0. - - - -mikel -2007-12-14T00:33:21.659197Z -Added links into all the pages back to RDoc and also added notes to the index page. - - -mikel -2007-12-02T10:10:48.132433Z -Added about 15 test cases from the Rails community. Added failing test case for an unquoted @ char in the From header field. Need to check fully if this is needed or not, but it is there anyway - to be resolved. I have emailed 822 mailing list to check this out. - - - - -mikel -2007-12-02T07:40:11.070057Z -Fixed error in release notes for tag 1.2.0 - - -transami -2007-12-02T07:25:31.287362Z -Updated release script (require newest release of ratch) - - - -mikel -2007-12-02T06:15:05.284279Z -added news item - - -mikel -2007-12-02T05:59:23.840915Z -Updated version number - - -transami -2007-12-01T15:18:16.893633Z -Couple more additions. - - - -transami -2007-12-01T15:17:39.554917Z -Err.. sorry forgot to add some very importnat files! - - - -transami -2007-11-30T21:32:15.821687Z -Some task updates. - - - -mikel -2007-11-30T08:04:36.216050Z -Updated changelog and history - - -mikel -2007-11-30T07:58:30.938674Z -Fixed scanner.rb so that it passes the same tests as scanner.c. Also fixed up all the tests to require test_helper.rb so that the load path is correct. - - - - -transami -2007-11-29T05:34:12.420891Z -Update Hisotry.txt, NOTES, etc. in prep for release. - - - -transami -2007-11-29T05:22:04.801061Z -Fixed test script and updated MANIFEST. - - - -transami -2007-11-29T05:21:35.693122Z -Renamed scanner_c to mailscanner. - - - -transami -2007-11-29T05:20:07.837657Z -Prepare for next release. - - - -transami -2007-11-29T05:19:47.125828Z -Adjusted scanner libs for renamed extension. - - - -transami -2007-11-29T04:57:50.811638Z -Renamed scanner_c.c to mailscanner.c. - - - -transami -2007-11-29T04:56:40.525004Z -Moved scanner_c/ to mailscanner/. - - - -transami -2007-11-29T04:39:44.827886Z -Updated meta/ files. - - - -transami -2007-11-22T17:03:48.278264Z -Updated history log. - - - -transami -2007-11-22T17:00:25.672665Z -Updated scripts to reflect removed base64 lib. - - - -transami -2007-11-22T16:59:04.131599Z -Remove base64 c extension, as it's speed benefit was negligable. - - - -transami -2007-11-21T21:58:50.412293Z -Fixed bug in base64_c.c. - - - -transami -2007-11-21T21:58:18.099835Z -update to base64 benchmark - - - -transami -2007-11-21T21:42:41.416676Z -Added base64 benchmark. - - - -transami -2007-11-21T20:44:33.765316Z -Moved manifest to meta/ --in future this will be auto generated. - - - -mikel -2007-11-20T13:55:29.342045Z -updated web page css - - -mikel -2007-11-20T13:32:42.307187Z -updated style on page - - -mikel -2007-11-19T23:17:16.140938Z -Added a bunch of documentation to interface.rb - - -transami -2007-11-18T23:54:24.433360Z -Fixed scanner_c load error. - - - -transami -2007-11-18T22:54:25.803809Z -Updated Manifest. - - - -transami -2007-11-18T22:53:04.431289Z -Adjustments for base64_c. - - - -transami -2007-11-18T22:41:38.428203Z -Completed compile rearrangements. - - - -transami -2007-11-18T22:11:07.154180Z -Moved ext/ file to proper place. - - - -transami -2007-11-18T22:10:20.709365Z -Added needed ext/ dirs. - - - -transami -2007-11-18T22:09:32.480817Z -Round about rearrange, sorry. - - - -transami -2007-11-18T22:08:10.437532Z -Move Makefile. - - - -transami -2007-11-18T22:07:34.608747Z -Rearranged ext/. - - - -transami -2007-11-18T22:06:39.385415Z -Working on corect base64 requiring and test passing. - - - -transami -2007-11-18T14:48:54.265402Z -Minor add ext/ to test includes (should make an option) - - -mikel -2007-11-18T02:56:13.264776Z -Added a log more documentation to the interface.rb file - Mikel - - - - -mikel -2007-11-17T11:05:37.185419Z -Added google analytics urchin to every page as well as adding tracker codes to the outbound links. Also added blog page. - - -transami -2007-11-16T13:40:23.325532Z -Upped version on roll file in anticipation of next release. - - - -transami -2007-11-16T13:39:10.735117Z -Quick fix just to make base64 work. - - - -transami -2007-11-15T16:26:12.619968Z -Fixed compile process. - - - -transami -2007-11-15T15:57:37.922228Z -Improved test and compile scripts. - - - -mikel -2007-11-15T14:30:50.341429Z -Closed ticket 15445 - tmail not returning a mail object on create_forward -Closed ticket 15643 - tmail not returning from address if reply_to is set to nil when you ask a mail object for reply_addresses -Added a lot of documentation to the interface.rb file - - -mikel -2007-11-15T03:36:00.866321Z -updated index page - - -transami -2007-11-12T22:59:50.806526Z -Moved bat/ to script/. - - - -transami -2007-11-09T00:54:43.607358Z -Additional tasks. - - - -transami -2007-11-08T21:02:04.181266Z -Started versoin 1.1.2. - - - -transami -2007-11-08T20:58:56.888709Z -Added zip format to roll file. - - - -transami -2007-11-08T12:01:13.125738Z -Fixed pubish and rdoc config settings. - - - -mikel -2007-11-08T08:02:45.618965Z -Added links to the website and updated the notes file. - - - - -transami -2007-11-08T04:01:47.549812Z -Updated Manifest. - - - -transami -2007-11-08T04:01:05.701832Z -Added a clobber/distclean batch file. - - - -transami -2007-11-08T03:57:12.058883Z -Should be final fine-tuning to extconf.rb - - - -transami -2007-11-07T17:30:36.241142Z -Finally! Finally! Got Windows to install. - - - -transami -2007-11-07T14:17:44.213442Z -Force Windows into no extension mode. - - - -transami -2007-11-07T13:33:21.002038Z -Added log/Note.txt (this is the note for release). - - - -transami -2007-11-07T13:32:21.457635Z -Added changelog task (still needs one piece). - - - -transami -2007-11-07T13:31:13.585094Z -Renamed TODO to Todo.txt (oh, the struggle for consistancy). - - - -transami -2007-11-07T13:15:38.056726Z -Added final note to History.txt. - - - -transami -2007-11-07T13:13:24.437592Z -Fine-tuning extconf.rb and require_arch.rb. - - - -transami -2007-11-07T13:03:13.407457Z -Create fallback gem install. - - - -transami -2007-11-07T12:12:46.598970Z -Changed RUBYGEMS_NO_COMPILE to NORUBYEXT. - - - -transami -2007-11-07T12:04:35.826663Z -Updated manifest. Capitalized information files (not sure which I like best). - - - -transami -2007-11-07T11:54:33.355836Z -Finish organization clean-up. - - - -transami -2007-11-07T11:51:43.567115Z -Add clobber subtasks. - - - -transami -2007-11-07T11:49:24.925587Z -Updated require_arch and removed linux binaries. - - - -transami -2007-11-06T18:55:40.637721Z -Updated manifest. - - - -transami -2007-11-06T18:55:01.932490Z -Updated extconf.rb files to copy extension to arch directories. - - - -transami -2007-11-06T14:55:03.312869Z -Updated version.rb. - - - -transami -2007-11-06T14:38:44.511284Z -Added index.rb for Rolls. - - - -transami -2007-11-06T14:37:40.575393Z -Added require_arch.rb. - - - -transami -2007-11-06T14:26:08.689877Z -Minor organization details (yet to be fully determined). - - - -transami -2007-11-06T14:24:57.456598Z -Added config_dir setting to extconf.rb (although it dodn't seem to do any good). - - - -transami -2007-11-06T14:23:28.909803Z -Added platform tiers to lib/tmail/. - - - -transami -2007-11-06T05:26:00.083272Z -Moved www to doc/ (RDocs go in doc/rdoc). - - - -transami -2007-11-06T05:21:51.376436Z -Removed tasks directory. - - - -transami -2007-11-06T05:21:28.630959Z -Added tag ans compile batch files. - - - -transami -2007-11-06T04:44:42.956443Z -Removed Rakefile. - - - -transami -2007-11-06T04:33:17.117216Z -Removed Manifest.txt (will be replaced by new manifest). - - - -transami -2007-11-06T04:31:01.762657Z -Removed config/ directory. - - - -transami -2007-11-06T04:27:10.412471Z -Removed script/ dir. - - - -transami -2007-11-06T04:24:56.502857Z -Added compilation batch script, and require_arch.rb. - - - -transami -2007-11-05T17:09:51.717154Z -Added platforms to roll file. Alaso remove doc/. - - - -mikel -2007-11-04T12:58:52.446363Z -Added some documentation to the lib/mail.rb file and also updated the quickstart guide to reflect the fact we are now a gem. -Also added another test case to make sure a bug that was reported in ruby-talk relating to TMail had nothing to do with TMail. - - -mikel -2007-11-01T10:07:32.695406Z -* Closed 1524 - Did another patch on the folding, re-read the RFC's and got clarification on when SHOULD and MUST fold. New folding section at the bottom of encode handles various line lengths which include or do not include whitespace - - - - -mikel -2007-10-31T05:12:09.106234Z -* Put in an escape clause in the def fold method of class Encode to skip folding of any X- header line. - - - - -transami -2007-10-30T15:08:36.383433Z -Added separate MANIFEST file, unfortunately it varies slightly from Hoe's. - - - -transami -2007-10-30T15:07:53.874843Z -Minor update to header of README. - - - -transami -2007-10-30T15:07:28.912285Z -Added formats to roll file, for packaging with box. - - - -transami -2007-10-30T15:05:48.787220Z -Added initial set of build tools in bat/. - - - -transami -2007-10-30T15:03:03.728627Z -Updated website, adding rdocs. - - - -transami -2007-10-30T13:50:03.565539Z -Up'd version to 1.1.1. - - - -transami -2007-10-30T13:48:57.411035Z -Minor update to roll file. - - - -transami -2007-10-30T13:03:04.413701Z -Added bat/ folder, which we can use ratch scripts for now. - - - -transami -2007-10-30T13:01:53.290695Z -Changed extension or roll file (was index). - - - -mikel -2007-10-29T23:45:52.248209Z -TMail - Index page update the news - - -transami -2007-10-29T11:41:31.172533Z -Added meta directory and index file. - - - -transami -2007-10-29T11:27:39.839344Z -Removed extraneous lib directory from website. - - - -transami -2007-10-29T11:26:46.304192Z -Updates to website. - * Cleaned up how ruby code was diplayed. - * Cleaned up how shell code was displayed. - * Improved toplevel menu. - - - -mikel -2007-10-29T09:56:57.415601Z -Updated against the code that is currently on the website - - - -mikel -2007-10-29T09:02:29.734853Z -Removed an old make file and tagged TMail 1.1.0 - - - -mikel -2007-10-29T07:59:43.156121Z -* Updated version - - - -mikel -2007-10-29T07:53:00.684789Z -* Refactored how the package was going to_s - made the handling of quotation marks inside of the header more consistent and in accordance with the RFCs on the matter (ie, a filename in a content-disposition field paramater filename=README.TXT will not be quoted unless it contains special characters per RFC 1521 ) - - - - -mikel -2007-10-28T03:49:12.060238Z -* Made the package into a GEM! - - - - -mikel -2007-10-27T14:12:17.673586Z -* Preparing for export as a GEM, final changes for the 0.12 release - - - -transami -2007-10-27T11:44:02.591394Z -Update usage.html, changed mail.encoded to mail.to_s. - - - -mikel -2007-10-27T09:47:24.875171Z -* Re-factored the quotation handling - learnt more about how this is implemented by Minero, and re-wrote my handling of it to preserve quotation marks in the headers [Mikel] - - - - -mikel -2007-10-27T05:45:27.821083Z -* Closed 15077 - Assigning the body via mail.body would not reparse the email body text. Changed mail.rb to reparse body if assigned via body= String. - - - -mikel -2007-10-26T02:22:51.533624Z -==== Fri Oct 26 02:21:13 GMT 2007 Mikel Lindsaar <raasdnil@gmail.com> - -* Deleted incompatabilities from the root folder (it is in www/outdated) - - - - -transami -2007-10-25T07:50:10.483351Z -Adjusted some colors. - - - -transami -2007-10-25T07:06:28.503104Z -Moved BUGS and DEPENDS to outdated. - - - -transami -2007-10-25T07:04:55.399242Z -Move old doc files (Having trouble with SVN) - - - -transami -2007-10-25T06:58:22.198462Z -Moved NEWS to outdated. It's just too old to be of much use. - - - -transami -2007-10-25T06:53:04.747661Z -Added jquery.js to website. - - - -transami -2007-10-25T06:28:37.093580Z -Uncluttered trunk by moving some documentation files. - - - -transami -2007-10-25T06:03:59.353189Z -Contined work on website -- using jQuery to keep DRY. - - - -mikel -2007-10-25T05:53:26.849623Z -==== Thu Oct 25 05:52:02 GMT 2007 Mikel Lindsaar <raasdnil@gmail.com> - -* Moved facade.rb to interface.rb - updated mail.rb to reflect this - - - - -mikel -2007-10-25T05:43:33.445948Z -==== Thu Oct 25 05:39:09 GMT 2007 Mikel Lindsaar <raasdnil@gmail.com> - -* Totally rewrote the README file to be in RDoc format and provide a beginning place for the RDoc documentation - -* Cleaned up the root directory of all the spurious files. - -* Merged the Changelog files and made it into RDoc format. - -* Cleaned up the Bugs and TODO files - -* Added RDoc headers to each source file. - -* Started doing the RDoc on the utils.rb file - - - - -mikel -2007-10-25T03:20:03.329804Z -Thu Oct 25 03:18:18 GMT 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Cleaned up the tree some in terms of documents. Merged the - change logs, moved the 0.9 to 0.10 docs into the outdated - folder, modified the TODO - - - - -mikel -2007-10-25T03:07:04.579711Z -Mon Oct 25 13:06:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - -* Moved doc directory to WWW so that running RDoc by default doesn't - overwrite all the files. - - - - -mikel -2007-10-25T01:13:58.442709Z -Mon Oct 25 11:12:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Added quickstart page to WWW as well as applied styling - to all existing pages in the site. - - * Uploaded site to rubyforge - - - - -transami -2007-10-24T21:50:17.944285Z -Closed div end-tag in index.html. - - - -transami -2007-10-24T19:03:13.457253Z -Updated header of index.html and added some new images. - - - -transami -2007-10-24T18:20:43.445330Z -Added new website (rough-draft). - - - -transami -2007-10-24T18:16:22.536873Z -Moved doc/doc.ja and doc/rdd to outdated/. - - - -transami -2007-10-24T18:15:36.517036Z -Added doc/outdated to hold old documentation files. - - - -transami -2007-10-24T18:14:30.663017Z -Moved doc/doc.en/ to doc/manual/. - - - -transami -2007-10-24T18:13:35.531921Z -Edited manual/index.html. - - - -transami -2007-10-24T15:45:30.992502Z -Moved doc.en/, doc.ja/ and rdd/ to new doc/ directory. - - - -transami -2007-10-24T15:42:44.096375Z -Moved doc to rdd. - - - -mikel -2007-10-24T12:41:36.714810Z -Mon Oct 24 22:40:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Updated website to reflect release. - - - - -mikel -2007-10-24T11:17:06.861437Z -========================================== - Version 0.11.0. Released -Mon Oct 24 21:14:00 2007 Mikel Lindsaar <raasdnil@gmail.com> -========================================== - - - - -mikel -2007-10-24T11:07:44.991761Z -Moving 0.11 branch into trunk - - - - -mikel -2007-10-24T07:52:48.978999Z -Mon Oct 24 17:50:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Remaining failing tests are one encoding problem with - relating to RFC 2231 and another problem where special - characters are not properly quoted if they are the name - portion of an email address (ie, TMail does not handle - the address <"@"@example.com> properly) - - * Closed #14964 - The TMail from ActionMailer Preview Release - 2.0 is now fully merged into TMail branch 0.11. - All previous tests and examples relating to TMail that - were part of ActionMailer 2.0 Preview Release now pass. - - * Closed #15008 - Fixed handling of multipart content type - headers. Now tested against many types of email. - TMails' behaviour now is to take any boundary type, if - it contains illegal characters, it will wrap it in "" - when requesting the content type by mail['content-type] - you will receive it unquoted, when outputting the email - to_s as a whole you will receive the content-type field - with the boundary section quoted if it contains illegal - characters. - - * Replaced id with object_id line 221 in stringio.rb - - - - -mikel -2007-10-24T05:43:15.229569Z -Fix up on revision 16 - forgot to add in files - - - -mikel -2007-10-24T05:36:24.016870Z -Mon Oct 24 15:35:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Copied over the TMail/*.rb files from the TRUNK version of Rails - ActionMailer (2.0 Preview Release) into branch for 0.11.0 - - * Fixed up many broken tests so that they pass (testing errors, - including wrong paths etc) - - * Closed #15002 - Fixed error where handling of MIME content-type - headers that had quoted parameters due to including RFC 2045 - special characters were being stripped of their quotation marks - when the mail object was sent "to_s". Now any quotation marks - that were in the original are maintained in the result - - * Closed #14999 - TMail now "fixes" illegal Content-Type bondary= - parameter by wrapping it in double quotation marks per RFC 2045 - and also produces this in the mail.to_s method - - * Added in tmail/core_extensions.rb which installs Object.blank? - unless Object already responds_to?(:blank?) ie, we are already - in a Rails environment. - - * Updated names of the test files as a start to cleaning up the - tests directory. - - - - - -mikel -2007-10-23T14:46:16.425256Z -Mon Oct 24 0:40:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Copied over Rails modified TMail into branch for 0.11. - - - - -mikel -2007-10-23T07:18:36.599915Z -Mon Oct 23 17:13:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Applied Rails revisions 965. Protect against nil strings and - empty conversion bases. - - * Applied Rails revisions 964. Made the unquoted string and - body the default. - - - - - -mikel -2007-10-23T05:06:21.333273Z -Mon Oct 23 14:56:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Applied Rails revision 919. Don't fail on an empty body or - empty subject line, default to an empty string body or subject - - - - - -mikel -2007-10-23T05:03:01.248518Z -Mon Oct 23 14:56:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Applied Rails revision 918. Don't include blank attachments - in the email - - - - -mikel -2007-10-23T04:58:33.516473Z -Mon Oct 23 14:56:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Applied Rails ticket #916. Handles better quoting and handling - of attachments. - - - - -mikel -2007-10-23T04:42:31.027451Z -Mon Oct 23 14:41:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Merged net.rb - code clean up - Closes Task#1736 - - - - -mikel -2007-10-23T04:36:00.148697Z -Mon Oct 23 14:35:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Merged stringio.rb - code clean up - Closes Task#1742 - - - - -mikel -2007-10-23T04:24:39.141369Z -Mon Oct 23 14:23:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Merged config.rb - code clean up - Closes Task#1726 - - - - -mikel -2007-10-23T04:21:40.596952Z -Mon Oct 23 14:01:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Merged address.rb - code clean up - Closes Task#1723 - - * Copied in the Rails test Email fixtures - - * Added in outlook test email for invalid boundary type - - - - -mikel -2007-10-22T14:19:19.483139Z -Mikel Lindsaar -Updated version for release - - - - -mikel -2007-10-22T14:16:24.891119Z -Mon Oct 22 22:00:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * General cleanup - converted all files to UTF-8 from the various - encodings. - - - - - -mikel -2007-10-22T12:17:27.215341Z -Mon Oct 22 22:00:00 2007 Mikel Lindsaar <raasdnil@gmail.com> - - * Fixed all tests so that they now pass - were problems with the times - being checked were hard coded for Tokyo time and so would fail in a - different time zone. All of the tests that were failing due to this - now pass. - - * Fixed handling of MIME content-type header handling so that TMail now - quotes any content-type it finds to contain invalid characters per - RFC 2045 which are "/", "?" or "=". Per RFC, handling is to put - double quotes are put around it with the quote_boundary method, we - now do this. - - * Updated Copyright year for Minero Aoki - - - - -transami -2007-09-26T13:22:33.299386Z -initial import - - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/BUGS b/vendor/tmail-1.2.3.1/site/outdated/BUGS deleted file mode 100644 index fab4d72d5..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/BUGS +++ /dev/null @@ -1,3 +0,0 @@ -* mails may be deleted if other precesses are touching mailbox. -* mails may be corrupted if other precesses are touching mailbox. -* not thread safe diff --git a/vendor/tmail-1.2.3.1/site/outdated/DEPENDS b/vendor/tmail-1.2.3.1/site/outdated/DEPENDS deleted file mode 100644 index 800b11c24..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/DEPENDS +++ /dev/null @@ -1 +0,0 @@ -tmail: raccruntime diff --git a/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities b/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities deleted file mode 100644 index 618184a2a..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities +++ /dev/null @@ -1,89 +0,0 @@ -= Incompatibilities from version 0.9 to 0.10 - -The biggest change is that return value of some -TMail::Mail methods have been changed. In TMail 0.10, -ALL "" methods return an array of address -spec strings, and ALL "_addrs" methods -return an array of TMail::Address objects. -For example: - - # mail header - To: Minero Aoki - - # from ruby - TMail::Mail#to == ["aamine@loveruby.net"] - TMail::Mail#to_addrs == [#] - -In 0.9, this rule has not been thoroughed. - -== Incompatible Changes - -* TMail::Mail#from (return value) - 0.9 first friendly-from or address spec string - 0.10 an array of address spec string for From:. - (use friendly_from for 0.9 action) - -* TMail::Mail#to (return value) - 0.9 first Address object for To: - 0.10 an array of address spec string for To: - -* TMail::Mail#fetch (number of argument) - 0.9 fetch(header_name, init_string, &block) - 0.10 fetch(header_name) - -* TMail's mail parser raises TMail::SyntaxError - instead of ::ParseError in ALL situations. - -* TMail::StringPort.new (number of argument) - 0.9 new(str, eol, unifyeol) - 0.10 new(str='') - -* TMail::HeaderField#* - Any methods of HeaderField (and its subclasses) are - subject to change without notice. Simply do not use them, - use TMail::Mail interface methods instead. - -== Compatible Changes - -These methods are compatible NOW, but is not in 1.0. - -* TMail::Mail.new (argument semantic) - 0.9 new(port, strict=false) - 0.10 new(port, configuration=TMail::DEFAULT_CONFIG) - (use TMail::DEFAULT_CONFIG.strict_parse=true instead) - -* TMail::MhLoader -> TMail::MhMailbox -* TMail::MboxLoader -> TMail::UNIXMbox -* TMail::MaildirLoader -> TMail::Maildir - You can use old names as alias. - - -== Obsolete Methods - -These methods are defined in tmail/obsolete.rb. -Currently TMail requires it by default, but in 1.0, it does not. - -* TMail::Mail#from_addr -* TMail::Mail#from_address -* TMail::Mail#from_address= -* TMail::Mail#from_phrase (is #friendly_from) -* TMail::Mail#msgid (is #message_id) -* TMail::Mail#msgid= (is #message_id) -* TMail::Mail#each_dest (is #each_destination) -* TMail::Mail#has_key? (is #key?) -* TMail::Mail#include? (is #key?) -* TMail::Mail#value? -* TMail::Mail#has_value? -* TMail::Mail#values -* TMail::Loader#new_mail (is #new_port) -* TMail::Loader#each_mail (is #each_port) -* TMail::Loader#each_newmail (is #each_new_port) -* TMail.boundary (is .new_boundary) -* TMail.msgid (is .new_message_id) -* TMail.new_msgid (is .new_message_id) -* TMail::Mail.boundary (is TMail.new_boundary) -* TMail::Mail.msgid (is TMail.new_message_id) -* TMail::Mail.new_msgid (is TMail.new_message_id) -* TMail.loadfrom (is .load) -* TMail.load_from (is .load) -* TMail::Address#route (is #routes) diff --git a/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities.ja b/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities.ja deleted file mode 100644 index 316b13c48..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/Incompatibilities.ja +++ /dev/null @@ -1,102 +0,0 @@ -= ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 0.9 ã‹ã‚‰ 0.10 移行時ã®éžäº’æ›ã«ã¤ã„㦠- -ã»ã¨ã‚“ã©ã¯ãƒžã‚¤ãƒŠãƒ¼ãƒ¡ã‚½ãƒƒãƒ‰ã®å¤‰æ›´ãªã®ã§ãŸã„ã—ãŸã“ã¨ã¯ -ãªã„ã¨æ€ã„ã¾ã™ãŒã€Mail#from #to ã®è¿”り値ã®å¤‰æ›´ã ã‘㯠-ã‹ãªã‚Šè‡´å‘½çš„ã§ã™ã€‚ã§ã™ãŒã€ã“れã¯ãƒ¡ã‚½ãƒƒãƒ‰å‘½åã«æ˜Žç¢ºãª -統一ルールを与ãˆã‚‹ãŸã‚ã«ã¯é¿ã‘られãªã„変更ãªã®ã§å¼·è¡Œ -ã™ã‚‹ã“ã¨ã«ã—ã¾ã™ã€‚ - - -== 0.10 ã§å°Žå…¥ã—㟠Mail クラスã®ãƒ¡ã‚½ãƒƒãƒ‰ã®çµ±ä¸€ãƒ«ãƒ¼ãƒ« - -「Mail#アドレスヘッダåã€ã¯ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒƒã‚¯ (...@...) -文字列ã®é…列を返ã™ã€‚ -「Mail#アドレスヘッダå_addrsã€ã¯ TMail::Address -オブジェクトã®é…列を返ã™ã€‚ - -例 - # ãƒ˜ãƒƒãƒ€ã®æ–‡å­—列 - To: Minero Aoki - - # コードã§ã¯ - TMail::Mail#to == ["aamine@loveruby.net"] - TMail::Mail#to_addrs == [#] - - -== 変更リスト - -* TMail::Mail#from ã®è¿”り値 - 0.9 From: ã®æœ€åˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã® "friendly from" - ãれãŒãªã‘れã°ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒƒã‚¯æ–‡å­—列 - (0.10 ã§ã¯ Mail#friendly_from を使ã£ã¦ãã ã•ã„) - 0.10 From: ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒƒã‚¯æ–‡å­—列ã®é…列 - -* TMail::Mail#to ã®è¿”り値 - 0.9 To: ã®æœ€åˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã® Address オブジェクト - 0.10 To: ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒƒã‚¯æ–‡å­—列ã®é…列 - -* TMail::Mail#fetch ã®å¼•æ•°ã®æ•° - 0.9 fetch(header_name, init_string, &block) - 0.10 fetch(header_name) - -* TMail ã®ãƒ‘ーサãŒä¾‹å¤–を投ã’ã‚‹ã¨ãã€::ParseError ã§ã¯ - ãªã TMail::SyntaxError を発生ã•ã›ã¾ã™ã€‚ - -* TMail::StringPort.new ã®å¼•æ•°ã®æ•° - 0.9 new(str, eol, unifyeol) - 0.10 new(str='') - -* TMail::HeaderField ãŠã‚ˆã³ãã®ä¸‹ä½ã‚¯ãƒ©ã‚¹ã®å…¨ãƒ¡ã‚½ãƒƒãƒ‰ - メソッドåãã®ä»–ã€äºˆå‘Šãªã—ã«å¤‰æ›´ã•れるã“ã¨ãŒã‚りã¾ã™ - (ã™ã§ã«ã„ãã¤ã‹å¤‰æ›´ã—ã¾ã—ãŸ)。0.10 以é™ã§ã¯ã§ãã‚‹é™ã‚Š - TMail::Mail ã®ã‚¤ãƒ³ã‚¿ãƒ¼ãƒ•ェイスメソッドを使ã£ã¦ãã ã•ã„。 - - -== ã„ã¾ã¯äº’æ›æ€§ã®ã‚る変更 - -* TMail::Mail.new ã®ç¬¬äºŒå¼•æ•° - TMail::Config オブジェクトをå—ã‘るよã†ã«ãªã‚Šã¾ã—ãŸã€‚ - true/false ã¯åŒç­‰ã® Config オブジェクトã«å¤‰æ›ã•れã¾ã™ã€‚ - -* TMail::MhLoader -> TMail::MhMailbox -* TMail::MboxLoader -> TMail::UNIXMbox -* TMail::MaildirLoader -> TMail::Maildir - å…ƒã®ã‚¯ãƒ©ã‚¹åも別åã¨ã—ã¦æ®‹ã—ã¦ã‚りã¾ã™ã€‚ - 1.0 ã§æ¶ˆã™ã‹ã©ã†ã‹ã¯ã¾ã è€ƒãˆä¸­ã§ã™ãŒã€ã“れã¯ä¿®æ­£ãŒ - ã‹ãªã‚Šé¢å€’ãªã®ã§æ®‹ã™ã“ã¨ã«ãªã‚‹ã¨æ€ã„ã¾ã™ã€‚ - - -== éžæŽ¨å¥¨ãƒ¡ã‚½ãƒƒãƒ‰ãƒªã‚¹ãƒˆ - -tmail/obsolete.rb ã«åˆ†é›¢ã—ã¾ã—ãŸã€‚ç¾åœ¨ã¯ãƒ‡ãƒ•ォルト㧠require ã—㦠-ã„ã¾ã™ãŒã€æ¬¡ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ (1.0 ã®äºˆå®š) ã§ã¯ require ã—ãªã„よã†ã« -ãªã‚Šã¾ã™ã€‚ãŸã ã—ãƒ•ã‚¡ã‚¤ãƒ«ã¯æ®‹ã™ã®ã§ã€è‡ªåˆ†ã§ require 'tmail/obsolete' -ã™ã‚Œã°ä½¿ã„ç¶šã‘ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™ã€‚ - -ã‹ã£ã“内ã¯åŒã˜åŠ¹æžœã®ãƒ¡ã‚½ãƒƒãƒ‰ã§ã™ã€‚ã¾ãŸãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã«ã¯éžæŽ¨å¥¨ -ãƒ¡ã‚½ãƒƒãƒ‰ã¯æœ€åˆã‹ã‚‰è¼‰ã›ã¦ã„ã¾ã›ã‚“。 - -* TMail::Mail#from_addr -* TMail::Mail#from_address -* TMail::Mail#from_address= -* TMail::Mail#from_phrase (#friendly_from) -* TMail::Mail#msgid (#message_id) -* TMail::Mail#msgid= (#message_id) -* TMail::Mail#each_dest (#each_destination) -* TMail::Mail#has_key? (#key?) -* TMail::Mail#include? (#key?) -* TMail::Mail#value? -* TMail::Mail#has_value? -* TMail::Mail#values -* TMail::Loader#new_mail (#new_port) -* TMail::Loader#each_mail (#each_port) -* TMail::Loader#each_newmail (#each_new_port) -* TMail.boundary (.new_boundary) -* TMail.msgid (.new_message_id) -* TMail.new_msgid (.new_message_id) -* TMail::Mail.boundary (TMail.new_boundary) -* TMail::Mail.msgid (TMail.new_message_id) -* TMail::Mail.new_msgid (TMail.new_message_id) -* TMail.loadfrom (.load) -* TMail.load_from (.load) -* TMail::Address#route (#routes) diff --git a/vendor/tmail-1.2.3.1/site/outdated/NEWS b/vendor/tmail-1.2.3.1/site/outdated/NEWS deleted file mode 100644 index f44569cc2..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/NEWS +++ /dev/null @@ -1,9 +0,0 @@ -= NEWS - -== version 0.10.8 (2004-02-20) - - * TMail::UNIXMbox did not work. - * TMail::Mail#encoded did not work when Content-Type: multipart/mixed - but that is not multipart mail. [ruby-list:38050] - * RFC2231 encoder did not encode 3 characters: *%' - diff --git a/vendor/tmail-1.2.3.1/site/outdated/README.ja b/vendor/tmail-1.2.3.1/site/outdated/README.ja deleted file mode 100644 index 1ee924bea..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/README.ja +++ /dev/null @@ -1,73 +0,0 @@ -TMail README -============ - - TMail 㯠Ruby ã‹ã‚‰ãƒ¡ãƒ¼ãƒ«ã‚’ç°¡å˜ã«æ‰±ã†ãŸã‚ã®ãƒ©ã‚¤ãƒ–ラリã§ã™ã€‚ - メールã‹ã‚‰æƒ…å ±ã‚’å¾—ã‚‹ã€æƒ…報をフォーマットã«ã‚ã‚ã›ã¦æ›¸ã込む〠- ã¨ã„ã†ä¸¡é¢ã®åƒãã‚’æŒã¡ã¾ã™ã€‚ãŸã ã—å—信・é€ä¿¡ãƒ—ロトコル㯠- å«ã¿ã¾ã›ã‚“。 - -å¿…è¦ç’°å¢ƒ --------- - - * Ruby 1.6 ä»¥é™ - (* C コンパイラã€make) - - -インストール ------------ - - tar.gz ã®ã‚¢ãƒ¼ã‚«ã‚¤ãƒ–を展開ã—ãŸã‚‰ãã®ãƒˆãƒƒãƒ—ディレクトリã§ä»¥ä¸‹ - ã®ã‚ˆã†ã«æ‰“ã£ã¦ãã ã•ã„。 - - $ ruby setup.rb config - $ ruby setup.rb setup - ($ su) - # ruby setup.rb install - - # ã®è¡Œã¯é€šå¸¸ãƒ«ãƒ¼ãƒˆæ¨©é™ãŒå¿…è¦ã«ãªã‚Šã¾ã™ãŒã€--prefix オプション - ãªã©ã‚’使ã£ã¦ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«å…ˆãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’変更ã™ã‚Œã°å›žé¿ã§ãã‚‹ - ã“ã¨ãŒã‚りã¾ã™ã€‚ãŸã¨ãˆã° /home/aamine/lib/ruby 以下ã«ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ - ルã—ãŸã„ãªã‚‰ - - $ ruby setup.rb config --prefix=/home/aamine/lib/ruby - - ã¨ã—ã¾ã™ã€‚より詳細㯠ruby install.rb --help ã§è¦‹ã¦ãã ã•ã„。 - - ã“れã§ã‚¤ãƒ³ã‚¹ãƒˆãƒ¼ãƒ«ã¯ãŠã—ã¾ã„ã§ã™ã€‚ - ライブラリã®è©³ç´°ã«ã¤ã„ã¦ã¯ doc.ja/ 以下㮠HTML ファイルを - 見ã¦ãã ã•ã„。index.html ãŒãƒˆãƒƒãƒ—ページã§ã™ã€‚ - - -åå‰ã®ç”±æ¥ ----------- - - ã“ã®ãƒ©ã‚¤ãƒ–ラリを作りã ã—ãŸã®ã¯ 1998 å¹´ 6 月ã§ã€ãã®ã“ã‚ã¯ã¾ã  - ã»ã¨ã‚“ã© Delphi ã—ã‹ä½¿ã£ãŸã“ã¨ãŒãªã - - クラスåã«ã¯ T ã‚’ã¤ã‘ã‚‹ã‚‚ã‚“ã ï¼ - - ã¨æ€ã£ã¦ã„ãŸã€‚ã¨ã„ã†ã‚ã‘ã§ TMail。 - ã§ã‚‚ã„ã¾æ€ã†ã«æ™®é€šã« Mail クラスã˜ã‚ƒèЏãŒãªã„ã‹ã‚‰ã“れã§ã‚ˆã‹ã£ãŸã‹ã‚‚ - ã—れãªã„。語感もよã„。 - - -ライセンス ----------- - - ã“ã®ãƒ©ã‚¤ãƒ–ラリã«å«ã¾ã‚Œã‚‹ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ãŠã‚ˆã³ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆã¯é’木峰郎㌠- è‘—ä½œæ¨©ã‚’ä¿æŒã—ã¾ã™ã€‚ãれらファイルã¯å…¨ã¦ GNU Lesser General Public - Licence version 2.1 (以下ã€LGPL)ã«å¾“ã£ã¦é…布ã™ã‚‹ã‚‚ã®ã¨ã—ã¾ã™ã€‚LGPL - ã®è©³ç´°ã«ã¤ã„ã¦ã¯ãƒ•ァイル COPYING ã‚’å‚ç…§ã—ã¦ãã ã•ã„。 - - -ãƒã‚°ãªã© --------- - - ãƒã‚°ã‚„è¦æœ›ãªã©ã‚りã¾ã—ãŸã‚‰ä¸‹è¨˜ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã«ãƒ¡ãƒ¼ãƒ«ã‚’ãã ã•ã„。 - 作者ã«ã¯ãƒã‚°ã‚’ç›´ã™è²¬ä»»ã¯ã‚りã¾ã›ã‚“ãŒã€ã“ã®ã‚½ãƒ•トã‹ã‚‰ãƒã‚°ã‚’ - 減らã—ãŸã„ã¨ã¯æ€ã£ã¦ã„ã¾ã™ã€‚ - - - é’æœ¨å³°éƒŽ - aamine@loveruby.net - http://i.loveruby.net diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/address.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/address.html deleted file mode 100644 index c47fd7900..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/address.html +++ /dev/null @@ -1,275 +0,0 @@ - - - - - -<code>Address Classes</code> - - - - - - -

Address Classes

- -

class TMail::Address

- -

$B%/%i%9%a%=%C%I(B

- -
-
parse(str) $B"*(B TMail::Address | TMail::AddressGroup
-
-

-str: String
-

- -

-$BJ8;zNs(B str $B$+$i(B TMail::Address $B$^$?$O(B TMail::AddressGroup -$B%*%V%8%'%/%H$r@8@.$7$^$9!#(Bstr $B$,%a!<%k%"%I%l%9$H$_$J$;$J$$(B -$B$H$-$ONc30(B TMail::SyntaxError $B$rH/@8$7$^$9!#(B -

- -
-
new(locals, domains) $B"*(B TMail::Address | TMail::AddressGroup
-
-

-locals: [String]
-domains: [String]
-

- -

-$B?7$7$$(B TMail::Address $B%*%V%8%'%/%H$r@8@.$7$^$9!#(Blocals$B!"(Bdomains $B$O$=$l$>$l(B -$B%"%I%l%9%9%Z%C%/(B (...@...) $B$N!"!w$N:8B&$H1&B&$r%I%C%H$G(B split $B$7$?(B -$BG[Ns$G$9!#$3$N%a%=%C%I$OFbItMQ$G$"$j;H$$$K$/$/$J$C$F$$$^$9!#(B -Address.parse $B$r;H$C$F$/$@$5$$!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
address_group? $B"*(B true | false
-
-

-$B>o$K(B false -

- -
-
spec $B"*(B String
-
-

-$B%"%I%l%9%9%Z%C%/J8;zNs(B ("....@....")$B!#(B -

- -
-
routes $B"*(B [String]
-
-

-$BG[Aw7PO)$rI=$9J8;zNs$NG[Ns!#(B'@' $B$O4^$^$J$$!#(B -

- -
-
name $B"*(B String
-
phrase $B"*(B String
-
-

-$BB/$K8@$&%"%I%l%9$N!VK\L>!WItJ,!#%G%3!<%I$5$l$F$$$^$9!#(B -

- -
-
encoded(eol = "\r\n", encoding = 'j') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-B $B%(%s%3!<%I$5$l$?(B RFC2822 $B7A<0$NJ8;zNsI=8=$rJV$7$^$9!#(B -$B9TKv%3!<%I$K(B eol$B!"J8;z%(%s%3!<%G%#%s%0$K(B encoding $B$r;H$$$^$9!#(B -$B$?$@$7(B encoding $B$O(B j $B$7$+ - -

-
to_s(eol = "\n", encoding = 'e') $B"*(B String
-
decoded(eol = "\n", encoding = 'e') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-$B%G%3!<%I$5$l$?(B RFC2822 $B7A<0$NJ8;zNsI=8=$rJV$7$^$9!#(B -$B9TKv%3!<%I$K(B eol$B!"J8;z%(%s%3!<%G%#%s%0$K(B encoding $B$r;H$$$^$9!#(B -

- -
-
==(other) $B"*(B true | false
-
-

-other: Object
-

- -

-spec $B$NF1CMH=Dj$K$h$C$F(B self $B$H(B other $B$,Ey$7$$$+H=Dj$7$^$9!#(B -name $B$d(B routes $B$O1F6A$7$^$;$s!#(B -

- - -
-
-

class TMail::AddressGroup

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(name, addrs) $B"*(B TMail::AddressGroup
-
-

-name: String
-addrs: [TMail::Address | TMail::AddressGroup]
-

- -

-$B?7$7$$(B TMail::AddressGroup $B%*%V%8%'%/%H$r:n@.$7$^$9!#(B -name $B$O%0%k!<%WL>$r<($9J8;zNs!"(Baddrs $B$O(B TMail::Address $B$^$?$O(B -TMail::AddressGroup $B$NG[Ns$G$J$1$l$P$$$1$^$;$s!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
address_group? $B"*(B true | false
-
-

-$B>o$K(B true -

- -
-
name $B"*(B String
-
-

-$B%0%k!<%WL>!#(B -

- -
-
addresses $B"*(B [TMail::Address | TMail::AddressGroup]
-
-

-TMail::Address $B$^$?$O(B TMail::AddressGroup $B%*%V%8%'%/%H$NG[Ns!#(B -

- -
-
to_a $B"*(B [TMail::Address | TMail::AddressGroup]
-
to_ary $B"*(B [TMail::Address | TMail::AddressGroup]
-
-

-addresses.dup $B$HF1$8$G$9!#(B -

- -
-
flatten $B"*(B [TMail::Address]
-
-

-$B:F5"E*$K(B TMail::AddressGroup $B%*%V%8%'%/%H$rJ?C32=$7!"(B -TMail::Address $B%*%V%8%'%/%H$NG[Ns$rF@$^$9!#(B -

- -
-
add(addr)
-
push(addr)
-
-

-addr: TMail::Address | TMail::AddressGroup
-

- -

-TMail::Address $B$^$?$O(B TMail::AddressGroup $B%*%V%8%'%/%H$r(B -$B$3$N%0%k!<%W$KDI2C$7$^$9!#(B -

- -
-
delete(addr)
-
-

-addr: TMail::Address | TMail::AddressGroup
-

- -

-TMail::Address $B$^$?$O(B TMail::AddressGroup $B%*%V%8%'%/%H$r(B -$B$3$N%0%k!<%W$+$i:o=|$7!"Hs(B nil $B$rJV$7$^$9!#$b$H$b$H$3$N(B -$B%"%I%l%9$,%0%k!<%WFb$KB8:_$7$J$$>l9g$OL5;k$7$F(B nil $B$rJV$7$^$9!#(B -

- -
-
each {|a| .... }
-
-

-a: TMail::Address | TMail::AddressGroup
-

- -

-#addresses $B$KBP$9$k7+$jJV$7!#(B -

- -
-
each_address {|a| .... }
-
-

-a: TMail::Address
-

- -

-#addresses $B$KBP$9$k7+$jJV$7!#$?$@$7(B TMail::AddressGroup $B%*%V%8%'%/%H$K(B -$BBP$7$F$OFbIt$KF~$C$F:F5"E*$K7+$jJV$7$^$9!#(B -

- -
-
encoded(eol = "\r\n", encoding = 'j') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-B $B%(%s%3!<%I$5$l$?(B RFC2822 $B7A<0$NJ8;zNsI=8=$rJV$7$^$9!#(B -

- -
-
decoded(eol = "\n", encoding = 'e') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-$B%G%3!<%I$5$l$?(B RFC2822 $B7A<0$NJ8;zNsI=8=$rJV$7$^$9!#(B -

- -
-
==(other) $B"*(B true | false
-
eql?(other) $B"*(B true | false
-
-

-other: Object
-

- -

-#addresses $B$NF1CMH=Dj$K$h$C$FF1$8FbMF$+$I$&$+$rH=CG$7$^$9!#(B -#name $B$O1F6A$7$^$;$s!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/basics.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/basics.html deleted file mode 100644 index 85567499d..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/basics.html +++ /dev/null @@ -1,405 +0,0 @@ - - - - - -$B%$%s%?!<%M%C%H%a!<%k$N4pAC(B - - - - - - -

$B%$%s%?!<%M%C%H%a!<%k$N4pAC(B

- -

$B%a!<%k%7%9%F%`$r9=@.$9$kMWAG(B

- -

$B%a!<%k(B

- -

-$B$^$:%a!<%k$=$l<+BN$G$9!#(B -$B%a!<%k$O4pK\E*$K$O%F%-%9%H%U%!%$%k$G$"$j!"%X%C%@(B (header) $B$H(B -$B%\%G%#$KJ,$+$l$F$$$^$9!#%X%C%@$N=q<0$O5,3J$,$"$j$+$J$j87L)$K(B -$B7h$a$i$l$F$$$^$9$,!"%\%G%#$K$O$"$j$^$;$s!#$?$H$($P0J2<$,@8$N(B -$B%a!<%k$NNc$G$9!#(B -

- -
-Return-Path: <ruby-list-admin@ruby-lang.org>
-Received: from helium.ruby-lang.org (localhost [127.0.0.1])
-	by helium.ruby-lang.org (Postfix) with ESMTP
-	id 4EEF9165; Wed, 12 Dec 2001 07:05:58 +0900 (JST)
-Received: from doraemon.edit.ne.jp (doraemon.edit.ne.jp [210.141.234.1])
-	by helium.ruby-lang.org (Postfix) with ESMTP id 7AFAB126
-	for <ruby-list@ruby-lang.org>; Wed, 12 Dec 2001 07:05:57 +0900 (JST)
-Date: Wed, 12 Dec 2001 07:05:58 +0900
-Posted: Wed, 12 Dec 2001 07:14:16 +0900
-From: Minero Aoki <aamine@mx.edit.ne.jp>
-Reply-To: ruby-list@ruby-lang.org
-Subject: [ruby-list:32880] Re: RAA update
-To: ruby-list@ruby-lang.org (ruby mailing list)
-Message-Id: <20011212071416N.aamine@mx.edit.ne.jp>
-In-Reply-To: <20011210141226.DTUM11600.femail11.im.home.ne.jp@witch>
-References: <20011210141226.DTUM11600.femail11.im.home.ne.jp@witch>
-Mime-Version: 1.0
-Content-Type: Text/Plain; charset=iso-2022-jp
-Content-Transfer-Encoding: 7bit
-Precedence: bulk
-Lines: 79
-X-UIDL: b8b1b7f1d28ee02af1df6f8612b5b8c4
-
-$B$"$*$-$G$9!#$3$3$+$i%\%G%#$G$9!#(B
-   $B!'(B
-($B0J2
-
-

-$B%X%C%@$H%\%G%#$O6u9T$G6h@Z$i$l$^$9!#%X%C%@$G$O$@$$$?$$0l9T$,(B -$B$R$H$D$N%X%C%@$KAjEv$7$^$9$,!"6uGr$G;O$^$k9T$O>e$N9T$NB3$-$G$9!#(B -$B$?$H$($P$3$N%a!<%k$N(B Received: $B$OFs$D$H$b(B 3 $B9T$G$R$H$D$N%X%C%@9T$r(B -$B9=@.$7$F$$$^$9!#3F%X%C%@$K$O:G=i$K%X%C%@L>$,$"$j!"%3%m%s(B($B!'(B)$B$r(B -$BCV$$$F$=$N$"$H$,!V%X%C%@%U%#!<%k%I!W(B($B%X%C%@$NFbMF(B)$B$G$9!#(B -

- -

-$B%X%C%@$K$O$=$l$>$lLr3d$,$"$j$^$9!#$?$H$($P(B To: $B%X%C%@$K$O(B -$B%a!<%k$N08@h$r=q$-$^$9!#(BFrom: $B$K$O%a!<%k$NAw$j85$r=q$-$^$9!#(B -Subject: $B$O$$$o$f$kBjL>$G$9!#(BDate: $B$O%a!<%k$rAw?.$7$?F|;~!"(B -Received: $B$,G[Aw5-O?$J$I$J$I!#>\$7$/$O$"$H$G@bL@$7$^$9!#(B -

- -

$B%a!<%k$NAw - -

-$B:Y$+$/DI5a$9$l$PAw?.$K$b$$$m$$$m$JJ}K!$,$"$k$N$G$9$,!"IaDL$K(B -$B@8$-$F$$$/8B$j4X78$7$J$/$F$O$$$1$J$$$N$O(B SMTP (Simple Mail Transfer Protocol) -$B$@$1$G$9!#$3$l$O!"$H$"$k%[%9%H$+$iJL$N%[%9%H$K%a!<%k$rE>Aw$9$k(B -$B$?$a$N%W%m%H%3%k(B ($BLsB+;v$N=89g(B) $B$G$9!#$H$K$+$/$3$l$r;H$($P(B -$B%a!<%k$rE>Aw$G$-$^$9!#(BSMTP $B$G$O%a!<%k$NCf?H$K$O4pK\E*$K4XM?(B -$B$7$^$;$s!#>/$J$/$H$b!"%a!<%k$NCf?H$rJQ$($F$7$^$&$h$&$JF/$-(B -$B$+$1$O9T$$$^$;$s!#(B -

- -

-$B$^$?%a!<%k$K$OK\Mh!Vo;~@\B3$,4pK\$G!"%a!<%k$rAw$C$?$i(B -$BB(:B$KAw$j@h$^$G(B (SMTP $B$G(B) $BG[Aw$5$l$k$3$H$K$J$C$F$$$?$+$i$G$9!#(B -$B$$$^$G8@$($P7HBS%a!<%k$_$?$$$J$b$N$G$9!#(B -

- -

-$B$H$3$m$,$=$N$&$A>o;~@\B3$G$J$$$H$3$m$,=P$F$-$F!"2r7hJ}K!$r(B -$B9M$($O$8$a$^$7$?!#$=$3$G=P$F$-$?2r7hK!$N$R$H$D$,:G6a;H$C$F$k(B -$B!VPOP3 (Post Office Protocol version 3) -$B$H$$$&%W%m%H%3%k$r;H$$$^$9!#(B -

- -

-POP3 $B$G$O!"G[Aw$5$l$?%a!<%k$r(B POP $B%5!<%P$KJ]B8$7$F$*$-!"$=$l$r(B -(PPP $B$G$D$J$$$@%Q%=%3%s$H$+$+$i(B) $B%j%/%(%9%H$5$l$?$iEO$7!"$=$N(B -$B$"$H>C$7$^$9!#$D$^$jK\Ev$O!VAw?.BT5!!W$H$G$b8@$&$[$&$,$h$j@53N(B -$B$G$7$g$&!#(B -

- -

-$BB>$N2r7hK!$H$7$F$O(B IMAP (Internet Messsage Access Protocol) $B$H(B -$B$$$&%W%m%H%3%k$,BeI=3J$G$9!#(BPOP $B$O%a!<%k$NAw?.$r2p=u$9$k$@$1$G$9$,!"(B -IMAP $B$G$OIaDL$N%a!<%k%/%i%$%"%s%H$N5!G=$N0lIt$^$G$,%5!<%P$Ke$G%a!<%k$N(B -$B8!:w$r$7$?$j!"%a!<%k%\%C%/%9$NJ,N`$,$G$-$?$j$7$^$9!#7HBS%a!<%k(B -$B$J$s$+$Oe$G%a!<%k$r2C9)$7$F7HBS$KEO$7$F$$$k$N$G$9!#(B -

- -

$B%a!<%k%\%C%/%9(B

- -

-$BFO$$$?%a!<%k$r:G=*E*$KJ]B8$7$F$*$/$H$3$m$,%a!<%k%\%C%/%9$G$9!#(B -$B$-$C$H$I$3$+$GJ9$$$?$3$H$,$"$k$G$"$m$&(B INBOX $B$H$+!V - -

-$B%a!<%k%\%C%/%9$O!"%a!<%i$J$N$@$1$G$b(B UNIX mbox -($B$5$i$K%^%$%J!<%P!<%8%g%s$,$$$/$D$+$"$k(B)$B!"(BMH$B!"(BMaildir $B$J$s$F$N$,(B -$B$"$j$^$9!#(B -

- -

-$B$J$s$K$7$F$b%a!<%k%\%C%/%9$O%a!<%k$r$H$C$F$*$1$l$P$$$$$N$G$9!#(B -$B7A<0$K$D$$$F$O?<$/DI5a$7$J$$$3$H$K$7$^$7$g$&!#(B -

- - -

$B%a!<%k%7%9%F%`$NJz$($kLdBj(B

- -

-$B%a!<%k$O8=:_$"$k$J$+$G$O$[$H$s$I:G8E;2$N8E$$%7%9%F%`$G$9$+$i!"(B -$BFCM-$NLdBj$,;`$L$[$I$"$j$^$9!#0J2<$$$/$D$+5s$2$^$7$g$&!#$^$:(B -$BAw - -

    -
  • 8 $B%S%C%HF)2a$G$J$$(B
  • -
  • ASCII $BJ8;z0J30$rAw$k$H4m81(B
  • -
  • $B%a!<%k$N(B To: $B$H(B SMTP $B$N(B To (RCPT TO) $B$OL54X78(B
  • -
  • $B%a!<%k$N(B From: $B$H(B SMTP $B$N(B From (MAIL FROM) $B$bL54X78(B
  • -
-

-$B%a!<%k<+BN$K$D$$$F!#(B -

- -
    -
  • ASCII $BJ8;z0J30$rF~$l$k$H%P%0$k%a!<%i$,(B ($B$$$C$Q$$(B) $B$"$k(B
  • -
  • $B%X%C%@$N=q<0$,D6J#;((B
  • -
  • $B$7$+$b9q:]2=$N2aDx$G$5$i$KJ#;($K$J$C$?(B
  • -
  • $BK? -
-

-$B%a!<%k%\%C%/%9$K$D$$$F!#(B -

- -
    -
  • $B -
  • $B -
  • $B -
  • $B$d$C$Q$j(B 8 $B%S%C%HF)2a$G$J$$(B
  • -
-

-$B$=$s$J$o$1$G!"(BTMail $B$,?t@i9T$"$k$N$K$O$=$l$J$j$NM}M3$,(B -$B$"$k$N$G$9!#B?>/%m!<%I$,CY$/$F$bL\$r$D$V$C$F$/$@$5$$!#(B -

- - -

$B%a!<%k$N;}$D>pJs(B

- -

-$B%a!<%k%X%C%@$K3JG<$5$l$F$$$k>pJs$K$D$$$F>/$7>\$7$/2r@b$7$^$9!#(B -$B$b$C$H>\$7$/FbMF$d=q<0$K$D$$$FCN$j$?$$?M$O(B -RFC2822 -$B$J$I$r8+$k$H$h$$$G$7$g$&!#(B -

- -
-
To:
-
-

-$B08@h!#J#?t%"%I%l%9$r3JG -

-
From:
-
-

-$BAw$jo$R$H$D$GJ#?t$N$H$-$O(B Sender: $B$r$D$1$J$1$l$P$$$1$J$$(B) -

-
-
Subject:
-
-

-$B!W$H$O$A$g$C$H0c$&!#(B -

-
-
Date:
-
-

-$B%a!<%k$rAw$C$?F|;~!# - -

-
Message-Id:
-
-

-$BA4@$3&$K$*$$$F%a!<%k$H0lBP0l$KBP1~$9$k(B ($B$5$;$J$1$l$P$J$i$J$$(B) -$BJ8;zNs!#%a!<%k$r:n@.$7$?%[%9%H$N(B FQDN ($B@5<0%[%9%HL>(B) $B$H;~9o!"(B -$B%W%m%;%9!?%9%l%C%I(B ID$B!"%i%s%@%`J8;zNs$J$I$r;H$C$F:n$k$N$@$,!"(B -PPP $B@\B3$J%Q%=%3%s$@$C$?$j$9$k$H(B FQDN $B$,$J$$$N$G:$$k!#$=$&$$$&(B -$B$H$-$O!"4m81$J$N$r>5CN$G%W%m%P%$%@$N%a!<%k%5!<%P$N(B FQDN $B$KE,Ev$J(B -$BJ8;zNs$r$/$C$D$1$F;H$&$7$+$J$$$H;W$&!#(B -

- -

-$B$A$J$_$K(B sendmail ($B0lHVM-L>$J(B SMTP $B%5!<%P(B) $B$O>!ID -$B$r$D$1$F$/$l$k$N$G!"$=$l$r4|BT$9$k$N$b$h$$$+$b$7$l$J$$!#$,!"(B -qmail $B$J$s$+$O$D$1$F$/$l$J$$$7!"5,3J$K@53N$K=>$&$J$i$P%a!<%i$,(B -$BIU$1$k$N$,@5$7$$!#(B -

-
-
In-Reply-To:
-
-

-$B$3$N%a!<%k!"$,JV?.$7$?BP>]$N%a!<%k!"$N%a%C%;!<%8(B ID$B!#(B -$B$3$N>pJs$r;H$C$FJV?.4X78$r%D%j!<$K$9$k$H$h$/8+$k(B -$B!V%9%l%C%II=<(!W$K$J$k!#(B -

-
-
References:
-
-

-$B$3$N%a!<%k$,JV?.$7$?%a!<%k!"$,JV?.$7$?%a!<%k!"$,JV?.$7$?%a!<%k!D!D(B -$B$H:F5"E*$K$?$I$C$F=8$a$?%a!<%k$N%a%C%;!<%8(B ID $B$N=89g!#(B -In-Reply-To $B$HF1$8$h$&$K!"%a!<%k%9%l%C%I$r:n$k$N$K;H$($k!#(B -

- -

-$B4pK\E*$K$O4X78$"$k%a!<%k$N(B ID $B$OA4ItF~$l$k$,!"$5$9$,$K(B -$BB?$9$.$k$H$-$O8E$$$b$N$+$i>JN,$7$F$h$$!#$?$H$($P(B 12 $B8D$H$+!#(B -

- -
-
Reply-To:
-
-

-$B%a!<%k$KJV?.$9$k$H$-$K;H$&%"%I%l%9!#$3$N%X%C%@$,$"$k>l9g$O(B -$B@dBP$K(B From: $B$K%a!<%k$rJV$7$F$O$$$1$J$$!#(B -

-
-
Received:
-
-

-$BG[Aw7PO)>pJs!#%a!<%k%7%9%F%`$N%G%P%C%0$d(B SPAM $B$NH/Aw85$N(B -$BFCDj$H$+$K;H$($k!#$3$H$b$"$k!#4JC1$K56B$$G$-$k$+$i?.MQ(B -$B$7$9$.$F$O$J$i$J$$!#(B -

- -
-
X-*:
-
-

-X- $B$,F,$K$D$$$F$$$k%X%C%@$O5,3J$G7h$a$i$l$?$N$G$O$J$$!#(B -$B$D$^$j2r$J$H$3$G$O(B X-Mailer ($B%a!<%iL>(B)$B$H$+!#(B -

- -
-
Mime-Version:
-
-

-Content-* $B%X%C%@$r$D$1$k$J$iI,$:$D$1$J$1$l$P$$$1$J$$!#(B -$B$$$^$N$H$3$m>o$K(B "1.0"$B!#(B -

- -

-MIME $B$H$O(B Multipurpose Internet Mail Extentions $B$NN,$@$,(B -$B$$$^$OF1$85;=Q$,%a!<%k$K4X78$J$/$$$m$s$J$H$3$m$K;H$o$l$F$$$k!#(B -

-
-
Content-Type:
-
-

-$B%a!<%k$NCf?H$,$J$s$G$"$k$+<($9!#$J$s$G$"$k$+!"$H$O!"(B -$B$?$H$($P!V%W%l!<%s%F%-%9%H$G$"$k!W$H$+!V(BJPEG $B$G$"$k!W$H$+!#(B -$BB/$K8@$&$H$3$m$N!V(BMIME $B%?%$%W!W!#(BContent Type $B$N\=R!#(B -

-
-
Content-Disposition:
-
-

-$B%a!<%k$N0LCVIU$1!#$H$$$&$H$o$1$o$+$s$J$$!#$"$j$F$$$K(B -$B8@$&$H!"%^%k%A%Q!<%H%a!<%k$N$H$-$K%Q!<%H$,B>$N%Q!<%H$H(B -$B$I$&$$$&4X78$K$"$k$+$r<($9$b$N!#$?$H$($P(B HTML $B$H$=$3$K(B -$BF~$C$F$k3($H$+!"$=$&$$$&$3$H!#$d$j$+$?$O!D!D$d$C$F$[$7$/(B -$B$J$$$+$i!"8@$o$J$$!#$I$&$7$F$b$d$j$?$1$l$P<+J,$GD4$Y$F!#(B -

-
-
Content-Transfer-Encoding
-
-

-$BA0=R$7$?$h$&$K(B SMTP $B$O(B 8 $B%S%C%HF)2a$G$J$$$N$G!"(B8 $B%S%C%H$a$,(B -$BN)$C$F$k$H$-$O$J$K$+%(%s%3!<%I$7$FAw$k!#$=$&$$$&$H$-$K(B -$B$3$N%X%C%@$K(B Base64 $B$H$+=q$$$?$j$9$k!#(B -

- - -
-
-

Content Type

- -

-$BM-L>$J(B Content Type $B$K$O0J2<$N$h$&$J$b$N$,$"$k!#(B -

- -
    -
  • text/plain
  • -
  • text/html
  • -
  • image/gif
  • -
  • image/png
  • -
  • image/jpeg
  • -
  • application/octet-stream
  • -
  • multipart/mixed ($BH(B)
  • -
-

-$B$^!"$@$$$?$$$o$+$k$G$7$g!#$^$?(B text $B$K$O(B charset $B$H$$$&(B -$B%Q%i%a!<%?$,$D$-$b$N$G!"J8;z%3!<%I$N%(%s%3!<%G%#%s%0$r(B -$B;X<($9$k!#$b$A$m$s(B charset $B$H%(%s%3!<%G%#%s%0$OJLJ*$G$"$k$N$@$,(B -$B$$$C$?$s5,3J$G7h$^$C$F$7$^$C$?0J>e$O$=$&4JC1$KJQ$($i$l$J$$$N$@!#(B -$B2f!9$K4X78$"$k(B charset $BCM$O - -

    -
  • us-ascii
  • -
  • iso-2022-jp
  • -
  • iso-2022-jp-2 (iso-2022-jp $B$r4Z9q8l$H$+$K$bBP1~$5$;$F3HD%$7$?$b$N(B)
  • -
  • euc-jp
  • -
  • shift_jis
  • -
  • utf-8
  • -
-

-$BIaDL$NF|K\8l;H$$$J$i$P(B iso-2022-jp (JIS) $B$r;H$C$F$*$1$P$h$$!#$H$$$&$+(B -$B$=$&$9$Y$-!#(B($B$b$A$m$s$A$c$s$H(B NKF.nkf('-j',str) $B$G%\%G%#$rJQ49$9$k$3$H(B) -

- - -

$B%^%k%A%Q!<%H%a!<%k(B

- -

-Content-Type: multipart/* $B$N$H$-!"%a!<%k$O%^%k%A%Q!<%H%a!<%k(B -$B$H$$$&$N$K$J$C$F$$$k!#0l8@$G8@$&$H!"%a!<%k%\%G%#$NCf$K$^$?%a!<%k$,(B -$BF~$C$F$$$k$N$G$"$k!#B/$K8@$&!VE:IU%U%!%$%k!W$O$3$l$r;H$C$F(B -$B%F%-%9%H$N%a!<%k$H2hA|$N%a!<%k$r$R$H$D$N%a!<%k$K4^$a$F$$$k$o$1$@!#(B -$B$D$^$jE:IU$H$O8@$C$F$b7A<0>e$G$O%F%-%9%H$H2hA|$OJBNs$KJB$s$G$$$k!#(B -

- - -

$BHf3SE*%^%$%J!<$J(B MIME $B3HD%(B

- -

$BJ,3d%a!<%k(B

- -

-$B$R$H$D$N%a!<%k$rJ#?t$N%a!<%k$KJ,3d$7$FAw$k$3$H$,$G$-$k!#(B -$B$3$N$H$-(B Content-Type: message/partial$B!#:n$j$+$?$O(B -RFC2046 $B$r;2>H!#(B -

- -

-$B%a!<%k$,$G$+$/$J$j$9$.$k$HESCf$N%U%!%$%"%&%)!<%k$H$+$,(B -$B>!Z$5$l$k$J$i$P$$$$$,!"(B -$B$=$&$G$J$$$J$i$=$&$$$&>! - -

$B30It%(%s%F%#%F%#(B

- -

-$B%a!<%k$NK\BN$OJL$N$H$3$m$KCV$$$F$"$k$b$N!#$?$H$($P(B URL $B$r(B -$B<($7$?$j$9$k!#(BContent-Type: message/external-body$B!#:n$j$+$?$O(B -RFC2046 $B$r;2>H!#(B -

- -

-$B$I$3$G;H$C$F$s$@$m$&$H;W$C$F$$$?$,!"(BIETF $B$N%"%J%&%s%9(B ML $B$G(B -$B;H$C$F$$$?!#%$%s%?!<%M%C%H%I%i%U%H$H$+$,=P$k$H!"%X%C%@$@$1$,(B -$B%a!<%k$K=q$$$F$"$C$F(B external-body $B$GK\BN$r;X$7<($7$F$$$k!#(B -$B$J$+$J$+8-$$!#$F$$$&$+(B IETF $B$,;H$o$J$+$C$?$i:>5=$+!#(B -(IETF $B$O%$%s%?!<%M%C%H$G;H$&5,3J$r$^$H$a$F$kCDBN$G$9(B) -

- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/config.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/config.html deleted file mode 100644 index 6772da30c..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/config.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - -<code>class <a name="TMail%3a%3aConfig">TMail::Config</a> </code> - - - - - - -

class TMail::Config

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(strict) $B"*(B TMail::Config
-
-

-strict: true | false
-

- -

-TMail::Config $B%*%V%8%'%/%H$r@8@.$7$^$9!#(Bstrict $B$,??$N>l9g!"(B -$B@8@.$5$l$?(B Config $B%*%V%8%'%/%H$N$9$Y$F$N(B strict_* $B%U%i%0$r(B -$B%*%s$K$7$^$9!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
strict_parse?
-
-

-$B??$J$i$P(B TMail $B$N%Q!<%5$O%X%C%@%Q!<%9Cf$KH/@8$7$?(B -TMail::SyntaxError $B$rJV$7$^$9!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/details.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/details.html deleted file mode 100644 index 4bf7bc624..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/details.html +++ /dev/null @@ -1,146 +0,0 @@ - - - - - -$B;EMM$N>\:Y(B - - - - - - -

$B;EMM$N>\:Y(B

- -

$BJ8;z%3!<%I$N07$$$K$D$$$F(B

- -

$BF~NO(B

- -

-$B4pK\E*$K$O!"%Q!<%5$X$NF~NO$O(B RFC $B$K1h$C$F@5$7$$%(%s%3!<%I$,(B -$B$J$5$l$F$$$k$b$N$HA[Dj$7$F$$$^$9!#$G$9$,8=TMail $B$N%5%]!<%HBP>]$G$9!#(B -($B$?$@$7(B $KCODE $B$,E,@Z$K%;%C%H$5$l$F$$$J$1$l$P$$$1$^$;$s(B) -

-
-To: $BF|K\8l(B <aamine@loveruby.net>
-Content-Disposition: attached; filename=$BF|K\8l(B.doc
-
- -

-$B$^$?(B $KCODE=EUC/SJIS $B$N>l9g$O0J2<$N$h$&$J%X%C%@$b%Q!<%9(B -$B$7$^$9!#(B('$BF|K\8l(B' $B$O@8$N(B iso-2022-jp) -

-
-To: $BF|K\8l(B <aamine@loveruby.net>
-To: "$BF|K\8l(B" <aamine@loveruby.net>
-To: Minero Aoki <aamine@loveruby.net> ($BF|K\8l(B)
-Content-Disposition: attached; filename=$BF|K\8l(B.doc
-Content-Disposition: attached; filename="$BF|K\8l(B.doc"
-
-

-$B%/%*!<%H$d%3%a%s%HFb$K(B EUC $B$d(B SJIS$B!"(BUTF8 $B$r@8$GF~$l$F$$$k(B -$B%X%C%@$O$"$^$j$K - -

-$B$$$o$f$kH>3QJ8;z$*$h$S5!-Mh$J$i$PB?>/$O$J$s$H$+$G$-$k$+$b$7$l$^$;$s!#(B -

- -

-$BF|K\8l0J30$N%(%s%3!<%G%#%s%0$K$O!"(BM17N Ruby $B$,0BDjHG$H$7$F(B -$B%j%j!<%9$5$l$k$^$G$OBP1~$7$^$;$s!#(B -

- -

$B%G%3!<%I=PNO(B

- -

-TMail $B$NBgItJ,$N%a%=%C%I$OFC$KCG$j$,$J$$8B$j%G%3!<%I$7$?(B -$BJ8;zNs$rJV$7$^$9!#J8;zNs$NCf$KF|K\8lJ8;zNs$,B8:_$9$k>l9g$O!"(B -$KCODE $B$K=>$$%(%s%3!<%I$rJQ49$7$FJV$7$^$9!#$?$@$7%5%]!<%H(B -$B$9$k$N$O(B $KCODE=EUC/SJIS $B$N>l9g$N$_$G!"$=$l0J30(B ($B$D$^$j(B NONE $B$+(B UTF8) -$B$N$H$-$O%(%s%3!<%G%#%s%0$O0l@ZJQ49$5$l$^$;$s!#(B -Ruby 1.6 $B0J9_$G$O(B $KCODE=NONE $B$,%G%U%)%k%H$J$N$GCm0U$7$F$/$@$5$$!#(B -

- -

$B%(%s%3!<%I=PNO(B

- -

-encoded $B%a%=%C%I$rBeI=$H$7$?%(%s%3!<%I=PNO%a%=%C%I$O$9$Y$F(B -RFC $BE*$K@5$7$$%(%s%3!<%I$r9T$$$^$9(B ($B$H;W$$$^$9(B)$B!#=PNOB&$G(B -$B%5%]!<%H$9$kJ8;z%(%s%3!<%G%#%s%0$O(B iso-2022-jp$B!"(BMIME $B%(%s(B -$B%3!<%G%#%s%0$O(B Base64/B $B$N$_$G$9!#$3$l$O>-Mh$KEO$C$FJQ$($^$;$s!#(B -

- - -

$B%3%a%s%H(B

- -

-$B%X%C%@$K$O%3%a%s%H$r4^$a$i$l$^$9!#$?$H$($P0J2<$N$&$A3g8L$G(B -$B$/$/$i$l$?ItJ,$,%3%a%s%H$G$9!#(B -

-
-To: aamine@loveruby.net (This is comment.)
-
-

-TMail $B$N%Q!<%5$O%3%a%s%H$r%Q!<%9$7$F%X%C%@%*%V%8%'%/%H$N(B -comments $B$K3JG<$7$^$9$,!":FJ8;zNs2=$9$k$H$-$O$9$Y$Fl=j$K$"$C$?$N$+H=CG$G$-$J$$$+$i$G$9!#(B -$B$?$H$($P0J2<$N$h$&$J%X%C%@$O$h$/8+$+$1$^$9!#(B -

-
-Received: from mail.loveruby.net (mail.loveruby.net [192.168.1.1])
-        by doraemon.edit.ne.jp (8.12.1/8.12.0) with ESMTP id g0CGj4bo035
-        for <aamine@mx.edit.ne.jp>; Sun, 13 Jan 2002 01:45:05 +0900 (JST)
-
-

-$B$3$&$$$&>l9g!"3F%3%a%s%H$r$I$NMWAG$K=jB0$5$;$k$+$O?M4V$G(B -$B$J$1$l$PH=CG$G$-$^$;$s!#$"$kDxEY%R%e!<%j%9%F%#%C%/$K$d$k$3$H$O(B -$B2DG=$G$9$,!"$$$C$?$s30$l$?$i40`z$K<:GT$7$F$7$^$&$G$7$g$&!#(B -$B85$N%X%C%@$r:F@8$G$-$k$h$&$K8+$;$+$1$F$*$$$F;~!9<:GT$9$k$H(B -$B$$$&$N$O$"$^$j$KM-32$G$9$+$i!"$=$l$h$j$O7i$/A4It - -

-$BFC$K!"%"%I%l%9%U%#!<%k%I$K$*$$$FK\L>$r%3%a%s%H$KF~$l$?$j$9$k(B -$B$N$O:GDc$G$9!#$A$c$s$HJ8K!E*$KL>A0$r3JG<$9$k>l=j$,$"$k$N$K!"(B -$B$o$6$o$6%3%a%s%H$r;H$&M}M3$OA4$/$"$j$^$;$s!#$=$&$$$&%X%C%@(B -$B@_Dj$r$7$F$$$k?M$O$9$0$K%a!<%i$+@_Dj$+$I$A$i$+$rJQ$($^$7$g$&!#(B -

- -

-$B$b$C$H$b!"BgDq$N>l9g$K$O$3$l$GLdBj$J$$$N$G$9$,!"%a!<%k$NFbMF$r(B -$B%U%#%k%?%j%s%0$9$k$h$&$J>l9g$OCWL?=}$K$J$j$($^$9!#$?$H$($P(B ML -$B%I%i%$%P$G$O(B Subject $B$r2C9)$7$?$j$7$?$$$G$7$g$&$+$i!" -

-mail = TMail::Mail.load(filename)
-mail.subject = "[my-list:#{number}] " + mail.subject
-mail.write_back
-
-

-$B$7$+$7$3$l$G$O%3%a%s%H$,<:$o$l$F$7$^$$$^$9!#>C$($F$b$$$$(B -$B%3%a%s%H$b$"$j$^$9$,!"(BReceived: $B$N%3%a%s%H$J$I$OHs>o$K(B -$B=EMW$G$9!#(B -

- -

-$B$3$l$rHr$1$k$K$O!"$R$H$D$N(B TMail::Mail $B%*%V%8%'%/%H$O>o$K(B -$B>pJs-Mh$O(B -$B$b$&>/$7$$$$J}K!$r9M$($^$9!#(B -

- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/index.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/index.html deleted file mode 100644 index 3079a1f99..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/index.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - -TMail $B%f!<%6!<%^%K%e%"%k(B - - - - - - -

TMail $B%f!<%6!<%^%K%e%"%k(B

- -

-$B%P!<%8%g%s(B 0.10 $BBP1~(B -

- - - - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mail.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mail.html deleted file mode 100644 index fe9e71412..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mail.html +++ /dev/null @@ -1,793 +0,0 @@ - - - - - -<code>class <a name="TMail%3a%3aMail">TMail::Mail</a> </code> - - - - - - -

class TMail::Mail

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(port = TMail::StringPort.new, config = DEFAULT_CONFIG) $B"*(B TMail::Mail
-
-

-port: TMail::Port
-config: TMail::Config
-

- -

-port $B$+$i(B Mail $B%*%V%8%'%/%H$r:n@.$7$^$9!#(B -

- -
-
load(filename) $B"*(B TMail::Mail
-
-

-filename: String
-

- -

-$B%U%!%$%k(B filename $B$+$i%a!<%k$r%m!<%I$7$F(B Mail $B%*%V%8%'%/%H$r:n@.$7$^$9!#(B -$B%m!<%I$9$k%U%!%$%k$O(B MH $B$N%a!<%k$N$h$&$K%a!<%k0lDL$,%U%!%$%k$R$H$D$K(B -$BBP1~$7$F$$$J$1$l$P$$$1$^$;$s!#(B -

- -

-UNIX mbox $B$N$h$&$J7A<0$OC1FH$G$OBP1~$7$F$$$^$;$s!#(B -$B%a!<%k%\%C%/%9%/%i%9(B$B$r;H$C$F$/$@$5$$!#(B -

- -
-
parse(str) $B"*(B TMail::Mail
-
-

-str: String
-

- -

-$BJ8;zNs(B str $B$r%Q!<%9$7$F(B TMail::Mail $B%*%V%8%'%/%H$r:n@.$7$^$9!#(B -str $B$O%a!<%k0lDLJ,$G$J$1$l$P$$$1$^$;$s!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
port $B"*(B TMail::Port
-
-

-$B$3$N%a!<%k%*%V%8%'%/%H$N@8@.85$N%]!<%H$G$9!#(B -

- -
-
body_port $B"*(B TMail::Port
-
-

-$B%a!<%kK\J8$rJ]B8$7$F$$$k%]!<%H$rJV$7$^$9!#(B -

- -

-$B$?$@$7$3$3$K=q$-$3$s$G$b%m!<%I85$N%U%!%$%k(B($B$dJ8;zNs(B)$B$OJQ99$5$l$^$;$s!#(B -$B#write_back $B$r8F$V(B -$BI,MW$,$"$j$^$9!#(B -

- -
-
each {|line| .... }
-
-

-line: String
-

- -

-$BK\J8J8;zNs$N3F9T$KBP$9$k7+$jJV$7!#(B -body_port.ropen {|f| f.each } $B$HF1$8$G$9!#(B -

- -
-
body $B"*(B String
-
preamble $B"*(B String
-
-

-$B%a!<%k%\%G%#(B($BK\J8(B)$BA4$F$rJ8;zNs$H$7$FJV$7$^$9!#(B -MIME $B%^%k%A%Q!<%H%a!<%k$N$H$-$O(B preamble $B$KAjEv$7$^$9!#(B -$B$3$NJV$jCM$rJQ99$7$F$b%*%j%8%J%k$OJQ99$5$l$^$;$s!#(B -

- -
-
parts $B"*(B [TMail::Mail]
-
-

-$B%a!<%k$,(B MIME $B%^%k%A%Q!<%H%a!<%k$N;~!"3F%Q!<%H$,(B TMail::Mail $B$NG[Ns$H$7$F(B -$B3JG<$5$l$F$$$^$9!#%^%k%A%Q!<%H%a!<%k$G$J$$$H$-$O6u$NG[Ns$G$9!#(B -

- -

-$B$?$@$7$3$3$K=q$-$3$s$G$b%m!<%I85$N%U%!%$%k(B($B$dJ8;zNs(B)$B$OJQ99$5$l$^$;$s!#(B -$B#write_back $B$r(B -$B8F$VI,MW$,$"$j$^$9!#(B -

- -
-
epilogue $B"*(B String
-
-

-MIME $B%^%k%A%Q!<%H%a!<%k$G$N(B epilogue $B$KAjEv$9$kJ8;zNs$G$9!#(B -$BDL>o$N%a!<%k$N$H$-$O6uJ8;zNs$,F~$C$F$$$^$9!#(B -

- -

-$B$?$@$7$3$3$K=q$-$3$s$G$b%m!<%I85$N%U%!%$%k(B($B$dJ8;zNs(B)$B$OJQ99$5$l$^$;$s!#(B -$B#write_back $B$r8F$VI,MW$,$"$j$^$9!#(B -

- -
-
multipart?
-
-

-$B%a!<%k$,(B MIME $B%^%k%A%Q!<%H$N$H$-??!#(B -$B$3$N%a%=%C%I$O(B Content-Type $B%X%C%@$NFbMF$G??56$rH=CG$7$^$9!#(B -

- -
-
encoded(eol = "\n", encoding = 'j') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-$B%a!<%k$r(B RFC2822 $B7A<0$K%(%s%3!<%I$7$?J8;zNs$KJQ49$7$^$9!#(B -$B$=$N:]!"%X%C%@$N9TKv%3!<%I$r(B eol $B$K!"%X%C%@Fb$N%(%s%3!<%IA0$N(B -$BF|K\8lJ8;zNs$NJ8;z%3!<%I$r(B encoding $B$KJQ49$7$^$9!#(B -$B$?$@$78=:_(B encoding $B$O(B "j" (JIS) $B$7$+@5>o$KF0:n$7$^$;$s!#(B -

- -

-$B%P!<%8%g%s(B 0.9 $B$+$i$O(B #to_s $B$O(B #decoded $B$NJLL>$K$J$C$?$N$G!"$3$N(B -$B%a%=%C%I$H$O0c$&$O$?$i$-$r$7$^$9!#(B -

- -
-
decoded(eol = "\n", encoding = 'e') $B"*(B String
-
to_s(eol = "\n", encoding = 'e') $B"*(B String
-
-

-eol: String
-encoding: String
-

- -

-$B%a!<%k$r%G%3!<%I$5$l$?J8;zNs$KJQ49$7$^$9!#$=$N:]!"%X%C%@$N9TKv(B -$B%3!<%I$r(B eol $B$K!"%X%C%@Fb$N%(%s%3!<%IA0$NF|K\8lJ8;zNs$NJ8;z%3!<%I$r(B -encoding $B$KJQ49$7$^$9!#(B -

- -

-$B%P!<%8%g%s(B 0.9 $B0J9_$O(B #to_s $B$O$3$N%a%=%C%I$NJLL>$K$J$j$^$7$?!#(B -

- -
-
inspect $B"*(B String
-
-

-$B0JA0$O(B #decoded $B$NJLL>$G$7$?$,%P!<%8%g%s(B 0.9 $B$+$i$O(B -"#<TMail::Mail port=<StringPort:str=...>>" -$B$N$h$&$J4J7i$JJ8;zNs2=$r9T$$$^$9!#(B -

- -
-
write_back(eol = "\n", encoding = 'e')
-
-

-eol: String
-encoding: String
-

- -

-$B%a!<%kA4BN$rJ8;zNs2=$7(B body_port $B$K=q$-La$7$^$9!#$=$N:]!"%X%C%@$N(B -$B9TKv%3!<%I$r(B eol $B$K!"%X%C%@Fb$NF|K\8lJ8;zNs$NJ8;z%3!<%I$r(B encoding $B$K(B -$BJQ49$7$^$9!#(B -

- -
-
-

$BB0@-%"%/%;%9$N$?$a$N%a%=%C%I(B

- -
-
date(default = nil) $B"*(B Time
-
date=(datetime)
-
-

-datetime: Time
-default: Object
-

- -

-Date: $B%X%C%@$KBP1~$9$k(B Time $B%*%V%8%'%/%H!#(B -$B>o$K%m!<%+%k%?%$%`$KJQ49$5$l$^$9!#(B -

- -
-
strftime(format, default = nil) $B"*(B String
-
-

-format: String
-default: Object
-

- -

-Date: $B%X%C%@$KI=8=$5$l$?;~9o$HBP1~$9$k(B Time $B%*%V%8%'%/%H$KBP$7(B -strftime $B$r8F$S$^$9!#(BDate: $B%X%C%@$,B8:_$7$J$$>l9g$O(B default $B$r(B -$BJV$7$^$9!#(B -

- -
-
to(default = nil) $B"*(B [String]
-
to=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-To: $B%"%I%l%9$N(B spec $B$NG[Ns!#(B -

- -
-
to_addrs(default = nil) $B"*(B [TMail::Address | TMail::AddressGroup]
-
to_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-To: $B%"%I%l%9$NG[Ns!#(B -

- -
-
cc(default = nil) $B"*(B [String]
-
cc=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-Cc: $B%"%I%l%9$N(B spec $B$NG[Ns!#(B -

- -
-
cc_addrs(default = nil) $B"*(B [TMail::Address]
-
cc_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-Cc: $B%"%I%l%9$NG[Ns!#(B -

- -
-
bcc(default = nil) $B"*(B [String]
-
bcc=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-Bcc: $B%"%I%l%9$N(B spec $B$NG[Ns!#(B -

- -
-
bcc_addrs(default = nil) $B"*(B [TMail::Address]
-
bcc_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-Bcc: $B%"%I%l%9$NG[Ns!#(B -

- -
-
from(default = nil) $B"*(B [String]
-
from=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-From: $B%"%I%l%9$N(B spec $B$NG[Ns!#(B -

- -
-
from_addrs(default = nil) $B"*(B [TMail::Address]
-
from_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-From: $B%"%I%l%9$NG[Ns!#(B -

- -
-
friendly_from(default = nil) $B"*(B String
-
-

-default: Object
-

- -

-From: $B$N:G=i$N%"%I%l%9$N(B phrase $B$^$?$O(B spec$B!#(B -From: $B$,B8:_$7$J$$$H$-$O(B default $B$rJV$7$^$9!#(B -

- -
-
reply_to(default = nil) $B"*(B [String]
-
reply_to=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-Reply-To: $B%"%I%l%9$N(B spec $B$NG[Ns!#(B -

- -
-
reply_to_addrs(default = nil) $B"*(B [TMail::Address]
-
reply_to_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-Reply-To: $B%"%I%l%9$NG[Ns!#(B -

- -
-
sender(default = nil) $B"*(B String
-
sender=(spec)
-
-

-spec: String
-

- -

-Sender: $B%"%I%l%9$N(B spec -

- -
-
sender_addr(default = nil) $B"*(B TMail::Address
-
sender_addr=(addr)
-
-

-addr: TMail::Address
-

- -

-Sender: $B%"%I%l%9(B -

- -
-
subject(default = nil) $B"*(B String
-
subject=(sbj)
-
-

-sbj: String
-

- -

-Subject: $B$NFbMF!#(B -Subject: $B$,B8:_$7$J$$$H$-$O(B default $B$rJV$7$^$9!#(B -

- -
-
message_id(default = nil) $B"*(B String
-
message_id=(id)
-
-

-id: String
-

- -

-$B%a!<%k$N%a%C%;!<%8(B ID$B!#(B -

- -
-
in_reply_to(default = nil) $B"*(B [String]
-
in_reply_to=(ids)
-
-

-ids: String | [String]
-

- -

-In-Reply-To: $B$K4^$^$l$k%a%C%;!<%8(B ID $B$N%j%9%H!#(B -

- -
-
references(default = nil) $B"*(B [String]
-
references=(ids)
-
-

-ids: String | [String]
-

- -

-References: $B$K4^$^$l$k%a%C%;!<%8(B ID $B$N%j%9%H!#(B -$B8=:_$O(B References: $B$K$O%a%C%;!<%8(B ID $B0J30$O(B -$B4^$a$i$l$^$;$s!#(B(RFC2822) -

- -
-
mime_version(default = nil) $B"*(B String
-
mime_version=(ver)
-
-

-ver: String
-

- -

-MIME $B%P!<%8%g%s!#8=:_$O>o$K(B "1.0" $B$G$9!#(B -$B%X%C%@$,B8:_$7$J$$>l9g$O(B default $B$rJV$7$^$9!#(B -

- -
-
set_mime_version(major, minor)
-
-

-major: Integer
-minor: Integer
-

- -

-MIME $B%P!<%8%g%s$r%;%C%H$7$^$9!#(B -

- -
-
content_type(default = nil) $B"*(B String
-
-

-$B%a!<%kK\BN$N%U%!%$%k%?%$%W$r<($9J8;zNs!#Nc$($P(B "text/plain"$B!#(B -$B%X%C%@$,B8:_$7$J$$>l9g$O(B default $B$rJV$7$^$9!#(B -

- -
-
main_type(default = nil) $B"*(B String
-
-

-$B%a!<%kK\BN$N%a%$%s%?%$%W(B ($BNc!'(B"text")$B!#(B -$B>o$K>.J8;z$KE}0l$5$l$^$9!#(B -$B%X%C%@$,B8:_$7$J$$>l9g$O(B default $B$rJV$7$^$9!#(B -

- -
-
sub_type(default = nil) $B"*(B String
-
-

-$B%a!<%kK\BN$N%5%V%?%$%W(B ($BNc!'(B"plain")$B!#(B -$B>o$K>.J8;z$KE}0l$5$l$^$9!#(B -$B%X%C%@$,B8:_$7$J$$>l9g$O(B default $B$rJV$7$^$9!#(B -

- -
-
content_type=(ctype)
-
-

-ctype: String
-

- -

-Content-Type $B$N%a%$%s%?%$%W!&%5%V%?%$%W$r(B main_sub $B$+$i%;%C%H(B -$B$7$^$9!#(Bmain_sub $B$ONc$($P(B "text/plain" $B$N$h$&$J7A<0$G$J$1$l$P(B -$B$$$1$^$;$s!#(B -

- -
-
set_content_type(main, sub, params = nil)
-
-

-main: String
-sub: String
-params: {String => String}
-

- -

-$B%3%s%F%s%H%?%$%W$r(B main/sub; param; param; ... $B$N$h$&$K@_Dj$7$^$9!#(B -

- -
-
type_param(name, default = nil) $B"*(B String
-
-

-name: String
-

- -

-Content-Type $B$N(B name $B%Q%i%a!<%?$NCM$rJV$7$^$9!#(B -name $B$KBP1~$9$kCM$d%X%C%@$=$N$b$N$,B8:_$7$J$$>l9g$O(B default $B$r(B -$BJV$7$^$9!#(B -

-
-# example
-mail['Content-Type'] = 'text/plain; charset=iso-2022-jp'
-p mail.type_param('charset')   # "iso-2022-jp"
-
- -
-
multipart? $B"*(B true | false
-
-

-Content-Type $B$,(B MIME $B%^%k%A%Q!<%H%a!<%k$G$"$k$3$H$r(B -$B<($9FbMF$J$i$P??!#(B -

- -
-
transfer_encoding(default = nil) $B"*(B String
-
transfer_encoding=(encoding)
-
-

-encoding: String
-

-

-$BE>Aw;~$KE,MQ$7$?%(%s%3!<%G%#%s%0(B (Content-Transfer-Encoding)$B!#(B -'7bit' '8bit' 'Base64' 'Binary' $B$J$I!#(B -

- -
-
disposition(default = nil) $B"*(B String
-
disposition=(pos)
-
-

-pos: String
-

- -

-Content-Disposition $B$No$K>.J8;z$KE}0l$5$l$^$9!#(B -name $B$KBP1~$9$kCM$d%X%C%@$=$N$b$N$,B8:_$7$J$$>l9g$O(B default $B$r(B -$BJV$7$^$9!#(B -

-
-# example
-mail['Content-Disposition'] = 'attachement; filename="test.rb"'
-p mail.disposition   # "attachment"
-
- -
-
set_content_disposition(pos, params = nil)
-
-

-pos: String
-params: {String => String}
-

- -

-disposition $BJ8;zNs$H%Q%i%a!<%?$N%O%C%7%e$+$i(B Content-Disposition $B$r(B -$B%;%C%H$7$^$9!#(B -

- -
-
disposition_param(key, default = nil) $B"*(B String
-
-

-key: String
-

- -

-Content-Disposition $B$NIU2C%Q%i%a!<%?$N(B name $B$NCM$rname $B$KBP1~$9$kCM$d%X%C%@$=$N$b$N$,B8:_$7$J$$>l9g$O(B default $B$r(B -$BJV$7$^$9!#(B -

-
-# example
-mail.disposition_param('filename')
-
- -
-
destinations(default = nil) $B"*(B [String]
-
-

-To$B!"(BCc$B!"(BBcc $B$9$Y$F$N%"%I%l%9%9%Z%C%/J8;zNs$NG[Ns$r(B -$BJV$7$^$9!#$R$H$D$bB8:_$7$J$1$l$P(B default $B$rJV$7$^$9!#(B -

- -
-
reply_addresses(default = nil) $B"*(B [TMail::Address]
-
-

-$BJV?.$9$Y$-%"%I%l%9$rH=CG$7!"(BAddress $B%*%V%8%'%/%H$N(B -$BG[Ns$GJV$7$^$9!#JV?.$9$Y$-%"%I%l%9$,$_$D$+$i$J$1$l$P(B -DEFAULT $B$rJV$7$^$9!#(B -

- -
-
error_reply_addresses(default = nil) $B"*(B [TMail::Address]
-
-

-$B%(%i!<%a!<%k$rJVAw$9$Y$-%"%I%l%9$rH=CG$7!"(BAddress $B%*%V%8%'%/%H$N(B -$BG[Ns$GJV$7$^$9!#JVAw$9$Y$-%"%I%l%9$,$_$D$+$i$J$1$l$P(B default $B$rJV$7$^$9!#(B -

- -
-
-

$B%X%C%@%U%#!<%k%ID>@\A`:nMQ%a%=%C%I(B

- -
-
clear
-
-

-$B%X%C%@$rA4$F>C5n$7$^$9!#(B -

- -
-
keys $B"*(B [TMail::HeaderField]
-
-

-$B%X%C%@L>$NG[Ns$rJV$7$^$9!#(B -

- -
-
[](name) $B"*(B TMail::HeaderField
-
-

-name: String
-

- -

-$B%X%C%@L>$+$i%X%C%@%*%V%8%'%/%H$rJV$7$^$9!#(B -

- -
-
[]=(name, field)
-
-

-name: String
-field: TMail::HeaderField
-

- -

-name $B%X%C%@$K(B field $B$r@_Dj$7$^$9!#(Bfield $B$OJ8;zNs$+(B TMail::HeaderField $B%*%V%8%'%/%H$G$9!#(B -Received $B$J$I0lIt$N%X%C%@$KBP$7$F$O$5$i$K$=$NG[Ns$bM?$($k$3$H$,$G$-$^$9!#(B -

- -
-
delete(name)
-
-

-name: String
-

-

-name $B%X%C%@$r>C$7$^$9!#(B -

- -
-
delete_if {|name, field| .... }
-
-

-name: String
-field: TMail::HeaderField
-

- -

-$B%X%C%@L>$H%X%C%@$rM?$($F%V%m%C%/$rI>2A$7!"??$J$i$=$N4XO"$E$1$r>C$7$^$9!#(B -

- -
-
each_header {|name, field| .... }
-
each_pair {|name, field| .... }
-
-

-name: String
-field: TMail::HeaderField
-

- -

-$BA4$F$N%X%C%@L>$H%X%C%@%*%V%8%'%/%H$KBP$9$k$/$j$+$($7!#(B -

- -
-
each_header_name {|name| .... }
-
each_key {|name| .... }
-
-

-name: String
-

- -

-$BA4$F$N%X%C%@L>$KBP$9$k$/$j$+$($7!#(B -

- -
-
each_field {|field| .... }
-
each_value {|field| .... }
-
-

-field: TMail::HeaderField
-

- -

-$BA4$F$N%X%C%@%*%V%8%'%/%H$KBP$9$k$/$j$+$($7!#(B -$B%X%C%@$N=g=x;XDjIU$-$N(B each_header $B$G$9!#:G=i$K;XDj$7$?$b$N$,;XDj$7$?(B -$B=gHV$GJB$S!"$=$NB>$N%X%C%@$,%i%s%@%`$KB3$-$^$9!#=g=x$OJ8;zNs$NG[Ns(B -TMail::Mail::FIELD_ORDER $B$G@_Dj$7$F$/$@$5$$(B($B>\:Y$O%=!<%9%3!<%I$r;2>H(B)$B!#(B -

- -
-
key?(name)
-
-

-name: String
-

- -

-name $B%X%C%@$,$"$l$P??!#(B -

- -
-
value?(field)
-
-

-field: TMail::HeaderField
-

- -

-field $B%X%C%@%*%V%8%'%/%H$,$"$l$P??!#(B -

- -
-
values_at(*names) $B"*(B [TMail::HeaderField]
-
indexes(*names) $B"*(B [TMail::HeaderField]
-
indices(*names) $B"*(B [TMail::HeaderField]
-
-

-names: [String]
-

- -

-$BA4$F$N(B names $B$K$D$$$F(B fetch $B$7$?7k2L$NG[Ns$rJV$7$^$9!#(B -

- -
-
values $B"*(B [TMail::HeaderField]
-
-

-$BEPO?$5$l$F$$$kA4$F$N%X%C%@%*%V%8%'%/%H$NG[Ns$rJV$7$^$9!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mailbox.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mailbox.html deleted file mode 100644 index 8c9200219..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/mailbox.html +++ /dev/null @@ -1,265 +0,0 @@ - - - - - -<code>Mailbox Classes</code> - - - - - - -

Mailbox Classes

- -

class TMail::MhMailbox

- -

-MH $B7A<0$N%a!<%k%\%C%/%9$r1#JC$9$k%/%i%9!#(B -

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(dirname) $B"*(B TMail::MhMailbox
-
-

-dirname: String
-

- -

-MhMailbox $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B -dirname $B$O(B MH $B%a!<%k%\%C%/%9$H$7$F;H$&%G%#%l%/%H%jL>$G$9!#(B -$B$9$G$K:n@.$:$_$G$J$1$l$P$$$1$^$;$s!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-$B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
reverse_each_port {|port| .... }
-
reverse_each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-$B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
last_atime $B"*(B Time
-
last_atime=(time)
-
-

-time: Time
-

- -

-$B:G8e$K(B each_new_port/each_port/reverse_each_port $B$r8F$S=P$7$?;~4V!#(B -

- -
-
each_new_port(time = last_atime()) {|port| .... }
-
-

-time: Time
-port: TMail::FilePort
-

- -

-$B?7Ce%a!<%k$N$_$KBP$7$F$/$j$+$($7$^$9!#(B -$B0z?t(B time $B$,M?$($i$l$?$H$-$O$=$N;~9o0J9_$K99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B -$BM?$($i$l$J$+$C$?;~$OA02s$N(B each_mail, reverse_each_mail, each_new_port $B$N8e$K(B -$B99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B -

- -
-
new_port $B"*(B TMail::FilePort
-
-

-$B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B -$BBP1~$9$k(B TMail::Port $B%*%V%8%'%/%H$rJV$9!#(B -

- -
-
close
-
-

-$B$J$K$b$7$^$;$s!#(B -

- -
-
-

class TMail::UNIXMbox

- -

-UNIX mbox $B$r07$&%/%i%9!#8=:_$Nclose $B8F$S=P$7$+(B GC $B$N%?%$%_%s%0$G%U%!%$%k$K=q$-La$7$^$9!#(B -

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(filename) $B"*(B TMail::UNIXMbox
-
-

-filename: String
-

- -

-$B?7$7$$(B TMail::UNIXMbox $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B -filename $B$O(B UNIX mbox $B%U%!%$%kL>$G$9!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-$B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
reverse_each_port {|port| ... }
-
reverse_each {|port| ... }
-
-

-port: TMail::FilePort
-

- -

-$B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
each_new_port(time = @last_loaded_time) {|port| .... }
-
-

-time: Time
-port: TMail::FilePort
-

- -

-$B?7Ce%a!<%k$N$_$KBP$7$F$/$j$+$($7$^$9!#(B -$B0z?t(B time $B$,M?$($i$l$?$H$-$O$=$N;~9o0J9_$K99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B -$BM?$($i$l$J$+$C$?;~$OA02s$N(B each_mail, reverse_each_mail, each_new_port $B$N8e$K(B -$B99?7$5$l$?%a!<%k$r?7Ce$H$_$J$7$^$9!#(B -

- -
-
new_port $B"*(B TMail::FilePort
-
-

-$B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B -$BBP1~$9$k(B TMail::Port $B%*%V%8%'%/%H$rJV$9!#(B -

- -
-
close
-
-

-$BL@<(E*$K%a!<%k%\%C%/%9$r=q$-La$7$^$9!#0J8e!"$3$N%*%V%8%'%/%H$K(B -$BBP$7$F%a!<%kA`:n%a%=%C%I$r8F$S=P$9$HA4$FNc30$K$J$j$^$9!#(B -

- -
-
-

class TMail::Maildir

- -

-qmail $B$,;HMQ$9$k%a!<%k%\%C%/%9(B maildir $B$r1#JC$9$k%/%i%9!#(B -

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(dirname) $B"*(B TMail::Maildir
-
-

-dirname: String
-

- -

-$B?7$7$$(B TMail::Maildir $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B -dirname $B$O(B maildir $B%a!<%k%\%C%/%9$H$7$F;H$&%G%#%l%/%H%jL>$G$9!#(B -$B%G%#%l%/%H%j$O$9$G$K:n@.$:$_$G$J$1$l$P$$$1$^$;$s!#(B -

- -
-
-

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-$B%a!<%k%\%C%/%9$N%a!<%k$KBP$7$F8E$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
reverse_each_port {|port| .... }
-
reverse_each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-$B%G%#%l%/%H%jCf$N%a!<%k$KBP$7$F?7$7$$%a!<%k$+$i=gHV$K7+$jJV$7$^$9!#(B -

- -
-
each_new_port {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-MAILDIR/new $B$N%a!<%k$KBP$7$F!"(Bcur $B$K0\F0$7$?$N$A$K7+$jJV$7$^$9!#(B -

- -
-
new_port $B"*(B TMail::FilePort
-
-

-$B?7$7$$%a!<%k$KBP1~$9$k%U%!%$%k$r:n@.$7!"(B -$BBP1~$9$k(B Port $B%*%V%8%'%/%H$rJV$9!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/port.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/port.html deleted file mode 100644 index 096286609..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/port.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - -<code>Port Classes</code> - - - - - - -

Port Classes

- -

class TMail::Port

- -

-TMail::Port $B$O(B TMail $B%i%$%V%i%j$G$N%U%!%$%k$dJ8;zNs$NCj>]I=8=$G$9!#(B -$B%a!<%k0lDLJ,$K$"$?$k%j%=!<%9$r1#JC$7$^$9!#(B -

- -

$B%$%s%9%?%s%9%a%=%C%I(B

- -
-
ropen $B"*(B IO
-
-

-$BFI$_$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B -

- -
-
wopen $B"*(B IO
-
-

-$B=q$-$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B -

- -
-
aopen $B"*(B IO
-
-

-$BDI2C=q$-$3$_MQ%9%H%j!<%`$rJV$7$^$9!#(B -

- -
-
-

class TMail::FilePort < TMail::Port

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(filename) $B"*(B TMail::FilePort
-
-

-filename: String
-

- -

-FilePort $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B -filename $B$O%a!<%k0lDL$r$*$5$a$?%U%!%$%kL>$G$J$1$l$P$$$1$^$;$s!#(B -

- -
-
filename $B"*(B String
-
-

-$B$3$N%]!<%H$,1#JC$7$F$$$k%U%!%$%kL>$rJV$7$^$9!#(B -

- -
-
-

class TMail::StringPort < TMail::Port

- -

$B%/%i%9%a%=%C%I(B

- -
-
new(src = '') $B"*(B TMail::StringPort
-
-

-src: String
-

- -

-StringPort $B%*%V%8%'%/%H$r@8@.$7$^$9!#(B -string $B$O%a!<%k0lDLJ,$NJ8;zNs$G$J$1$l$P$$$1$^$;$s!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/tmail.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/tmail.html deleted file mode 100644 index 20c658cd3..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/tmail.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -<code>module <a name="TMail">TMail</a> </code> - - - - - - -

module TMail

- -

$B%b%8%e!<%k4X?t(B

- -
-
new_boundary $B"*(B String
-
-

-$B?7$7$$%P%&%s%@%j$r:n@.$7$FJV$7$^$9!#(B -

- -
-
new_message_id(fqdn = Socket.gethostname) $B"*(B String
-
-

-fqdn: String
-

- -

-$B?7$7$$%a%C%;!<%8(B ID $B$r:n@.$7$FJV$7$^$9!#(B -$B0z?t(B fqdn $B$,>JN,$5$l$?>l9g$O%m!<%+%k%[%9%H$NL>A0$r;H$$$^$9!#(B -$B0lJ}(B fqdn $B$r;XDj$9$k>l9g$O%@%$%d%k%"%C%W$G$"$k$J$I$N;v>p$K$h$j(B -$B%[%9%H$NL>A0$rJQ$($kI,MW$,$"$k$N$@$H$_$J$7!"$=$l$K(B '.tmail' $B$r(B -$B$D$1$?%I%a%$%s$r;HMQ$7$^$9!#$3$l$O!VK\J*$N!W%I%a%$%s$G:n@.$5$l$k(B -$B%a%C%;!<%8(B ID $B$H$N=EJ#$rHr$1$k$?$a$G$9!#(B -

- -
-
message_id?(str) $B"*(B true | false
-
-

-str: String
-

- -

-str $B$,%a%C%;!<%8(B ID $B$r4^$`$H$-??!#(B -

-
-
- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/usage.html b/vendor/tmail-1.2.3.1/site/outdated/doc.ja/usage.html deleted file mode 100644 index 21d571526..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/doc.ja/usage.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - -TMail $B$N;H$$J}(B - - - - - - -

TMail $B$N;H$$J}(B

- -

TMail $B$N35MW(B

- -

-TMail $B$OEE;R%a!<%k$r07$&$?$a$NAm9g%i%$%V%i%j$G$9!#%a!<%k$H%a!<%k(B -$B%\%C%/%9$N%O%s%I%j%s%0$r1#JC$7$^$9!#=i4|$NL\E*$,%a!<%i$N:n@.$@$C$?(B -$B$?$a!"pJs$rF@$k!W!V?7$7$$%a!<%k$r:n@.$9$k!W(B -$B$NFs - -

$B%a!<%k$+$i>pJs$rF@$k(B

- -

-$B$3$l$O0lHV:G=i$KTMail $B$,:G$bF@0U$H$9$k=hM}$G$b(B -$B$"$j$^$9!#(B -

- -

TMail::Mail $B%/%i%9(B

- -

-TMail::Mail $B%/%i%9$O%a!<%k0lDL$r1#JC$9$k%*%V%8%'%/%H$G$9!#$^$:$I$&$K$+(B -$B$7$F$3$N%*%V%8%'%/%H$r:n$i$J$$$H$$$1$^$;$s!#$3$N%*%V%8%'%/%H$r:n$kJ}K!$O(B -$B;0DL$j$"$j$^$9!#(B -

- -
    -
  1. $BJ8;zNs$+$i$D$/$k(B
  2. -
  3. $B%U%!%$%k(B($BL>(B)$B$+$i$D$/$k(B
  4. -
  5. Port $B$+$i$D$/$k(B
  6. -
- -

-$BJ8;zNs!"%U%!%$%k$O$=$l$>$l%a!<%k0lDLJ,$@$1$r4^$s$G$$$J$1$l$P$$$1$^$;$s!#(B -$B$=$N$&$($G0J2<$N$h$&$K:n@.$7$^$9!#(B -

-
-require 'tmail'
-mail = TMail::Mail.parse(string)    # from String
-mail = TMail::Mail.load(filename)   # from file
-
-

-$B$3$3$K$OFC$KLdBj$O$J$$$H;W$$$^$9!#(B -

- -

Port $B$H(B Loader

- -

-Port $B$H$$$&$N$O(B TMail $B$K$*$1$k%a!<%k%=!<%9$NCj>]I=8=$G$9!#$?$H$($P(B -$B>e=R$7$?J8;zNs$d%U%!%$%kL>$b%a!<%k%=!<%9$G!"(BTMail::Mail#parse $B$d(B load $B$O(B -$BJ8;zNs$d%U%!%$%k$r0lEY(B Port $B$G%i%C%W$7$?$&$($G(B Mail $B%*%V%8%'%/%H$r:n@.(B -$B$7$F$$$^$9!#$3$N(B Port $B$G%i%C%W$9$k$3$H$GJ8;zNs!"%U%!%$%k(B -($B>-MhE*$K$O(B IMAP $B%W%m%H%3%k$b!)(B) $B$N0c$$$r1#JC$7$F$$$^$9!#(B -

- -

-$B$?$@$7!"(BPort $B$r%f!<%6$,D>@\:n$k$3$H$O$"$^$j$J$$$G$7$g$&!#Port $B$r$5$o$k$3$H$K$J$k$N$O!"%a!<%k%\%C%/%9$N%i%C%Q!<$G$"$k(B Loader $B$r(B -$B;H$&$H$-$G$9!#$?$H$($P(B MH $B%a!<%k%\%C%/%9$NCf$K$"$k%a!<%k$r=gHV$K=hM}$9$k(B -$B$?$a$K$O0J2<$N$h$&$K$7$^$9!#(B -

-
-require 'tmail'
-
-loader = TMail::MhLoader.new( '/home/aamine/Mail/inbox' )
-loader.each_port do |port|
-  mail = TMail::Mail.new(port)
-  # ....
-end
-
- -

TMail::Mail $B%*%V%8%'%/%H$+$i>pJs$rF@$k(B

- -

-$B0J>e$N$h$&$JTMail::Mail $B%*%V%8%'%/%H$r:n$C$?$i!"$"$H$O$=$N%a%=%C%I$r(B -$B8F$V$@$1$G$?$$$F$$$N$3$H$O$G$-$^$9!#$?$H$($P(B To: $B%"%I%l%9$r -

-require 'tmail'
-mail = TMail::Mail.parse( 'To: Minero Aoki <aamine@loveruby.net>' )
-p mail.to   # => ["aamine@loveruby.net"]
-
-

-Subject: $B$J$i$P(B -

-
-p mail.subject
-
-

-$B%a!<%kK\BN$J$i$P(B -$B$H$$$&$h$&$K!"$H$F$b4JC1$G$9!#(B -

- -

-$B>\$7$/$O(B TMail::Mail $B%/%i%9$N%j%U%!%l%s%9$r!"(B -$B$h$jsample/from-check.rb $B$r8+$F$/$@$5$$!#(B -

- -

MIME $B%^%k%A%Q!<%H%a!<%k(B

- -

-MIME $B%^%k%A%Q!<%H%a!<%k$K$bBP1~$7$F$$$^$9!#%^%k%A%Q!<%H$N$H$-$O(B -Mail#multipart? $B$,??$K$J$j!"(B#parts $B$K(B TMail::Mail $B%*%V%8%'%/%H$N(B -$BG[Ns$,F~$j$^$9!#(B -

-
-require 'tmail'
-mail = TMail::Mail.parse( multipart_mail_string )
-if mail.multipart? then
-  mail.parts.each do |m|
-    puts m.main_type
-  end
-end
-
-

-$B$h$j6qBNE*$JNc$H$7$F$O(B sample/multipart.rb $B$r8+$F$/$@$5$$!#(B -

- -

TMail $B$,$d$i$J$$$3$H(B

- -

-TMail $B$O!"%X%C%@$O<+F0$G%G%3!<%I!&%(%s%3!<%I$7$^$9$,!"K\BN(B($BK\J8(B)$B$O(B -$B0l@ZJQ99$7$^$;$s!#$?$@$76a$$>-Mh$K$O(B Base64 $B$N%G%3!<%I$O<+F0$G$d$k(B -$B$+$b$7$l$^$;$s!#(B -

- - -

$B?7$7$$%a!<%k$r:n@.$9$k(B

- -

-$B$3$A$i$b(B TMail::Mail $B%/%i%9$,l9g$O6uJ8;zNs$+$i!"%a!<%k%\%C%/%9$K:n$j$?$$>l9g$O%m!<%@$r7PM3$7$F(B -$B%]!<%H$r:n@.$7$F$=$3$+$i!"%a!<%k%*%V%8%'%/%H$r:n$j$^$9!#(B -

-
-require 'tmail'
-
-# Example 1: create mail on only memory
-mail = TMail::Mail.new
-
-# Example 2: create mail on mailbox (on disk)
-loader = TMail::MhLoader.new('/home/aamine/Mail/drafts')
-mail = TMail::Mail.new( loader.new_port )
-
-

-$B:n$C$?$i!"Cf?H$rF~$l$^$9!#(B -

-
-mail.to = 'test@loveruby.net'
-mail.from = 'Minero Aoki <aamine@loveruby.net>'
-mail.subject = 'test mail'
-mail.date = Time.now
-mail.mime_version = '1.0'
-mail.set_content_type 'text', 'plain', {'charset'=>'iso-2022-jp'}
-mail.body = 'This is test mail.'
-
-

-$B$I$N%X%C%@$r%;%C%H$7$?$i$$$$$+$J$I:Y$+$$ItJ,$b$b$&$A$g$C$H%+%P!<(B -$B$7$?$$$N$G$9$,!"$^$@e5-$N%X%C%@$O(B -$B%;%C%H$7$?$[$&$,$h$$$G$7$g$&!#$^$?JV?.!&E>Aw$N>l9g$O$^$?$=$l$>$l(B -$B5,Ls$,$"$j$^$9!#$3$l$b%+%P!<$7$?$$$N$G$9$,$^$@1.0 $B$K4|BT$7$F$/$@$5$$!#(B -

- -

-$B:G8e$KJ8;zNs2=$7$^$9!#(B -

-
-str = mail.encoded
-
-

-$B:n@.85%]!<%H$K=q$-La$9$J$i!"$+$o$j$K0J2<$N$h$&$K$7$^$9!#(B -

-
-mail.write_back
-
-

-write_back $B$OCf4VJ8;zNs$r2p$9$k$3$H$J$/%U%!%$%k$KD>@\=q$-$3$_$^$9!#(B -

- -

-$B$h$jsample/sendmail.rb $B$r8+$F$/$@$5$$!#(B -

- - - diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/address.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/address.rrd.m deleted file mode 100644 index 99e491a1e..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/address.rrd.m +++ /dev/null @@ -1,229 +0,0 @@ -= Address Classes - -== class TMail::Address - -=== Class Methods - -: parse(str) -> TMail::Address | TMail::AddressGroup - str: String - -j - 文字列 str ã‹ã‚‰ TMail::Address ã¾ãŸã¯ TMail::AddressGroup - オブジェクトを生æˆã—ã¾ã™ã€‚str ãŒãƒ¡ãƒ¼ãƒ«ã‚¢ãƒ‰ãƒ¬ã‚¹ã¨ã¿ãªã›ãªã„ - ã¨ãã¯ä¾‹å¤– TMail::SyntaxError を発生ã—ã¾ã™ã€‚ -e - parses STR and creates new 'TMail::Address' object. - If STR did not follow the internet address format, - 'TMail::SyntaxError' exception is raised. -. - -: new(locals, domains) -> TMail::Address | TMail::AddressGroup - locals: [String] - domains: [String] - -j - æ–°ã—ã„ TMail::Address オブジェクトを生æˆã—ã¾ã™ã€‚localsã€domains ã¯ãれãžã‚Œ - アドレススペック (...@...) ã®ã€ï¼ ã®å·¦å´ã¨å³å´ã‚’ドット㧠split ã—㟠- é…列ã§ã™ã€‚ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯å†…部用ã§ã‚り使ã„ã«ãããªã£ã¦ã„ã¾ã™ã€‚ - Address.parse を使ã£ã¦ãã ã•ã„。 -e - creates new 'TMail::Address' object consist from local part - LOCALS and domain part DOMAINS. -. - -=== Instance Methods - -: address_group? -> true | false -j - 常㫠false -e - returns false. -. - -: spec -> String -j - アドレススペック文字列 ("....@....")。 -e - an address spec ("....@...."). -. - -: routes -> [String] -j - é…é€çµŒè·¯ã‚’è¡¨ã™æ–‡å­—列ã®é…列。'@' ã¯å«ã¾ãªã„。 -e - delivery routes. Strings do not include character "@". -. - -: name -> String -: phrase -> String -j - ä¿—ã«è¨€ã†ã‚¢ãƒ‰ãƒ¬ã‚¹ã®ã€Œæœ¬åã€éƒ¨åˆ†ã€‚デコードã•れã¦ã„ã¾ã™ã€‚ -e - short description for this address (e.g. real name). -. - -: encoded(eol = "\r\n", encoding = 'j') -> String - eol: String - encoding: String - -j - B エンコードã•れ㟠RFC2822 å½¢å¼ã®æ–‡å­—列表ç¾ã‚’è¿”ã—ã¾ã™ã€‚ - 行末コード㫠eolã€æ–‡å­—エンコーディング㫠encoding を使ã„ã¾ã™ã€‚ - ãŸã ã— encoding 㯠j ã—ã‹å®Ÿè£…ã•れã¦ã„ã¾ã›ã‚“。 -e - converts this object into MIME-encoded string. -. - -: to_s(eol = "\n", encoding = 'e') -> String -: decoded(eol = "\n", encoding = 'e') -> String - eol: String - encoding: String - -j - デコードã•れ㟠RFC2822 å½¢å¼ã®æ–‡å­—列表ç¾ã‚’è¿”ã—ã¾ã™ã€‚ - 行末コード㫠eolã€æ–‡å­—エンコーディング㫠encoding を使ã„ã¾ã™ã€‚ -e - converts this object into decoded string. -. - -: ==(other) -> true | false - other: Object - -j - spec ã®åŒå€¤åˆ¤å®šã«ã‚ˆã£ã¦ self 㨠other ãŒç­‰ã—ã„ã‹åˆ¤å®šã—ã¾ã™ã€‚ - name ã‚„ routes ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 -e - judge if self equals to other by inspecting addr-spec string (#spec). - #name and #routes never affects the return value. -. - - -== class TMail::AddressGroup - -=== Class Methods - -: new(name, addrs) -> TMail::AddressGroup - name: String - addrs: [TMail::Address | TMail::AddressGroup] - -j - æ–°ã—ã„ TMail::AddressGroup オブジェクトを作æˆã—ã¾ã™ã€‚ - name ã¯ã‚°ãƒ«ãƒ¼ãƒ—åã‚’ç¤ºã™æ–‡å­—列ã€addrs 㯠TMail::Address ã¾ãŸã¯ - TMail::AddressGroup ã®é…列ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - creates new 'TMail::AddressGroup' object. - NAME is the name of this group, ADDRS is addresses - which belongs to this group. -. - -=== Instance Methods - -: address_group? -> true | false -j - 常㫠true -e - returns true. -. - -: name -> String -j - グループå。 -e - the human readable name of this group. -. - -: addresses -> [TMail::Address | TMail::AddressGroup] -j - TMail::Address ã¾ãŸã¯ TMail::AddressGroup オブジェクトã®é…列。 -e - addresses which belongs to this group. -. - -: to_a -> [TMail::Address | TMail::AddressGroup] -: to_ary -> [TMail::Address | TMail::AddressGroup] -j - addresses.dup ã¨åŒã˜ã§ã™ã€‚ -e - equals to 'addresses.dup'. -. - -: flatten -> [TMail::Address] -j - å†å¸°çš„ã« TMail::AddressGroup オブジェクトを平å¦åŒ–ã—〠- TMail::Address オブジェクトã®é…列を得ã¾ã™ã€‚ -e - flatten this group into one level of array of 'TMail::Address'. -. - -: add(addr) -: push(addr) - addr: TMail::Address | TMail::AddressGroup - -j - TMail::Address ã¾ãŸã¯ TMail::AddressGroup オブジェクトを - ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã«è¿½åŠ ã—ã¾ã™ã€‚ -e - adds an address or an address group to this group. -. - -: delete(addr) - addr: TMail::Address | TMail::AddressGroup - -j - TMail::Address ã¾ãŸã¯ TMail::AddressGroup オブジェクトを - ã“ã®ã‚°ãƒ«ãƒ¼ãƒ—ã‹ã‚‰å‰Šé™¤ã—ã€éž nil ã‚’è¿”ã—ã¾ã™ã€‚ã‚‚ã¨ã‚‚ã¨ã“ã® - アドレスãŒã‚°ãƒ«ãƒ¼ãƒ—内ã«å­˜åœ¨ã—ãªã„å ´åˆã¯ç„¡è¦–ã—㦠nil ã‚’è¿”ã—ã¾ã™ã€‚ -e - removes ADDR from this group. -. - -: each {|a| .... } - a: TMail::Address | TMail::AddressGroup - -j - #addresses ã«å¯¾ã™ã‚‹ç¹°ã‚Šè¿”ã—。 -e - equals to 'addresses.each {|a| .... }'. -. - -: each_address {|a| .... } - a: TMail::Address - -j - #addresses ã«å¯¾ã™ã‚‹ç¹°ã‚Šè¿”ã—。ãŸã ã— TMail::AddressGroup オブジェクト㫠- 対ã—ã¦ã¯å†…部ã«å…¥ã£ã¦å†å¸°çš„ã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - equals to 'flatten.each {|a| .... }' -. - -: encoded(eol = "\r\n", encoding = 'j') -> String - eol: String - encoding: String - -j - ,B エンコードã•れ㟠,RFC2822 å½¢å¼ã®æ–‡å­—列表ç¾ã‚’è¿”ã—ã¾ã™ã€‚ -e - converts this object into MIME-encoded string. -. - -: decoded(eol = "\n", encoding = 'e') -> String - eol: String - encoding: String - -j - デコードã•れ㟠RFC2822 å½¢å¼ã®æ–‡å­—列表ç¾ã‚’è¿”ã—ã¾ã™ã€‚ -e - converts this object into decoded string. -. - -: ==(other) -> true | false -: eql?(other) -> true | false - other: Object - -j - #addresses ã®åŒå€¤åˆ¤å®šã«ã‚ˆã£ã¦åŒã˜å†…容ã‹ã©ã†ã‹ã‚’判断ã—ã¾ã™ã€‚ - #name ã¯å½±éŸ¿ã—ã¾ã›ã‚“。 -e - judges if self is equal to OTHER, by comparing 'self.addresses' and - 'other.addresses'. ('self.name' is meanless) -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/basics.rd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/basics.rd.m deleted file mode 100644 index 1298a53e7..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/basics.rd.m +++ /dev/null @@ -1,275 +0,0 @@ -e -= Basics of Internet Mail System - -not ready. -j -= インターãƒãƒƒãƒˆãƒ¡ãƒ¼ãƒ«ã®åŸºç¤Ž - -== メールシステムを構æˆã™ã‚‹è¦ç´  - -=== メール - -ã¾ãšãƒ¡ãƒ¼ãƒ«ãれ自体ã§ã™ã€‚ -メールã¯åŸºæœ¬çš„ã«ã¯ãƒ†ã‚­ã‚¹ãƒˆãƒ•ァイルã§ã‚りã€ãƒ˜ãƒƒãƒ€ (header) 㨠-ボディã«åˆ†ã‹ã‚Œã¦ã„ã¾ã™ã€‚ãƒ˜ãƒƒãƒ€ã®æ›¸å¼ã¯è¦æ ¼ãŒã‚りã‹ãªã‚ŠåŽ³å¯†ã« -決ã‚られã¦ã„ã¾ã™ãŒã€ãƒœãƒ‡ã‚£ã«ã¯ã‚りã¾ã›ã‚“。ãŸã¨ãˆã°ä»¥ä¸‹ãŒç”Ÿã® -メールã®ä¾‹ã§ã™ã€‚ - --- -Return-Path: -Received: from helium.ruby-lang.org (localhost [127.0.0.1]) - by helium.ruby-lang.org (Postfix) with ESMTP - id 4EEF9165; Wed, 12 Dec 2001 07:05:58 +0900 (JST) -Received: from doraemon.edit.ne.jp (doraemon.edit.ne.jp [210.141.234.1]) - by helium.ruby-lang.org (Postfix) with ESMTP id 7AFAB126 - for ; Wed, 12 Dec 2001 07:05:57 +0900 (JST) -Date: Wed, 12 Dec 2001 07:05:58 +0900 -Posted: Wed, 12 Dec 2001 07:14:16 +0900 -From: Minero Aoki -Reply-To: ruby-list@ruby-lang.org -Subject: [ruby-list:32880] Re: RAA update -To: ruby-list@ruby-lang.org (ruby mailing list) -Message-Id: <20011212071416N.aamine@mx.edit.ne.jp> -In-Reply-To: <20011210141226.DTUM11600.femail11.im.home.ne.jp@witch> -References: <20011210141226.DTUM11600.femail11.im.home.ne.jp@witch> -Mime-Version: 1.0 -Content-Type: Text/Plain; charset=iso-2022-jp -Content-Transfer-Encoding: 7bit -Precedence: bulk -Lines: 79 -X-UIDL: b8b1b7f1d28ee02af1df6f8612b5b8c4 - -ã‚ãŠãã§ã™ã€‚ã“ã“ã‹ã‚‰ãƒœãƒ‡ã‚£ã§ã™ã€‚ - : -(以下略) --- - -ヘッダã¨ãƒœãƒ‡ã‚£ã¯ç©ºè¡Œã§åŒºåˆ‡ã‚‰ã‚Œã¾ã™ã€‚ヘッダã§ã¯ã ã„ãŸã„一行㌠-ã²ã¨ã¤ã®ãƒ˜ãƒƒãƒ€ã«ç›¸å½“ã—ã¾ã™ãŒã€ç©ºç™½ã§å§‹ã¾ã‚‹è¡Œã¯ä¸Šã®è¡Œã®ç¶šãã§ã™ã€‚ -ãŸã¨ãˆã°ã“ã®ãƒ¡ãƒ¼ãƒ«ã® Received: ã¯äºŒã¤ã¨ã‚‚ 3 行ã§ã²ã¨ã¤ã®ãƒ˜ãƒƒãƒ€è¡Œã‚’ -æ§‹æˆã—ã¦ã„ã¾ã™ã€‚å„ヘッダã«ã¯æœ€åˆã«ãƒ˜ãƒƒãƒ€åãŒã‚りã€ã‚³ãƒ­ãƒ³(:)ã‚’ -ç½®ã„ã¦ãã®ã‚ã¨ãŒã€Œãƒ˜ãƒƒãƒ€ãƒ•ィールドã€(ヘッダã®å†…容)ã§ã™ã€‚ - -ヘッダã«ã¯ãれãžã‚Œå½¹å‰²ãŒã‚りã¾ã™ã€‚ãŸã¨ãˆã° To: ヘッダã«ã¯ -メールã®å®›å…ˆã‚’書ãã¾ã™ã€‚From: ã«ã¯ãƒ¡ãƒ¼ãƒ«ã®é€ã‚Šå…ƒã‚’書ãã¾ã™ã€‚ -Subject: ã¯ã„ã‚ゆる題åã§ã™ã€‚Date: ã¯ãƒ¡ãƒ¼ãƒ«ã‚’é€ä¿¡ã—ãŸæ—¥æ™‚〠-Received: ãŒé…é€è¨˜éŒ²ãªã©ãªã©ã€‚詳ã—ãã¯ã‚ã¨ã§èª¬æ˜Žã—ã¾ã™ã€‚ - -=== メールã®é€å—ä¿¡ - -ç´°ã‹ã追求ã™ã‚Œã°é€ä¿¡ã«ã‚‚ã„ã‚ã„ã‚ãªæ–¹æ³•ãŒã‚ã‚‹ã®ã§ã™ãŒã€æ™®é€šã« -生ãã¦ã„ãé™ã‚Šé–¢ä¿‚ã—ãªãã¦ã¯ã„ã‘ãªã„ã®ã¯ SMTP (Simple Mail Transfer Protocol) -ã ã‘ã§ã™ã€‚ã“れã¯ã€ã¨ã‚るホストã‹ã‚‰åˆ¥ã®ãƒ›ã‚¹ãƒˆã«ãƒ¡ãƒ¼ãƒ«ã‚’転é€ã™ã‚‹ -ãŸã‚ã®ãƒ—ロトコル (ç´„æŸäº‹ã®é›†åˆ) ã§ã™ã€‚ã¨ã«ã‹ãã“れを使ãˆã° -メールを転é€ã§ãã¾ã™ã€‚SMTP ã§ã¯ãƒ¡ãƒ¼ãƒ«ã®ä¸­èº«ã«ã¯åŸºæœ¬çš„ã«é–¢ä¸Ž -ã—ã¾ã›ã‚“。少ãªãã¨ã‚‚ã€ãƒ¡ãƒ¼ãƒ«ã®ä¸­èº«ã‚’変ãˆã¦ã—ã¾ã†ã‚ˆã†ãªåƒã -ã‹ã‘ã¯è¡Œã„ã¾ã›ã‚“。 - -ã¾ãŸãƒ¡ãƒ¼ãƒ«ã«ã¯æœ¬æ¥ã€Œå—ä¿¡ã€ã¨ã„ã†ã‚‚ã®ã¯ã‚りã¾ã›ã‚“ã§ã—ãŸã€‚ -基本的ã«ãƒ¡ãƒ¼ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã¯å¸¸æ™‚接続ãŒåŸºæœ¬ã§ã€ãƒ¡ãƒ¼ãƒ«ã‚’é€ã£ãŸã‚‰ -å³åº§ã«é€ã‚Šå…ˆã¾ã§ (SMTP ã§) é…é€ã•れるã“ã¨ã«ãªã£ã¦ã„ãŸã‹ã‚‰ã§ã™ã€‚ -ã„ã¾ã§è¨€ãˆã°æºå¸¯ãƒ¡ãƒ¼ãƒ«ã¿ãŸã„ãªã‚‚ã®ã§ã™ã€‚ - -ã¨ã“ã‚ãŒãã®ã†ã¡å¸¸æ™‚接続ã§ãªã„ã¨ã“ã‚ãŒå‡ºã¦ãã¦ã€è§£æ±ºæ–¹æ³•ã‚’ -考ãˆã¯ã˜ã‚ã¾ã—ãŸã€‚ãã“ã§å‡ºã¦ããŸè§£æ±ºæ³•ã®ã²ã¨ã¤ãŒæœ€è¿‘使ã£ã¦ã‚‹ -「å—ä¿¡ã€ãªã‚ã‘ã§ã™ã€‚ã“れã«ã¯æ™®é€šã¯ POP3 (Post Office Protocol version 3) -ã¨ã„ã†ãƒ—ロトコルを使ã„ã¾ã™ã€‚ - -POP3 ã§ã¯ã€é…é€ã•れãŸãƒ¡ãƒ¼ãƒ«ã‚’ POP サーãƒã«ä¿å­˜ã—ã¦ãŠãã€ãれを -(PPP ã§ã¤ãªã„ã ãƒ‘ソコンã¨ã‹ã‹ã‚‰) リクエストã•れãŸã‚‰æ¸¡ã—ã€ãã® -ã‚ã¨æ¶ˆã—ã¾ã™ã€‚ã¤ã¾ã‚Šæœ¬å½“ã¯ã€Œé€ä¿¡å¾…機ã€ã¨ã§ã‚‚言ã†ã»ã†ãŒã‚ˆã‚Šæ­£ç¢º -ã§ã—ょã†ã€‚ - -ä»–ã®è§£æ±ºæ³•ã¨ã—ã¦ã¯ IMAP (Internet Messsage Access Protocol) 㨠-ã„ã†ãƒ—ロトコルãŒä»£è¡¨æ ¼ã§ã™ã€‚POP ã¯ãƒ¡ãƒ¼ãƒ«ã®é€ä¿¡ã‚’介助ã™ã‚‹ã ã‘ã§ã™ãŒã€ -IMAP ã§ã¯æ™®é€šã®ãƒ¡ãƒ¼ãƒ«ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®æ©Ÿèƒ½ã®ä¸€éƒ¨ã¾ã§ãŒã‚µãƒ¼ãƒã«å–り -ã“ã¾ã‚ŒãŸã‚ˆã†ãªæ„Ÿã˜ã«ãªã‚Šã¾ã™ã€‚ãŸã¨ãˆã° IMAP サーãƒä¸Šã§ãƒ¡ãƒ¼ãƒ«ã® -検索をã—ãŸã‚Šã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®åˆ†é¡žãŒã§ããŸã‚Šã—ã¾ã™ã€‚æºå¸¯ãƒ¡ãƒ¼ãƒ« -ãªã‚“ã‹ã¯å®Ÿã¯ IMAP ã«é¡žä¼¼ã®æ§‹é€ ã§ã™ã€‚æºå¸¯ã¯ CPU パワーãŒãªã„ã®ã§ã€ -サーãƒä¸Šã§ãƒ¡ãƒ¼ãƒ«ã‚’加工ã—ã¦æºå¸¯ã«æ¸¡ã—ã¦ã„ã‚‹ã®ã§ã™ã€‚ - -=== メールボックス - -届ã„ãŸãƒ¡ãƒ¼ãƒ«ã‚’最終的ã«ä¿å­˜ã—ã¦ãŠãã¨ã“ã‚ãŒãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã§ã™ã€‚ -ãã£ã¨ã©ã“ã‹ã§èžã„ãŸã“ã¨ãŒã‚ã‚‹ã§ã‚ã‚ㆠINBOX ã¨ã‹ã€Œå—ä¿¡ç®±ã€ã¨ã‹ -「郵便å—ã‘ã€ãŒãれã§ã™ã€‚ - -メールボックスã¯ã€ãƒ¡ãƒ¼ãƒ©æ¬¡ç¬¬ã§ã„ãらã§ã‚‚変ãˆã‚‹ã“ã¨ãŒã§ãã¦ã—ã¾ã† -ã®ã§ç›¸å½“ã«ãŸãã•ん種類ãŒã‚りã¾ã™ã€‚超有åãªã®ã ã‘ã§ã‚‚ UNIX mbox -(ã•らã«ãƒžã‚¤ãƒŠãƒ¼ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒã„ãã¤ã‹ã‚ã‚‹)ã€MHã€Maildir ãªã‚“ã¦ã®ãŒ -ã‚りã¾ã™ã€‚ - -ãªã‚“ã«ã—ã¦ã‚‚メールボックスã¯ãƒ¡ãƒ¼ãƒ«ã‚’ã¨ã£ã¦ãŠã‘れã°ã„ã„ã®ã§ã™ã€‚ -å½¢å¼ã«ã¤ã„ã¦ã¯æ·±ã追求ã—ãªã„ã“ã¨ã«ã—ã¾ã—ょã†ã€‚ - - -== ãƒ¡ãƒ¼ãƒ«ã‚·ã‚¹ãƒ†ãƒ ã®æŠ±ãˆã‚‹å•題 - -メールã¯ç¾åœ¨ã‚ã‚‹ãªã‹ã§ã¯ã»ã¨ã‚“ã©æœ€å¤å‚ã®å¤ã„システムã§ã™ã‹ã‚‰ã€ -特有ã®å•é¡ŒãŒæ­»ã¬ã»ã©ã‚りã¾ã™ã€‚以下ã„ãã¤ã‹æŒ™ã’ã¾ã—ょã†ã€‚ã¾ãš -é€å—ä¿¡ã‹ã‚‰ã€‚ - - * 8 ビットé€éŽã§ãªã„ - * ASCII 文字以外をé€ã‚‹ã¨å±é™º - * メール㮠To: 㨠SMTP ã® To (RCPT TO) ã¯ç„¡é–¢ä¿‚ - * メール㮠From: 㨠SMTP ã® From (MAIL FROM) も無関係 - -メール自体ã«ã¤ã„ã¦ã€‚ - - * ASCII 文字以外を入れるã¨ãƒã‚°ã‚‹ãƒ¡ãƒ¼ãƒ©ãŒ (ã„ã£ã±ã„) ã‚ã‚‹ - * ãƒ˜ãƒƒãƒ€ã®æ›¸å¼ãŒè¶…複雑 - * ã—ã‹ã‚‚国際化ã®éŽç¨‹ã§ã•らã«è¤‡é›‘ã«ãªã£ãŸ - * æŸç¤¾ã®ãƒ¡ãƒ¼ãƒ©ãŒè¦æ ¼ã‚’無視ã—ãŸãƒ¡ãƒ¼ãƒ«ã°ã£ã‹ã‚Šç”Ÿæˆã™ã‚‹ã®ã§ - ã‚‚ã¯ã‚„ã©ã†ã«ã‚‚ãªã‚‰ãªã„ãらã„複雑ã«ãªã£ãŸ - -メールボックスã«ã¤ã„ã¦ã€‚ - - * 種類ãŒã‚りã™ãŽã¦ã©ã‚Œã‚’使ãˆã°ã„ã„ã®ã‹ã‚ã‹ã‚‰ãªã„ - * 種類ãŒã‚りã™ãŽã¦å…¨éƒ¨å¯¾å¿œãªã‚“ã¦ã§ããªã„ - * 種類ãŒã‚りã™ãŽã¦äº’æ›æ€§ã«å•題㌠(よã) 出る - * ã‚„ã£ã±ã‚Š 8 ビットé€éŽã§ãªã„ - -ãã‚“ãªã‚ã‘ã§ã€TMail ãŒæ•°åƒè¡Œã‚ã‚‹ã®ã«ã¯ãれãªã‚Šã®ç†ç”±ãŒ -ã‚ã‚‹ã®ã§ã™ã€‚多少ロードãŒé…ãã¦ã‚‚目をã¤ã¶ã£ã¦ãã ã•ã„。 - - -== ãƒ¡ãƒ¼ãƒ«ã®æŒã¤æƒ…å ± - -ãƒ¡ãƒ¼ãƒ«ãƒ˜ãƒƒãƒ€ã«æ ¼ç´ã•れã¦ã„る情報ã«ã¤ã„ã¦å°‘ã—詳ã—ã解説ã—ã¾ã™ã€‚ -ã‚‚ã£ã¨è©³ã—ã内容や書å¼ã«ã¤ã„ã¦çŸ¥ã‚ŠãŸã„人㯠-RFC2822 -ãªã©ã‚’見るã¨ã‚ˆã„ã§ã—ょã†ã€‚ - -: To: - 宛先。複数アドレスを格ç´ã€‚ -: From: - é€ã‚Šä¸»ã€‚複数アドレスを格ç´ã€‚ - (ãŸã ã—通常ã²ã¨ã¤ã§è¤‡æ•°ã®ã¨ã㯠Sender: ã‚’ã¤ã‘ãªã‘れã°ã„ã‘ãªã„) -: Subject: - ä¸»é¡Œã€‚ãƒ¡ãƒ¼ãƒ«ã«æ›¸ã„ãŸå†…容を一言ã§å‡ç¸®ã—ãŸã‚‚ã®ã€‚ - 「題åã€ã¨ã¯ã¡ã‚‡ã£ã¨é•ã†ã€‚ -: Date: - メールをé€ã£ãŸæ—¥æ™‚。å—ã‘å–ã£ãŸæ™‚é–“ã§ã‚‚書ã„ãŸæ™‚é–“ã§ã‚‚ãªã„。 - -: Message-Id: - 全世界ã«ãŠã„ã¦ãƒ¡ãƒ¼ãƒ«ã¨ä¸€å¯¾ä¸€ã«å¯¾å¿œã™ã‚‹ (ã•ã›ãªã‘れã°ãªã‚‰ãªã„) - 文字列。メールを作æˆã—ãŸãƒ›ã‚¹ãƒˆã® FQDN (æ­£å¼ãƒ›ã‚¹ãƒˆå) ã¨æ™‚刻〠- プロセスï¼ã‚¹ãƒ¬ãƒƒãƒ‰ IDã€ãƒ©ãƒ³ãƒ€ãƒ æ–‡å­—列ãªã©ã‚’使ã£ã¦ä½œã‚‹ã®ã ãŒã€ - PPP 接続ãªãƒ‘ソコンã ã£ãŸã‚Šã™ã‚‹ã¨ FQDN ãŒãªã„ã®ã§å›°ã‚‹ã€‚ãã†ã„ㆠ- ã¨ãã¯ã€å±é™ºãªã®ã‚’承知ã§ãƒ—ロãƒã‚¤ãƒ€ã®ãƒ¡ãƒ¼ãƒ«ã‚µãƒ¼ãƒã® FQDN ã«é©å½“㪠- 文字列をãã£ã¤ã‘ã¦ä½¿ã†ã—ã‹ãªã„ã¨æ€ã†ã€‚ - - ã¡ãªã¿ã« sendmail (一番有å㪠SMTP サーãƒ) ã¯å‹æ‰‹ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID - ã‚’ã¤ã‘ã¦ãれるã®ã§ã€ãれを期待ã™ã‚‹ã®ã‚‚よã„ã‹ã‚‚ã—れãªã„。ãŒã€ - qmail ãªã‚“ã‹ã¯ã¤ã‘ã¦ãれãªã„ã—ã€è¦æ ¼ã«æ­£ç¢ºã«å¾“ã†ãªã‚‰ã°ãƒ¡ãƒ¼ãƒ©ãŒ - 付ã‘ã‚‹ã®ãŒæ­£ã—ã„。 -: In-Reply-To: - ã“ã®ãƒ¡ãƒ¼ãƒ«ã€ãŒè¿”ä¿¡ã—ãŸå¯¾è±¡ã®ãƒ¡ãƒ¼ãƒ«ã€ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID。 - ã“ã®æƒ…報を使ã£ã¦è¿”信関係をツリーã«ã™ã‚‹ã¨ã‚ˆã見る - 「スレッド表示ã€ã«ãªã‚‹ã€‚ -: References: - ã“ã®ãƒ¡ãƒ¼ãƒ«ãŒè¿”ä¿¡ã—ãŸãƒ¡ãƒ¼ãƒ«ã€ãŒè¿”ä¿¡ã—ãŸãƒ¡ãƒ¼ãƒ«ã€ãŒè¿”ä¿¡ã—ãŸãƒ¡ãƒ¼ãƒ«â€¦â€¦ - ã¨å†å¸°çš„ã«ãŸã©ã£ã¦é›†ã‚ãŸãƒ¡ãƒ¼ãƒ«ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID ã®é›†åˆã€‚ - In-Reply-To ã¨åŒã˜ã‚ˆã†ã«ã€ãƒ¡ãƒ¼ãƒ«ã‚¹ãƒ¬ãƒƒãƒ‰ã‚’作るã®ã«ä½¿ãˆã‚‹ã€‚ - - 基本的ã«ã¯é–¢ä¿‚ã‚るメール㮠ID ã¯å…¨éƒ¨å…¥ã‚Œã‚‹ãŒã€ã•ã™ãŒã« - 多ã™ãŽã‚‹ã¨ãã¯å¤ã„ã‚‚ã®ã‹ã‚‰çœç•¥ã—ã¦ã‚ˆã„。ãŸã¨ãˆã° 12 個ã¨ã‹ã€‚ - -: Reply-To: - メールã«è¿”ä¿¡ã™ã‚‹ã¨ãã«ä½¿ã†ã‚¢ãƒ‰ãƒ¬ã‚¹ã€‚ã“ã®ãƒ˜ãƒƒãƒ€ãŒã‚ã‚‹å ´åˆã¯ - 絶対㫠From: ã«ãƒ¡ãƒ¼ãƒ«ã‚’è¿”ã—ã¦ã¯ã„ã‘ãªã„。 -: Received: - é…é€çµŒè·¯æƒ…報。メールシステムã®ãƒ‡ãƒãƒƒã‚°ã‚„ SPAM ã®ç™ºé€å…ƒã® - 特定ã¨ã‹ã«ä½¿ãˆã‚‹ã€‚ã“ã¨ã‚‚ã‚る。簡å˜ã«å½é€ ã§ãã‚‹ã‹ã‚‰ä¿¡ç”¨ - ã—ã™ãŽã¦ã¯ãªã‚‰ãªã„。 - -: X-*: - X- ãŒé ­ã«ã¤ã„ã¦ã„るヘッダã¯è¦æ ¼ã§æ±ºã‚られãŸã®ã§ã¯ãªã„。 - ã¤ã¾ã‚Šè§£é‡ˆã¯è‡ªç”±ã€‚有åãªã¨ã“ã§ã¯ X-Mailer (メーラå)ã¨ã‹ã€‚ - -: Mime-Version: - Content-* ヘッダをã¤ã‘ã‚‹ãªã‚‰å¿…ãšã¤ã‘ãªã‘れã°ã„ã‘ãªã„。 - ã„ã¾ã®ã¨ã“ã‚常㫠"1.0"。 - - MIME ã¨ã¯ Multipurpose Internet Mail Extentions ã®ç•¥ã ãŒ - ã„ã¾ã¯åŒã˜æŠ€è¡“ãŒãƒ¡ãƒ¼ãƒ«ã«é–¢ä¿‚ãªãã„ã‚ã‚“ãªã¨ã“ã‚ã«ä½¿ã‚れã¦ã„る。 -: Content-Type: - メールã®ä¸­èº«ãŒãªã‚“ã§ã‚ã‚‹ã‹ç¤ºã™ã€‚ãªã‚“ã§ã‚ã‚‹ã‹ã€ã¨ã¯ã€ - ãŸã¨ãˆã°ã€Œãƒ—レーンテキストã§ã‚ã‚‹ã€ã¨ã‹ã€ŒJPEG ã§ã‚ã‚‹ã€ã¨ã‹ã€‚ - ä¿—ã«è¨€ã†ã¨ã“ã‚ã®ã€ŒMIME タイプã€ã€‚Content Type ã®ç¨®é¡žã«é–¢ã—ã¦ã¯ - 次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã§è©³è¿°ã€‚ -: Content-Disposition: - メールã®ä½ç½®ä»˜ã‘。ã¨ã„ã†ã¨ã‚ã‘ã‚ã‹ã‚“ãªã„。ã‚りã¦ã„ã« - 言ã†ã¨ã€ãƒžãƒ«ãƒãƒ‘ートメールã®ã¨ãã«ãƒ‘ートãŒä»–ã®ãƒ‘ート㨠- ã©ã†ã„ã†é–¢ä¿‚ã«ã‚ã‚‹ã‹ã‚’示ã™ã‚‚ã®ã€‚ãŸã¨ãˆã° HTML ã¨ãã“ã« - å…¥ã£ã¦ã‚‹çµµã¨ã‹ã€ãã†ã„ã†ã“ã¨ã€‚やりã‹ãŸã¯â€¦â€¦ã‚„ã£ã¦ã»ã—ã - ãªã„ã‹ã‚‰ã€è¨€ã‚ãªã„。ã©ã†ã—ã¦ã‚‚やりãŸã‘れã°è‡ªåˆ†ã§èª¿ã¹ã¦ã€‚ -: Content-Transfer-Encoding - å‰è¿°ã—ãŸã‚ˆã†ã« SMTP 㯠8 ビットé€éŽã§ãªã„ã®ã§ã€8 ビットã‚㌠- ç«‹ã£ã¦ã‚‹ã¨ãã¯ãªã«ã‹ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¦é€ã‚‹ã€‚ãã†ã„ã†ã¨ãã« - ã“ã®ãƒ˜ãƒƒãƒ€ã« Base64 ã¨ã‹æ›¸ã„ãŸã‚Šã™ã‚‹ã€‚ - - -== Content Type - -有å㪠Content Type ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ãªã‚‚ã®ãŒã‚る。 - - * text/plain - * text/html - * image/gif - * image/png - * image/jpeg - * application/octet-stream - * multipart/mixed (次ã®ã‚»ã‚¯ã‚·ãƒ§ãƒ³ã‚’å‚ç…§) - -ã¾ã€ã ã„ãŸã„ã‚ã‹ã‚‹ã§ã—ょ。ã¾ãŸ text ã«ã¯ charset ã¨ã„ㆠ-パラメータãŒã¤ãã‚‚ã®ã§ã€æ–‡å­—コードã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã‚’ -指示ã™ã‚‹ã€‚ã‚‚ã¡ã‚ã‚“ charset ã¨ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯åˆ¥ç‰©ã§ã‚ã‚‹ã®ã ãŒ -ã„ã£ãŸã‚“è¦æ ¼ã§æ±ºã¾ã£ã¦ã—ã¾ã£ãŸä»¥ä¸Šã¯ãã†ç°¡å˜ã«å¤‰ãˆã‚‰ã‚Œãªã„ã®ã ã€‚ -我々ã«é–¢ä¿‚ã‚ã‚‹ charset å€¤ã¯æ¬¡ã®ã‚‚ã‚“ãらã„。 - - * us-ascii - * iso-2022-jp - * iso-2022-jp-2 (iso-2022-jp を韓国語ã¨ã‹ã«ã‚‚対応ã•ã›ã¦æ‹¡å¼µã—ãŸã‚‚ã®) - * euc-jp - * shift_jis - * utf-8 - -æ™®é€šã®æ—¥æœ¬èªžä½¿ã„ãªã‚‰ã° iso-2022-jp (JIS) を使ã£ã¦ãŠã‘ã°ã‚ˆã„。ã¨ã„ã†ã‹ -ãã†ã™ã¹ã。(ã‚‚ã¡ã‚ã‚“ã¡ã‚ƒã‚“㨠NKF.nkf('-j',str) ã§ãƒœãƒ‡ã‚£ã‚’変æ›ã™ã‚‹ã“ã¨) - - -== マルãƒãƒ‘ートメール - -Content-Type: multipart/* ã®ã¨ãã€ãƒ¡ãƒ¼ãƒ«ã¯ãƒžãƒ«ãƒãƒ‘ートメール -ã¨ã„ã†ã®ã«ãªã£ã¦ã„る。一言ã§è¨€ã†ã¨ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒ‡ã‚£ã®ä¸­ã«ã¾ãŸãƒ¡ãƒ¼ãƒ«ãŒ -å…¥ã£ã¦ã„ã‚‹ã®ã§ã‚る。俗ã«è¨€ã†ã€Œæ·»ä»˜ãƒ•ァイルã€ã¯ã“れを使ã£ã¦ -テキストã®ãƒ¡ãƒ¼ãƒ«ã¨ç”»åƒã®ãƒ¡ãƒ¼ãƒ«ã‚’ã²ã¨ã¤ã®ãƒ¡ãƒ¼ãƒ«ã«å«ã‚ã¦ã„ã‚‹ã‚ã‘ã ã€‚ -ã¤ã¾ã‚Šæ·»ä»˜ã¨ã¯è¨€ã£ã¦ã‚‚å½¢å¼ä¸Šã§ã¯ãƒ†ã‚­ã‚¹ãƒˆã¨ç”»åƒã¯ä¸¦åˆ—ã«ä¸¦ã‚“ã§ã„る。 - - -== 比較的マイナー㪠MIME æ‹¡å¼µ - -=== 分割メール - -ã²ã¨ã¤ã®ãƒ¡ãƒ¼ãƒ«ã‚’複数ã®ãƒ¡ãƒ¼ãƒ«ã«åˆ†å‰²ã—ã¦é€ã‚‹ã“ã¨ãŒã§ãる。 -ã“ã®ã¨ã Content-Type: message/partial。作りã‹ãŸã¯ -RFC2046 ã‚’å‚照。 - -メールãŒã§ã‹ããªã‚Šã™ãŽã‚‹ã¨é€”中ã®ãƒ•ァイアウォールã¨ã‹ãŒ -勿‰‹ã«ã“れを使ã£ã¦ã¶ã£ãŸãŽã‚‹ã“ã¨ãŒã‚ã‚‹ã®ã§ã¨ããŸã¾è¦‹ã‹ã‘る。 -ã—ã‹ã—相手ãŒåˆ†å‰²ãƒ¡ãƒ¼ãƒ«ã‚’å†ç”Ÿã§ãã‚‹ã“ã¨ãŒä¿è¨¼ã•れるãªã‚‰ã°ã„ã„ãŒã€ -ãã†ã§ãªã„ãªã‚‰ãã†ã„ã†å‹æ‰‹ãªã“ã¨ã‚’ã—ã¦ã¯ã„ã‘ãªã„。é€ã‚Šå…ƒã« -エラーを返ã™ã¹ãã§ã‚る。 - -=== 外部エンティティ - -ãƒ¡ãƒ¼ãƒ«ã®æœ¬ä½“ã¯åˆ¥ã®ã¨ã“ã‚ã«ç½®ã„ã¦ã‚ã‚‹ã‚‚ã®ã€‚ãŸã¨ãˆã° URL ã‚’ -示ã—ãŸã‚Šã™ã‚‹ã€‚Content-Type: message/external-body。作りã‹ãŸã¯ -RFC2046 ã‚’å‚照。 - -ã©ã“ã§ä½¿ã£ã¦ã‚“ã ã‚ã†ã¨æ€ã£ã¦ã„ãŸãŒã€IETF ã®ã‚¢ãƒŠã‚¦ãƒ³ã‚¹ ML ã§ -使ã£ã¦ã„ãŸã€‚インターãƒãƒƒãƒˆãƒ‰ãƒ©ãƒ•トã¨ã‹ãŒå‡ºã‚‹ã¨ã€ãƒ˜ãƒƒãƒ€ã ã‘㌠-ãƒ¡ãƒ¼ãƒ«ã«æ›¸ã„ã¦ã‚ã£ã¦ external-body ã§æœ¬ä½“を指ã—示ã—ã¦ã„る。 -ãªã‹ãªã‹è³¢ã„。ã¦ã„ã†ã‹ IETF ãŒä½¿ã‚ãªã‹ã£ãŸã‚‰è©æ¬ºã‹ã€‚ -(IETF ã¯ã‚¤ãƒ³ã‚¿ãƒ¼ãƒãƒƒãƒˆã§ä½¿ã†è¦æ ¼ã‚’ã¾ã¨ã‚ã¦ã‚‹å›£ä½“ã§ã™) diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/config.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/config.rrd.m deleted file mode 100644 index 720263f06..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/config.rrd.m +++ /dev/null @@ -1,26 +0,0 @@ -= class TMail::Config - -== Class Methods - -: new(strict) -> TMail::Config - strict: true | false - -j - TMail::Config オブジェクトを生æˆã—ã¾ã™ã€‚strict ãŒçœŸã®å ´åˆã€ - 生æˆã•れ㟠Config オブジェクトã®ã™ã¹ã¦ã® strict_* フラグを - オンã«ã—ã¾ã™ã€‚ -e - create a TMail::Config object. - set true to all strict_* attributes if STRICT is true. -. - -== Instance Methods - -: strict_parse? -j - 真ãªã‚‰ã° TMail ã®ãƒ‘ーサã¯ãƒ˜ãƒƒãƒ€ãƒ‘ース中ã«ç™ºç”Ÿã—㟠- TMail::SyntaxError ã‚’è¿”ã—ã¾ã™ã€‚ -e - If this flag is true, TMail's parsers may raise - TMail::SyntaxError. If not, it never raises SynaxError. -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/details.rd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/details.rd.m deleted file mode 100644 index a90e85d18..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/details.rd.m +++ /dev/null @@ -1,117 +0,0 @@ -e -= Feature Details -j -= 仕様ã®è©³ç´° -. - -e -== Character Encodings - -I DO NOT support non-Japanese character encodings until -ruby implements M17N functions. It's too complex for me. - -j -== æ–‡å­—ã‚³ãƒ¼ãƒ‰ã®æ‰±ã„ã«ã¤ã„㦠- -=== 入力 - -基本的ã«ã¯ã€ãƒ‘ーサã¸ã®å…¥åŠ›ã¯ RFC ã«æ²¿ã£ã¦æ­£ã—ã„エンコード㌠-ãªã•れã¦ã„ã‚‹ã‚‚ã®ã¨æƒ³å®šã—ã¦ã„ã¾ã™ã€‚ã§ã™ãŒç¾å®Ÿã«ã¯ãã†ã§ãªã„ -メールも多ã„ã®ã§ã€ã‚る程度ã®è¦æ ¼å¤–メールã¯è¨±å®¹ã—ã¦ã„ã¾ã™ã€‚ -ãŸã¨ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ˜ãƒƒãƒ€ã¯ TMail ã®ã‚µãƒãƒ¼ãƒˆå¯¾è±¡ã§ã™ã€‚ -(ãŸã ã— $KCODE ãŒé©åˆ‡ã«ã‚»ãƒƒãƒˆã•れã¦ã„ãªã‘れã°ã„ã‘ã¾ã›ã‚“) --- -To: 日本語 -Content-Disposition: attached; filename=日本語.doc --- - -ã¾ãŸ $KCODE=EUC/SJIS ã®å ´åˆã¯ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ˜ãƒƒãƒ€ã‚‚パース -ã—ã¾ã™ã€‚('日本語' ã¯ç”Ÿã® iso-2022-jp) --- -To: 日本語 -To: "日本語" -To: Minero Aoki (日本語) -Content-Disposition: attached; filename=日本語.doc -Content-Disposition: attached; filename="日本語.doc" --- -クオートやコメント内㫠EUC ã‚„ SJISã€UTF8 を生ã§å…¥ã‚Œã¦ã„ã‚‹ -ヘッダã¯ã‚ã¾ã‚Šã«é‚ªæ‚ªã™ãŽã‚‹ã®ã§ã‚µãƒãƒ¼ãƒˆã—ã¾ã›ã‚“。 - -ã„ã‚ゆるåŠè§’文字ãŠã‚ˆã³æ©Ÿç¨®ä¾å­˜æ–‡å­—ã¯ã¨ã‚Šã‚ãˆãšè€ƒæ…®ã—ã¦ã„ã¾ã›ã‚“。 -ãŒã€è¿‘ããªã„å°†æ¥ãªã‚‰ã°å¤šå°‘ã¯ãªã‚“ã¨ã‹ã§ãã‚‹ã‹ã‚‚ã—れã¾ã›ã‚“。 - -日本語以外ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã«ã¯ã€M17N Ruby ãŒå®‰å®šç‰ˆã¨ã—㦠-リリースã•れるã¾ã§ã¯å¯¾å¿œã—ã¾ã›ã‚“。 - -=== デコード出力 - -TMail ã®å¤§éƒ¨åˆ†ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ç‰¹ã«æ–­ã‚ŠãŒãªã„é™ã‚Šãƒ‡ã‚³ãƒ¼ãƒ‰ã—㟠-文字列を返ã—ã¾ã™ã€‚文字列ã®ä¸­ã«æ—¥æœ¬èªžæ–‡å­—列ãŒå­˜åœ¨ã™ã‚‹å ´åˆã¯ã€ -$KCODE ã«å¾“ã„エンコードを変æ›ã—ã¦è¿”ã—ã¾ã™ã€‚ãŸã ã—サãƒãƒ¼ãƒˆ -ã™ã‚‹ã®ã¯ $KCODE=EUC/SJIS ã®å ´åˆã®ã¿ã§ã€ãれ以外 (ã¤ã¾ã‚Š NONE ã‹ UTF8) -ã®ã¨ãã¯ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã¯ä¸€åˆ‡å¤‰æ›ã•れã¾ã›ã‚“。 -Ruby 1.6 以é™ã§ã¯ $KCODE=NONE ãŒãƒ‡ãƒ•ォルトãªã®ã§æ³¨æ„ã—ã¦ãã ã•ã„。 - -=== エンコード出力 - -encoded メソッドを代表ã¨ã—ãŸã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰å‡ºåŠ›ãƒ¡ã‚½ãƒƒãƒ‰ã¯ã™ã¹ã¦ -RFC çš„ã«æ­£ã—ã„エンコードを行ã„ã¾ã™ (ã¨æ€ã„ã¾ã™)。出力å´ã§ -サãƒãƒ¼ãƒˆã™ã‚‹æ–‡å­—エンコーディング㯠iso-2022-jpã€MIME エン -コーディング㯠Base64/B ã®ã¿ã§ã™ã€‚ã“れã¯å°†æ¥ã«æ¸¡ã£ã¦å¤‰ãˆã¾ã›ã‚“。 - - -e -== Header Comments - -TMail discards ALL comments on converting HeaderField objects -into strings, because I cannot preserve position of comments. - -j -== コメント - -ヘッダã«ã¯ã‚³ãƒ¡ãƒ³ãƒˆã‚’å«ã‚られã¾ã™ã€‚ãŸã¨ãˆã°ä»¥ä¸‹ã®ã†ã¡æ‹¬å¼§ã§ -ããられãŸéƒ¨åˆ†ãŒã‚³ãƒ¡ãƒ³ãƒˆã§ã™ã€‚ --- -To: aamine@loveruby.net (This is comment.) --- -TMail ã®ãƒ‘ーサã¯ã‚³ãƒ¡ãƒ³ãƒˆã‚’パースã—ã¦ãƒ˜ãƒƒãƒ€ã‚ªãƒ–ジェクト㮠-comments ã«æ ¼ç´ã—ã¾ã™ãŒã€å†æ–‡å­—列化ã™ã‚‹ã¨ãã¯ã™ã¹ã¦æ¨ã¦ã‚‹ -よã†ã«ãªã£ã¦ã„ã¾ã™ã€‚ãªãœã‹ã¨ã„ã†ã¨ã€ãƒ¡ãƒ¼ãƒ«ãƒ˜ãƒƒãƒ€ã®ã‚³ãƒ¡ãƒ³ãƒˆã¯ -本当ã«ã©ã“ã«ã§ã‚‚ç½®ã‘るよã†ã«ãªã£ã¦ã„ã‚‹ã®ã§ã€ãƒ‘ースã—ãŸå¾Œã‹ã‚‰ -ã§ã¯ã‚³ãƒ¡ãƒ³ãƒˆãŒã©ã®å ´æ‰€ã«ã‚ã£ãŸã®ã‹åˆ¤æ–­ã§ããªã„ã‹ã‚‰ã§ã™ã€‚ -ãŸã¨ãˆã°ä»¥ä¸‹ã®ã‚ˆã†ãªãƒ˜ãƒƒãƒ€ã¯ã‚ˆã見ã‹ã‘ã¾ã™ã€‚ --- -Received: from mail.loveruby.net (mail.loveruby.net [192.168.1.1]) - by doraemon.edit.ne.jp (8.12.1/8.12.0) with ESMTP id g0CGj4bo035 - for ; Sun, 13 Jan 2002 01:45:05 +0900 (JST) --- -ã“ã†ã„ã†å ´åˆã€å„コメントをã©ã®è¦ç´ ã«æ‰€å±žã•ã›ã‚‹ã‹ã¯äººé–“ã§ -ãªã‘れã°åˆ¤æ–­ã§ãã¾ã›ã‚“。ã‚る程度ヒューリスティックã«ã‚„ã‚‹ã“ã¨ã¯ -å¯èƒ½ã§ã™ãŒã€ã„ã£ãŸã‚“外れãŸã‚‰å®Œç’§ã«å¤±æ•—ã—ã¦ã—ã¾ã†ã§ã—ょã†ã€‚ -å…ƒã®ãƒ˜ãƒƒãƒ€ã‚’å†ç”Ÿã§ãるよã†ã«è¦‹ã›ã‹ã‘ã¦ãŠã„ã¦æ™‚々失敗ã™ã‚‹ã¨ -ã„ã†ã®ã¯ã‚ã¾ã‚Šã«æœ‰å®³ã§ã™ã‹ã‚‰ã€ãã‚Œã‚ˆã‚Šã¯æ½”ã全部æ¨ã¦ã‚‹ã€ -ã¨ã„ã†ã®ãŒã„ã¾ã®ã¨ã“ã‚ã®çµè«–ã§ã™ã€‚ã©ã†ã›ã‚³ãƒ¡ãƒ³ãƒˆã¯ã‚³ãƒ¡ãƒ³ãƒˆã§ -ã‚ã£ã¦æœ¬è³ªã«ã¯é–¢ä¿‚ãªã„ã®ã§ã™ã‹ã‚‰ã€ã‚‚ã†ã‚³ãƒ¡ãƒ³ãƒˆã«é ¼ã‚‹ã®ã¯ -ã‚„ã‚ã¾ã—ょã†ã€‚ - -特ã«ã€ã‚¢ãƒ‰ãƒ¬ã‚¹ãƒ•ィールドã«ãŠã„ã¦æœ¬åをコメントã«å…¥ã‚ŒãŸã‚Šã™ã‚‹ -ã®ã¯æœ€ä½Žã§ã™ã€‚ã¡ã‚ƒã‚“ã¨æ–‡æ³•çš„ã«åå‰ã‚’æ ¼ç´ã™ã‚‹å ´æ‰€ãŒã‚ã‚‹ã®ã«ã€ -ã‚ã–ã‚ã–コメントを使ã†ç†ç”±ã¯å…¨ãã‚りã¾ã›ã‚“。ãã†ã„ã†ãƒ˜ãƒƒãƒ€ -設定をã—ã¦ã„る人ã¯ã™ãã«ãƒ¡ãƒ¼ãƒ©ã‹è¨­å®šã‹ã©ã¡ã‚‰ã‹ã‚’変ãˆã¾ã—ょã†ã€‚ - -ã‚‚ã£ã¨ã‚‚ã€å¤§æŠµã®å ´åˆã«ã¯ã“れã§å•題ãªã„ã®ã§ã™ãŒã€ãƒ¡ãƒ¼ãƒ«ã®å†…容を -フィルタリングã™ã‚‹ã‚ˆã†ãªå ´åˆã¯è‡´å‘½å‚·ã«ãªã‚Šãˆã¾ã™ã€‚ãŸã¨ãˆã° ML -ドライãƒã§ã¯ Subject を加工ã—ãŸã‚Šã—ãŸã„ã§ã—ょã†ã‹ã‚‰ã€æ¬¡ã®ã‚ˆã†ãª -コードを書ããŸããªã‚Šã¾ã™ã€‚ --- -mail = TMail::Mail.load(filename) -mail.subject = "[my-list:#{number}] " + mail.subject -mail.write_back --- -ã—ã‹ã—ã“れã§ã¯ã‚³ãƒ¡ãƒ³ãƒˆãŒå¤±ã‚れã¦ã—ã¾ã„ã¾ã™ã€‚消ãˆã¦ã‚‚ã„ã„ -コメントもã‚りã¾ã™ãŒã€Received: ã®ã‚³ãƒ¡ãƒ³ãƒˆãªã©ã¯éžå¸¸ã« -é‡è¦ã§ã™ã€‚ - -ã“れをé¿ã‘ã‚‹ã«ã¯ã€ã²ã¨ã¤ã® TMail::Mail オブジェクトã¯å¸¸ã« -情報å–å¾—ã‹å‡ºåŠ›ã®ã©ã¡ã‚‰ã‹ã ã‘ã«é™å®šã—ã¦ä½¿ã†ã“ã¨ã§ã™ã€‚å°†æ¥ã¯ -ã‚‚ã†å°‘ã—ã„ã„æ–¹æ³•を考ãˆã¾ã™ã€‚ diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/index.rhtml.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/index.rhtml.m deleted file mode 100644 index 8c597866f..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/index.rhtml.m +++ /dev/null @@ -1,54 +0,0 @@ -j -

TMail ユーザーマニュアル

-e -

TMail User Manual

-. - -

-j -ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 0.10 対応 -e -for version 0.10 -. -

- - diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/mail.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/mail.rrd.m deleted file mode 100644 index 00594f7e4..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/mail.rrd.m +++ /dev/null @@ -1,701 +0,0 @@ -@nocode MH -= class TMail::Mail - -== Class Methods - -: new(port = TMail::StringPort.new, config = DEFAULT_CONFIG) -> TMail::Mail - port: TMail::Port - config: TMail::Config - -j - port ã‹ã‚‰ Mail オブジェクトを作æˆã—ã¾ã™ã€‚ -e - creates a new 'TMail::Mail' object from PORT. -. - -: load(filename) -> TMail::Mail - filename: String - -j - ファイル filename ã‹ã‚‰ãƒ¡ãƒ¼ãƒ«ã‚’ロードã—㦠Mail オブジェクトを作æˆã—ã¾ã™ã€‚ - ロードã™ã‚‹ãƒ•ァイル㯠MH ã®ãƒ¡ãƒ¼ãƒ«ã®ã‚ˆã†ã«ãƒ¡ãƒ¼ãƒ«ä¸€é€šãŒãƒ•ァイルã²ã¨ã¤ã« - 対応ã—ã¦ã„ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 - - ,UNIX mbox ã®ã‚ˆã†ãªå½¢å¼ã¯å˜ç‹¬ã§ã¯å¯¾å¿œã—ã¦ã„ã¾ã›ã‚“。 - メールボックスクラスを使ã£ã¦ãã ã•ã„。 -e - creates a new 'TMail::Mail' object. FILENAME is the name of file - which contains just one mail (e.g. MH mail file). -. - -: parse(str) -> TMail::Mail - str: String - -j - 文字列 str をパースã—㦠TMail::Mail オブジェクトを作æˆã—ã¾ã™ã€‚ - str ã¯ãƒ¡ãƒ¼ãƒ«ä¸€é€šåˆ†ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - parses STR and creates a new 'TMail::Mail' object. -. - -== Instance Methods - -: port -> TMail::Port -j - ã“ã®ãƒ¡ãƒ¼ãƒ«ã‚ªãƒ–ジェクトã®ç”Ÿæˆå…ƒã®ãƒãƒ¼ãƒˆã§ã™ã€‚ -e - the source port of this mail. -. - -: body_port -> TMail::Port -j - メール本文をä¿å­˜ã—ã¦ã„ã‚‹ãƒãƒ¼ãƒˆã‚’è¿”ã—ã¾ã™ã€‚ - - ãŸã ã—ã“ã“ã«æ›¸ãã“ã‚“ã§ã‚‚ロード元ã®ãƒ•ァイル(や文字列)ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 - 実際ã«å¤‰æ›´ã™ã‚‹ãŸã‚ã«ã¯ã“ã®ãƒãƒ¼ãƒˆã«æ›¸ãã“ã‚“ã å¾Œ #write_back を呼㶠- å¿…è¦ãŒã‚りã¾ã™ã€‚ -e - the port to save body of this mail. -. - -: each {|line| .... } - line: String - -j - 本文文字列ã®å„行ã«å¯¾ã™ã‚‹ç¹°ã‚Šè¿”ã—。 - body_port.ropen {|f| f.each } ã¨åŒã˜ã§ã™ã€‚ -e - iterates for each lines of mail body. -. - -: body -> String -: preamble -> String -j - メールボディ(本文)å…¨ã¦ã‚’文字列ã¨ã—ã¦è¿”ã—ã¾ã™ã€‚ - MIME マルãƒãƒ‘ートメールã®ã¨ã㯠preamble ã«ç›¸å½“ã—ã¾ã™ã€‚ - ã“ã®è¿”り値を変更ã—ã¦ã‚‚オリジナルã¯å¤‰æ›´ã•れã¾ã›ã‚“。 -e - the mail body. If the mail is a MIME multipart mail, - this attribute represents "preamble". -. - -: parts -> [TMail::Mail] -j - メール㌠MIME マルãƒãƒ‘ãƒ¼ãƒˆãƒ¡ãƒ¼ãƒ«ã®æ™‚ã€å„パート㌠TMail::Mail ã®é…列ã¨ã—㦠- æ ¼ç´ã•れã¦ã„ã¾ã™ã€‚マルãƒãƒ‘ートメールã§ãªã„ã¨ãã¯ç©ºã®é…列ã§ã™ã€‚ - - ãŸã ã—ã“ã“ã«æ›¸ãã“ã‚“ã§ã‚‚ロード元ã®ãƒ•ァイル(や文字列)ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 - 実際ã«å¤‰æ›´ã™ã‚‹ãŸã‚ã«ã¯ã“ã®ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã«æ›¸ãã“ã‚“ã ã‚㨠#write_back ã‚’ - 呼ã¶å¿…è¦ãŒã‚りã¾ã™ã€‚ -e - parts of this mail. (valid only if this mail is a MIME multipart mail) -. - -: epilogue -> String -j - MIME マルãƒãƒ‘ートメールã§ã® epilogue ã«ç›¸å½“ã™ã‚‹æ–‡å­—列ã§ã™ã€‚ - 通常ã®ãƒ¡ãƒ¼ãƒ«ã®ã¨ãã¯ç©ºæ–‡å­—列ãŒå…¥ã£ã¦ã„ã¾ã™ã€‚ - - ãŸã ã—ã“ã“ã«æ›¸ãã“ã‚“ã§ã‚‚ロード元ã®ãƒ•ァイル(や文字列)ã¯å¤‰æ›´ã•れã¾ã›ã‚“。 - 実際ã«å¤‰æ›´ã™ã‚‹ãŸã‚ã«ã¯æ›¸ãã“ã‚“ã å¾Œ #write_back を呼ã¶å¿…è¦ãŒã‚りã¾ã™ã€‚ -e - If the mail was MIME multipart mail, this represent "epilogue" string. - Else, empty string. -. - -: multipart? -j - メール㌠MIME マルãƒãƒ‘ートã®ã¨ã真。 - ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã¯ Content-Type ヘッダã®å†…容ã§çœŸå½ã‚’判断ã—ã¾ã™ã€‚ -e - true if the message is a multi-part mail. -. - -: encoded(eol = "\n", encoding = 'j') -> String - eol: String - encoding: String - -j - メールを RFC2822 å½¢å¼ã«ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ãŸæ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚ - ãã®éš›ã€ãƒ˜ãƒƒãƒ€ã®è¡Œæœ«ã‚³ãƒ¼ãƒ‰ã‚’ eol ã«ã€ãƒ˜ãƒƒãƒ€å†…ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰å‰ã® - æ—¥æœ¬èªžæ–‡å­—åˆ—ã®æ–‡å­—コードを encoding ã«å¤‰æ›ã—ã¾ã™ã€‚ - ãŸã ã—ç¾åœ¨ encoding 㯠"j" (JIS) ã—ã‹æ­£å¸¸ã«å‹•作ã—ã¾ã›ã‚“。 - - ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 0.9 ã‹ã‚‰ã¯ #to_s 㯠#decoded ã®åˆ¥åã«ãªã£ãŸã®ã§ã€ã“ã® - メソッドã¨ã¯é•ã†ã¯ãŸã‚‰ãã‚’ã—ã¾ã™ã€‚ -e - converts the mail object to a MIME encoded string. -. - -: decoded(eol = "\n", encoding = 'e') -> String -: to_s(eol = "\n", encoding = 'e') -> String - eol: String - encoding: String - -j - メールをデコードã•ã‚ŒãŸæ–‡å­—列ã«å¤‰æ›ã—ã¾ã™ã€‚ãã®éš›ã€ãƒ˜ãƒƒãƒ€ã®è¡Œæœ« - コードを eol ã«ã€ãƒ˜ãƒƒãƒ€å†…ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰å‰ã®æ—¥æœ¬èªžæ–‡å­—åˆ—ã®æ–‡å­—コードを - encoding ã«å¤‰æ›ã—ã¾ã™ã€‚ - - ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 0.9 以é™ã¯ #to_s ã¯ã“ã®ãƒ¡ã‚½ãƒƒãƒ‰ã®åˆ¥åã«ãªã‚Šã¾ã—ãŸã€‚ -e - converts the mail object to a decoded string. -. - -: inspect -> String -j - 以å‰ã¯ #decoded ã®åˆ¥åã§ã—ãŸãŒãƒãƒ¼ã‚¸ãƒ§ãƒ³ 0.9 ã‹ã‚‰ã¯ - "#>" - ã®ã‚ˆã†ãªç°¡æ½”ãªæ–‡å­—列化を行ã„ã¾ã™ã€‚ -e - returns simple string representation like - '"#>"' -. - -: write_back(eol = "\n", encoding = 'e') - eol: String - encoding: String - -j - メール全体を文字列化㗠body_port ã«æ›¸ã戻ã—ã¾ã™ã€‚ãã®éš›ã€ãƒ˜ãƒƒãƒ€ã® - 行末コードを eol ã«ã€ãƒ˜ãƒƒãƒ€å†…ã®æ—¥æœ¬èªžæ–‡å­—åˆ—ã®æ–‡å­—コードを encoding ã« - 変æ›ã—ã¾ã™ã€‚ -e - converts this mail into string and write back to 'body_port', - setting line terminator to EOL. -. - -j -=== 属性アクセスã®ãŸã‚ã®ãƒ¡ã‚½ãƒƒãƒ‰ -e -=== Property Access Method -. - -: date(default = nil) -> Time -: date=(datetime) - datetime: Time - default: Object - -j - Date: ヘッダã«å¯¾å¿œã™ã‚‹ Time オブジェクト。 - 常ã«ãƒ­ãƒ¼ã‚«ãƒ«ã‚¿ã‚¤ãƒ ã«å¤‰æ›ã•れã¾ã™ã€‚ -e - a Time object of Date: header field. -. - -: strftime(format, default = nil) -> String - format: String - default: Object - -j - Date: ヘッダã«è¡¨ç¾ã•ã‚ŒãŸæ™‚刻ã¨å¯¾å¿œã™ã‚‹ Time オブジェクトã«å¯¾ã— - strftime を呼ã³ã¾ã™ã€‚Date: ヘッダãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’ - è¿”ã—ã¾ã™ã€‚ -e - is equals to 'date.strftime(format)'. - If date is not exist, this method does nothing and - returns DEFAULT. -. - -: to(default = nil) -> [String] -: to=(specs) - specs: String | [String] - default: Object - -j - To: アドレス㮠spec ã®é…列。 -e - address specs for To: header field. -. - -: to_addrs(default = nil) -> [TMail::Address | TMail::AddressGroup] -: to_addrs=(addrs) - addrs: TMail::Address | [TMail::Address] - default: Object - -j - To: アドレスã®é…列。 -e - adresses which is represented in To: header field. -. - -: cc(default = nil) -> [String] -: cc=(specs) - specs: String | [String] - default: Object - -j - Cc: アドレス㮠spec ã®é…列。 -e - address specs for Cc: header field. -. - -: cc_addrs(default = nil) -> [TMail::Address] -: cc_addrs=(addrs) - addrs: TMail::Address | [TMail::Address] - default: Object - -j - Cc: アドレスã®é…列。 -e - addresses which is represented in Cc: header field. -. - -: bcc(default = nil) -> [String] -: bcc=(specs) - specs: String | [String] - default: Object - -j - Bcc: アドレス㮠spec ã®é…列。 -e - address specs for Bcc: header field. -. - -: bcc_addrs(default = nil) -> [TMail::Address] -: bcc_addrs=(addrs) - addrs: TMail::Address | [TMail::Address] - default: Object - -j - Bcc: アドレスã®é…列。 -e - adresses which is represented in Bcc: header field. -. - -: from(default = nil) -> [String] -: from=(specs) - specs: String | [String] - default: Object - -j - From: アドレス㮠spec ã®é…列。 -e - address specs for From: header field. -. - -: from_addrs(default = nil) -> [TMail::Address] -: from_addrs=(addrs) - addrs: TMail::Address | [TMail::Address] - default: Object - -j - From: アドレスã®é…列。 -e - adresses which is represented in From: header field. -. - -: friendly_from(default = nil) -> String - default: Object - -j - From: ã®æœ€åˆã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã® phrase ã¾ãŸã¯ spec。 - From: ãŒå­˜åœ¨ã—ãªã„ã¨ã㯠default ã‚’è¿”ã—ã¾ã™ã€‚ -e - a "phrase" part or address spec of the first From: address. -. - -: reply_to(default = nil) -> [String] -: reply_to=(specs) - specs: String | [String] - default: Object - -j - Reply-To: アドレス㮠spec ã®é…列。 -e - address specs of Reply-To: header field. -. - -: reply_to_addrs(default = nil) -> [TMail::Address] -: reply_to_addrs=(addrs) - addrs: TMail::Address | [TMail::Address] - default: Object - -j - Reply-To: アドレスã®é…列。 -e - adresses which is represented in Reply-To: header field. -. - -: sender(default = nil) -> String -: sender=(spec) - spec: String - -j - Sender: アドレス㮠spec -e - address spec for Sender: header field. -. - -: sender_addr(default = nil) -> TMail::Address -: sender_addr=(addr) - addr: TMail::Address - -j - Sender: アドレス -e - an address which is represented in Sender: header field. -. - -: subject(default = nil) -> String -: subject=(sbj) - sbj: String - -j - Subject: ã®å†…容。 - Subject: ãŒå­˜åœ¨ã—ãªã„ã¨ã㯠default ã‚’è¿”ã—ã¾ã™ã€‚ -e - the subject of the message. -. - -: message_id(default = nil) -> String -: message_id=(id) - id: String - -j - メールã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID。 -e - message ID string. -. - -: in_reply_to(default = nil) -> [String] -: in_reply_to=(ids) - ids: String | [String] - -j - In-Reply-To: ã«å«ã¾ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID ã®ãƒªã‚¹ãƒˆã€‚ -e - message IDs of replying mails. -. - -: references(default = nil) -> [String] -: references=(ids) - ids: String | [String] - -j - References: ã«å«ã¾ã‚Œã‚‹ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID ã®ãƒªã‚¹ãƒˆã€‚ - ç¾åœ¨ã¯ References: ã«ã¯ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID 以外㯠- å«ã‚られã¾ã›ã‚“。(RFC2822) -e - message IDs of all referencing (replying) mails. -. - -: mime_version(default = nil) -> String -: mime_version=(ver) - ver: String - -j - MIME ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã€‚ç¾åœ¨ã¯å¸¸ã« "1.0" ã§ã™ã€‚ - ヘッダãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’è¿”ã—ã¾ã™ã€‚ -e - MIME version. - If it does not exist, returns the DEFAULT. -. - -: set_mime_version(major, minor) - major: Integer - minor: Integer - -j - MIME ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã‚’セットã—ã¾ã™ã€‚ -e - set MIME version from integers. -. - -: content_type(default = nil) -> String -j - メール本体ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚¿ã‚¤ãƒ—ã‚’ç¤ºã™æ–‡å­—列。例ãˆã° "text/plain"。 - ヘッダãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’è¿”ã—ã¾ã™ã€‚ -e - the content type of the mail message (e.g. "text/plain"). - If it does not exist, returns the DEFAULT. -. - -: main_type(default = nil) -> String -j - メール本体ã®ãƒ¡ã‚¤ãƒ³ã‚¿ã‚¤ãƒ— (例:"text")。 - 常ã«å°æ–‡å­—ã«çµ±ä¸€ã•れã¾ã™ã€‚ - ヘッダãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’è¿”ã—ã¾ã™ã€‚ -e - the main content type of the mail message. (e.g. "text") - If it does not exist, returns the DEFAULT. -. - -: sub_type(default = nil) -> String -j - メール本体ã®ã‚µãƒ–タイプ (例:"plain")。 - 常ã«å°æ–‡å­—ã«çµ±ä¸€ã•れã¾ã™ã€‚ - ヘッダãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’è¿”ã—ã¾ã™ã€‚ -e - the sub content type of the mail message. (e.g. "plain") - If it does not exist, returns the DEFAULT. -. - -: content_type=(ctype) - ctype: String - -j - Content-Type ã®ãƒ¡ã‚¤ãƒ³ã‚¿ã‚¤ãƒ—・サブタイプを main_sub ã‹ã‚‰ã‚»ãƒƒãƒˆ - ã—ã¾ã™ã€‚main_sub ã¯ä¾‹ãˆã° "text/plain" ã®ã‚ˆã†ãªå½¢å¼ã§ãªã‘れ㰠- ã„ã‘ã¾ã›ã‚“。 -e - set content type to STR. -. - -: set_content_type(main, sub, params = nil) - main: String - sub: String - params: {String => String} - -j - コンテントタイプを main/sub; param; param; ... ã®ã‚ˆã†ã«è¨­å®šã—ã¾ã™ã€‚ -e - set Content-type: header as "main/sub; param=val; param=val; ...". -. - -: type_param(name, default = nil) -> String - name: String - -j - Content-Type ã® name パラメータã®å€¤ã‚’è¿”ã—ã¾ã™ã€‚ - name ã«å¯¾å¿œã™ã‚‹å€¤ã‚„ヘッダãã®ã‚‚ã®ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’ - è¿”ã—ã¾ã™ã€‚ -e - returns the value corresponding to the case-insensitive - NAME of Content-Type parameter. - If it does not exist, returns the DEFAULT. -. - -- - # example - mail['Content-Type'] = 'text/plain; charset=iso-2022-jp' - p mail.type_param('charset') # "iso-2022-jp" - -- - -: multipart? -> true | false -j - Content-Type ㌠MIME マルãƒãƒ‘ートメールã§ã‚ã‚‹ã“ã¨ã‚’ - 示ã™å†…容ãªã‚‰ã°çœŸã€‚ -e - judge if this mail is MIME multi part mail, - by inspecting Content-Type: header field. -. - -: transfer_encoding(default = nil) -> String -: transfer_encoding=(encoding) - encoding: String -j - è»¢é€æ™‚ã«é©ç”¨ã—ãŸã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚° (Content-Transfer-Encoding)。 - '7bit' '8bit' 'Base64' 'Binary' ãªã©ã€‚ -e - Content-Transfer-Encoding. (e.g. "7bit" "Base64") -. - -: disposition(default = nil) -> String -: disposition=(pos) - pos: String - -j - Content-Disposition ã®ä¸»å€¤ (文字列)。返り値ã¯å¸¸ã«å°æ–‡å­—ã«çµ±ä¸€ã•れã¾ã™ã€‚ - name ã«å¯¾å¿œã™ã‚‹å€¤ã‚„ヘッダãã®ã‚‚ã®ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’ - è¿”ã—ã¾ã™ã€‚ -e - Content-Disposition main value (e.g. "attachment"). - If it does not exist, returns the DEFAULT. -. - -- - # example - mail['Content-Disposition'] = 'attachement; filename="test.rb"' - p mail.disposition # "attachment" - -- - -: set_content_disposition(pos, params = nil) - pos: String - params: {String => String} - -j - disposition 文字列ã¨ãƒ‘ラメータã®ãƒãƒƒã‚·ãƒ¥ã‹ã‚‰ Content-Disposition ã‚’ - セットã—ã¾ã™ã€‚ -e - set content disposition. -. - -: disposition_param(key, default = nil) -> String - key: String - -j - Content-Disposition ã®ä»˜åŠ ãƒ‘ãƒ©ãƒ¡ãƒ¼ã‚¿ã® name ã®å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚ - name ã«å¯¾å¿œã™ã‚‹å€¤ã‚„ヘッダãã®ã‚‚ã®ãŒå­˜åœ¨ã—ãªã„å ´åˆã¯ default ã‚’ - è¿”ã—ã¾ã™ã€‚ -e - returns a value corresponding to the Content-Disposition - parameter NAME (e.g. filename). - If it does not exist, returns the DEFAULT. -. - -- - # example - mail.disposition_param('filename') - -- - -: destinations(default = nil) -> [String] -j - Toã€Ccã€Bcc ã™ã¹ã¦ã®ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚¹ãƒšãƒƒã‚¯æ–‡å­—列ã®é…列を - è¿”ã—ã¾ã™ã€‚ã²ã¨ã¤ã‚‚存在ã—ãªã‘れ㰠default ã‚’è¿”ã—ã¾ã™ã€‚ -e - all address specs which are contained in To:, Cc: and - Bcc: header fields. -. - -: reply_addresses(default = nil) -> [TMail::Address] -j - 返信ã™ã¹ãアドレスを判断ã—ã€Address オブジェクト㮠- é…列ã§è¿”ã—ã¾ã™ã€‚返信ã™ã¹ãアドレスãŒã¿ã¤ã‹ã‚‰ãªã‘れ㰠- DEFAULT ã‚’è¿”ã—ã¾ã™ã€‚ -e - addresses to we reply to. -. - -: error_reply_addresses(default = nil) -> [TMail::Address] -j - エラーメールを返é€ã™ã¹ãアドレスを判断ã—ã€Address オブジェクト㮠- é…列ã§è¿”ã—ã¾ã™ã€‚è¿”é€ã™ã¹ãアドレスãŒã¿ã¤ã‹ã‚‰ãªã‘れ㰠default ã‚’è¿”ã—ã¾ã™ã€‚ -e - addresses to use when returning error message. -. - -j -=== ヘッダフィールド直接æ“作用メソッド -e -=== Direct Header Handling Methods -. - -: clear -j - ãƒ˜ãƒƒãƒ€ã‚’å…¨ã¦æ¶ˆåŽ»ã—ã¾ã™ã€‚ -e - clears all header. -. - -: keys -> [TMail::HeaderField] -j - ヘッダåã®é…列を返ã—ã¾ã™ã€‚ -e - returns an array of contained header names. -. - -: [](name) -> TMail::HeaderField - name: String - -j - ヘッダåã‹ã‚‰ãƒ˜ãƒƒãƒ€ã‚ªãƒ–ジェクトを返ã—ã¾ã™ã€‚ -e - returns a header field object corresponding to the case-insensitive - key NAME. e.g. mail["To"] -. - -: []=(name, field) - name: String - field: TMail::HeaderField - -j - name ヘッダ㫠field を設定ã—ã¾ã™ã€‚field ã¯æ–‡å­—列㋠TMail::HeaderField オブジェクトã§ã™ã€‚ - Received ãªã©ä¸€éƒ¨ã®ãƒ˜ãƒƒãƒ€ã«å¯¾ã—ã¦ã¯ã•らã«ãã®é…列も与ãˆã‚‹ã“ã¨ãŒã§ãã¾ã™ã€‚ -e - set NAME header field to FIELD. -. - -: delete(name) - name: String -j - name ヘッダを消ã—ã¾ã™ã€‚ -e - deletes header corresponding to case-insensitive key NAME. -. - -: delete_if {|name, field| .... } - name: String - field: TMail::HeaderField - -j - ヘッダåã¨ãƒ˜ãƒƒãƒ€ã‚’与ãˆã¦ãƒ–ロックを評価ã—ã€çœŸãªã‚‰ãã®é–¢é€£ã¥ã‘を消ã—ã¾ã™ã€‚ -e - evaluates block with a name of header and header field object, - and delete the header if block returns true. -. - -: each_header {|name, field| .... } -: each_pair {|name, field| .... } - name: String - field: TMail::HeaderField - -j - å…¨ã¦ã®ãƒ˜ãƒƒãƒ€åã¨ãƒ˜ãƒƒãƒ€ã‚ªãƒ–ジェクトã«å¯¾ã™ã‚‹ãりã‹ãˆã—。 -e - iterates for each header name and its field object. -. - -: each_header_name {|name| .... } -: each_key {|name| .... } - name: String - -j - å…¨ã¦ã®ãƒ˜ãƒƒãƒ€åã«å¯¾ã™ã‚‹ãりã‹ãˆã—。 -e - iterates for each contained header names. -. - -: each_field {|field| .... } -: each_value {|field| .... } - field: TMail::HeaderField - -j - å…¨ã¦ã®ãƒ˜ãƒƒãƒ€ã‚ªãƒ–ジェクトã«å¯¾ã™ã‚‹ãりã‹ãˆã—。 -e - iterates for each header field objects. - -: orderd_each {|name, field| .... } - name: String - field: TMail::HeaderField - -j - ヘッダã®é †åºæŒ‡å®šä»˜ãã® each_header ã§ã™ã€‚最åˆã«æŒ‡å®šã—ãŸã‚‚ã®ãŒæŒ‡å®šã—㟠- 順番ã§ä¸¦ã³ã€ãã®ä»–ã®ãƒ˜ãƒƒãƒ€ãŒãƒ©ãƒ³ãƒ€ãƒ ã«ç¶šãã¾ã™ã€‚é †åºã¯æ–‡å­—列ã®é…列 - TMail::Mail::FIELD_ORDER ã§è¨­å®šã—ã¦ãã ã•ã„(詳細ã¯ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã‚’å‚ç…§)。 -e - iterates for each header field objects, in canonical order. -. - -: key?(name) - name: String - -j - name ヘッダãŒã‚れã°çœŸã€‚ -e - returns true if the mail has NAME header. -. - -: value?(field) - field: TMail::HeaderField - -j - field ヘッダオブジェクトãŒã‚れã°çœŸã€‚ -e - returns true if the mail has FIELD header field object. -. - -: values_at(*names) -> [TMail::HeaderField] -: indexes(*names) -> [TMail::HeaderField] -: indices(*names) -> [TMail::HeaderField] - names: [String] - -j - å…¨ã¦ã® names ã«ã¤ã„㦠fetch ã—ãŸçµæžœã®é…列を返ã—ã¾ã™ã€‚ -e - equals to 'names.collect {|k| mail[k] }'. -. - -: values -> [TMail::HeaderField] -j - 登録ã•れã¦ã„ã‚‹å…¨ã¦ã®ãƒ˜ãƒƒãƒ€ã‚ªãƒ–ジェクトã®é…列を返ã—ã¾ã™ã€‚ -e - returns an array of all header field object. -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/mailbox.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/mailbox.rrd.m deleted file mode 100644 index 4bd05c091..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/mailbox.rrd.m +++ /dev/null @@ -1,228 +0,0 @@ -= Mailbox Classes - -== class TMail::MhMailbox - -j -MH å½¢å¼ã®ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’隠蔽ã™ã‚‹ã‚¯ãƒ©ã‚¹ã€‚ -e -The class to handle MH mailboxes. -. - -=== Class Methods - -: new(dirname) -> TMail::MhMailbox - dirname: String - -j - MhMailbox オブジェクトを生æˆã—ã¾ã™ã€‚ - dirname 㯠MH メールボックスã¨ã—ã¦ä½¿ã†ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã§ã™ã€‚ - ã™ã§ã«ä½œæˆãšã¿ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - creates new MhMailbox object. - DIRNAME must be valid MH mailbox directory. -. - -=== Instance Methods - -: each_port {|port| .... } -: each {|port| .... } - port: TMail::FilePort - -j - メールボックスã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦å¤ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in assendant order (older mail first). -. - -: reverse_each_port {|port| .... } -: reverse_each {|port| .... } - port: TMail::FilePort - -j - ディレクトリ中ã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦æ–°ã—ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in descendant order (newer mail first). -. - -: last_atime -> Time -: last_atime=(time) - time: Time - -j - 最後㫠each_new_port/each_port/reverse_each_port を呼ã³å‡ºã—ãŸæ™‚間。 -e - The time which last each_new_port/each_port/reverse_each_port is called. -. - -: each_new_port(time = last_atime()) {|port| .... } - time: Time - port: TMail::FilePort - -j - æ–°ç€ãƒ¡ãƒ¼ãƒ«ã®ã¿ã«å¯¾ã—ã¦ãりã‹ãˆã—ã¾ã™ã€‚ - 引数 time ãŒä¸Žãˆã‚‰ã‚ŒãŸã¨ãã¯ãã®æ™‚刻以é™ã«æ›´æ–°ã•れãŸãƒ¡ãƒ¼ãƒ«ã‚’æ–°ç€ã¨ã¿ãªã—ã¾ã™ã€‚ - 与ãˆã‚‰ã‚Œãªã‹ã£ãŸæ™‚ã¯å‰å›žã® each_mail, reverse_each_mail, each_new_port ã®å¾Œã« - æ›´æ–°ã•れãŸãƒ¡ãƒ¼ãƒ«ã‚’æ–°ç€ã¨ã¿ãªã—ã¾ã™ã€‚ -e - iterates for each mails in mailbox, which are newer than TIME. -. - -: new_port -> TMail::FilePort -j - æ–°ã—ã„メールã«å¯¾å¿œã™ã‚‹ãƒ•ァイルを作æˆã—〠- 対応ã™ã‚‹ TMail::Port オブジェクトを返ã™ã€‚ -e - creates a new file in the mailbox and returns its port. -. - -: close -j - ãªã«ã‚‚ã—ã¾ã›ã‚“。 -e - does nothing. -. - -== class TMail::UNIXMbox - -j -UNIX mbox を扱ã†ã‚¯ãƒ©ã‚¹ã€‚ç¾åœ¨ã®å®Ÿè£…ã§ã¯ã€ç”Ÿæˆæ™‚ã« MH å½¢å¼ã«å¤‰æ›ã—〠-明示的㪠close 呼ã³å‡ºã—ã‹ GC ã®ã‚¿ã‚¤ãƒŸãƒ³ã‚°ã§ãƒ•ã‚¡ã‚¤ãƒ«ã«æ›¸ã戻ã—ã¾ã™ã€‚ -e -The class to handle UNIX mbox. -Current implementation creates temporary MH mbox. -. - -=== Class Methods - -: new(filename) -> TMail::UNIXMbox - filename: String - -j - æ–°ã—ã„ TMail::UNIXMbox オブジェクトを生æˆã—ã¾ã™ã€‚ - filename 㯠UNIX mbox ファイルåã§ã™ã€‚ -e - creates new TMail::UNIMbox object. - FILENAME must be valid UNIX mbox file name. -. - -=== Instance Methods - -: each_port {|port| .... } -: each {|port| .... } - port: TMail::FilePort - -j - メールボックスã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦å¤ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in assendant order (older mail first). -. - -: reverse_each_port {|port| ... } -: reverse_each {|port| ... } - port: TMail::FilePort - -j - ディレクトリ中ã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦æ–°ã—ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in descendant order (newer mail first). -. - -: each_new_port(time = @last_loaded_time) {|port| .... } - time: Time - port: TMail::FilePort - -j - æ–°ç€ãƒ¡ãƒ¼ãƒ«ã®ã¿ã«å¯¾ã—ã¦ãりã‹ãˆã—ã¾ã™ã€‚ - 引数 time ãŒä¸Žãˆã‚‰ã‚ŒãŸã¨ãã¯ãã®æ™‚刻以é™ã«æ›´æ–°ã•れãŸãƒ¡ãƒ¼ãƒ«ã‚’æ–°ç€ã¨ã¿ãªã—ã¾ã™ã€‚ - 与ãˆã‚‰ã‚Œãªã‹ã£ãŸæ™‚ã¯å‰å›žã® each_mail, reverse_each_mail, each_new_port ã®å¾Œã« - æ›´æ–°ã•れãŸãƒ¡ãƒ¼ãƒ«ã‚’æ–°ç€ã¨ã¿ãªã—ã¾ã™ã€‚ -e - iterates for each mails in mailbox, which are newer than TIME. - @last_loaded_time is updated when each_new_port/each_port is - called. -. - -: new_port -> TMail::FilePort -j - æ–°ã—ã„メールã«å¯¾å¿œã™ã‚‹ãƒ•ァイルを作æˆã—〠- 対応ã™ã‚‹ TMail::Port オブジェクトを返ã™ã€‚ -e - creates a new file in the mailbox and returns its port. -. - -: close -j - 明示的ã«ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã‚’æ›¸ãæˆ»ã—ã¾ã™ã€‚以後ã€ã“ã®ã‚ªãƒ–ジェクト㫠- 対ã—ã¦ãƒ¡ãƒ¼ãƒ«æ“作メソッドを呼ã³å‡ºã™ã¨å…¨ã¦ä¾‹å¤–ã«ãªã‚Šã¾ã™ã€‚ -e - forces an UNIXMbox to write back mails to real mbox file. - Once this method is called, any method calls causes to raise - IOError exception. -. - -== class TMail::Maildir - -j -qmail ãŒä½¿ç”¨ã™ã‚‹ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ maildir を隠蔽ã™ã‚‹ã‚¯ãƒ©ã‚¹ã€‚ -e -The class to handle "maildir" mailbox. -. - -=== Class Methods - -: new(dirname) -> TMail::Maildir - dirname: String - -j - æ–°ã—ã„ TMail::Maildir オブジェクトを生æˆã—ã¾ã™ã€‚ - dirname 㯠maildir メールボックスã¨ã—ã¦ä½¿ã†ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªåã§ã™ã€‚ - ディレクトリã¯ã™ã§ã«ä½œæˆãšã¿ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - creates new TMail::Maildir object. - DIRNAME must be valid maildir. -. - -=== Instance Methods - -: each_port {|port| .... } -: each {|port| .... } - port: TMail::FilePort - -j - メールボックスã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦å¤ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in assendant order (older mail first). -. - -: reverse_each_port {|port| .... } -: reverse_each {|port| .... } - port: TMail::FilePort - -j - ディレクトリ中ã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦æ–°ã—ã„メールã‹ã‚‰é †ç•ªã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mail in the mailbox, - in descendant order (newer mail first). -. - -: each_new_port {|port| .... } - port: TMail::FilePort - -j - MAILDIR/new ã®ãƒ¡ãƒ¼ãƒ«ã«å¯¾ã—ã¦ã€cur ã«ç§»å‹•ã—ãŸã®ã¡ã«ç¹°ã‚Šè¿”ã—ã¾ã™ã€‚ -e - iterates for each mails in MAILDIR/new. -. - -: new_port -> TMail::FilePort -j - æ–°ã—ã„メールã«å¯¾å¿œã™ã‚‹ãƒ•ァイルを作æˆã—〠- 対応ã™ã‚‹ Port オブジェクトを返ã™ã€‚ -e - creates a new file in the mailbox and returns its port. -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/port.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/port.rrd.m deleted file mode 100644 index 7abae8f37..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/port.rrd.m +++ /dev/null @@ -1,69 +0,0 @@ -= Port Classes - -== class TMail::Port - -j -TMail::Port 㯠TMail ライブラリã§ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚„æ–‡å­—åˆ—ã®æŠ½è±¡è¡¨ç¾ã§ã™ã€‚ -メール一通分ã«ã‚ãŸã‚‹ãƒªã‚½ãƒ¼ã‚¹ã‚’隠蔽ã—ã¾ã™ã€‚ -e -TMail::Port is the abstruction of mail source. -. - -=== Instance Methods - -: ropen -> IO -j - 読ã¿ã“ã¿ç”¨ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ -e - opens stream for read. -. - -: wopen -> IO -j - 書ãã“ã¿ç”¨ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ -e - opens stream for write. -. - -: aopen -> IO -j - 追加書ãã“ã¿ç”¨ã‚¹ãƒˆãƒªãƒ¼ãƒ ã‚’è¿”ã—ã¾ã™ã€‚ -e - opens stream for adding. -. - -== class TMail::FilePort < TMail::Port - -=== Class Methods - -: new(filename) -> TMail::FilePort - filename: String - -j - FilePort オブジェクトを生æˆã—ã¾ã™ã€‚ - filename ã¯ãƒ¡ãƒ¼ãƒ«ä¸€é€šã‚’ãŠã•ã‚ãŸãƒ•ァイルåã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - creates new TMail::FilePort object. -. - -: filename -> String -j - ã“ã®ãƒãƒ¼ãƒˆãŒéš è”½ã—ã¦ã„るファイルåã‚’è¿”ã—ã¾ã™ã€‚ -e - returns file name which this port is wrapping. -. - -== class TMail::StringPort < TMail::Port - -=== Class Methods - -: new(src = '') -> TMail::StringPort - src: String - -j - StringPort オブジェクトを生æˆã—ã¾ã™ã€‚ - string ã¯ãƒ¡ãƒ¼ãƒ«ä¸€é€šåˆ†ã®æ–‡å­—列ã§ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -e - creates new TMail::StringPort object from - mail source string. -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/tmail.rrd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/tmail.rrd.m deleted file mode 100644 index b8dc225fc..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/tmail.rrd.m +++ /dev/null @@ -1,33 +0,0 @@ -= module TMail - -== Module Functions - -: new_boundary -> String -j - æ–°ã—ã„ãƒã‚¦ãƒ³ãƒ€ãƒªã‚’作æˆã—ã¦è¿”ã—ã¾ã™ã€‚ -e - creates new MIME multipart mail boundary. -. - -: new_message_id(fqdn = Socket.gethostname) -> String - fqdn: String - -j - æ–°ã—ã„メッセージ ID を作æˆã—ã¦è¿”ã—ã¾ã™ã€‚ - 引数 fqdn ãŒçœç•¥ã•れãŸå ´åˆã¯ãƒ­ãƒ¼ã‚«ãƒ«ãƒ›ã‚¹ãƒˆã®åå‰ã‚’使ã„ã¾ã™ã€‚ - 一方 fqdn を指定ã™ã‚‹å ´åˆã¯ãƒ€ã‚¤ãƒ¤ãƒ«ã‚¢ãƒƒãƒ—ã§ã‚ã‚‹ãªã©ã®äº‹æƒ…ã«ã‚ˆã‚Š - ホストã®åå‰ã‚’変ãˆã‚‹å¿…è¦ãŒã‚ã‚‹ã®ã ã¨ã¿ãªã—ã€ãれ㫠'.tmail' ã‚’ - ã¤ã‘ãŸãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’使用ã—ã¾ã™ã€‚ã“れã¯ã€Œæœ¬ç‰©ã®ã€ãƒ‰ãƒ¡ã‚¤ãƒ³ã§ä½œæˆã•れる - メッセージ ID ã¨ã®é‡è¤‡ã‚’é¿ã‘ã‚‹ãŸã‚ã§ã™ã€‚ -e - creates new message ID. -. - -: message_id?(str) -> true | false - str: String - -j - str ãŒãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ ID ã‚’å«ã‚€ã¨ã真。 -e - returns true if STR includes message ID string. -. diff --git a/vendor/tmail-1.2.3.1/site/outdated/rdd/usage.rd.m b/vendor/tmail-1.2.3.1/site/outdated/rdd/usage.rd.m deleted file mode 100644 index db9ea8c84..000000000 --- a/vendor/tmail-1.2.3.1/site/outdated/rdd/usage.rd.m +++ /dev/null @@ -1,247 +0,0 @@ -j -= TMail ã®ä½¿ã„æ–¹ -e -= TMail Usage -. - -j -== TMail ã®æ¦‚è¦ -e -== Abstruction -. - -j -TMail ã¯é›»å­ãƒ¡ãƒ¼ãƒ«ã‚’扱ã†ãŸã‚ã®ç·åˆãƒ©ã‚¤ãƒ–ラリã§ã™ã€‚メールã¨ãƒ¡ãƒ¼ãƒ« -ボックスã®ãƒãƒ³ãƒ‰ãƒªãƒ³ã‚°ã‚’隠蔽ã—ã¾ã™ã€‚åˆæœŸã®ç›®çš„ãŒãƒ¡ãƒ¼ãƒ©ã®ä½œæˆã ã£ãŸ -ãŸã‚ã€ä¸»ãªä½¿ã„æ–¹ã¨ã—ã¦ã¯ã€Œãƒ¡ãƒ¼ãƒ«ã‹ã‚‰æƒ…報を得るã€ã€Œæ–°ã—ã„メールを作æˆã™ã‚‹ã€ -ã®äºŒç¨®é¡žãŒæƒ³å®šã•れã¦ãŠã‚Šã€ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆå´ã®å‡¦ç†ã«å¼·ããªã£ã¦ã„ã¾ã™ã€‚ -e -TMail is 90% RFC compatible mail library. By using TMail, You can -get data from internet mail (e-mail) and write data to mail, -without knowning standard details. -. - -j -== メールã‹ã‚‰æƒ…報を得る - -ã“れã¯ä¸€ç•ªæœ€åˆã«å®Ÿè£…ã•れãŸéƒ¨åˆ†ã§ã‚りã€TMail ãŒæœ€ã‚‚å¾—æ„ã¨ã™ã‚‹å‡¦ç†ã§ã‚‚ -ã‚りã¾ã™ã€‚ -e -== Getting information from e-mail -. - -j -=== TMail::Mail クラス -e -=== class TMail::Mail -. - -j -TMail::Mail クラスã¯ãƒ¡ãƒ¼ãƒ«ä¸€é€šã‚’隠蔽ã™ã‚‹ã‚ªãƒ–ジェクトã§ã™ã€‚ã¾ãšã©ã†ã«ã‹ -ã—ã¦ã“ã®ã‚ªãƒ–ジェクトを作らãªã„ã¨ã„ã‘ã¾ã›ã‚“。ã“ã®ã‚ªãƒ–ジェクトを作る方法㯠-三通りã‚りã¾ã™ã€‚ - - (1) 文字列ã‹ã‚‰ã¤ãã‚‹ - (2) ファイル(å)ã‹ã‚‰ã¤ãã‚‹ - (3) Port ã‹ã‚‰ã¤ãã‚‹ - -文字列ã€ãƒ•ァイルã¯ãれãžã‚Œãƒ¡ãƒ¼ãƒ«ä¸€é€šåˆ†ã ã‘ã‚’å«ã‚“ã§ã„ãªã‘れã°ã„ã‘ã¾ã›ã‚“。 -ãã®ã†ãˆã§ä»¥ä¸‹ã®ã‚ˆã†ã«ä½œæˆã—ã¾ã™ã€‚ -e -At first you must create TMail::Mail object. There's three ways -to create Mail object. First one is "creating from string", second -way is "creating from file (name)". Examples are below: -. --- -require 'tmail' -mail = TMail::Mail.parse(string) # from String -mail = TMail::Mail.load(filename) # from file --- -j -ã“ã“ã«ã¯ç‰¹ã«å•題ã¯ãªã„ã¨æ€ã„ã¾ã™ã€‚ -. - -j -=== Port 㨠Loader -e -=== Port and Loader -. - -j -Port ã¨ã„ã†ã®ã¯ TMail ã«ãŠã‘ã‚‹ãƒ¡ãƒ¼ãƒ«ã‚½ãƒ¼ã‚¹ã®æŠ½è±¡è¡¨ç¾ã§ã™ã€‚ãŸã¨ãˆã° -上述ã—ãŸæ–‡å­—列やファイルåもメールソースã§ã€TMail::Mail#parse ã‚„ load 㯠-文字列やファイルを一度 Port ã§ãƒ©ãƒƒãƒ—ã—ãŸã†ãˆã§ Mail ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆã‚’ä½œæˆ -ã—ã¦ã„ã¾ã™ã€‚ã“ã® Port ã§ãƒ©ãƒƒãƒ—ã™ã‚‹ã“ã¨ã§æ–‡å­—列ã€ãƒ•ァイル -(å°†æ¥çš„ã«ã¯ IMAP プロトコルも?) ã®é•ã„を隠蔽ã—ã¦ã„ã¾ã™ã€‚ - -ãŸã ã—ã€Port をユーザãŒç›´æŽ¥ä½œã‚‹ã“ã¨ã¯ã‚ã¾ã‚Šãªã„ã§ã—ょã†ã€‚主ã«ãƒ¦ãƒ¼ã‚¶ãŒ -Port ã‚’ã•ã‚ã‚‹ã“ã¨ã«ãªã‚‹ã®ã¯ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã®ãƒ©ãƒƒãƒ‘ーã§ã‚ã‚‹ Loader ã‚’ -使ã†ã¨ãã§ã™ã€‚ãŸã¨ãˆã° MH メールボックスã®ä¸­ã«ã‚るメールを順番ã«å‡¦ç†ã™ã‚‹ -ãŸã‚ã«ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ -e -The third way to get TMail::Mail object is using the "port". -"port" is the abstruction of mail sources, e.g. strings or file names. -You can get ports by using mail loaders (TMail::*Loader classes). -Here's simple example: -. --- -require 'tmail' - -loader = TMail::MhLoader.new( '/home/aamine/Mail/inbox' ) -loader.each_port do |port| - mail = TMail::Mail.new(port) - # .... -end --- - -j -=== TMail::Mail オブジェクトã‹ã‚‰æƒ…報を得る -e -=== Accessing EMail Attributes via TMail::Mail object -. - -j -以上ã®ã‚ˆã†ãªæ‰‹æ®µã§ TMail::Mail オブジェクトを作ã£ãŸã‚‰ã€ã‚ã¨ã¯ãã®ãƒ¡ã‚½ãƒƒãƒ‰ã‚’ -呼ã¶ã ã‘ã§ãŸã„ã¦ã„ã®ã“ã¨ã¯ã§ãã¾ã™ã€‚ãŸã¨ãˆã° To: アドレスをå–ã‚‹ãªã‚‰ -e -Now you can get any data from e-mail, by calling methods of -TMail::Mail object. For example, to get To: addresses... -. --- -require 'tmail' -mail = TMail::Mail.parse( 'To: Minero Aoki ' ) -p mail.to # => ["aamine@loveruby.net"] --- -j -Subject: ãªã‚‰ã° -e -to get subject, -. --- -p mail.subject --- -j -メール本体ãªã‚‰ã° -e -to get mail body, --- -p mail.body --- -j -ã¨ã„ã†ã‚ˆã†ã«ã€ã¨ã¦ã‚‚ç°¡å˜ã§ã™ã€‚ -. - -j -詳ã—ã㯠TMail::Mail クラスã®ãƒªãƒ•ァレンスを〠-より実用的ãªä¾‹ã¨ã—ã¦ã¯ sample/from-check.rb を見ã¦ãã ã•ã„。 -e -For more TMail::Mail class details, see reference manual. -For more examples, see sample/from-check.rb. -. - -j -=== MIME マルãƒãƒ‘ートメール - -MIME マルãƒãƒ‘ートメールã«ã‚‚対応ã—ã¦ã„ã¾ã™ã€‚マルãƒãƒ‘ートã®ã¨ã㯠-Mail#multipart? ãŒçœŸã«ãªã‚Šã€#parts ã« TMail::Mail オブジェクト㮠-é…列ãŒå…¥ã‚Šã¾ã™ã€‚ -e -=== MIME multipart mail - -TMail also supports MIME multipart mails. -If mail is multipart mail, Mail#multipart? returns true, -and Mail#parts contains an array of parts (TMail::Mail object). -. --- -require 'tmail' -mail = TMail::Mail.parse( multipart_mail_string ) -if mail.multipart? then - mail.parts.each do |m| - puts m.main_type - end -end --- -j -より具体的ãªä¾‹ã¨ã—ã¦ã¯ sample/multipart.rb を見ã¦ãã ã•ã„。 -e -For examples, see sample/multipart.rb. -. - -j -=== TMail ãŒã‚„らãªã„ã“㨠- -TMail ã¯ã€ãƒ˜ãƒƒãƒ€ã¯è‡ªå‹•ã§ãƒ‡ã‚³ãƒ¼ãƒ‰ãƒ»ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‰ã—ã¾ã™ãŒã€æœ¬ä½“(本文)㯠-一切変更ã—ã¾ã›ã‚“。ãŸã ã—è¿‘ã„å°†æ¥ã«ã¯ Base64 ã®ãƒ‡ã‚³ãƒ¼ãƒ‰ã¯è‡ªå‹•ã§ã‚„ã‚‹ -ã‹ã‚‚ã—れã¾ã›ã‚“。 -e -=== What TMail is NOT - -TMail does not touch mail body. Does not decode body, -does not encode body, does not change line terminator. -(I want to support Base64 auto-decoding although.) -. - - -j -== æ–°ã—ã„メールを作æˆã™ã‚‹ - -ã“ã¡ã‚‰ã‚‚ TMail::Mail クラスãŒä¸»ä½“ã§ã™ã€‚ã¨ã«ã‹ãメールを作れã°ã„ã„ -å ´åˆã¯ç©ºæ–‡å­—列ã‹ã‚‰ã€ãƒ¡ãƒ¼ãƒ«ãƒœãƒƒã‚¯ã‚¹ã«ä½œã‚ŠãŸã„å ´åˆã¯ãƒ­ãƒ¼ãƒ€ã‚’経由ã—㦠-ãƒãƒ¼ãƒˆã‚’作æˆã—ã¦ãã“ã‹ã‚‰ã€ãƒ¡ãƒ¼ãƒ«ã‚ªãƒ–ジェクトを作りã¾ã™ã€‚ -e -== Creating New Mail -. --- -require 'tmail' - -# Example 1: create mail on only memory -mail = TMail::Mail.new - -# Example 2: create mail on mailbox (on disk) -loader = TMail::MhLoader.new('/home/aamine/Mail/drafts') -mail = TMail::Mail.new( loader.new_port ) --- -j -作ã£ãŸã‚‰ã€ä¸­èº«ã‚’入れã¾ã™ã€‚ -e -then fill headers and body. -. --- -mail.to = 'test@loveruby.net' -mail.from = 'Minero Aoki ' -mail.subject = 'test mail' -mail.date = Time.now -mail.mime_version = '1.0' -mail.set_content_type 'text', 'plain', {'charset'=>'iso-2022-jp'} -mail.body = 'This is test mail.' --- -j -ã©ã®ãƒ˜ãƒƒãƒ€ã‚’セットã—ãŸã‚‰ã„ã„ã‹ãªã©ç´°ã‹ã„部分ももã†ã¡ã‚‡ã£ã¨ã‚«ãƒãƒ¼ -ã—ãŸã„ã®ã§ã™ãŒã€ã¾ã å®Ÿè£…ã—ã¦ã„ã¾ã›ã‚“。ã¨ã‚Šã‚ãˆãšä¸Šè¨˜ã®ãƒ˜ãƒƒãƒ€ã¯ -セットã—ãŸã»ã†ãŒã‚ˆã„ã§ã—ょã†ã€‚ã¾ãŸè¿”信・転é€ã®å ´åˆã¯ã¾ãŸãれãžã‚Œ -è¦ç´„ãŒã‚りã¾ã™ã€‚ã“れもカãƒãƒ¼ã—ãŸã„ã®ã§ã™ãŒã¾ã å®Ÿè£…ã—ã¦ã„ã¾ã›ã‚“。 -ãƒãƒ¼ã‚¸ãƒ§ãƒ³ 1.0 ã«æœŸå¾…ã—ã¦ãã ã•ã„。 - -æœ€å¾Œã«æ–‡å­—列化ã—ã¾ã™ã€‚ -e -At last, convert mail object to string. -. --- -str = mail.encoded --- -j -作æˆå…ƒãƒãƒ¼ãƒˆã«æ›¸ã戻ã™ãªã‚‰ã€ã‹ã‚りã«ä»¥ä¸‹ã®ã‚ˆã†ã«ã—ã¾ã™ã€‚ -e -If you want to write mails against files directly -(without intermediate string), use Mail#write_back. -. --- -mail.write_back --- -j -write_back ã¯ä¸­é–“文字列を介ã™ã‚‹ã“ã¨ãªãファイルã«ç›´æŽ¥æ›¸ãã“ã¿ã¾ã™ã€‚ - -より実用的ãªä¾‹ã¨ã—ã¦ã¯ sample/sendmail.rb を見ã¦ãã ã•ã„。 -e -For more examples, see sample/sendmail.rb. -. diff --git a/vendor/tmail-1.2.3.1/site/quickstart/index.html b/vendor/tmail-1.2.3.1/site/quickstart/index.html deleted file mode 100644 index b3a446fbf..000000000 --- a/vendor/tmail-1.2.3.1/site/quickstart/index.html +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - TMail — Quick Start Guide - - - - - - - - - - -
- - - -
-

TMail

-

Ruby on Mail

-
- - - -
-
- -
-
- - - -
- - diff --git a/vendor/tmail-1.2.3.1/site/quickstart/quickstart.html b/vendor/tmail-1.2.3.1/site/quickstart/quickstart.html deleted file mode 100644 index e1d1454e9..000000000 --- a/vendor/tmail-1.2.3.1/site/quickstart/quickstart.html +++ /dev/null @@ -1,52 +0,0 @@ -

TMail Quick Start Guide

- -
-

TMail is an E-Mail handling library. It provides you with access to - any email you wrap it around as an object.

- -

Unix like OSes

- -
    -
  1. - Download the - latest release gem from the RubyForge TMail project. -
  2. -
  3. - Run gem install from the directory where you saved the gem: - -
    -  $ gem install tmail
    -
    - -
  4. -
  5. - That's it! -
    -
    - TMail installs into the ruby_lib_path/gems/ folder just like any other - well behaved gem and allows you to require it thusly:
    -
  6. - -
    -  irb(main):001:0> require 'rubygems'
    -  irb(main):002:0> require 'tmail'
    -  irb(main):003:0> email = TMail::Mail.load("my_raw_email.txt")
    -  irb(main):004:0> puts email.to
    -  => mikel@example.com
    -  irb(main):005:0> email.to = 'mikel@somewhere.else.com'
    -  => "mikel@somewhere.else.com"
    -  irb(main):006:0> email.cc = 'mikel@another.place.com'
    -  => mikel@another.place.com
    -  irb(main):007:0> email.destinations
    -  => ["mikel@somewhere.else.com", "mikel@another.place.com"]
    -
    - -
- -

UnUnix like OSes (Windows etc)

- -

Just do the same as the above... just gem install tmail. If TMail can - find a compiler on your system, it will compile the native C extensions, - if it can't find a compiler, it will just install the Ruby version. Easy - hey?

-
\ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/site/quickstart/usage.html b/vendor/tmail-1.2.3.1/site/quickstart/usage.html deleted file mode 100644 index a7d0779a8..000000000 --- a/vendor/tmail-1.2.3.1/site/quickstart/usage.html +++ /dev/null @@ -1,193 +0,0 @@ -

General Usage

- -

Abstraction

- -

-TMail is designed to be an RFC compatible library. The goal of TMail -is to allow you to create emails programatically without having to know -about the RFCs or how they work, or what their standards are. -

- -

Getting information from e-mail

- -

class TMail::Mail

- -

-When you use TMail, you need to create a TMail object. There are -three ways you can do this, the first is by parsing a string supplied -to TMail, the second is by loading the mail object from a file, and -the third is by opening up a port to whatever mail source you want. -
-
-For example: -

- -

Loading from string:

- -
-  require 'tmail'
-
-  mail = TMail::Mail.parse(string)    # from String
-
- -

Loading from a file:

- -
-  require 'tmail'
-
-	mail = TMail::Mail.load(filename)   # from file
-
- -

Using the Port abstraction

- -

-The third way to get TMail::Mail object is using the "port". -"port" is the abstruction of mail sources, e.g. strings or file names. -You can get ports by using mail loaders (TMail::*Loader classes). -
-
-Here's simple example: -

- -
-  require 'tmail'
-
-  loader = TMail::MhLoader.new( '/home/aamine/Mail/inbox' )
-  loader.each_port do |port|
-    mail = TMail::Mail.new(port)
-    # ....
-  end
-
- -

This lets you cycle through your messages in the inbox

- -

Accessing EMail Attributes via TMail::Mail object

- -

-Once you have the Email loaded, you can now access the various parts -of the email, using various methods on the now instantiated TMail::Mail -object. -
-
-For example... -

- -

-To get who the email is to: -

- -
-  require 'tmail'
-
-  mail = TMail::Mail.parse( 'To: Minero Aoki <aamine@loveruby.net>' )
-  p mail.to   # => ["aamine@loveruby.net"]
-
- -

-To get the subject: -

- -
-  p mail.subject
-
- -

-To get the body of the email: -

- -
-  p mail.body
-
- -

-For more information, see the RDoc index and the TMail::Mail class specifically. -

- -

MIME multipart emails

- -

-TMail also supports MIME multipart mails. -
-
-If mail is multipart mail, Mail#multipart? returns true, -and Mail#parts contains an array of parts (TMail::Mail object). -

- -
-  require 'tmail'
-
-  mail = TMail::Mail.parse( multipart_mail_string )
-  if mail.multipart? then
-    mail.parts.each do |m|
-      puts m.main_type
-    end
-  end
-
- -

Creating New Mail

- -

Creating an email is just as easy:

- -
-  require 'tmail'
-
-  # Example 1: create mail only in memory
-  mail = TMail::Mail.new
-
-  # Example 2: create mail on mailbox (on disk)
-  loader = TMail::MhLoader.new('/home/aamine/Mail/drafts')
-  mail = TMail::Mail.new( loader.new_port )
-
- -

-Then fill headers and body. -

- -
-  mail.to = 'test@loveruby.net'
-  mail.from = 'Minero Aoki <aamine@loveruby.net>'
-  mail.subject = 'test mail'
-  mail.date = Time.now
-  mail.mime_version = '1.0'
-  mail.set_content_type 'text', 'plain', {'charset'=>'iso-2022-jp'}
-  mail.body = 'This is test mail.'
-
- -

-At last, convert mail object to string. -

- -
-  str = mail.to_s
-
- -

-If you want to write mails against files directly -(without intermediate string), use Mail#write_back. -

- -
-  mail.write_back
-
- - -

What TMail is NOT

- -

-Right now, TMail does not touch the body of the mail message, -for example, it doesn't encode, decode, handle character sets -etc. It only handles the message and headers and gives you -access to read and write the mail body. -

- -

-Plans for future versions are to allow better handling of the mail -body, auto decode Base64 and handling attachments in a better way. -

- -

Now what?

- -

Go to the online manual to find out -how to use it all, or if you are stuck you can join the -TMail-Talk -mailing list and ask your question there.

diff --git a/vendor/tmail-1.2.3.1/site/reference/address.html b/vendor/tmail-1.2.3.1/site/reference/address.html deleted file mode 100644 index 22b3c0648..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/address.html +++ /dev/null @@ -1,247 +0,0 @@ -

Address Classes

- -

class TMail::Address

- -

Class Methods

- -
-
parse(str) -> TMail::Address | TMail::AddressGroup
-
-

-str: String
-

- -

-parses the string and creates a new TMail::Address object. -If the string does not follow the standard internet address format, a -TMail::SyntaxError exception is raised. -

- -
-
new(locals, domains) -> TMail::Address | TMail::AddressGroup
-
-

-locals: [String]
-domains: [String]
-

- -

-creates a new TMail::Address object consisting of the local part, -LOCALS and domain part domains. -

- -
-
-

Instance Methods

- -
-
address_group? -> true | false
-
-

-returns false. -

- -
-
spec -> String
-
-

-an address spec ("....@...."). -

- -
-
routes -> [String]
-
-

-delivery routes. Strings do not include character "@". -

- -
-
name -> String
-
phrase -> String
-
-

-short description for this address (e.g. real name). -

- -
-
encoded(eol = "\r\n", encoding = 'j') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts this object into MIME-encoded string. -

- -
-
to_s(eol = "\n", encoding = 'e') -> String
-
decoded(eol = "\n", encoding = 'e') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts this object into decoded string. -

- -
-
==(other) -> true | false
-
-

-other: Object
-

- -

-judge if self equals to other by inspecting addr-spec string (#spec). -#name and #routes never affects the return value. -

- - -
-
-

class TMail::AddressGroup

- -

Class Methods

- -
-
new(name, addrs) -> TMail::AddressGroup
-
-

-name: String
-addrs: [TMail::Address | TMail::AddressGroup]
-

- -

-creates new TMail::AddressGroup object. -NAME is the name of this group, addrs is addresses -which belongs to this group. -

- -
-
-

Instance Methods

- -
-
address_group? -> true | false
-
-

-returns true. -

- -
-
name -> String
-
-

-the human readable name of this group. -

- -
-
addresses -> [TMail::Address | TMail::AddressGroup]
-
-

-addresses which belongs to this group. -

- -
-
to_a -> [TMail::Address | TMail::AddressGroup]
-
to_ary -> [TMail::Address | TMail::AddressGroup]
-
-

-equals to addresses.dup. -

- -
-
flatten -> [TMail::Address]
-
-

-flatten this group into one level of array of TMail::Address. -

- -
-
add(addr)
-
push(addr)
-
-

-addr: TMail::Address | TMail::AddressGroup
-

- -

-adds an address or an address group to this group. -

- -
-
delete(addr)
-
-

-addr: TMail::Address | TMail::AddressGroup
-

- -

-removes ADDR from this group. -

- -
-
each {|a| .... }
-
-

-a: TMail::Address | TMail::AddressGroup
-

- -

-equals to addresses.each {|a| .... }. -

- -
-
each_address {|a| .... }
-
-

-a: TMail::Address
-

- -

-equals to flatten.each {|a| .... } -

- -
-
encoded(eol = "\r\n", encoding = 'j') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts this object into MIME-encoded string. -

- -
-
decoded(eol = "\n", encoding = 'e') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts this object into decoded string. -

- -
-
==(other) -> true | false
-
eql?(other) -> true | false
-
-

-other: Object
-

- -

-judges if self is equal to OTHER, by comparing self.addresses and -other.addresses. (self.name is meanless) -

-
-
- diff --git a/vendor/tmail-1.2.3.1/site/reference/config.html b/vendor/tmail-1.2.3.1/site/reference/config.html deleted file mode 100644 index 86171db0a..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/config.html +++ /dev/null @@ -1,30 +0,0 @@ -

class TMail::Config

- -

Class Methods

- -
-
new(strict) -> TMail::Config
-
-

-strict: true | false
-

- -

-create a TMail::Config object. -set true to all strict_* attributes if STRICT is true. -

- -
-
-

Instance Methods

- -
-
strict_parse?
-
-

-If this flag is true, TMail's parsers may raise -TMail::SyntaxError. If not, it never raises SynaxError. -

-
-
- diff --git a/vendor/tmail-1.2.3.1/site/reference/index.html b/vendor/tmail-1.2.3.1/site/reference/index.html deleted file mode 100644 index b58446a87..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - TMail — A Ruby Email Handler - - - - - - - -
- - - -
-

TMail

-

Ruby on Mail

-
- - - -
-

TMail API Reference v0.10

- -

Note, this might be a bit confusing, why a reference and an RDoc? Well - we haven't finished moving everything over to RDoc yet, so in the mean - time, we thought we would leave this here. If you want to help out on - getting the RDoc up to date, let me know on the - TMail Talk Mailing - List - Mikel. - -

Contents

- - -
-
-
-
-
-
-
- - - - -
- - - diff --git a/vendor/tmail-1.2.3.1/site/reference/mail.html b/vendor/tmail-1.2.3.1/site/reference/mail.html deleted file mode 100644 index c6bd438a5..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/mail.html +++ /dev/null @@ -1,726 +0,0 @@ -

class TMail::Mail

- -

Class Methods

- -
-
new(port = TMail::StringPort.new, config = DEFAULT_CONFIG) -> TMail::Mail
-
-

-port: TMail::Port
-config: TMail::Config
-

- -

-creates a new TMail::Mail object from PORT. -

- -
-
load(filename) -> TMail::Mail
-
-

-filename: String
-

- -

-creates a new TMail::Mail object. FILENAME is the name of file -which contains just one mail (e.g. MH mail file). -

- -
-
parse(str) -> TMail::Mail
-
-

-str: String
-

- -

-parses STR and creates a new TMail::Mail object. -

- -
-
-

Instance Methods

- -
-
port -> TMail::Port
-
-

-the source port of this mail. -

- -
-
body_port -> TMail::Port
-
-

-the port to save body of this mail. -

- -
-
each {|line| .... }
-
-

-line: String
-

- -

-iterates for each lines of mail body. -

- -
-
body -> String
-
preamble -> String
-
-

-the mail body. If the mail is a MIME multipart mail, -this attribute represents "preamble". -

- -
-
parts -> [TMail::Mail]
-
-

-parts of this mail. (valid only if this mail is a MIME multipart mail) -

- -
-
epilogue -> String
-
-

-If the mail was MIME multipart mail, this represent "epilogue" string. -Else, empty string. -

- -
-
multipart?
-
-

-true if the message is a multi-part mail. -

- -
-
encoded(eol = "\n", encoding = 'j') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts the mail object to a MIME encoded string. -

- -
-
decoded(eol = "\n", encoding = 'e') -> String
-
to_s(eol = "\n", encoding = 'e') -> String
-
-

-eol: String
-encoding: String
-

- -

-converts the mail object to a decoded string. -

- -
-
inspect -> String
-
-

-returns simple string representation like -"#<TMail::Mail port=<StringPort:str=...>>" -

- -
-
write_back(eol = "\n", encoding = 'e')
-
-

-eol: String
-encoding: String
-

- -

-converts this mail into string and write back to body_port, -setting line terminator to EOL. -

- -
-
-

Property Access Method

- -
-
date(default = nil) -> Time
-
date=(datetime)
-
-

-datetime: Time
-default: Object
-

- -

-a Time object of Date: header field. -

- -
-
strftime(format, default = nil) -> String
-
-

-format: String
-default: Object
-

- -

-is equals to date.strftime(format). -If date is not exist, this method does nothing and -returns default. -

- -
-
to(default = nil) -> [String]
-
to=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-address specs for To: header field. -

- -
-
to_addrs(default = nil) -> [TMail::Address | TMail::AddressGroup]
-
to_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-adresses which is represented in To: header field. -

- -
-
cc(default = nil) -> [String]
-
cc=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-address specs for Cc: header field. -

- -
-
cc_addrs(default = nil) -> [TMail::Address]
-
cc_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-addresses which is represented in Cc: header field. -

- -
-
bcc(default = nil) -> [String]
-
bcc=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-address specs for Bcc: header field. -

- -
-
bcc_addrs(default = nil) -> [TMail::Address]
-
bcc_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-adresses which is represented in Bcc: header field. -

- -
-
from(default = nil) -> [String]
-
from=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-address specs for From: header field. -

- -
-
from_addrs(default = nil) -> [TMail::Address]
-
from_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-adresses which is represented in From: header field. -

- -
-
friendly_from(default = nil) -> String
-
-

-default: Object
-

- -

-a "phrase" part or address spec of the first From: address. -

- -
-
reply_to(default = nil) -> [String]
-
reply_to=(specs)
-
-

-specs: String | [String]
-default: Object
-

- -

-address specs of Reply-To: header field. -

- -
-
reply_to_addrs(default = nil) -> [TMail::Address]
-
reply_to_addrs=(addrs)
-
-

-addrs: TMail::Address | [TMail::Address]
-default: Object
-

- -

-adresses which is represented in Reply-To: header field. -

- -
-
sender(default = nil) -> String
-
sender=(spec)
-
-

-spec: String
-

- -

-address spec for Sender: header field. -

- -
-
sender_addr(default = nil) -> TMail::Address
-
sender_addr=(addr)
-
-

-addr: TMail::Address
-

- -

-an address which is represented in Sender: header field. -

- -
-
subject(default = nil) -> String
-
subject=(sbj)
-
-

-sbj: String
-

- -

-the subject of the message. -

- -
-
message_id(default = nil) -> String
-
message_id=(id)
-
-

-id: String
-

- -

-message ID string. -

- -
-
in_reply_to(default = nil) -> [String]
-
in_reply_to=(ids)
-
-

-ids: String | [String]
-

- -

-message IDs of replying mails. -

- -
-
references(default = nil) -> [String]
-
references=(ids)
-
-

-ids: String | [String]
-

- -

-message IDs of all referencing (replying) mails. -

- -
-
mime_version(default = nil) -> String
-
mime_version=(ver)
-
-

-ver: String
-

- -

-MIME version. -If it does not exist, returns the DEFAULT. -

- -
-
set_mime_version(major, minor)
-
-

-major: Integer
-minor: Integer
-

- -

-set MIME version from integers. -

- -
-
content_type(default = nil) -> String
-
-

-the content type of the mail message (e.g. "text/plain"). -If it does not exist, returns the DEFAULT. -

- -
-
main_type(default = nil) -> String
-
-

-the main content type of the mail message. (e.g. "text") -If it does not exist, returns the DEFAULT. -

- -
-
sub_type(default = nil) -> String
-
-

-the sub content type of the mail message. (e.g. "plain") -If it does not exist, returns the DEFAULT. -

- -
-
content_type=(ctype)
-
-

-ctype: String
-

- -

-set content type to STR. -

- -
-
set_content_type(main, sub, params = nil)
-
-

-main: String
-sub: String
-params: {String => String}
-

- -

-set Content-type: header as "main/sub; param=val; param=val; ...". -

- -
-
type_param(name, default = nil) -> String
-
-

-name: String
-

- -

-returns the value corresponding to the case-insensitive -NAME of Content-Type parameter. -If it does not exist, returns the default. -

-
-# example
-mail['Content-Type'] = 'text/plain; charset=iso-2022-jp'
-p mail.type_param('charset')   # "iso-2022-jp"
-
- -
-
multipart? -> true | false
-
-

-judge if this mail is MIME multi part mail, -by inspecting Content-Type: header field. -

- -
-
transfer_encoding(default = nil) -> String
-
transfer_encoding=(encoding)
-
-

-encoding: String
-

-

-Content-Transfer-Encoding. (e.g. "7bit" "Base64") -

- -
-
disposition(default = nil) -> String
-
disposition=(pos)
-
-

-pos: String
-

- -

-Content-Disposition main value (e.g. "attachment"). -If it does not exist, returns the DEFAULT. -

-
-# example
-mail['Content-Disposition'] = 'attachement; filename="test.rb"'
-p mail.disposition   # "attachment"
-
- -
-
set_content_disposition(pos, params = nil)
-
-

-pos: String
-params: {String => String}
-

- -

-set content disposition. -

- -
-
disposition_param(key, default = nil) -> String
-
-

-key: String
-

- -

-returns a value corresponding to the Content-Disposition -parameter NAME (e.g. filename). -If it does not exist, returns the default. -

-
-# example
-mail.disposition_param('filename')
-
- -
-
destinations(default = nil) -> [String]
-
-

-all address specs which are contained in To:, Cc: and -Bcc: header fields. -

- -
-
reply_addresses(default = nil) -> [TMail::Address]
-
-

-addresses to we reply to. -

- -
-
error_reply_addresses(default = nil) -> [TMail::Address]
-
-

-addresses to use when returning error message. -

- -
-
-

Direct Header Handling Methods

- -
-
clear
-
-

-clears all header. -

- -
-
keys -> [TMail::HeaderField]
-
-

-returns an array of contained header names. -

- -
-
[](name) -> TMail::HeaderField
-
-

-name: String
-

- -

-returns a header field object corresponding to the case-insensitive -key NAME. e.g. mail["To"] -

- -
-
[]=(name, field)
-
-

-name: String
-field: TMail::HeaderField
-

- -

-set NAME header field to field. -

- -
-
delete(name)
-
-

-name: String
-

-

-deletes header corresponding to case-insensitive key NAME. -

- -
-
delete_if {|name, field| .... }
-
-

-name: String
-field: TMail::HeaderField
-

- -

-evaluates block with a name of header and header field object, -and delete the header if block returns true. -

- -
-
each_header {|name, field| .... }
-
each_pair {|name, field| .... }
-
-

-name: String
-field: TMail::HeaderField
-

- -

-iterates for each header name and its field object. -

- -
-
each_header_name {|name| .... }
-
each_key {|name| .... }
-
-

-name: String
-

- -

-iterates for each contained header names. -

- -
-
each_field {|field| .... }
-
each_value {|field| .... }
-
-

-field: TMail::HeaderField
-

- -

-iterates for each header field objects. -

- -
-
orderd_each {|name, field| .... }
-
-

-name: String
-field: TMail::HeaderField
-

- -

-iterates for each header field objects, in canonical order. -

- -
-
key?(name)
-
-

-name: String
-

- -

-returns true if the mail has NAME header. -

- -
-
value?(field)
-
-

-field: TMail::HeaderField
-

- -

-returns true if the mail has FIELD header field object. -

- -
-
values_at(*names) -> [TMail::HeaderField]
-
indexes(*names) -> [TMail::HeaderField]
-
indices(*names) -> [TMail::HeaderField]
-
-

-names: [String]
-

- -

-equals to names.collect {|k| mail[k] }. -

- -
-
values -> [TMail::HeaderField]
-
-

-returns an array of all header field object. -

-
-
- diff --git a/vendor/tmail-1.2.3.1/site/reference/mailbox.html b/vendor/tmail-1.2.3.1/site/reference/mailbox.html deleted file mode 100644 index 93f9f6903..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/mailbox.html +++ /dev/null @@ -1,245 +0,0 @@ -

Mailbox Classes

- -

class TMail::MhMailbox

- -

-The class to handle MH mailboxes. -

- -

Class Methods

- -
-
new(dirname) -> TMail::MhMailbox
-
-

-dirname: String
-

- -

-creates new MhMailbox object. -DIRNAME must be valid MH mailbox directory. -

- -
-
-

Instance Methods

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in assendant order (older mail first). -

- -
-
reverse_each_port {|port| .... }
-
reverse_each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in descendant order (newer mail first). -

- -
-
last_atime -> Time
-
last_atime=(time)
-
-

-time: Time
-

- -

-The time which last each_new_port/each_port/reverse_each_port is called. -

- -
-
each_new_port(time = last_atime()) {|port| .... }
-
-

-time: Time
-port: TMail::FilePort
-

- -

-iterates for each mails in mailbox, which are newer than TIME. -

- -
-
new_port -> TMail::FilePort
-
-

-creates a new file in the mailbox and returns its port. -

- -
-
close
-
-

-does nothing. -

- -
-
-

class TMail::UNIXMbox

- -

-The class to handle UNIX mbox. -Current implementation creates temporary MH mbox. -

- -

Class Methods

- -
-
new(filename) -> TMail::UNIXMbox
-
-

-filename: String
-

- -

-creates new TMail::UNIMbox object. -FILENAME must be valid UNIX mbox file name. -

- -
-
-

Instance Methods

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in assendant order (older mail first). -

- -
-
reverse_each_port {|port| ... }
-
reverse_each {|port| ... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in descendant order (newer mail first). -

- -
-
each_new_port(time = @last_loaded_time) {|port| .... }
-
-

-time: Time
-port: TMail::FilePort
-

- -

-iterates for each mails in mailbox, which are newer than TIME. -@last_loaded_time is updated when each_new_port/each_port is -called. -

- -
-
new_port -> TMail::FilePort
-
-

-creates a new file in the mailbox and returns its port. -

- -
-
close
-
-

-forces an UNIXMbox to write back mails to real mbox file. -Once this method is called, any method calls causes to raise -IOError exception. -

- -
-
-

class TMail::Maildir

- -

-The class to handle "maildir" mailbox. -

- -

Class Methods

- -
-
new(dirname) -> TMail::Maildir
-
-

-dirname: String
-

- -

-creates new TMail::Maildir object. -DIRNAME must be valid maildir. -

- -
-
-

Instance Methods

- -
-
each_port {|port| .... }
-
each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in assendant order (older mail first). -

- -
-
reverse_each_port {|port| .... }
-
reverse_each {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mail in the mailbox, -in descendant order (newer mail first). -

- -
-
each_new_port {|port| .... }
-
-

-port: TMail::FilePort
-

- -

-iterates for each mails in MAILDIR/new. -

- -
-
new_port -> TMail::FilePort
-
-

-creates a new file in the mailbox and returns its port. -

-
-
- diff --git a/vendor/tmail-1.2.3.1/site/reference/port.html b/vendor/tmail-1.2.3.1/site/reference/port.html deleted file mode 100644 index 16086c777..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/port.html +++ /dev/null @@ -1,75 +0,0 @@ -

Port Classes

- -

class TMail::Port

- -

-TMail::Port is the abstruction of mail source. -

- -

Instance Methods

- -
-
ropen -> IO
-
-

-opens stream for read. -

- -
-
wopen -> IO
-
-

-opens stream for write. -

- -
-
aopen -> IO
-
-

-opens stream for adding. -

- -
-
-

class TMail::FilePort < TMail::Port

- -

Class Methods

- -
-
new(filename) -> TMail::FilePort
-
-

-filename: String
-

- -

-creates new TMail::FilePort object. -

- -
-
filename -> String
-
-

-returns file name which this port is wrapping. -

- -
-
-

class TMail::StringPort < TMail::Port

- -

Class Methods

- -
-
new(src = '') -> TMail::StringPort
-
-

-src: String
-

- -

-creates new TMail::StringPort object from -mail source string. -

-
-
- diff --git a/vendor/tmail-1.2.3.1/site/reference/tmail.html b/vendor/tmail-1.2.3.1/site/reference/tmail.html deleted file mode 100644 index 96468b3f0..000000000 --- a/vendor/tmail-1.2.3.1/site/reference/tmail.html +++ /dev/null @@ -1,35 +0,0 @@ -

module TMail

- -

Module Functions

- -
-
new_boundary -> String
-
-

-creates new MIME multipart mail boundary. -

- -
-
new_message_id(fqdn = Socket.gethostname) -> String
-
-

-fqdn: String
-

- -

-creates new message ID. -

- -
-
message_id?(str) -> true | false
-
-

-str: String
-

- -

-returns true if STR includes message ID string. -

-
-
- diff --git a/vendor/tmail-1.2.3.1/test/extctrl.rb b/vendor/tmail-1.2.3.1/test/extctrl.rb deleted file mode 100644 index 0448dca5a..000000000 --- a/vendor/tmail-1.2.3.1/test/extctrl.rb +++ /dev/null @@ -1,6 +0,0 @@ -if ENV['NORUBYEXT'] - module TMail - remove_const :Scanner - Scanner = Scanner_R - end -end diff --git a/vendor/tmail-1.2.3.1/test/fixtures/mailbox b/vendor/tmail-1.2.3.1/test/fixtures/mailbox deleted file mode 100644 index c49e8c55f..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/mailbox +++ /dev/null @@ -1,414 +0,0 @@ -From mike@envelope_sender.com.au -Return-Path: -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Content-Type: multipart/signed; - micalg=sha1; - boundary=Apple-Mail-42-587703407; - protocol="application/pkcs7-signature" -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing mailbox 1 - ---Apple-Mail-42-587703407 -Content-Type: multipart/mixed; - boundary=Apple-Mail-41-587703287 - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - -Here is a test of an attachment via email. - -- Jamis - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: base64 -Content-Type: image/png; - x-unix-mode=0644; - name=byo-ror-cover.png -Content-Disposition: inline; - filename=truncated.png - -iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz -AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT -b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh -Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l -dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j -MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu -czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg -ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0 -dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFk -b2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVE -YXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpN -b2RpZnlEYXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9y -ZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAg -ICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAg -ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0 -hhojpmnJMfaYFmSkXWg5PGCmHXVj/c9At0hSK2xGdd8F3muk0VFjb4f5Ue0ksQ8qAcq0delaXhdb -DjKNnF+3B3t9kObZYmk7AZgWYqO9anpR3wpM9sQ5XslB9a+kWyTtNb0fOmudzGHfPFBQDKesyycm -DBL7Cw5bXjIEuci+SSOm/LYnXDZu6iuPEj8lYBb+OU8xx1f9m+e5rhJiYKqjo5vHfiZp+VUkW9xc -Ufd6JHNWc47PkQqb9ie3SLEZB/ZqyAssiqURY+G35iOMZUrHbasHnb80QAPv9FHtAbJIyro7bi5b -ai2TEAKen5+LJNWrglZjm3UbZvt7KryA2J5b5J1jZF8kL6GzvG1Zqx54Y1y7J7n20wMOt9frG2sW -uwGP07kNz3732vf6bfvAvLldfS+9fts2euXY37D+R29FGZdlnhzV4TTFmPJduBP2RbNNua4rTqcT -Qt7Xy1KUB0AHSdP5AZQYvHZg7WD1XvYeMO1A9HhZPqMX5KXbMBrn2efxns/ee21674efxz4Tp/fq -2HZ648dgYaC1i3Vq1IbNPq3PvDTPezY9FaRISjvnzWqdgcWN8EJgjnNq+Z7ktOm9l2Nfth28EZi4 -bG/we5JwxM+Tql47/D/X6b38I8/RyxvxPJrX6zvQbo3h9jyJx+C0ALX327QETHl5eYlaYCT5rPTb -+5/rAq26t3lKIxV/p88hq6ptngdgCzoPjJqndiLfc/6y5A14WeDFGNPct4iUsJBV2bYzLEV7m83s -6Rp63VPhHKC/g/LzaU9qexJRr56043JWinqAtfZqsSm1sjoznthl54dtCqv+uL4nIY+oYWuc3+nH -kGfn8b0HQpvOYLQAZUDanbJs3jQhITZEgdarZK+cO6ySlL13rut5nFaN23s7u3Snz6eRPTkCoc2/ -Vp1zHfZVFpZ87FiMVLV1iqyK5rlzfji2GzjfDsodlD+Weo5UD4h6PwKqzQMqID0tq2VjjFVSMpis -ZLRAs7sePZBZAHI+gIanB8I7MD+femAceeUe2Kxa5jS950kZ1p5eNEdeX1+jFmSpZ+1EdWCsDcne -NPNgUHNw3aYpnzv9PGTX0uo94EtN9qq1rOdxe3kc79T8ukeHJJ8Fnxej6qlylbLLsjQLOy6Xy2a1 -kefs/N+nM7+S7IG5/E5Yc7F003pWErLjbH0O5cGadiMptSB/DZ5U5DI9yeg5MFYyMj8lC/Y7/Xjq -OZlWcnpg9aQfXz2HRq+Wn5xOp6gN8tWq8R44e2pfyzLYemEgprst+XXk2Zj2nXlbsG05BprndTMv -C3QRaXczshhVsHnMgfYn80Y2g5JureA6wBasPeP7LkE/jvZMJAaf/g/U2RelHsisvan5FqweIAHg -Pwc7L68GxvVDAAAAAElFTkSuQmCC - ---Apple-Mail-41-587703287-- - ---Apple-Mail-42-587703407 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw -ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx -JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ -ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx -MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt -aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ -G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV -Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z -Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/ -ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/ -yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9 -eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5 -wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/ -Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev -xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA - ---Apple-Mail-42-587703407-- - - -From mike@envelope_sender.com.au -Return-Path: -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Content-Type: multipart/signed; - micalg=sha1; - boundary=Apple-Mail-42-587703407; - protocol="application/pkcs7-signature" -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing mailbox 2 - ---Apple-Mail-42-587703407 -Content-Type: multipart/mixed; - boundary=Apple-Mail-41-587703287 - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - -Here is a test of an attachment via email. - -- Jamis - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: base64 -Content-Type: image/png; - x-unix-mode=0644; - name=byo-ror-cover.png -Content-Disposition: inline; - filename=truncated.png - -iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz -AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT -b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh -Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l -dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j -MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu -czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg -ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0 -dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFk -b2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVE -YXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpN -b2RpZnlEYXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9y -ZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAg -ICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAg -ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0 -hhojpmnJMfaYFmSkXWg5PGCmHXVj/c9At0hSK2xGdd8F3muk0VFjb4f5Ue0ksQ8qAcq0delaXhdb -DjKNnF+3B3t9kObZYmk7AZgWYqO9anpR3wpM9sQ5XslB9a+kWyTtNb0fOmudzGHfPFBQDKesyycm -DBL7Cw5bXjIEuci+SSOm/LYnXDZu6iuPEj8lYBb+OU8xx1f9m+e5rhJiYKqjo5vHfiZp+VUkW9xc -Ufd6JHNWc47PkQqb9ie3SLEZB/ZqyAssiqURY+G35iOMZUrHbasHnb80QAPv9FHtAbJIyro7bi5b -ai2TEAKen5+LJNWrglZjm3UbZvt7KryA2J5b5J1jZF8kL6GzvG1Zqx54Y1y7J7n20wMOt9frG2sW -uwGP07kNz3732vf6bfvAvLldfS+9fts2euXY37D+R29FGZdlnhzV4TTFmPJduBP2RbNNua4rTqcT -Qt7Xy1KUB0AHSdP5AZQYvHZg7WD1XvYeMO1A9HhZPqMX5KXbMBrn2efxns/ee21674efxz4Tp/fq -2HZ648dgYaC1i3Vq1IbNPq3PvDTPezY9FaRISjvnzWqdgcWN8EJgjnNq+Z7ktOm9l2Nfth28EZi4 -bG/we5JwxM+Tql47/D/X6b38I8/RyxvxPJrX6zvQbo3h9jyJx+C0ALX327QETHl5eYlaYCT5rPTb -+5/rAq26t3lKIxV/p88hq6ptngdgCzoPjJqndiLfc/6y5A14WeDFGNPct4iUsJBV2bYzLEV7m83s -6Rp63VPhHKC/g/LzaU9qexJRr56043JWinqAtfZqsSm1sjoznthl54dtCqv+uL4nIY+oYWuc3+nH -kGfn8b0HQpvOYLQAZUDanbJs3jQhITZEgdarZK+cO6ySlL13rut5nFaN23s7u3Snz6eRPTkCoc2/ -Vp1zHfZVFpZ87FiMVLV1iqyK5rlzfji2GzjfDsodlD+Weo5UD4h6PwKqzQMqID0tq2VjjFVSMpis -ZLRAs7sePZBZAHI+gIanB8I7MD+femAceeUe2Kxa5jS950kZ1p5eNEdeX1+jFmSpZ+1EdWCsDcne -NPNgUHNw3aYpnzv9PGTX0uo94EtN9qq1rOdxe3kc79T8ukeHJJ8Fnxej6qlylbLLsjQLOy6Xy2a1 -kefs/N+nM7+S7IG5/E5Yc7F003pWErLjbH0O5cGadiMptSB/DZ5U5DI9yeg5MFYyMj8lC/Y7/Xjq -OZlWcnpg9aQfXz2HRq+Wn5xOp6gN8tWq8R44e2pfyzLYemEgprst+XXk2Zj2nXlbsG05BprndTMv -C3QRaXczshhVsHnMgfYn80Y2g5JureA6wBasPeP7LkE/jvZMJAaf/g/U2RelHsisvan5FqweIAHg -Pwc7L68GxvVDAAAAAElFTkSuQmCC - ---Apple-Mail-41-587703287-- - ---Apple-Mail-42-587703407 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw -ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx -JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ -ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx -MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt -aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ -G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV -Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z -Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/ -ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/ -yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9 -eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5 -wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/ -Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev -xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA - ---Apple-Mail-42-587703407-- - - -From mike@envelope_sender.com.au -Return-Path: -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Content-Type: multipart/signed; - micalg=sha1; - boundary=Apple-Mail-42-587703407; - protocol="application/pkcs7-signature" -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing mailbox 3 - ---Apple-Mail-42-587703407 -Content-Type: multipart/mixed; - boundary=Apple-Mail-41-587703287 - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - -Here is a test of an attachment via email. - -- Jamis - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: base64 -Content-Type: image/png; - x-unix-mode=0644; - name=byo-ror-cover.png -Content-Disposition: inline; - filename=truncated.png - -iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz -AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT -b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh -Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l -dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j -MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu -czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg -ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0 -dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFk -b2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVE -YXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpN -b2RpZnlEYXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9y -ZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAg -ICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAg -ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0 -hhojpmnJMfaYFmSkXWg5PGCmHXVj/c9At0hSK2xGdd8F3muk0VFjb4f5Ue0ksQ8qAcq0delaXhdb -DjKNnF+3B3t9kObZYmk7AZgWYqO9anpR3wpM9sQ5XslB9a+kWyTtNb0fOmudzGHfPFBQDKesyycm -DBL7Cw5bXjIEuci+SSOm/LYnXDZu6iuPEj8lYBb+OU8xx1f9m+e5rhJiYKqjo5vHfiZp+VUkW9xc -Ufd6JHNWc47PkQqb9ie3SLEZB/ZqyAssiqURY+G35iOMZUrHbasHnb80QAPv9FHtAbJIyro7bi5b -ai2TEAKen5+LJNWrglZjm3UbZvt7KryA2J5b5J1jZF8kL6GzvG1Zqx54Y1y7J7n20wMOt9frG2sW -uwGP07kNz3732vf6bfvAvLldfS+9fts2euXY37D+R29FGZdlnhzV4TTFmPJduBP2RbNNua4rTqcT -Qt7Xy1KUB0AHSdP5AZQYvHZg7WD1XvYeMO1A9HhZPqMX5KXbMBrn2efxns/ee21674efxz4Tp/fq -2HZ648dgYaC1i3Vq1IbNPq3PvDTPezY9FaRISjvnzWqdgcWN8EJgjnNq+Z7ktOm9l2Nfth28EZi4 -bG/we5JwxM+Tql47/D/X6b38I8/RyxvxPJrX6zvQbo3h9jyJx+C0ALX327QETHl5eYlaYCT5rPTb -+5/rAq26t3lKIxV/p88hq6ptngdgCzoPjJqndiLfc/6y5A14WeDFGNPct4iUsJBV2bYzLEV7m83s -6Rp63VPhHKC/g/LzaU9qexJRr56043JWinqAtfZqsSm1sjoznthl54dtCqv+uL4nIY+oYWuc3+nH -kGfn8b0HQpvOYLQAZUDanbJs3jQhITZEgdarZK+cO6ySlL13rut5nFaN23s7u3Snz6eRPTkCoc2/ -Vp1zHfZVFpZ87FiMVLV1iqyK5rlzfji2GzjfDsodlD+Weo5UD4h6PwKqzQMqID0tq2VjjFVSMpis -ZLRAs7sePZBZAHI+gIanB8I7MD+femAceeUe2Kxa5jS950kZ1p5eNEdeX1+jFmSpZ+1EdWCsDcne -NPNgUHNw3aYpnzv9PGTX0uo94EtN9qq1rOdxe3kc79T8ukeHJJ8Fnxej6qlylbLLsjQLOy6Xy2a1 -kefs/N+nM7+S7IG5/E5Yc7F003pWErLjbH0O5cGadiMptSB/DZ5U5DI9yeg5MFYyMj8lC/Y7/Xjq -OZlWcnpg9aQfXz2HRq+Wn5xOp6gN8tWq8R44e2pfyzLYemEgprst+XXk2Zj2nXlbsG05BprndTMv -C3QRaXczshhVsHnMgfYn80Y2g5JureA6wBasPeP7LkE/jvZMJAaf/g/U2RelHsisvan5FqweIAHg -Pwc7L68GxvVDAAAAAElFTkSuQmCC - ---Apple-Mail-41-587703287-- - ---Apple-Mail-42-587703407 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw -ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx -JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ -ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx -MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt -aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ -G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV -Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z -Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/ -ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/ -yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9 -eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5 -wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/ -Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev -xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA - ---Apple-Mail-42-587703407-- - - -From mike@envelope_sender.com.au -Return-Path: -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Content-Type: multipart/signed; - micalg=sha1; - boundary=Apple-Mail-42-587703407; - protocol="application/pkcs7-signature" -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing mailbox 4 - ---Apple-Mail-42-587703407 -Content-Type: multipart/mixed; - boundary=Apple-Mail-41-587703287 - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - -Here is a test of an attachment via email. - -- Jamis - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: base64 -Content-Type: image/png; - x-unix-mode=0644; - name=byo-ror-cover.png -Content-Disposition: inline; - filename=truncated.png - -iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz -AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT -b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh -Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l -dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j -MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu -czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg -ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0 -dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFk -b2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVE -YXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpN -b2RpZnlEYXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9y -ZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAg -ICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAg -ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0 -hhojpmnJMfaYFmSkXWg5PGCmHXVj/c9At0hSK2xGdd8F3muk0VFjb4f5Ue0ksQ8qAcq0delaXhdb -DjKNnF+3B3t9kObZYmk7AZgWYqO9anpR3wpM9sQ5XslB9a+kWyTtNb0fOmudzGHfPFBQDKesyycm -DBL7Cw5bXjIEuci+SSOm/LYnXDZu6iuPEj8lYBb+OU8xx1f9m+e5rhJiYKqjo5vHfiZp+VUkW9xc -Ufd6JHNWc47PkQqb9ie3SLEZB/ZqyAssiqURY+G35iOMZUrHbasHnb80QAPv9FHtAbJIyro7bi5b -ai2TEAKen5+LJNWrglZjm3UbZvt7KryA2J5b5J1jZF8kL6GzvG1Zqx54Y1y7J7n20wMOt9frG2sW -uwGP07kNz3732vf6bfvAvLldfS+9fts2euXY37D+R29FGZdlnhzV4TTFmPJduBP2RbNNua4rTqcT -Qt7Xy1KUB0AHSdP5AZQYvHZg7WD1XvYeMO1A9HhZPqMX5KXbMBrn2efxns/ee21674efxz4Tp/fq -2HZ648dgYaC1i3Vq1IbNPq3PvDTPezY9FaRISjvnzWqdgcWN8EJgjnNq+Z7ktOm9l2Nfth28EZi4 -bG/we5JwxM+Tql47/D/X6b38I8/RyxvxPJrX6zvQbo3h9jyJx+C0ALX327QETHl5eYlaYCT5rPTb -+5/rAq26t3lKIxV/p88hq6ptngdgCzoPjJqndiLfc/6y5A14WeDFGNPct4iUsJBV2bYzLEV7m83s -6Rp63VPhHKC/g/LzaU9qexJRr56043JWinqAtfZqsSm1sjoznthl54dtCqv+uL4nIY+oYWuc3+nH -kGfn8b0HQpvOYLQAZUDanbJs3jQhITZEgdarZK+cO6ySlL13rut5nFaN23s7u3Snz6eRPTkCoc2/ -Vp1zHfZVFpZ87FiMVLV1iqyK5rlzfji2GzjfDsodlD+Weo5UD4h6PwKqzQMqID0tq2VjjFVSMpis -ZLRAs7sePZBZAHI+gIanB8I7MD+femAceeUe2Kxa5jS950kZ1p5eNEdeX1+jFmSpZ+1EdWCsDcne -NPNgUHNw3aYpnzv9PGTX0uo94EtN9qq1rOdxe3kc79T8ukeHJJ8Fnxej6qlylbLLsjQLOy6Xy2a1 -kefs/N+nM7+S7IG5/E5Yc7F003pWErLjbH0O5cGadiMptSB/DZ5U5DI9yeg5MFYyMj8lC/Y7/Xjq -OZlWcnpg9aQfXz2HRq+Wn5xOp6gN8tWq8R44e2pfyzLYemEgprst+XXk2Zj2nXlbsG05BprndTMv -C3QRaXczshhVsHnMgfYn80Y2g5JureA6wBasPeP7LkE/jvZMJAaf/g/U2RelHsisvan5FqweIAHg -Pwc7L68GxvVDAAAAAElFTkSuQmCC - ---Apple-Mail-41-587703287-- - ---Apple-Mail-42-587703407 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw -ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx -JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ -ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx -MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt -aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ -G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV -Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z -Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/ -ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/ -yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9 -eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5 -wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/ -Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev -xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA - ---Apple-Mail-42-587703407-- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_any_from_or_sender b/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_any_from_or_sender deleted file mode 100644 index ac94fd119..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_any_from_or_sender +++ /dev/null @@ -1,10 +0,0 @@ -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook - -Hello Mikel - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_from b/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_from deleted file mode 100644 index d65a6ff66..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_from +++ /dev/null @@ -1,11 +0,0 @@ -From mike@envelope_sender.com.au -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook - -Hello Mikel - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_return_path b/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_return_path deleted file mode 100644 index 338d4e823..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/mailbox_without_return_path +++ /dev/null @@ -1,12 +0,0 @@ -From mike@envelope_sender.com.au -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id - <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for - ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook - -Hello Mikel - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_attack_email_with_zero_length_whitespace b/vendor/tmail-1.2.3.1/test/fixtures/raw_attack_email_with_zero_length_whitespace deleted file mode 100644 index 64962e930..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_attack_email_with_zero_length_whitespace +++ /dev/null @@ -1,29 +0,0 @@ -Return-Path: -Received: from microsoft (unknown [1.2.3.4]) - by smtp.text.org (Postfix) with SMTP id DEC6370D14D; - Thu, 13 Mar 2008 22:59:17 -0800 (PST) -Received: from 19271752331590314.10905659468994989.10804402603511133.13566083132883736 (HELO localhost.localdomain) (12063901921407362.18181984866012395.19893385313896167.16770240760880990) by 12134829062321788.11211061433187165.16539300588599072.17272589969398822 with SMTP; Fri, 14 Mar 2008 08:58:57 -0200 -Date: Fri, 14 Mar 2008 08:58:57 -0200 -Message-Id: <4IX775EJXVWDA942@yahoo.com> -Content-Type: text/html; -From: EstebanrustyHarrell@yahoo.com -To: undisclosed-recipients:; - -charset="us-ascii" -Content-Transfer-Encoding: 7bit -To: -From: "Anton Horn" -Subject: Visa Line of Credit - - - - - - - - -
If you have your own business and wish IMMEDIATE ready money to spend ANY way you like or require Extra money to give your company a boost or wish A low interest loan - NO STRINGS ATTACHED!
-
Don't worry about approval... your credit history will not disqualify you!
- - - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_decoded_string b/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_decoded_string deleted file mode 100644 index 99b00ea16..000000000 Binary files a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_decoded_string and /dev/null differ diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_email b/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_email deleted file mode 100644 index 730b6beee..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_email +++ /dev/null @@ -1,83 +0,0 @@ -Delivered-To: raasdnil@gmail.com -Received: by 10.142.223.20 with SMTP id v20cs111827wfg; - Sat, 3 Nov 2007 00:51:28 -0700 (PDT) -Received: by 10.140.207.2 with SMTP id e2mr1315261rvg.1194076288357; - Sat, 03 Nov 2007 00:51:28 -0700 (PDT) -Return-Path: -Received: from carbon.ruby-lang.org (carbon.ruby-lang.org [221.186.184.68]) - by mx.google.com with ESMTP id b39si7103251rvf.2007.11.03.00.51.07; - Sat, 03 Nov 2007 00:51:28 -0700 (PDT) -Received-SPF: pass (google.com: domain of ruby-talk-admin@ruby-lang.org designates 221.186.184.68 as permitted sender) client-ip=221.186.184.68; -Authentication-Results: mx.google.com; spf=pass (google.com: domain of ruby-talk-admin@ruby-lang.org designates 221.186.184.68 as permitted sender) smtp.mail=ruby-talk-admin@ruby-lang.org; dkim=hardfail (test mode) header.i=@gmail.com -Received: from carbon.ruby-lang.org (beryllium.ruby-lang.org [127.0.0.1]) - by carbon.ruby-lang.org (Postfix) with ESMTP id F268B3C21F739; - Sat, 3 Nov 2007 16:47:55 +0900 (JST) -Received: from rv-out-0910.google.com (rv-out-0910.google.com [209.85.198.184]) - by carbon.ruby-lang.org (Postfix) with ESMTP id 561473C21EB7B - for ; Sat, 3 Nov 2007 16:47:47 +0900 (JST) -Received: by rv-out-0910.google.com with SMTP id c27so918962rvf - for ; Sat, 03 Nov 2007 00:47:46 -0700 (PDT) -Received: by 10.142.79.15 with SMTP id c15mr740250wfb.1194076066433; - Sat, 03 Nov 2007 00:47:46 -0700 (PDT) -Received: by 10.142.223.20 with HTTP; Sat, 3 Nov 2007 00:47:46 -0700 (PDT) -Delivered-To: ruby-talk@ruby-lang.org -Date: Sat, 3 Nov 2007 16:47:50 +0900 -Posted: Sat, 3 Nov 2007 18:47:46 +1100 -From: "Mikel Lindsaar" -Reply-To: ruby-talk@ruby-lang.org -Subject: Re: Gateway Upgraded -To: ruby-talk@ruby-lang.org (ruby-talk ML) -Message-Id: <57a815bf0711030047x813fe18r6f6d79c1be251092@mail.gmail.com> -In-Reply-To: <1194010055.7060.6.camel@sohma> -References: <11152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net> - <7FEEABA5-474E-4167-8111-0D3E6658082C@grayproductions.net> - - <5D9709D3-3560-4C98-98AA-703319E5E2BD@grayproductions.net> - <1194010055.7060.6.camel@sohma> -X-ML-Name: ruby-talk -X-Mail-Count: 277342 -X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post) -X-ML-Info: If you have a question, send e-mail with the body - "help" (without quotes) to the address ruby-talk-ctl@ruby-lang.org; - help= -X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on - carbon.ruby-lang.org -X-Spam-Level: -X-Spam-Status: No, score=-4.9 required=7.0 tests=ARIN,AWL,BAYES_00, - CONTENT_TYPE_PRESENT,MIME_BASE64_NO_NAME,QENCPTR2 autolearn=disabled - version=3.1.7 -X-Original-To: ruby-talk@ruby-lang.org -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; - d=gmail.com; s=beta; - h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; - bh=DCk9pkpSSuZCiDlu6nRtZRRUxLUWL2BePrHR+hM8/yo=; - b=F+vb8p+IhpoNJSWOGS8T8KNwqyqixOxLmLi7+3sbTUb67ndK/OgXkr9w3BeuwOzfyMGO1aePfg23hZUq1x/6h12PTlNnAUXm3VByHhIIzP6J8L2RvjQQeUjNH6sslQS5iwt63YoozMkhRxZeewfvBptsr4m8e3/a0RSC32k/HW8= -DomainKey-Signature: a=rsa-sha1; c=nofws; - d=gmail.com; s=beta; - h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; - b=ovG4JYVQVDHR93H8giUcJrxcvvyeQgBqBBd/1cUNJwCDgXEPdfv7J0wR5gi+jO0qYb/EwKvB8+rVhDVdd21sONBt+MHNAiMhDOOwGGas/dAwQhOt5zCIOIcL7GczxNR7PlHGIgC+1wqI9L4jKMU5x7d2tr/9lfh9pV1cWMkzgrE= -Content-Disposition: inline -Mime-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: base64 -Precedence: bulk -Lines: 11 -List-Id: ruby-talk.ruby-lang.org -List-Software: fml [fml 4.0.3 release (20011202/4.0.3)] -List-Post: -List-Owner: -List-Help: -List-Unsubscribe: - -VGhhbmtzIGZvciB5b3VyIHdvcmsgSmFtZXMuCgpNaWtlbAoKT24gMTEvMy8wNywgQXJsZW4gQ2hy -aXN0aWFuIE1hcnQgQ3VzcyA8Y2VsdGljQHNhaXJ5eC5vcmc+IHdyb3RlOgo+IEhpLAo+Cj4gT24g -RnJpLCAyMDA3LTExLTAyIGF0IDIxOjQ4ICswOTAwLCBKYW1lcyBFZHdhcmQgR3JheSBJSSB3cm90 -ZToKPiA+IEp1c3QgYSBzbWFsbCB1cGRhdGUgb24gaG93IHRoaXMgd2VudOKApgo+Cj4gVGhhbmsg -eW91Lgo+Cj4gPgo+ID4gQWNjb3JkaW5nIHRvIG15IHNjYW4gb2YgdGhlIGxvZyB0aGlzIG1vcm5p -bmcsIGV2ZXJ5IGVtYWlsIHRoZSBnYXRld2F5Cj4gPiBzZW50IHNpbmNlIHllc3RlcmRheSdzIHVw -Z3JhZGUgd2FzIGFjY2VwdGVkIGJ5IFVzZW5ldC4gIEkgd2FzIGV2ZW4KPiA+IGFibGUgdG8gZmlu -ZCBtZXNzYWdlcyBtb2RpZmllZCBieSB0aGUgZ2F0ZXdheSBhbmQgdGhleSBsb29rZWQgZ3JlYXQK -PiA+IG9uIGNvbXAubGFuZy5ydWJ5Lgo+ID4KPiA+IFRoaXMgdHJhbnNpdGlvbiBhcHBlYXJzIHRv -IGJlIGEgc3VjY2Vzcy4KPiA+Cj4gPiBKYW1lcyBFZHdhcmQgR3JheSBJSQo+ID4KPiA+Cj4KPiBB -cmxlbgo+Cj4KPgo= - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_encoded_string b/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_encoded_string deleted file mode 100644 index eacca525a..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_base64_encoded_string +++ /dev/null @@ -1 +0,0 @@ -R0lGODlhSwF3APcAAP/////39/j29f/v7vfv7u/v7//m5f7k4vfl5f/e3vff3/Lh4f/a2PXb2N/f3/fW1v/V1PDU0/TTz/fPzv/MzO/OzfHLx/fHxv/Fw//Cv+7ExO/EwMzMzPi/vfW8tPG8vO28t/+3tee9vfe1svC1tb+/v+e1tfCzr/+uq+izrO+urueurv+mpt+ureerpe6lpeilpf+ZzOaknd2lpK+vr/+Zme+dneadnOCdnOealv+Rjd+alu+VleaVlN2VlPeNi8yZmdeUk/CLi+aNjN+PjeaMh8GUlNaPjf+ChfiDg9+Kgs+NivCEhJmZmfd/etGKh+aDg/97e96Dg92Eeu99euZ8fNWBf/9zc917ePdzc+V5dtd8eo+Pj+51ctB9e+dzct91cL98fO9sbf9mZs9zbNZxceZsauhqZN1rZt9qatRtZexkZdBtYtdqan9/f8JubuhiX95kYdZkYcxmZt9hWqpsbN5cWd5aU+VXUNRZWbxgYOBSS8lYTtRTUsBZV8dUSd1LUaVaWtxKQ85LS2ZmZtVHRN9DO71KStlCOtBAPb5ERMRCQtg7M+U0PMk9PdQ5OZVHR98xMdgxMdsvKrI6OswzM7s2MNsqKk9PT7Y1K6o3N90nHtYpIdApKbQvL9ckLN4hIcwnI7MtIt4gG+gdHdYiGbspJtMgILIpKc4gF9ccGLUkH84bG80dEL8gIMIfGD8/P8QbG4sqKqwiGcwYD4QpKcYYEKchGc4TD7MaFsUUFNcQBr0WEuANDaYdEuAKAMQQB7wREYwdGqAXEDMzM74OCbMQEM4JANYFAK0PD8YJAOAAAMQHB6QQEKYPALsIEbwHB3oZGZsQCrwIAJoQELUICK4JCbYIALQHD5YQCcwAAJUPD44QEKwIAKUJCcICApYOAKYHAL4AAJsICH0QEJwHALYAAIMODpMICJQIAa4AAIwJAIwICKYAAHEODoQICIMJAJkAAHwICB8fH3MICIwAAIMAAHwAAHQAAGYAAA8PDwAAAAAAAAAAAAAAAAAAACH5BAUUADEALAAAAABLAXcAAAj/AGMIHEiwoMGDCBMqXMiwocOHECNKnEixosWLGDNq3Mixo8ePIEOKHEmypMmTKFOqXMmypcuXMGPKnEmzps2bOHPq3Mmzp8+fQIMKHUq0qNGjSJMqXcq0qdOnUKNKnUq1qtWrWLNq3cq1q9evYMOKHUu2rNmzaNOqXcu2LcUACBQ8mGDhwocPI07oTaHCBY4dO27MaNEggNvDVgVIkFFES5w7ghBdGlUqVStbzIABM9cuXjxUenAgQExaqQAFFzx4uIAAwIIbUBxDZnQJVOVWl61JQzfOs2dNQAyXHg4UwQcoey6p6sW8ERUFCHJUAfNYECNQmzaVCiZt27Zx1ML3/65XL1AE4uhzCrgARRAubdqQIVtGn36kDgRyaElDZ4+gRpG84o134xRooDTjbFOPPbJokN6DMgkAAhrvwQffMfL98kt9pFBAwA1ppHEGHowYI56BKI6DDjrc2MPgeRDGqJIAG+TBjDjiXHgMhhhmuOEyewhAAAxn9GFKNt8V6E2KBa74Djfv4AOJADJWWVIDZTCjjjniKDONMspos+OO8iGj4TK9hAAAAC4Yw00zSy4pzZIprojOO+fIg48RVvb5kQA5uNLOltMU+s2hYVooZob02bAmADPMQk0zyTRjqTRwwunNknbiiU8tCzTFQQlNuGGqG7DAQoOfQU3AhzqDqv9zjTnXiDMNoonqaOZ8VDwKgAaUTFppMpVmmqmKd+aJDxBNwbLPs9A+6warPgmwAy/txKqOrNfUeuuXuYqJIX1m+OqaHpZaYyml7DYT3jncnEMOOfQEIpxSHJQ6T7T7TEvtTgrMAWs73WxrjqzmFCrON2CCaSGZ8nVhLgAEPCGsN8l4k6k03bFzzjnukJOPLAU81ESqKKesMsqEuFECS85C6++/OFmgSLYFF3yNrNza+g24xzgM8TJQACAkAXEtQAARt1y86ZLboHPOO+TI4w490YjwkBv8du31s/oQ4kBKJUQ7M801fbBKPASrk3O33Ha78JfgJrpjfC8AYIFeLrj/0EMOI0AhKaUYe7MbNx5b7U7IfD7kAA2EdM1FCZRT7gYx/OrTREpmo22TCsnE003OPO886+nedln3hdrsYgECUFRRhRZgfIFGHEyYsYrTh79D9dXkuBPGRDTw+7JBNOjD7+Ynde75TDJ0NrrbbtOK8Om01vozol+Kqc0nCJzQBx3k03HHHnsUAgcepqzrLjXccDNvyCHXQZHxCHHQ9fElOf88TD7oTDgG6DbTlY5WCaOVzw6FKAuhAQBoYIQgJogIRDyCEZKYRCMMEYt1hSde8nKH1eRhv4ngDyFcixYmmiez/8GECNJTRzioV7oDzmoaCvTW9hIFggeMYhSSuMQm/2oDiiKqQhWbmAQrvIGOeKCjHu9wkT3kcY976OF+0eKfQRzQNRZKy4UuOYL0skVDA5oOgdi7RqGmYasuiaMTAlDCMlRRijqWgo6pyKNlWlEKW7SDPAuyRxWriI8rmjCLCtkXIvvXQjCuJIDxGOAMc3YwM6LxkrVKWBvFUQQBPEIbpWiFKnBzGVvgwha20AUwUAmMdgzylfi4xxuwCC0tGiRmtTSJ/xx5kuhFUpJlrOEZ04jGbtVKFwoQAXxYqUpbaKYYxQAGNJlRDGq2Q4qxvAc+5HEEWj7LlgXB5Td12UhemuQE3vglAUlnRmFisnSzAgMA2mCOZ0qzGNDAJz6hMf8NaBjTVq7MpjbPgQNv7gOcBMFctEq2EMoxxAEl4EBC/OcALmAiVYRYlTk3YoHQSXKd1GunJU/Hs4MdLBYKWIApzAHNfvbTmNlD4Ja2JA51aJOQ1NDaIXM50WjN4yCp2l9BCAEL5fGrp190gDihpblbfm2cBHmq5xpgiXo446PUY6cwt7ozk26raC2oJPbMQdaZetWr6qipPfDB1ls0wKAIFUjxdjmQpUJ1IJczarSQ2q8m6NVrmGCoQLigSH7NAxNjI8jlMkcItAVAD/FwhmSBOT2dcfWy22pHJVpDhkGd1WBmnaloD4ajeOQDH6hQAFwTIk59CNYgXDihQZpwVIT/RAtz82hCYjnghr8SA3l/bWxCkveswHpuB54px1WdMTrSve2y7SzYtlIAAARYwrOh/SxZt8tdmi7IE6PZ6V0LElumSlQhhNBrXGMgTr7uQ7gF4UBwDVI2aK1QIc6CxfMaELpyxKMc4WAuc527LZEKM2fdaEcbBACAFYB2u9ndFqwGli3fADIeiiDAamHr0/MqpL7jLUgKn8VX+BpEvotMaLQSixDlrbdKBPBDPXzTDuWObsBZNUc3DGzAnLXDFa0RQGclPDAK+8bCgLRHIKXYDj8MYMMDoQEu9eGG1yYExAdNyIj3wdezGWTL+i0Ibcs523381nMuiMeMadwNyTaX/8Ai1bGO3ZbgbnhgTQKAbIWPzOcjzxiQ5FHyPerRjjlUhF/ESNltuWDlD6f4y3u1LZkNUoC/slgglYbWTxHiLObRTAGouMeRy5Gtdgi4uVkNKc+6MefRZUsKvgoC2zrT51p7BtBLZhsZDv1U80YEy+vdcpcXEjloccEgxX6WRgvCRX08zwpKHnWp23yNATu31ameXjzyQABfaaAZpe4MrW2N5CXbI1te4DW0WmYq3zba0Tw9iLAl/UWFjLm4W4xWmIfaL89VYBj24HONp33qyuYYwXSORyUWYDQhCWABlIiHkcXNtj4DWskuInQ7nqDuu2L5vRABtpYjfRC60ve2QP9dsUGUd2lqvWHQaj4yAck4YOZmO9udcYUEKBYBCVhAAxfww6zDHe6K+znQUpx1QaEcgy3vw9MMETkKSW4Qk1ed6gO5N8gJQtv70swCwlDyn31DalLjrM1oR3jBZjjAeBjjAgBoAAlUAAMY2EAFcmAbhcVdaj4nWYoab8cMOp5lgrTWww19tIixHtVJl5zxAimsaw1feJp5wUVqJs+Rwz0watscwYNquzE+oLce9GAIQ4ACFISQhnAQvcJFvzXSk17qFhDelpmGFjHeffJ4Qxpaw15IbX//LE/rb9Of9gSu15zc19847YMiei5AAIATgEELswMDGNJgBjPkYuhGt/j/7DNeam/oVLyVH8jHCUGlxPt+8cCnd7+FD/kYcFH3A4ncsdG2gm7EIx0Xxny+8VGSJGAEGA7xkAsbIAA3YAdoYAa3EwflAweuMGvh53d/R3vZMgsVcHsHkWzKFnWKp1j1FwNWRxAFoG8JgQnRIlHNxntVIgBlUA3JIA2Zp3mbR3QyFGBu5mrxsAoaQADtUT53cD7ngz6d4Bl7Jn7jp2ThhgpvxXQqxlQt13shRoLx93j1dmXRYmIFMVfP0lhc44WsggCDEAy5YAzjAIABt2b+xTYARoBuJll/tAoSQABpIAlF6B8TFBkVZAiSQHG19mfm5iJE5wmhIoUDgWL4B29X/4hXJXiCA1FeIZgQkpdpiEctFVAJrOAKuVCD8SB2ZKeEZRduy1UO9WAJDSAAdLAJFFRBjIBBGTQJkxAJ1UBuyydFAdd37UAJ4YV+60WJYeiI6Qd/JCZ/XmYQLPgsyDd10OIsZ4Y2JvAIndAJntgM44GD/8VnZUdqzuAZf6AABLAHvYAIskiLk1BERVQKozAJxYCLF6eLr3cIGqaIlBcty5ZvxpYQIBh8CJGC0AJ1B3F/0SKQ1OIChVAIlRAK15hOF8aNo6aEZEAACoAIv3AJRLSOlGFHdbQJtjCIuKaLAQcrQ+cHFiFbA/lX+pCJjfcs+yZmw3d1zKgQIxaNCrGMYP8Dg1biAn3QB4OwkA15gzHXZ/5VD94QBABQAZKADD/EjhxZR6mgCnnER7owbuW2IIX4eoVWEfoTLfuXEMK4D/oQVzj5dGX2VwYpEPzylfFlVPpQhQcBhlvnOSagBnKQBwrJkLkAJzc4dkdnCRoAAB9wCrvwlHrECqSEG6iESlYZc/EoRelAdGxjaBPBAQrFVGl5j11YhR9XZTFQAFL2XlumOY3WNQbJAYq0kg9RWHDJKiKABWXQBngpCXoJimL3kAsyDmXQbSqAC4U5lZZBC8JJC4vJSs6EC/53a30pkvawDukgcUPXDukGEU1wmV+jD7DAkvZ3nS8ZAyCYOZvjdC7/iYJgg0uYcDwO0FvPQgzaOXL70J00EwFEgAVYIJs/aY2rUCnlcJtqpmSUQAJrcgNiskelVJyspBn2BAy3SIiP6SLOuQ7gBys+EBHi+TVxVaHHOBAF8J1hmFixhZ2pggluAHX1dWwlUJbRQmU6OZDF9zwE0ABDQgRSAAZt4JOV0AmxkJ/NgIpINwxPYABrogTwMZyrhAvF4EwIKk3UpE/QwAzQ4JgN6iLpsA7gMHQTNng5wQFElSpu0Jpc+JIF0ARbCgsZtaIIUTbNSDMbUAQS0AA40ANSUJ95MAiJ0AmhsAp7GYr2MA5vUAF4VgYLg6QIGk2ESk3QkE+Fwk8u1ZdN/2gP4PCg0akO1rACU1EAZkoRzsKW/zIAOWAHQyAAIrADcBqbc1qnsVAN2XILehCEa4IAcvANzOBMhAoM+VSrLqWoa4RA0/BHUdqc6fCrzhl9o2MM50caZTN5nqMAWjBBCiAhcDoFbSAHP6kKuOAKg2AFfuorTxAP9RRNtKoM/ISr1dAtmFRW4sCrWCmSVPqrUxqZg2IN6mAKDjIczpKM1CIBdoAIvXADRhMBK+ADM9oGbbAFObAB3fYoAvBwyqd33YKrMDUrEIZWZdWg+LCuUwoOU/qu6oANphCFpFE883CpMbIBiCAJy8BteIYAC7AA0GEuQrIAD9AAMKAO4YczMf+lXRG2JaFYiPCAsewKrO1gDdeADdWwcGvhV+/FUJmWmaxCAqDACbvQChYwMQiLNA1QARtAAi5AAnlQdONGRp8VYSZlDnoqkuzqnGdbDtWADUTrCL94Frn3ngLBgvBJMypwG99ABC5rtVgLAnR3AznQAzywCpK5hHy3JWWFs5zBnBZ7to+qtkQbDIPwZGnxcVwQOW8JRi9QStCACgxntRKgAX77Ai8QuKkXO2gwYTQLexdIY4hbVqOlDubGro8KrBgLodXwDLorB2tBkCnanv/SA0hqIksgABYAAlpbuj1QBLFDOxD4BYkATK/XuhdGRuLwWfUwSD+LttubDrkbDMH/UAZs8Z2q6UhQEE3GkAzb4Al5YbqqpwVfsH1xIIHk8wrRqZVLmHmAxzbcRbZVdLaOe7FTag26AL5Y0BYlsKWMFhG8JbIywQGaKhEQxQVMGxFYwE/Fsg1twAOxoX1pML92sIfogwgJVmp7F3tHt2T4sItp5Ur14LO167Nnuw7WwAu6oAtSsBFMeyqnko9UwYL2ioI8bCov9mtDfCpkWYwRUVHv1X4XUQbXUA2Esw2oQAVfML/mc4R8iAiGEAombMJFhsI3qItstcJr5rPci7YWuw7OcMOxkAMa4QZpioKZWgJjeBUcAAsRvEUuZsdz6RAFUALvRlvEUDmRc6HIWhEp/7jHE6EG5jAsTCQNfXAGWvyKsigJwYC/EhZ9+TvGLjJI+JAPhEal3CvDtAsPzhALuhALKpARmYZf+8BQkQO8TVEAu9cQZjYQmBMRxaOdZWNic9wRZVPEDiEArwLJ3sANroAHliwJQaSOoFDCZATGm5y/GUjGQ9eu22vK61AOsRALrNDKGEEILAi8+oB8XEPMSeEAmEDLiziXRUWhznYQsUWiI8E1GoEAi9AOlJIxA7INjGAIGISR6tiRrYC/ZJRZA4OB5sZWEld0pPyzv/qozqkLrNAJH4ARWprOCMFFXocJK1mvqJm5G0oMiSZYeWzSbkAIHLCh71kAzqJRNJBoxP9wuTFAA/tCOfsyLb2lD6uSx/2iVHKL0/MnEKhCDPPQ0pEDCzC9D6tSMhuKCfPAngdBW/vHRTNz1En9mUQ11RyQx/qAnV6Xf/twXtPi0kwd03KcuUYNC0j91SKdX1xH0yadz57QDpBcINwQC5FQ0E9ZCsWA0PibwiqMDw9davBaDg96u7U7peugC6dQCROAEYFVNkFcPP6iP565D7l1yJXGPBclEPLFPLtcMvVKW9PiVxKVgvoVyO+5KiwoNqz9mSaYWwUQW+cZA7ssEORcMsRgXKdd1IRgovuwx4ccAyUACzPT27q9QsON3MWtlkG82xywQqbdV/0CmoXH3L9dMpz/fWzH3XQhC91kSBELcF39jI3jwA7NsAm2YUfA2QonLNh+l3mDlA/3wMlkFA7VUA2Kzb2065zBcAqIoFoWQQPHpj/l3XTFbcdUNhD7sEIgDdP7VjYSNQ/w5dZ1FbKxVQJc5GlbVzbMwzUMlWgQLlxlo1GRIxB+VeL3BQscXnlOLdqc9p4wvsAx0OIC8dsmqFHnpT8+DOEgCs8x/jK0JVE63txqKVzF8zJcdDyLnM+KEA8ZkzFNwg2vUBlTqZiMKdh9x9BLlg/ntrrTti3Y8AzhsA7OicbAmgunUAhvOxH7JrcpZyq69c6e9uHqd1C0xWJhMxB/nn/Ipz/ME1uJpeHS/y3aZsngDJUqkSdctHU8gV4Q85BbCpHLczt5GM7iWVbpUGfoB/HLn4kJnjbpvD3Pm57jWUboRs1l3ol8w6wRBHAz/cxEK3IOzVAKwymcxaALtgANg/3lfubJa1UPJ0w91kC0zxAM1rAO8CDRA8wJgEC5FIEqKHPOLRbMR551+8BivUwIyMdFVx3dA4Hh7bft3jnPMRDosa7q5yXVED4tWI0q7SwQ4h7qyrPVJzaXZcMF8w4L9Y7c+X5e6YUQ9WzU53XvCbVC/x7w6O7oMZDqDL4Rj8XPhWMnLFKc0oSg8+21Vhmlh23C8Mq2/b3sBazN67oO3vAJdnAvEjzWzsKiY/9N1iRIEAUP8TddeE0eVcvt6rodZgpP4rzt84clEClO3oJMEDt/EGGK7WX2lZj9y0mPgn61aSb+gWVt71FWjP0m9a+14kue6HNrkxjhBfxcKcjCIu/QDEa68dTEDLzId5LJqCIZ8mRUMCRfDeALvjf832c7Dp/wBRZBCFo0y8hT1Ib3kvhc7o2F84s/8TxfV3PuL7089pKPaeQeWyVz9JgmUY+v9OdVPFjPP7PM+Z/JATTAAWsi+iY43T5f8wQR66ZfABIF8UAu9hHPfhsRBO2gMdiI8eeADtHUpOF6DXIf99Y8foRG5ogtqUT7vbwQ/RYdC96g5rZ7ClVQESVA9lz/E+ThXRB//OSDNd5CXwL6EI2IPhCYcGa0FWac//jYeeJGX3gsCOhADwtjk/5Rxf4zv+OxPFgAsY9QjBj6YBF0AMvBPmIAADTBFKPEPjcELRIssO/gRYKwiHF0s68EQYMIFcYQSJCLSIKYNhKiyFHmTJoELYzzlmzcOHQ9370j5w0YtGtEr6lrlzRpPKXtmMaDGq/eVHtV6zFtmlSdta3VvBYLFjaYrli6WJ1Ktg5eunXpTgmpGdcBTH2EBMQoQGjePn00LM7dC8vvRQ77mnBsos8NoZN49c3DxGWeXZIDCesjBqvJXkIOVjrouDEGsX2YShQ+HCOkRUKYDyeeBwsW/4fKM0MScgOrAEcasPbxhRV7cAzYsmnfZrx7oT7TF7n4Frj7Yt27Fpvsm/f6sfEYqAnSwD6QA+bZ+uqCjpv+ooBD7ZpJ6+kTKLti06aZw48Vq1L9TqFOraeq/bJqp5utsKnmmWfAGqssVh48hZNg7FkrHVd4UC9DDTeMwYES0LOogBIKWGg4mkTcTUT1VFRvxBBP01BE2jh8cUaMYPzLRRpl4gBEGWviwEYUOxxpx7h8iMebbeL76R153LHmG3XwQ6qp/pxSJyqpAmRKnSqV8rIba7BB0BhoiuGFF7J0MeusU06JJJZ17FnHlRGMxDNPgoqMQS89/wQ0UEEHJTRDBP8oiYcadtj5SR6g3GFHHHO8zHIpS51aSksAtYQKzG6qwUbBYJ7RRc01H3TzlE8+aSSUdOxZpYNCZyWosIqu45NWXXfltdc8W5BqmyadfFIea6i8FMsro5oKnnXUctbZZ9NJJ55y4gnHG2usMSasst58E5RLPomk3EYSkcaXDXwNtABYMGuOXXnnpbfXAMIIkJtG5XnSnXEkRWq/AZ/671mDDzY4WngWZthgasHBKRlj0mTFlVM6kcSQSlY5oV6PPwY5ZJD1qOqcc/il50lyzBEnWUsJnupZadVCuGaaGcYZ53XYySYbX25ZpZJHBHlBZKOPRjppPMM45557yHHnSXr/3PGmZYExZVZmm7c+OJ2eex5mmJ+BXsUSoQvBA441xMgCjUQwVDpuuedOWoRA8MGbHr3deccc/vyDii2ta0bn62zC9uXnVUTJJBNLFFHkjz/4oEPtMca4IvMoNtc8jjkGiWIAukcnvfReBWghDFmi0VtvgqMax/Cwb6FdFMYbX2QRyfngQw425mCDDTLUIB6NM9a4PHnlL8/8iijAAF6OMSgwvXrrr8eTAAuA0EMTYeSh56pmckHFFEccGaSPPvKwIw465CA+fuKHnz94NtDAf43jl2cec8yb3xwYhje8MaAAewdEYAItooEjvMGBZAjDE6wghjWkIQ1msGAa4mDB/zNo0INxaAP85KcG/OHPDCcUQwqzkEK2sS0LWdCc5jaHBS+AYQplwEIWahAABfbQh3MLwAzmQAYvPOEJSzCiFdaGwQxakIkXbKIF29CGMrTBhF8QwxfM8AUucrELX6RCF5xABSeUMQlRcAISopCEKVhhCm/EwhbSmIAf1tGOIAsADuZghSP00YhH1IIYvgiGNHyhkIcEwxcSmcg0gKEMjixDJCWphS9QUguXrEIXqkAFTnIyCU5IQiiRgIQkKOEJSkClEqaghB9EIQN3hGUse2WCOShhB0ToYy6P8EUtdIEKWgCDJStZyUta8pJYAMMW4rgFLzRTmZusQjSrAAUqMP/BmtYUQhKY8ANu4rIIRPgmEYigBB4goQayRGc6A6WAKtiSCEEggg+CcAR4ZqGTvyymFqqQT0zqUwtxBOgWBGoFglpBClBgAhQUWgQmFEEIDxUCD36gAx74YAc9yAERdpCDHuzABzXQgQ4MoE6SlnRDJyjCDXrgg5X6QJ5BEIITmDBGmepTmjeNJhRyWgUp9NSnPX2CFP6ohCEMQQhFFUIPeLBUHtQgBziQQQ5kcAMZVLWqO7ABSKlnUq529SIDeEEObNDRju7ArDgIZVpDmVCFttWtbj1oEaDwTSWI065HeGcQWMpUpfLABjawqgxc4ALBDtawLGBBDULgVcZytQH/L7ABDGxwA8pSdgY50AE3NcvNhspVrkUFrVFDC1oiDGGlpzVranGAg7/+9QUvMGwKXCDbFNTWtidAAQtQILrG9hadE4DBa18AA+LKYAYzAGlIlatc0Cb1qDwYAnSlq9QeVLe6ObgBdm+w2tUe97gueIEKZltbE6TgBCYAQXrVa4IRhCAELKCjb+V7RwuoILyvJW5+a7Bf/va3BkrNAQ8CDGCmLrW1gJ3sDWAgA+LOAAYzaAEMWjDhFZxAvRfG8AZAsIEOZKADKNjqfEXcwweowMQmhoF4W/ACxLbYxYidbIwPfGDICle4hnXBClww4QmbgAQk8AB6QfCBDRTZyEW2/4AGknwBDGCgwzwccZQPiIAfV/kEJ1iBCVCwZS53mcs1fq0NbGxj+4rXxCtQQZazbAI2e6ADb+6ACDSgZCVbwM4VsACe82yBCVDAzxkYqZQFXb0AfIAEhvbAj9HrXkY3utEjKPN9y3xiE1/5yj5mM5uHDGc40xnPFaiABEQtgQiQmtQPkAAFJAABCsR30K8e3QVUsIEP1HrTTcZ1rnU9ghOQwNJXHoGvq0yCIX8gvSIg8psv0IELNPsCFMgzqCMw7Qc8oAHXxja2GfCABDwAArAG99wS8IIOWOACRN4ABVjtZ3a3u92GPvShaz3vWtP6yM328wQuMAF+81vV045AA/8Cfm0FFLzgCDB4wROgAAbwNtwPN1oARjCCC1TgAkpmwAESkAAGdNzjH2dAAijAYWZ3QAMXMPLFL2DnfbO7396WQLUfsG2CN2ABClhAzhGwc57v3AAIOMABFOBwiBf9YxRAQQcmIIEKPGAATzfAAAwwdaobIOhXnwCfVz4Bi2e93+1etcwZ0ICxM0ABC094z3s+AAIggO0GIADcox5oo9edXgfoAAYoYG0DOAQAAQA84J8+eMIbQAITQPXhZe5txo+d42cv+NUlz/O2I4AAl8c8Adi+ec6z3e6fl9cA2q0Av5fe9KcHgAGqne2Nt37jChD61as+dalL/fKb1/zmBTBdgN0LIAC+/z3vBwBl0BdfVwmAAAMgcADUN9/0CJd80GdPdalHnfCEz33vf7994AM/8N8nvvHFP6gBZDwBAzC94AkfgOZX3/rWv378nx6A4Q8f8N4PvEMAP37+6ykgADs= \ No newline at end of file diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email b/vendor/tmail-1.2.3.1/test/fixtures/raw_email deleted file mode 100644 index 43f7a59ce..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email +++ /dev/null @@ -1,14 +0,0 @@ -From jamis_buck@byu.edu Mon May 2 16:07:05 2005 -Mime-Version: 1.0 (Apple Message framework v622) -Content-Transfer-Encoding: base64 -Message-Id: -Content-Type: text/plain; - charset=EUC-KR; - format=flowed -To: willard15georgina@jamis.backpackit.com -From: Jamis Buck -Subject: =?EUC-KR?Q?NOTE:_=C7=D1=B1=B9=B8=BB=B7=CE_=C7=CF=B4=C2_=B0=CD?= -Date: Mon, 2 May 2005 16:07:05 -0600 - -tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin -wLogSmFtaXPA1LTPtNku diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email10 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email10 deleted file mode 100644 index b1fc2b261..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email10 +++ /dev/null @@ -1,20 +0,0 @@ -Return-Path: -Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500 -Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500 -Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500 -Date: Tue, 10 May 2005 15:27:03 -0500 -From: xxx@xxxx.xxx -Sender: xxx@xxxx.xxx -To: xxxxxxxxxxx@xxxx.xxxx.xxx -Message-Id: -X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx -Delivered-To: xxx@xxxx.xxx -Importance: normal -Content-Type: text/plain; charset=X-UNKNOWN - -Test test. Hi. Waving. m - ----------------------------------------------------------------- -Sent via Bell Mobility's Text Messaging service. -Envoyé par le service de messagerie texte de Bell Mobilité. ----------------------------------------------------------------- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email11 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email11 deleted file mode 100644 index c084afc77..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email11 +++ /dev/null @@ -1,34 +0,0 @@ -From xxx@xxxx.com Wed Apr 27 14:15:31 2005 -Mime-Version: 1.0 (Apple Message framework v619.2) -To: "xxxxx@xxxxx" -Message-Id: <416eaebec6d333ec6939eaf8a7d80724@xxxxx> -Content-Type: multipart/alternative; - boundary=Apple-Mail-5-1037861608 -From: "xxxxx@xxxxx" -Subject: worse when you use them. -Date: Wed, 27 Apr 2005 14:15:31 -0700 - - - - ---Apple-Mail-5-1037861608 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - - -XXXXX Xxxxx - ---Apple-Mail-5-1037861608 -Content-Transfer-Encoding: 7bit -Content-Type: text/enriched; - charset=US-ASCII - - - -XXXXX Xxxxx - - ---Apple-Mail-5-1037861608-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email12 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email12 deleted file mode 100644 index 2cd31720d..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email12 +++ /dev/null @@ -1,32 +0,0 @@ -Mime-Version: 1.0 (Apple Message framework v730) -Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151 -Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com> -From: foo@example.com -Subject: testing -Date: Mon, 6 Jun 2005 22:21:22 +0200 -To: blah@example.com - - ---Apple-Mail-13-196941151 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; - charset=ISO-8859-1; - delsp=yes; - format=flowed - -This is the first part. - ---Apple-Mail-13-196941151 -Content-Type: image/jpeg -Content-Transfer-Encoding: base64 -Content-Location: Photo25.jpg -Content-ID: -Content-Disposition: inline - -jamisSqGSIb3DQEHAqCAMIjamisxCzAJBgUrDgMCGgUAMIAGCSqGSjamisEHAQAAoIIFSjCCBUYw -ggQujamisQICBD++ukQwDQYJKojamisNAQEFBQAwMTELMAkGA1UEBhMCRjamisAKBgNVBAoTA1RE -QzEUMBIGjamisxMLVERDIE9DRVMgQ0jamisNMDQwMjI5MTE1OTAxWhcNMDYwMjamisIyOTAxWjCB -gDELMAkGA1UEjamisEsxKTAnBgNVBAoTIEjamisuIG9yZ2FuaXNhdG9yaXNrIHRpbjamisRuaW5= - ---Apple-Mail-13-196941151-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email13 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email13 deleted file mode 100644 index 7d9314e36..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email13 +++ /dev/null @@ -1,29 +0,0 @@ -Mime-Version: 1.0 (Apple Message framework v730) -Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151 -Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com> -From: foo@example.com -Subject: testing -Date: Mon, 6 Jun 2005 22:21:22 +0200 -To: blah@example.com - - ---Apple-Mail-13-196941151 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; - charset=ISO-8859-1; - delsp=yes; - format=flowed - -This is the first part. - ---Apple-Mail-13-196941151 -Content-Type: text/x-ruby-script; name="hello.rb" -Content-Transfer-Encoding: 7bit -Content-Disposition: attachment; - filename="api.rb" - -puts "Hello, world!" -gets - ---Apple-Mail-13-196941151-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email2 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email2 deleted file mode 100644 index 3999fcc87..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email2 +++ /dev/null @@ -1,114 +0,0 @@ -From xxxxxxxxx.xxxxxxx@gmail.com Sun May 8 19:07:09 2005 -Return-Path: -X-Original-To: xxxxx@xxxxx.xxxxxxxxx.com -Delivered-To: xxxxx@xxxxx.xxxxxxxxx.com -Received: from localhost (localhost [127.0.0.1]) - by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 06C9DA98D - for ; Sun, 8 May 2005 19:09:13 +0000 (GMT) -Received: from xxxxx.xxxxxxxxx.com ([127.0.0.1]) - by localhost (xxxxx.xxxxxxxxx.com [127.0.0.1]) (amavisd-new, port 10024) - with LMTP id 88783-08 for ; - Sun, 8 May 2005 19:09:12 +0000 (GMT) -Received: from xxxxxxx.xxxxxxxxx.com (xxxxxxx.xxxxxxxxx.com [69.36.39.150]) - by xxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 10D8BA960 - for ; Sun, 8 May 2005 19:09:12 +0000 (GMT) -Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.199]) - by xxxxxxx.xxxxxxxxx.com (Postfix) with ESMTP id 9EBC4148EAB - for ; Sun, 8 May 2005 14:09:11 -0500 (CDT) -Received: by zproxy.gmail.com with SMTP id 13so1233405nzp - for ; Sun, 08 May 2005 12:09:11 -0700 (PDT) -DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; - s=beta; d=gmail.com; - h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:references; - b=cid1mzGEFa3gtRa06oSrrEYfKca2CTKu9sLMkWxjbvCsWMtp9RGEILjUz0L5RySdH5iO661LyNUoHRFQIa57bylAbXM3g2DTEIIKmuASDG3x3rIQ4sHAKpNxP7Pul+mgTaOKBv+spcH7af++QEJ36gHFXD2O/kx9RePs3JNf/K8= -Received: by 10.36.10.16 with SMTP id 16mr1012493nzj; - Sun, 08 May 2005 12:09:11 -0700 (PDT) -Received: by 10.36.5.10 with HTTP; Sun, 8 May 2005 12:09:11 -0700 (PDT) -Message-ID: -Date: Sun, 8 May 2005 14:09:11 -0500 -From: xxxxxxxxx xxxxxxx -Reply-To: xxxxxxxxx xxxxxxx -To: xxxxx xxxx -Subject: Fwd: Signed email causes file attachments -In-Reply-To: -Mime-Version: 1.0 -Content-Type: multipart/mixed; - boundary="----=_Part_5028_7368284.1115579351471" -References: - -------=_Part_5028_7368284.1115579351471 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: quoted-printable -Content-Disposition: inline - -We should not include these files or vcards as attachments. - ----------- Forwarded message ---------- -From: xxxxx xxxxxx -Date: May 8, 2005 1:17 PM -Subject: Signed email causes file attachments -To: xxxxxxx@xxxxxxxxxx.com - - -Hi, - -Just started to use my xxxxxxxx account (to set-up a GTD system, -natch) and noticed that when I send content via email the signature/ -certificate from my email account gets added as a file (e.g. -"smime.p7s"). - -Obviously I can uncheck the signature option in the Mail compose -window but how often will I remember to do that? - -Is there any way these kind of files could be ignored, e.g. via some -sort of exclusions list? - -------=_Part_5028_7368284.1115579351471 -Content-Type: application/pkcs7-signature; name=smime.p7s -Content-Transfer-Encoding: base64 -Content-Disposition: attachment; filename="smime.p7s" - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGFDCCAs0w -ggI2oAMCAQICAw5c+TANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh -d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt -YWlsIElzc3VpbmcgQ0EwHhcNMDUwMzI5MDkzOTEwWhcNMDYwMzI5MDkzOTEwWjBCMR8wHQYDVQQD -ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBzbWhhdW5jaEBtYWMuY29t -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn90dPsYS3LjfMY211OSYrDQLzwNYPlAL -7+/0XA+kdy8/rRnyEHFGwhNCDmg0B6pxC7z3xxJD/8GfCd+IYUUNUQV5m9MkxfP9pTVXZVIYLaBw -o8xS3A0a1LXealcmlEbJibmKkEaoXci3MhryLgpaa+Kk/sH02SNatDO1vS28bPsibZpcc6deFrla -hSYnL+PW54mDTGHIcCN2fbx/Y6qspzqmtKaXrv75NBtuy9cB6KzU4j2xXbTkAwz3pRSghJJaAwdp -+yIivAD3vr0kJE3p+Ez34HMh33EXEpFoWcN+MCEQZD9WnmFViMrvfvMXLGVFQfAAcC060eGFSRJ1 -ZQ9UVQIDAQABoy0wKzAbBgNVHREEFDASgRBzbWhhdW5jaEBtYWMuY29tMAwGA1UdEwEB/wQCMAAw -DQYJKoZIhvcNAQEEBQADgYEAQMrg1n2pXVWteP7BBj+Pk3UfYtbuHb42uHcLJjfjnRlH7AxnSwrd -L3HED205w3Cq8T7tzVxIjRRLO/ljq0GedSCFBky7eYo1PrXhztGHCTSBhsiWdiyLWxKlOxGAwJc/ -lMMnwqLOdrQcoF/YgbjeaUFOQbUh94w9VDNpWZYCZwcwggM/MIICqKADAgECAgENMA0GCSqGSIb3 -DQEBBQUAMIHRMQswCQYDVQQGEwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlD -YXBlIFRvd24xGjAYBgNVBAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0 -aW9uIFNlcnZpY2VzIERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwg -Q0ExKzApBgkqhkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3 -MDAwMDAwWhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENv -bnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElz -c3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUEcJ3f -6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH5/EfkTYk -KhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBlyYLf7AgMBAAGj -gZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJodHRwOi8vY3JsLnRo -YXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNVHQ8EBAMCAQYwKQYDVR0R -BCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0GCSqGSIb3DQEBBQUAA4GBAEiM -0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYvwPQcUCCTcDz9reFhYsPZOhl+hLGZ -GwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3h9bGCE6u9uo05RAaWzVNd+NWIXiC3CEZ -Nd4ksdMdRv9dX2VPMYIC5zCCAuMCAQEwaTBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3Rl -IENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWls -IElzc3VpbmcgQ0ECAw5c+TAJBgUrDgMCGgUAoIIBUzAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcB -MBwGCSqGSIb3DQEJBTEPFw0wNTA1MDgxODE3NDZaMCMGCSqGSIb3DQEJBDEWBBQSkG9j6+hB0pKp -fV9tCi/iP59sNTB4BgkrBgEEAYI3EAQxazBpMGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIDDlz5MHoGCyqGSIb3DQEJEAILMWugaTBiMQswCQYDVQQGEwJaQTElMCMG -A1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNv -bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAw5c+TANBgkqhkiG9w0BAQEFAASCAQAm1GeF7dWfMvrW -8yMPjkhE+R8D1DsiCoWSCp+5gAQm7lcK7V3KrZh5howfpI3TmCZUbbaMxOH+7aKRKpFemxoBY5Q8 -rnCkbpg/++/+MI01T69hF/rgMmrGcrv2fIYy8EaARLG0xUVFSZHSP+NQSYz0TTmh4cAESHMzY3JA -nHOoUkuPyl8RXrimY1zn0lceMXlweZRouiPGuPNl1hQKw8P+GhOC5oLlM71UtStnrlk3P9gqX5v7 -Tj7Hx057oVfY8FMevjxGwU3EK5TczHezHbWWgTyum9l2ZQbUQsDJxSniD3BM46C1VcbDLPaotAZ0 -fTYLZizQfm5hcWEbfYVzkSzLAAAAAAAA -------=_Part_5028_7368284.1115579351471-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email3 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email3 deleted file mode 100644 index 771a96350..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email3 +++ /dev/null @@ -1,70 +0,0 @@ -From xxxx@xxxx.com Tue May 10 11:28:07 2005 -Return-Path: -X-Original-To: xxxx@xxxx.com -Delivered-To: xxxx@xxxx.com -Received: from localhost (localhost [127.0.0.1]) - by xxx.xxxxx.com (Postfix) with ESMTP id 50FD3A96F - for ; Tue, 10 May 2005 17:26:50 +0000 (GMT) -Received: from xxx.xxxxx.com ([127.0.0.1]) - by localhost (xxx.xxxxx.com [127.0.0.1]) (amavisd-new, port 10024) - with LMTP id 70060-03 for ; - Tue, 10 May 2005 17:26:49 +0000 (GMT) -Received: from xxx.xxxxx.com (xxx.xxxxx.com [69.36.39.150]) - by xxx.xxxxx.com (Postfix) with ESMTP id 8B957A94B - for ; Tue, 10 May 2005 17:26:48 +0000 (GMT) -Received: from xxx.xxxxx.com (xxx.xxxxx.com [64.233.184.203]) - by xxx.xxxxx.com (Postfix) with ESMTP id 9972514824C - for ; Tue, 10 May 2005 12:26:40 -0500 (CDT) -Received: by xxx.xxxxx.com with SMTP id 68so1694448wri - for ; Tue, 10 May 2005 10:26:40 -0700 (PDT) -DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; - s=beta; d=xxxxx.com; - h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; - b=g8ZO5ttS6GPEMAz9WxrRk9+9IXBUfQIYsZLL6T88+ECbsXqGIgfGtzJJFn6o9CE3/HMrrIGkN5AisxVFTGXWxWci5YA/7PTVWwPOhJff5BRYQDVNgRKqMl/SMttNrrRElsGJjnD1UyQ/5kQmcBxq2PuZI5Zc47u6CILcuoBcM+A= -Received: by 10.54.96.19 with SMTP id t19mr621017wrb; - Tue, 10 May 2005 10:26:39 -0700 (PDT) -Received: by 10.54.110.5 with HTTP; Tue, 10 May 2005 10:26:39 -0700 (PDT) -Message-ID: -Date: Tue, 10 May 2005 11:26:39 -0600 -From: Test Tester -Reply-To: Test Tester -To: xxxx@xxxx.com, xxxx@xxxx.com -Subject: Another PDF -Mime-Version: 1.0 -Content-Type: multipart/mixed; - boundary="----=_Part_2192_32400445.1115745999735" -X-Virus-Scanned: amavisd-new at textdrive.com - -------=_Part_2192_32400445.1115745999735 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: quoted-printable -Content-Disposition: inline - -Just attaching another PDF, here, to see what the message looks like, -and to see if I can figure out what is going wrong here. - -------=_Part_2192_32400445.1115745999735 -Content-Type: application/pdf; name="broken.pdf" -Content-Transfer-Encoding: base64 -Content-Disposition: attachment; filename="broken.pdf" - -JVBERi0xLjQNCiXk9tzfDQoxIDAgb2JqDQo8PCAvTGVuZ3RoIDIgMCBSDQogICAvRmlsdGVyIC9G -bGF0ZURlY29kZQ0KPj4NCnN0cmVhbQ0KeJy9Wt2KJbkNvm/od6jrhZxYln9hWEh2p+8HBvICySaE -ycLuTV4/1ifJ9qnq09NpSBimu76yLUuy/qzqcPz7+em3Ixx/CDc6CsXxs3b5+fvfjr/8cPz6/BRu -rbfAx/n3739/fuJylJ5u5fjX81OuDr4deK4Bz3z/aDP+8fz0yw8g0Ofq7ktr1Mn+u28rvhy/jVeD -QSa+9YNKHP/pxjvDNfVAx/m3MFz54FhvTbaseaxiDoN2LeMVMw+yA7RbHSCDzxZuaYB2E1Yay7QU -x89vz0+tyFDKMlAHK5yqLmnjF+c4RjEiQIUeKwblXMe+AsZjN1J5yGQL5DHpDHksurM81rF6PKab -gK6zAarIDzIiUY23rJsN9iorAE816aIu6lsgAdQFsuhhkHOUFgVjp2GjMqSewITXNQ27jrMeamkg -1rPI3iLWG2CIaSBB+V1245YVRICGbbpYKHc2USFDl6M09acQVQYhlwIrkBNLISvXhGlF1wi5FHCw -wxZkoGNJlVeJCEsqKA+3YAV5AMb6KkeaqEJQmFKKQU8T1pRi2ihE1Y4CDrqoYFFXYjJJOatsyzuI -8SIlykuxKTMibWK8H1PgEvqYgs4GmQSrEjJAalgGirIhik+p4ZQN9E3ETFPAHE1b8pp1l/0Rc1gl -fQs0ABWvyoZZzU8VnPXwVVcO9BEsyjEJaO6eBoZRyKGlrKoYoOygA8BGIzgwN3RQ15ouigG5idZQ -fx2U4Db2CqiLO0WHAZoylGiCAqhniNQjFjQPSkmjwfNTgQ6M1Ih+eWo36wFmjIxDJZiGUBiWsAyR -xX3EekGOizkGI96Ol9zVZTAivikURhRsHh2E3JhWMpSTZCnnonrLhMCodgrNcgo4uyJUJc6qnVss -nrGd1Ptr0YwisCOYyIbUwVjV4xBUNLbguSO2YHujonAMJkMdSI7bIw91Akq2AUlMUWGFTMAOamjU -OvZQCxIkY2pCpMFo/IwLdVLHs6nddwTRrgoVbvLU9eB0G4EMndV0TNoxHbt3JBWwK6hhv3iHfDtF -yokB302IpEBTnWICde4uYc/1khDbSIkQopO6lcqamGBu1OSE3N5IPSsZX00CkSHRiiyx6HQIShsS -HSVNswdVsaOUSAWq9aYhDtGDaoG5a3lBGkYt/lFlBFt1UqrYnzVtUpUQnLiZeouKgf1KhRBViRRk -ExepJCzTwEmFDalIRbLEGtw0gfpESOpIAF/NnpPzcVCG86s0g2DuSyd41uhNGbEgaSrWEXORErbw -------=_Part_2192_32400445.1115745999735-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email4 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email4 deleted file mode 100644 index 639ad40e4..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email4 +++ /dev/null @@ -1,59 +0,0 @@ -Return-Path: -Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id 6AAEE3B4D23 for ; Sun, 8 May 2005 12:30:23 -0500 -Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id j48HUC213279 for ; Sun, 8 May 2005 12:30:13 -0500 -Received: from conversion-xxx.xxxx.xxx.net by xxx.xxxx.xxx id <0IG600901LQ64I@xxx.xxxx.xxx> for ; Sun, 8 May 2005 12:30:12 -0500 -Received: from agw1 by xxx.xxxx.xxx with ESMTP id <0IG600JFYLYCAxxx@xxxx.xxx> for ; Sun, 8 May 2005 12:30:12 -0500 -Date: Sun, 8 May 2005 12:30:08 -0500 -From: xxx@xxxx.xxx -To: xxx@xxxx.xxx -Message-Id: <7864245.1115573412626.JavaMxxx@xxxx.xxx> -Subject: Filth -Mime-Version: 1.0 -Content-Type: multipart/mixed; boundary=mimepart_427e4cb4ca329_133ae40413c81ef -X-Mms-Priority: 1 -X-Mms-Transaction-Id: 3198421808-0 -X-Mms-Message-Type: 0 -X-Mms-Sender-Visibility: 1 -X-Mms-Read-Reply: 1 -X-Original-To: xxx@xxxx.xxx -X-Mms-Message-Class: 0 -X-Mms-Delivery-Report: 0 -X-Mms-Mms-Version: 16 -Delivered-To: xxx@xxxx.xxx -X-Nokia-Ag-Version: 2.0 - -This is a multi-part message in MIME format. - ---mimepart_427e4cb4ca329_133ae40413c81ef -Content-Type: multipart/mixed; boundary=mimepart_427e4cb4cbd97_133ae40413c8217 - - - ---mimepart_427e4cb4cbd97_133ae40413c8217 -Content-Type: text/plain; charset=utf-8 -Content-Transfer-Encoding: 7bit -Content-Disposition: inline -Content-Location: text.txt - -Some text - ---mimepart_427e4cb4cbd97_133ae40413c8217-- - ---mimepart_427e4cb4ca329_133ae40413c81ef -Content-Type: text/plain; charset=us-ascii -Content-Transfer-Encoding: 7bit - - --- -This Orange Multi Media Message was sent wirefree from an Orange -MMS phone. If you would like to reply, please text or phone the -sender directly by using the phone number listed in the sender's -address. To learn more about Orange's Multi Media Messaging -Service, find us on the Web at xxx.xxxx.xxx.uk/mms - - ---mimepart_427e4cb4ca329_133ae40413c81ef - - ---mimepart_427e4cb4ca329_133ae40413c81ef- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email5 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email5 deleted file mode 100644 index 151c63147..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email5 +++ /dev/null @@ -1,19 +0,0 @@ -Return-Path: -Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500 -Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500 -Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500 -Date: Tue, 10 May 2005 15:27:03 -0500 -From: xxx@xxxx.xxx -Sender: xxx@xxxx.xxx -To: xxxxxxxxxxx@xxxx.xxxx.xxx -Message-Id: -X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx -Delivered-To: xxx@xxxx.xxx -Importance: normal - -Test test. Hi. Waving. m - ----------------------------------------------------------------- -Sent via Bell Mobility's Text Messaging service. -Envoyé par le service de messagerie texte de Bell Mobilité. ----------------------------------------------------------------- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email6 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email6 deleted file mode 100644 index 93289c4f9..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email6 +++ /dev/null @@ -1,20 +0,0 @@ -Return-Path: -Received: from xxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id C1B953B4CB6 for ; Tue, 10 May 2005 15:27:05 -0500 -Received: from SMS-GTYxxx.xxxx.xxx by xxx.xxxx.xxx with ESMTP id ca for ; Tue, 10 May 2005 15:27:04 -0500 -Received: from xxx.xxxx.xxx by SMS-GTYxxx.xxxx.xxx with ESMTP id j4AKR3r23323 for ; Tue, 10 May 2005 15:27:03 -0500 -Date: Tue, 10 May 2005 15:27:03 -0500 -From: xxx@xxxx.xxx -Sender: xxx@xxxx.xxx -To: xxxxxxxxxxx@xxxx.xxxx.xxx -Message-Id: -X-Original-To: xxxxxxxxxxx@xxxx.xxxx.xxx -Delivered-To: xxx@xxxx.xxx -Importance: normal -Content-Type: text/plain; charset=us-ascii - -Test test. Hi. Waving. m - ----------------------------------------------------------------- -Sent via Bell Mobility's Text Messaging service. -Envoyé par le service de messagerie texte de Bell Mobilité. ----------------------------------------------------------------- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email7 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email7 deleted file mode 100644 index da64ada8a..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email7 +++ /dev/null @@ -1,66 +0,0 @@ -Mime-Version: 1.0 (Apple Message framework v730) -Content-Type: multipart/mixed; boundary=Apple-Mail-13-196941151 -Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com> -From: foo@example.com -Subject: testing -Date: Mon, 6 Jun 2005 22:21:22 +0200 -To: blah@example.com - - ---Apple-Mail-13-196941151 -Content-Type: multipart/mixed; - boundary=Apple-Mail-12-196940926 - - ---Apple-Mail-12-196940926 -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain; - charset=ISO-8859-1; - delsp=yes; - format=flowed - -This is the first part. - ---Apple-Mail-12-196940926 -Content-Transfer-Encoding: 7bit -Content-Type: text/x-ruby-script; - x-unix-mode=0666; - name="test.rb" -Content-Disposition: attachment; - filename=test.rb - -puts "testing, testing" - ---Apple-Mail-12-196940926 -Content-Transfer-Encoding: base64 -Content-Type: application/pdf; - x-unix-mode=0666; - name="test.pdf" -Content-Disposition: inline; - filename=test.pdf - -YmxhaCBibGFoIGJsYWg= - ---Apple-Mail-12-196940926 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - - - ---Apple-Mail-12-196940926-- - ---Apple-Mail-13-196941151 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -jamisSqGSIb3DQEHAqCAMIjamisxCzAJBgUrDgMCGgUAMIAGCSqGSjamisEHAQAAoIIFSjCCBUYw -ggQujamisQICBD++ukQwDQYJKojamisNAQEFBQAwMTELMAkGA1UEBhMCRjamisAKBgNVBAoTA1RE -QzEUMBIGjamisxMLVERDIE9DRVMgQ0jamisNMDQwMjI5MTE1OTAxWhcNMDYwMjamisIyOTAxWjCB -gDELMAkGA1UEjamisEsxKTAnBgNVBAoTIEjamisuIG9yZ2FuaXNhdG9yaXNrIHRpbjamisRuaW5= - ---Apple-Mail-13-196941151-- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email8 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email8 deleted file mode 100644 index 2382dfdf3..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email8 +++ /dev/null @@ -1,47 +0,0 @@ -From xxxxxxxxx.xxxxxxx@gmail.com Sun May 8 19:07:09 2005 -Return-Path: -Message-ID: -Date: Sun, 8 May 2005 14:09:11 -0500 -From: xxxxxxxxx xxxxxxx -Reply-To: xxxxxxxxx xxxxxxx -To: xxxxx xxxx -Subject: Fwd: Signed email causes file attachments -In-Reply-To: -Mime-Version: 1.0 -Content-Type: multipart/mixed; - boundary="----=_Part_5028_7368284.1115579351471" -References: - -------=_Part_5028_7368284.1115579351471 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: quoted-printable -Content-Disposition: inline - -We should not include these files or vcards as attachments. - ----------- Forwarded message ---------- -From: xxxxx xxxxxx -Date: May 8, 2005 1:17 PM -Subject: Signed email causes file attachments -To: xxxxxxx@xxxxxxxxxx.com - - -Hi, - -Test attachments oddly encoded with japanese charset. - - -------=_Part_5028_7368284.1115579351471 -Content-Type: application/octet-stream; name*=iso-2022-jp'ja'01%20Quien%20Te%20Dij%8aat.%20Pitbull.mp3 -Content-Transfer-Encoding: base64 -Content-Disposition: attachment - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGFDCCAs0w -ggI2oAMCAQICAw5c+TANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhh -d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVt -YWlsIElzc3VpbmcgQ0EwHhcNMDUwMzI5MDkzOTEwWhcNMDYwMzI5MDkzOTEwWjBCMR8wHQYDVQQD -ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMR8wHQYJKoZIhvcNAQkBFhBzbWhhdW5jaEBtYWMuY29t -MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn90dPsYS3LjfMY211OSYrDQLzwNYPlAL -7+/0XA+kdy8/rRnyEHFGwhNCDmg0B6pxC7z3xxJD/8GfCd+IYUUNUQV5m9MkxfP9pTVXZVIYLaBw -------=_Part_5028_7368284.1115579351471-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email9 b/vendor/tmail-1.2.3.1/test/fixtures/raw_email9 deleted file mode 100644 index 8b9b1eaa0..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email9 +++ /dev/null @@ -1,28 +0,0 @@ -Received: from xxx.xxx.xxx ([xxx.xxx.xxx.xxx] verified) - by xxx.com (CommuniGate Pro SMTP 4.2.8) - with SMTP id 2532598 for xxx@xxx.com; Wed, 23 Feb 2005 17:51:49 -0500 -Received-SPF: softfail - receiver=xxx.com; client-ip=xxx.xxx.xxx.xxx; envelope-from=xxx@xxx.xxx -quite Delivered-To: xxx@xxx.xxx -Received: by xxx.xxx.xxx (Wostfix, from userid xxx) - id 0F87F333; Wed, 23 Feb 2005 16:16:17 -0600 -Date: Wed, 23 Feb 2005 18:20:17 -0400 -From: "xxx xxx" -Message-ID: <4D6AA7EB.6490534@xxx.xxx> -To: xxx@xxx.com -Subject: Stop adware/spyware once and for all. -X-Scanned-By: MIMEDefang 2.11 (www dot roaringpenguin dot com slash mimedefang) - -You are infected with: -Ad Ware and Spy Ware - -Get your free scan and removal download now, -before it gets any worse. - -http://xxx.xxx.info?aid=3D13&?stat=3D4327kdzt - - - - -no more? (you will still be infected) -http://xxx.xxx.info/discon/?xxx@xxx.com diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_multiple_from b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_multiple_from deleted file mode 100644 index 734ac4e2a..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_multiple_from +++ /dev/null @@ -1,30 +0,0 @@ -Delivered-To: tim@powerupdev.com -Return-Path: -To: tim@powerupdev.com concierge@powerupdev.com -From: tim@powerupdev.com concierge@powerupdev.com -Subject: /home/svn/public/minebox revision 214 -Reply-to: tim@powerupdev.com concierge@powerupdev.com -Message-Id: <20071022234523.5BD8E86D2@mangaverde.net> -Date: Mon, 22 Oct 2007 23:45:23 +0000 (UTC) - -

recordkick 2007-10-22 23:45:23 +0000 (Mon, 22 Oct 2007)

test -subversion
-


Modified:
-trunk/README
-===================================================================
---- trunk/README\t2007-10-22
-23:41:34 UTC (rev 213)
-+++ trunk/README\t2007-10-22 23:45:23 UTC (rev 214)
-@@ -1,5 +1,5 @@
- == Welcome
-to Rails
--Test
-+Tedst
- Rails is a web-application and persistence framework that includes everything
- needed
-to create database-backed web-applications according to the
- Model-View-Control pattern of separation. This pattern
-splits the view (also
-
-
-
diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_quoted_with_0d0a b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_quoted_with_0d0a deleted file mode 100644 index 8a2c25a5d..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_quoted_with_0d0a +++ /dev/null @@ -1,14 +0,0 @@ -Mime-Version: 1.0 (Apple Message framework v730) -Message-Id: <9169D984-4E0B-45EF-82D4-8F5E53AD7012@example.com> -From: foo@example.com -Subject: testing -Date: Mon, 6 Jun 2005 22:21:22 +0200 -To: blah@example.com -Content-Transfer-Encoding: quoted-printable -Content-Type: text/plain - -A fax has arrived from remote ID ''.=0D=0A-----------------------= --------------------------------------=0D=0ATime: 3/9/2006 3:50:52= - PM=0D=0AReceived from remote ID: =0D=0AInbound user ID XXXXXXXXXX, r= -outing code XXXXXXXXX=0D=0AResult: (0/352;0/0) Successful Send=0D=0AP= -age record: 1 - 1=0D=0AElapsed time: 00:58 on channel 11=0D=0A diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_reply b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_reply deleted file mode 100644 index 8e3bba27e..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_reply +++ /dev/null @@ -1,32 +0,0 @@ -Return-Path: -Received: from me ([unix socket]) - by xxxxx1.xxxx.net (Cyrus v2.2.12) with LMTPA; - Sun, 18 Nov 2007 00:56:33 -0800 -Received: from smtp.xxxx.org (unknown [127.0.0.1]) - by xxxxx1.xxxx.net (Postfix) with ESMTP id F128477EB5; - Sun, 18 Nov 2007 00:56:32 -0800 (PST) -Received: from omta02sl.mx.bigpond.com (omta02sl.mx.bigpond.com [144.140.93.154]) - by smtp.xxxx.org (Postfix) with ESMTP id 2D567ACC08; - Sun, 18 Nov 2007 00:56:28 -0800 (PST) -Received: from oaamta05sl.mx.bigpond.com ([124.183.219.10]) - by omta02sl.mx.bigpond.com with ESMTP - id <20071118085627.YVPI22254.omta02sl.mx.bigpond.com@oaamta05sl.mx.bigpond.com>; - Sun, 18 Nov 2007 08:56:27 +0000 -Received: from [10.0.0.1] (really [124.183.219.10]) - by oaamta05sl.mx.bigpond.com with ESMTP - id <20071118085627.TQWF6995.oaamta05sl.mx.bigpond.com@[10.0.0.1]>; - Sun, 18 Nov 2007 08:56:27 +0000 -Message-ID: <473FFE27.20003@xxx.org> -Date: Sun, 18 Nov 2007 19:56:07 +1100 -From: Testing -User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) -X-Accept-Language: en-us, en -MIME-Version: 1.0 -To: Mikel Lindsaar -Subject: Re: Test reply email -References: <473FF3B8.9020707@xxx.org> <348F04F142D69C21-291E56D292BC@xxxx.net> -In-Reply-To: <348F04F142D69C21-291E56D292BC@xxxx.net> -Content-Type: text/plain; charset=US-ASCII; format=flowed -Content-Transfer-Encoding: 7bit - -Message body diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_simple b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_simple deleted file mode 100644 index 53cddeadd..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_simple +++ /dev/null @@ -1,11 +0,0 @@ -From mike@nowhere.com -Return-Path: -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -To: Mikel -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook - -Hello Mikel - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_bad_date b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_bad_date deleted file mode 100644 index 9f9667d77..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_bad_date +++ /dev/null @@ -1,48 +0,0 @@ -Return-Path: -X-Original-To: external@xxx.xxxxxxxx.xxx.xx -Delivered-To: external@xxx.xxxxxxxx.xxx.xx -Received: from server.xxx.xxxxxxxx.xxx.xx (localhost.xxxxxxxx.xxx.xx [127.0.0.1]) - by server.xxx.xxxxxxxx.xxx.xx (Postfix) with ESMTP id 0173828456 - for ; Mon, 5 Nov 2007 20:17:37 +1100 (EST) -Received: from server.xxx.xxxxxxxx.xxx.xx (server.xxx.xxxxxxxx.xxx.xx [10.130.1.250]) - by localhost (FormatMessage) with SMTP id d7be4d19ed6d330c - for ; Mon, 05 Nov 2007 20:17:37 +1100 (EST) -Received: from server.sydney.xxxxxxxx.xxx.xx (unknown [10.130.2.6]) - by server.xxx.xxxxxxxx.xxx.xx (Postfix) with ESMTP id BB00328442 - for ; Mon, 5 Nov 2007 20:17:37 +1100 (EST) -Received: from dircomm (unknown [10.130.2.8]) - by server.sydney.xxxxxxxx.xxx.xx (Postfix) with ESMTP id 20A692841F - for ; Mon, 5 Nov 2007 20:18:24 +1100 (EST) -X-Mailbox-Line: From subventive@vodtravel.com -Message-ID: <000001c81a67$a4450700$0100007f@localhost> -From: "Darrell Shaw" -To: -Subject: Microsoft Vlsta & Office2007, Just released for 79$ Save 1599.95$ 0ff Retai| -Date: Pn, 29 paX 2007 21:13:00 +0100 -Content-Type: text/plain; - charset="us-ascii" -Content-Transfer-Encoding: 7bit -X-Priority: 3 (Normal) -X-MSMail-Priority: Normal -X-Mailer: Microsoft Outlook, Build 10.0.3416 -Importance: Normal -X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.150 -X-CSI-TMailScanner-Information: Please contact the ISP for more information -X-CSI-TMailScanner: Found to be clean -X-CSI-TMailScanner-SpamCheck: not spam, SpamAssassin (score=1.87, required 4, - autolearn=disabled, INVALID_DATE 0.23, RAZOR2_CF_RANGE_51_100 1.49, - RAZOR2_CHECK 0.15) -X-CSI-TMailScanner-SpamScore: s -X-TMailScanner-From: subventive@vodtravel.com -Resent-Date: Mon, 05 Nov 2007 20:17:37 +1100 (EST) -Resent-From: -Resent-To: -Resent-Message-ID: -X-UID: 4702 -Status: RO - -hotnewsoft . com - - - - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_illegal_boundary b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_illegal_boundary deleted file mode 100644 index 7e707af76..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_illegal_boundary +++ /dev/null @@ -1,58 +0,0 @@ -From email_test@me.nowhere -Return-Path: -Received: from omta05sl.mx.bigpond.com by me.nowhere.else with ESMTP id 632BD5758 for ; Sun, 21 Oct 2007 19:38:21 +1000 -Received: from oaamta05sl.mx.bigpond.com by omta05sl.mx.bigpond.com with ESMTP id <20071021093820.HSPC16667.omta05sl.mx.bigpond.com@oaamta05sl.mx.bigpond.com> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -Reply-To: Mikel Lindsaar -To: mikel@me.nowhere -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook -Mime-Version: 1.0 -Content-Type: multipart/alternative; boundary=----=_NextPart_000_0093_01C81419.EB75E850 -X-Get_mail_default: mikel@me.nowhere.else -X-Priority: 3 -X-Original-To: mikel@me.nowhere -X-Mailer: Microsoft Outlook Express 6.00.2900.3138 -Delivered-To: mikel@me.nowhere -X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.3138 -X-Msmail-Priority: Normal - -This is a multi-part message in MIME format. - - -------=_NextPart_000_0093_01C81419.EB75E850 -Content-Type: text/plain; charset=iso-8859-1 -Content-Transfer-Encoding: Quoted-printable - -Hello -This is an outlook test - -So there. - -Me. - -------=_NextPart_000_0093_01C81419.EB75E850 -Content-Type: text/html; charset=iso-8859-1 -Content-Transfer-Encoding: Quoted-printable - - - - - - - - -
Hello
-
This is an outlook=20 -test
-
 
-
So there.
-
 
-
Me.
- - -------=_NextPart_000_0093_01C81419.EB75E850-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_mimepart_without_content_type b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_mimepart_without_content_type deleted file mode 100644 index cd29e350f..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_mimepart_without_content_type +++ /dev/null @@ -1,94 +0,0 @@ -X-Gmail-Received: b2c98353cc39d93e4204831226f778c200d28109 -Delivered-To: roor32@gmail.com -Received: by 10.64.10.4 with SMTP id 4cs594808qbj; - Fri, 20 Oct 2006 01:53:34 -0700 (PDT) -Received: by 10.65.224.11 with SMTP id b11mr149813qbr; - Fri, 20 Oct 2006 01:53:34 -0700 (PDT) -Return-Path: <> -Received: from anis.telecom.uqam.ca (anis.telecom.uqam.ca [132.208.250.6]) - by mx.google.com with ESMTP id e13si1575402qbe.2006.10.20.01.53.34; - Fri, 20 Oct 2006 01:53:34 -0700 (PDT) -Received-SPF: pass (google.com: best guess record for domain of anis.telecom.uqam.ca designates 132.208.250.6 as permitted sender) -Received: from anis4.telecom.uqam.ca (anis4.telecom.uqam.ca [132.208.250.236]) - by sortant.uqam.ca (8.13.6/8.12.1) with SMTP id k9K8SIwA023763 - for ; Fri, 20 Oct 2006 04:28:33 -0400 (EDT) -Received: from antivirus.uqam.ca ([127.0.0.1]) - by anis4.telecom.uqam.ca (SAVSMTP 3.1.1.32) with SMTP id M2006102004283404041 - for ; Fri, 20 Oct 2006 04:28:34 -0400 -Received: from localhost (localhost) - by antivirus.uqam.ca (8.13.6/8.12.1) id k9JMDbg4005560; - Fri, 20 Oct 2006 04:28:33 -0400 (EDT) -Date: Fri, 20 Oct 2006 04:28:33 -0400 (EDT) -From: Mail Delivery Subsystem -Message-Id: <200610200828.k9JMDbg4005560@antivirus.uqam.ca> -To: -MIME-Version: 1.0 -Content-Type: multipart/report; report-type=delivery-status; - boundary="k9JMDbg4005560.1161332913/antivirus.uqam.ca" -Subject: Warning: could not send message for past 1 day -Auto-Submitted: auto-generated (warning-timeout) - -This is a MIME-encapsulated message - ---k9JMDbg4005560.1161332913/antivirus.uqam.ca - - ********************************************** - ** THIS IS A WARNING MESSAGE ONLY ** - ** YOU DO NOT NEED TO RESEND YOUR MESSAGE ** - ********************************************** - -The original message was received at Thu, 19 Oct 2006 01:23:47 -0400 (EDT) -from py-out-1112.google.com [64.233.166.178] - - ----- Transcript of session follows ----- -... Deferred -Warning: message still undelivered after 1 day -Will keep trying until message is 5 days old - ---k9JMDbg4005560.1161332913/antivirus.uqam.ca -Content-Type: message/delivery-status - -Reporting-MTA: dns; antivirus.uqam.ca -Arrival-Date: Thu, 19 Oct 2006 01:23:47 -0400 (EDT) - -Final-Recipient: RFC822; larose.julie@courrier.uqam.ca -Action: delayed -Status: 4.5.0 -Diagnostic-Code: SMTP; -Last-Attempt-Date: Fri, 20 Oct 2006 04:28:33 -0400 (EDT) -Will-Retry-Until: Tue, 24 Oct 2006 01:23:47 -0400 (EDT) - ---k9JMDbg4005560.1161332913/antivirus.uqam.ca -Content-Type: message/rfc822 - -Return-Path: -Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) - by intrant.uqam.ca (8.13.6/8.12.2/uqam-filtres) with SMTP id k9J5Ni8o007263 - for ; Thu, 19 Oct 2006 01:23:47 -0400 (EDT) -X-UQAM-Spam-Filter: Filtre-Uqam re: abuse@uqam.ca -Received: by py-out-1112.google.com with SMTP id t32so610221pyc - for ; Wed, 18 Oct 2006 22:23:33 -0700 (PDT) -DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; - s=beta; d=gmail.com; - h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; - b=Fwt0k1kaMU+1kM1iTG0q4Xf94p9alSohgM7QQN0CSjfBYUUhT+J4Y6+ZWotaaSffV3gX86RE/n97n0yQ/33EgYKIifuEpa0hi2mg3KTmcDqlCjiDfih58Z998GEFfbhu0he2jsoB+k6AgVRFPwP6LMRi6T66vr2f7IOAmX2IHiU= -Received: by 10.65.241.20 with SMTP id t20mr15391984qbr; - Wed, 18 Oct 2006 15:10:03 -0700 (PDT) -Received: by 10.64.10.4 with HTTP; Wed, 18 Oct 2006 15:10:03 -0700 (PDT) -Message-ID: <89d7557c0610181510r6fa5ebd8n66a7deec71ade118@mail.gmail.com> -Date: Wed, 18 Oct 2006 18:10:03 -0400 -From: "=?ISO-8859-1?Q?RogE9?=" -To: larose.julie@courrier.uqam.ca -Subject: Est-ce toi ? -MIME-Version: 1.0 -Content-Type: text/plain; charset=ISO-8859-1; format=flowed -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -Salut, -je ne suis pas sur de m'adresser a la bonne personne. -Mais si jamais tu me reconnais :p, peux-tu repondre a ce mail ? -Merci. -Roger - ---k9JMDbg4005560.1161332913/antivirus.uqam.ca-- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_multipart_mixed_quoted_boundary b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_multipart_mixed_quoted_boundary deleted file mode 100644 index a9e230702..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_multipart_mixed_quoted_boundary +++ /dev/null @@ -1,50 +0,0 @@ -From email_test@me.nowhere -Return-Path: -Received: from omta05sl.mx.bigpond.com by me.nowhere.else with ESMTP id 632BD5758 for ; Sun, 21 Oct 2007 19:38:21 +1000 -Received: from oaamta05sl.mx.bigpond.com by omta05sl.mx.bigpond.com with ESMTP id <20071021093820.HSPC16667.omta05sl.mx.bigpond.com@oaamta05sl.mx.bigpond.com> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -Reply-To: Mikel Lindsaar -To: mikel@me.nowhere -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook -Subject: Another PDF -Mime-Version: 1.0 -Content-Type: multipart/mixed; - boundary="----=_Part_2192_32400445.1115745999735" -X-Virus-Scanned: amavisd-new at textdrive.com - -------=_Part_2192_32400445.1115745999735 -Content-Type: text/plain; charset=ISO-8859-1 -Content-Transfer-Encoding: quoted-printable -Content-Disposition: inline - -Just attaching another PDF, here, to see what the message looks like, -and to see if I can figure out what is going wrong here. - -------=_Part_2192_32400445.1115745999735 -Content-Type: application/pdf; name="broken.pdf" -Content-Transfer-Encoding: base64 -Content-Disposition: attachment; filename="broken.pdf" - -JVBERi0xLjQNCiXk9tzfDQoxIDAgb2JqDQo8PCAvTGVuZ3RoIDIgMCBSDQogICAvRmlsdGVyIC9G -bGF0ZURlY29kZQ0KPj4NCnN0cmVhbQ0KeJy9Wt2KJbkNvm/od6jrhZxYln9hWEh2p+8HBvICySaE -ycLuTV4/1ifJ9qnq09NpSBimu76yLUuy/qzqcPz7+em3Ixx/CDc6CsXxs3b5+fvfjr/8cPz6/BRu -rbfAx/n3739/fuJylJ5u5fjX81OuDr4deK4Bz3z/aDP+8fz0yw8g0Ofq7ktr1Mn+u28rvhy/jVeD -QSa+9YNKHP/pxjvDNfVAx/m3MFz54FhvTbaseaxiDoN2LeMVMw+yA7RbHSCDzxZuaYB2E1Yay7QU -x89vz0+tyFDKMlAHK5yqLmnjF+c4RjEiQIUeKwblXMe+AsZjN1J5yGQL5DHpDHksurM81rF6PKab -gK6zAarIDzIiUY23rJsN9iorAE816aIu6lsgAdQFsuhhkHOUFgVjp2GjMqSewITXNQ27jrMeamkg -1rPI3iLWG2CIaSBB+V1245YVRICGbbpYKHc2USFDl6M09acQVQYhlwIrkBNLISvXhGlF1wi5FHCw -wxZkoGNJlVeJCEsqKA+3YAV5AMb6KkeaqEJQmFKKQU8T1pRi2ihE1Y4CDrqoYFFXYjJJOatsyzuI -8SIlykuxKTMibWK8H1PgEvqYgs4GmQSrEjJAalgGirIhik+p4ZQN9E3ETFPAHE1b8pp1l/0Rc1gl -fQs0ABWvyoZZzU8VnPXwVVcO9BEsyjEJaO6eBoZRyKGlrKoYoOygA8BGIzgwN3RQ15ouigG5idZQ -fx2U4Db2CqiLO0WHAZoylGiCAqhniNQjFjQPSkmjwfNTgQ6M1Ih+eWo36wFmjIxDJZiGUBiWsAyR -xX3EekGOizkGI96Ol9zVZTAivikURhRsHh2E3JhWMpSTZCnnonrLhMCodgrNcgo4uyJUJc6qnVss -nrGd1Ptr0YwisCOYyIbUwVjV4xBUNLbguSO2YHujonAMJkMdSI7bIw91Akq2AUlMUWGFTMAOamjU -OvZQCxIkY2pCpMFo/IwLdVLHs6nddwTRrgoVbvLU9eB0G4EMndV0TNoxHbt3JBWwK6hhv3iHfDtF -yokB302IpEBTnWICde4uYc/1khDbSIkQopO6lcqamGBu1OSE3N5IPSsZX00CkSHRiiyx6HQIShsS -HSVNswdVsaOUSAWq9aYhDtGDaoG5a3lBGkYt/lFlBFt1UqrYnzVtUpUQnLiZeouKgf1KhRBViRRk -ExepJCzTwEmFDalIRbLEGtw0gfpESOpIAF/NnpPzcVCG86s0g2DuSyd41uhNGbEgaSrWEXORErbw -------=_Part_2192_32400445.1115745999735-- - diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_nested_attachment b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_nested_attachment deleted file mode 100644 index 429c408c5..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_nested_attachment +++ /dev/null @@ -1,100 +0,0 @@ -From jamis@37signals.com Thu Feb 22 11:20:31 2007 -Mime-Version: 1.0 (Apple Message framework v752.3) -Message-Id: <2CCE0408-10C7-4045-9B16-A1C11C31469B@37signals.com> -Content-Type: multipart/signed; - micalg=sha1; - boundary=Apple-Mail-42-587703407; - protocol="application/pkcs7-signature" -To: Jamis Buck -Subject: Testing attachments -From: Jamis Buck -Date: Thu, 22 Feb 2007 11:20:31 -0700 - - ---Apple-Mail-42-587703407 -Content-Type: multipart/mixed; - boundary=Apple-Mail-41-587703287 - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: 7bit -Content-Type: text/plain; - charset=US-ASCII; - format=flowed - -Here is a test of an attachment via email. - -- Jamis - - ---Apple-Mail-41-587703287 -Content-Transfer-Encoding: base64 -Content-Type: image/png; - x-unix-mode=0644; - name=byo-ror-cover.png -Content-Disposition: inline; - filename=truncated.png - -iVBORw0KGgoAAAANSUhEUgAAAKUAAADXCAYAAAB7wZEQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz -AAALEgAACxIB0t1+/AAAABd0RVh0Q3JlYXRpb24gVGltZQAxLzI1LzIwMDeD9CJVAAAAGHRFWHRT -b2Z0d2FyZQBBZG9iZSBGaXJld29ya3NPsx9OAAAyBWlUWHRYTUw6Y29tLmFkb2JlLnhtcDw/eHBh -Y2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1l -dGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1j -MDIwIDEuMjU1NzE2LCBUdWUgT2N0IDEwIDIwMDYgMjM6MTY6MzQiPgogICA8cmRmOlJERiB4bWxu -czpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAg -ICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0 -dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFk -b2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVE -YXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpN -b2RpZnlEYXRlPjIwMDctMDEtMjVUMDU6Mjg6MjFaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9y -ZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAg -ICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAg -ICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0 -hhojpmnJMfaYFmSkXWg5PGCmHXVj/c9At0hSK2xGdd8F3muk0VFjb4f5Ue0ksQ8qAcq0delaXhdb -DjKNnF+3B3t9kObZYmk7AZgWYqO9anpR3wpM9sQ5XslB9a+kWyTtNb0fOmudzGHfPFBQDKesyycm -DBL7Cw5bXjIEuci+SSOm/LYnXDZu6iuPEj8lYBb+OU8xx1f9m+e5rhJiYKqjo5vHfiZp+VUkW9xc -Ufd6JHNWc47PkQqb9ie3SLEZB/ZqyAssiqURY+G35iOMZUrHbasHnb80QAPv9FHtAbJIyro7bi5b -ai2TEAKen5+LJNWrglZjm3UbZvt7KryA2J5b5J1jZF8kL6GzvG1Zqx54Y1y7J7n20wMOt9frG2sW -uwGP07kNz3732vf6bfvAvLldfS+9fts2euXY37D+R29FGZdlnhzV4TTFmPJduBP2RbNNua4rTqcT -Qt7Xy1KUB0AHSdP5AZQYvHZg7WD1XvYeMO1A9HhZPqMX5KXbMBrn2efxns/ee21674efxz4Tp/fq -2HZ648dgYaC1i3Vq1IbNPq3PvDTPezY9FaRISjvnzWqdgcWN8EJgjnNq+Z7ktOm9l2Nfth28EZi4 -bG/we5JwxM+Tql47/D/X6b38I8/RyxvxPJrX6zvQbo3h9jyJx+C0ALX327QETHl5eYlaYCT5rPTb -+5/rAq26t3lKIxV/p88hq6ptngdgCzoPjJqndiLfc/6y5A14WeDFGNPct4iUsJBV2bYzLEV7m83s -6Rp63VPhHKC/g/LzaU9qexJRr56043JWinqAtfZqsSm1sjoznthl54dtCqv+uL4nIY+oYWuc3+nH -kGfn8b0HQpvOYLQAZUDanbJs3jQhITZEgdarZK+cO6ySlL13rut5nFaN23s7u3Snz6eRPTkCoc2/ -Vp1zHfZVFpZ87FiMVLV1iqyK5rlzfji2GzjfDsodlD+Weo5UD4h6PwKqzQMqID0tq2VjjFVSMpis -ZLRAs7sePZBZAHI+gIanB8I7MD+femAceeUe2Kxa5jS950kZ1p5eNEdeX1+jFmSpZ+1EdWCsDcne -NPNgUHNw3aYpnzv9PGTX0uo94EtN9qq1rOdxe3kc79T8ukeHJJ8Fnxej6qlylbLLsjQLOy6Xy2a1 -kefs/N+nM7+S7IG5/E5Yc7F003pWErLjbH0O5cGadiMptSB/DZ5U5DI9yeg5MFYyMj8lC/Y7/Xjq -OZlWcnpg9aQfXz2HRq+Wn5xOp6gN8tWq8R44e2pfyzLYemEgprst+XXk2Zj2nXlbsG05BprndTMv -C3QRaXczshhVsHnMgfYn80Y2g5JureA6wBasPeP7LkE/jvZMJAaf/g/U2RelHsisvan5FqweIAHg -Pwc7L68GxvVDAAAAAElFTkSuQmCC - ---Apple-Mail-41-587703287-- - ---Apple-Mail-42-587703407 -Content-Transfer-Encoding: base64 -Content-Type: application/pkcs7-signature; - name=smime.p7s -Content-Disposition: attachment; - filename=smime.p7s - -MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGJzCCAuAw -ggJJoAMCAQICEFjnFNYXwDEZRWY5EkfzopUwDQYJKoZIhvcNAQEFBQAwYjELMAkGA1UEBhMCWkEx -JTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4xLDAqBgNVBAMTI1RoYXd0ZSBQ -ZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBMB4XDTA2MDkxMjE3MDExMloXDTA3MDkxMjE3MDEx -MlowRTEfMB0GA1UEAxMWVGhhd3RlIEZyZWVtYWlsIE1lbWJlcjEiMCAGCSqGSIb3DQEJARYTamFt -aXNAMzdzaWduYWxzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAO2A9JeOFIFJ -G6z8pTcAldrZ2nMe+Xb1tNrbHgoVzN/QhHXM4qst2Ml93cmFLjMmwG7P9RJeU4oNx+jTqVoBB7NV -Ne1/o56Do0KhfMZ9iUDQdPLbkZMq4EEpFMdm6PyM3muRKwPhj66iAWe/osCb8DowUK2f66vaRx0Z -Y0MQHIIrXE02Ta4IfAhIfPqBLkZ4WgTYBHN9vMdYea1jF0GO4gqGk1wqwb3yxv2QMYMbwJ6SI+k/ -ZjkSR/OilTCBhwYLKoZIhvcNAQkQAgsxeKB2MGIxCzAJBgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3 -dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYDVQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1h -aWwgSXNzdWluZyBDQQIQWOcU1hfAMRlFZjkSR/OilTANBgkqhkiG9w0BAQEFAASCAQCfwQiC3v6/ -yleRDGv3bJ4nQYQ+c3mz3+mn3Xi6uU35n3piwxZZaWRdmLyiXPvU+QReHpSf3l2qsEZM3sdE0XF9 -eRul/+QTFJcDNXOEAxG1zC2Gpz+6c6RrX4Ou12Pwkp+pNrZWTSY/mZgdqcArupOBcZi7qBjoWcy5 -wb54dfvSSjrjmqLbkH/E8ww/6gGQuU/xXpAUZgUrTmQHrNKeIdSh5oDkOxFaFWvnmb8Z/2ixKqW/ -Ux6WqamyvBtTs/5YBEtnpZOk+uVoscYEUBhU+DVJ2OSvTdXSivMtBdXmGTsG22k+P1NGUHi/A7ev -xPaO0uk4V8xyjNlN4HPuGpkrlXwPAAAAAAAA - ---Apple-Mail-42-587703407-- diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_partially_quoted_subject b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_partially_quoted_subject deleted file mode 100644 index e86108da1..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_partially_quoted_subject +++ /dev/null @@ -1,14 +0,0 @@ -From jamis@37signals.com Mon May 2 16:07:05 2005 -Mime-Version: 1.0 (Apple Message framework v622) -Content-Transfer-Encoding: base64 -Message-Id: -Content-Type: text/plain; - charset=EUC-KR; - format=flowed -To: jamis@37signals.com -From: Jamis Buck -Subject: Re: Test: =?UTF-8?B?Iua8ouWtlyI=?= mid =?UTF-8?B?Iua8ouWtlyI=?= tail -Date: Mon, 2 May 2005 16:07:05 -0600 - -tOu6zrrQwMcguLbC+bChwfa3ziwgv+y4rrTCIMfPs6q01MC7ILnPvcC0z7TZLg0KDQrBpiDAzLin -wLogSmFtaXPA1LTPtNku diff --git a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_quoted_illegal_boundary b/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_quoted_illegal_boundary deleted file mode 100644 index 2c4e2d549..000000000 --- a/vendor/tmail-1.2.3.1/test/fixtures/raw_email_with_quoted_illegal_boundary +++ /dev/null @@ -1,58 +0,0 @@ -From email_test@me.nowhere -Return-Path: -Received: from omta05sl.mx.bigpond.com by me.nowhere.else with ESMTP id 632BD5758 for ; Sun, 21 Oct 2007 19:38:21 +1000 -Received: from oaamta05sl.mx.bigpond.com by omta05sl.mx.bigpond.com with ESMTP id <20071021093820.HSPC16667.omta05sl.mx.bigpond.com@oaamta05sl.mx.bigpond.com> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Received: from mikel091a by oaamta05sl.mx.bigpond.com with SMTP id <20071021093820.JFMT24025.oaamta05sl.mx.bigpond.com@mikel091a> for ; Sun, 21 Oct 2007 19:38:20 +1000 -Date: Sun, 21 Oct 2007 19:38:13 +1000 -From: Mikel Lindsaar -Reply-To: Mikel Lindsaar -To: mikel@me.nowhere -Message-Id: <009601c813c6$19df3510$0437d30a@mikel091a> -Subject: Testing outlook -Mime-Version: 1.0 -Content-Type: multipart/alternative; boundary="----=_NextPart_000_0093_01C81419.EB75E850" -X-Get_mail_default: mikel@me.nowhere.else -X-Priority: 3 -X-Original-To: mikel@me.nowhere -X-Mailer: Microsoft Outlook Express 6.00.2900.3138 -Delivered-To: mikel@me.nowhere -X-Mimeole: Produced By Microsoft MimeOLE V6.00.2900.3138 -X-Msmail-Priority: Normal - -This is a multi-part message in MIME format. - - -------=_NextPart_000_0093_01C81419.EB75E850 -Content-Type: text/plain; charset=iso-8859-1 -Content-Transfer-Encoding: Quoted-printable - -Hello -This is an outlook test - -So there. - -Me. - -------=_NextPart_000_0093_01C81419.EB75E850 -Content-Type: text/html; charset=iso-8859-1 -Content-Transfer-Encoding: Quoted-printable - - - - - - - - -
Hello
-
This is an outlook=20 -test
-
 
-
So there.
-
 
-
Me.
- - -------=_NextPart_000_0093_01C81419.EB75E850-- - diff --git a/vendor/tmail-1.2.3.1/test/kcode.rb b/vendor/tmail-1.2.3.1/test/kcode.rb deleted file mode 100644 index ca09de451..000000000 --- a/vendor/tmail-1.2.3.1/test/kcode.rb +++ /dev/null @@ -1,14 +0,0 @@ -module Test - module Unit - class TestCase - def kcode(code) - begin - TMail.KCODE = code - yield - ensure - TMail.KCODE = 'NONE' - end - end - end - end -end diff --git a/vendor/tmail-1.2.3.1/test/temp_test_one.rb b/vendor/tmail-1.2.3.1/test/temp_test_one.rb deleted file mode 100644 index 8bccbad5e..000000000 --- a/vendor/tmail-1.2.3.1/test/temp_test_one.rb +++ /dev/null @@ -1,46 +0,0 @@ -$:.unshift File.dirname(__FILE__) -require 'test_helper' -require 'tmail' -require 'kcode' -require 'time' - -class TestMail < Test::Unit::TestCase - include TMail::TextUtils - - def setup - @mail = TMail::Mail.new - end - - def lf( str ) - str.gsub(/\n|\r\n|\r/) { "\n" } - end - - def crlf( str ) - str.gsub(/\n|\r\n|\r/) { "\r\n" } - end - - def test_MIME - # FIXME: test more. - - kcode('EUC') { - mail = TMail::Mail.parse('From: hoge@example.jp (=?iso-2022-jp?B?GyRCJUYlOSVIGyhC?=)') - assert_not_nil mail['From'] - - expected = "\245\306\245\271\245\310" - if expected.respond_to? :force_encoding - expected.force_encoding(mail['From'].comments.first.encoding) - end - assert_equal [expected], mail['From'].comments - - expected = "From: hoge@example.jp (\245\306\245\271\245\310)\n\n" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, mail.to_s - assert_equal expected, mail.decoded - - expected = "From: hoge@example.jp (=?iso-2022-jp?B?GyRCJUYlOSVIGyhC?=)\r\n\r\n" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, mail.encoded - } - end - -end diff --git a/vendor/tmail-1.2.3.1/test/test_address.rb b/vendor/tmail-1.2.3.1/test/test_address.rb deleted file mode 100644 index 7d7a610c7..000000000 --- a/vendor/tmail-1.2.3.1/test/test_address.rb +++ /dev/null @@ -1,1194 +0,0 @@ -$:.unshift File.dirname(__FILE__) -require 'test_helper' -require 'tmail/address' - -class TestAddress < Test::Unit::TestCase - - def test_s_new - a = TMail::Address.new(%w(aamine), %w(loveruby net)) - assert_instance_of TMail::Address, a - assert_nil a.phrase - assert_equal [], a.routes - assert_equal 'aamine@loveruby.net', a.spec - end - - def test_local - [ [ ['aamine'], 'aamine' ], - [ ['Minero Aoki'], '"Minero Aoki"' ], - [ ['!@#$%^&*()'], '"!@#$%^&*()"' ], - [ ['a','b','c'], 'a.b.c' ] - - ].each_with_index do |(words, ok), idx| - a = TMail::Address.new(words, nil) - assert_equal ok, a.local, "case #{idx+1}: #{ok.inspect}" - end - end - - def test_domain - [ [ ['loveruby','net'], 'loveruby.net' ], - [ ['love ruby','net'], '"love ruby".net' ], - [ ['!@#$%^&*()'], '"!@#$%^&*()"' ], - [ ['[192.168.1.1]'], '[192.168.1.1]' ] - - ].each_with_index do |(words, ok), idx| - a = TMail::Address.new(%w(test), words) - assert_equal ok, a.domain, "case #{idx+1}: #{ok.inspect}" - end - end - - def test_EQUAL # == - a = TMail::Address.new(%w(aamine), %w(loveruby net)) - assert_equal a, a - - b = TMail::Address.new(%w(aamine), %w(loveruby net)) - b.phrase = 'Minero Aoki' - assert_equal a, b - - b.routes.push 'a' - assert_equal a, b - end - - def test_hash - a = TMail::Address.new(%w(aamine), %w(loveruby net)) - assert_equal a.hash, a.hash - - b = TMail::Address.new(%w(aamine), %w(loveruby net)) - b.phrase = 'Minero Aoki' - assert_equal a.hash, b.hash - - b.routes.push 'a' - assert_equal a.hash, b.hash - end - - def test_dup - a = TMail::Address.new(%w(aamine), %w(loveruby net)) - a.phrase = 'Minero Aoki' - a.routes.push 'someroute' - - b = a.dup - assert_equal a, b - - b.routes.push 'anyroute' - assert_equal a, b - - b.phrase = 'AOKI, Minero' - assert_equal a, b - end - - def test_inspect - a = TMail::Address.new(%w(aamine), %w(loveruby net)) - a.inspect - a.phrase = 'Minero Aoki' - a.inspect - a.routes.push 'a' - a.routes.push 'b' - a.inspect - end - - - def validate_case__address( str, ok ) - a = TMail::Address.parse(str) - assert_equal ok[:display_name], a.phrase, str.inspect + " (phrase)\n" - assert_equal ok[:address], a.spec, str.inspect + " (spec)\n" - assert_equal ok[:local], a.local, str.inspect + " (local)\n" - assert_equal ok[:domain], a.domain, str.inspect + " (domain)\n" - # assert_equal ok[:format], a.to_s, str.inspect + " (to_s)\n" - end - - def validate_case__group( str, groupname, addrlist ) - g = TMail::Address.parse(str) - assert_instance_of TMail::AddressGroup, g - assert_equal groupname, g.name - assert_equal addrlist.size, g.size - addrlist.each_with_index do |ok, idx| - a = g[idx] - assert_equal ok[:display_name], a.phrase, str.inspect + " (phrase)\n" - assert_equal ok[:address], a.spec, str.inspect + " (spec)\n" - assert_equal ok[:local], a.local, str.inspect + " (local)\n" - assert_equal ok[:domain], a.domain, str.inspect + " (domain)\n" - # assert_equal ok[:format], a.to_s, str.inspect + " (to_s)\n" - end - end - - def test_parse__address - # - # basic tests - # - - validate_case__address 'aamine@loveruby.net', - :display_name => nil, - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'aamine@loveruby.net' - - validate_case__address 'Minero Aoki ', - :display_name => 'Minero Aoki', - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - - validate_case__address 'Minero Aoki', - :display_name => 'Minero Aoki', - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - - validate_case__address '"Minero Aoki" ', - :display_name => 'Minero Aoki', - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - - # integer in domain - validate_case__address 'Minero Aoki', - :display_name => 'Minero Aoki', - :address => 'aamine@0246.loveruby.net', - :local => 'aamine', - :domain => '0246.loveruby.net', - :format => 'Minero Aoki ' - - end - - def test_parse__dot - validate_case__address 'hoge..test@docomo.ne.jp', - :display_name => nil, - :address => 'hoge..test@docomo.ne.jp', - :local => 'hoge..test', - :domain => 'docomo.ne.jp', - :format => 'hoge..test@docomo.ne.jp' - - validate_case__address 'foo.bar.@docomo.ne.jp', - :display_name => nil, - :address => 'foo.bar.@docomo.ne.jp', - :local => 'foo.bar.', - :domain => 'docomo.ne.jp', - :format => 'foo.bar.@docomo.ne.jp' - end - - def test_parse__mime - # "\306\374\313\334\270\354" - # "\223\372\226{\214\352" - # "\e$BF|K\\8l\e(B" - # GyRCRnxLXDhsGyhC - - TMail.KCODE = 'NONE' - validate_case__address\ - '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ', - :display_name => "\e$BF|K\\8l\e(B", - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - - validate_case__address\ - '=?iso-2022-jp?Q?=1b=24=42=46=7c=4b=5c=38=6c=1b=28=42?= ', - :display_name => "\e$BF|K\\8l\e(B", - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - - TMail.KCODE = 'EUC' - expected = "\306\374\313\334\270\354" - expected.force_encoding('EUC-JP') if expected.respond_to? :force_encoding - validate_case__address\ - '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ', - :display_name => expected, - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - - validate_case__address\ - '=?iso-2022-jp?Q?=1b=24=42=46=7c=4b=5c=38=6c=1b=28=42?= ', - :display_name => expected, - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - - TMail.KCODE = 'SJIS' - expected = "\223\372\226{\214\352" - expected.force_encoding('Windows-31J') if expected.respond_to? :force_encoding - validate_case__address\ - '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ', - :display_name => expected, - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - - validate_case__address\ - '=?iso-2022-jp?Q?=1b=24=42=46=7c=4b=5c=38=6c=1b=28=42?= ', - :display_name => expected, - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => '=?iso-2022-jp?B?GyRCRnxLXDhsGyhC?= ' - end - - def test_parse__rawjp - begin - TMail.KCODE = 'EUC' - _test_parse__euc - _test_parse__jis - ensure - TMail.KCODE = 'NONE' - end - end - - def _test_parse__euc - # raw EUC-JP - validate_case__address\ - "\244\242\244\252\244\255 \244\337\244\315\244\355\244\246 ", - :display_name => "\244\242\244\252\244\255 \244\337\244\315\244\355\244\246", - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => "\244\242\244\252\244\255 \244\337\244\315\244\355\244\246 " - end - - def _test_parse__jis - # raw iso-2022-jp string in comment - validate_case__address\ - "Minero Aoki (\e$B@DLZJvO:\e(B) ", - :display_name => "Minero Aoki (\e$B@DLZJvO:\e(B)", - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - - validate_case__address\ - "Minero Aoki (\e$B@DLZJvO:\e(B )", - :display_name => 'Minero Aoki', - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - - # raw iso-2022-jp string in quoted-word (it includes backslash) - validate_case__address\ - %Q["\e$BF|K\\8l\e(B" ], - :display_name => "\e$BF|K\\8l\e(B", - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' - end - - def OFF_test_parse__group - validate_case__group 'Softica: Minero Aoki ;', - 'Softica', - { :display_name => 'Minero Aoki', - :address => 'aamine@loveruby.net', - :local => 'aamine', - :domain => 'loveruby.net', - :format => 'Minero Aoki ' } - end - - - # - # The following test cases are quoted from RubyMail 0.2 - # (written by Matt Armstrong), with some modifications. - # The copyright notice of the original file is: - # - # Copyright (c) 2001 Matt Armstrong. All rights reserved. - # - # Permission is granted for use, copying, modification, - # distribution, and distribution of modified versions of this work - # as long as the above copyright notice is included. - # - - def test_parse__rfc2822 - - validate_case__address\ - '"Joe Q. Public" ', - :name => 'Joe Q. Public', - :display_name => 'Joe Q. Public', - :address => 'john.q.public@example.com', - :comments => nil, - :domain => 'example.com', - :local => 'john.q.public', - :format => '"Joe Q. Public" ' - - validate_case__address\ - 'Who? ', - :name => 'Who?', - :display_name => 'Who?', - :address => 'one@y.test', - :comments => nil, - :domain => 'y.test', - :local => 'one', - :format => 'Who? ' - - validate_case__address\ - '"Giant; \"Big\" Box" ', - :name => 'Giant; "Big" Box', - :display_name => 'Giant; "Big" Box', - :address => 'sysservices@example.net', - :comments => nil, - :domain => 'example.net', - :local => 'sysservices', - :format => '"Giant; \"Big\" Box" ' - - validate_case__address\ - '"Mary Smith: Personal Account" ', - :name => 'Mary Smith: Personal Account', - :display_name => 'Mary Smith: Personal Account', - :address => 'smith@home.example', - :comments => nil, - :domain => 'home.example', - :local => 'smith', - :format => '"Mary Smith: Personal Account" ' - - validate_case__address\ - 'Pete(A wonderful \) chap) ', - :name => 'Pete', - :display_name => 'Pete', - :address => 'pete@silly.test', - :comments => ['A wonderful ) chap', 'his account', 'his host'], - :domain => 'silly.test', - :local => 'pete', - #:format => 'Pete (A wonderful \) chap) (his account) (his host)' - :format => 'Pete ' - - validate_case__address\ - "Chris Jones ", - :name => 'Chris Jones', - :display_name => 'Chris Jones', - :address => 'c@public.example', - :comments => ['Chris\'s host.'], - :domain => 'public.example', - :local => 'c', - #:format => 'Chris Jones (Chris\'s host.)' - :format => 'Chris Jones ' - - validate_case__address\ - 'Joe Q. Public ', - :name => 'Joe Q.Public', - :display_name => 'Joe Q.Public', - :address => 'john.q.public@example.com', - :comments => nil, - :domain => 'example.com', - :local => 'john.q.public', - :format => '"Joe Q.Public" ' - - validate_case__address\ - 'Mary Smith <@machine.tld:mary@example.net>', - :name => 'Mary Smith', - :display_name => 'Mary Smith', - :address => 'mary@example.net', - :comments => nil, - :domain => 'example.net', - :local => 'mary', - #:format => 'Mary Smith ' - :format => 'Mary Smith <@machine.tld:mary@example.net>' - - validate_case__address\ - ' jdoe@test . example', - :name => nil, - :display_name => nil, - :address => 'jdoe@test.example', - :comments => nil, - :domain => 'test.example', - :local => 'jdoe', - :format => 'jdoe@test.example' - - validate_case__address\ - 'John Doe ', - :name => 'John Doe', - :display_name => 'John Doe', - :address => 'jdoe@machine.example', - :comments => ['comment'], - :domain => 'machine.example', - :local => 'jdoe', - #:format => 'John Doe (comment)' - :format => 'John Doe ' - - validate_case__address\ - "Mary Smith\n\r \n ", - :name => 'Mary Smith', - :display_name => 'Mary Smith', - :address => 'mary@example.net', - :comments => nil, - :domain => 'example.net', - :local => 'mary', - :format => 'Mary Smith ' - end - - - def test_parse__rfc822 - - validate_case__address\ - '":sysmail"@ Some-Group. Some-Org', - :name => nil, - :display_name => nil, - #:address => ':sysmail@Some-Group.Some-Org', - :address => '":sysmail"@Some-Group.Some-Org', - :comments => nil, - :domain => 'Some-Group.Some-Org', - #:local => ':sysmail', - :local => '":sysmail"', - :format => '":sysmail"@Some-Group.Some-Org' - - validate_case__address\ - 'Muhammed.(I am the greatest) Ali @(the)Vegas.WBA', - :name => 'the', - :display_name => nil, - :address => 'Muhammed.Ali@Vegas.WBA', - :comments => ['I am the greatest', 'the'], - :domain => 'Vegas.WBA', - :local => 'Muhammed.Ali', - #:format => 'Muhammed.Ali@Vegas.WBA (I am the greatest) (the)' - :format => 'Muhammed.Ali@Vegas.WBA' - - - validate_case__group\ - 'A Group:Chris Jones ,joe@where.test,John ;', - 'A Group', - [ { :name => 'Chris Jones', - :display_name => 'Chris Jones', - :address => 'c@a.test', - :comments => nil, - :domain => 'a.test', - :local => 'c', - :format => 'Chris Jones ' }, - { :name => nil, - :display_name => nil, - :address => 'joe@where.test', - :comments => nil, - :domain => 'where.test', - :local => 'joe', - :format => 'joe@where.test' }, - { :name => 'John', - :display_name => 'John', - :address => 'jdoe@one.test', - :comments => nil, - :domain => 'one.test', - :local => 'jdoe', - :format => 'John ' } - ] - - validate_case__group\ - 'Undisclosed recipients:;', - 'Undisclosed recipients', - [ ] - - validate_case__group\ - 'undisclosed recipients: ;', - 'undisclosed recipients', - [] - - validate_case__group\ - "A Group(Some people)\r\n :Chris Jones ,\r\n joe@example.org", - 'A Group', - [ - { :name => 'Chris Jones', - :display_name => 'Chris Jones', - :address => 'c@public.example', - :comments => ['Chris\'s host.'], - :domain => 'public.example', - :local => 'c', - :format => 'Chris Jones (Chris\'s host.)' }, - { :name => nil, - :display_name => nil, - :address => 'joe@example.org', - :comments => nil, - :domain => 'example.org', - :local => 'joe', - :format => 'joe@example.org' } - ] - - validate_case__group\ - '(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ;', - 'Undisclosed recipients', - [] - end - - - def test_parse__mailtools - # - # The following are from the Perl MailTools module version 1.40 - # - validate_case__address\ - '"Joe & J. Harvey" ', - :name => 'Joe & J. Harvey', - :display_name => 'Joe & J. Harvey', - :address => 'ddd@Org', - :comments => nil, - :domain => 'Org', - :local => 'ddd', - :format => '"Joe & J. Harvey" ' - - validate_case__address\ - '"spickett@tiac.net" ', - :name => 'spickett@tiac.net', - :display_name => 'spickett@tiac.net', - :address => 'Sean.Pickett@zork.tiac.net', - :comments => nil, - :domain => 'zork.tiac.net', - :local => 'Sean.Pickett', - :format => '"spickett@tiac.net" ' - - validate_case__address\ - 'rls@intgp8.ih.att.com (-Schieve,R.L.)', - :name => '-Schieve,R.L.', - :display_name => nil, - :address => 'rls@intgp8.ih.att.com', - :comments => ['-Schieve,R.L.'], - :domain => 'intgp8.ih.att.com', - :local => 'rls', - #:format => 'rls@intgp8.ih.att.com (-Schieve,R.L.)' - :format => 'rls@intgp8.ih.att.com' - - validate_case__address\ - 'jrh%cup.portal.com@portal.unix.portal.com', - :name => nil, - :display_name => nil, - :address => 'jrh%cup.portal.com@portal.unix.portal.com', - :comments => nil, - :domain => 'portal.unix.portal.com', - :local => 'jrh%cup.portal.com', - :format => 'jrh%cup.portal.com@portal.unix.portal.com' - - validate_case__address\ - 'astrachan@austlcm.sps.mot.com (\'paul astrachan/xvt3\')', - :name => '\'paul astrachan/xvt3\'', - :display_name => nil, - :address => 'astrachan@austlcm.sps.mot.com', - :comments => ["'paul astrachan/xvt3'"], - :domain => 'austlcm.sps.mot.com', - :local => 'astrachan', - #:format => "astrachan@austlcm.sps.mot.com ('paul astrachan/xvt3')" - :format => 'astrachan@austlcm.sps.mot.com' - - validate_case__address\ - 'TWINE57%SDELVB.decnet@SNYBUF.CS.SNYBUF.EDU (JAMES R. TWINE - THE NERD)', - :name => 'JAMES R. TWINE - THE NERD', - :display_name => nil, - :address => 'TWINE57%SDELVB.decnet@SNYBUF.CS.SNYBUF.EDU', - :comments => ['JAMES R. TWINE - THE NERD'], - :domain => 'SNYBUF.CS.SNYBUF.EDU', - :local => 'TWINE57%SDELVB.decnet', - :format => 'TWINE57%SDELVB.decnet@SNYBUF.CS.SNYBUF.EDU' - #'TWINE57%SDELVB.decnet@SNYBUF.CS.SNYBUF.EDU (JAMES R. TWINE - THE NERD)' - - validate_case__address\ - 'David Apfelbaum ', - :name => 'David Apfelbaum', - :display_name => 'David Apfelbaum', - :address => 'da0g+@andrew.cmu.edu', - :comments => nil, - :domain => 'andrew.cmu.edu', - :local => 'da0g+', - :format => 'David Apfelbaum ' - - validate_case__address\ - '"JAMES R. TWINE - THE NERD" ', - :name => 'JAMES R. TWINE - THE NERD', - :display_name => 'JAMES R. TWINE - THE NERD', - :address => 'TWINE57%SDELVB%SNYDELVA.bitnet@CUNYVM.CUNY.EDU', - :comments => nil, - :domain => 'CUNYVM.CUNY.EDU', - :local => 'TWINE57%SDELVB%SNYDELVA.bitnet', - :format => - '"JAMES R. TWINE - THE NERD" ' - - validate_case__address\ - '/G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/@mhs-relay.ac.uk', - :name => nil, - :display_name => nil, - :address => '/G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/@mhs-relay.ac.uk', - :comments => nil, - :domain => 'mhs-relay.ac.uk', - :local => '/G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/', - :format => '/G=Owen/S=Smith/O=SJ-Research/ADMD=INTERSPAN/C=GB/@mhs-relay.ac.uk' - - validate_case__address\ - '"Stephen Burke, Liverpool" ', - :name => 'Stephen Burke, Liverpool', - :display_name => 'Stephen Burke, Liverpool', - :address => 'BURKE@vxdsya.desy.de', - :comments => nil, - :domain => 'vxdsya.desy.de', - :local => 'BURKE', - :format => '"Stephen Burke, Liverpool" ' - - validate_case__address\ - 'The Newcastle Info-Server ', - :name => 'The Newcastle Info-Server', - :display_name => 'The Newcastle Info-Server', - :address => 'info-admin@newcastle.ac.uk', - :comments => nil, - :domain => 'newcastle.ac.uk', - :local => 'info-admin', - :format => 'The Newcastle Info-Server ' - - validate_case__address\ - 'Suba.Peddada@eng.sun.com (Suba Peddada [CONTRACTOR])', - :name => 'Suba Peddada [CONTRACTOR]', - :display_name => nil, - :address => 'Suba.Peddada@eng.sun.com', - :comments => ['Suba Peddada [CONTRACTOR]'], - :domain => 'eng.sun.com', - :local => 'Suba.Peddada', - #:format => 'Suba.Peddada@eng.sun.com (Suba Peddada [CONTRACTOR])' - :format => 'Suba.Peddada@eng.sun.com' - - validate_case__address\ - 'Paul Manser (0032 memo) ', - :name => 'Paul Manser', - :display_name => 'Paul Manser', - :address => 'a906187@tiuk.ti.com', - :comments => ['0032 memo'], - :domain => 'tiuk.ti.com', - :local => 'a906187', - #:format => 'Paul Manser (0032 memo)' - :format => 'Paul Manser ' - - validate_case__address\ - '"gregg (g.) woodcock" ', - :name => 'gregg (g.) woodcock', - :display_name => 'gregg (g.) woodcock', - :address => 'woodcock@bnr.ca', - :comments => nil, - :domain => 'bnr.ca', - :local => 'woodcock', - :format => '"gregg (g.) woodcock" ' - - validate_case__address\ - 'Graham.Barr@tiuk.ti.com', - :name => nil, - :display_name => nil, - :address => 'Graham.Barr@tiuk.ti.com', - :comments => nil, - :domain => 'tiuk.ti.com', - :local => 'Graham.Barr', - :format => 'Graham.Barr@tiuk.ti.com' - - validate_case__address\ - 'a909937 (Graham Barr (0004 bodg))', - :name => 'Graham Barr (0004 bodg)', - :display_name => nil, - :address => 'a909937', - :comments => ['Graham Barr (0004 bodg)'], - :domain => nil, - :local => 'a909937', - #:format => 'a909937 (Graham Barr \(0004 bodg\))' - :format => 'a909937' - - validate_case__address\ - "david d `zoo' zuhn ", - :name => "david d `zoo' zuhn", - :display_name => "david d `zoo' zuhn", - :address => 'zoo@aggregate.com', - :comments => nil, - :domain => 'aggregate.com', - :local => 'zoo', - :format => "david d `zoo' zuhn " - - validate_case__address\ - '(foo@bar.com (foobar), ned@foo.com (nedfoo) ) ', - :name => 'foo@bar.com (foobar), ned@foo.com (nedfoo) ', - :display_name => "(foo@bar.com (foobar), ned@foo.com (nedfoo) )", - :address => 'kevin@goess.org', - :comments => ['foo@bar.com (foobar), ned@foo.com (nedfoo) '], - :domain => 'goess.org', - :local => 'kevin', - :format => 'kevin@goess.org' - #'kevin@goess.org (foo@bar.com \(foobar\), ned@foo.com \(nedfoo\) )' - end - - - def test_parse__pythonbuglist - # - # From Python address parsing bug list. - # This is valid according to RFC2822. - # - - validate_case__address\ - 'Amazon.com ', - :name => 'Amazon.com', - :display_name => 'Amazon.com', - :address => 'delivers-news2@amazon.com', - :comments => nil, - :domain => 'amazon.com', - :local => 'delivers-news2', - :format => '"Amazon.com" ' - - validate_case__address\ - "\r\n Amazon \r . \n com \t < delivers-news2@amazon.com > \n ", - :name => 'Amazon.com', - :display_name => 'Amazon.com', - :address => 'delivers-news2@amazon.com', - :comments => nil, - :domain => 'amazon.com', - :local => 'delivers-news2', - :format => '"Amazon.com" ' - - # From postfix-users@postfix.org - # Date: Tue, 13 Nov 2001 10:58:23 -0800 - # Subject: Apparent bug in strict_rfc821_envelopes (Snapshot-20010714) - validate_case__address\ - '"mailto:rfc"@monkeys.test', - :name => nil, - :display_name => nil, - #:address => 'mailto:rfc@monkeys.test', - :address => '"mailto:rfc"@monkeys.test', - :comments => nil, - :domain => 'monkeys.test', - #:local => 'mailto:rfc', - :local => '"mailto:rfc"', - :format => '"mailto:rfc"@monkeys.test' - - # An unquoted mailto:rfc will end up having the mailto: portion - # discarded as a group name. - validate_case__group\ - 'mailto:rfc@monkeys.test', - 'mailto', - [ - { :name => nil, - :display_name => nil, - :address => 'rfc@monkeys.test', - :comments => nil, - :domain => 'monkeys.test', - :local => 'rfc', - :format => 'rfc@monkeys.test' } - ] - - # From gnu.emacs.help - # Date: 24 Nov 2001 15:37:23 -0500 - validate_case__address\ - '"Stefan Monnier " ', - :name => 'Stefan Monnier ', - :display_name => 'Stefan Monnier ', - :address => 'monnier+gnu.emacs.help/news/@flint.cs.yale.edu', - :comments => nil, - :domain => 'flint.cs.yale.edu', - :local => 'monnier+gnu.emacs.help/news/', - :format => '"Stefan Monnier " ' - - validate_case__address\ - '"foo:" . bar@somewhere.test', - :name => nil, - :display_name => nil, - #:address => 'foo:.bar@somewhere.test', - :address => '"foo:".bar@somewhere.test', - :comments => nil, - :domain => 'somewhere.test', - #:local => 'foo:.bar', - :local => '"foo:".bar', - #:format => '"foo:.bar"@somewhere.test' - :format => '"foo:".bar@somewhere.test' - - validate_case__address\ - 'Some Dude <"foo:" . bar@somewhere.test>', - :name => 'Some Dude', - :display_name => 'Some Dude', - #:address => 'foo:.bar@somewhere.test', - :address => '"foo:".bar@somewhere.test', - :comments => nil, - :domain => 'somewhere.test', - #:local => 'foo:.bar', - :local => '"foo:".bar', - #:format => 'Some Dude <"foo:.bar"@somewhere.test>' - :format => 'Some Dude <"foo:".bar@somewhere.test>' - - validate_case__address\ - '"q\uo\ted"@example.com', - :name => nil, - :display_name => nil, - :address => 'quoted@example.com', - :comments => nil, - :domain => 'example.com', - :local => 'quoted', - :format => 'quoted@example.com' - - validate_case__address\ - 'Luke Skywalker <"use"."the.force"@space.test>', - :name => 'Luke Skywalker', - :display_name => 'Luke Skywalker', - #:address => 'use.the.force@space.test', - :address => 'use."the.force"@space.test', - :comments => nil, - :domain => 'space.test', - #:local => 'use.the.force', - :local => 'use."the.force"', - #:format => 'Luke Skywalker ' - :format => 'Luke Skywalker ' - - validate_case__address\ - 'Erik =?ISO-8859-1?Q?B=E5gfors?= ', - :name => 'Erik =?ISO-8859-1?Q?B=E5gfors?=', - :display_name => 'Erik =?ISO-8859-1?Q?B=E5gfors?=', - :address => 'erik@example.net', - :comments => nil, - :domain => 'example.net', - :local => 'erik', - :format => 'Erik =?ISO-8859-1?Q?B=E5gfors?= ' - end - - def test_parse__outofspec - -=begin - validate_case__address\ - 'bodg fred@tiuk.ti.com', - :name => nil, - :display_name => nil, - :address => 'bodg fred@tiuk.ti.com', - :comments => nil, - :domain => 'tiuk.ti.com', - :local => 'bodg fred', - :format => '"bodg fred"@tiuk.ti.com' - - validate_case__address\ - '', - :name => nil, - :display_name => nil, - :address => 'Investor Alert@example.com', - :comments => nil, - :domain => 'example.com', - :local => 'Investor Alert', - :format => '"Investor Alert"@example.com' -=end - - validate_case__address\ - '"" ', - :name => nil, - :display_name => nil, - :address => 'bob@example.com', - :comments => nil, - :domain => 'example.com', - :local => 'bob', - :format => 'bob@example.com' - - validate_case__address '"" <""@example.com>', - :name => nil, - :display_name => nil, - :address => '""@example.com', - :comments => nil, - :domain => 'example.com', - :local => '""', - :format => '""@example.com' - - assert_raise(TMail::SyntaxError) { - TMail::Address.parse '@example.com' - } - - validate_case__address\ - 'bob', - :name => nil, - :display_name => nil, - :address => 'bob', - :comments => nil, - :domain => nil, - :local => 'bob', - :format => 'bob' - - assert_raises(TMail::SyntaxError) { - TMail::Address.parse 'Undisclosed <>' - } - assert_raises(TMail::SyntaxError) { - TMail::Address.parse '"Mensagem Automatica do Terra" <>' - } - - # These test cases are meanful in Japanese charset context. - # validate_case(["\177", []]) - # validate_case(["\177\177\177", []]) - - end - - def test_parse__domainliteral - - validate_case__address\ - 'test@[domain]', - :name => nil, - :display_name => nil, - :address => 'test@[domain]', - :comments => nil, - :domain => '[domain]', - :local => 'test', - :format => '' - - validate_case__address\ - '<@[obsdomain]:test@[domain]>', - :name => nil, - :display_name => nil, - :address => 'test@[domain]', - :comments => nil, - :domain => '[domain]', - :local => 'test', - :format => '' - - validate_case__address\ - '<@[ob\]sd\\\\omain]:test@[dom\]ai\\\\n]>', - :name => nil, - :display_name => nil, - :address => 'test@[dom]ai\\n]', - :comments => nil, - :domain => '[dom]ai\\n]', - :local => 'test', - :format => '' - - # ALL 'route's have '@' prefix so this example is wrong. - #"Bob \r<@machine.tld \r,\n [obsdomain]\t:\ntest @ [domain]>", - validate_case__address\ - "Bob \r<@machine.tld \r,\n @[obsdomain]\t:\ntest @ [domain]>", - :name => 'Bob', - :display_name => 'Bob', - :address => 'test@[domain]', - :comments => nil, - :domain => '[domain]', - :local => 'test', - :format => 'Bob ' - end - - - def test_exhaustive() - - # We don't test every alphanumeric in atext -- assume that if a, m - # and z work, they all will. - atext = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a + - '!#$%&\'*+-/=?^_`{|}~'.split(//) #/ - boring = ('b'..'l').to_a + ('n'..'o').to_a + - ('p'..'y').to_a + ('B'..'L').to_a + ('N'..'O').to_a + - ('P'..'Y').to_a + ('1'..'4').to_a + ('6'..'8').to_a - - (atext - boring).each do |ch| - validate_case__address\ - "#{ch} <#{ch}@test>", - :name => ch, - :display_name => ch, - :address => "#{ch}@test", - :comments => nil, - :domain => 'test', - :local => ch, - :format => ch + ' <' + ch + '@test>' - end - - validate_case__address\ - atext.join('') + ' <' + atext.join('') + '@test>', - :name => atext.join(''), - :display_name => atext.join(''), - :address => atext.join('') + '@test', - :comments => nil, - :domain => 'test', - :local => atext.join(''), - :format => atext.join('') + ' <' + atext.join('') + '@test>' - - ascii = (0..127).collect {|i| i.chr } - whitespace = ["\r", "\n", ' ', "\t"] - # I remove ESC from this list because TMail is ESC sensitive. - # @ is explicitly tested below - qtext = ascii - (whitespace + ['"', '\\'] + ["\e"] + ["@"]) - ctext = ascii - (whitespace + ['(', ')', '\\'] + ["\e"] + ["@"]) - dtext = ascii - (whitespace + ['[', ']', '\\'] + ["\e"] + ["@"]) - - (qtext - atext).each do |ch| - validate_case__address\ - %Q("#{ch}" <"#{ch}"@test>), - :name => ch, - :display_name => ch, - :address => %Q("#{ch}"@test), - :comments => nil, - :domain => 'test', - :local => %Q("#{ch}"), - :format => %Q("#{ch}" <"#{ch}"@test>) - end - - ['"', "\\"].each do |ch| - validate_case__address\ - %Q("\\#{ch}" <"\\#{ch}"@test>), - :name => ch, - :display_name => ch, - :address => %Q("\\#{ch}"@test), - :comments => nil, - :domain => 'test', - :local => %Q("\\#{ch}"), - :format => %Q("\\#{ch}" <"\\#{ch}"@test>) - - end - - (ctext - boring).each do |ch| - validate_case__address\ - "bob@test (#{ch})", - :name => ch, - :display_name => nil, - :address => 'bob@test', - :comments => ["#{ch}"], - :domain => 'test', - :local => 'bob', - :format => "bob@test (#{ch})" - - validate_case__address\ - "bob@test (\\#{ch})", - :name => ch, - :display_name => nil, - :address => 'bob@test', - :comments => ["#{ch}"], - :domain => 'test', - :local => 'bob', - :format => "bob@test (#{ch})" - end - [')', '(', '\\'].each do |ch| - validate_case__address\ - "bob@test (\\#{ch})", - :name => ch, - :display_name => nil, - :address => 'bob@test', - :comments => ["#{ch}"], - :domain => 'test', - :local => 'bob', - :format => "bob@test (\\#{ch})" - end - - - (dtext - boring).each do |ch| - validate_case__address\ - "test@[\\#{ch}] (Sam)", - :name => "Sam", - :display_name => nil, - :address => 'test@[' + ch + ']', - :comments => ["Sam"], - :domain => '[' + ch + ']', - :local => 'test', - :format => " (Sam)" - - validate_case__address\ - "Sally ", - :name => 'Sally', - :display_name => 'Sally', - :address => "test@[#{ch}]", - :comments => nil, - :domain => "[#{ch}]", - :local => 'test', - :format => "Sally " - end - - validate_case__address\ - "test@[" + (dtext - boring).join('') + "]", - :name => nil, - :display_name => nil, - :address => 'test@[' + (dtext - boring).join('') + "]", - :comments => nil, - :domain => '[' + (dtext - boring).join('') + ']', - :local => 'test', - :format => '' - - validate_case__address\ - 'Bob ', - :name => "Bob", - :display_name => "Bob", - :address => 'test@[' + (dtext - boring).join('') + "]", - :comments => nil, - :domain => '[' + (dtext - boring).join('') + ']', - :local => 'test', - :format => 'Bob ' - - end - - def test_quoted_at_char_in_local() - - validate_case__address\ - %Q("@" <"@"@test>), - :name => "@", - :display_name => "@", - :address => %Q("@"@test), - :comments => nil, - :domain => 'test', - :local => %Q("@"), - :format => %Q("@" <"@"@test>) - - validate_case__address\ - %Q("@" <"me@me"@test>), - :name => "@", - :display_name => "@", - :address => %Q("me@me"@test), - :comments => nil, - :domain => 'test', - :local => %Q("me@me"), - :format => %Q("@" <"me@me"@test>) - - end - - def test_full_stop_as_last_char_in_display_name() - - validate_case__address\ - %Q(Minero A. ), - :name => "Minero A.", - :display_name => "Minero A.", - :address => %Q(aamine@loveruby.net), - :comments => nil, - :domain => 'loveruby.net', - :local => %Q(aamine), - :format => %Q("me@my_place" ) - - end - - def test_unquoted_at_char_in_name() - - validate_case__address\ - %Q(mikel@me.com ), - :name => "mikel@me.com", - :display_name => "mikel@me.com", - :address => %Q(lindsaar@you.net), - :comments => nil, - :domain => 'you.net', - :local => %Q(lindsaar), - :format => %Q("mikel@me.com" ) - - end - - def test_special_quote_quoting_at_char_in_string - string = 'mikel@me.com ' - result = '"mikel@me.com" ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quote_not_quoting_already_quoted_at_char_in_string - string = '"mikel@me.com" ' - result = '"mikel@me.com" ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quote_not_quoting_something_without_an_at_char_and_quoted - string = '"mikel" ' - result = '"mikel" ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quote_not_quoting_something_without_an_at_char_in_header - string = 'mikel ' - result = 'mikel ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quoting_a_trailing_dot - string = 'mikel. ' - result = '"mikel." ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quoting_a_trailing_dot_by_itself - string = 'mikel . ' - result = '"mikel ." ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quoting_a_trailing_dot_by_itself_already_quoted - string = '"mikel ." ' - result = '"mikel ." ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - - def test_special_quoting_a_trailing_dot_by_itself_quoted - string = 'mikel "." ' - result = 'mikel "." ' - assert_equal(result, TMail::Address.special_quote_address(string)) - end - -end diff --git a/vendor/tmail-1.2.3.1/test/test_attachments.rb b/vendor/tmail-1.2.3.1/test/test_attachments.rb deleted file mode 100644 index 496aead28..000000000 --- a/vendor/tmail-1.2.3.1/test/test_attachments.rb +++ /dev/null @@ -1,48 +0,0 @@ -require 'test_helper' -require 'tmail' - -class TestAttachments < Test::Unit::TestCase - - def test_attachment - mail = TMail::Mail.new - mail.mime_version = "1.0" - mail.set_content_type 'multipart', 'mixed', {'boundary' => 'Apple-Mail-13-196941151'} - mail.body =< nil, - :routes => [], - :spec => 'aamine@loveruby.net' }] - - validate_case 'Minero Aoki (comment)', - false, - 'Minero Aoki (comment)', - ['comment'], - [{ :phrase => 'Minero Aoki', - :routes => [], - :spec => 'aamine@loveruby.net' }] - - validate_case 'aamine@loveruby.net, , taro@softica.org', - false, - 'aamine@loveruby.net, taro@softica.org', - [], - [{ :phrase => nil, - :routes => [], - :spec => 'aamine@loveruby.net' }, - { :phrase => nil, - :routes => [], - :spec => 'taro@softica.org' }] - - validate_case '', - true, - nil, - [], - [] - - validate_case '(comment only)', - true, - nil, - ['comment only'], - [] - - kcode('EUC') { - validate_case 'hoge@example.jp (=?ISO-2022-JP?B?GyRCJUYlOSVIGyhC?=)', - false, - "hoge@example.jp (\245\306\245\271\245\310)", - ["\245\306\245\271\245\310"], - [{ :phrase => nil, - :routes => [], - :spec => 'hoge@example.jp'}] - } - end -end - -class SingleAddressHeaderTester < Test::Unit::TestCase - def test_s_new - h = TMail::HeaderField.new('Sender', 'aamine@loveruby.net') - assert_instance_of TMail::SingleAddressHeader, h - end - - def test_addr - h = TMail::HeaderField.new('Sender', 'aamine@loveruby.net') - assert_not_nil h.addr - assert_instance_of TMail::Address, h.addr - assert_equal 'aamine@loveruby.net', h.addr.spec - assert_equal nil, h.addr.phrase - assert_equal [], h.addr.routes - end - - def test_to_s - str = 'Minero Aoki , "AOKI, Minero" ' - h = TMail::HeaderField.new('Sender', str) - assert_equal 'Minero Aoki ', h.to_s - end -end - -class ReturnPathHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Return-Path ).each do |name| - h = TMail::HeaderField.new(name, '') - assert_instance_of TMail::ReturnPathHeader, h, name - assert_equal false, h.empty? - assert_equal false, h.illegal? - end - end - - def test_ATTRS - h = TMail::HeaderField.new('Return-Path', '<@a,@b,@c:aamine@loveruby.net>') - assert_not_nil h.addr - assert_instance_of TMail::Address, h.addr - assert_equal 'aamine@loveruby.net', h.addr.spec - assert_equal nil, h.addr.phrase - assert_equal ['a', 'b', 'c'], h.addr.routes - - assert_not_nil h.routes - assert_instance_of Array, h.routes - assert_equal ['a', 'b', 'c'], h.routes - assert_equal h.addr.routes, h.routes - - assert_not_nil h.spec - assert_instance_of String, h.spec - assert_equal 'aamine@loveruby.net', h.spec - - # missing '<' '>' - h = TMail::HeaderField.new('Return-Path', 'xxxx@yyyy') - assert_equal 'xxxx@yyyy', h.spec - - h = TMail::HeaderField.new('Return-Path', '<>') - assert_instance_of TMail::Address, h.addr - assert_nil h.addr.local - assert_nil h.addr.domain - assert_nil h.addr.spec - assert_nil h.spec - end - - def test_to_s - body = 'Minero Aoki <@a,@b,@c:aamine@loveruby.net>' - h = TMail::HeaderField.new('Return-Path', body) - assert_equal '<@a,@b,@c:aamine@loveruby.net>', h.to_s - assert_equal h.to_s, h.decoded - - body = 'aamine@loveruby.net' - h = TMail::HeaderField.new('Return-Path', body) - assert_equal '', h.to_s - assert_equal h.to_s, h.decoded - - body = '<>' - h = TMail::HeaderField.new('Return-Path', body) - assert_equal '<>', h.to_s - end -end - -class MessageIdHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Message-Id MESSAGE-ID Message-ID - Resent-Message-Id Content-Id ).each do |name| - h = TMail::HeaderField.new(name, '<20020103xg88.k0@mail.loveruby.net>') - assert_instance_of TMail::MessageIdHeader, h - end - end - - def test_id - str = '<20020103xg88.k0@mail.loveruby.net>' - h = TMail::HeaderField.new('Message-Id', str) - assert_not_nil h.id - assert_equal str, h.id - - id = '<20020103xg88.k0@mail.loveruby.net>' - str = id + ' (comm(ent))' - h = TMail::HeaderField.new('Message-Id', str) - assert_not_nil h.id - assert_equal id, h.id - end - - def test_id= - h = TMail::HeaderField.new('Message-Id', '') - h.id = str = '<20020103xg88.k0@mail.loveruby.net>' - assert_not_nil h.id - assert_equal str, h.id - end -end - -class ReferencesHeaderTester < Test::Unit::TestCase - def test_s_new - str = '<20020103xg88.k0@mail.loveruby.net>' - %w( References REFERENCES ReFeReNcEs - In-Reply-To ).each do |name| - h = TMail::HeaderField.new(name, str) - assert_instance_of TMail::ReferencesHeader, h, name - end - end - - def test_ATTRS - id1 = '<20020103xg88.k0@mail.loveruby.net>' - id2 = '<20011204103415.64DB.GGB03124@nifty.ne.jp>' - phr = 'message of "Wed, 17 Mar 1999 18:42:07 +0900"' - str = id1 + ' ' + phr + ' ' + id2 - - h = TMail::HeaderField.new('References', str) - - ok = [id1, id2] - h.each_id do |i| - assert_equal ok.shift, i - end - ok = [id1, id2] - assert_equal ok, h.ids - h.each_id do |i| - assert_equal ok.shift, i - end - - ok = [phr] - assert_equal ok, h.phrases - h.each_phrase do |i| - assert_equal ok.shift, i - end - ok = [phr] - h.each_phrase do |i| - assert_equal ok.shift, i - end - - - # test 2 - # 'In-Reply-To' - # 'aamine@dp.u-netsurf.ne.jp's message of "Fri, 8 Jan 1999 03:49:37 +0900"' - end - - def test_to_s - id1 = '<20020103xg88.k0@mail.loveruby.net>' - id2 = '<20011204103415.64DB.GGB03124@nifty.ne.jp>' - phr = 'message of "Wed, 17 Mar 1999 18:42:07 +0900"' - str = id1 + ' ' + phr + ' ' + id2 - - h = TMail::HeaderField.new('References', str) - assert_equal id1 + ' ' + id2, h.to_s - end -end - -class ReceivedHeaderTester < Test::Unit::TestCase - HEADER1 = <; - Tue, 4 Dec 2001 10:49:58 +0900 (JST) -EOS - HEADER2 = <; Tue, 4 Dec 2001 10:49:31 +0900 (JST) -EOS - -=begin dangerous headers -# 2-word WITH (this header is also wrong in semantic) -# I cannot support this. -Received: by mebius with Microsoft Mail - id <01BE2B9D.9051EAA0@mebius>; Sat, 19 Dec 1998 22:18:54 -0800 -=end - - def test_s_new - %w( Received ).each do |name| - h = TMail::HeaderField.new(name, HEADER1) - assert_instance_of TMail::ReceivedHeader, h, name - end - end - - def test_ATTRS - h = TMail::HeaderField.new('Received', HEADER1) - assert_instance_of String, h.from - assert_equal 'helium.ruby-lang.org', h.from - - assert_instance_of String, h.by - assert_equal 'doraemon.edit.ne.jp', h.by - - assert_instance_of String, h.via - assert_equal 'TCP', h.via - - assert_instance_of Array, h.with - assert_equal %w(ESMTP), h.with - - assert_instance_of String, h.id - assert_equal 'fB41nwEj007438', h.id - - assert_instance_of String, h._for - assert_equal 'aamine@mx.edit.ne.jp', h._for # must be ? - - assert_instance_of Time, h.date - time = Time.parse('Tue, 4 Dec 2001 10:49:58 +0900') - assert_equal time, h.date - - h = TMail::HeaderField.new('Received', '; Tue, 4 Dec 2001 10:49:58 +0900') - assert_nil h.from - assert_nil h.by - assert_nil h.via - assert_equal [], h.with - assert_nil h.id - assert_nil h._for - time = Time.parse('Tue, 4 Dec 2001 10:49:58 +0900') - assert_equal time, h.date - - # without date - h = TMail::HeaderField.new('Received', 'by NeXT.Mailer (1.144.2)') - assert_nil h.from - assert_equal 'NeXT.Mailer', h.by - assert_nil h.via - assert_equal [], h.with - assert_nil h.id - assert_nil h._for - assert_nil h.date - - # FROM is not a domain - h = TMail::HeaderField.new('Received', - 'from someuser@example.com; Tue, 24 Nov 1998 07:59:39 -0500') - assert_equal 'example.com', h.from - assert_nil h.by - assert_nil h.via - assert_equal [], h.with - assert_nil h.id - assert_nil h._for - time = Time.parse('Tue, 24 Nov 1998 07:59:39 -0500') - assert_equal time, h.date - -=begin - # FOR is not route-addr. - # item order is wrong. - h = TMail::HeaderField.new('Received', - 'from aamine by mail.softica.org with local for list@softica.org id 12Vm3N-00044L-01; Fri, 17 Mar 2000 10:59:53 +0900') - assert_equal 'aamine', h.from - assert_equal 'mail.softica.org', h.by - assert_nil h.via - assert_equal ['local'], h.with - assert_equal '12Vm3N-00044L-01', h.id - assert_equal 'list@softica.org', h._for - assert_equal Time.local(2000,4,17, 10,59,53), h.date -=end - - # word + domain-literal in FROM - - h = TMail::HeaderField.new('Received', - 'from localhost [192.168.1.1]; Sat, 19 Dec 1998 22:19:50 PST') - assert_equal 'localhost', h.from - assert_nil h.by - assert_nil h.via - assert_equal [], h.with - assert_nil h.id - assert_nil h._for - time = Time.parse('Sat, 19 Dec 1998 22:19:50 PST') - assert_equal time, h.date - - # addr-spec in BY (must be a domain) - h = TMail::HeaderField.new('Received', - 'by aamine@loveruby.net; Wed, 24 Feb 1999 14:34:20 +0900') - assert_equal 'loveruby.net', h.by - end - - def test_to_s - h = TMail::HeaderField.new('Received', HEADER1) - time = Time.parse('Tue, 4 Dec 2001 10:49:58 +0900').strftime("%a,%e %b %Y %H:%M:%S %z") - assert_equal "from helium.ruby-lang.org by doraemon.edit.ne.jp via TCP with ESMTP id fB41nwEj007438 for ; #{time}", h.to_s - - [ - 'from harmony.loveruby.net', - 'by mail.loveruby.net', - 'via TCP', - 'with ESMTP', - 'id LKJHSDFG', - 'for ', - "; #{time}" - ]\ - .each do |str| - h = TMail::HeaderField.new('Received', str) - assert_equal str, h.to_s, 'ReceivedHeader#to_s: data=' + str.dump - end - end -end - -class KeywordsHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Keywords KEYWORDS KeYwOrDs ).each do |name| - h = TMail::HeaderField.new(name, 'key, word, is, keyword') - assert_instance_of TMail::KeywordsHeader, h - end - end - - def test_keys - h = TMail::HeaderField.new('Keywords', 'key, word, is, keyword') - assert_instance_of Array, h.keys - assert_equal %w(key word is keyword), h.keys - end -end - -class EncryptedHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Encrypted ).each do |name| - h = TMail::HeaderField.new(name, 'lot17 solt') - assert_instance_of TMail::EncryptedHeader, h - end - end - - def test_encrypter - h = TMail::HeaderField.new('Encrypted', 'lot17 solt') - assert_equal 'lot17', h.encrypter - end - - def test_encrypter= - h = TMail::HeaderField.new('Encrypted', 'lot17 solt') - h.encrypter = 'newscheme' - assert_equal 'newscheme', h.encrypter - end - - def test_keyword - h = TMail::HeaderField.new('Encrypted', 'lot17 solt') - assert_equal 'solt', h.keyword - h = TMail::HeaderField.new('Encrypted', 'lot17') - assert_equal nil, h.keyword - end - - def test_keyword= - h = TMail::HeaderField.new('Encrypted', 'lot17 solt') - h.keyword = 'newscheme' - assert_equal 'newscheme', h.keyword - end -end - -class MimeVersionHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Mime-Version MIME-VERSION MiMe-VeRsIoN ).each do |name| - h = TMail::HeaderField.new(name, '1.0') - assert_instance_of TMail::MimeVersionHeader, h - end - end - - def test_ATTRS - h = TMail::HeaderField.new('Mime-Version', '1.0') - assert_equal 1, h.major - assert_equal 0, h.minor - assert_equal '1.0', h.version - - h = TMail::HeaderField.new('Mime-Version', '99.77 (is ok)') - assert_equal 99, h.major - assert_equal 77, h.minor - assert_equal '99.77', h.version - end - - def test_major= - h = TMail::HeaderField.new('Mime-Version', '1.1') - h.major = 2 - assert_equal 2, h.major - assert_equal 1, h.minor - assert_equal 2, h.major - h.major = 3 - assert_equal 3, h.major - end - - def test_minor= - h = TMail::HeaderField.new('Mime-Version', '2.3') - assert_equal 3, h.minor - h.minor = 5 - assert_equal 5, h.minor - assert_equal 2, h.major - end - - def test_to_s - h = TMail::HeaderField.new('Mime-Version', '1.0 (first version)') - assert_equal '1.0', h.to_s - end - - def test_empty? - h = TMail::HeaderField.new('Mime-Version', '') - assert_equal true, h.empty? - end -end - -class ContentTypeHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Content-Type CONTENT-TYPE CoNtEnT-TyPe ).each do |name| - h = TMail::HeaderField.new(name, 'text/plain; charset=iso-2022-jp') - assert_instance_of TMail::ContentTypeHeader, h, name - end - end - - def test_ATTRS - h = TMail::HeaderField.new('Content-Type', 'text/plain; charset=iso-2022-jp') - assert_equal 'text', h.main_type - assert_equal 'plain', h.sub_type - assert_equal 1, h.params.size - assert_equal 'iso-2022-jp', h.params['charset'] - - h = TMail::HeaderField.new('Content-Type', 'Text/Plain; Charset=shift_jis') - assert_equal 'text', h.main_type - assert_equal 'plain', h.sub_type - assert_equal 1, h.params.size - assert_equal 'shift_jis', h.params['charset'] - end - - def test_multipart_with_legal_unquoted_boundary - h = TMail::HeaderField.new('Content-Type', 'multipart/mixed; boundary=dDRMvlgZJXvWKvBx') - assert_equal 'multipart', h.main_type - assert_equal 'mixed', h.sub_type - assert_equal 1, h.params.size - assert_equal 'dDRMvlgZJXvWKvBx', h.params['boundary'] - end - - def test_multipart_with_legal_quoted_boundary_should_retain_quotations - h = TMail::HeaderField.new('Content-Type', 'multipart/mixed; boundary="dDRMvlgZJXvWKvBx"') - assert_equal 'multipart', h.main_type - assert_equal 'mixed', h.sub_type - assert_equal 1, h.params.size - assert_equal 'dDRMvlgZJXvWKvBx', h.params['boundary'] - end - - def test_multipart_with_illegal_unquoted_boundary_should_add_quotations - h = TMail::HeaderField.new('Content-Type', 'multipart/alternative; boundary=----=_=NextPart_000_0093_01C81419.EB75E850') - assert_equal 'multipart', h.main_type - assert_equal 'alternative', h.sub_type - assert_equal 1, h.params.size - assert_equal '----=_=NextPart_000_0093_01C81419.EB75E850', h.params['boundary'] - end - - def test_multipart_with_illegal_quoted_boundary_should_retain_quotations - h = TMail::HeaderField.new('Content-Type', 'multipart/alternative; boundary="----=_=NextPart_000_0093_01C81419.EB75E850"') - assert_equal 'multipart', h.main_type - assert_equal 'alternative', h.sub_type - assert_equal 1, h.params.size - assert_equal '----=_=NextPart_000_0093_01C81419.EB75E850', h.params['boundary'] - end - - def test_multipart_with_extra_with_multiple_params - h = TMail::HeaderField.new('Content-Type', 'multipart/related;boundary=1_4626B816_9F1690;Type="application/smil";Start=""') - assert_equal 'multipart', h.main_type - assert_equal 'related', h.sub_type - assert_equal 3, h.params.size - assert_equal '1_4626B816_9F1690', h.params['boundary'] - end - - def test_main_type= - h = TMail::HeaderField.new('Content-Type', 'text/plain; charset=iso-2022-jp') - assert_equal 'text', h.main_type - h.main_type = 'multipart' - assert_equal 'multipart', h.main_type - assert_equal 'multipart', h.main_type - h.main_type = 'TEXT' - assert_equal 'text', h.main_type - end - - def test_sub_type= - h = TMail::HeaderField.new('Content-Type', 'text/plain; charset=iso-2022-jp') - assert_equal 'plain', h.sub_type - h.sub_type = 'html' - assert_equal 'html', h.sub_type - h.sub_type = 'PLAIN' - assert_equal 'plain', h.sub_type - end -end - -class ContentEncodingHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Content-Transfer-Encoding CONTENT-TRANSFER-ENCODING - COnteNT-TraNSFer-ENCodiNG ).each do |name| - h = TMail::HeaderField.new(name, 'Base64') - assert_instance_of TMail::ContentTransferEncodingHeader, h - end - end - - def test_encoding - h = TMail::HeaderField.new('Content-Transfer-Encoding', 'Base64') - assert_equal 'base64', h.encoding - - h = TMail::HeaderField.new('Content-Transfer-Encoding', '7bit') - assert_equal '7bit', h.encoding - end - - def test_encoding= - h = TMail::HeaderField.new('Content-Transfer-Encoding', 'Base64') - assert_equal 'base64', h.encoding - h.encoding = '7bit' - assert_equal '7bit', h.encoding - end - - def test_to_s - h = TMail::HeaderField.new('Content-Transfer-Encoding', 'Base64') - assert_equal 'Base64', h.to_s - assert_equal h.to_s, h.decoded - assert_equal h.to_s, h.encoded - end - - def test_insertion_of_headers_and_encoding_them_short - mail = TMail::Mail.new - mail['X-Mail-Header'] = "short bit of data" - assert_equal("X-Mail-Header: short bit of data\r\n\r\n", mail.encoded) - end - - def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace - mail = TMail::Mail.new - mail['X-Ruby-Talk'] = "<11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net>" - assert_equal("X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n", mail.encoded) - result = TMail::Mail.parse(mail.encoded) - assert_equal(mail['X-Ruby-Talk'].to_s, result['X-Ruby-Talk'].to_s) - end - - def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_with_whitespace - mail = TMail::Mail.new - mail['X-Ruby-Talk'] = "<11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA 4614-95FD-9071A4BDF4A1@grayproductions.net>" - assert_equal("X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA\r\n\t4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n", mail.encoded) - result = TMail::Mail.parse(mail.encoded) - assert_equal(mail['X-Ruby-Talk'].to_s, result['X-Ruby-Talk'].to_s) - end - - def test_insertion_of_headers_and_encoding_them_more_than_78_char_total_without_whitespace - mail = TMail::Mail.new - mail['X-Ruby-Talk'] = "<11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>" - assert_equal("X-Ruby-Talk: <11152772-AAFA-4614-95FD-9071A4BDF4A111152772-AAFA-4614-95FD-9071A4BDF4A1@grayproductions.net>\r\n\r\n", mail.encoded) - result = TMail::Mail.parse(mail.encoded) - assert_equal(mail['X-Ruby-Talk'].to_s, result['X-Ruby-Talk'].to_s) - end - - def test_insertion_of_headers_and_encoding_them_less_than_998_char_total_without_whitespace - mail = TMail::Mail.new - text_with_whitespace = ""; 985.times{text_with_whitespace << "a"} - mail['Reply-To'] = "#{text_with_whitespace}" - assert_equal("Reply-To: #{text_with_whitespace}\r\n\r\n", mail.encoded) - result = TMail::Mail.parse(mail.encoded) - assert_equal(mail['Reply-To'].to_s, result['Reply-To'].to_s) - end - - def test_insertion_of_headers_and_encoding_them_more_than_998_char_total_without_whitespace - mail = TMail::Mail.new - text_with_whitespace = ""; 1200.times{text_with_whitespace << "a"} - before_text = ""; 985.times{before_text << "a"} - after_text = ""; 215.times{after_text << "a"} - mail['X-Ruby-Talk'] = "#{text_with_whitespace}" - assert_equal("X-Ruby-Talk: #{before_text}\r\n\t#{after_text}\r\n\r\n", mail.encoded) - end - - def test_insertion_of_headers_and_encoding_with_1_more_than_998_char_total_without_whitespace - mail = TMail::Mail.new - text_with_whitespace = ""; 996.times{text_with_whitespace << "a"} - before_text = ""; 995.times{before_text << "a"} - after_text = ""; 1.times{after_text << "a"} - mail['X'] = "#{text_with_whitespace}" - assert_equal("X: #{before_text}\r\n\t#{after_text}\r\n\r\n", mail.encoded) - end - - def test_insertion_of_headers_and_encoding_with_exactly_998_char_total_without_whitespace - mail = TMail::Mail.new - text_with_whitespace = ""; 995.times{text_with_whitespace << "a"} - before_text = ""; 995.times{before_text << "a"} - mail['X'] = "#{text_with_whitespace}" - assert_equal("X: #{before_text}\r\n\r\n", mail.encoded) - end -end - -class ContentDispositionHeaderTester < Test::Unit::TestCase - def test_s_new - %w( Content-Disposition CONTENT-DISPOSITION - ConTENt-DIsPOsition ).each do |name| - h = TMail::HeaderField.new(name, 'attachment; filename="README.txt.pif"') - assert_instance_of TMail::ContentDispositionHeader, h - end - end - - def test_ATTRS - begin - _test_ATTRS - _test_tspecials - _test_rfc2231_decode - #_test_rfc2231_encode - _test_raw_iso2022jp - _test_raw_eucjp - _test_raw_sjis - _test_code_conversion - ensure - TMail.KCODE = 'NONE' - end - end - - def _test_ATTRS - TMail.KCODE = 'NONE' - - h = TMail::HeaderField.new('Content-Disposition', - 'attachment; filename="README.txt.pif"') - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - assert_equal 'README.txt.pif', h.params['filename'] - - h = TMail::HeaderField.new('Content-Disposition', - 'attachment; Filename="README.txt.pif"') - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - assert_equal 'README.txt.pif', h.params['filename'] - - h = TMail::HeaderField.new('Content-Disposition', - 'attachment; filename=') - assert_equal true, h.empty? - assert_nil h.params - assert_nil h['filename'] - end - - def _test_tspecials - h = TMail::HeaderField.new('Content-Disposition', 'a; n=a') - h['n'] = %q|()<>[];:@\\,"/?=| - assert_equal 'a; n="()<>[];:@\\\\,\"/?="', h.encoded - end - - def _test_rfc2231_decode - TMail.KCODE = 'EUC' - - h = TMail::HeaderField.new('Content-Disposition', - "attachment; filename*=iso-2022-jp'ja'%1b$B$Q$i$`%1b%28B") - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - expected = "\244\321\244\351\244\340" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, h.params['filename'] - end - - def _test_rfc2231_encode - TMail.KCODE = 'EUC' - - h = TMail::HeaderField.new('Content-Disposition', 'a; n=a') - h['n'] = "\245\265\245\363\245\327\245\353.txt" - assert_equal "a; n*=iso-2022-jp'ja'%1B$B%255%25s%25W%25k%1B%28B.txt", - h.encoded - - h = TMail::HeaderField.new('Content-Disposition', 'a; n=a') - h['n'] = "\245\265()<>[];:@\\,\"/?=%*'" - assert_equal "a;\r\n\tn*=iso-2022-jp'ja'%1B$B%255%1B%28B%28%29%3C%3E%5B%5D%3B%3A%40%5C%2C%22%2F%3F%3D%25%2A%27", - h.encoded - end - - def _test_raw_iso2022jp - TMail.KCODE = 'EUC' - # raw iso2022jp string in value (token) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - # assert_equal "\e$BF|K\\8l\e(B.doc", h.params['filename'] - - expected = "\306\374\313\334\270\354.doc" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - - assert_equal expected, h.params['filename'] - - # raw iso2022jp string in value (quoted string) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - # assert_equal "\e$BF|K\\8l\e(B.doc", h.params['filename'] - assert_equal expected, h.params['filename'] - end - - def _test_raw_eucjp - TMail.KCODE = 'EUC' - # raw EUC-JP string in value (token) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - expected = "\306\374\313\334\270\354.doc" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, h.params['filename'] - - # raw EUC-JP string in value (quoted-string) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - assert_equal expected, h.params['filename'] - end - - def _test_raw_sjis - TMail.KCODE = 'SJIS' - # raw SJIS string in value (token) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - expected = "\223\372\226{\214\352.doc" - expected.force_encoding 'Windows-31J' if expected.respond_to? :force_encoding - assert_equal expected, h.params['filename'] - - # raw SJIS string in value (quoted-string) - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - assert_equal expected, h.params['filename'] - end - - def _test_code_conversion - # JIS -> TMail.KCODE auto conversion - TMail.KCODE = 'EUC' - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - expected = "\306\374\313\334\270\354.doc" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, h.params['filename'] - - TMail.KCODE = 'SJIS' - h = TMail::HeaderField.new('Content-Disposition', - %Q) - assert_equal 'attachment', h.disposition - assert_equal 1, h.params.size - expected = "\223\372\226{\214\352.doc" - expected.force_encoding 'Windows-31J' if expected.respond_to? :force_encoding - assert_equal expected, h.params['filename'] - end - - def test_disposition= - h = TMail::HeaderField.new('Content-Disposition', - 'attachment; filename="README.txt.pif"') - assert_equal 'attachment', h.disposition - h.disposition = 'virus' - assert_equal 'virus', h.disposition - h.disposition = 'AtTaChMeNt' - assert_equal 'attachment', h.disposition - end - - def test_wrong_mail_header - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email9") - assert_raise(TMail::SyntaxError) { TMail::Mail.parse(fixture) } - end - - def test_decode_message_with_unknown_charset - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email10") - mail = TMail::Mail.parse(fixture) - assert_nothing_raised { mail.body } - end - - def test_decode_message_with_unquoted_atchar_in_header - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email11") - mail = TMail::Mail.parse(fixture) - assert_not_nil mail.from - end - - def test_new_from_port_should_produce_a_header_object_of_the_correct_class - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - h = TMail::HeaderField.new_from_port(p, 'Message-Id') - assert_equal(TMail::MessageIdHeader, h.class) - end - - def test_should_return_the_evelope_sender_when_given_from_without_a_colon - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - h = TMail::HeaderField.new_from_port(p, 'EnvelopeSender') - assert_equal("mike@envelope_sender.com.au", h.addrs.join) - end - - def test_new_from_port_should_produce_a_header_object_that_contains_the_right_data - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - h = TMail::HeaderField.new_from_port(p, 'From') - assert_equal("Mikel Lindsaar ", h.addrs.join) - end - - def test_unwrapping_a_long_header_field_using_new_from_port - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - h = TMail::HeaderField.new_from_port(p, 'Content-Type') - line = 'multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-42-587703407; micalg=sha1' - assert(line =~ /multipart\/signed/) - assert(line =~ /protocol="application\/pkcs7-signature"/) - assert(line =~ /boundary=Apple-Mail-42-587703407/) - assert(line =~ /micalg=sha1/) - assert_equal(line.length, 103) - end - - def test_returning_nil_if_there_is_no_match - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - h = TMail::HeaderField.new_from_port(p, 'Received-Long-Header') - assert_equal(h, nil) - end - -end diff --git a/vendor/tmail-1.2.3.1/test/test_helper.rb b/vendor/tmail-1.2.3.1/test/test_helper.rb deleted file mode 100644 index 5fe248163..000000000 --- a/vendor/tmail-1.2.3.1/test/test_helper.rb +++ /dev/null @@ -1,9 +0,0 @@ -# Add in the local library for the load path so we get that before any possible -# gem that is already installed. -require 'stringio' -$:.unshift File.dirname(__FILE__) + "/../lib" -$:.unshift File.dirname(__FILE__) + "/../lib/tmail" -require 'test/unit' -require 'extctrl' -require 'test/unit' -require 'tmail' diff --git a/vendor/tmail-1.2.3.1/test/test_mail.rb b/vendor/tmail-1.2.3.1/test/test_mail.rb deleted file mode 100644 index 659a11fa7..000000000 --- a/vendor/tmail-1.2.3.1/test/test_mail.rb +++ /dev/null @@ -1,749 +0,0 @@ -$:.unshift File.dirname(__FILE__) -require 'test_helper' -require 'tmail' -require 'kcode' -require 'time' - -class TestMail < Test::Unit::TestCase - include TMail::TextUtils - - def setup - @mail = TMail::Mail.new - end - - def lf( str ) - str.gsub(/\n|\r\n|\r/) { "\n" } - end - - def crlf( str ) - str.gsub(/\n|\r\n|\r/) { "\r\n" } - end - - def test_MIME - # FIXME: test more. - - kcode('EUC') { - mail = TMail::Mail.parse('From: hoge@example.jp (=?iso-2022-jp?B?GyRCJUYlOSVIGyhC?=)') - assert_not_nil mail['From'] - - expected = "\245\306\245\271\245\310" - if expected.respond_to? :force_encoding - expected.force_encoding(mail['From'].comments.first.encoding) - end - assert_equal [expected], mail['From'].comments - - expected = "From: hoge@example.jp (\245\306\245\271\245\310)\n\n" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, mail.to_s - assert_equal expected, mail.decoded - - expected = "From: hoge@example.jp (=?iso-2022-jp?B?GyRCJUYlOSVIGyhC?=)\r\n\r\n" - expected.force_encoding 'EUC-JP' if expected.respond_to? :force_encoding - assert_equal expected, mail.encoded - } - end - - def test_to_s - time = Time.parse('Tue, 4 Dec 2001 10:49:58 +0900').strftime("%a,%e %b %Y %H:%M:%S %z") - str =< -Subject: This is test message. - -This is body. -EOS - str = crlf(str) - m = TMail::Mail.parse(str) - # strip to avoid error by body's line terminator. - assert_equal lf(str).strip, m.decoded.strip - assert_equal crlf(str).strip, m.encoded.strip - end - - def test__empty_return_path - str = "Return-Path: <>\r\n\r\n" - assert_equal str, TMail::Mail.parse(str).encoded - end - - def test_date - t = Time.now - @mail.date = t - assert_equal t.to_i, @mail.date.to_i # avoid usec comparison - assert_equal time2str(t), @mail['date'].to_s - - str = "Date: #{time2str(t)}\n\n" - assert_equal str, TMail::Mail.parse(str).to_s - end - - def test_strftime - t = Time.now - fmt = '%A%a%B%b%c%d%H%I%j%M%m%p%S%U%W%w%X%x%Y%y%Z%%' - @mail.date = t - assert_equal t.strftime(fmt), @mail.strftime(fmt) - end - - def test_to - addr = 'Minero Aoki ' - @mail.to = addr - assert_equal 1, @mail['to'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['to'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['to'].addrs[0].phrase - - a = @mail.to_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.to - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - addr = TMail::Address.parse('Minero Aoki ') - @mail.to_addrs = addr - assert_equal 1, @mail['to'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['to'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['to'].addrs[0].phrase - - a = @mail.to_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.to - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - - @mail.to = '' - assert_equal nil, @mail.to - assert_equal 'DEFAULT VALUE', @mail.to('DEFAULT VALUE') - - @mail.to = 'undisclosed-recipients: ;' - a = @mail.to - assert_equal nil, @mail.to - assert_equal 'DEFAULT VALUE', @mail.to('DEFAULT VALUE') - - - str = "\"Aoki, Minero\" \n\n" - @mail.to_addrs = a = TMail::Address.parse(str) - assert_equal ['aamine@loveruby.net'], @mail.to - assert_equal [a], @mail.to_addrs - assert_equal '"Aoki, Minero" ', @mail.to_addrs[0].to_s - assert_equal '"Aoki, Minero" ', @mail['to'].to_s - end - - def test_cc - addr = 'Minero Aoki ' - @mail.cc = addr - assert_equal 1, @mail['cc'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['cc'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['cc'].addrs[0].phrase - - a = @mail.cc_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.cc - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - addr = TMail::Address.parse('Minero Aoki ') - @mail.cc_addrs = addr - assert_equal 1, @mail['cc'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['cc'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['cc'].addrs[0].phrase - - a = @mail.cc_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.cc - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - - @mail.cc = '' - assert_equal nil, @mail.cc - assert_equal 'DEFAULT VALUE', @mail.cc('DEFAULT VALUE') - - @mail.cc = 'undisclosed-recipients: ;' - a = @mail.cc - assert_equal nil, @mail.cc - assert_equal 'DEFAULT VALUE', @mail.cc('DEFAULT VALUE') - end - - def test_bcc - addr = 'Minero Aoki ' - @mail.bcc = addr - assert_equal 1, @mail['bcc'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['bcc'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['bcc'].addrs[0].phrase - - a = @mail.bcc_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.bcc - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - addr = TMail::Address.parse('Minero Aoki ') - @mail.bcc_addrs = addr - assert_equal 1, @mail['bcc'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['bcc'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['bcc'].addrs[0].phrase - - a = @mail.bcc_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.bcc - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - - @mail.bcc = '' - assert_equal nil, @mail.bcc - assert_equal 'DEFAULT VALUE', @mail.bcc('DEFAULT VALUE') - - @mail.bcc = 'undisclosed-recipients: ;' - a = @mail.bcc - assert_equal nil, @mail.bcc - assert_equal 'DEFAULT VALUE', @mail.bcc('DEFAULT VALUE') - end - - def test_from - addr = 'Minero Aoki ' - @mail.from = addr - assert_equal 1, @mail['from'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['from'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['from'].addrs[0].phrase - - a = @mail.from_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.from - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - addr = TMail::Address.parse('Minero Aoki ') - @mail.from_addrs = addr - assert_equal 1, @mail['from'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['from'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['from'].addrs[0].phrase - - a = @mail.from_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.from - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - - @mail.from = '' - assert_equal nil, @mail.from - assert_equal 'DEFAULT VALUE', @mail.from('DEFAULT VALUE') - - @mail.from = 'undisclosed-recipients: ;' - a = @mail.from - assert_equal nil, @mail.from - assert_equal 'DEFAULT VALUE', @mail.from('DEFAULT VALUE') - - @mail.from = "raasdnil@gmail.com, mikel@me.com" - assert_equal 2, @mail['from'].addrs.size - assert_equal 'raasdnil@gmail.com', @mail['from'].addrs[0].spec - assert_equal 'mikel@me.com', @mail['from'].addrs[1].spec - end - - def test_reply_to - addr = 'Minero Aoki ' - @mail.reply_to = addr - assert_equal 1, @mail['reply-to'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['reply-to'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['reply-to'].addrs[0].phrase - - a = @mail.reply_to_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.reply_to - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - addr = TMail::Address.parse('Minero Aoki ') - @mail.reply_to_addrs = addr - assert_equal 1, @mail['reply-to'].addrs.size - assert_equal 'aamine@loveruby.net', @mail['reply-to'].addrs[0].spec - assert_equal 'Minero Aoki', @mail['reply-to'].addrs[0].phrase - - a = @mail.reply_to_addrs - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.reply_to - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - - - @mail.reply_to = '' - assert_equal nil, @mail.reply_to - assert_equal 'DEFAULT VALUE', @mail.reply_to('DEFAULT VALUE') - - @mail.reply_to = 'undisclosed-recipients: ;' - a = @mail.reply_to - assert_equal nil, @mail.reply_to - assert_equal 'DEFAULT VALUE', @mail.reply_to('DEFAULT VALUE') - end - - def test_reply_to_with_blank_reply_to - @mail = TMail::Mail.new - from_addr = TMail::Address.parse("Mikel Lindsaar ") - @mail.from = from_addr - - # No reply_to set, should return from address - assert_equal([from_addr], @mail.reply_addresses) - - # reply_to and from set, should return reply_to - reply_addr = TMail::Address.parse("Bob ") - @mail.reply_to = reply_addr - assert_equal([reply_addr], @mail.reply_addresses) - - # reply_to set but nil, should return from address - @mail.reply_to = nil - assert_equal([from_addr], @mail.reply_addresses) - - # from and reply_to set, but nil, should return empty array - @mail.from = nil - assert_equal([], @mail.reply_addresses) - end - - def do_test_address_attr( name ) - addr = 'Minero Aoki ' - @mail.__send__( name + '=', addr ) - a = @mail.__send__( name + '_addrs' ) - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0].spec - assert_equal 'Minero Aoki', a[0].phrase - - a = @mail.__send__( name ) - assert_equal 1, a.size - assert_equal 'aamine@loveruby.net', a[0] - end - - def test_subject - s = 'This is test subject!' - @mail.subject = s - assert_equal s, @mail.subject - assert_equal s, @mail['subject'].to_s - end - - def test_unquote_quoted_printable_subject - msg = <'sample.rb' - assert_equal 'attachment', @mail.disposition - assert_equal 'sample.rb', @mail.disposition_param('filename') - end - - def test_receive_attachments - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email2") - mail = TMail::Mail.parse(fixture) - attachment = mail.attachments.last - assert_equal "smime.p7s", attachment.original_filename - assert_equal "application/pkcs7-signature", attachment.content_type - end - - def test_body_with_underscores - m = TMail::Mail.new - expected = 'something_with_underscores' - m.encoding = 'quoted-printable' - quoted_body = [expected].pack('*M') - m.body = quoted_body - assert_equal "something_with_underscores=\n", m.quoted_body - assert_equal expected, m.body - end - - def test_nested_attachments_are_recognized_correctly - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email_with_nested_attachment") - assert_equal 2, mail.attachments.length - assert_equal "image/png", mail.attachments.first.content_type - assert_equal 1902, mail.attachments.first.length - assert_equal "application/pkcs7-signature", mail.attachments.last.content_type - end - - def test_decode_attachment_without_charset - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email3") - attachment = mail.attachments.last - assert_equal 1026, attachment.read.length - end - - def test_attachment_using_content_location - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email12") - mail = TMail::Mail.parse(fixture) - assert_equal 1, mail.attachments.length - assert_equal "Photo25.jpg", mail.attachments.first.original_filename - end - - def test_attachment_with_text_type - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email13") - mail = TMail::Mail.parse(fixture) - assert mail.has_attachments? - assert_equal 1, mail.attachments.length - assert_equal "hello.rb", mail.attachments.first.original_filename - end - - def test_decode_part_without_content_type - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email4") - mail = TMail::Mail.parse(fixture) - assert_nothing_raised { mail.body } - end - - def test_decode_message_without_content_type - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email4") - assert_nothing_raised { mail.body } - end - - def test_decode_message_with_incorrect_charset - fixture = File.read(File.dirname(__FILE__) + "/fixtures/raw_email6") - mail = TMail::Mail.parse(fixture) - assert_nothing_raised { mail.body } - end - - def test_quoting_of_illegal_boundary_when_doing_mail_to_s - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email_with_illegal_boundary") - assert_equal(true, mail.multipart?) - assert_equal('multipart/alternative; boundary="----=_NextPart_000_0093_01C81419.EB75E850"', mail['content-type'].to_s) - end - - def test_quoted_illegal_boundary_when_doing_mail_to_s - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email_with_quoted_illegal_boundary") - assert_equal(true, mail.multipart?) - assert_equal('multipart/alternative; boundary="----=_NextPart_000_0093_01C81419.EB75E850"', mail['content-type'].to_s) - end - - def test_quoted_illegal_boundary_with_multipart_mixed_when_doing_mail_to_s - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email_with_multipart_mixed_quoted_boundary") - assert_equal(true, mail.multipart?) - assert_equal('multipart/mixed; boundary="----=_Part_2192_32400445.1115745999735"', mail['content-type'].to_s) - end - - def test_when_opening_a_base64_encoded_email_and_re_parsing_it_keeps_the_transfer_encoding_correct - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_base64_email") - assert_equal("Base64", mail['Content-Transfer-Encoding'].to_s) - decoded_mail = TMail::Mail.parse(mail.to_s) - assert_equal("Base64", decoded_mail['Content-Transfer-Encoding'].to_s) - end - - def test_create_reply - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email") - reply = mail.create_reply - assert_equal([""], reply.in_reply_to) - assert_equal([""], reply.references) - assert_equal(TMail::Mail, mail.create_reply.class) - end - - def test_create_forward - mail = TMail::Mail.load("#{File.dirname(__FILE__)}/fixtures/raw_email") - forward = mail.create_forward - assert_equal(true, forward.multipart?) - assert_equal(TMail::Mail, forward.class) - end - - def test_body - m = TMail::Mail.new - expected = 'something_with_underscores' - m.encoding = 'quoted-printable' - quoted_body = [expected].pack('*M') - m.body = quoted_body - assert_equal "something_with_underscores=\n", m.quoted_body - assert_equal expected, m.body - end - - def test_nested_attachments_are_recognized_correctly - fixture = File.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_nested_attachment") - mail = TMail::Mail.parse(fixture) - assert_equal 2, mail.attachments.length - assert_equal "image/png", mail.attachments.first.content_type - assert_equal 1902, mail.attachments.first.length - assert_equal "application/pkcs7-signature", mail.attachments.last.content_type - end - - def test_preamble_read - fixture = File.read("#{File.dirname(__FILE__)}/fixtures/raw_email4") - mail = TMail::Mail.parse(fixture) - assert_equal 'This is a multi-part message in MIME format.', mail.preamble.strip - end - - def test_preamble_write - mail = TMail::Mail.new - part = TMail::Mail.parse("Content-Type: text/plain\n\nBlah") - mail.parts << part - mail.preamble = 'This is the preamble' - # normalize the boundary to something non-random to assert against - str = mail.encoded - result = str.gsub(str[/boundary="(.*?)"/, 1], 'boundary') - expected =< n - n = nn - c += 1 - end - assert_equal N, c - end - - def test_reverse_each_port - dir = File.expand_path(MAILBOX) - c = 0 - n = 100000 - TMail::MhMailbox.new( MAILBOX ).reverse_each_port do |port| - assert_kind_of TMail::FilePort, port - assert_equal dir, File.dirname(port.filename) - assert_match(/\A\d+\z/, File.basename(port.filename)) - nn = File.basename(port.filename).to_i - assert nn < n - n = nn - c += 1 - end - assert_equal N, c - end - - def test_new_port - port = @ld.new_port - assert_kind_of TMail::FilePort, port - assert_equal File.expand_path('.') + '/' + MAILBOX, - File.dirname(port.filename) - assert_equal( (N+1).to_s, File.basename(port.filename) ) - - create port - end - - def create( port ) - port.wopen {|f| - f.puts 'From: aamine' - f.puts 'To: aamine@loveruby.net' - f.puts "Subject: #{@n + 1}" - f.puts '' - f.puts 'body' - } - @n += 1 - end - - def test_each_new_port - make_mails_older 5 - - c = 0 - @ld.each_new_port do |port| - assert_kind_of TMail::FilePort, port - c += 1 - end - assert_equal @n, c - - t = Time.now - 2 - create @ld.new_port - c = 0 - @ld.each_new_port( t ) do |port| - assert_kind_of TMail::FilePort, port - c += 1 - end - assert_equal 1, c - - make_mails_older 5 - c = 0 - @ld.each_new_port do |port| - assert_kind_of TMail::FilePort, port - c += 1 - end - assert_equal 0, c - end - - def test_unix_mbox_fromaddr_method - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox") - assert_equal(TMail::UNIXMbox.fromaddr(p), "mikel@return_path.com") - end - - def test_unix_mbox_fromaddr_method_missing_return_path - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox_without_return_path") - assert_equal(TMail::UNIXMbox.fromaddr(p), "mikel@from_address.com") - end - - def test_unix_mbox_fromaddr_method_missing_from_address - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox_without_from") - assert_equal(TMail::UNIXMbox.fromaddr(p), "mike@envelope_sender.com.au") - end - - def test_unix_mbox_from_addr_method_missing_all_from_fields_in_the_email - p = TMail::FilePort.new("#{File.dirname(__FILE__)}/fixtures/mailbox_without_any_from_or_sender") - assert_equal(TMail::UNIXMbox.fromaddr(p), "nobody") - end - - def test_opening_mailbox_to_read_does_not_raise_IO_error - mailbox = TMail::UNIXMbox.new("#{File.dirname(__FILE__)}/fixtures/mailbox", nil, true) - assert_nothing_raised do - mailbox.each_port do |port| - TMail::Mail.new(port) - end - end - end - - def test_reading_correct_number_of_emails_from_a_mailbox - mailbox = TMail::UNIXMbox.new("#{File.dirname(__FILE__)}/fixtures/mailbox", nil, true) - @emails = [] - mailbox.each_port { |m| @emails << TMail::Mail.new(m) } - assert_equal(4, @emails.length) - end - - def test_truncating_a_mailbox_to_zero_if_it_is_opened_with_readonly_false - filename = "#{File.dirname(__FILE__)}/fixtures/mailbox" - FileUtils.copy(filename, "#{filename}_test") - filename = "#{filename}_test" - mailbox = TMail::UNIXMbox.new(filename, nil, false) - @emails = [] - mailbox.each_port { |m| @emails << TMail::Mail.new(m) } - assert_equal(4, @emails.length) - assert_equal('', File.read(filename)) - File.delete(filename) - end - -end diff --git a/vendor/tmail-1.2.3.1/test/test_port.rb b/vendor/tmail-1.2.3.1/test/test_port.rb deleted file mode 100644 index 5ba575422..000000000 --- a/vendor/tmail-1.2.3.1/test/test_port.rb +++ /dev/null @@ -1,436 +0,0 @@ -require 'test_helper' -require 'tmail/loader' -require 'tmail/port' -require 'fileutils' - -class FilePortTester < Test::Unit::TestCase - include FileUtils - - def setup - rm_rf 'tmp' - mkdir 'tmp' - 5.times do |n| - File.open('tmp/' + n.to_s, 'w') {|f| - f.puts "file #{n}" - } - end - end - - def teardown - rm_rf 'tmp' - end - - def test_s_new - port = TMail::FilePort.new('tmp/1') - assert_instance_of TMail::FilePort, port - end - - def test_inspect - port = TMail::FilePort.new('tmp/1') - port.inspect - end - - def test_EQUAL # == - port = TMail::FilePort.new('tmp/1') - assert_equal port, port - p2 = TMail::FilePort.new('tmp/1') - assert_equal port, p2 - end - - def test_eql? - port = TMail::FilePort.new('tmp/1') - assert_equal true, port.eql?(port) - p2 = TMail::FilePort.new('tmp/1') - assert_equal true, port.eql?(p2) - end - - def test_hash - port = TMail::FilePort.new('tmp/1') - assert_equal port.hash, port.hash - p2 = TMail::FilePort.new('tmp/1') - assert_equal port.hash, p2.hash - end - - def test_filename - port = TMail::FilePort.new('tmp/1') - assert_not_nil port.filename - assert_equal File.expand_path('tmp/1'), port.filename - assert_equal File.expand_path('tmp/1'), port.filename - - port = TMail::FilePort.new('tmp/2') - assert_not_nil port.filename - assert_equal File.expand_path('tmp/2'), port.filename - assert_equal File.expand_path('tmp/2'), port.filename - end - - def test_ident - ports = [] - 5.times do |n| - ports.push TMail::FilePort.new("tmp/#{n}") - end - - until ports.empty? do - base = ports.shift - ports.each do |other| - assert_not_equal base.ident, other.ident - end - end - end - - def test_size - 5.times do |n| - port = TMail::FilePort.new("tmp/#{n}") - assert_equal File.size("tmp/#{n}"), port.size - end - end - - def test_ropen - port = TMail::FilePort.new("tmp/1") - f = port.ropen - assert_instance_of File, f - assert_equal false, f.closed? - assert_equal 'f', f.read(1) - f.close - - f = nil - port.ropen {|ff| - assert_instance_of File, ff - assert_equal false, ff.closed? - assert_equal 'f', ff.read(1) - f = ff - } - assert_equal true, f.closed? - - assert_raises( Errno::ENOENT ) { - TMail::FilePort.new('tmp/100').ropen - } - end - - def test_wopen - port = TMail::FilePort.new('tmp/1') - f = port.wopen - assert_instance_of File, f - assert_equal false, f.closed? - f.puts 'ok' - f.close - - f = nil - port.wopen {|ff| - assert_instance_of File, ff - assert_equal false, ff.closed? - ff.puts 'ok' - f = ff - } - assert_equal true, f.closed? - - TMail::FilePort.new('tmp/100').wopen {|ff| } - end - - def test_aopen - port = TMail::FilePort.new('tmp/1') - size = port.size - f = port.aopen - assert_instance_of File, f - assert_equal false, f.closed? - f.print 'N' - f.close - assert_equal size + 1, port.size - port.ropen {|ff| - assert_equal 'f', ff.read(1) - } - - f = nil - port.aopen {|ff| - assert_instance_of File, ff - assert_equal false, ff.closed? - ff.print 'N' - f = ff - } - assert_equal true, f.closed? - assert_equal size + 1 + 1, port.size - port.ropen {|ff| - assert_equal 'f', ff.read(1) - } - - TMail::FilePort.new('tmp/100').aopen {|ff| } - end - - def test_read_all - 5.times do |n| - port = TMail::FilePort.new("tmp/#{n}") - assert_equal readall("tmp/#{n}"), port.read_all - end - end - - def test_copy_to - src = TMail::FilePort.new('tmp/1') - dest = TMail::FilePort.new('tmp/10') - src.copy_to dest - assert_equal readall('tmp/1'), readall('tmp/10') - end - - def test_move_to - src = TMail::FilePort.new('tmp/1') - str = src.read_all - dest = TMail::FilePort.new('tmp/10') - src.move_to dest - assert_equal str, readall('tmp/10') - assert_raises( Errno::ENOENT ) { src.ropen } - end - - def test_remove - port = TMail::FilePort.new('tmp/1') - port.remove - assert_raises(Errno::ENOENT) { - port.ropen - } - - port = TMail::FilePort.new('tmp/100') - assert_raises(Errno::ENOENT) { - port.remove - } - end - - def readall(fname) - File.open(fname) {|f| - return f.read - } - end -end - -class StringPortTester < Test::Unit::TestCase - def test_s_new - port = TMail::StringPort.new - assert_instance_of TMail::StringPort, port - end - - def test_EQUAL # == - port = TMail::StringPort.new(str = '') - port2 = TMail::StringPort.new(str) - other = TMail::StringPort.new - assert_equal port, port - assert_equal port, port2 - assert_not_equal port, other - end - - def test_eql? - port = TMail::StringPort.new(str = '') - port2 = TMail::StringPort.new(str) - other = TMail::StringPort.new - assert_equal true, port.eql?(port) - assert_equal true, port.eql?(port2) - assert_equal false, port.eql?(other) - end - - def test_hash - port = TMail::StringPort.new(str = '') - port2 = TMail::StringPort.new(str) - other = TMail::StringPort.new - assert_equal port.hash, port.hash - assert_equal port.hash, port2.hash - # assert_not_equal port.hash, other.hash - end - - def test_string - port = TMail::StringPort.new(str = '') - assert_same str, port.string - assert_same port.string, port.string - end - - def test_to_s - port = TMail::StringPort.new(str = 'abc') - assert_equal str, port.to_s - port.to_s.concat 'XXX' - assert_equal str, port.to_s - end - - def test_inspect - TMail::StringPort.new.inspect - TMail::StringPort.new('abc').inspect - end - - def test_size - port = TMail::StringPort.new(str = 'abc') - assert_equal str.size, port.size - end - - def test_ropen - port = TMail::StringPort.new(str = 'abc') - f = port.ropen - assert_equal false, f.closed? - assert_equal 'a', f.read(1) - f.close - - port.ropen {|ff| - assert_equal false, ff.closed? - assert_equal 'a', ff.read(1) - f = ff - } - assert_equal true, f.closed? - end - - def test_wopen - port = TMail::StringPort.new(str = 'abc') - f = port.wopen - assert_equal false, f.closed? - f.print 'N' - f.close - assert_equal 'N', port.read_all - - port.wopen {|ff| - assert_equal false, ff.closed? - ff.print 'NN' - f = ff - } - assert_equal true, f.closed? - assert_equal 'NN', port.read_all - end - - def test_aopen - port = TMail::StringPort.new(str = 'abc') - f = port.aopen - assert_equal false, f.closed? - f.print 'N' - f.close - assert_equal 'abcN', port.read_all - - port.aopen {|ff| - assert_equal false, ff.closed? - ff.print 'F' - f = ff - } - assert_equal true, f.closed? - assert_equal 'abcNF', port.read_all - end - - include FileUtils - - def test_copy_to - src = TMail::StringPort.new('abc') - dest = TMail::StringPort.new - src.copy_to dest - assert_equal src.read_all, dest.read_all - assert_not_equal src.string.object_id, dest.string.object_id - end - - def test_move_to - src = TMail::StringPort.new(str = 'abc') - dest = TMail::StringPort.new - src.move_to dest - assert_same str, dest.string - assert_raises(Errno::ENOENT) { - src.ropen - } - end - - def test_remove - port = TMail::StringPort.new(str = 'abc') - port.remove - assert_raises(Errno::ENOENT) { - port.ropen - } - end -end - -class MhPortTester < Test::Unit::TestCase - include FileUtils - - def setup - rm_rf 'tmp' - mkdir 'tmp' - 3.times do |n| - File.open( "tmp/#{n}", 'w' ) {|f| - f.puts 'From: Minero Aoki ' - f.puts "Subject: test file #{n}" - f.puts - f.puts 'This is body.' - } - end - end - - def teardown - rm_rf 'tmp' - end - - def test_flags - port = TMail::MhPort.new('tmp/1') - assert_equal false, port.flagged? - port.flagged = true - assert_equal true, port.flagged? - - assert_equal false, port.replied? - port.replied = true - assert_equal true, port.replied? - - assert_equal false, port.seen? - port.seen = true - assert_equal true, port.seen? - - port = TMail::MhPort.new('tmp/1') - assert_equal true, port.flagged? - assert_equal true, port.replied? - assert_equal true, port.seen? - - port = TMail::MhPort.new('tmp/1') - port.flagged = false - port.replied = false - port.seen = false - - port = TMail::MhPort.new('tmp/1') - assert_equal false, port.flagged? - assert_equal false, port.replied? - assert_equal false, port.seen? - end -end - -class MaildirPortTester < Test::Unit::TestCase - include FileUtils - - def setup - rm_rf 'tmp' - mkdir 'tmp' - 3.times do |n| - File.open( "tmp/000.00#{n}.a", 'w' ) {|f| - f.puts 'From: Minero Aoki ' - f.puts "Subject: test file #{n}" - f.puts - f.puts 'This is body.' - } - end - end - - def teardown - rm_rf 'tmp' - end - - def test_flags - port = TMail::MaildirPort.new('tmp/000.001.a') - - assert_equal false, port.flagged? - port.flagged = true - assert_equal true, port.flagged? - - assert_equal false, port.replied? - port.replied = true - assert_equal true, port.replied? - - assert_equal false, port.seen? - port.seen = true - assert_equal true, port.seen? - - port = TMail::MaildirPort.new(port.filename) - assert_equal true, port.flagged? - assert_equal true, port.replied? - assert_equal true, port.seen? - - port = TMail::MaildirPort.new(port.filename) - port.flagged = false - port.replied = false - port.seen = false - - port = TMail::MaildirPort.new(port.filename) - assert_equal false, port.flagged? - assert_equal false, port.replied? - assert_equal false, port.seen? - end -end diff --git a/vendor/tmail-1.2.3.1/test/test_quote.rb b/vendor/tmail-1.2.3.1/test/test_quote.rb deleted file mode 100644 index ca1c102a4..000000000 --- a/vendor/tmail-1.2.3.1/test/test_quote.rb +++ /dev/null @@ -1,98 +0,0 @@ -$:.unshift File.dirname(__FILE__) -require 'test_helper' - -class TestQuote < Test::Unit::TestCase - def test_unquote_quoted_printable - a ="=?ISO-8859-1?Q?[166417]_Bekr=E6ftelse_fra_Rejsefeber?=" - b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8') - expected = "[166417] Bekr\303\246ftelse fra Rejsefeber" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_unquote_base64 - a ="=?ISO-8859-1?B?WzE2NjQxN10gQmVrcuZmdGVsc2UgZnJhIFJlanNlZmViZXI=?=" - b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8') - expected = "[166417] Bekr\303\246ftelse fra Rejsefeber" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_unquote_without_charset - a ="[166417]_Bekr=E6ftelse_fra_Rejsefeber" - b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8') - expected = "[166417]_Bekr=E6ftelse_fra_Rejsefeber" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_unqoute_multiple - a ="=?utf-8?q?Re=3A_=5B12=5D_=23137=3A_Inkonsistente_verwendung_von_=22Hin?==?utf-8?b?enVmw7xnZW4i?=" - b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8') - expected = "Re: [12] #137: Inkonsistente verwendung von \"Hinzuf\303\274gen\"" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_unqoute_in_the_middle - a ="Re: Photos =?ISO-8859-1?Q?Brosch=FCre_Rand?=" - b = TMail::Unquoter.unquote_and_convert_to(a, 'utf-8') - expected = "Re: Photos Brosch\303\274re Rand" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_unqoute_iso - a ="=?ISO-8859-1?Q?Brosch=FCre_Rand?=" - b = TMail::Unquoter.unquote_and_convert_to(a, 'iso-8859-1') - expected = "Brosch\374re Rand" - expected.force_encoding 'iso-8859-1' if expected.respond_to? :force_encoding - assert_equal expected, b - end - - def test_quote_multibyte_chars - original = "\303\246 \303\270 and \303\245" - unquoted = TMail::Unquoter.unquote_and_convert_to(original, nil) - original.force_encoding 'utf-8' if original.respond_to? :force_encoding - unquoted.force_encoding 'utf-8' if unquoted.respond_to? :force_encoding - assert_equal unquoted, original - end - - # test an email that has been created using \r\n newlines, instead of - # \n newlines. - def test_email_quoted_with_0d0a - mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_quoted_with_0d0a")) - assert_match %r{Elapsed time}, mail.body - end - - def test_email_with_partially_quoted_subject - mail = TMail::Mail.parse(IO.read("#{File.dirname(__FILE__)}/fixtures/raw_email_with_partially_quoted_subject")) - expected = "Re: Test: \"\346\274\242\345\255\227\" mid \"\346\274\242\345\255\227\" tail" - expected.force_encoding 'utf-8' if expected.respond_to? :force_encoding - assert_equal expected, mail.subject - end - - def test_decode - encoded, decoded = expected_base64_strings - assert_equal decoded, TMail::Base64.decode(encoded) - end - - def test_encode - encoded, decoded = expected_base64_strings - assert_equal encoded, TMail::Base64.encode(decoded) - end - - private - - def expected_base64_strings - if RUBY_VERSION < '1.9' - options = "r" - else - options = "r:ASCII-8BIT" - end - encoded = File.open("#{File.dirname(__FILE__)}/fixtures/raw_base64_encoded_string", options) {|f| f.read } - decoded = File.open("#{File.dirname(__FILE__)}/fixtures/raw_base64_decoded_string", options) {|f| f.read } - [encoded, decoded] - end - -end diff --git a/vendor/tmail-1.2.3.1/test/test_scanner.rb b/vendor/tmail-1.2.3.1/test/test_scanner.rb deleted file mode 100644 index 802230c44..000000000 --- a/vendor/tmail-1.2.3.1/test/test_scanner.rb +++ /dev/null @@ -1,209 +0,0 @@ -$:.unshift File.dirname(__FILE__) -require 'test_helper' -require 'tmail/scanner' -require 'test/unit' - -class ScannerTester < Test::Unit::TestCase - DEBUG = false - - def do_test( scantype, str, ok, cmtok ) - scanner = TMail::Scanner.new( str, scantype, comments = [] ) - scanner.debug = DEBUG - - idx = 0 - scanner.scan do |sym, val| - if sym then - assert_equal ok.shift, [sym, val], "index=#{idx}" - else - assert_equal [false, '$'], [sym, val], "$end (index=#{idx})" - end - idx += 1 - end - assert_equal [], ok - - comments.each_with_index do |val, i| - assert_equal cmtok.shift, val, "index=#{i}" - end - end - - def test_atommode - do_test :ADDRESS, - 'Capital CAPITAL word from id by with a0000', - [ - [:ATOM, 'Capital'], - [:ATOM, 'CAPITAL'], - [:ATOM, 'word'], - [:ATOM, 'from'], - [:ATOM, 'id'], - [:ATOM, 'by'], - [:ATOM, 'with'], - [:ATOM, 'a0000'] - ], - [] - - do_test :ADDRESS, - '(comment) (nested (comment) (again)) (a(b(c(d(e)))))', - [ - ], - [ - 'comment', - 'nested (comment) (again)', - 'a(b(c(d(e))))' - ] - - do_test :ADDRESS, - '=?iso-2022-jp?B?axaxax?=', - [ - [:ATOM, '=?iso-2022-jp?B?axaxax?='] - ], - [] - - word = 'abcdefghijklmnopqrstuvwxyz' + - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + - '0123456789' + - %q[_#!$%&`'*+-{|}~^/=?] - do_test :ADDRESS, word, - [ - [:ATOM, word] - ], - [] - - do_test :ADDRESS, - " \t\t\r\n \n\r\n \r \n atom", - [ - [:ATOM, 'atom'] - ], - [] - end - - def test_tokenmode - do_test :CTYPE, - 'text/html; charset=iso-2022-jp', - [ - [:TOKEN, 'text'], - ['/' , '/'], - [:TOKEN, 'html'], - [';' , ';'], - [:TOKEN, 'charset'], - ['=' , '='], - [:TOKEN, 'iso-2022-jp'] - ], - [] - - do_test :CTYPE, - 'Text/Plain; Charset=ISO-2022-JP', - [ - [:TOKEN, 'Text'], - ['/' , '/'], - [:TOKEN, 'Plain'], - [';' , ';'], - [:TOKEN, 'Charset'], - ['=' , '='], - [:TOKEN, 'ISO-2022-JP'], - ], - [] - - do_test :CTYPE, - 'm_m/s_s; k_k=v_v', - [ - [:TOKEN, 'm_m'], - ['/' , '/'], - [:TOKEN, 's_s'], - [';' , ';'], - [:TOKEN, 'k_k'], - ['=' , '='], - [:TOKEN, 'v_v'], - ], - [] - - word = 'abcdefghijklmnopqrstuvwxyz' + - 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + - '0123456789' + - %q[_#!$%&`'*+-{|}~^.] - do_test :CTYPE, word, - [ - [:TOKEN, word] - ], - [] - end - - def test_received - do_test :RECEIVED, - 'from From by By via Via with With id Id for For', - [ - [:FROM, 'from'], - [:FROM, 'From'], - [:BY, 'by'], - [:BY, 'By'], - [:VIA, 'via'], - [:VIA, 'Via'], - [:WITH, 'with'], - [:WITH, 'With'], - [:ID, 'id'], - [:ID, 'Id'], - [:FOR, 'for'], - [:FOR, 'For'] - ], - [] - - str = <; -Thu, 18 Mar 1999 17:35:23 +0900 (JST) -EOS - ok = [ - [ :FROM , 'from' ], - [ :ATOM , 'hoyogw' ], - [ '.' , '.' ], - [ :ATOM , 'netlab' ], - [ '.' , '.' ], - [ :ATOM , 'co' ], - [ '.' , '.' ], - [ :ATOM , 'jp' ], - [ :BY , 'by' ], - [ :ATOM , 'serv1' ], - [ '.' , '.' ], - [ :ATOM , 'u-netsurf' ], - [ '.' , '.' ], - [ :ATOM , 'ne' ], - [ '.' , '.' ], - [ :ATOM , 'jp' ], - [ :WITH , 'with' ], - [ :ATOM , 'ESMTP' ], - [ :ID , 'id' ], - [ :ATOM , 'RAA10692' ], - [ :FOR , 'for' ], - [ '<' , '<' ], - [ :ATOM , 'aamine' ], - [ '@' , '@' ], - [ :ATOM , 'dp' ], - [ '.' , '.' ], - [ :ATOM , 'u-netsurf' ], - [ '.' , '.' ], - [ :ATOM , 'ne' ], - [ '.' , '.' ], - [ :ATOM , 'jp' ], - [ '>' , '>' ], - [ ';' , ';' ], - [ :ATOM , 'Thu' ], - [ ',' , ',' ], - [ :DIGIT, '18' ], - [ :ATOM , 'Mar' ], - [ :DIGIT, '1999' ], - [ :DIGIT, '17' ], - [ ':' , ':' ], - [ :DIGIT, '35' ], - [ ':' , ':' ], - [ :DIGIT, '23' ], - [ :ATOM , '+0900' ] - ] - cmtok = [ - 'daemon@hoyogw.netlab.co.jp [202.218.249.220]', - '8.8.8/3.6W-2.66(99/03/09)', - 'JST' - ] - - do_test :RECEIVED, str, ok, cmtok - end -end diff --git a/vendor/tmail-1.2.3.1/test/test_utils.rb b/vendor/tmail-1.2.3.1/test/test_utils.rb deleted file mode 100644 index 7421a917f..000000000 --- a/vendor/tmail-1.2.3.1/test/test_utils.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'test_helper' -require 'tmail' -require 'tmail/utils' - -class TestUtils < Test::Unit::TestCase - -include TMail::TextUtils - - def _test_new_boundary - a = new_boundary() - b = new_boundary() - c = new_boundary() - assert_instance_of String, a - assert_instance_of String, b - assert_instance_of String, c - assert(a != b) - assert(b != c) - assert(c != a) - end - - def test_unquote - mail = TMail::Mail.new - assert_equal('Hello', mail.unquote('"Hello"')) - end - - def test_unquote_without_quotes - mail = TMail::Mail.new - assert_equal('Hello', mail.unquote('Hello')) - end - - def test_unquote_with_nil - mail = TMail::Mail.new - assert_equal(nil, mail.unquote(nil)) - end - -end diff --git a/vendor/tmail-1.2.3.1/work/script/make b/vendor/tmail-1.2.3.1/work/script/make deleted file mode 100644 index 8964edb83..000000000 --- a/vendor/tmail-1.2.3.1/work/script/make +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env ruby - -Dir.chdir("ext/tmailscanner/tmail") do - unless File.exist?('Makefile') - system "ruby extconf.rb" - end - - unless ARGV[0] == 'setup' - system "make #{ARGV.join(' ')}" - end -end - - -# Eric Hodel said NOT do this. -# -#cp "ext/xml/*.#{dlext}", "lib/xml/#{arch}/" -# -# -#def dlext -# Config::CONFIG['DLEXT'] -#end -# -#def arch -# Config::CONFIG['arch'] -#end - diff --git a/vendor/tmail-1.2.3.1/work/script/rdoc b/vendor/tmail-1.2.3.1/work/script/rdoc deleted file mode 100644 index 677f68195..000000000 --- a/vendor/tmail-1.2.3.1/work/script/rdoc +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env ruby - -require 'fileutils' - -# generate rdocs - -def rdoc - template = 'html' - output = 'doc/rdoc' - FileUtils.rm_r(output) if File.exist?(output) - system "rdoc --op #{output} --template #{template} --main README --merge --inline-source [A-Z]* lib/**/*.rb ext/**/*.c" - #insert_ads(output) -end - -# Insert an ad if available. - -def insert_ads(site) - adfile = 'doc/ads/rdoc.html' - return unless File.file?(adfile) - adtext = File.read(adfile) - #puts - dirs = Dir.glob(File.join(site,'*/')) - dirs.each do |dir| - files = Dir.glob(File.join(dir, '**/*.html')) - files.each do |file| - html = file_read(file) - bodi = html.index('') - html[bodi + 7] = "\n" + adtext - #print "Augmenting #{file}..." - file_write(file, html) unless dryrun? - #puts "[done]" - end - end -end - -if $0 == __FILE__ - rdoc -end - diff --git a/vendor/tmail-1.2.3.1/work/script/setup b/vendor/tmail-1.2.3.1/work/script/setup deleted file mode 100644 index e7c55fcac..000000000 --- a/vendor/tmail-1.2.3.1/work/script/setup +++ /dev/null @@ -1,1616 +0,0 @@ -#!/usr/bin/env ruby - -# Setup and install. -# -# setup.rb -# -# Copyright (c) 2000-2005 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. - -# -# Was hardcoded as 'InstalledFiles' -# - -INSTALLED_MANIFEST = '.installed' - -# -# Was hardcoded as 'packages'. -# - -PACKAGES_DIRECTORY = 'src' - -# -# Locate and move to the root dir of the project/package. -# This is setup to put setup in a utilities subdir. -# -# TODO Make more robust. -# - -ROOT_DIRECTORY = File.dirname(File.dirname(File.expand_path($0))) - -Dir.chdir(ROOT_DIRECTORY) - -# -# Deal with Ruby version issues. -# - -unless Enumerable.method_defined?(:map) # Ruby 1.4.6 - module Enumerable - alias map collect - end -end - -unless File.respond_to?(:read) # Ruby 1.6 - def File.read(fname) - open(fname) {|f| - return f.read - } - end -end - -unless Errno.const_defined?(:ENOTEMPTY) # Windows? - module Errno - class ENOTEMPTY - # We do not raise this exception, implementation is not needed. - end - end -end - -def File.binread(fname) - open(fname, 'rb') {|f| - return f.read - } -end - -# for corrupted Windows' stat(2) -def File.dir?(path) - File.directory?((path[-1,1] == '/') ? path : path + '/') -end - - -class ConfigTable - - include Enumerable - - def initialize(rbconfig) - @rbconfig = rbconfig - @items = [] - @table = {} - # options - @install_prefix = nil - @config_opt = nil - @verbose = true - @no_harm = false - end - - attr_accessor :install_prefix - attr_accessor :config_opt - - attr_writer :verbose - - def verbose? - @verbose - end - - attr_writer :no_harm - - def no_harm? - @no_harm - end - - def [](key) - lookup(key).resolve(self) - end - - def []=(key, val) - lookup(key).set val - end - - def names - @items.map {|i| i.name } - end - - def each(&block) - @items.each(&block) - end - - def key?(name) - @table.key?(name) - end - - def lookup(name) - @table[name] or setup_rb_error "no such config item: #{name}" - end - - def add(item) - @items.push item - @table[item.name] = item - end - - def remove(name) - item = lookup(name) - @items.delete_if {|i| i.name == name } - @table.delete_if {|name, i| i.name == name } - item - end - - def load_script(path, inst = nil) - if File.file?(path) - MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path - end - end - - def savefile - '.config' - end - - def load_savefile - begin - File.foreach(savefile()) do |line| - k, v = *line.split(/=/, 2) - self[k] = v.strip - end - rescue Errno::ENOENT - setup_rb_error $!.message + "\n#{File.basename($0)} config first" - end - end - - def save - @items.each {|i| i.value } - File.open(savefile(), 'w') {|f| - @items.each do |i| - f.printf "%s=%s\n", i.name, i.value if i.value? and i.value - end - } - end - - def load_standard_entries - standard_entries(@rbconfig).each do |ent| - add ent - end - end - - def standard_entries(rbconfig) - c = rbconfig - - rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT']) - - major = c['MAJOR'].to_i - minor = c['MINOR'].to_i - teeny = c['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - if c['rubylibdir'] - # V > 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = c['rubylibdir'] - librubyverarch = c['archdir'] - siteruby = c['sitedir'] - siterubyver = c['sitelibdir'] - siterubyverarch = c['sitearchdir'] - elsif newpath_p - # 1.4.4 <= V <= 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = c['sitedir'] - siterubyver = "$siteruby/#{version}" - siterubyverarch = "$siterubyver/#{c['arch']}" - else - # V < 1.4.4 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby" - siterubyver = siteruby - siterubyverarch = "$siterubyver/#{c['arch']}" - end - parameterize = lambda {|path| - path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') - } - - if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } - makeprog = arg.sub(/'/, '').split(/=/, 2)[1] - else - makeprog = 'make' - end - - [ - ExecItem.new('installdirs', 'std/site/home', - 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\ - {|val, table| - case val - when 'std' - table['rbdir'] = '$librubyver' - table['sodir'] = '$librubyverarch' - when 'site' - table['rbdir'] = '$siterubyver' - table['sodir'] = '$siterubyverarch' - when 'home' - setup_rb_error '$HOME was not set' unless ENV['HOME'] - table['prefix'] = ENV['HOME'] - table['rbdir'] = '$libdir/ruby' - table['sodir'] = '$libdir/ruby' - end - }, - PathItem.new('prefix', 'path', c['prefix'], - 'path prefix of target environment'), - PathItem.new('bindir', 'path', parameterize.call(c['bindir']), - 'the directory for commands'), - PathItem.new('libdir', 'path', parameterize.call(c['libdir']), - 'the directory for libraries'), - PathItem.new('datadir', 'path', parameterize.call(c['datadir']), - 'the directory for shared data'), - PathItem.new('mandir', 'path', parameterize.call(c['mandir']), - 'the directory for man pages'), - PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']), - 'the directory for system configuration files'), - PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']), - 'the directory for local state data'), - PathItem.new('libruby', 'path', libruby, - 'the directory for ruby libraries'), - PathItem.new('librubyver', 'path', librubyver, - 'the directory for standard ruby libraries'), - PathItem.new('librubyverarch', 'path', librubyverarch, - 'the directory for standard ruby extensions'), - PathItem.new('siteruby', 'path', siteruby, - 'the directory for version-independent aux ruby libraries'), - PathItem.new('siterubyver', 'path', siterubyver, - 'the directory for aux ruby libraries'), - PathItem.new('siterubyverarch', 'path', siterubyverarch, - 'the directory for aux ruby binaries'), - PathItem.new('rbdir', 'path', '$siterubyver', - 'the directory for ruby scripts'), - PathItem.new('sodir', 'path', '$siterubyverarch', - 'the directory for ruby extentions'), - PathItem.new('rubypath', 'path', rubypath, - 'the path to set to #! line'), - ProgramItem.new('rubyprog', 'name', rubypath, - 'the ruby program using for installation'), - ProgramItem.new('makeprog', 'name', makeprog, - 'the make program to compile ruby extentions'), - SelectItem.new('shebang', 'all/ruby/never', 'ruby', - 'shebang line (#!) editing mode'), - BoolItem.new('without-ext', 'yes/no', 'no', - 'does not compile/install ruby extentions') - ] - end - private :standard_entries - - def load_multipackage_entries - multipackage_entries().each do |ent| - add ent - end - end - - def multipackage_entries - [ - PackageSelectionItem.new('with', 'name,name...', '', 'ALL', - 'package names that you want to install'), - PackageSelectionItem.new('without', 'name,name...', '', 'NONE', - 'package names that you do not want to install') - ] - end - private :multipackage_entries - - ALIASES = { - 'std-ruby' => 'librubyver', - 'stdruby' => 'librubyver', - 'rubylibdir' => 'librubyver', - 'archdir' => 'librubyverarch', - 'site-ruby-common' => 'siteruby', # For backward compatibility - 'site-ruby' => 'siterubyver', # For backward compatibility - 'bin-dir' => 'bindir', - 'bin-dir' => 'bindir', - 'rb-dir' => 'rbdir', - 'so-dir' => 'sodir', - 'data-dir' => 'datadir', - 'ruby-path' => 'rubypath', - 'ruby-prog' => 'rubyprog', - 'ruby' => 'rubyprog', - 'make-prog' => 'makeprog', - 'make' => 'makeprog' - } - - def fixup - ALIASES.each do |ali, name| - @table[ali] = @table[name] - end - @items.freeze - @table.freeze - @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/ - end - - def parse_opt(opt) - m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}" - m.to_a[1,2] - end - - def dllext - @rbconfig['DLEXT'] - end - - def value_config?(name) - lookup(name).value? - end - - class Item - def initialize(name, template, default, desc) - @name = name.freeze - @template = template - @value = default - @default = default - @description = desc - end - - attr_reader :name - attr_reader :description - - attr_accessor :default - alias help_default default - - def help_opt - "--#{@name}=#{@template}" - end - - def value? - true - end - - def value - @value - end - - def resolve(table) - @value.gsub(%r<\$([^/]+)>) { table[$1] } - end - - def set(val) - @value = check(val) - end - - private - - def check(val) - setup_rb_error "config: --#{name} requires argument" unless val - val - end - end - - class BoolItem < Item - def config_type - 'bool' - end - - def help_opt - "--#{@name}" - end - - private - - def check(val) - return 'yes' unless val - case val - when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes' - when /\An(o)?\z/i, /\Af(alse)\z/i then 'no' - else - setup_rb_error "config: --#{@name} accepts only yes/no for argument" - end - end - end - - class PathItem < Item - def config_type - 'path' - end - - private - - def check(path) - setup_rb_error "config: --#{@name} requires argument" unless path - path[0,1] == '$' ? path : File.expand_path(path) - end - end - - class ProgramItem < Item - def config_type - 'program' - end - end - - class SelectItem < Item - def initialize(name, selection, default, desc) - super - @ok = selection.split('/') - end - - def config_type - 'select' - end - - private - - def check(val) - unless @ok.include?(val.strip) - setup_rb_error "config: use --#{@name}=#{@template} (#{val})" - end - val.strip - end - end - - class ExecItem < Item - def initialize(name, selection, desc, &block) - super name, selection, nil, desc - @ok = selection.split('/') - @action = block - end - - def config_type - 'exec' - end - - def value? - false - end - - def resolve(table) - setup_rb_error "$#{name()} wrongly used as option value" - end - - undef set - - def evaluate(val, table) - v = val.strip.downcase - unless @ok.include?(v) - setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})" - end - @action.call v, table - end - end - - class PackageSelectionItem < Item - def initialize(name, template, default, help_default, desc) - super name, template, default, desc - @help_default = help_default - end - - attr_reader :help_default - - def config_type - 'package' - end - - private - - def check(val) - unless File.dir?("#{PACKAGES_DIRECTORY}/#{val}") - setup_rb_error "config: no such package: #{val}" - end - val - end - end - - class MetaConfigEnvironment - def initialize(config, installer) - @config = config - @installer = installer - end - - def config_names - @config.names - end - - def config?(name) - @config.key?(name) - end - - def bool_config?(name) - @config.lookup(name).config_type == 'bool' - end - - def path_config?(name) - @config.lookup(name).config_type == 'path' - end - - def value_config?(name) - @config.lookup(name).config_type != 'exec' - end - - def add_config(item) - @config.add item - end - - def add_bool_config(name, default, desc) - @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc) - end - - def add_path_config(name, default, desc) - @config.add PathItem.new(name, 'path', default, desc) - end - - def set_config_default(name, default) - @config.lookup(name).default = default - end - - def remove_config(name) - @config.remove(name) - end - - # For only multipackage - def packages - raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer - @installer.packages - end - - # For only multipackage - def declare_packages(list) - raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer - @installer.packages = list - end - end - -end # class ConfigTable - - -# This module requires: #verbose?, #no_harm? -module FileOperations - - def mkdir_p(dirname, prefix = nil) - dirname = prefix + File.expand_path(dirname) if prefix - $stderr.puts "mkdir -p #{dirname}" if verbose? - return if no_harm? - - # Does not check '/', it's too abnormal. - dirs = File.expand_path(dirname).split(%r<(?=/)>) - if /\A[a-z]:\z/i =~ dirs[0] - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless File.dir?(path) - end - end - - def rm_f(path) - $stderr.puts "rm -f #{path}" if verbose? - return if no_harm? - force_remove_file path - end - - def rm_rf(path) - $stderr.puts "rm -rf #{path}" if verbose? - return if no_harm? - remove_tree path - end - - def remove_tree(path) - if File.symlink?(path) - remove_file path - elsif File.dir?(path) - remove_tree0 path - else - force_remove_file path - end - end - - def remove_tree0(path) - Dir.foreach(path) do |ent| - next if ent == '.' - next if ent == '..' - entpath = "#{path}/#{ent}" - if File.symlink?(entpath) - remove_file entpath - elsif File.dir?(entpath) - remove_tree0 entpath - else - force_remove_file entpath - end - end - begin - Dir.rmdir path - rescue Errno::ENOTEMPTY - # directory may not be empty - end - end - - def move_file(src, dest) - force_remove_file dest - begin - File.rename src, dest - rescue - File.open(dest, 'wb') {|f| - f.write File.binread(src) - } - File.chmod File.stat(src).mode, dest - File.unlink src - end - end - - def force_remove_file(path) - begin - remove_file path - rescue - end - end - - def remove_file(path) - File.chmod 0777, path - File.unlink path - end - - def install(from, dest, mode, prefix = nil) - $stderr.puts "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix ? prefix + File.expand_path(dest) : dest - realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) - str = File.binread(from) - if diff?(str, realdest) - verbose_off { - rm_f realdest if File.exist?(realdest) - } - File.open(realdest, 'wb') {|f| - f.write str - } - File.chmod mode, realdest - - File.open("#{objdir_root()}/#{INSTALLED_MANIFEST}", 'a') {|f| - if prefix - f.puts realdest.sub(prefix, '') - else - f.puts realdest - end - } - end - end - - def diff?(new_content, path) - return true unless File.exist?(path) - new_content != File.binread(path) - end - - def command(*args) - $stderr.puts args.join(' ') if verbose? - system(*args) or raise RuntimeError, - "system(#{args.map{|a| a.inspect }.join(' ')}) failed" - end - - def ruby(*args) - command config('rubyprog'), *args - end - - def make(task = nil) - command(*[config('makeprog'), task].compact) - end - - def extdir?(dir) - File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") - end - - def files_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.file?("#{dir}/#{ent}") } - } - end - - DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn ) - - def directories_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT - } - end - -end - - -# This module requires: #srcdir_root, #objdir_root, #relpath -module HookScriptAPI - - def get_config(key) - @config[key] - end - - alias config get_config - - # obsolete: use metaconfig to change configuration - def set_config(key, val) - @config[key] = val - end - - # - # srcdir/objdir (works only in the package directory) - # - - def curr_srcdir - "#{srcdir_root()}/#{relpath()}" - end - - def curr_objdir - "#{objdir_root()}/#{relpath()}" - end - - def srcfile(path) - "#{curr_srcdir()}/#{path}" - end - - def srcexist?(path) - File.exist?(srcfile(path)) - end - - def srcdirectory?(path) - File.dir?(srcfile(path)) - end - - def srcfile?(path) - File.file?(srcfile(path)) - end - - def srcentries(path = '.') - Dir.open("#{curr_srcdir()}/#{path}") {|d| - return d.to_a - %w(. ..) - } - end - - def srcfiles(path = '.') - srcentries(path).select {|fname| - File.file?(File.join(curr_srcdir(), path, fname)) - } - end - - def srcdirectories(path = '.') - srcentries(path).select {|fname| - File.dir?(File.join(curr_srcdir(), path, fname)) - } - end - -end - - -class ToplevelInstaller - - Version = '3.4.1' - Copyright = 'Copyright (c) 2000-2005 Minero Aoki' - - TASKS = [ - [ 'all', 'do config, setup, then install' ], - [ 'config', 'saves your configurations' ], - [ 'show', 'shows current configuration' ], - [ 'setup', 'compiles ruby extentions and others' ], - [ 'install', 'installs files' ], - [ 'test', 'run all tests in test/' ], - [ 'clean', "does `make clean' for each extention" ], - [ 'distclean',"does `make distclean' for each extention" ] - ] - - def ToplevelInstaller.invoke - config = ConfigTable.new(load_rbconfig()) - config.load_standard_entries - config.load_multipackage_entries if multipackage? - config.fixup - klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller) - #klass.new(File.dirname($0), config).invoke - klass.new(ROOT_DIRECTORY, config).invoke - end - - def ToplevelInstaller.multipackage? - #File.dir?(File.dirname($0) + '/#{PACKAGES_DIRECTORY}') - File.dir?(ROOT_DIRECTORY + "/#{PACKAGES_DIRECTORY}") - end - - def ToplevelInstaller.load_rbconfig - if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg } - ARGV.delete(arg) - load File.expand_path(arg.split(/=/, 2)[1]) - $".push 'rbconfig.rb' - else - require 'rbconfig' - end - ::Config::CONFIG - end - - def initialize(ardir_root, config) - @ardir = File.expand_path(ardir_root) - @config = config - # cache - @valid_task_re = nil - end - - def config(key) - @config[key] - end - - def inspect - "#<#{self.class} #{__id__()}>" - end - - def invoke - run_metaconfigs - case task = parsearg_global() - when nil, 'all' - parsearg_config - init_installers - exec_config - exec_setup - exec_install - else - case task - when 'config', 'test' - ; - when 'clean', 'distclean' - @config.load_savefile if File.exist?(@config.savefile) - else - @config.load_savefile - end - __send__ "parsearg_#{task}" - init_installers - __send__ "exec_#{task}" - end - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig" - end - - def init_installers - @installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - # - # Hook Script API bases - # - - def srcdir_root - @ardir - end - - def objdir_root - '.' - end - - def relpath - '.' - end - - # - # Option Parsing - # - - def parsearg_global - while arg = ARGV.shift - case arg - when /\A\w+\z/ - setup_rb_error "invalid task: #{arg}" unless valid_task?(arg) - return arg - when '-q', '--quiet' - @config.verbose = false - when '--verbose' - @config.verbose = true - when '--help' - print_usage $stdout - exit 0 - when '--version' - puts "#{File.basename($0)} version #{Version}" - exit 0 - when '--copyright' - puts Copyright - exit 0 - else - setup_rb_error "unknown global option '#{arg}'" - end - end - nil - end - - def valid_task?(t) - valid_task_re() =~ t - end - - def valid_task_re - @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/ - end - - def parsearg_no_options - unless ARGV.empty? - task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1) - setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}" - end - end - - alias parsearg_show parsearg_no_options - alias parsearg_setup parsearg_no_options - alias parsearg_test parsearg_no_options - alias parsearg_clean parsearg_no_options - alias parsearg_distclean parsearg_no_options - - def parsearg_config - evalopt = [] - set = [] - @config.config_opt = [] - while i = ARGV.shift - if /\A--?\z/ =~ i - @config.config_opt = ARGV.dup - break - end - name, value = *@config.parse_opt(i) - if @config.value_config?(name) - @config[name] = value - else - evalopt.push [name, value] - end - set.push name - end - evalopt.each do |name, value| - @config.lookup(name).evaluate value, @config - end - # Check if configuration is valid - set.each do |n| - @config[n] if @config.value_config?(n) - end - end - - def parsearg_install - @config.no_harm = false - @config.install_prefix = '' - while a = ARGV.shift - case a - when '--no-harm' - @config.no_harm = true - when /\A--prefix=/ - path = a.split(/=/, 2)[1] - path = File.expand_path(path) unless path[0,1] == '/' - @config.install_prefix = path - else - setup_rb_error "install: unknown option #{a}" - end - end - end - - def print_usage(out) - out.puts 'Typical Installation Procedure:' - out.puts " $ ruby #{File.basename $0} config" - out.puts " $ ruby #{File.basename $0} setup" - out.puts " # ruby #{File.basename $0} install (may require root privilege)" - out.puts - out.puts 'Detailed Usage:' - out.puts " ruby #{File.basename $0} " - out.puts " ruby #{File.basename $0} [] []" - - fmt = " %-24s %s\n" - out.puts - out.puts 'Global options:' - out.printf fmt, '-q,--quiet', 'suppress message outputs' - out.printf fmt, ' --verbose', 'output messages verbosely' - out.printf fmt, ' --help', 'print this message' - out.printf fmt, ' --version', 'print version and quit' - out.printf fmt, ' --copyright', 'print copyright and quit' - out.puts - out.puts 'Tasks:' - TASKS.each do |name, desc| - out.printf fmt, name, desc - end - - fmt = " %-24s %s [%s]\n" - out.puts - out.puts 'Options for CONFIG or ALL:' - @config.each do |item| - out.printf fmt, item.help_opt, item.description, item.help_default - end - out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's" - out.puts - out.puts 'Options for INSTALL:' - out.printf fmt, '--no-harm', 'only display what to do if given', 'off' - out.printf fmt, '--prefix=path', 'install path prefix', '' - out.puts - end - - # - # Task Handlers - # - - def exec_config - @installer.exec_config - @config.save # must be final - end - - def exec_setup - @installer.exec_setup - end - - def exec_install - @installer.exec_install - end - - def exec_test - @installer.exec_test - end - - def exec_show - @config.each do |i| - printf "%-20s %s\n", i.name, i.value if i.value? - end - end - - def exec_clean - @installer.exec_clean - end - - def exec_distclean - @installer.exec_distclean - end - -end # class ToplevelInstaller - - -class ToplevelInstallerMulti < ToplevelInstaller - - include FileOperations - - def initialize(ardir_root, config) - super - @packages = directories_of("#{@ardir}/#{PACKAGES_DIRECTORY}") - raise 'no package exists' if @packages.empty? - @root_installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig", self - @packages.each do |name| - @config.load_script "#{@ardir}/#{PACKAGES_DIRECTORY}/#{name}/metaconfig" - end - end - - attr_reader :packages - - def packages=(list) - raise 'package list is empty' if list.empty? - list.each do |name| - raise "directory #{PACKAGES_DIRECTORY}/#{name} does not exist"\ - unless File.dir?("#{@ardir}/#{PACKAGES_DIRECTORY}/#{name}") - end - @packages = list - end - - def init_installers - @installers = {} - @packages.each do |pack| - @installers[pack] = Installer.new(@config, - "#{@ardir}/#{PACKAGES_DIRECTORY}/#{pack}", - "#{PACKAGES_DIRECTORY}/#{pack}") - end - with = extract_selection(config('with')) - without = extract_selection(config('without')) - @selected = @installers.keys.select {|name| - (with.empty? or with.include?(name)) \ - and not without.include?(name) - } - end - - def extract_selection(list) - a = list.split(/,/) - a.each do |name| - setup_rb_error "no such package: #{name}" unless @installers.key?(name) - end - a - end - - def print_usage(f) - super - f.puts 'Inluded packages:' - f.puts ' ' + @packages.sort.join(' ') - f.puts - end - - # - # Task Handlers - # - - def exec_config - run_hook 'pre-config' - each_selected_installers {|inst| inst.exec_config } - run_hook 'post-config' - @config.save # must be final - end - - def exec_setup - run_hook 'pre-setup' - each_selected_installers {|inst| inst.exec_setup } - run_hook 'post-setup' - end - - def exec_install - run_hook 'pre-install' - each_selected_installers {|inst| inst.exec_install } - run_hook 'post-install' - end - - def exec_test - run_hook 'pre-test' - each_selected_installers {|inst| inst.exec_test } - run_hook 'post-test' - end - - def exec_clean - rm_f @config.savefile - run_hook 'pre-clean' - each_selected_installers {|inst| inst.exec_clean } - run_hook 'post-clean' - end - - def exec_distclean - rm_f @config.savefile - run_hook 'pre-distclean' - each_selected_installers {|inst| inst.exec_distclean } - run_hook 'post-distclean' - end - - # - # lib - # - - def each_selected_installers - Dir.mkdir PACKAGES_DIRECTORY unless File.dir?(PACKAGES_DIRECTORY) - @selected.each do |pack| - $stderr.puts "Processing the package `#{pack}' ..." if verbose? - Dir.mkdir "#{PACKAGES_DIRECTORY}/#{pack}" unless File.dir?("#{PACKAGES_DIRECTORY}/#{pack}") - Dir.chdir "#{PACKAGES_DIRECTORY}/#{pack}" - yield @installers[pack] - Dir.chdir '../..' - end - end - - def run_hook(id) - @root_installer.run_hook id - end - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - -end # class ToplevelInstallerMulti - - -class Installer - - FILETYPES = %w( bin lib ext data conf man ) - - include FileOperations - include HookScriptAPI - - def initialize(config, srcroot, objroot) - @config = config - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - end - - def inspect - "#<#{self.class} #{File.basename(@srcdir)}>" - end - - def noop(rel) - end - - # - # Hook Script API base methods - # - - def srcdir_root - @srcdir - end - - def objdir_root - @objdir - end - - def relpath - @currdir - end - - # - # Config Access - # - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - - def verbose_off - begin - save, @config.verbose = @config.verbose?, false - yield - ensure - @config.verbose = save - end - end - - # - # TASK config - # - - def exec_config - exec_task_traverse 'config' - end - - alias config_dir_bin noop - alias config_dir_lib noop - - def config_dir_ext(rel) - extconf if extdir?(curr_srcdir()) - end - - alias config_dir_data noop - alias config_dir_conf noop - alias config_dir_man noop - - def extconf - ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt - end - - # - # TASK setup - # - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin(rel) - files_of(curr_srcdir()).each do |fname| - update_shebang_line "#{curr_srcdir()}/#{fname}" - end - end - - alias setup_dir_lib noop - - def setup_dir_ext(rel) - make if extdir?(curr_srcdir()) - end - - alias setup_dir_data noop - alias setup_dir_conf noop - alias setup_dir_man noop - - def update_shebang_line(path) - return if no_harm? - return if config('shebang') == 'never' - old = Shebang.load(path) - if old - $stderr.puts "warning: #{path}: Shebang line includes too many args. It is not portable and your program may not work." if old.args.size > 1 - new = new_shebang(old) - return if new.to_s == old.to_s - else - return unless config('shebang') == 'all' - new = Shebang.new(config('rubypath')) - end - $stderr.puts "updating shebang: #{File.basename(path)}" if verbose? - open_atomic_writer(path) {|output| - File.open(path, 'rb') {|f| - f.gets if old # discard - output.puts new.to_s - output.print f.read - } - } - end - - def new_shebang(old) - if /\Aruby/ =~ File.basename(old.cmd) - Shebang.new(config('rubypath'), old.args) - elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby' - Shebang.new(config('rubypath'), old.args[1..-1]) - else - return old unless config('shebang') == 'all' - Shebang.new(config('rubypath')) - end - end - - def open_atomic_writer(path, &block) - tmpfile = File.basename(path) + '.tmp' - begin - File.open(tmpfile, 'wb', &block) - File.rename tmpfile, File.basename(path) - ensure - File.unlink tmpfile if File.exist?(tmpfile) - end - end - - class Shebang - def Shebang.load(path) - line = nil - File.open(path) {|f| - line = f.gets - } - return nil unless /\A#!/ =~ line - parse(line) - end - - def Shebang.parse(line) - cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ') - new(cmd, args) - end - - def initialize(cmd, args = []) - @cmd = cmd - @args = args - end - - attr_reader :cmd - attr_reader :args - - def to_s - "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}") - end - end - - # - # TASK install - # - - def exec_install - rm_f "#{INSTALLED_MANIFEST}" - exec_task_traverse 'install' - end - - def install_dir_bin(rel) - install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755 - end - - def install_dir_lib(rel) - install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644 - end - - def install_dir_ext(rel) - return unless extdir?(curr_srcdir()) - install_files rubyextentions('.'), - "#{config('sodir')}/#{File.dirname(rel)}", - 0555 - end - - def install_dir_data(rel) - install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644 - end - - def install_dir_conf(rel) - # FIXME: should not remove current config files - # (rename previous file to .old/.org) - install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644 - end - - def install_dir_man(rel) - install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644 - end - - def install_files(list, dest, mode) - mkdir_p dest, @config.install_prefix - list.each do |fname| - install fname, dest, mode, @config.install_prefix - end - end - - def libfiles - glob_reject(%w(*.y *.output), targetfiles()) - end - - def rubyextentions(dir) - ents = glob_select("*.#{@config.dllext}", targetfiles()) - if ents.empty? - setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" - end - ents - end - - def targetfiles - mapdir(existfiles() - hookfiles()) - end - - def mapdir(ents) - ents.map {|ent| - if File.exist?(ent) - then ent # objdir - else "#{curr_srcdir()}/#{ent}" # srcdir - end - } - end - - # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w( - core RCSLOG tags TAGS .make.state - .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb - *~ *.old *.bak *.BAK *.orig *.rej _$* *$ - - *.org *.in .* - ) - - def existfiles - glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.'))) - end - - def hookfiles - %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt| - %w( config setup install clean ).map {|t| sprintf(fmt, t) } - }.flatten - end - - def glob_select(pat, ents) - re = globs2re([pat]) - ents.select {|ent| re =~ ent } - end - - def glob_reject(pats, ents) - re = globs2re(pats) - ents.reject {|ent| re =~ ent } - end - - GLOB2REGEX = { - '.' => '\.', - '$' => '\$', - '#' => '\#', - '*' => '.*' - } - - def globs2re(pats) - /\A(?:#{ - pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|') - })\z/ - end - - # - # TASK test - # - - TESTDIR = 'test' - - def exec_test - unless File.directory?('test') - $stderr.puts 'no test in this package' if verbose? - return - end - $stderr.puts 'Running tests...' if verbose? - begin - require 'test/unit' - rescue LoadError - setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.' - end - runner = Test::Unit::AutoRunner.new(true) - runner.to_run << TESTDIR - runner.run - end - - # - # TASK clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f @config.savefile - rm_f "#{INSTALLED_MANIFEST}" - end - - alias clean_dir_bin noop - alias clean_dir_lib noop - alias clean_dir_data noop - alias clean_dir_conf noop - alias clean_dir_man noop - - def clean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'clean' if File.file?('Makefile') - end - - # - # TASK distclean - # - - def exec_distclean - exec_task_traverse 'distclean' - rm_f @config.savefile - rm_f "#{INSTALLED_MANIFEST}" - end - - alias distclean_dir_bin noop - alias distclean_dir_lib noop - - def distclean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'distclean' if File.file?('Makefile') - end - - alias distclean_dir_data noop - alias distclean_dir_conf noop - alias distclean_dir_man noop - - # - # Traversing - # - - def exec_task_traverse(task) - run_hook "pre-#{task}" - FILETYPES.each do |type| - if type == 'ext' and config('without-ext') == 'yes' - $stderr.puts 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, "#{task}_dir_#{type}" - end - run_hook "post-#{task}" - end - - def traverse(task, rel, mid) - dive_into(rel) { - run_hook "pre-#{task}" - __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '') - directories_of(curr_srcdir()).each do |d| - traverse task, "#{rel}/#{d}", mid - end - run_hook "post-#{task}" - } - end - - def dive_into(rel) - return unless File.dir?("#{@srcdir}/#{rel}") - - dir = File.basename(rel) - Dir.mkdir dir unless File.dir?(dir) - prevdir = Dir.pwd - Dir.chdir dir - $stderr.puts '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir prevdir - $stderr.puts '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - def run_hook(id) - path = [ "#{curr_srcdir()}/#{id}", - "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) } - return unless path - begin - instance_eval File.read(path), path, 1 - rescue - raise if $DEBUG - setup_rb_error "hook #{path} failed:\n" + $!.message - end - end - -end # class Installer - - -class SetupError < StandardError; end - -def setup_rb_error(msg) - raise SetupError, msg -end - -if $0 == __FILE__ - begin - ToplevelInstaller.invoke - rescue SetupError - raise if $DEBUG - $stderr.puts $!.message - $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." - exit 1 - end -end diff --git a/vendor/tmail-1.2.3.1/work/script/test b/vendor/tmail-1.2.3.1/work/script/test deleted file mode 100644 index 940d28cb2..000000000 --- a/vendor/tmail-1.2.3.1/work/script/test +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env ruby - -# TODO: Ensure compile first (but only if needed) -# system "task/make" - -# Run unit tests - -live = ARGV.include?('--live') -pure = ARGV.include?('--pure') # pure won't work if live. - -unless live - $LOAD_PATH.unshift(File.expand_path('lib')) - $LOAD_PATH.unshift(File.expand_path('ext/tmailscanner')) unless pure -end -$LOAD_PATH.unshift('test') # NEEDED? - -unless glob = ARGV.select{ |a| a !~ /^[-]/ }[0] - glob = 'test/test_*.rb' -end - -Dir[glob].each do |file| - next if File.directory?(file) - begin - puts "Loading: #{file}" if $DEBUG - load(file) - rescue LoadError - puts "Error loading: #{file}" - end -end - diff --git a/vendor/xml-simple-1.0.11/lib/xmlsimple.rb b/vendor/xml-simple-1.0.11/lib/xmlsimple.rb deleted file mode 100644 index 0de24c0ef..000000000 --- a/vendor/xml-simple-1.0.11/lib/xmlsimple.rb +++ /dev/null @@ -1,1021 +0,0 @@ -# = XmlSimple -# -# Author:: Maik Schmidt -# Copyright:: Copyright (c) 2003-2006 Maik Schmidt -# License:: Distributes under the same terms as Ruby. -# -require 'rexml/document' -require 'stringio' - -# Easy API to maintain XML (especially configuration files). -class XmlSimple - include REXML - - @@VERSION = '1.0.11' - - # A simple cache for XML documents that were already transformed - # by xml_in. - class Cache - # Creates and initializes a new Cache object. - def initialize - @mem_share_cache = {} - @mem_copy_cache = {} - end - - # Saves a data structure into a file. - # - # data:: - # Data structure to be saved. - # filename:: - # Name of the file belonging to the data structure. - def save_storable(data, filename) - cache_file = get_cache_filename(filename) - File.open(cache_file, "w+") { |f| Marshal.dump(data, f) } - end - - # Restores a data structure from a file. If restoring the data - # structure failed for any reason, nil will be returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_storable(filename) - cache_file = get_cache_filename(filename) - return nil unless File::exist?(cache_file) - return nil unless File::mtime(cache_file).to_i > File::mtime(filename).to_i - data = nil - File.open(cache_file) { |f| data = Marshal.load(f) } - data - end - - # Saves a data structure in a shared memory cache. - # - # data:: - # Data structure to be saved. - # filename:: - # Name of the file belonging to the data structure. - def save_mem_share(data, filename) - @mem_share_cache[filename] = [Time::now.to_i, data] - end - - # Restores a data structure from a shared memory cache. You - # should consider these elements as "read only". If restoring - # the data structure failed for any reason, nil will be - # returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_mem_share(filename) - get_from_memory_cache(filename, @mem_share_cache) - end - - # Copies a data structure to a memory cache. - # - # data:: - # Data structure to be copied. - # filename:: - # Name of the file belonging to the data structure. - def save_mem_copy(data, filename) - @mem_share_cache[filename] = [Time::now.to_i, Marshal.dump(data)] - end - - # Restores a data structure from a memory cache. If restoring - # the data structure failed for any reason, nil will be - # returned. - # - # filename:: - # Name of the file belonging to the data structure. - def restore_mem_copy(filename) - data = get_from_memory_cache(filename, @mem_share_cache) - data = Marshal.load(data) unless data.nil? - data - end - - private - - # Returns the "cache filename" belonging to a filename, i.e. - # the extension '.xml' in the original filename will be replaced - # by '.stor'. If filename does not have this extension, '.stor' - # will be appended. - # - # filename:: - # Filename to get "cache filename" for. - def get_cache_filename(filename) - filename.sub(/(\.xml)?$/, '.stor') - end - - # Returns a cache entry from a memory cache belonging to a - # certain filename. If no entry could be found for any reason, - # nil will be returned. - # - # filename:: - # Name of the file the cache entry belongs to. - # cache:: - # Memory cache to get entry from. - def get_from_memory_cache(filename, cache) - return nil unless cache[filename] - return nil unless cache[filename][0] > File::mtime(filename).to_i - return cache[filename][1] - end - end - - # Create a "global" cache. - @@cache = Cache.new - - # Creates and intializes a new XmlSimple object. - # - # defaults:: - # Default values for options. - def initialize(defaults = nil) - unless defaults.nil? || defaults.instance_of?(Hash) - raise ArgumentError, "Options have to be a Hash." - end - @default_options = normalize_option_names(defaults, (KNOWN_OPTIONS['in'] + KNOWN_OPTIONS['out']).uniq) - @options = Hash.new - @_var_values = nil - end - - # Converts an XML document in the same way as the Perl module XML::Simple. - # - # string:: - # XML source. Could be one of the following: - # - # - nil: Tries to load and parse '.xml'. - # - filename: Tries to load and parse filename. - # - IO object: Reads from object until EOF is detected and parses result. - # - XML string: Parses string. - # - # options:: - # Options to be used. - def xml_in(string = nil, options = nil) - handle_options('in', options) - - # If no XML string or filename was supplied look for scriptname.xml. - if string.nil? - string = File::basename($0) - string.sub!(/\.[^.]+$/, '') - string += '.xml' - - directory = File::dirname($0) - @options['searchpath'].unshift(directory) unless directory.nil? - end - - if string.instance_of?(String) - if string =~ /<.*?>/m - @doc = parse(string) - elsif string == '-' - @doc = parse($stdin.readlines.to_s) - else - filename = find_xml_file(string, @options['searchpath']) - - if @options.has_key?('cache') - @options['cache'].each { |scheme| - case(scheme) - when 'storable' - content = @@cache.restore_storable(filename) - when 'mem_share' - content = @@cache.restore_mem_share(filename) - when 'mem_copy' - content = @@cache.restore_mem_copy(filename) - else - raise ArgumentError, "Unsupported caching scheme: <#{scheme}>." - end - return content if content - } - end - - @doc = load_xml_file(filename) - end - elsif string.kind_of?(IO) || string.kind_of?(StringIO) - @doc = parse(string.readlines.to_s) - else - raise ArgumentError, "Could not parse object of type: <#{string.type}>." - end - - result = collapse(@doc.root) - result = @options['keeproot'] ? merge({}, @doc.root.name, result) : result - put_into_cache(result, filename) - result - end - - # This is the functional version of the instance method xml_in. - def XmlSimple.xml_in(string = nil, options = nil) - xml_simple = XmlSimple.new - xml_simple.xml_in(string, options) - end - - # Converts a data structure into an XML document. - # - # ref:: - # Reference to data structure to be converted into XML. - # options:: - # Options to be used. - def xml_out(ref, options = nil) - handle_options('out', options) - if ref.instance_of?(Array) - ref = { @options['anonymoustag'] => ref } - end - - if @options['keeproot'] - keys = ref.keys - if keys.size == 1 - ref = ref[keys[0]] - @options['rootname'] = keys[0] - end - elsif @options['rootname'] == '' - if ref.instance_of?(Hash) - refsave = ref - ref = {} - refsave.each { |key, value| - if !scalar(value) - ref[key] = value - else - ref[key] = [ value.to_s ] - end - } - end - end - - @ancestors = [] - xml = value_to_xml(ref, @options['rootname'], '') - @ancestors = nil - - if @options['xmldeclaration'] - xml = @options['xmldeclaration'] + "\n" + xml - end - - if @options.has_key?('outputfile') - if @options['outputfile'].kind_of?(IO) - return @options['outputfile'].write(xml) - else - File.open(@options['outputfile'], "w") { |file| file.write(xml) } - end - end - xml - end - - # This is the functional version of the instance method xml_out. - def XmlSimple.xml_out(hash, options = nil) - xml_simple = XmlSimple.new - xml_simple.xml_out(hash, options) - end - - private - - # Declare options that are valid for xml_in and xml_out. - KNOWN_OPTIONS = { - 'in' => %w( - keyattr keeproot forcecontent contentkey noattr - searchpath forcearray suppressempty anonymoustag - cache grouptags normalisespace normalizespace - variables varattr keytosymbol - ), - 'out' => %w( - keyattr keeproot contentkey noattr rootname - xmldeclaration outputfile noescape suppressempty - anonymoustag indent grouptags noindent - ) - } - - # Define some reasonable defaults. - DEF_KEY_ATTRIBUTES = [] - DEF_ROOT_NAME = 'opt' - DEF_CONTENT_KEY = 'content' - DEF_XML_DECLARATION = "" - DEF_ANONYMOUS_TAG = 'anon' - DEF_FORCE_ARRAY = true - DEF_INDENTATION = ' ' - DEF_KEY_TO_SYMBOL = false - - # Normalizes option names in a hash, i.e., turns all - # characters to lower case and removes all underscores. - # Additionally, this method checks, if an unknown option - # was used and raises an according exception. - # - # options:: - # Hash to be normalized. - # known_options:: - # List of known options. - def normalize_option_names(options, known_options) - return nil if options.nil? - result = Hash.new - options.each { |key, value| - lkey = key.downcase - lkey.gsub!(/_/, '') - if !known_options.member?(lkey) - raise ArgumentError, "Unrecognised option: #{lkey}." - end - result[lkey] = value - } - result - end - - # Merges a set of options with the default options. - # - # direction:: - # 'in': If options should be handled for xml_in. - # 'out': If options should be handled for xml_out. - # options:: - # Options to be merged with the default options. - def handle_options(direction, options) - @options = options || Hash.new - - raise ArgumentError, "Options must be a Hash!" unless @options.instance_of?(Hash) - - unless KNOWN_OPTIONS.has_key?(direction) - raise ArgumentError, "Unknown direction: <#{direction}>." - end - - known_options = KNOWN_OPTIONS[direction] - @options = normalize_option_names(@options, known_options) - - unless @default_options.nil? - known_options.each { |option| - unless @options.has_key?(option) - if @default_options.has_key?(option) - @options[option] = @default_options[option] - end - end - } - end - - unless @options.has_key?('noattr') - @options['noattr'] = false - end - - if @options.has_key?('rootname') - @options['rootname'] = '' if @options['rootname'].nil? - else - @options['rootname'] = DEF_ROOT_NAME - end - - if @options.has_key?('xmldeclaration') && @options['xmldeclaration'] == true - @options['xmldeclaration'] = DEF_XML_DECLARATION - end - - @options['keytosymbol'] = DEF_KEY_TO_SYMBOL unless @options.has_key?('keytosymbol') - - if @options.has_key?('contentkey') - if @options['contentkey'] =~ /^-(.*)$/ - @options['contentkey'] = $1 - @options['collapseagain'] = true - end - else - @options['contentkey'] = DEF_CONTENT_KEY - end - - unless @options.has_key?('normalisespace') - @options['normalisespace'] = @options['normalizespace'] - end - @options['normalisespace'] = 0 if @options['normalisespace'].nil? - - if @options.has_key?('searchpath') - unless @options['searchpath'].instance_of?(Array) - @options['searchpath'] = [ @options['searchpath'] ] - end - else - @options['searchpath'] = [] - end - - if @options.has_key?('cache') && scalar(@options['cache']) - @options['cache'] = [ @options['cache'] ] - end - - @options['anonymoustag'] = DEF_ANONYMOUS_TAG unless @options.has_key?('anonymoustag') - - if !@options.has_key?('indent') || @options['indent'].nil? - @options['indent'] = DEF_INDENTATION - end - - @options['indent'] = '' if @options.has_key?('noindent') - - # Special cleanup for 'keyattr' which could be an array or - # a hash or left to default to array. - if @options.has_key?('keyattr') - if !scalar(@options['keyattr']) - # Convert keyattr => { elem => '+attr' } - # to keyattr => { elem => ['attr', '+'] } - if @options['keyattr'].instance_of?(Hash) - @options['keyattr'].each { |key, value| - if value =~ /^([-+])?(.*)$/ - @options['keyattr'][key] = [$2, $1 ? $1 : ''] - end - } - elsif !@options['keyattr'].instance_of?(Array) - raise ArgumentError, "'keyattr' must be String, Hash, or Array!" - end - else - @options['keyattr'] = [ @options['keyattr'] ] - end - else - @options['keyattr'] = DEF_KEY_ATTRIBUTES - end - - if @options.has_key?('forcearray') - if @options['forcearray'].instance_of?(Regexp) - @options['forcearray'] = [ @options['forcearray'] ] - end - - if @options['forcearray'].instance_of?(Array) - force_list = @options['forcearray'] - unless force_list.empty? - @options['forcearray'] = {} - force_list.each { |tag| - if tag.instance_of?(Regexp) - unless @options['forcearray']['_regex'].instance_of?(Array) - @options['forcearray']['_regex'] = [] - end - @options['forcearray']['_regex'] << tag - else - @options['forcearray'][tag] = true - end - } - else - @options['forcearray'] = false - end - else - @options['forcearray'] = @options['forcearray'] ? true : false - end - else - @options['forcearray'] = DEF_FORCE_ARRAY - end - - if @options.has_key?('grouptags') && !@options['grouptags'].instance_of?(Hash) - raise ArgumentError, "Illegal value for 'GroupTags' option - expected a Hash." - end - - if @options.has_key?('variables') && !@options['variables'].instance_of?(Hash) - raise ArgumentError, "Illegal value for 'Variables' option - expected a Hash." - end - - if @options.has_key?('variables') - @_var_values = @options['variables'] - elsif @options.has_key?('varattr') - @_var_values = {} - end - end - - # Actually converts an XML document element into a data structure. - # - # element:: - # The document element to be collapsed. - def collapse(element) - result = @options['noattr'] ? {} : get_attributes(element) - - if @options['normalisespace'] == 2 - result.each { |k, v| result[k] = normalise_space(v) } - end - - if element.has_elements? - element.each_element { |child| - value = collapse(child) - if empty(value) && (element.attributes.empty? || @options['noattr']) - next if @options.has_key?('suppressempty') && @options['suppressempty'] == true - end - result = merge(result, child.name, value) - } - if has_mixed_content?(element) - # normalisespace? - content = element.texts.map { |x| x.to_s } - content = content[0] if content.size == 1 - result[@options['contentkey']] = content - end - elsif element.has_text? # i.e. it has only text. - return collapse_text_node(result, element) - end - - # Turn Arrays into Hashes if key fields present. - count = fold_arrays(result) - - # Disintermediate grouped tags. - if @options.has_key?('grouptags') - result.each { |key, value| - next unless (value.instance_of?(Hash) && (value.size == 1)) - child_key, child_value = value.to_a[0] - if @options['grouptags'][key] == child_key - result[key] = child_value - end - } - end - - # Fold Hases containing a single anonymous Array up into just the Array. - if count == 1 - anonymoustag = @options['anonymoustag'] - if result.has_key?(anonymoustag) && result[anonymoustag].instance_of?(Array) - return result[anonymoustag] - end - end - - if result.empty? && @options.has_key?('suppressempty') - return @options['suppressempty'] == '' ? '' : nil - end - - result - end - - # Collapses a text node and merges it with an existing Hash, if - # possible. - # Thanks to Curtis Schofield for reporting a subtle bug. - # - # hash:: - # Hash to merge text node value with, if possible. - # element:: - # Text node to be collapsed. - def collapse_text_node(hash, element) - value = node_to_text(element) - if empty(value) && !element.has_attributes? - return {} - end - - if element.has_attributes? && !@options['noattr'] - return merge(hash, @options['contentkey'], value) - else - if @options['forcecontent'] - return merge(hash, @options['contentkey'], value) - else - return value - end - end - end - - # Folds all arrays in a Hash. - # - # hash:: - # Hash to be folded. - def fold_arrays(hash) - fold_amount = 0 - keyattr = @options['keyattr'] - if (keyattr.instance_of?(Array) || keyattr.instance_of?(Hash)) - hash.each { |key, value| - if value.instance_of?(Array) - if keyattr.instance_of?(Array) - hash[key] = fold_array(value) - else - hash[key] = fold_array_by_name(key, value) - end - fold_amount += 1 - end - } - end - fold_amount - end - - # Folds an Array to a Hash, if possible. Folding happens - # according to the content of keyattr, which has to be - # an array. - # - # array:: - # Array to be folded. - def fold_array(array) - hash = Hash.new - array.each { |x| - return array unless x.instance_of?(Hash) - key_matched = false - @options['keyattr'].each { |key| - if x.has_key?(key) - key_matched = true - value = x[key] - return array if value.instance_of?(Hash) || value.instance_of?(Array) - value = normalise_space(value) if @options['normalisespace'] == 1 - x.delete(key) - hash[value] = x - break - end - } - return array unless key_matched - } - hash = collapse_content(hash) if @options['collapseagain'] - hash - end - - # Folds an Array to a Hash, if possible. Folding happens - # according to the content of keyattr, which has to be - # a Hash. - # - # name:: - # Name of the attribute to be folded upon. - # array:: - # Array to be folded. - def fold_array_by_name(name, array) - return array unless @options['keyattr'].has_key?(name) - key, flag = @options['keyattr'][name] - - hash = Hash.new - array.each { |x| - if x.instance_of?(Hash) && x.has_key?(key) - value = x[key] - return array if value.instance_of?(Hash) || value.instance_of?(Array) - value = normalise_space(value) if @options['normalisespace'] == 1 - hash[value] = x - hash[value]["-#{key}"] = hash[value][key] if flag == '-' - hash[value].delete(key) unless flag == '+' - else - $stderr.puts("Warning: <#{name}> element has no '#{key}' attribute.") - return array - end - } - hash = collapse_content(hash) if @options['collapseagain'] - hash - end - - # Tries to collapse a Hash even more ;-) - # - # hash:: - # Hash to be collapsed again. - def collapse_content(hash) - content_key = @options['contentkey'] - hash.each_value { |value| - return hash unless value.instance_of?(Hash) && value.size == 1 && value.has_key?(content_key) - hash.each_key { |key| hash[key] = hash[key][content_key] } - } - hash - end - - # Adds a new key/value pair to an existing Hash. If the key to be added - # does already exist and the existing value associated with key is not - # an Array, it will be converted into an Array. Then the new value is - # appended to that Array. - # - # hash:: - # Hash to add key/value pair to. - # key:: - # Key to be added. - # value:: - # Value to be associated with key. - def merge(hash, key, value) - if value.instance_of?(String) - value = normalise_space(value) if @options['normalisespace'] == 2 - - # do variable substitutions - unless @_var_values.nil? || @_var_values.empty? - value.gsub!(/\$\{(\w+)\}/) { |x| get_var($1) } - end - - # look for variable definitions - if @options.has_key?('varattr') - varattr = @options['varattr'] - if hash.has_key?(varattr) - set_var(hash[varattr], value) - end - end - end - - #patch for converting keys to symbols - if @options.has_key?('keytosymbol') - if @options['keytosymbol'] == true - key = key.to_s.downcase.to_sym - end - end - - if hash.has_key?(key) - if hash[key].instance_of?(Array) - hash[key] << value - else - hash[key] = [ hash[key], value ] - end - elsif value.instance_of?(Array) # Handle anonymous arrays. - hash[key] = [ value ] - else - if force_array?(key) - hash[key] = [ value ] - else - hash[key] = value - end - end - hash - end - - # Checks, if the 'forcearray' option has to be used for - # a certain key. - def force_array?(key) - return false if key == @options['contentkey'] - return true if @options['forcearray'] == true - forcearray = @options['forcearray'] - if forcearray.instance_of?(Hash) - return true if forcearray.has_key?(key) - return false unless forcearray.has_key?('_regex') - forcearray['_regex'].each { |x| return true if key =~ x } - end - return false - end - - # Converts the attributes array of a document node into a Hash. - # Returns an empty Hash, if node has no attributes. - # - # node:: - # Document node to extract attributes from. - def get_attributes(node) - attributes = {} - node.attributes.each { |n,v| attributes[n] = v } - attributes - end - - # Determines, if a document element has mixed content. - # - # element:: - # Document element to be checked. - def has_mixed_content?(element) - if element.has_text? && element.has_elements? - return true if element.texts.join('') !~ /^\s*$/s - end - false - end - - # Called when a variable definition is encountered in the XML. - # A variable definition looks like - # value - # where attrname matches the varattr setting. - def set_var(name, value) - @_var_values[name] = value - end - - # Called during variable substitution to get the value for the - # named variable. - def get_var(name) - if @_var_values.has_key?(name) - return @_var_values[name] - else - return "${#{name}}" - end - end - - # Recurses through a data structure building up and returning an - # XML representation of that structure as a string. - # - # ref:: - # Reference to the data structure to be encoded. - # name:: - # The XML tag name to be used for this item. - # indent:: - # A string of spaces for use as the current indent level. - def value_to_xml(ref, name, indent) - named = !name.nil? && name != '' - nl = @options.has_key?('noindent') ? '' : "\n" - - if !scalar(ref) - if @ancestors.member?(ref) - raise ArgumentError, "Circular data structures not supported!" - end - @ancestors << ref - else - if named - return [indent, '<', name, '>', @options['noescape'] ? ref.to_s : escape_value(ref.to_s), '', nl].join('') - else - return ref.to_s + nl - end - end - - # Unfold hash to array if possible. - if ref.instance_of?(Hash) && !ref.empty? && !@options['keyattr'].empty? && indent != '' - ref = hash_to_array(name, ref) - end - - result = [] - if ref.instance_of?(Hash) - # Reintermediate grouped values if applicable. - if @options.has_key?('grouptags') - ref.each { |key, value| - if @options['grouptags'].has_key?(key) - ref[key] = { @options['grouptags'][key] => value } - end - } - end - - nested = [] - text_content = nil - if named - result << indent << '<' << name - end - - if !ref.empty? - ref.each { |key, value| - next if !key.nil? && key[0, 1] == '-' - if value.nil? - unless @options.has_key?('suppressempty') && @options['suppressempty'].nil? - raise ArgumentError, "Use of uninitialized value!" - end - value = {} - end - - if !scalar(value) || @options['noattr'] - nested << value_to_xml(value, key, indent + @options['indent']) - else - value = value.to_s - value = escape_value(value) unless @options['noescape'] - if key == @options['contentkey'] - text_content = value - else - result << ' ' << key << '="' << value << '"' - end - end - } - else - text_content = '' - end - - if !nested.empty? || !text_content.nil? - if named - result << '>' - if !text_content.nil? - result << text_content - nested[0].sub!(/^\s+/, '') if !nested.empty? - else - result << nl - end - if !nested.empty? - result << nested << indent - end - result << '' << nl - else - result << nested - end - else - result << ' />' << nl - end - elsif ref.instance_of?(Array) - ref.each { |value| - if scalar(value) - result << indent << '<' << name << '>' - result << (@options['noescape'] ? value.to_s : escape_value(value.to_s)) - result << '' << nl - elsif value.instance_of?(Hash) - result << value_to_xml(value, name, indent) - else - result << indent << '<' << name << '>' << nl - result << value_to_xml(value, @options['anonymoustag'], indent + @options['indent']) - result << indent << '' << nl - end - } - else - # Probably, this is obsolete. - raise ArgumentError, "Can't encode a value of type: #{ref.type}." - end - @ancestors.pop if !scalar(ref) - result.join('') - end - - # Checks, if a certain value is a "scalar" value. Whatever - # that will be in Ruby ... ;-) - # - # value:: - # Value to be checked. - def scalar(value) - return false if value.instance_of?(Hash) || value.instance_of?(Array) - return true - end - - # Attempts to unfold a hash of hashes into an array of hashes. Returns - # a reference to th array on success or the original hash, if unfolding - # is not possible. - # - # parent:: - # - # hashref:: - # Reference to the hash to be unfolded. - def hash_to_array(parent, hashref) - arrayref = [] - hashref.each { |key, value| - return hashref unless value.instance_of?(Hash) - - if @options['keyattr'].instance_of?(Hash) - return hashref unless @options['keyattr'].has_key?(parent) - arrayref << { @options['keyattr'][parent][0] => key }.update(value) - else - arrayref << { @options['keyattr'][0] => key }.update(value) - end - } - arrayref - end - - # Replaces XML markup characters by their external entities. - # - # data:: - # The string to be escaped. - def escape_value(data) - Text::normalize(data) - end - - # Removes leading and trailing whitespace and sequences of - # whitespaces from a string. - # - # text:: - # String to be normalised. - def normalise_space(text) - text.strip.gsub(/\s\s+/, ' ') - end - - # Checks, if an object is nil, an empty String or an empty Hash. - # Thanks to Norbert Gawor for a bugfix. - # - # value:: - # Value to be checked for emptyness. - def empty(value) - case value - when Hash - return value.empty? - when String - return value !~ /\S/m - else - return value.nil? - end - end - - # Converts a document node into a String. - # If the node could not be converted into a String - # for any reason, default will be returned. - # - # node:: - # Document node to be converted. - # default:: - # Value to be returned, if node could not be converted. - def node_to_text(node, default = nil) - if node.instance_of?(REXML::Element) - node.texts.map { |t| t.value }.join('') - elsif node.instance_of?(REXML::Attribute) - node.value.nil? ? default : node.value.strip - elsif node.instance_of?(REXML::Text) - node.value.strip - else - default - end - end - - # Parses an XML string and returns the according document. - # - # xml_string:: - # XML string to be parsed. - # - # The following exception may be raised: - # - # REXML::ParseException:: - # If the specified file is not wellformed. - def parse(xml_string) - Document.new(xml_string) - end - - # Searches in a list of paths for a certain file. Returns - # the full path to the file, if it could be found. Otherwise, - # an exception will be raised. - # - # filename:: - # Name of the file to search for. - # searchpath:: - # List of paths to search in. - def find_xml_file(file, searchpath) - filename = File::basename(file) - - if filename != file - return file if File::file?(file) - else - searchpath.each { |path| - full_path = File::join(path, filename) - return full_path if File::file?(full_path) - } - end - - if searchpath.empty? - return file if File::file?(file) - raise ArgumentError, "File does not exist: #{file}." - end - raise ArgumentError, "Could not find <#{filename}> in <#{searchpath.join(':')}>" - end - - # Loads and parses an XML configuration file. - # - # filename:: - # Name of the configuration file to be loaded. - # - # The following exceptions may be raised: - # - # Errno::ENOENT:: - # If the specified file does not exist. - # REXML::ParseException:: - # If the specified file is not wellformed. - def load_xml_file(filename) - parse(File.readlines(filename).to_s) - end - - # Caches the data belonging to a certain file. - # - # data:: - # Data to be cached. - # filename:: - # Name of file the data was read from. - def put_into_cache(data, filename) - if @options.has_key?('cache') - @options['cache'].each { |scheme| - case(scheme) - when 'storable' - @@cache.save_storable(data, filename) - when 'mem_share' - @@cache.save_mem_share(data, filename) - when 'mem_copy' - @@cache.save_mem_copy(data, filename) - else - raise ArgumentError, "Unsupported caching scheme: <#{scheme}>." - end - } - end - end -end - -# vim:sw=2 diff --git a/vendor/xmpp4r-0.3.2/COPYING b/vendor/xmpp4r-0.3.2/COPYING deleted file mode 100644 index d60c31a97..000000000 --- a/vendor/xmpp4r-0.3.2/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/vendor/xmpp4r-0.3.2/ChangeLog b/vendor/xmpp4r-0.3.2/ChangeLog deleted file mode 100644 index 7f8363a0e..000000000 --- a/vendor/xmpp4r-0.3.2/ChangeLog +++ /dev/null @@ -1,50 +0,0 @@ -XMPP4R 0.3.2 (15/10/2007) -========================= -* Serious bug involving Ruby threading fixed (caused exceptions with - ruby 1.8.6) -* vCard helper fixes -* Jabber RPC (JEP0009) support -* HTTP Binding (JEP0124) support -* Publish-Subscribe support -* XMPPElement: a framework for classes representing XML elements -* Ad-hoc commands support -* Improvements to Dataforms: XData, XDataTitle and XDataInstructions - -XMPP4R 0.3.1 (23/04/2007) -========================= -* SASL fixes -* Message#x and Presence#x support element selection by namespace -* Proper XML entity escaping for REXML text nodes -* Improvements to FileTransfer::Helper and SOCKS5BytestreamsServer -* Vcard::Helper fixes -* Update Digest module usage to reflect recent Ruby versions -* More documentation - -XMPP4R 0.3 (20/07/2006) -======================= -* SRV lookup capability in Client#connect -* Stringprep support for JIDs -* TLS & SASL support -* Basic Dataforms support -* Multi-User Chat Helpers -* Helpers for File-Transfer, SOCKS5 Bytestreams, In-Band Bytestreams -* Roster helper has modified subscription-request semantics (see Roster#add_subscription_request_callback) -* A lot of features have renamed namespaces (see UPDATING file) - -XMPP4R 0.2 (20/10/2005) -======================= -* Workarounds for REXML bugs. -* Presences are now Comparable according to priority or interest -* fixed a serious bug in Stream#send which caused some lockups. Reported by - chunlinyao@gmail.com. -* Moved REXML::Element#add to REXML::Element#typed_add to keep add accessible -* Rewritten Roster helper -* Added Vcard helper and improved IqVcard -* XMLStanza id generator -* Support for Roster Item Exchange (JEP-0093 and JEP-0144) -* Client#password= to change client's account password -* Documentation fixes - -XMPP4R 0.1 (12/09/2005) -======================= -* first public release. diff --git a/vendor/xmpp4r-0.3.2/LICENSE b/vendor/xmpp4r-0.3.2/LICENSE deleted file mode 100644 index bd730c0c2..000000000 --- a/vendor/xmpp4r-0.3.2/LICENSE +++ /dev/null @@ -1,59 +0,0 @@ -XMPP4R is copyrighted free software by Lucas Nussbaum -, Stephan Maka , and others. -You can redistribute it and/or modify it under either the terms of the GPL (see -COPYING file), or the conditions below: - - 1. You may make and give away verbatim copies of the source form of the - software without restriction, provided that you duplicate all of the - original copyright notices and associated disclaimers. - - 2. You may modify your copy of the software in any way, provided that - you do at least ONE of the following: - - a) place your modifications in the Public Domain or otherwise - make them Freely Available, such as by posting said - modifications to Usenet or an equivalent medium, or by allowing - the author to include your modifications in the software. - - b) use the modified software only within your corporation or - organization. - - c) rename any non-standard executables so the names do not conflict - with standard executables, which must also be provided. - - d) make other distribution arrangements with the author. - - 3. You may distribute the software in object code or executable - form, provided that you do at least ONE of the following: - - a) distribute the executables and library files of the software, - together with instructions (in the manual page or equivalent) - on where to get the original distribution. - - b) accompany the distribution with the machine-readable source of - the software. - - c) give non-standard executables non-standard names, with - instructions on where to get the original software distribution. - - d) make other distribution arrangements with the author. - - 4. You may modify and include the part of the software into any other - software (possibly commercial). But some files in the distribution - are not written by the author, so that they are not under this terms. - - They are gc.c(partly), utils.c(partly), regex.[ch], st.[ch] and some - files under the ./missing directory. See each file for the copying - condition. - - 5. The scripts and library files supplied as input to or produced as - output from the software do not automatically fall under the - copyright of the software, but belong to whomever generated them, - and may be sold commercially, and may be aggregated with this - software. - - 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR - IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. - diff --git a/vendor/xmpp4r-0.3.2/README b/vendor/xmpp4r-0.3.2/README deleted file mode 100644 index 2daf1f93f..000000000 --- a/vendor/xmpp4r-0.3.2/README +++ /dev/null @@ -1,28 +0,0 @@ - XMPP4R ----------- -by: - Lucas Nussbaum - Stephan Maka - Kirill A. Shutemov - Yuki Mitsui - Peter Schrammel - Olli - Vojtech Vobr - Andreas Wiese - -Currently, all the information is provided on - - http://home.gna.org/xmpp4r/ - -The integrated HTML documentation can be built with - - rake rdoc - -If you need to ask questions, feel free to ask them on the -xmpp4r-devel@gna.org mailing list. When reporting problems, -please include a protocol dump which can be enabled with: - Jabber::debug = true - -XMPP4R is released under the Ruby license (see the LICENSE file), which is -compatible with the GNU GPL (see the COPYING file) via an explicit -dual-licensing clause. diff --git a/vendor/xmpp4r-0.3.2/UPDATING b/vendor/xmpp4r-0.3.2/UPDATING deleted file mode 100644 index 1332c256d..000000000 --- a/vendor/xmpp4r-0.3.2/UPDATING +++ /dev/null @@ -1,40 +0,0 @@ -Updating from XMPP4R 0.2 to 0.3 -=============================== - - -There has been a redesign process in the development of XMPP4R 0.3. If -you encounter any problems, read the following instructions. - - -1) All extension libraries have different paths and namespaces: - -Roster: -require 'xmpp4r/roster' -Jabber::Helpers::Roster -> Jabber::Roster::Helper - -Multi-User Chat: -require 'xmpp4r/muc' -Jabber::Helpers::MUCBrowser -> Jabber::MUC::MUCBrowser -Jabber::Helpers::MUCClient -> Jabber::MUC::MUCClient -Jabber::Helpers::SimpleMUCClient -> Jabber::MUC::SimpleMUCClient - -Software Version: -require 'xmpp4r/version' -Jabber::Helpers::Version -> Jabber::Version::SimpleResponder - -vCard: -require 'xmpp4r/vcard' -Jabber::Helpers::Vcard -> Jabber::Vcard::Helper - -Bytestreams: -require 'xmpp4r/bytestreams' -Jabber::Helpers::FileTransfer -> Jabber::FileTransfer::Helper - -For a complete list of new class names see test/tc_class_names.rb - - -2) add_*_callback methods do not accept procs anymore. procs maybe -instead passed with the & sign. - -Example: client.add_message_callback(&my_message_handler) - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/README b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/README deleted file mode 100644 index 92be06378..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/README +++ /dev/null @@ -1,57 +0,0 @@ -What is this? - -This is an example of what you can do with XMPP4R. It is a conferencing -component in which you can walk around, travel to various places, look -at things and talk to other visitors on the same places. If you like -Multi-User Dungeons (MUDs) this is for you! - ---- - -How does it work? - -The component loads a few worlds from a few XML files. Each world is a -component. Once joined the chat will tell you what you can do. Remember -that you can get a command listing anytime by saying '?'. - -Reading 'You can go north, west' you may say 'go north' to go in the -northern direction and 'go west' to go in the western direction. You'll -then find yourself at some other place but still in the same MUC -conference. Your groupchat roster will change as you'll notice different -people and things that are just in the same place, not other places. - -Before starting to hack the scripts you may want to take a look at -tower.xml. Note that users are s, too and the whole world could -be serialized back to XML by just issuing "world.to_s". - -Please note that the code, especially the error handling, is of extreme -poor quality and was mostly written in one afternoon. If I'm going to -develop this further everything should be rewritten... - ---- - -How to try? - -Because this is a component you are going to need your own Jabber -Daemon - which you'll need anyways if you're going to experiment with -XMPP4R. ;-) - -Syntax: -./adventure.rb - -Example: -./adventure.rb mud.example.com geheimnis localhost - ---- - -Messages seem to have random order? - -I don't know any solution for this. One may add short delays between -messages, but that would only be a very dirty hack. - -RFC3920: - -"10. Server Rules for Handling XML Stanzas - -Compliant server implementations MUST ensure in-order processing of -XML stanzas between any two entities." - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb deleted file mode 100755 index 0449ea988..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventure.rb +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../lib' - -require 'xmpp4r' -require 'xmpp4r/discovery' -require 'xmpp4r/muc/x/muc' - -require 'adventuremuc' - - -#Jabber::debug = true - -if ARGV.size != 3 - puts "Syntax: ./adventure.rb " - puts "See README for further help" - exit -end - -muc = AdventureMUC::new(Jabber::JID::new(ARGV[0]), ARGV[1], ARGV[2]) -muc.add_world('tower.xml') -muc.add_world('cube.xml') -Thread.stop diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb deleted file mode 100644 index 6d70f072d..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/adventuremuc.rb +++ /dev/null @@ -1,136 +0,0 @@ -require 'world' - -class AdventureMUC - def initialize(jid, secret, addr, port=5347) - @worlds = {} - - @component = Jabber::Component::new(jid) - @component.connect(addr, port) - @component.auth(secret) - @component.on_exception { |e,| - puts "#{e.class}: #{e}\n#{e.backtrace.join("\n")}" - } - - @component.add_iq_callback { |iq| - handle_iq(iq) - } - @component.add_presence_callback { |pres| - handle_presence(pres) - } - @component.add_message_callback { |msg| - handle_message(msg) - } - - puts "Adventure component up and running" - end - - def add_world(file) - print "Adding world from #{file}..." - begin - world = World.new_from_file(self, file) - rescue Exception => e - puts " #{e.to_s}" - exit - end - @worlds[world.node] = world - puts " #{world.iname}" - end - - def send(worldnode, worldresource, stanza) - stanza.from = Jabber::JID::new(worldnode, @component.jid.domain, worldresource) - @component.send(stanza) - end - - def handle_iq(iq) - puts "iq: from #{iq.from} type #{iq.type} to #{iq.to}: #{iq.queryns}" - - if iq.query.kind_of?(Jabber::Discovery::IqQueryDiscoInfo) - handle_disco_info(iq) - true - elsif iq.query.kind_of?(Jabber::Discovery::IqQueryDiscoItems) - handle_disco_items(iq) - true - else - false - end - end - - def handle_disco_info(iq) - if iq.type != :get - answer = iq.answer - answer.type = :error - answer.add(Jabber::Error.new('bad-request')) - @component.send(answer) if iq.type != :error - return - end - answer = iq.answer - answer.type = :result - if iq.to.node == nil - answer.query.add(Jabber::Discovery::Identity.new('conference', 'Adventure component', 'text')) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::Discovery::IqQueryDiscoInfo.new.namespace)) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::Discovery::IqQueryDiscoItems.new.namespace)) - else - world = @worlds[iq.to.node] - if world.nil? - answer.type = :error - answer.query.add(Jabber::Error.new('item-not-found', 'The world you are trying to reach is currently unavailable.')) - else - answer.query.add(Jabber::Discovery::Identity.new('conference', world.iname, 'text')) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::Discovery::IqQueryDiscoInfo.new.namespace)) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::Discovery::IqQueryDiscoItems.new.namespace)) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::MUC::XMUC.new.namespace)) - answer.query.add(Jabber::Discovery::Feature.new(Jabber::MUC::XMUCUser.new.namespace)) - end - end - @component.send(answer) - end - - def handle_disco_items(iq) - if iq.type != :get - answer = iq.answer - answer.add(Jabber::Error.new('bad-request')) - @component.send(answer) - return - end - answer = iq.answer - answer.type = :result - if iq.to.node == nil - @worlds.each { |node,world| - answer.query.add(Jabber::Discovery::Item.new(Jabber::JID::new(node, @component.jid.domain), world.iname)) - } - end - @component.send(answer) - end - - def handle_presence(pres) - puts "presence: from #{pres.from} type #{pres.type} to #{pres.to}" - - world = @worlds[pres.to.node] - if world.nil? - answer = pres.answer - answer.type = :error - answer.add(Jabber::Error.new('item-not-found', 'The world you are trying to reach is currently unavailable.')) - @component.send(answer) - else - world.handle_presence(pres) - end - - true - end - - def handle_message(msg) - puts "message: from #{msg.from} type #{msg.type} to #{msg.to}: #{msg.body.inspect}" - - world = @worlds[msg.to.node] - if world.nil? - answer = msg.answer - answer.type = :error - answer.add(Jabber::Error.new('item-not-found', 'The world you are trying to reach is currently unavailable.')) - @component.send(answer) - else - world.handle_message(msg) - end - - true - end -end diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/cube.xml b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/cube.xml deleted file mode 100644 index 8bb337ee3..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/cube.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - This is a big white room. - There are doors up, down, left, right, in the back and in front of you. - There's nothing else. - - - - - - - - - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/tower.xml b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/tower.xml deleted file mode 100644 index 7b2695ae3..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/tower.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - You are in a beautiful garden. - There's an impressive tower beneath. Its door is open. - - - - - - Welcome to the tower's lower room. - There's a ladder to upstairs. - - - - - - This is the upper room. - There's only a bed here. A wizard is currently sleeping in it. - - - - - There's a very beautiful well in the middle of this place. - A frog sits on the well's edge. It looks frightening happy. - - - - - - - Hello great hero! - Welcome to %place% - - - The %self% waves towards %actor% - - - I would love to come with you, great hero. But I'm immobile due to the simple nature of this game. Would *YOU* like to /code/ me movable? So we could enjoy great adventures together... - - - %actor% touches the %self% - Quaaack! That feels good. - - - chat - Happy - - - - - - *snork* - - - dnd - Sleeping... go bother my assistant, the frog. - - - - - - You see a beautiful garden. There's a well behind the garden. But a huge green monster is sitting on it's edge. - - - There's a great view from up here - - - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/world.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/world.rb deleted file mode 100644 index 07e3e8492..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/adventure/world.rb +++ /dev/null @@ -1,425 +0,0 @@ -require 'rexml/document' - -class World < REXML::Element - def initialize(muc) - super('world') - - @muc = muc - end - - def send(resource, stanza) - # Avoid sending to things without JID - if stanza.to != nil - @muc.send(node, resource, stanza) - end - end - - def World.new_from_file(muc, filename) - file = File.new(filename) - world = World.new(muc) - world.import(REXML::Document.new(file).root) - file.close - world - end - - def add(xmlelement) - if xmlelement.kind_of?(REXML::Element) && (xmlelement.name == 'place') - super(Place::new.import(xmlelement)) - elsif xmlelement.kind_of?(REXML::Element) && (xmlelement.name == 'thing') && !xmlelement.kind_of?(Player) - super(Thing::new(self).import(xmlelement)) - else - super(xmlelement) - end - end - - def node - attributes['node'] - end - - def iname - attributes['name'] - end - - def place(placename) - pl = nil - each_element('place') { |place| - if place.iname == placename - pl = place - end - } - pl - end - - def each_thing_by_place(place, &block) - each_element('thing') { |t| - if t.place == place - yield(t) - end - } - end - - def move_thing(thing, newplace) - each_thing_by_place(thing.place) { |t| - # Call leave hooks - t.on_leave(thing, newplace) - - # Broadcast unavailability presence to leaver - unless t.presence.nil? - pres = Jabber::Presence.import(t.presence) - pres.type = :unavailable - pres.to = thing.jid - send(t.iname, pres) unless t.jid == thing.jid - end - - # Broadcast unavailability presence to all who are here - unless thing.presence.nil? - pres = Jabber::Presence.import(thing.presence) - pres.type = :unavailable - pres.to = t.jid - send(thing.iname, pres) unless thing.jid == t.jid - end - } - - # Enter new place - oldplace = thing.place - thing.place = newplace - - each_thing_by_place(thing.place) { |t| - # Broadcast availability presence to enterer - unless t.presence.nil? - pres = Jabber::Presence.import(t.presence) - pres.to = thing.jid - send(t.iname, pres) - end - - # Broadcast availability presence to all who are here - unless thing.presence.nil? - pres = Jabber::Presence.import(thing.presence) - pres.to = t.jid - send(thing.iname, pres) - end - } - - thing.send_message(nil, " ") - subject = newplace.nil? ? " " : newplace.dup - subject[0] = subject[0,1].upcase - thing.send_message(nil, "Entering #{newplace}", subject) - thing.send_message(nil, " ") - thing.see(place(newplace)) - - each_thing_by_place(thing.place) { |t| - # Call enter hooks - t.on_enter(thing, oldplace) - } - end - - def handle_presence(pres) - # A help for the irritated first: - if pres.type == :subscribe - msg = Jabber::Message.new(pres.from) - msg.type = :normal - msg.subject = "Adventure component help" - msg.body = "You don't need to subscribe to my presence. Simply use your Jabber client to join the MUC or conference at #{pres.to.strip}" - send(nil, msg) - return(true) - end - - # Look if player is already known - player = nil - each_element('thing') { |thing| - if thing.kind_of?(Player) && pres.to.resource == thing.iname - player = thing - end - - # Disallow nick changes - if thing.kind_of?(Player) && (pres.from == thing.jid) && (player != thing) - answer = pres.answer(false) - answer.type = :error - answer.add(Jabber::Error.new('not-acceptable', 'Nickchange not allowed')) - send(thing.iname, answer) - return(true) - end - } - - # Either nick-collission or empty nick - unless (player.nil? || pres.from == player.jid) && (pres.to.resource.to_s.size > 1) - answer = pres.answer - answer.type = :error - if (pres.to.resource.to_s.size > 1) - answer.add(Jabber::Error::new('conflict', 'Nickname already used')) - else - answer.add(Jabber::Error::new('not-acceptable', 'Please use a nickname')) - end - send(nil, answer) - return(true) - end - - # Add the valid player - if player.nil? - player = add(Player.new(self, pres.to.resource, pres.from)) - player.presence = pres - move_thing(player, attributes['start']) - player.send_message('Help!', 'Send "?" to get a list of available commands any time.') - # Or broadcast updated presence - else - player.presence = pres - - each_thing_by_place(player.place) { |t| - # Broadcast presence to all who are here - pres = Jabber::Presence.import(player.presence) - pres.to = t.jid - send(player.iname, pres) - } - end - - # Remove the player instantly - if pres.type == :error || pres.type == :unavailable - move_thing(player, nil) - delete_element(player) - end - end - - def handle_message(msg) - player = nil - each_element('thing') { |thing| - if thing.kind_of?(Player) && msg.to.resource == nil && msg.from == thing.jid - player = thing - end - } - - if player.nil? - answer = msg.answer - answer.type = :error - answer.add(Jabber::Error::new('forbidden')) - send(msg.to.resource, answer) - return(true) - end - - unless command(player, msg.body) - each_thing_by_place(player.place) { |thing| - thing.send_message(player.iname, msg.body) - } - end - end - - def command(player, text) - if text == '?' - player.send_message(nil, "(Command) who") - place(player.place).each_element('go') { |go| - player.send_message(nil, "(Command) go #{go.attributes['spec']}") - } - each_thing_by_place(player.place) { |thing| - thing.each_element('on-command') { |c| - player.send_message(nil, "(Command) #{c.attributes['command']} #{thing.command_name}") - } - } - return(true) - else - words = text.split(/ /) - cmd = words.shift - what = words.shift || "" - if cmd == 'go' - oldplace = place(player.place) - newplace = nil - - oldplace.each_element('go') { |go| - if go.attributes['spec'] == what - newplace = go.attributes['place'] - end - } - - if newplace.nil? - player.send_message(nil, 'You cannot go there') - else - move_thing(player, newplace) - end - return(true) - elsif cmd == 'who' - player.send_message(nil, "Players in \"#{iname}\":") - each_element('thing') { |thing| - if thing.kind_of?(Player) - player.send_message(nil, "#{thing.iname} is at/in #{thing.place}") - end - } - return(true) - else - handled = false - each_thing_by_place(player.place) { |thing| - if what.downcase == thing.command_name.downcase - thing.each_element('on-command') { |c| - if c.attributes['command'] == cmd - thing.command(player, c, words) - handled = true - end - } - end - } - return(true) if handled - end - end - false - end -end - -class Place < REXML::Element - def initialize - super('place') - end - - def iname - attributes['name'] - end -end - -class Thing < REXML::Element - def initialize(world) - super('thing') - @world = world - end - - def add(xmlelement) - if xmlelement.kind_of?(REXML::Element) && (xmlelement.name == 'presence') - super(Jabber::Presence.import(xmlelement)) - else - super(xmlelement) - end - end - - def iname - attributes['name'] - end - - def command_name - attributes['command-name'].nil? ? iname : attributes['command-name'] - end - - def place - attributes['place'] - end - - def place=(p) - attributes['place'] = p - end - - def jid - nil - end - - def presence - xe = nil - each_element('presence') { |pres| - xe = Jabber::Presence.import(pres) - } - if self.kind_of?(Player) - xe.add(Jabber::MUC::XMUCUser.new).add(Jabber::MUC::XMUCUserItem.new(:none, :participant)) - else - xe.add(Jabber::MUC::XMUCUser.new).add(Jabber::MUC::XMUCUserItem.new(:owner, :moderator)) - end - xe - end - - def presence=(pres) - delete_elements('presence') - add(pres) - end - - def see(place) - end - - def send_message(fromresource, text, subject=nil) - end - - def send_message_to_place(fromresource, text) - @world.each_element('thing') { |thing| - if thing.place == place - thing.send_message(fromresource, text) - end - } - end - - def on_enter(thing, from) - each_element('on-enter') { |c| - command(thing, c, [from]) - } - end - - def on_leave(thing, to) - each_element('on-leave') { |c| - command(thing, c, [to]) - } - end - - def command(source, command, arguments) - command.each_element { |action| - text = action.text.nil? ? "" : action.text.dup - text.gsub!('%self%', iname) - text.gsub!('%actor%', source.iname) - text.gsub!('%place%', place) - if action.name == 'say' || action.name == 'tell' - sender = nil - sender = iname if action.name == 'say' - if action.attributes['to'] == 'all' - send_message_to_place(sender, text) - else - source.send_message(sender, text) - end - end - } - end -end - -class Player < Thing - def initialize(world, iname, jid) - super(world) - attributes['name'] = iname - attributes['jid'] = jid.to_s - end - - def jid - attributes['jid'].nil? ? nil : Jabber::JID::new(attributes['jid']) - end - - def see(place) - return if place.nil? - - place.text.strip.split(/\n/).each do |line| - send_message(nil, line.strip) - end - - send_message(nil, " ") - - directions = [] - place.each_element('go') { |go| - directions.push(go.attributes['spec']) - } - send_message(nil, "You can go #{directions.join(', ')}") - end - - def send_message(fromresource, text, subject=nil) - msg = Jabber::Message.new(jid, text) - msg.type = :groupchat - msg.subject = subject unless subject.nil? - @world.send(fromresource, msg) - end - - def on_enter(thing, from) - if thing != self - if from.nil? - send_message(nil, "#{thing.iname} spawns") - else - send_message(nil, "#{thing.iname} enters #{place} coming from #{from}") - end - end - end - - def on_leave(thing, to) - if thing != self - if to.nil? - send_message(nil, "#{thing.iname} disintegrates") - else - send_message(nil, "#{thing.iname} leaves #{place} going to #{to}") - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.conf b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.conf deleted file mode 100644 index 4399925f8..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.conf +++ /dev/null @@ -1,11 +0,0 @@ -jabber: - jid: user@server.com/fileserve - password: *** -directory: /tmp/fileserve -socks: - proxies: - - transfer.jabber.freenet.de - - proxy.jabber.org - addresses: - - 172.22.99.197 - port: 65023 diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.rb deleted file mode 100644 index e2af237bd..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/fileserve.rb +++ /dev/null @@ -1,346 +0,0 @@ -#!/usr/bin/env ruby - -require 'yaml' -require 'xmpp4r' -require 'xmpp4r/bytestreams' -require 'xmpp4r/roster' -require 'xmpp4r/version' - -Jabber::debug = true - -def human_readable(num) - unit = '' - units = %w(K M G T P E) - while num > 10240 and units.size > 0 - num /= 1024 - unit = units.shift - end - "#{num} #{unit}B" -end - -class Transfer - attr_reader :peer, :filename, :bytes, :filesize - - def initialize(filetransfer, peer, filename, filesize, msgblock) - @filetransfer = filetransfer - @peer = peer - @filename = filename - @filesize = filesize - @msgblock = msgblock - - @done = false - @bytes = 0 - @stats = [0] - @stats_lock = Mutex.new - @stats_thread = Thread.new { stats_loop } - - - @streamhost_cb = lambda { |streamhost,state,e| - case state - when :connecting - say "Connecting to #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :success - say "Successfully using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :failure - say "Error using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port}): #{e}" - end - } - end - - def done? - @stats_thread.kill if @done - @done - end - - def stats_loop - loop { - sleep 1 - @stats_lock.synchronize { - @stats.push @bytes - @stats.shift if @stats.size > 5 - } - } - end - - def stats - @stats_lock.synchronize { - if @stats.first >= @stats.last - 0 - else - (@stats.last - @stats.first) / (@stats.size - 1) - end - } - end - - def say(text) - @msgblock.call(text) - end - - def transfer(from, to) - while buf = from.read - @bytes += to.write buf - end - end -end - -class Upload < Transfer - def initialize(filetransfer, iq, filename, filesize, can_range, msgblock) - super(filetransfer, iq.from, filename, filesize, msgblock) - - if filename.size < 1 - say "What is this file for?" - @done = true - return - end - - offset = nil - if File::exist?(filename) - if File::size(filename) < filesize and can_range - @bytes = offset = File::size(filename) - say "Will retrieve #{filename} starting at #{offset}" - else - say "#{filename} already exists" - filetransfer.decline(iq) - @done = true - return - end - end - - Thread.new { - begin - stream = filetransfer.accept(iq, offset) - if stream.kind_of?(Jabber::Bytestreams::SOCKS5Bytestreams) - stream.connect_timeout = 5 - stream.add_streamhost_callback(nil, nil, &@streamhost_cb) - end - - if stream.accept - outfile = File.new(filename, (offset ? 'a' : 'w')) - - transfer(stream, outfile) - - outfile.close - stream.close - @done = true - else - say "Stream failed" - @done = true - end - rescue - puts $!.backtrace.first - say "Error: #{$!}" - @done = true - end - } - end -end - -class Download < Transfer - def initialize(filetransfer, peer, filename, msgblock, socksconf) - begin - filesize = File.size(filename) - rescue - filesize = 0 - end - - super(filetransfer, peer, filename, filesize, msgblock) - - Thread.new { - begin - raise "No regular file" unless File.file?(filename) - - source = Jabber::FileTransfer::FileSource.new(filename) - stream = filetransfer.offer(peer, source) - unless stream - raise "Well, you should accept what you request..." - @done = true - end - - if stream.kind_of?(Jabber::Bytestreams::SOCKS5Bytestreams) - socksconf.call(stream) - stream.add_streamhost_callback(nil, nil, &@streamhost_cb) - end - - stream.open - transfer(source, stream) - stream.close - @done = true - rescue - say "Error: #{$!}" - @done = true - end - } - end -end - -class FileServe - def initialize(conf) - @uploads = 0 - @downloads = 0 - - @transfers = [] - @transfers_lock = Mutex.new - - @client = Jabber::Client.new Jabber::JID.new(conf['jabber']['jid']) - @client.connect - @client.auth(conf['jabber']['password']) - - @ft = Jabber::FileTransfer::Helper.new(@client) - Jabber::Version::SimpleResponder.new(@client, - "XMPP4R FileServe example", - Jabber::XMPP4R_VERSION, - IO.popen('uname -sr').readlines.to_s.strip) - register_handlers - - @directory = conf['directory'] - @directory.gsub!(/\/+$/, '') - - @socksserver = Jabber::Bytestreams::SOCKS5BytestreamsServer.new(conf['socks']['port']) - - conf['socks']['addresses'].each { |addr| @socksserver.add_address(addr) } - - @proxies = [] - conf['socks']['proxies'].collect { |jid| - puts "Querying proxy #{jid}..." - begin - @proxies.push(Jabber::Bytestreams::SOCKS5Bytestreams::query_streamhost(@client, jid)) - rescue - puts "Error: #{$!}" - end - } - - Thread.new { presence } - Thread.new { cleaner } - - # Panic reboot ;-) - @client.on_exception { initialize(conf) } - end - - def presence - rate_upload = 0 - rate_download = 0 - - old_status = nil - loop { - # Update the @rate_* variables - @transfers_lock.synchronize { - @transfers.each { |t| - if t.kind_of?(Upload) and t.stats > rate_upload - rate_upload = t.stats - elsif t.kind_of?(Download) and t.stats > rate_download - rate_download = t.stats - end - } - } - status = "Attempted #{@downloads} downloads (max. #{human_readable rate_download}/s) and #{@uploads} uploads (max. #{human_readable rate_upload}/s)" - - @client.send(Jabber::Presence.new(:chat, status)) if status != old_status - old_status = status - - sleep 1 - - } - end - - def register_handlers - @client.add_message_callback { |msg| - if msg.type == :chat and msg.body and msg.from != 'pentabarf@pentabarf.org/rails' - puts "<#{msg.from}> #{msg.body.strip}" - cmd, arg = msg.body.split(/ /, 2) - - command(msg.from, cmd, arg) - end - } - - @ft.add_incoming_callback { |iq,file| - - say = lambda { |text| - say(iq.from, text) - } - - puts "Incoming file transfer from #{iq.from}: #{file.fname} (#{file.size / 1024} KB)" - filename = file.fname.split(/\//).last - filename.gsub!(/^\.+/, '') - - puts "Range: #{file.range != nil}" - transfer = Upload.new(@ft, iq, "#{@directory}/#{filename}", file.size, file.range != nil, say) - @uploads += 1 - - @transfers_lock.synchronize { - @transfers.push(transfer) - } - - } - - roster = Jabber::Roster::Helper.new(@client) - - roster.add_subscription_request_callback { |item,presence| - roster.accept_subscription(presence.from) - } - - end - - def command(from, cmd, arg) - say = lambda { |text| - say(from, text) - } - socksconf = lambda { |stream| - stream.add_streamhost(@socksserver) - @proxies.each { |sh| - stream.add_streamhost(sh) - } - } - - case cmd - when 'get' - arg.gsub!(/\//, '') - arg.gsub!(/^\.+/, '') - transfer = Download.new(@ft, from, "#{@directory}/#{arg}", say, socksconf) - @downloads += 1 - @transfers_lock.synchronize { - @transfers.push(transfer) - } - when 'ls' - text = "" - Dir.foreach(@directory) { |file| - next if file =~ /^\./ - path = "#{@directory}/#{file}" - text += "#{file} (#{human_readable File.size(path)})\n" if File.file?(path) - } - say.call(text.strip) - when 'stat' - @transfers_lock.synchronize { - text = "#{@transfers.size} transfers:\n" - @transfers.each { |t| - text += "#{t.filename} (#{t.peer}): #{(t.bytes * 100) / t.filesize}% (#{human_readable t.stats}/s)\n" - } - } - say.call(text.strip) - when 'help' - say.call "Download a file: get \nList directory contents: ls\nLook who is currently wasting bandwidth: stat\nUpload a file, simply send this file" - else - say.call "Unknown command: #{cmd}, try help" - end - end - - def say(to, text) - puts ">#{to}< #{text.strip}" - @client.send(Jabber::Message.new(to, text).set_type(:chat)) - end - - def cleaner - loop { - - @transfers_lock.synchronize { - @transfers.delete_if { |t| t.done? } - } - - sleep 1 - } - end -end - - -FileServe.new(YAML::load(File.new('fileserve.conf'))) -puts "Up and running!" -Thread.stop diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/getonline.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/getonline.rb deleted file mode 100755 index cb35a6137..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/getonline.rb +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/ruby - -# This script can get all roster entries - -require 'optparse' -require 'xmpp4r' -include Jabber - -get = true -jid = JID::new('lucastest@linux.ensimag.fr/rosterget') -password = 'lucastest' -domains = [] - -OptionParser::new do |opts| - opts.banner = 'Usage: roster.rb -j jid -p password -d domain' - opts.separator '' - opts.on('-j', '--jid JID', 'sets the jid') { |j| jid = JID::new(j) } - opts.on('-p', '--password PASSWORD', 'sets the password') { |p| password = p } - opts.on('-d', '--domain DOMAIN', 'sets the domain') { |d| domains << d } - opts.on_tail('-h', '--help', 'Show this message') { - puts opts - exit - } - opts.parse!(ARGV) -end - -cl = Client::new(jid, false) -cl.connect -cl.auth(password) -exit = false -nb = 0 -cl.add_iq_callback { |i| - fjid = JID::new(i.from) - if i.type == :result and fjid.resource == "admin" - domain = fjid.domain - items = nil - i.each_element('item') { |e| items = e } - raise "items nil" if items.nil? - puts "--- Online users for #{domain} (seconds, sent, received)" - c = 0 - items.each_element('user') do |e| - puts "#{e.attribute('jid')} #{e.attribute('name')}" - c += 1 - end - puts "--- #{domain} : #{c} online users" - nb -= 1 - end -} -for d in domains do - cl.send(Iq::new_browseget.set_to("#{d}/admin")) - nb += 1 -end -while nb > 0 - cl.process(1) -end -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb deleted file mode 100644 index 6a9d5eedd..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/gtkmucclient.rb +++ /dev/null @@ -1,315 +0,0 @@ -#!/usr/bin/env ruby - -require 'gtk2' - -$:.unshift '../../../../../lib' -require 'xmpp4r' -require 'xmpp4r/muc/helper/simplemucclient' -require 'xmpp4r/version/helper/simpleresponder' - -#Jabber::debug = true - -class Gtk::Label - def self.new_show(str = nil, mnemonic = false) - label = new(str, mnemonic) - label.show - label - end -end - -class SetupWindow < Gtk::Window - def initialize - super(Gtk::Window::TOPLEVEL) - self.title = "GtkMUCClient setup" - signal_connect("delete_event") { cancel } - - vbox = Gtk::VBox.new - vbox.set_border_width(4) - add(vbox) - vbox.show - - frame1 = Gtk::Frame.new('Jabber Account Settings') - frame1.set_border_width(4) - frame1.show - vbox.add(frame1) - - layout1 = Gtk::Table.new(4, 2) - layout1.row_spacings = 4 - layout1.column_spacings = 8 - layout1.show - frame1.add(layout1) - - layout1.attach(Gtk::Label.new_show('Jabber ID:'), 0, 1, 1, 2) - @entry_jid = Gtk::Entry.new - @entry_jid.text = 'collector@jabber.ccc.de' - @entry_jid.show - layout1.attach(@entry_jid, 1, 2, 1, 2) - - layout1.attach(Gtk::Label.new_show('Password:'), 0, 1, 2, 3) - @entry_password = Gtk::Entry.new - @entry_password.visibility = false - @entry_password.show - layout1.attach(@entry_password, 1, 2, 2, 3) - - layout1.attach(Gtk::Label.new_show('Resource:'), 0, 1, 3, 4) - @entry_resource = Gtk::Entry.new - @entry_resource.text = 'gtkmucclient' - @entry_resource.show - layout1.attach(@entry_resource, 1, 2, 3, 4) - - - frame2 = Gtk::Frame.new('Multi-User Chat Settings') - frame2.set_border_width(4) - frame2.show - vbox.add(frame2) - - layout2 = Gtk::Table.new(3, 2) - layout2.row_spacings = 4 - layout2.column_spacings = 8 - layout2.show - frame2.add(layout2) - - layout2.attach(Gtk::Label.new_show('Room:'), 0, 1, 1, 2) - @entry_room = Gtk::Entry.new - @entry_room.text = 'test@conference.jabber.org' - @entry_room.show - layout2.attach(@entry_room, 1, 2, 1, 2) - - layout2.attach(Gtk::Label.new_show('Nick:'), 0, 1, 2, 3) - @entry_nick = Gtk::Entry.new - @entry_nick.text = 'XMPP4R-Fan' - @entry_nick.show - layout2.attach(@entry_nick, 1, 2, 2, 3) - - - hbox = Gtk::HBox.new - hbox.show - vbox.add(hbox) - - button_ok = Gtk::Button.new("Ok") - button_ok.set_border_width(4) - hbox.add(button_ok) - button_ok.signal_connect("clicked") { ok } - button_ok.can_default = true - button_ok.grab_default - button_ok.show - button_cancel = Gtk::Button.new("Cancel") - button_cancel.set_border_width(4) - hbox.add(button_cancel) - button_cancel.signal_connect("clicked") { cancel } - button_cancel.show - end - - def error_dialog(msg) - dialog = Gtk::MessageDialog.new(self, Gtk::Dialog::MODAL, Gtk::MessageDialog::ERROR, Gtk::MessageDialog::BUTTONS_OK, msg) - dialog.signal_connect("response") { dialog.destroy } - dialog.run - end - - def ok - jid = Jabber::JID.new(@entry_jid.text) - mucjid = Jabber::JID.new(@entry_room.text) - - if jid.node.nil? - error_dialog("Your Jabber ID must contain a user name and therefore contain one @ character.") - elsif jid.resource - error_dialog("If you intend to set a custom resource, put that in the right text field. Remove the slash!") - elsif @entry_resource.text.empty? - error_dialog("Please set a resource. This is a somewhat unimportant setting...") - elsif mucjid.node.nil? - error_dialog("Please set a room name, e.g. myroom@conference.jabber.org") - elsif mucjid.resource - error_dialog("The MUC room must not contain a resource. Remove the slash!") - elsif @entry_nick.text.empty? - error_dialog("Please set a nick for MUC.") - else - jid.resource = @entry_resource.text - mucjid.resource = @entry_nick.text - password = @entry_password.text - - destroy - - ChatWindow.new(jid, password, mucjid).show - end - end - - def cancel - destroy - Gtk.main_quit - end -end - -class ChatWindow < Gtk::Window - def initialize(jid, password, mucjid) - super(Gtk::Window::TOPLEVEL) - self.title = "GtkMUCClient: #{mucjid.resource} in #{mucjid.strip}" - signal_connect("delete_event") { destroy; Gtk.main_quit } - - layout = Gtk::VBox.new - - @topic = Gtk::Entry.new - @topic.editable = false - @topic.show - layout.pack_start(@topic, false, false, 2) - - layout_mid = Gtk::HPaned.new - layout_mid.position = 500 - layout_mid.show - layout.pack_start(layout_mid) - - @buffer_scroll = Gtk::ScrolledWindow.new - @buffer_scroll.show - @buffer_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC) - layout_mid.pack1(@buffer_scroll, true, true) - - @buffer_view = Gtk::TextView.new - @buffer_view.editable = false - @buffer_view.cursor_visible = false - @buffer_view.wrap_mode = Gtk::TextTag::WRAP_WORD - @buffer_view.modify_font(Pango::FontDescription.new('monospace 12')) - @buffer_view.show - @buffer_scroll.add_with_viewport(@buffer_view) - - roster_scroll = Gtk::ScrolledWindow.new - roster_scroll.show - roster_scroll.set_policy(Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC) - layout_mid.pack2(roster_scroll, true, true) - - @roster = Gtk::ListStore.new(String) - @roster.set_sort_column_id(0) - roster_view = Gtk::TreeView.new(@roster) - roster_view.append_column Gtk::TreeViewColumn.new("Participant", Gtk::CellRendererText.new, {:text => 0}) - roster_view.show - roster_scroll.add_with_viewport(roster_view) - - @input = Gtk::Entry.new - @input.grab_focus - @input.signal_connect("activate") { - on_input(@input.text) - @input.text = '' - } - @input.show - layout.pack_start(@input, false, false, 2) - - layout.show - add(layout) - - print_buffer "Welcome to the XMPP4R sample GTK2 Multi-User Chat client" - print_buffer "Commands start with a slash, type \"/help\" for a list" - - @client = Jabber::Client.new(jid) - Jabber::Version::SimpleResponder.new(@client, "XMPP4R example: GtkMUCClient", Jabber::XMPP4R_VERSION, IO.popen("uname -sr").readlines.to_s.strip) - Thread.new { - begin - print_buffer "Connecting for domain #{jid.domain}..." - @client.connect - print_buffer "Authenticating for #{jid.strip}..." - @client.auth(password) - print_buffer "Attempting to join #{mucjid.strip} as #{mucjid.resource}..." - @muc = Jabber::MUC::SimpleMUCClient.new(@client) - register_handlers - @muc.join(mucjid) - rescue Exception => e - puts "#{e.class}: #{e}\n#{e.backtrace.join("\n")}" - print_buffer("Error: #{e}") - end - } - - set_size_request(600, 400) - end - - def print_buffer(s, time=nil) - @buffer_view.buffer.insert(@buffer_view.buffer.end_iter, "[#{(time || Time.new).getlocal.strftime('%I:%M')}] #{s}\n") - va = @buffer_scroll.vadjustment - va.value = va.upper - end - - def register_handlers - @muc.on_room_message { |time,text| - print_buffer("*** #{text}", time) - } - @muc.on_message { |time,nick,text| - if text =~ /^\/me (.+)$/ - print_buffer("*#{nick} #{$1}", time) - else - print_buffer("<#{nick}> #{text}", time) - end - } - @muc.on_private_message { |time,nick,text| - print_buffer("<-(#{nick}) #{text}", time) - } - @muc.on_join { |time,nick| - @roster.append[0] = nick - } - @muc.on_self_leave { |time| - print_buffer("You have exited the room", time) - } - @muc.on_leave { |time,nick| - del_iter = nil - @roster.each { |m,p,iter| - del_iter = iter if iter[0] == nick - } - @roster.remove(del_iter) if del_iter - } - @muc.on_subject { |time,nick,subject| - @topic.text = subject - } - end - - def on_input(line) - commands = { - 'help' => [ - 'Display this help', - lambda { - commands.each { |cmd,a| - print_buffer "/#{cmd.ljust(10)} - #{a[0]}" - } - } - ], - 'msg' => [ - 'Send a private message to a user', - lambda { |args| - # Limitation: it is not possible to send private messages - # to a user with a space in his nickname - to = args.shift - text = args.join(' ') - @muc.say(text, to) - print_buffer "->(#{to}) #{text}" - } - ], - 'subject' => [ - 'Change the room\'s subject', - lambda { |args| - @muc.subject = args.join(' ') - } - ], - 'quit' => [ - 'Leave room with optional message, then disconnect client and shut down', - lambda { |args| - @muc.exit(args.join(' ')) if @muc.active? - @client.close - Gtk.main_quit - } - ] - } - - if line =~ /^\// - args = line.split(/ /) - cmd = args.shift[1..-1].downcase - - command = commands[cmd] - if command - help, func = command - func.call(args) - else - print_buffer "Unknown command: #{cmd}, use \"/help\"" - end - else - @muc.say(line) - end - end -end - -Gtk.init -SetupWindow.new.show -Gtk.main diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/migrate.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/migrate.rb deleted file mode 100755 index bdc6fb419..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/migrate.rb +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/ruby - -# This script can be used to migrate from one jabber account to another - -$:.unshift '../lib' - -require 'optparse' -require 'xmpp4r' -include Jabber - -jidfrom = JID::new('lucas@linux.ensimag.fr/JabberMigrate') -pwfrom = 'z' -jidto = JID::new('lucas@nussbaum.fr/JabberMigrate') -pwto = 'z' - -BOTHOLD = "Hi, you are subscribed to my presence. I just changed my JID. The new one is #{jidto.strip}. You might want to update your roster. Thank you, and sorry for the inconvenience !" -BOTHNEW = "Hi, you are subscribed to the presence of my previous JID : #{jidfrom.strip}. I just changed my JID, and this is the new one. You might want to update your roster. Thank you, and sorry for the inconvenience !" - -clfrom = Client::new(jidfrom, false) -clfrom.connect -clfrom.auth(pwfrom) -clto = Client::new(jidto, false) -clto.connect -clto.auth(pwto) -#clfrom.send(Presence::new) -#clto.send(Presence::new) -clfrom.send(Iq::new_rosterget) -exit = false -clfrom.add_iq_callback { |i| - if i.type == :result and i.queryns == 'jabber:iq:roster' - i.query.each_element do |e| - e.text = '' - jid = e.attribute('jid') - name = e.attribute('name') - subscription = e.attribute('subscription') - ask = e.attribute('ask') - jid &&= jid.value - next if jid =~ /@(icq|msn|aim|yahoo).blop.info/ -# next if jid !~ /lucas@im.apinc.org/ - puts "Processing #{e.to_s}" -# Jabber::debug = true - name &&= name.value - subscription &&= subscription.value - ask &&= ask.value - puts subscription - case subscription - when 'from' - # il veut me voir, je veux pas le voir. - # envoi unsubscribed - clfrom.send(Presence::new.set_to(jid).set_type(:unsubscribed)) - # envoi message d'info OLD & NEW - clfrom.send(Message::new(jid, BOTHOLD).set_type(:chat)) - clto.send(Message::new(jid, BOTHNEW).set_type(:chat)) - when 'to' - # je veux le voir, il veut pas me voir - # envoi unsubscribe - clfrom.send(Presence::new.set_to(jid).set_type(:unsubscribe)) - # envoi subscribe avec message - pres = Presence::new.set_to(jid).set_type(:subscribe) - pres.add(Element::new('status').add_text("Hi, I was previously subscribed to your presence with my JID #{jidfrom.strip}. Can I re-subscribe to your presence ? Thank you.")) - clto.send(pres) - when 'both' - # envoi unsubscribed - clfrom.send(Presence::new.set_to(jid).set_type(:unsubscribed)) - # envoi unsubscribe - clfrom.send(Presence::new.set_to(jid).set_type(:unsubscribe)) - # update roster - iq = Iq::new_rosterset - e.delete_attribute('ask') - e.delete_attribute('subscription') - iq.query.add_element(e) - clto.send(iq) - # envoi message d'info OLD & NEW - clfrom.send(Message::new(jid, BOTHOLD).set_type(:chat)) - pres = Presence::new.set_to(jid).set_type(:subscribe) - pres.add(Element::new('status').add_text("Hi, I was previously subscribed to your presence with my JID #{jidfrom.strip}. Can I re-subscribe to your presence ? Thank you.")) - clto.send(pres) - clto.send(Message::new(jid, BOTHNEW).set_type(:chat)) - end - end - end -} -while not exit - clfrom.process - clto.process -end -clfrom.close -clto.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/minimuc.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/minimuc.rb deleted file mode 100644 index 58c6f6743..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/minimuc.rb +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib' - -require 'xmpp4r' -require 'xmpp4r/iq/query/discoinfo' -require 'xmpp4r/iq/query/discoitems' -require 'xmpp4r/x/muc' - - -#Jabber::debug = true - -class Room - class RoomException < Exception - attr_reader :error - def initialize(error, msg) - @error = Jabber::Error.new(error, msg) - end - end - - def initialize(stream, name) - @users = {} # nick => jid - @stream = stream - @name = name - end - - def num_users - @users.size - end - - def each_user(&block) - @users.each { |n,j| yield(n, j) } - end - - def handle_message(msg) - origin = msg.from - msg.from = nil - @users.each { |nick,jid| - if jid == origin - msg.from = Jabber::JID::new(@name.node, @name.domain, nick) - end - } - unless msg.from.nil? - broadcast(msg) - end - - true - end - - def handle_presence(pres) - reason = nil - - # Check if nick already registered - @users.each { |nick,jid| - if pres.from != jid && pres.to.resource == nick - puts "#{pres.from} tried to use already active #{pres.to}" - raise RoomException.new('conflict', "Nick already used") - end - } - # New user? - unless @users.has_key?(pres.to.resource) - # Check nick length - if pres.to.resource.size < 1 - puts "#{pres.from} tried to use empty nick" - raise RoomException.new('not-acceptable', "Nick must contain characters") - end - - # Push user-list - userinfo = Jabber::Presence.import(pres) - userinfo.to = pres.from - userinfo.add(Jabber::XMUCUser.new).add(Jabber::XMUCUserItem.new(:none, :participant)) - print "Sending all users for #{pres.to} to #{pres.from}:" - @users.each { |nick,jid| - userinfo.from = Jabber::JID::new(@name.node, @name.domain, nick) - print " #{nick} (#{jid})" - @stream.send(userinfo) - } - puts " Ok" - - # Add the new user - puts "Adding #{pres.from} as #{pres.to}" - @users[pres.to.resource] = pres.from - - send_message("#{pres.to.resource} joins #{@name.node}") - reason = "#{pres.to.resource} joins #{@name.node}" - end - - # Remove dead rats - if pres.type == :error || pres.type == :unavailable - was_nick = nil - @users.delete_if { |nick,jid| - was_nick = nick - jid == pres.from - } - unless was_nick.nil? - send_message("#{was_nick} has left #{@name.node}") - reason = "#{was_nick} has left #{@name.node}" - end - end - - # Advertise users presence to all - puts "Advertising user to all" - x = Jabber::XMUCUserItem.new(:none, :participant, pres.from) - x.reason = reason - pres.add(Jabber::XMUCUser.new).add(x) - pres.from = pres.to - broadcast(pres) - end - - def send_message(body) - msg = Jabber::Message::new - msg.from = Jabber::JID::new(@name.node, @name.domain, "") - msg.type = :groupchat - msg.body = body - broadcast(msg) - end - - def broadcast(stanza) - x = stanza.class::import(stanza) - @users.each { |nick,jid| - x.to = jid - @stream.send(x) - } - end -end - -class MUC - def initialize(jid, secret, addr, port=5347) - @rooms = {} - - @component = Jabber::Component::new(jid, addr, port) - @component.connect - @component.auth(secret) - - @component.add_iq_callback { |iq| - handle_iq(iq) - } - @component.add_presence_callback { |pres| - handle_presence(pres) - } - @component.add_message_callback { |msg| - handle_message(msg) - } - end - - def handle_iq(iq) - puts "#{iq.from} #{iq.queryns} to #{iq.to}" - if iq.query.kind_of?(Jabber::IqQueryDiscoInfo) - handle_disco_info(iq) - true - elsif iq.query.kind_of?(Jabber::IqQueryDiscoItems) - handle_disco_items(iq) - true - else - false - end - end - - def handle_presence(pres) - room = nil - @rooms.each { |name,r| - room = r if name == pres.to.strip - } - - if room.nil? && pres.type.nil? && (pres.to.node.to_s != '') - room = Room.new(@component, pres.to.strip) - @rooms[pres.to.strip] = room - elsif room.nil? && pres.type != :error - pres.to, pres.from = pres.from, pres.to - pres.type = :error - pres.add(Jabber::Error.new('item-not-found')) - @component.send(pres) - return(true) - end - - begin - room.handle_presence(pres) - rescue Room::RoomException => e - pres.to, pres.from = pres.from, pres.to - pres.type = :error - pres.add(e.error) - @component.send(pres) - return(true) - end - return(false) - end - - def handle_message(msg) - puts "Message from #{msg.from} to #{msg.to} (#{msg.type}): #{msg.body.inspect}" - return if msg.type == :error - - room = @rooms[msg.to] - unless room.nil? - room.handle_message(msg) - else - msg.to, msg.from = msg.from, msg.to - msg.type = :error - msg.add(Jabber::Error.new('item-not-found', 'The chatroom you are trying to reach is currently not available.')) - @component.send(msg) - end - end - - def handle_disco_info(iq) - if (iq.type == :get) - iq.type = :result - iq.query = Jabber::IqQueryDiscoInfo.new - if iq.to.node == nil - iq.query.add(Jabber::DiscoIdentity.new('conference', 'Minimal Multi-User Chat', 'text')) - else - room = @rooms[iq.to] - if room.nil? - iq.type = :error - iq.add_element(Jabber::Error.new('item-not-found')) - else - iq.query.add(Jabber::DiscoIdentity.new('conference', "#{iq.to.node} (#{room.num_users})", 'text')) - end - end - [Jabber::IqQueryDiscoInfo.new.namespace, - Jabber::IqQueryDiscoItems.new.namespace, - Jabber::XMUC.new.namespace, - Jabber::XMUCUser.new.namespace].each { |ns| - iq.query.add(Jabber::DiscoFeature.new(ns)) - } - else - iq.type = :error - iq.add_element(Jabber::Error.new('bad-request')) - end - iq.to, iq.from = iq.from, iq.to - @component.send(iq) - end - - def handle_disco_items(iq) - if (iq.type == :get) - iq.type = :result - if iq.to.node == nil - @rooms.each { |name,room| - iq.query.add(Jabber::DiscoItem::new(Jabber::JID::new(name, @component.jid.domain), name)) - } - elsif iq.to.resource == nil - room = @rooms[iq.to.strip] - unless room.nil? - room.each_user { |nick,jid| - iq.query.add(Jabber::DiscoItem::new(jid, nick)) - } - else - iq.type = :error - iq.add_element(Jabber::Error.new('item-not-found')) - end - end - else - iq.type = :error - iq.add_element(Jabber::Error.new('bad-request')) - end - iq.to, iq.from = iq.from, iq.to - @component.send(iq) - end -end - -if ARGV.size != 3 - puts "Syntax: ./minimuc.rb " - puts "Example: ./minimuc.rb conference.xmpp4r.mil minimuc localhost" - exit -end - -muc = MUC::new(Jabber::JID::new(ARGV[0]), ARGV[1], ARGV[2]) -Thread.stop diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/recvfile.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/recvfile.rb deleted file mode 100644 index dcd747abc..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/recvfile.rb +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env ruby - -require 'xmpp4r' -require 'xmpp4r/helpers/filetransfer' - - -if ARGV.size != 3 - puts "Usage: #{$0} " - exit -end - - -#Jabber::debug = true - -cl = Jabber::Client.new(Jabber::JID.new(ARGV[0])) -puts "Connecting Jabber client..." -cl.connect -puts "Authenticating..." -cl.auth ARGV[1] - -ft = Jabber::Helpers::FileTransfer.new(cl) -ft.add_incoming_callback { |iq,file| - puts "Incoming file transfer from #{iq.from}: #{file.fname} (#{file.size / 1024} KB)" - - filename = "#{ARGV[2]}/#{file.fname.split(/\//).last}" - offset = nil - if File::exist?(filename) - puts "#{filename} already exists" - if File::size(filename) < file.size and file.range - offset = File::size(filename) - puts "Peer supports , will retrieve #{file.fname} starting at #{offset}" - else - puts "#{file.fname} is already fully retrieved, declining file-transfer" - ft.decline(iq) - next - end - end - - Thread.new { - begin - puts "Accepting #{file.fname}" - stream = ft.accept(iq, offset) - if stream.kind_of?(Jabber::Helpers::SOCKS5Bytestreams) - stream.connect_timeout = 5 - stream.add_streamhost_callback { |streamhost,state,e| - case state - when :connecting - puts "Connecting to #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :success - puts "Successfully using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :failure - puts "Error using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port}): #{e}" - end - } - end - - puts "Waiting for stream configuration" - if stream.accept - puts "Stream established" - outfile = File.new(filename, (offset ? 'a' : 'w')) - while buf = stream.read - outfile.write(buf) - print '.' - $stdout.flush - end - puts '!' - outfile.close - stream.close - else - puts "Stream failed" - end - rescue Exception => e - puts "#{e.class}: #{e}\n#{e.backtrace.join("\n")}" - end - } -} - -cl.send(Jabber::Presence.new(:chat, 'Send me files!')) - -puts "Waiting." - -Thread.stop - -cl.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb deleted file mode 100755 index 624bfb3fd..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/rosterdiscovery.rb +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/ruby -# -# XMPP4R - XMPP Library for Ruby -# Copyright (C) 2005 Stephan Maka -# Released under Ruby's license (see the LICENSE file) or GPL, at your option -# -# -# Roster-Discovery example -# -# If you don't understand this code read JEP-0030 (Service Discovery) first: -# http://www.jabber.org/jeps/jep-0030.html -# -# This examples exposes your roster to Service Discovery and can be browsed -# by anyone. Please use with care if you want to keep your roster private! -# -# The Psi client has a very pretty Service Discovery dialog. But be sure -# to turn off "Auto-browse into objects" for big rosters. -# - -$:.unshift '../../../../../lib' - -require 'thread' - -require 'xmpp4r' -require 'xmpp4r/helpers/roster' -require 'xmpp4r/iq/query/discoinfo' -require 'xmpp4r/iq/query/discoitems' - -# Command line argument checking - -if ARGV.size != 2 - puts("Usage: ./rosterdiscovery.rb ") - exit -end - -# Building up the connection - -#Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid) -cl.connect -cl.auth(ARGV[1]) - - -# The roster instance -roster = Jabber::Helpers::Roster.new(cl) - - -cl.add_iq_callback { |iq| - if iq.query.kind_of?(Jabber::IqQueryDiscoInfo) || iq.query.kind_of?(Jabber::IqQueryDiscoItems) - - # Prepare the stanza for result - iq.from, iq.to = iq.to, iq.from - iq.type = :result - - - if iq.query.kind_of?(Jabber::IqQueryDiscoInfo) - # iq.to and iq.from are already switched here: - puts("#{iq.to} requests info of #{iq.from} node #{iq.query.node.inspect}") - - if iq.query.node.nil? - iq.query.add(Jabber::DiscoIdentity.new('directory', 'Roster discovery', 'user')) - else - # Count contacts in group - in_group = 0 - roster.items.each { |jid,item| - if item.groups.include?(iq.query.node) - in_group += 1 - end - } - - iq.query.add(Jabber::DiscoIdentity.new('directory', "#{iq.query.node} (#{in_group})", 'group')) - end - - iq.query.add(Jabber::DiscoFeature.new(Jabber::IqQueryDiscoInfo.new.namespace)) - iq.query.add(Jabber::DiscoFeature.new(Jabber::IqQueryDiscoItems.new.namespace)) - - elsif iq.query.kind_of?(Jabber::IqQueryDiscoItems) - # iq.to and iq.from are already switched here: - puts("#{iq.to} requests items of #{iq.from} node #{iq.query.node.inspect}") - - if iq.query.node.nil? - # Make items from group names - groups = [] - - roster.items.each { |jid,item| - groups += item.groups - } - - groups.uniq.each { |group| - iq.query.add(Jabber::DiscoItem.new(cl.jid, group, group)) - } - - # Collect all ungrouped roster items - roster.items.each { |jid,item| - if item.groups == [] - iq.query.add(Jabber::DiscoItem.new(item.jid, item.iname.to_s == '' ? item.jid : item.iname)) - end - } - else - # Add a discovery item for each roster item in that group - roster.items.each { |jid,item| - if item.groups.include?(iq.query.node) - iq.query.add(Jabber::DiscoItem.new(item.jid, item.iname.to_s == '' ? item.jid : item.iname)) - end - } - end - - end - - cl.send(iq) - - true - end -} - -# Initial presence -cl.send(Jabber::Presence.new.set_status("Discover my roster at #{jid}")) - -# Main loop: - -loop do - cl.process - Thread.stop -end - -cl.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.conf b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.conf deleted file mode 100644 index 7f08fe491..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.conf +++ /dev/null @@ -1,10 +0,0 @@ ---- -jabber: - jid: user@server/resource - password: password -local: - port: 65010 - addresses: [172.22.16.3] -proxies: - - proxy.jabber.org - - transfer.jabber.freenet.de diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.rb deleted file mode 100644 index f5ad3f6ca..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/sendfile.rb +++ /dev/null @@ -1,72 +0,0 @@ -require 'xmpp4r' -require 'xmpp4r/bytestreams' -require 'yaml' - -Jabber::debug = true - -if ARGV.size != 3 - puts "Usage: #{$0} " - exit -end - -conf = YAML::load File.new('sendfile.conf') - -cl = Jabber::Client.new(Jabber::JID.new(conf['jabber']['jid'])) -puts "Connecting Jabber client..." -cl.connect -puts "Authenticating..." -cl.auth conf['jabber']['password'] - -puts "Starting local Bytestreams server" -bss = Jabber::Bytestreams::SOCKS5BytestreamsServer.new(conf['local']['port']) -conf['local']['addresses'].each { |address| - bss.add_address(address) -} -ft = Jabber::FileTransfer::Helper.new(cl) -#ft.allow_bytestreams = false -source = Jabber::FileTransfer::FileSource.new(ARGV[2]) -puts "Offering #{source.filename} to #{ARGV[0]}" -stream = ft.offer(Jabber::JID.new(ARGV[0]), source, ARGV[1]) - -if stream - puts "Starting stream initialization (#{stream.class})" - - if stream.kind_of? Jabber::Bytestreams::SOCKS5BytestreamsInitiator - stream.add_streamhost(bss) - (conf['proxies'] || []).each { |proxy| - puts "Querying proxy #{proxy}" - stream.add_streamhost proxy - } - puts "Offering streamhosts " + stream.streamhosts.collect { |sh| sh.jid }.join(' ') - - stream.add_streamhost_callback { |streamhost,state,e| - case state - when :connecting - puts "Connecting to #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :success - puts "Successfully using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})" - when :failure - puts "Error using #{streamhost.jid} (#{streamhost.host}:#{streamhost.port}): #{e}" - end - } - end - - stream.open - if stream.kind_of? Jabber::Bytestreams::SOCKS5BytestreamsInitiator - puts "Using streamhost #{stream.streamhost_used.jid} (#{stream.streamhost_used.host}:#{stream.streamhost_used.port})" - end - - while buf = source.read - print "." - $stdout.flush - stream.write buf - stream.flush - end - puts "!" - stream.close - -else - puts "Peer declined" -end - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb deleted file mode 100644 index 60cb24e6c..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr.rb +++ /dev/null @@ -1,51 +0,0 @@ -require 'thread' - -class Shell - - PROMPT = "_-=READY=-_" - - def initialize(shell = "/bin/bash", delay = 1, &block) - @cb = block - @shell = shell - @delay = delay - @parent_to_child_read, @parent_to_child_write = IO.pipe - @child_to_parent_read, @child_to_parent_write = IO.pipe - @child_pid = fork do - @parent_to_child_write.close - @child_to_parent_read.close - $stdin.reopen(@parent_to_child_read) - $stdout.reopen(@child_to_parent_write) - $stderr.reopen(@child_to_parent_write) - exec("/bin/bash") - end - buffer = "" - semaphore = Mutex::new - Thread::new do - while true - c = @child_to_parent_read.read(1) - semaphore.synchronize { buffer += c } - end - end - Thread::new do - ch = "" - while true do - sleep @delay - semaphore.synchronize { - if buffer == ch and ch != "" - @cb.call buffer - buffer = "" - end - ch = buffer - } - end - end - end - - def puts(str) - @parent_to_child_write.puts(str) - end - - def kill - @child_pid.kill - end -end diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb deleted file mode 100755 index b7e04175e..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_jabber.rb +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/ruby -w - -$:.unshift '../../lib' -require 'shellmgr' -require 'xmpp4r' -include Jabber - -if ARGV.length != 3 - puts "usage: ./shellmgr_jabber.rb jid_to_use password jid_to_authorize" - exit(1) -end - -myjid = JID::new(ARGV[0]) -mypassword = ARGV[1] -authjid = JID::new(ARGV[2]) - -myjid = JID::new(myjid.node, myjid.domain, 'RSM') -cl = Client::new(myjid) -cl.connect -cl.auth(mypassword) -mainthread = Thread.current -sh = Shell::new { |str| - puts "-----RECEIVING-----\n#{str}" - cl.send(Message::new(authjid, str)) } -cl.add_message_callback do |m| - if JID::new(m.from).strip.to_s != authjid.strip.to_s - puts "Received message from non-authorized user #{m.from}" - else - if m.body == "killshell" - cl.send(Message::new(authjid, "Exiting...")) - mainthread.wakeup - else - puts "-----EXECUTING-----\n#{m.body}" - sh.puts(m.body) - end - end -end -cl.send(Presence::new) -puts "Connected ! Ask #{authjid.to_s} to send commands to #{myjid.to_s}" -cl.send(Message::new(authjid, "I'm ready to receive commands from you.")) -Thread.stop -cl.close -sh.kill diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb deleted file mode 100755 index 9f5d41682..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/shellmgr/shellmgr_test.rb +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/ruby -w - -require 'shellmgr' - -sh = Shell::new { |s| puts s } - -while true do - l = gets - sh.puts l -end diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/versionpoll.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/versionpoll.rb deleted file mode 100644 index 8a46e2d51..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/versionpoll.rb +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/ruby - -# This script will request the version information of a list of JID given -# on stdin. - -$:.unshift '../lib' - -require 'optparse' -require 'xmpp4r/client' -require 'xmpp4r/version/iq/version' -include Jabber -#Jabber::debug = true - -# settings -jid = JID::new('bot@localhost/Bot') -password = 'bot' -domains = [] -OptionParser::new do |opts| - opts.banner = 'Usage: versionpoll.rb -j jid -p password -d DOMAINS' - opts.separator '' - opts.on('-j', '--jid JID', 'sets the jid') { |j| jid = JID::new(j) } - opts.on('-p', '--password PASSWORD', 'sets the password') { |p| password = p } - opts.on('-d', '--domain DOMAIN', 'sets the domain') { |d| domains << d } - opts.on_tail('-h', '--help', 'Show this message') { - puts opts - exit - } - opts.parse!(ARGV) -end - -cl = Client::new(jid) -cl.connect -cl.auth(password) -sent = [] -queried = [] -activity = false -cl.add_iq_callback do |i| - fjid = JID::new(i.from) - if i.type == :result and fjid.resource == "admin" - domain = fjid.domain - items = i.first_element('item') - raise "items nil" if items.nil? - items.each_element('user') do |e| - j = e.attribute('jid') - if not queried.include?(j) - activity = true - queried << j - cl.send(Iq::new_browseget.set_to(j)) - end - end - end -end - -cl.add_iq_callback do |i| - if i.type == :result - u = i.first_element('user') - if u - u.each_element('user') do |e| - if (a = e.attribute('type')) - if a.value == 'client' - activity = true - iq = Iq::new(:get) - iq.query = Version::IqQueryVersion::new - iq.set_to(JID::new(e.attribute('jid').to_s)) - cl.send(iq) - end - end - end - end - end -end -cl.add_iq_callback do |iq| - if iq.type == :result and iq.query.class == Version::IqQueryVersion - activity = true - r = [ iq.from.to_s, iq.query.iname, iq.query.version, iq.query.os ] - puts r.inspect - end -end -cl.send(Presence::new) -for d in domains do - cl.send(Iq::new_browseget.set_to("#{d}/admin")) -end - -activity = true -while activity - activity = false - # other threads might set activity to true - sleep 10 -end -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmpping.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmpping.rb deleted file mode 100644 index 4c8ed715c..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmpping.rb +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env ruby -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - - -# This is PING for Jabber -# -# Please customize your ~/.xmppingrc - - -require 'xmpp4r' -require 'xmpp4r/httpbinding' -require 'xmpp4r/version/iq/version' -require 'xmpp4r/discovery/iq/discoinfo' -require 'optparse' -require 'yaml' -require 'thread' - - -## -# Options -## - -interval = 5 -jid = nil -conf_filename = "#{ENV['HOME']}/.xmppingrc" -accountname = 'default' - -OptionParser.new { |opts| - opts.banner = 'Usage: xmpping.rb [-d] [-a ACCOUNT] [-c FILENAME] [-i SECONDS] -t ' - opts.separator 'Ping a destination JID with various stanzas' - opts.on('-t', '--to JID', 'Destionation Jabber-ID') { |j| jid = Jabber::JID.new(j) } - opts.on('-a', '--account ACCOUNT', 'Account tag to use (default: default)') { |a| accountname = a } - opts.on('-c', '--config FILENAME', 'Configuration file (default: ~/.xmppingrc)') { |c| conf_filename = c } - opts.on('-i', '--interval SECONDS', 'Wait SECONDS between each stanza (default: 5)') { |sec| interval = sec.to_i } - opts.on('-d', '--debug', 'Enable XMPP4R debugging (print stanzas)') { Jabber::debug = true } - opts.on_tail('-h', '--help', 'Show help') { - puts opts - exit - } - opts.parse!(ARGV) - - unless jid - puts opts - exit - end -} - - -## -# Configuration -## - -begin - conf_file = File.new(conf_filename) -rescue Exception => e - puts "Unable to open config file: #{e.to_s}" - exit -end - -conf = YAML::load(conf_file) -unless conf - puts "#{conf_filename} is no valid YAML document" - exit -end -account = conf[accountname] -unless account - puts "Account #{accountname} not found in #{conf_filename}" - exit -end - -## -# Connection -## - -if account['http bind'] - cl = Jabber::HTTPBinding::Client.new(Jabber::JID.new(account['jid'])) - cl.connect(account['http bind']) -else - cl = Jabber::Client.new(Jabber::JID.new(account['jid'])) - cl.connect(account['host'], (account['port'] ? account['port'].to_i : 5222)) -end -cl.auth(account['password']) - -## -# Reply printer -## - -def print_reply(iq, roundtrip) - roundtrip_s = ((roundtrip * 100).round / 100.0).to_s + " sec" - output = "Received a #{iq.query.namespace} #{iq.type} (id: #{iq.id}) from #{iq.from} (#{roundtrip_s}): " - - if iq.query.kind_of?(Jabber::Version::IqQueryVersion) - output += "#{iq.query.iname}-#{iq.query.version} #{iq.query.os}" - elsif iq.query.namespace == 'jabber:iq:time' - output += "#{iq.query.first_element_text('display')} (#{iq.query.first_element_text('tz')})" - elsif iq.query.kind_of?(Jabber::Discovery::IqQueryDiscoInfo) - identity = iq.query.identity - if identity - output += "#{identity.iname} (#{identity.category} #{identity.type})" - else - output += " missing" - end - else - output += iq.query.to_s - end - - puts output -end - -## -# Main loop -## - - require 'mprofiler' - MemoryProfiler.start(:string_debug=>true) - -puts "XMPPING #{cl.jid} -> #{jid}" -query_methods = ['jabber:iq:version', 'jabber:iq:time', 'http://jabber.org/protocol/disco#info'] -query_method = 0 - -loop { - Thread.new { - iq = Jabber::Iq.new_query(:get, jid) - iq.query.add_namespace(query_methods[query_method]) - - time1 = Time.new - - begin - cl.send_with_id(iq) { |reply| - print_reply(reply, Time.new - time1) - true - } - rescue Jabber::ErrorException => e - puts "Error for #{iq.query.namespace} to #{iq.to}: #{e.error.to_s.inspect}" - end - } - - query_method += 1 - if query_method >= query_methods.size - query_method = 0 - end - - sleep(interval) -} - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmppingrc.sample b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmppingrc.sample deleted file mode 100644 index 28431b8f1..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/advanced/xmppingrc.sample +++ /dev/null @@ -1,14 +0,0 @@ -default: - jid: user@host/xmpping - password: secret - -other_account: - jid: me@domain/ping - password: xxx - host: 127.0.0.1 - port: 65222 - -web_account: - jid: me@domain/ping - password: xxx - http bind: http://domain/http-bind/ diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/change_password.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/change_password.rb deleted file mode 100755 index fd88548aa..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/change_password.rb +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/ruby -# -# A tool to change the password of a Jabber account -# - - -$:.unshift('../../../../../lib') - -require 'xmpp4r' -include Jabber - -def with_status(str, &block) - print "#{str}..." - $stdout.flush - begin - yield - puts " Ok" - rescue Exception => e - puts " Error: #{e.to_s}" - raise e - end -end - - -# settings -if ARGV.length != 3 - puts "Run with ./change_password.rb user@server/resource oldpassword newpassword" - exit 1 -end -my_jid = JID::new(ARGV[0]) -my_jid.resource = 'change_password' if my_jid.resource.nil? -old_password = ARGV[1] -new_password = ARGV[2] - -cl = Client::new(my_jid) - -with_status('Connecting') { cl.connect } -with_status('Authenticating') { cl.auth(old_password) } -with_status('Changing password') { cl.password = new_password } - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/client.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/client.rb deleted file mode 100755 index 140b97ad3..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/client.rb +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/ruby - -# Basic console client that does nothing, but easy to modify to test things. -# to test, start, then type : -# connect login@server/resource password -# auth - -require 'xmpp4r/client' -include Jabber - -Jabber::debug = true - -class BasicClient - def initialize - puts "Welcome to this Basic Console Jabber Client!" - quit = false - # main loop - while not quit do - print "> " - $defout.flush - line = gets - quit = true if line.nil? - if not quit - command, args = line.split(' ', 2) - args = args.to_s.chomp - # main case - case command - when 'exit' - quit = true - when 'connect' - do_connect(args) - when 'help' - do_help - when 'auth' - do_auth - else - puts "Command \"#{command}\" unknown" - end - end - end - puts "Goodbye!" - end - - def do_help - puts <<-EOF -# exit - exits -# connect user@server/resource password - connects -# auth - sends authentification - EOF - end - - ## - # connect - def do_connect(args) - @jid, @password = args.split(' ', 2) - @jid = JID::new(@jid) - @cl = Client::new(@jid) - @cl.connect - end - - ## - # auth - def do_auth - @cl.auth(@password, false) - end -end - -BasicClient::new diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/component.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/component.rb deleted file mode 100755 index 10a4060e3..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/component.rb +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib' - -require 'xmpp4r' -include Jabber - -c = Component::new('tada', 'localhost', 60001) -c.connect -c.auth('jabber-rocks') -Thread.stop diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/echo_threaded.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/echo_threaded.rb deleted file mode 100755 index 9918c8def..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/echo_threaded.rb +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/ruby - -# This bot will reply to every message it receives. To end the game, send 'exit' -# THREADED VERSION - -require 'xmpp4r/client' -include Jabber - -# settings -if ARGV.length != 2 - puts "Run with ./echo_thread.rb user@server/resource password" - exit 1 -end -myJID = JID::new(ARGV[0]) -myPassword = ARGV[1] -cl = Client::new(myJID) -cl.connect -cl.auth(myPassword) -cl.send(Presence::new) -puts "Connected ! send messages to #{myJID.strip.to_s}." -mainthread = Thread.current -cl.add_message_callback do |m| - if m.type != :error - m2 = Message::new(m.from, "You sent: #{m.body}") - m2.type = m.type - cl.send(m2) - if m.body == 'exit' - m2 = Message::new(m.from, "Exiting ...") - m2.type = m.type - cl.send(m2) - mainthread.wakeup - end - end -end -Thread.stop -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/jabbersend.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/jabbersend.rb deleted file mode 100755 index 333d4859a..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/jabbersend.rb +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/ruby - -# This script will send a jabber message to the specified JID. The subject can be -# specified using the '-s' option, and the message will be taken from stdin. - -$:.unshift '../../../../../lib' - -require 'optparse' -require 'xmpp4r' -include Jabber - -# settings -myJID = JID::new('bot@localhost/Bot') -myPassword = 'bot' - -to = nil -subject = '' -OptionParser::new do |opts| - opts.banner = 'Usage: jabbersend.rb -s \'subject\' -t dest@domain' - opts.separator '' - opts.on('-s', '--subject SUBJECT', 'sets the message\'s subject') { |s| subject = s } - opts.on('-t', '--to DESTJID', 'sets the receiver') { |t| to = JID::new(t) } - opts.on_tail('-h', '--help', 'Show this message') { - puts opts - exit - } - opts.parse!(ARGV) -end - -if to.nil? - puts "No receiver specified. See jabbersend -h" -end - -cl = Client::new(myJID, false) -cl.connect -cl.auth(myPassword) -body = STDIN.readlines.join -m = Message::new(to, body).set_type(:normal).set_id('1').set_subject(subject) -puts m.to_s -cl.send(m) -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mass_sender.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mass_sender.rb deleted file mode 100755 index ec29deb99..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mass_sender.rb +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/ruby - -# This script will send a jabber message to a list of JID given on stdin. - -$:.unshift '../../../../../lib' - -require 'optparse' -require 'xmpp4r' -include Jabber -#Jabber::debug = true - -# - message in file -# - subject in command line -# - JID list on stdin - -# settings -jid = JID::new('bot@localhost/Bot') -password = 'bot' -filename = 'message.txt' - -subject = "Message de test" - -OptionParser::new do |opts| - opts.banner = 'Usage: mass_sender.rb -j jid -p password' - opts.separator '' - opts.on('-j', '--jid JID', 'sets the jid') { |j| jid = JID::new(j) } - opts.on('-p', '--password PASSWORD', 'sets the password') { |p| password = p } - opts.on('-f', '--filename MESSAGE', 'sets the filename containing the message') { |f| filename = f } - opts.on('-s', '--subject SUBJECT', 'sets the subject') { |s| subject = s } - opts.on_tail('-h', '--help', 'Show this message') { - puts opts - exit - } - opts.parse!(ARGV) -end - -body = IO::read(filename).chomp - -cl = Client::new(jid, false) -cl.connect -cl.auth(password) -exit = false -sent = [] -cl.add_message_callback do |m| - if m.type != :error - if !sent.include?(m.from) - cl.send(Message::new(m.from, "Je suis un robot. Si tu souhaites contacter un administrateur du serveur, envoie un message à lucas@nussbaum.fr ou rejoins la salle jabberfr@chat.jabberfr.org.")) - sent << m.from - end - if m.body == 'exitnowplease' - cl.send(Message::new(m.from, "Exiting ...")) - exit = true - end - cl.send(Message::new('lucas@nussbaum.fr', "From #{m.from}: #{m.body.to_s}")) - end -end -cl.send(Presence::new) -m = Message::new(nil, body) -m.subject = subject -STDIN.each_line { |l| - l.chomp! - m.set_to(JID::new(l).to_s) - cl.send(m) -} -while not exit do - cl.process(1) -end -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/muc_owner_config.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/muc_owner_config.rb deleted file mode 100644 index 9e3cf21db..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/muc_owner_config.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'xmpp4r' -require 'xmpp4r/muc' - -client = Jabber::Client.new('admin@myserver.co.uk/ruby') -muc = Jabber::MUC::MUCClient.new(client) -client.connect -client.auth('admin') -muc.join('room@conference.myserver.co.uk/admin') -muc.configure( - 'muc#roomconfig_roomname' => 'roomname', - 'muc#roomconfig_persistentroom' => 1 -) - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucinfo.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucinfo.rb deleted file mode 100755 index cc6ce012f..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucinfo.rb +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env ruby - -require 'xmpp4r' -require 'xmpp4r/muc/helper/mucbrowser' - -if ARGV.size != 3 - puts "Usage: #{$0} " - exit -end - -jid, password, muc_jid = Jabber::JID.new(ARGV.shift), ARGV.shift, Jabber::JID.new(ARGV.shift) - -cl = Jabber::Client.new(jid) -cl.connect -cl.auth(password) - -browser = Jabber::MUC::MUCBrowser.new(cl) - -print "Querying #{muc_jid} for identity..."; $stdout.flush -name = browser.muc_name(muc_jid) - -if name.nil? - puts " Sorry, but the queried MUC component doesn't seem to support MUC or Groupchat." -else - puts " #{name}" - - print "Querying #{muc_jid} for its rooms..."; $stdout.flush - rooms = browser.muc_rooms(muc_jid) - puts " #{rooms.size} rooms found" - - max_room_length = 0 - rooms.each_key { |jid| max_room_length = jid.to_s.size if jid.to_s.size > max_room_length } - - rooms.each { |jid,name| - puts "#{jid.to_s.ljust(max_room_length)} #{name}" - } -end - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucsimplebot.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucsimplebot.rb deleted file mode 100755 index 05293b4e9..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/mucsimplebot.rb +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/env ruby -$:.unshift '../../../../../lib/' -require 'xmpp4r' -require 'xmpp4r/muc/helper/simplemucclient' - - -if ARGV.size != 3 - puts "Usage: #{$0} " - exit -end - -# Print a line formatted depending on time.nil? -def print_line(time, line) - if time.nil? - puts line - else - puts "#{time.strftime('%I:%M')} #{line}" - end -end - - -#Jabber::debug = true -cl = Jabber::Client.new(Jabber::JID.new(ARGV[0])) -cl.connect -cl.auth(ARGV[1]) - -# For waking up... -mainthread = Thread.current - -# This is the SimpleMUCClient helper! -m = Jabber::MUC::SimpleMUCClient.new(cl) - -# SimpleMUCClient callback-blocks - -m.on_join { |time,nick| - print_line time, "#{nick} has joined!" - puts "Users: " + m.roster.keys.join(', ') -} -m.on_leave { |time,nick| - print_line time, "#{nick} has left!" -} - -m.on_message { |time,nick,text| - print_line time, "<#{nick}> #{text}" - - # Avoid reacting on messaged delivered as room history - unless time - # Bot: invite astro@spaceboyz.net - if text.strip =~ /^(.+?): invite (.+)$/ - jid = $2 - if $1.downcase == m.jid.resource.downcase - m.invite(jid => "Inviting you on behalf of #{nick}") - m.say("Inviting #{jid}...") - end - # Bot: subject This is room is powered by XMPP4R - elsif text.strip =~ /^(.+?): subject (.+)$/ - if $1.downcase == m.jid.resource.downcase - m.subject = $2 - end - # Bot: exit please - elsif text.strip =~ /^(.+?): exit please$/ - if $1.downcase == m.jid.resource.downcase - puts "exiting" - m.exit "Exiting on behalf of #{nick}" - mainthread.wakeup - end - end - end -} -m.on_room_message { |time,text| - print_line time, "- #{text}" -} -m.on_subject { |time,nick,subject| - print_line time, "*** (#{nick}) #{subject}" -} - -m.join(ARGV[2]) - -# Wait for being waken up by m.on_message -Thread.stop - -cl.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/register.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/register.rb deleted file mode 100755 index 0963d4e21..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/register.rb +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib' -require 'xmpp4r' - - -# Argument checking -if ARGV.size != 2 - puts("Usage: #{$0} ") - exit -end - - -# The usual procedure -cl = Jabber::Client.new(Jabber::JID.new(ARGV[0])) -puts "Connecting" -cl.connect - -# Registration of the new user account -puts "Registering..." -cl.register(ARGV[1]) -puts "Successful" - -# Shutdown -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/remove_registration.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/remove_registration.rb deleted file mode 100644 index 1131ba258..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/remove_registration.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env ruby - -$:.unshift '../../../../../lib' -require 'xmpp4r' -include Jabber - -if ARGV.size != 2 - puts "Warning! This example UNREGISTERS user accounts!" - puts "Usage: #{$0} " - exit -end - -cl = Client.new(JID.new(ARGV[0])) -cl.connect -cl.auth(ARGV[1]) -cl.remove_registration - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/roster.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/roster.rb deleted file mode 100755 index b623ec4dc..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/roster.rb +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/ruby - -# This script can get all roster entries - -require 'optparse' -require 'xmpp4r' -require 'xmpp4r/roster/iq/roster' -include Jabber - -jid = JID::new('lucastest@linux.ensimag.fr/rosterget') -password = 'lucastest' - -OptionParser::new do |opts| - opts.banner = 'Usage: roster.rb -t get -j jid -p password' - opts.separator '' - opts.on('-j', '--jid JID', 'sets the jid') { |j| jid = JID::new(j) } - opts.on('-p', '--password PASSWORD', 'sets the password') { |p| password = p } - opts.on_tail('-h', '--help', 'Show this message') { - puts opts - exit - } - opts.parse!(ARGV) -end - -cl = Client::new(jid, false) -cl.connect -cl.auth(password) -cl.send(Iq::new_rosterget) -exit = false -cl.add_iq_callback { |i| - if i.type == :result and i.query.kind_of?(Roster::IqQueryRoster) - i.query.each_element { |e| - e.text = '' - puts e.to_s - } - exit = true - end -} -while not exit - cl.process -end -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterprint.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterprint.rb deleted file mode 100755 index 4f14e3423..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterprint.rb +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib/' - -require 'xmpp4r' -require 'xmpp4r/roster/helper/roster' - -# Command line argument checking - -if ARGV.size != 2 - puts("Usage: ./rosterprint.rb ") - exit -end - -# Building up the connection - -#Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid) -cl.connect -cl.auth(ARGV[1]) - -# The roster instance -roster = Jabber::Roster::Helper.new(cl) - -mainthread = Thread.current - -roster.add_query_callback { |iq| - mainthread.wakeup -} - -Thread.stop - -roster.groups.each { |group| - if group.nil? - puts "*** Ungrouped ***" - else - puts "*** #{group} ***" - end - - roster.find_by_group(group).each { |item| - puts "- #{item.iname} (#{item.jid})" - } - - print "\n" -} - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterrename.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterrename.rb deleted file mode 100755 index a2c4afc54..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterrename.rb +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib' - -require 'xmpp4r' -require 'xmpp4r/roster/iq/roster' - -# Command line argument checking - -if ARGV.size < 4 - puts("Usage: ./rosterrename.rb [ ... ]") - exit -end - -# Building up the connection - -#Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid, false) -cl.connect -cl.auth(ARGV[1]) - -# The iq stanza -iq = Jabber::Iq::new(:set) -# The new roster instance and item element -iq.add(Jabber::Roster::IqQueryRoster.new).add(Jabber::Roster::RosterItem.new(ARGV[2], ARGV[3])).groups = ARGV[4..ARGV.size] - -# Sending the stanza -cl.send(iq) - -# Don't look at the results: -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterwatch.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterwatch.rb deleted file mode 100755 index 9bab4b390..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/rosterwatch.rb +++ /dev/null @@ -1,172 +0,0 @@ -#!/usr/bin/ruby -# -# XMPP4R - XMPP Library for Ruby -# Copyright (C) 2005 Stephan Maka -# Released under Ruby's license (see the LICENSE file) or GPL, at your option -# -# -# Roster-Watch example -# -# -# Learn how a roster looks like -# how presences are received -# about subscription requests and answers -# what vCards contain -# -# It's recommended to insert 'p' commands in this script. :-) -# -# This script does: -# -# * Listing roster changes -# -# * Subscribe to roster items which have a subscription of "none" or "from" -# WARNING: Chances are that you don't want that :-) -# -# * Requesting vCards for unnamed items in your roster and renaming them -# to the or field in the vCard -# -# * Listing presence changes -# -# * Listing subscription and unsubscription requests and answers - -$:.unshift '../../../../../lib/' - -require 'xmpp4r' -require 'xmpp4r/roster/helper/roster' -require 'xmpp4r/vcard/helper/vcard' - -# Command line argument checking - -if ARGV.size != 2 - puts("Usage: ./rosterwatch.rb ") - exit -end - -# Building up the connection - -#Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid) -cl.connect -cl.auth(ARGV[1]) - -# The roster instance -roster = Jabber::Roster::Helper.new(cl) - -# Callback to handle updated roster items -roster.add_update_callback { |olditem,item| - if [:from, :none].include?(item.subscription) && item.ask != :subscribe - puts("Subscribing to #{item.jid}") - item.subscribe - end - - # Print the item - if olditem.nil? - # We didn't knew before: - puts("#{item.iname} (#{item.jid}, #{item.subscription}) #{item.groups.join(', ')}") - else - # Showing whats different: - puts("#{olditem.iname} (#{olditem.jid}, #{olditem.subscription}) #{olditem.groups.join(', ')} -> #{item.iname} (#{item.jid}, #{item.subscription}) #{item.groups.join(', ')}") - end - - # If the item has no name associated... - unless item.iname - Thread.new do - puts("#{item.jid} has no nickname... getting vCard") - begin - # ...get a vCard - vcard = Jabber::Vcard::Helper.new(cl).get(item.jid.strip) - - unless vcard.nil? - # Rename him to vCard's field - if vcard['NICKNAME'] - item.iname = vcard['NICKNAME'] - puts("Renaming #{item.jid} to #{vcard['NICKNAME']}") - item.send - # Rename him to vCard's field - elsif vcard['FN'] - item.iname = vcard['FN'] - puts("Renaming #{item.jid} to #{vcard['FN']}") - item.send - # We've got a lazy one - else - puts("#{item.jid} provided no details in vCard") - end - end - - rescue Exception => e - # This will be (mostly) thrown by Jabber::Vcard::Helper#get - puts("Error getting vCard for #{item.jid}: #{e.to_s}") - end - end - end -} - -# Presence updates: -roster.add_presence_callback { |item,oldpres,pres| - # Can't look for something that just does not exist... - if pres.nil? - # ...so create it: - pres = Jabber::Presence.new - end - if oldpres.nil? - # ...so create it: - oldpres = Jabber::Presence.new - end - - # Print name and jid: - name = "#{pres.from}" - if item.iname - name = "#{item.iname} (#{pres.from})" - end - puts(name) - - # Print type changes: - unless oldpres.type.nil? && pres.type.nil? - puts(" Type: #{oldpres.type.inspect} -> #{pres.type.inspect}") - end - # Print show changes: - unless oldpres.show.nil? && pres.show.nil? - puts(" Show: #{oldpres.show.to_s.inspect} -> #{pres.show.to_s.inspect}") - end - # Print status changes: - unless oldpres.status.nil? && pres.status.nil? - puts(" Status: #{oldpres.status.to_s.inspect} -> #{pres.status.to_s.inspect}") - end - # Print priority changes: - unless oldpres.priority.nil? && pres.priority.nil? - puts(" Priority: #{oldpres.priority.inspect} -> #{pres.priority.inspect}") - end - - # Note: presences with type='error' will reflect our own show/status/priority - # as it is mostly just a reply from a server. This is *not* a bug. -} - -# Subscription requests and responses: -subscription_callback = lambda { |item,pres| - name = pres.from - if item != nil && item.iname != nil - name = "#{item.iname} (#{pres.from})" - end - case pres.type - when :subscribe then puts("Subscription request from #{name}") - when :subscribed then puts("Subscribed to #{name}") - when :unsubscribe then puts("Unsubscription request from #{name}") - when :unsubscribed then puts("Unsubscribed from #{name}") - else raise "The Roster Helper is buggy!!! subscription callback with type=#{pres.type}" - end -} -roster.add_subscription_callback(0, nil, &subscription_callback) -roster.add_subscription_request_callback(0, nil, &subscription_callback) - -# Send initial presence -# this is important for receiving presence of subscribed users -cl.send(Jabber::Presence.new.set_show(:dnd).set_status('Watching my roster change...')) - -# Main loop: -Thread.stop - -cl.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/send_vcard.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/send_vcard.rb deleted file mode 100755 index 0c511659a..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/send_vcard.rb +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/ruby - -# Demonstration of the Vcard helper class -# -# * Retrieves your own vCard -# * Modify fields given on the command line -# * Dumps the vCard -# * Send your vCard to the server - -$:.unshift('../../../../../lib') - -require 'xmpp4r' -require 'xmpp4r/vcard/helper/vcard' -include Jabber - - -# settings -if ARGV.length < 2 - puts "Usage:\t./send_vcard.rb [= [... =] ]" - puts "Example:\t./send_vcard.rb user@server/resource password NICKNAME=User \"FN=A user\"" - exit 1 -end - -# Do the client stuff... -myJID = JID::new(ARGV.shift) -myPassword = ARGV.shift -cl = Client::new(myJID) -cl.connect -cl.auth(myPassword) - -# The Vcard helper -vcard_helper = Vcard::Helper.new(cl) - -begin - puts "Retrieving vCard information for #{cl.jid.strip}" - vcard = vcard_helper.get - - - # Inspect the command line for vCard fields to be changed - ARGV.each { |arg| - arg.scan(/^(.+?)=(.*)$/) { |field,text| - puts "field #{field}: #{vcard[field].inspect} => #{text.inspect}" - vcard[field] = text - } - } - - # Dump the vCard - vcard.fields.each { |field| - if field.split(/\//).pop == 'BINVAL' - puts "#{field}:\tBINVAL" - else - puts "#{field}:\t#{vcard[field].inspect}" - end - } - - begin - puts "Sending vCard information for #{cl.jid.strip}" - vcard_helper.set(vcard) - rescue Exception => e - puts "Sorry, we stumbled upon the following when sending the vCard of #{cl.jid.strip}: #{e.to_s.inspect}" - end - -rescue Exception => e - puts "Sorry, we stumbled upon the following when requesting the vCard of #{cl.jid.strip}: #{e.to_s.inspect}" -end - -cl.close - diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/versionbot.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/versionbot.rb deleted file mode 100755 index e3e37edbf..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/basic/versionbot.rb +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../../../../../lib' - -require 'xmpp4r' -require 'xmpp4r/version/iq/version' -require 'xmpp4r/version/helper/simpleresponder' - - -# A Hash containing all Version Query answers with their JIDs as keys: -versions = {} - -# Command line argument checking - -if ARGV.size != 2 - puts("Usage: ./versionbot.rb ") - exit -end - -# Building up the connection - -#Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid, false) -cl.connect -cl.auth(ARGV[1]) - -cl.on_exception { |*a| - p a[0].backtrace - exit! -} - -# I'm not sure about the portability of 'uname -sr' here ;-) -# but that's all needed to answer version queries: -Jabber::Version::SimpleResponder.new(cl, 'xmpp4r Versionbot example', Jabber::XMPP4R_VERSION, IO.popen('uname -sr').readlines.to_s.strip) - - -cl.add_iq_callback { |iq| - # Filter for version query results - if (iq.type == :result) && iq.query.kind_of?(Jabber::Version::IqQueryVersion) - puts "Version query result from #{iq.from}" - # Keep track of results per JID - versions[iq.from] = iq.query - # Print details - puts " Name: #{iq.query.iname.inspect}" - puts " Version: #{iq.query.version.inspect}" - puts " OS: #{iq.query.os.inspect}" - end -} - -cl.add_presence_callback { |pres| - # Already fingerprinted or offline? - unless versions.has_key?(pres.from) || (pres.type == :unavailable) || (pres.type == :error) - # Construct a new query - iq = Jabber::Iq.new(:get, pres.from) - # and ask for the version - iq.query = Jabber::Version::IqQueryVersion.new - puts "Asking #{iq.to} for his/her/its version" - versions[pres.from] = :asking - cl.send(iq) - end -} - -# Send initial presence -cl.send(Jabber::Presence.new.set_show(:xa).set_status('I am the evil fingerprinting robot')) - -# Main loop: -loop do - cl.process - sleep(1) -end - -cl.close diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/jabber2jabber/jabber2jabber.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/jabber2jabber/jabber2jabber.rb deleted file mode 100755 index 2e98af98a..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/jabber2jabber/jabber2jabber.rb +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'xmpp4r' -include Jabber - -c = Component::new('example.blop.info', 'linux.ensimag.fr', 2609) -c.connect -c.auth('BenEuh') -c.add_iq_callback { |i| -puts i.to_s -} - -c.add_message_callback { |m| - puts m.to_s -} -Thread.stop diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_cgi.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_cgi.rb deleted file mode 100755 index 50b1488bf..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_cgi.rb +++ /dev/null @@ -1,192 +0,0 @@ -#!/usr/bin/env ruby -# -# cp /usr/local/share/psi/iconsets/roster/lightbulb/{away,online,offline,xa,chat,dnd}.png . - -$:.unshift '../lib' - -require 'GD' -require 'cgi' -require 'digest/md5' - -require 'rexml/document' - -require 'xmpp4r' -require 'xmpp4r/iqqueryroster' - -# Handle CGI parameters -cgi = CGI.new -jid = Jabber::JID.new(cgi['jid']).strip -jidhash = cgi['hash'] -transparency = (cgi['transparency'] == 'true') - -# Create data - -roster = Jabber::IqQueryRoster.new -presences = {} - -# Load state - -doc = REXML::Document.new(File.new('edgarrstate.xml')) - -doc.root.each_element { |e| - if (e.name == 'query') && (e.namespace == 'jabber:iq:roster') - roster.import(e) - elsif e.name == 'presence' - pres = Jabber::Presence.new.import(e) - - if (pres.from.strip == jid) || (Digest::MD5.hexdigest(pres.from.strip.to_s) == jidhash) - if (jid == '') && !jidhash.nil? - jid = pres.from.strip - end - presences[pres.from] = pres - end - end -} - -resources = (presences.size < 1) ? 1 : presences.size - - -class BannerTable - def initialize - @lines = [] - end - - def last - @lines[@lines.size - 1] - end - - def add_line - @lines.push(BannerLine.new) - end - - def paint - width = 0 - height = 0 - @lines.each do |line| - if width < line.w - width = line.w - end - height += line.h - end - - gd = GD::Image.new(width + 6, height + 6) - white = gd.colorAllocate(255,255,255) - black = gd.colorAllocate(0,0,0) - - gd.fill(0, 0, black) - gd.interlace = true - gd.rectangle(0,0,width + 5,height + 5,white) - y = 2 - - @lines.each do |line| - line.paint(gd, 3, y + (line.h / 2)) - y += line.h - end - - gd - end -end - -class BannerLine - def initialize - @items = [] - end - - def add(type, text) - @items.push(BannerItem.new(type, text)) - end - - def w - w = 1 - @items.each do |item| - w += item.w - end - w - end - - def h - h = 0 - @items.each do |item| - if h < item.h - h = item.h - end - end - h - end - - def paint(gd, x_start, y_center) - x = x_start - @items.each do |item| - item.paint(gd, x, y_center - (item.h / 2)) - x += item.w - end - end -end - -class BannerItem - def initialize(type, text) - @type = type - @text = text - end - - def w - if @type.kind_of?(GD::Font) - (@type.width * @text.size) + 2 - elsif @type.kind_of?(GD::Image) - @type.width + 2 - end - end - - def h - if @type.kind_of?(GD::Font) || @type.kind_of?(GD::Image) - @type.height + 2 - end - end - - def paint(gd, x, y) - if @type.kind_of?(GD::Font) && (@text.size > 0) - gd.string(@type, x + 1, y + 1, @text, gd.colorAllocate(255,255,255)) - elsif @type.kind_of?(GD::Image) - type = @type.to_paletteImage(false, 256) - type.copy(gd, x + 1, y + 1, 0, 0, type.height, type.height) - end - end -end - -# Paint the image - -table = BannerTable.new -table.add_line - -# Put JID at top -if roster[jid.strip].nil? - iname = 'Unknown' -else - iname = roster[jid.strip].iname.to_s -end -table.last.add(GD::Font::MediumFont, iname == '' ? jid.to_s : iname) - -if (presences.size < 1) - table.add_line - table.last.add(GD::Font::SmallFont, 'Unavailable') -else - presences.each { |jid,pres| - show = pres.show.to_s - if pres.type == :unavailable - show = 'offline' - elsif pres.show.nil? - show = 'online' - end - - table.add_line - table.last.add(GD::Image.newFromPng(File.new("miniedgarr_bulbs/#{show}.png")), nil) - prio = pres.priority.nil? ? 0 : pres.priority - table.last.add(GD::Font::SmallFont, "#{pres.from.resource} (#{prio})") - table.add_line - table.last.add(GD::Font::TinyFont, pres.status.to_s.strip) - } -end - -# Convert the image to PNG and print it on standard output -print "Content-type: image/png\r\n\r\n" -table.paint.png STDOUT diff --git a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_watch.rb b/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_watch.rb deleted file mode 100755 index 6e817cf2c..000000000 --- a/vendor/xmpp4r-0.3.2/data/doc/xmpp4r/examples/buggy/miniedgarr_watch.rb +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'rexml/document' - -require 'xmpp4r' -require 'xmpp4r/iqqueryroster' - -# Command line argument checking - -if ARGV.size != 3 - puts("Usage: ./rosterwatch.rb ") - exit -end - - -def write_state(statefile, roster, presences) - doc = REXML::Document.new - state = doc.add(REXML::Element.new('state')) - state.add(roster) - presences.each { |jid,pres| state.add(pres) } - - file = File.new(statefile, "w") - doc.write(file, 0) - file.close -end - - -# Building up the connection - -Jabber::debug = true - -jid = Jabber::JID.new(ARGV[0]) - -cl = Jabber::Client.new(jid, false) -cl.connect -cl.auth(ARGV[1]) - - -roster = Jabber::IqQueryRoster.new -presences = {} - -cl.add_iq_callback { |iq| - if (iq.type == :result) && iq.query.kind_of?(Jabber::IqQueryRoster) - roster.import(iq.query) - write_state(ARGV[2], roster, presences) - end -} - -# TODO: ... -cl.add_presence_callback { |pres| - # Handle subscription request - if pres.type == :subscribe - # Accept subscription - cl.send(Jabber::Presence.new.set_to(pres.from).set_type(:subscribed)) - # Subscribe to sender - cl.send(Jabber::Presence.new.set_to(pres.from).set_type(:subscribe)) - # Add to roster - # TODO: Resolve Nickname from vCard - roster_set_iq = Jabber::Iq.new(:set) - roster_set_iq.add(Jabber::IqQueryRoster.new).add(Jabber::RosterItem.new(pres.from.strip)) - cl.send(roster_set_iq) - end - - presences[pres.from] = pres - write_state(ARGV[2], roster, presences) -} - -# Send request for roster -cl.send(Jabber::Iq.new_rosterget) -# Send initial presence -# This is important as it ensures reception of -# further stanzas -cl.send(Jabber::Presence.new.set_show(:dnd).set_status('Watching my roster change...')) - -loop do - cl.process - sleep(1) -end - -cl.close diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r.rb deleted file mode 100755 index 84a72751c..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r.rb +++ /dev/null @@ -1,116 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ -# -# ==Introduction -# -# XMPP4R is a XMPP/Jabber library for Ruby. It can be used to build scripts -# using Jabber, full-featured Jabber clients, and components. It is written -# with extensibility in mind. -# -# ==XML management -# -# All the XML parsing is REXML's, and XML stanzas like (class -# Jabber::Message) or (class Jabber::Iq) are indirect -# derivatives from REXML's Element class. This provide a maximum flexibity: -# the user can access attributes and childs using either the XMPP4R's helpers -# or directly using REXML's methods. -# -# ===Automatic element casting -# -# Because there are special classes derived from REXML::Element to ease -# development on the protocol level, Elements must be cast to them. This is -# done via REXML::Element.import. This method is also used in import class -# methods of some Element classes. -# -# The first occurance of this feature is in Jabber::Stream::receive: -# * stanzas are cast to Jabber::Message class -# * stanzas are cast to Jabber::Presence class -# * stanzas are cast to Jabber::Iq class -# -# This is not only useful for stanzas but all other XML processing, too: -# * children elements of and are converted to Jabber::X -# * children elements of all three stanzas are converted to Jabber::Error -# * children elements of are converted to Jabber::IqQuery -# * children elements of are converted to Jabber::IqVcard -# -# The following conversion facilities are only executed if the respective -# library parts are loaded. See below for more details on Non-basic features. -# * Jabber::IqQuery elements are converted to Jabber::Roster::IqQueryRoster if their -# namespace is 'jabber:iq:roster' -# * Jabber::IqQuery elements are converted to Jabber::Version::IqQueryVersion if their -# namespace is 'jabber:iq:version' -# * Jabber::IqQuery elements are converted to Jabber::Discovery::IqQueryDiscoInfo if their -# namespace is 'http://jabber.org/protocol/disco#info' -# * Jabber::IqQuery elements are converted to Jabber::Discovery::IqQueryDiscoItems if their -# namespace is 'http://jabber.org/protocol/disco#items' -# * children elements of Jabber::Roster::IqQueryRoster are converted -# to Jabber::Roster::RosterItem -# * children elements of Jabber::IqQueryDiscoInfo are converted -# to Jabber::Discovery::DiscoIdentity -# * children elements of Jabber::IqQueryDiscoInfo are converted -# to Jabber::Discovery::DiscoFeature -# * children elements of Jabber::IqQueryDiscoItems are converted -# to Jabber::Discovery::DiscoItem -# -# To use this, don't check for: -# iq.queryns == 'http://jabber.org/protocol/disco#info' -# -# But instead check for the query's class: -# iq.query.kind_of?(Jabber::IqQueryDiscoInfo) -# -# ==Where to begin? -# -# Because it is built in an extensible way, it might be hard for newcomers to -# understand where to look at documentation for a specific method. For example, -# Client heritates from Connection, which itself heritates from Stream. -# -# A newcomer should have a look at the Jabber::Client and -# Jabber::Component classes, and their parent classes -# Jabber::Connection and Jabber::Stream. The best way to -# understand how to use them is probably to look at the examples in the -# examples/ dir. -# -# ==Non-basic features -# -# require 'xmpp4r' does only include basic functionality as -# Connections, Authentication, Stream processing, Callbacks, Stanza handling -# and Debugging to keep the library's footprint small. -# -# There is code for features that aren't required by a *basic* client. These -# must be additionally included to use them. -# -# ===Protocol-level features -# -# You're highly advised to read the according RFCs and JEPs if you intend to -# use them. The benefit will be that you'll understand the protocols and be -# going to be more efficient when programming with them. -# -# * Jabber::Bytestreams, Jabber::FileTransfer: require 'xmpp4r/bytestreams' -# * Jabber::Dataforms: require 'xmpp4r/dataforms' -# * Jabber::Delay: require 'xmpp4r/delay' -# * Jabber::Discovery: require 'xmpp4r/discovery' -# * Jabber::FeatureNegotiation: require 'xmpp4r/feature_negotiation' -# * Jabber::MUC: require 'xmpp4r/muc' -# * Jabber::Roster: require 'xmpp4r/roster' -# * Jabber::Vcard: require 'xmpp4r/vcard' -# * Jabber::Version: require 'xmpp4r/version' -# -# ===Helpers -# -# Helpers are intended to give more simplistic interfaces to various tasks -# of Jabber clients at the cost of flexibility. But you won't need that -# order of flexibility for the most things. -# -# * Jabber::Roster::Helper: require 'xmpp4r/roster' -# * Jabber::MUC::MUCBrowser, Jabber::MUC::MUCClient, Jabber::MUC::SimpleMUCClient: require 'xmpp4r/muc' -# * Jabber::Version::SimpleResponder, Jabber::Version::Responder: require 'xmpp4r/version' -# * Jabber::Vcard::Helper: require 'xmpp4r/vcard' -# * Jabber::FileTransfer::Helper, Jabber::Bytestreams::SOCKS5BytestreamsServer: require 'xmpp4r/bytestreams' -# -# ==Debugging -# -# Dumping your Jabber stream can be enabled this way: -# Jabber::debug = true - -require 'xmpp4r/xmpp4r' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/authenticationfailure.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/authenticationfailure.rb deleted file mode 100644 index d92d0c7da..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/authenticationfailure.rb +++ /dev/null @@ -1,13 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # The AuthenticationFailure is an Exception to be raised - # when Client or Component authentication fails - # - # There are no special arguments - class AuthenticationFailure < RuntimeError - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams.rb deleted file mode 100644 index 0d6acc45e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams.rb +++ /dev/null @@ -1,15 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/bytestreams/iq/si.rb' -require 'xmpp4r/bytestreams/iq/bytestreams.rb' -require 'xmpp4r/bytestreams/helper/ibb/base.rb' -require 'xmpp4r/bytestreams/helper/ibb/initiator.rb' -require 'xmpp4r/bytestreams/helper/ibb/target.rb' -require 'xmpp4r/bytestreams/helper/filetransfer.rb' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/base.rb' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/server.rb' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/target.rb' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/filetransfer.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/filetransfer.rb deleted file mode 100644 index 4ef6faf85..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/filetransfer.rb +++ /dev/null @@ -1,320 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/callbacks' -require 'xmpp4r/bytestreams/iq/si' -require 'xmpp4r/dataforms/x/data' -require 'xmpp4r/bytestreams/helper/ibb/base' -require 'xmpp4r/bytestreams/helper/socks5bytestreams/base' - -module Jabber - module FileTransfer - ## - # The TransferSource is an interface (Mix-in) - # which sources for FileTransfer#offer should include - module TransferSource - ## - # Filename of the offered file - def filename - end - ## - # Mime-type of the offered file, can be nil - def mime - end - ## - # Size of the offered file - def size - end - ## - # MD5-Sum of the offered file, can be nil - def md5 - end - ## - # Date of the offered file, can be nil - def date - end - ## - # Read a chunk from the source - # - # If this is a ranged transfer, it should - # implement length checking - # length:: [Fixnum] - def read(length=nil) - end - ## - # Seek in the source for ranged transfers - def seek(position) - end - ## - # Set the amount of data to send for ranged transfers - def length=(l) - end - ## - # Does implement the methods seek and length= ? - # - # FileTransfer will only then offer a ranged transfer. - # result:: [false] or [true] - def can_range? - false - end - end - - ## - # Simple implementation of TransferSource - # for sending simple files - # (supports ranged transfers) - class FileSource - include TransferSource - - def initialize(filename) - @file = File.new(filename) - @filename = filename - @bytes_read = 0 - @length = nil - end - - def filename - File::basename @filename - end - - ## - # Everything is 'application/octet-stream' - def mime - 'application/octet-stream' - end - - def size - File.size @filename - end - - def date - @file.mtime - end - - ## - # Because it can_range?, this method implements length checking - def read(length=512) - if @length - return nil if @bytes_read >= @length # Already read everything requested - if @bytes_read + length > @length # Will we read more than requested? - length = @length - @bytes_read # Truncate it! - end - end - - buf = @file.read(length) - @bytes_read += buf.size if buf - buf - end - - def seek(position) - @file.seek(position) - end - - def length=(l) - @length = l - end - - def can_range? - true - end - end - - ## - # The FileTransfer helper provides the ability to respond - # to incoming and to offer outgoing file-transfers. - class Helper - ## - # Set this if you want to use this helper in a Component - attr_accessor :my_jid - ## - # Set this to false if you don't want to use SOCKS5Bytestreams - attr_accessor :allow_bytestreams - ## - # Set this to false if you don't want to use IBB - attr_accessor :allow_ibb - - ## - # Create a new FileTransfer instance - def initialize(stream) - @stream = stream - @my_jid = nil - @allow_bytestreams = true - @allow_ibb = true - - @incoming_cbs = CallbackList.new - - @stream.add_iq_callback(150, self) { |iq| - if iq.type == :set - file = iq.first_element('si/file') - field = nil - iq.each_element('si/feature/x') { |e| field = e.field('stream-method') } - - if file and field - @incoming_cbs.process(iq, file) - true - else - false - end - else - false - end - } - end - - ## - # Add a callback which will be invoked upon an incoming file-transfer - # - # block takes two arguments: - # * Iq - # * Bytestreams::IqSiFile in the Iq - # You may then invoke accept or decline - def add_incoming_callback(priority = 0, ref = nil, &block) - @incoming_cbs.add(priority, ref, block) - end - - ## - # Accept an incoming file-transfer, - # to be used in a block given to add_incoming_callback - # - # offset and length will be ignored if there is no - # 'si/file/range' in iq. - # iq:: [Iq] of file-transfer we want to accept - # offset:: [Fixnum] or [nil] - # length:: [Fixnum] or [nil] - # result:: [Bytestreams::SOCKS5BytestreamsTarget] or [Bytestreams::IBBTarget] or [nil] if no valid stream-method - def accept(iq, offset=nil, length=nil) - oldsi = iq.first_element('si') - - answer = iq.answer(false) - answer.type = :result - - si = answer.add(Bytestreams::IqSi.new) - if (offset or length) and oldsi.file.range - si.add(Bytestreams::IqSiFile.new) - si.file.add(Bytestreams::IqSiFileRange.new(offset, length)) - end - si.add(FeatureNegotiation::IqFeature.new.import(oldsi.feature)) - si.feature.x.type = :submit - stream_method = si.feature.x.field('stream-method') - - if stream_method.options.keys.include?(Bytestreams::NS_BYTESTREAMS) and @allow_bytestreams - stream_method.values = [Bytestreams::NS_BYTESTREAMS] - stream_method.options = [] - @stream.send(answer) - - Bytestreams::SOCKS5BytestreamsTarget.new(@stream, oldsi.id, iq.from, iq.to) - elsif stream_method.options.keys.include?(Bytestreams::IBB::NS_IBB) and @allow_ibb - stream_method.values = [Bytestreams::IBB::NS_IBB] - stream_method.options = [] - @stream.send(answer) - - Bytestreams::IBBTarget.new(@stream, oldsi.id, iq.from, iq.to) - else - eanswer = iq.answer(false) - eanswer.type = :error - eanswer.add(Error.new('bad-request')).type = :cancel - eanswer.error.add(REXML::Element.new('no-valid-streams')).add_namespace('http://jabber.org/protocol/si') - @stream.send(eanswer) - - nil - end - end - - ## - # Decline an incoming file-transfer, - # to be used in a block given to add_incoming_callback - # iq:: [Iq] of file-transfer we want to decline - def decline(iq) - answer = iq.answer(false) - answer.type = :error - error = answer.add(Error.new('forbidden', 'Offer declined')) - error.type = :cancel - @stream.send(answer) - end - - ## - # Offer a file to somebody - # - # Will wait for a response from the peer - # - # The result is a stream which you can configure, or nil - # if the peer responded with an invalid stream-method. - # - # May raise an ErrorException - # jid:: [JID] to send the file to - # source:: File-transfer source, implementing the FileSource interface - # desc:: [String] or [nil] Optional file description - # from:: [String] or [nil] Optional jid for components - # result:: [Bytestreams::SOCKS5BytestreamsInitiator] or [Bytestreams::IBBInitiator] or [nil] - def offer(jid, source, desc=nil, from=nil) - from = from || @my_jid || @stream.jid - session_id = Jabber::IdGenerator.instance.generate_id - - offered_methods = {} - if @allow_bytestreams - offered_methods[Bytestreams::NS_BYTESTREAMS] = nil - end - if @allow_ibb - offered_methods[Bytestreams::IBB::NS_IBB] = nil - end - - iq = Iq::new(:set, jid) - iq.from = from - si = iq.add(Bytestreams::IqSi.new(session_id, Bytestreams::PROFILE_FILETRANSFER, source.mime)) - - file = si.add(Bytestreams::IqSiFile.new(source.filename, source.size)) - file.hash = source.md5 - file.date = source.date - file.description = desc if desc - file.add(Bytestreams::IqSiFileRange.new) if source.can_range? - - feature = si.add(REXML::Element.new('feature')) - feature.add_namespace 'http://jabber.org/protocol/feature-neg' - x = feature.add(Dataforms::XData.new(:form)) - stream_method_field = x.add(Dataforms::XDataField.new('stream-method', :list_single)) - stream_method_field.options = offered_methods - - begin - stream_method = nil - response = nil - @stream.send_with_id(iq) { |r| - response = r - si = response.first_element('si') - if response.type == :result and si and si.feature and si.feature.x - stream_method = si.feature.x.field('stream-method').values.first - - if si.file and si.file.range - if source.can_range? - source.seek(si.file.range.offset) if si.file.range.offset - source.length = si.file.range.length if si.file.range.length - else - source.read(si.file.range.offset) - end - end - end - true - } - rescue ErrorException => e - if e.error.code == 403 # Declined - return false - else - raise e - end - end - - if stream_method == Bytestreams::NS_BYTESTREAMS and @allow_bytestreams - Bytestreams::SOCKS5BytestreamsInitiator.new(@stream, session_id, from, jid) - elsif stream_method == Bytestreams::IBB::NS_IBB and @allow_ibb - Bytestreams::IBBInitiator.new(@stream, session_id, from, jid) - else # Target responded with a stream_method we didn't offer - eanswer = response.answer - eanswer.type = :error - eanswer.add Error::new('bad-request') - @stream.send(eanswer) - nil - end - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/base.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/base.rb deleted file mode 100644 index a4c2ab102..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/base.rb +++ /dev/null @@ -1,259 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'base64' - -module Jabber - module Bytestreams - ## - # In-Band Bytestreams (JEP-0047) implementation - # - # Don't use directly, use IBBInitiator and IBBTarget - # - # In-Band Bytestreams should only be used when transferring - # very small amounts of binary data, because it is slow and - # increases server load drastically. - # - # Note that the constructor takes a lot of arguments. In-Band - # Bytestreams do not specify a way to initiate the stream, - # this should be done via Stream Initiation. - class IBB - NS_IBB = 'http://jabber.org/protocol/ibb' - - ## - # Create a new bytestream - # - # Will register a callback to intercept data - # of this stream. This data will be buffered, you can retrieve - # it with receive - def initialize(stream, session_id, my_jid, peer_jid) - @stream = stream - @session_id = session_id - @my_jid = (my_jid.kind_of?(String) ? JID.new(my_jid) : my_jid) - @peer_jid = (peer_jid.kind_of?(String) ? JID.new(peer_jid) : peer_jid) - - @active = false - @seq_send = 0 - @seq_recv = 0 - @queue = [] - @queue_lock = Mutex.new - @pending = Semaphore.new - @sendbuf = '' - @sendbuf_lock = Mutex.new - - @block_size = 4096 # Recommended by JEP0047 - end - - def active? - @active - end - - ## - # Send data - # - # Data is buffered to match block_size in each packet. - # If you need the data to be sent immediately, use - # flush afterwards. - # buf:: [String] - def write(buf) - @sendbuf_lock.synchronize { - @sendbuf += buf - - while @sendbuf.size >= @block_size - send_data(@sendbuf[0..@block_size-1]) - @sendbuf = @sendbuf[@block_size..-1].to_s - end - } - end - - ## - # Empty the send-buffer by sending remaining data - def flush - @sendbuf_lock.synchronize { - while @sendbuf.size > 0 - send_data(@sendbuf[0..@block_size-1]) - @sendbuf = @sendbuf[@block_size..-1].to_s - end - } - end - - ## - # Receive data - # - # Will wait until the Message with the next sequence number - # is in the stanza queue. - def read - if active? - res = nil - - while res.nil? - @queue_lock.synchronize { - @queue.each { |item| - # Find next data - if item.type == :data and item.seq == @seq_recv.to_s - res = item - break - # No data? Find close - elsif item.type == :close and res.nil? - res = item - end - } - - @queue.delete_if { |item| item == res } - } - - # No data? Wait for next to arrive... - @pending.wait unless res - end - - if res.type == :data - @seq_recv += 1 - @seq_recv = 0 if @seq_recv > 65535 - res.data - elsif res.type == :close - deactivate - nil # Closed - end - else - nil - end - end - - ## - # Close the stream - # - # Waits for acknowledge from peer, - # may throw ErrorException - def close - if active? - flush - deactivate - - iq = Iq.new(:set, @peer_jid) - close = iq.add REXML::Element.new('close') - close.add_namespace IBB::NS_IBB - close.attributes['sid'] = @session_id - - @stream.send_with_id(iq) { |answer| - answer.type == :result - } - end - end - - private - - ## - # Send data directly - # data:: [String] - def send_data(databuf) - if active? - msg = Message.new - msg.from = @my_jid - msg.to = @peer_jid - - data = msg.add REXML::Element.new('data') - data.add_namespace NS_IBB - data.attributes['sid'] = @session_id - data.attributes['seq'] = @seq_send.to_s - data.text = Base64::encode64 databuf - - # TODO: Implement AMP correctly - amp = msg.add REXML::Element.new('amp') - amp.add_namespace 'http://jabber.org/protocol/amp' - deliver_at = amp.add REXML::Element.new('rule') - deliver_at.attributes['condition'] = 'deliver-at' - deliver_at.attributes['value'] = 'stored' - deliver_at.attributes['action'] = 'error' - match_resource = amp.add REXML::Element.new('rule') - match_resource.attributes['condition'] = 'match-resource' - match_resource.attributes['value'] = 'exact' - match_resource.attributes['action'] = 'error' - - @stream.send(msg) - - @seq_send += 1 - @seq_send = 0 if @seq_send > 65535 - else - raise 'Attempt to send data when not activated' - end - end - - def activate - unless active? - @stream.add_message_callback(200, self) { |msg| - data = msg.first_element('data') - if msg.from == @peer_jid and msg.to == @my_jid and data and data.attributes['sid'] == @session_id - if msg.type == nil - @queue_lock.synchronize { - @queue.push IBBQueueItem.new(:data, data.attributes['seq'], data.text.to_s) - @pending.run - } - elsif msg.type == :error - @queue_lock.synchronize { - @queue << IBBQueueItem.new(:close) - @pending.run - } - end - true - else - false - end - } - - @stream.add_iq_callback(200, self) { |iq| - close = iq.first_element('close') - if iq.type == :set and close and close.attributes['sid'] == @session_id - answer = iq.answer(false) - answer.type = :result - @stream.send(answer) - - @queue_lock.synchronize { - @queue << IBBQueueItem.new(:close) - @pending.run - } - true - else - false - end - } - - @active = true - end - end - - def deactivate - if active? - @stream.delete_message_callback(self) - @stream.delete_iq_callback(self) - - @active = false - end - end - end - - ## - # Represents an item in the internal data queue - class IBBQueueItem - attr_reader :type, :seq - def initialize(type, seq=nil, data_text='') - unless [:data, :close].include? type - raise "Unknown IBBQueueItem type: #{type}" - end - - @type = type - @seq = seq - @data = data_text - end - - ## - # Return the Base64-*decoded* data - # - # There's no need to catch Exceptions here, - # as none are thrown. - def data - Base64::decode64(@data) - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb deleted file mode 100644 index 462d121a6..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/initiator.rb +++ /dev/null @@ -1,34 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - ## - # Implementation of IBB at the initiator side - class IBBInitiator < IBB - # You may set the block-size before open - attr_accessor :block_size - - ## - # Open the stream to the peer, - # waits for successful result - # - # May throw ErrorException - def open - iq = Iq.new(:set, @peer_jid) - open = iq.add REXML::Element.new('open') - open.add_namespace IBB::NS_IBB - open.attributes['sid'] = @session_id - open.attributes['block-size'] = @block_size - - @stream.send_with_id(iq) { |answer| - answer.type == :result - } - - activate - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/target.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/target.rb deleted file mode 100644 index 1375898a0..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/ibb/target.rb +++ /dev/null @@ -1,48 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - ## - # Implementation of IBB at the target side - class IBBTarget < IBB - # You may read the block-size after accept - attr_reader :block_size - - def initialize(stream, session_id, initiator_jid, target_jid) - # Target and Initiator are swapped here, because we're the target - super(stream, session_id, target_jid, initiator_jid) - end - - ## - # Wait for the initiator side to start - # the stream. - def accept - connect_sem = Semaphore.new - - @stream.add_iq_callback(200, self) { |iq| - open = iq.first_element('open') - if iq.type == :set and iq.from == @peer_jid and iq.to == @my_jid and open and open.attributes['sid'] == @session_id - @stream.delete_iq_callback(self) - activate - @block_size = (open.attributes['block-size'] || 4096).to_i - - reply = iq.answer(false) - reply.type = :result - @stream.send(reply) - - connect_sem.run - true - else - false - end - } - - connect_sem.wait - true - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb deleted file mode 100644 index 085e75ad4..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/base.rb +++ /dev/null @@ -1,155 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'socket' -require 'thread' -require 'timeout' -require 'digest/sha1' - -require 'xmpp4r/callbacks' - -module Jabber - module Bytestreams - ## - # SOCKS5 Bytestreams (JEP-0065) implementation - # - # Don't use directly, use SOCKS5BytestreamsInitiator - # and SOCKS5BytestreamsTarget - class SOCKS5Bytestreams - ## - # [StreamHost] the SOCKS connection is using - attr_reader :streamhost_used - - ## - # SOCKS connection timeout (for trying multiple streamhosts) - # - # default: nil, use the OS' default timeout - attr_accessor :connect_timeout - - def initialize(stream, session_id, initiator_jid, target_jid) - @stream = stream - @session_id = session_id - @initiator_jid = (initiator_jid.kind_of?(String) ? JID.new(initiator_jid) : initiator_jid) - @target_jid = (target_jid.kind_of?(String) ? JID.new(target_jid) : target_jid) - @socks = nil - @connect_timeout = nil - @streamhost_used = nil - @streamhost_cbs = CallbackList.new - end - - ## - # Add a callback that will be called when there is action regarding - # SOCKS stream-hosts - # - # Usage of this callback is optional and serves informational purposes only. - # - # block takes three arguments: - # * The StreamHost instance that is currently being tried - # * State information (is either :connecting, :authenticating, :success or :failure) - # * The exception value for the state :failure, else nil - def add_streamhost_callback(priority = 0, ref = nil, &block) - @streamhost_cbs.add(priority, ref, block) - end - - ## - # Receive from the stream-host - # length:: [Fixnum] Amount of bytes (Will be passed to TCPSocket#read for the underlying SOCKS5 connection) - # result:: [String] (or [nil] if finished) - def read(length=nil) - @socks.read(length) - end - - ## - # Flush the SOCKS5 socket - def flush - @socks.flush - end - - ## - # Send to the stream-host - # buf:: [String] Data - # result:: [Fixnum] Amount of bytes sent - def write(buf) - @socks.write(buf) - # FIXME: On FreeBSD this throws Errno::EPERM after it has already written a few - # kilobytes, and when there are multiple sockets. ktrace told, that this originates - # from the syscall, not ruby. - end - - ## - # Close the stream-host connection - def close - @socks.close - end - - ## - # Query a JID for its stream-host information - # - # SOCKS5BytestreamsInitiator#add_streamhost can do this for you. - # Use this method if you plan to do multiple transfers, so - # you can cache the result. - # stream:: [Stream] to operate on - # streamhost:: [JID] of the proxy - # my_jid:: [JID] Optional sender JID for Component operation - def self.query_streamhost(stream, streamhost, my_jid=nil) - res = nil - - iq = Iq::new(:get, streamhost) - iq.from = my_jid - iq.add(IqQueryBytestreams.new) - stream.send_with_id(iq) { |reply| - if reply.type == :result - reply.query.each_element { |e| - if e.kind_of?(StreamHost) - e.jid = reply.from # Help misconfigured proxys - res = e - end - } - end - true - } - - if res and res.jid and res.host and res.port - res - else - nil - end - end - - private - - ## - # The address the stream-host expects from us. - # According to JEP-0096 this is the SHA1 hash - # of the concatenation of session_id, - # initiator_jid and target_jid. - # result:: [String] SHA1 hash - def stream_address - Digest::SHA1.hexdigest("#{@session_id}#{@initiator_jid}#{@target_jid}") - end - - ## - # Try a streamhost - # result:: [SOCKS5Socket] - def connect_socks(streamhost) - Timeout::timeout(@connect_timeout, Errno::ETIMEDOUT) { - Jabber::debuglog("SOCKS5 Bytestreams: connecting to proxy #{streamhost.jid} (#{streamhost.host}:#{streamhost.port})") - @streamhost_cbs.process(streamhost, :connecting, nil) - socks = SOCKS5Socket.new(streamhost.host, streamhost.port) - - Jabber::debuglog("SOCKS5 Bytestreams: connected, authenticating") - @streamhost_cbs.process(streamhost, :authenticating, nil) - socks.auth - - socks.connect_domain(stream_address, 0) - - Jabber::debuglog("SOCKS5 Bytestreams: connected") - @streamhost_cbs.process(streamhost, :success, nil) - - socks - } - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb deleted file mode 100644 index 712ea5e58..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/initiator.rb +++ /dev/null @@ -1,89 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - ## - # SOCKS5Bytestreams implementation for the initiator side - class SOCKS5BytestreamsInitiator < SOCKS5Bytestreams - attr_reader :streamhosts - - def initialize(stream, session_id, initiator_jid, target_jid) - super - @streamhosts = [] - end - - ## - # Add a streamhost which will be offered to the target - # - # streamhost:: can be: - # * [StreamHost] if already got all information (host/port) - # * [SOCKS5BytestreamsServer] if this is the local streamhost - # * [String] or [JID] if information should be automatically resolved by SOCKS5Bytestreams::query_streamhost - def add_streamhost(streamhost) - if streamhost.kind_of?(StreamHost) - @streamhosts << streamhost - elsif streamhost.kind_of?(SOCKS5BytestreamsServer) - streamhost.each_streamhost(@initiator_jid) { |sh| - @streamhosts << sh - } - elsif streamhost.kind_of?(String) or streamhost.kind_of?(JID) - @streamhosts << SOCKS5Bytestreams::query_streamhost(@stream, streamhost, @initiator_jid) - else - raise "Unknwon streamhost type: #{streamhost.class}" - end - end - - ## - # Send the configured streamhosts to the target, - # wait for an answer and - # connect to the host the target chose. - def open - iq1 = Iq::new(:set, @target_jid) - iq1.from = @initiator_jid - bs = iq1.add IqQueryBytestreams.new(@session_id) - @streamhosts.each { |se| - bs.add(se) - } - - peer_used = nil - @stream.send_with_id(iq1) { |response| - if response.type == :result and response.query.kind_of?(IqQueryBytestreams) - peer_used = response.query.streamhost_used - raise "No streamhost-used" unless peer_used - raise "Invalid streamhost-used" unless peer_used.jid - end - true - } - - @streamhost_used = nil - @streamhosts.each { |sh| - if peer_used.jid == sh.jid - @streamhost_used = sh - break - end - } - if @streamhost_used.jid == @initiator_jid - # This is our own JID, so the target chose SOCKS5BytestreamsServer - @socks = @streamhost_used.server.peer_sock(stream_address) - raise "Target didn't connect" unless @socks - @streamhost_cbs.process(@streamhost_used, :success, nil) - else - begin - @socks = connect_socks(@streamhost_used) - rescue Exception => e - Jabber::debuglog("SOCKS5 Bytestreams: #{e.class}: #{e}\n#{e.backtrace.join("\n")}") - @streamhost_cbs.process(@streamhost_used, :failure, e) - raise e - end - iq2 = Iq::new(:set, @streamhost_used.jid) - iq2.add(IqQueryBytestreams.new(@session_id)).activate = @target_jid.to_s - @stream.send_with_id(iq2) { |reply| - reply.type == :result - } - end - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb deleted file mode 100644 index 4e6515d37..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/server.rb +++ /dev/null @@ -1,194 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - ## - # The SOCKS5BytestreamsServer is an implementation of a SOCKS5 server. - # - # You can use it if you're reachable by your SOCKS5Bytestreams peers, - # thus avoiding use of an external proxy. - # - # ==Usage: - # * Instantiate with an unfirewalled port - # * Add your external IP addresses with SOCKS5BytestreamsServer#add_address - # * Once you've got an *outgoing* SOCKS5BytestreamsInitiator, do - # SOCKS5BytestreamsInitiator#add_streamhost(my_socks5bytestreamsserver) - # *before* you do SOCKS5BytestreamsInitiator#open - class SOCKS5BytestreamsServer - ## - # Start a local SOCKS5BytestreamsServer - # - # Will start to listen on the given TCP port and - # accept new peers - # port:: [Fixnum] TCP port to listen on - # listen_on:: [String] Optional address for the server socket to listen on (i.e. '0.0.0.0' or '::') - def initialize(port, listen_on=nil) - @port = port - @addresses = [] - @peers = [] - @peers_lock = Mutex.new - if listen_on - socket = TCPServer.new(listen_on, port) - else - socket = TCPServer.new(port) - end - - Thread.new do - Thread.current.abort_on_exception = true - loop do - peer = SOCKS5BytestreamsPeer.new(socket.accept) - Thread.new do - Thread.current.abort_on_exception = true - begin - peer.start - rescue - Jabber::debuglog("SOCKS5 BytestreamsServer: Error accepting peer: #{$!}") - end - end - @peers_lock.synchronize do - @peers << peer - end - end - end - end - - ## - # Find the socket a peer is associated to - # - # This method also performs some housekeeping, ie. removing - # peers with closed sockets. - # addr:: [String] Address like SOCKS5Bytestreams#stream_address - # result:: [TCPSocker] or [nil] - def peer_sock(addr) - res = nil - @peers_lock.synchronize { - removes = [] - - @peers.each { |peer| - if peer.socket and peer.socket.closed? - # Queue peers with closed socket for removal - removes << peer - elsif peer.address == addr and res.nil? - res = peer.socket - end - - # If we sent multiple addresses of our own, clients may - # connect multiple times. DO NOT close any other connections - # here. These may belong to other concurrent bytestreams, - # believe that the peer will close any unneeded sockets - # which will then be picked up by the next call to peer_sock. - } - - # If we sent multiple addresses of our own, clients may - # connect multiple times. Close these connections here. - @peers.delete_if { |peer| - if removes.include? peer - peer.socket.close rescue IOError - true - else - false - end - } - } - - res - end - - ## - # Add an external IP address - # - # This is a must-have, as SOCKS5BytestreamsInitiator must inform - # the target where to connect - def add_address(address) - @addresses << address - end - - ## - # Iterate through all configured addresses, - # yielding SOCKS5BytestreamsServerStreamHost - # instances, which should be passed to - # SOCKS5BytestreamsInitiator#add_streamhost - # - # This will be automatically invoked if you pass an instance - # of SOCKS5BytestreamsServer to - # SOCKS5BytestreamsInitiator#add_streamhost - # my_jid:: [JID] My Jabber-ID - def each_streamhost(my_jid, &block) - @addresses.each { |address| - yield SOCKS5BytestreamsServerStreamHost.new(self, my_jid, address, @port) - } - end - end - - ## - # A subclass of StreamHost which possesses a - # server attribute, to let SOCKS5BytestreamsInitiator - # know this is the local SOCKS5BytestreamsServer - class SOCKS5BytestreamsServerStreamHost < StreamHost - attr_reader :server - def initialize(server, jid=nil, host=nil, port=nil) - super(jid, host, port) - @server = server - end - end - - ## - # This class will be instantiated by SOCKS5BytestreamsServer - # upon accepting a new connection - class SOCKS5BytestreamsPeer - attr_reader :address, :socket - - ## - # Initialize a new peer - # socket:: [TCPSocket] - def initialize(socket) - @socket = socket - Jabber::debuglog("SOCKS5 BytestreamsServer: accepted peer #{@socket.peeraddr[2]}:#{@socket.peeraddr[1]}") - end - - ## - # Start handshake process - def start - auth_ver = @socket.getc - if auth_ver != 5 - # Unsupported version - @socket.close - return - end - - auth_nmethods = @socket.getc - auth_methods = @socket.read(auth_nmethods) - unless auth_methods.index("\x00") - # Client won't accept no authentication - @socket.write("\x05\xff") - @socket.close - return - end - @socket.write("\x05\x00") - Jabber::debuglog("SOCKS5 BytestreamsServer: peer #{@socket.peeraddr[2]}:#{@socket.peeraddr[1]} authenticated") - - req = @socket.read(4) - if req != "\x05\x01\x00\x03" - # Unknown version, command, reserved, address-type - @socket.close - return - end - req_addrlen = @socket.getc - req_addr = @socket.read(req_addrlen) - req_port = @socket.read(2) - if req_port != "\x00\x00" - # Port is not 0 - @socket.write("\x05\x01") - @socket.close - return - end - @socket.write("\x05\x00\x00\x03#{req_addrlen.chr}#{req_addr}\x00\x00") - Jabber::debuglog("SOCKS5 BytestreamsServer: peer #{@socket.peeraddr[2]}:#{@socket.peeraddr[1]} connected for #{req_addr}") - - @address = req_addr - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb deleted file mode 100644 index a201ac424..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/socks5.rb +++ /dev/null @@ -1,60 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'socket' - -module Jabber - module Bytestreams - ## - # Can be thrown upon communication error with - # a SOCKS5 proxy - class SOCKS5Error < RuntimeError; end - - ## - # A SOCKS5 client implementation - # - # ==Usage: - # * Initialize with proxy's address and port - # * Authenticate - # * Connect to target host - class SOCKS5Socket < TCPSocket - ## - # Connect to SOCKS5 proxy - def initialize(socks_host, socks_port) - super(socks_host, socks_port) - end - - ## - # Authenticate for SOCKS5 proxy - # - # Currently supports only 'no authentication required' - def auth - write("\x05\x01\x00") - buf = read(2) - if buf.nil? or buf != "\x05\x00" - close - raise SOCKS5Error.new("Invalid SOCKS5 authentication: #{buf.inspect}") - end - - self - end - - ## - # Issue a CONNECT request to a host name - # which is to be resolved by the proxy. - # domain:: [String] Host name - # port:: [Fixnum] Port number - def connect_domain(domain, port) - write("\x05\x01\x00\x03#{domain.size.chr}#{domain}#{[port].pack("n")}") - buf = read(7 + domain.size) - if buf.nil? or buf[0..1] != "\005\000" - close - raise SOCKS5Error.new("Invalid SOCKS5 connect: #{buf.inspect}") - end - - self - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb deleted file mode 100644 index ee57737e4..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/helper/socks5bytestreams/target.rb +++ /dev/null @@ -1,63 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - ## - # SOCKS5 Bytestreams implementation of the target site - class SOCKS5BytestreamsTarget < SOCKS5Bytestreams - ## - # Wait until the stream has been established - # - # May raise various exceptions - def accept - error = nil - connect_sem = Semaphore.new - - @stream.add_iq_callback(200, self) { |iq| - if iq.type == :set and iq.from == @initiator_jid and iq.to == @target_jid and iq.query.kind_of?(IqQueryBytestreams) - begin - @stream.delete_iq_callback(self) - - iq.query.each_element('streamhost') { |streamhost| - if streamhost.host and streamhost.port and not @socks - begin - @socks = connect_socks(streamhost) - @streamhost_used = streamhost - rescue Exception => e - Jabber::debuglog("SOCKS5 Bytestreams: #{e.class}: #{e}\n#{e.backtrace.join("\n")}") - @streamhost_cbs.process(streamhost, :failure, e) - end - end - } - - reply = iq.answer(false) - if @streamhost_used - reply.type = :result - reply.add(IqQueryBytestreams.new) - reply.query.add(StreamHostUsed.new(@streamhost_used.jid)) - else - reply.type = :error - reply.add(Error.new('item-not-found')) - end - @stream.send(reply) - rescue Exception => e - error = e - end - - connect_sem.run - true - else - false - end - } - - connect_sem.wait - raise error if error - (@socks != nil) - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/bytestreams.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/bytestreams.rb deleted file mode 100755 index 3a0df8f93..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/bytestreams.rb +++ /dev/null @@ -1,171 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module Bytestreams - NS_BYTESTREAMS = 'http://jabber.org/protocol/bytestreams' - - ## - # Class for accessing elements with - # xmlns='http://jabber.org/protocol/bytestreams' - # in stanzas. - class IqQueryBytestreams < IqQuery - name_xmlns 'query', NS_BYTESTREAMS - - ## - # Initialize such a - # sid:: [String] Session-ID - # mode:: [Symbol] :tcp or :udp - def initialize(sid=nil, mode=nil) - super() - self.sid = sid - self.mode = mode - end - - ## - # Session-ID - def sid - attributes['sid'] - end - - ## - # Set Session-ID - def sid=(s) - attributes['sid'] = s - end - - ## - # Transfer mode - # result:: :tcp or :udp - def mode - case attributes['mode'] - when 'udp' then :udp - else :tcp - end - end - - ## - # Set the transfer mode - # m:: :tcp or :udp - def mode=(m) - case m - when :udp then attributes['mode'] = 'udp' - else attributes['mode'] = 'tcp' - end - end - - ## - # Get the child - # result:: [StreamHostUsed] - def streamhost_used - first_element('streamhost-used') - end - - ## - # Get the text of the child - # result:: [JID] or [nil] - def activate - j = first_element_text('activate') - j ? JID.new(j) : nil - end - - ## - # Set the text of the child - # s:: [JID] - def activate=(s) - replace_element_text('activate', s ? s.to_s : nil) - end - end - - - ## - # element, normally appear - # as children of IqQueryBytestreams - class StreamHost < XMPPElement - name_xmlns 'streamhost', NS_BYTESTREAMS - - ## - # Initialize a element - # jid:: [JID] - # host:: [String] Hostname or IP address - # port:: [Fixnum] Port number - def initialize(jid=nil, host=nil, port=nil) - super() - self.jid = jid - self.host = host - self.port = port - end - - ## - # Get the JID of the streamhost - def jid - (a = attributes['jid']) ? JID.new(a) : nil - end - - ## - # Set the JID of the streamhost - def jid=(j) - attributes['jid'] = (j ? j.to_s : nil) - end - - ## - # Get the host address of the streamhost - def host - attributes['host'] - end - - ## - # Set the host address of the streamhost - def host=(h) - attributes['host'] = h - end - - ## - # Get the zeroconf attribute of the streamhost - def zeroconf - attributes['zeroconf'] - end - - ## - # Set the zeroconf attribute of the streamhost - def zeroconf=(s) - attributes['zeroconf'] = s - end - - ## - # Get the port number of the streamhost - def port - p = attributes['port'].to_i - (p == 0 ? nil : p) - end - - ## - # Set the port number of the streamhost - def port=(p) - attributes['port'] = p.to_s - end - end - - ## - # element, normally appears - # as child of IqQueryBytestreams - class StreamHostUsed < XMPPElement - name_xmlns 'streamhost-used', NS_BYTESTREAMS - - def initialize(jid=nil) - super() - self.jid = jid - end - - def jid - (a = attributes['jid']) ? JID.new(a) : nil - end - - def jid=(j) - attributes['jid'] = (j ? j.to_s : nil) - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/si.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/si.rb deleted file mode 100644 index 0732f7454..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/bytestreams/iq/si.rb +++ /dev/null @@ -1,206 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'time' # For Time#xmlschema - -require 'xmpp4r/feature_negotiation/iq/feature' - -module Jabber - module Bytestreams - PROFILE_FILETRANSFER = 'http://jabber.org/protocol/si/profile/file-transfer' - - ## - # Iq child 'si' for Stream-Initiation - class IqSi < XMPPElement - name_xmlns 'si', 'http://jabber.org/protocol/si' - force_xmlns true - - def initialize(id=nil, profile=nil, mime_type=nil) - super() - - self.id = id - self.profile = profile - self.mime_type = mime_type - end - - ## - # Session ID of this stream - def id - attributes['id'] - end - - ## - # Set Session ID of this stream - def id=(s) - attributes['id'] = s - end - - ## - # MIME type of this stream - def mime_type - attributes['mime-type'] - end - - ## - # Set MIME type of this stream - def mime_type=(s) - attributes['mime-type'] = s - end - - ## - # Stream profile, can indicate file-transfer - def profile - attributes['profile'] - end - - ## - # Set stream profile - def profile=(s) - attributes['profile'] = s - end - - ## - # child - # result:: [IqSiFile] - def file - first_element('file') - end - - ## - # child - # result:: [IqFeature] - def feature - first_element('feature') - end - end - - - ## - # File-transfer meta-information, - # may appear as in IqSi - class IqSiFile < XMPPElement - name_xmlns 'file', PROFILE_FILETRANSFER - - def initialize(fname=nil, size=nil) - super() - self.fname = fname - self.size = size - end - - ## - # Get filename (attribute 'name') - def fname - attributes['name'] - end - - ## - # Set filename (attribute 'name') - def fname=(s) - attributes['name'] = s - end - - ## - # Get MD5 hash - def hash - attributes['hash'] - end - - ## - # Set MD5 hash - def hash=(s) - attributes['hash'] = s - end - - ## - # Get file date - # result:: [Time] or nil - def date - begin - Time.xmlschema(attributes['date']) - rescue ArgumentError - nil - end - end - - ## - # Set file date - # d:: [Time] or nil - def date=(d) - attributes['date'] = (d ? d.xmlschema : nil) - end - - ## - # File size in bytes - # result:: [Fixnum] - def size - (attributes['size'] =~ /^\d+$/) ? attributes['size'].to_i : nil - end - - ## - # Set file size - def size=(s) - attributes['size'] = s ? s.to_s : nil - end - - ## - # File description - def description - first_element_text('desc') - end - - ## - # Set file description - def description=(s) - replace_element_text('desc', s) - end - - ## - # child - # - # A file-transfer offer may contain this with - # no attributes set, indicating the ability to - # do ranged transfers. - # result:: [IqSiFileRange] - def range - first_element('range') - end - end - - ## - # Information for ranged transfers - class IqSiFileRange < XMPPElement - name_xmlns 'range', PROFILE_FILETRANSFER - def initialize(offset=nil, length=nil) - super() - - self.offset = offset - self.length = length - end - - ## - # File offset (for continuing an interrupted transfer) - def offset - (attributes['offset'] =~ /^\d+$/) ? attributes['offset'].to_i : nil - end - - ## - # Set file offset - def offset=(o) - attributes['offset'] = (o ? o.to_s : nil) - end - - ## - # File length (if not to transfer whole file) - def length - (attributes['length'] =~ /^\d+$/) ? attributes['length'].to_i : nil - end - - ## - # Set file length - def length=(o) - attributes['length'] = (o ? o.to_s : nil) - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/callbacks.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/callbacks.rb deleted file mode 100644 index 919e561a0..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/callbacks.rb +++ /dev/null @@ -1,124 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # This class manages a list of callbacks. - # - # ==Callbacks management and priority - # - # Callbacks are managed by the class CallbackList. When they are added, a - # priority (just a number or anything Comparable with other priorities) is - # specified. The biggest the priority is, the earliest the callback will be - # considered. - # - # Callbacks are processed for a given set of objects as long as they return - # false. If you want to stop processing, you must return true. Example : - # cbl = CallbackList::new - # c1 = false - # c2 = false - # c3 = false - # cbl.add(10) { c1 = true; 1 } - # cbl.add(5) { c2 = true; true } - # cbl.add(0) { c3 = true } - # cbl.process('aa') - # puts "#{c1} #{c2} #{c3}" - # This example would display "true true false" as callbacks processing was - # stopped after the second callback returned true. - # - # In XMPP4R, callbacks' priorities are quite normalized since we want to be - # able to "cascade" callbacks in a clean way. Here are values your code should - # take into account : - # - # >= 200:: logging & debugging callbacks. Those callbacks should not consume - # elements. - # 100-199:: Where Helpers register their callbacks. The normal value is 100, - # and Helpers shouldn't register something else unless there's a - # very good reason to. - # < 100:: all those numbers are normally available for your application. - # That's enough, don't you think ? - class CallbackList - - # Create a new list of callbacks - def initialize - @list = [] - end - - ## - # Add a callback to the list - # - # List will be sorted afterwards - # - # prio:: [Integer] the callback's priority, the higher, the sooner. - # ref:: [String] the callback's reference - # block:: [Block] a block to execute - # return:: [Jabber::CallbackList] The list, for chaining - def add(prio = 0, ref = nil, proc = nil, &block) - block = proc if proc - @list.push(Callback::new(prio, ref, block)) - @list.sort! { |a, b| b.priority <=> a.priority } - self - end - - ## - # Delete a callback by reference - # ref:: [String] the reference of the callback to delete - # return:: [CallBackList] The list, for chaining - def delete(ref) - @list.delete_if { |item| item.ref == ref } - self - end - - ## - # Number of elements in the list - # return:: [Integer] The number of elements - def length - @list.length - end - - ## - # Process an element through all my callbacks. returns e.consumed? - # e:: [Object] The elements to pass to the callback. You can pass - # several, but of course, you block must know how to handle them. - # return:: [Boolean] true if the element has been consumed - def process(*e) - # If somebody adds a new callback the list will get modified - # and sorted(!) while still iterating through it. So we use a - # local copy of @list. Any freshly added callback will receive - # the next stanzas, not the current. - list = @list.dup - - # process through callbacks - list.each do |item| - return true if item.block.call(*e) == true - end - false - end - end - - # This class is used to store callbacks inside CallbackList. See the - # CallbackList class for more detailed explanations. - class Callback - - # The Callback's priority - attr_reader :priority - - # The Callback's reference, using for deleting purposes - attr_reader :ref - - # The Callback's block to execute - attr_reader :block - - ## - # Create a new callback - # priority:: [Integer] the callback's priority. The higher, the sooner it - # will be executed - # ref:: [String] The callback's reference - def initialize(priority = 0, ref = nil, block = Proc::new {}) - @priority = priority - @ref = ref - @block = block - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/client.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/client.rb deleted file mode 100644 index 45a8c4220..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/client.rb +++ /dev/null @@ -1,246 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'resolv' - -require 'xmpp4r/connection' -require 'xmpp4r/authenticationfailure' -require 'xmpp4r/sasl' - -module Jabber - - # The client class provides everything needed to build a basic XMPP - # Client. - # - # If you want your connection to survive disconnects and timeouts, - # catch exception in Stream#on_exception and re-call Client#connect - # and Client#auth. Don't forget to re-send initial Presence and - # everything else you need to setup your session. - class Client < Connection - - # The client's JID - attr_reader :jid - - ## - # Create a new Client. - # - # Remember to *always* put a resource in your JID unless the server can do SASL. - def initialize(jid, threaded = true) - super(threaded) - @jid = (jid.kind_of?(JID) ? jid : JID.new(jid.to_s)) - end - - ## - # connect to the server - # (chaining-friendly) - # - # If you omit the optional host argument SRV records for your jid will - # be resolved. If none works, fallback is connecting to the domain part - # of the jid. - # host:: [String] Optional c2s host, will be extracted from jid if nil - # return:: self - def connect(host = nil, port = 5222) - if host.nil? - begin - srv = [] - Resolv::DNS.open { |dns| - # If ruby version is too old and SRV is unknown, this will raise a NameError - # which is catched below - Jabber::debuglog("RESOLVING:\n_xmpp-client._tcp.#{@jid.domain} (SRV)") - srv = dns.getresources("_xmpp-client._tcp.#{@jid.domain}", Resolv::DNS::Resource::IN::SRV) - } - # Sort SRV records: lowest priority first, highest weight first - srv.sort! { |a,b| (a.priority != b.priority) ? (a.priority <=> b.priority) : (b.weight <=> a.weight) } - - srv.each { |record| - begin - connect(record.target.to_s, record.port) - # Success - return self - rescue SocketError - # Try next SRV record - end - } - rescue NameError - $stderr.puts "Resolv::DNS does not support SRV records. Please upgrade to ruby-1.8.3 or later!" - end - # Fallback to normal connect method - end - - super(host.nil? ? jid.domain : host, port) - self - end - - ## - # Close the connection, - # sends tag first - def close - send("") - super - end - - ## - # Start the stream-parser and send the client-specific stream opening element - def start - super - send(generate_stream_start(@jid.domain)) { |e| - if e.name == 'stream' - true - else - false - end - } - end - - ## - # Authenticate with the server - # - # Throws AuthenticationFailure - # - # Authentication mechanisms are used in the following preference: - # * SASL DIGEST-MD5 - # * SASL PLAIN - # * Non-SASL digest - # password:: [String] - def auth(password) - begin - if @stream_mechanisms.include? 'DIGEST-MD5' - auth_sasl SASL.new(self, 'DIGEST-MD5'), password - elsif @stream_mechanisms.include? 'PLAIN' - auth_sasl SASL.new(self, 'PLAIN'), password - else - auth_nonsasl(password) - end - rescue - Jabber::debuglog("#{$!.class}: #{$!}\n#{$!.backtrace.join("\n")}") - raise AuthenticationFailure.new, $!.to_s - end - end - - ## - # Use a SASL authentication mechanism and bind to a resource - # - # If there was no resource given in the jid, the jid/resource - # generated by the server will be accepted. - # - # This method should not be used directly. Instead, Client#auth - # may look for the best mechanism suitable. - # sasl:: Descendant of [Jabber::SASL::Base] - # password:: [String] - def auth_sasl(sasl, password) - sasl.auth(password) - - # Restart stream after SASL auth - stop - start - # And wait for features - again - @features_sem.wait - - # Resource binding (RFC3920 - 7) - if @stream_features.has_key? 'bind' - iq = Iq.new(:set) - bind = iq.add REXML::Element.new('bind') - bind.add_namespace @stream_features['bind'] - if jid.resource - resource = bind.add REXML::Element.new('resource') - resource.text = jid.resource - end - - send_with_id(iq) { |reply| - reported_jid = reply.first_element('jid') - if reply.type == :result and reported_jid and reported_jid.text - @jid = JID.new(reported_jid.text) - end - - true - } - end - - # Session starting - if @stream_features.has_key? 'session' - iq = Iq.new(:set) - session = iq.add REXML::Element.new('session') - session.add_namespace @stream_features['session'] - - send_with_id(iq) { true } - end - end - - ## - # Send auth with given password and wait for result - # (non-SASL) - # - # Throws ErrorException - # password:: [String] the password - # digest:: [Boolean] use Digest authentication - def auth_nonsasl(password, digest=true) - authset = nil - if digest - authset = Iq::new_authset_digest(@jid, @streamid.to_s, password) - else - authset = Iq::new_authset(@jid, password) - end - send_with_id(authset) do |r| - true - end - $defout.flush - - true - end - - ## - # Register a new user account - # (may be used instead of Client#auth) - # - # This method may raise ErrorException if the registration was - # not successful. - def register(password) - reg = Iq.new_register(jid.node, password) - reg.to = jid.domain - send_with_id(reg) { |answer| - true - } - end - - ## - # Remove the registration of a user account - # - # *WARNING:* this deletes your roster and everything else - # stored on the server! - def remove_registration - reg = Iq.new_register - reg.to = jid.domain - reg.query.add(REXML::Element.new('remove')) - send_with_id(reg) { |answer| - p answer.to_s - true - } - end - - ## - # Change the client's password - # - # Threading is suggested, as this code waits - # for an answer. - # - # Raises an exception upon error response (ErrorException from - # Stream#send_with_id). - # new_password:: [String] New password - def password=(new_password) - iq = Iq::new_query(:set, @jid.domain) - iq.query.add_namespace('jabber:iq:register') - iq.query.add(REXML::Element.new('username')).text = @jid.node - iq.query.add(REXML::Element.new('password')).text = new_password - - err = nil - send_with_id(iq) { |answer| - if answer.type == :result - true - else - false - end - } - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/helper/responder.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/helper/responder.rb deleted file mode 100644 index a8da46628..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/helper/responder.rb +++ /dev/null @@ -1,53 +0,0 @@ -module Jabber - - module Command - - ## - # The Responder Helper handles the low-level stuff of the - # Ad-hoc commands (JEP 0050). - class Responder - - ## - # Initialize a Responder - def initialize(stream) - @stream = stream - @commandsdiscocbs = CallbackList.new - @commandexeccbs = CallbackList.new - - stream.add_iq_callback(180, self) { |iq| - iq_callback(iq) - } - end - - ## - # Add a callback for stanzas asking for the list - # of ad-hoc commands - def add_commands_disco_callback(priority = 0, ref = nil, &block) - @commandsdiscocbs.add(priority, ref, block) - end - - ## - # Add a callback for stanzas asking for the execution - # of an ad-hoc command - def add_commands_exec_callback(priority = 0, ref = nil, &block) - @commandexeccbs.add(priority, ref, block) - end - - ## - # Handles stanzas and execute callbacks - def iq_callback(iq) - if iq.type == :get - if iq.query.kind_of?(Jabber::Discovery::IqQueryDiscoItems) && - iq.query.node == "http://jabber.org/protocol/commands" - @commandsdiscocbs.process(iq) - end - elsif iq.type == :set && iq.command - @commandexeccbs.process(iq) - end - end - - end - - end - -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/iq/command.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/iq/command.rb deleted file mode 100644 index 363a82be4..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/command/iq/command.rb +++ /dev/null @@ -1,154 +0,0 @@ -require 'xmpp4r/iq' - -module Jabber - - module Command - - ## - # Class for handling ad-hoc commands - # (JEP 0050) - # - # A command is uniquely identified by its node attribute. - class IqCommand < Iq - name_xmlns 'command', 'http://jabber.org/protocol/commands' - - def initialize(node=nil, action=nil) - super() - set_node(node) - set_action(action) - end - - ## - # Get the node of the Command stanza - # result:: [String] or nil - def node - attributes['node'] - end - - ## - # Set the node of the Command stanza - # v:: [String] or nil - def node=(v) - attributes['node'] = v - end - - ## - # Set the node of the Command stanza (chaining-friendly) - # v:: [String] or nil - def set_node(v) - self.node = v - self - end - - ## - # Get the sessionid of the Command stanza - # result:: [String] or nil - def sessionid - attributes['sessionid'] - end - - ## - # Set the sessionid of the Command stanza - # v:: [String] or nil - def sessionid=(v) - attributes['sessionid'] = v - end - - ## - # Set the sessionid of the Command stanza (chaining-friendly) - # v:: [String] or nil - def set_sessionid(v) - self.sessionid = v - self - end - - ## - # Get the action of the Command stanza - # - # The following Symbols are allowed: - # * :execute - # * :cancel - # * :prev - # * :next - # * :complete - # return:: [Symbol] or nil - def action - case attributes['action'] - when 'execute' then :execute - when 'cancel' then :cancel - when 'prev' then :prev - when 'next' then :next - when 'complete' then :complete - else nil - end - end - - ## - # Set the action of the Command stanza (see IqCommand#action for details) - # v:: [Symbol] or nil - def action=(v) - attributes['action'] = case v - when :execute then 'execute' - when :cancel then 'cancel' - when :prev then 'prev' - when :next then 'next' - when :complete then 'complete' - else nil - end - end - - ## - # Set the action of the Command stanza (chaining-friendly) - # v:: [Symbol] or nil - def set_action(v) - self.action = v - self - end - - ## - # Get the status of the Command stanza - # - # The following Symbols are allowed: - # * :executing - # * :completed - # * :canceled - # return:: [Symbol] or nil - def status - case attributes['status'] - when 'executing' then :executing - when 'completed' then :completed - when 'canceled' then :canceled - else nil - end - end - - ## - # Set the status of the Command stanza (see IqCommand#status for details) - # v:: [Symbol] or nil - def status=(v) - attributes['status'] = case v - when :executing then 'executing' - when :completed then 'completed' - when :canceled then 'canceled' - else nil - end - end - - ## - # Set the status of the Command stanza (chaining-friendly) - # v:: [Symbol] or nil - def set_status(v) - self.status = v - self - end - - ## - # Get the actions allowed - # return:: [REXML::Element] or nil - def actions - first_element('actions') - end - - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/component.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/component.rb deleted file mode 100644 index 88e6e7c90..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/component.rb +++ /dev/null @@ -1,103 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/connection' - -module Jabber - ## - # The component class provides everything needed to build a XMPP Component. - # - # Components are more flexible as they are only restricted in the use of a - # fixed domain. node and resource of JIDs are freely choosable for all stanzas. - class Component < Connection - - # The component's JID - attr_reader :jid - - # The server's address - attr_reader :server_address - - # The server's port - attr_reader :server_port - - # Create a new Component - # jid:: [JID] - def initialize(jid, server_address=nil, server_port=5347, threaded = true) - super(threaded) - @jid = (jid.kind_of?(JID) ? jid : JID.new(jid.to_s)) - - if server_address - $stderr.puts "Passing server and port to Jabber::Component::new is " + - "obsolete and will vanish in some later XMPP4R release. " + - "Please use these arguments when calling " + - "Jabber::Client#connect" - @server_address = server_address - @server_port = server_port - end - end - - # Connect to the server - # (chaining-friendly) - # server:: [String] Hostname - # port:: [Integer] TCP port (5347) - # return:: self - def connect(server=nil, port=5347) - if server - super(server, port) - else - super(@server_address, @server_port) - end - self - end - - ## - # Close the connection, - # sends tag first - def close - send("") - super - end - - def generate_stream_start(to=nil, from=nil, id=nil, xml_lang="en", xmlns="jabber:component:accept", version="1.0") - super - end - private :generate_stream_start - - ## - # Start the stream-parser and send the component-specific stream opening element - def start - super - send(generate_stream_start(@jid)) { |e| - if e.name == 'stream' - true - else - false - end - } - end - - ## - # Send auth with given secret and wait for result - # - # Throws AuthenticationFailure - # secret:: [String] the shared secret - def auth(secret) - hash = Digest::SHA1::hexdigest(@streamid.to_s + secret) - authenticated = false - send("#{hash}") { |r| - if r.prefix == 'stream' and r.name == 'error' - true - elsif r.name == 'handshake' - authenticated = true - true - else - false - end - } - unless authenticated - raise AuthenticationFailure.new, "Component authentication failed" - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/connection.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/connection.rb deleted file mode 100644 index 406b80d8b..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/connection.rb +++ /dev/null @@ -1,203 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'openssl' -require 'xmpp4r/stream' -require 'xmpp4r/errorexception' - -module Jabber - ## - # The connection class manages the TCP connection to the Jabber server - # - class Connection < Stream - attr_reader :host, :port - - # How many seconds to wait for - # before proceeding - attr_accessor :features_timeout - - # Keep-alive interval in seconds, defaults to 60 - # (see private method keepalive_loop for implementation details) - attr_accessor :keepalive_interval - - # Allow TLS negotiation? Defaults to true - attr_accessor :allow_tls - - # Optional CA-Path for TLS-handshake - attr_accessor :ssl_capath - - # Optional callback for verification of SSL peer - attr_accessor :ssl_verifycb - - ## - # Create a new connection to the given host and port, using threaded mode - # or not. - def initialize(threaded = true) - super(threaded) - @host = nil - @port = nil - @allow_tls = true - @tls = false - @ssl_capath = nil - @ssl_verifycb = nil - @features_timeout = 10 - @keepalive_interval = 60 - end - - ## - # Connect to the Jabber server through a TCP Socket, - # start the Jabber parser, - # invoke to accept_features to wait for TLS, - # start the keep-alive thread - def connect(host, port) - @host = host - @port = port - # Reset is_tls?, so that it works when reconnecting - @tls = false - - Jabber::debuglog("CONNECTING:\n#{@host}:#{@port}") - @socket = TCPSocket.new(@host, @port) - start - - accept_features - - @keepaliveThread = Thread.new do - Thread.current.abort_on_exception = true - keepalive_loop - end - end - - ## - # Closing connection: - # first kill keepaliveThread, then call Stream#close! - def close! - @keepaliveThread.kill if @keepaliveThread and @keepaliveThread.alive? - super - end - - def accept_features - begin - Timeout::timeout(@features_timeout) { - Jabber::debuglog("FEATURES: waiting...") - @features_sem.wait - Jabber::debuglog("FEATURES: waiting finished") - } - rescue Timeout::Error - Jabber::debuglog("FEATURES: timed out when waiting, stream peer seems not XMPP compliant") - end - - if @allow_tls and not is_tls? and @stream_features['starttls'] == 'urn:ietf:params:xml:ns:xmpp-tls' - begin - starttls - rescue - Jabber::debuglog("STARTTLS:\nFailure: #{$!}") - end - end - end - - ## - # Start the parser on the previously connected socket - def start - super(@socket) - end - - ## - # Do a - # (will be automatically done by connect if stream peer supports this) - def starttls - stls = REXML::Element.new('starttls') - stls.add_namespace('urn:ietf:params:xml:ns:xmpp-tls') - - reply = nil - send(stls) { |r| - reply = r - true - } - if reply.name != 'proceed' - raise ErrorException(reply.first_element('error')) - end - # Don't be interrupted - stop - - begin - error = nil - - # Context/user set-able stuff - ctx = OpenSSL::SSL::SSLContext.new('TLSv1') - if @ssl_capath - ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER - ctx.ca_path = @ssl_capath - else - ctx.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - ctx.verify_callback = @ssl_verifycb - - # SSL connection establishing - sslsocket = OpenSSL::SSL::SSLSocket.new(@socket, ctx) - sslsocket.sync_close = true - Jabber::debuglog("TLSv1: OpenSSL handshake in progress") - sslsocket.connect - - # Make REXML believe it's a real socket - class << sslsocket - def kind_of?(o) - o == IO ? true : super - end - end - - # We're done and will use it - @tls = true - @socket = sslsocket - rescue - error = $! - ensure - Jabber::debuglog("TLSv1: restarting parser") - start - accept_features - raise error if error - end - end - - ## - # Have we gone to TLS mode? - # result:: [true] or [false] - def is_tls? - @tls - end - - def generate_stream_start(to=nil, from=nil, id=nil, xml_lang="en", xmlns="jabber:client", version="1.0") - stream_start_string = " child)? - def required? - res = false - each_element('required') { res = true } - res - end - - ## - # Set if this field is required - # r:: [true] or [false] - def required=(r) - delete_elements('required') - if r - add REXML::Element.new('required') - end - end - - ## - # Get the values (in a Data Form with type='submit') - def values - res = [] - each_element('value') { |e| - res << e.text - } - res - end - - ## - # Set the values - def values=(ary) - delete_elements('value') - ary.each { |v| - add(REXML::Element.new('value')).text = v - } - end - - ## - # Get the options (in a Data Form with type='form') - def options - res = {} - each_element('option') { |e| - value = nil - e.each_element('value') { |ve| value = ve.text } - res[value] = e.attributes['label'] - } - res - end - - ## - # Set the options - def options=(hsh) - delete_elements('option') - hsh.each { |value,label| - o = add(REXML::Element.new('option')) - o.attributes['label'] = label - o.add(REXML::Element.new('value')).text = value - } - end - end - - ## - # The element, can contain XDataField elements - class XDataReported < XMPPElement - name_xmlns 'reported', 'jabber:x:data' - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/debuglog.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/debuglog.rb deleted file mode 100644 index 8f79ae3af..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/debuglog.rb +++ /dev/null @@ -1,34 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - # Is debugging mode enabled ? - @@debug = false - - # Enable/disable debugging mode. When debug mode is enabled, information - # can be logged using Jabber::debuglog. When debug mode is disabled, calls - # to Jabber::debuglog are just ignored. - def Jabber::debug=(debug) - @@debug = debug - if @@debug - debuglog('Debugging mode enabled.') - end - end - - # returns true if debugging mode is enabled. If you just want to log - # something if debugging is enabled, use Jabber::debuglog instead. - def Jabber::debug - @@debug - end - - # Outputs a string only if debugging mode is enabled. If the string includes - # several lines, 4 spaces are added at the begginning of each line but the - # first one. Time is prepended to the string. - def Jabber::debuglog(string) - return if not @@debug - s = string.chomp.gsub("\n", "\n ") - t = Time::new.strftime('%H:%M:%S') - puts "#{t} #{s}" - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay.rb deleted file mode 100644 index 66d2850b5..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay.rb +++ /dev/null @@ -1,5 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/delay/x/delay.rb' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay/x/delay.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay/x/delay.rb deleted file mode 100644 index 2e6b8ce99..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/delay/x/delay.rb +++ /dev/null @@ -1,99 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/x' -require 'xmpp4r/jid' -require 'time' - -module Jabber - module Delay - ## - # Implementation of JEP 0091 - # for - # applied on and stanzas - # - # One may also use XDelay#text for a descriptive reason - # for the delay. - # - # Please note that you must require 'xmpp4r/xdelay' to use - # this class as it's not required by a basic XMPP implementation. - # elements with the specific namespace will then be - # converted to XDelay automatically. - class XDelay < X - name_xmlns 'x', 'jabber:x:delay' - - ## - # Initialize a new XDelay element - # - # insertnow:: [Boolean] Set the stamp to [Time::now] - def initialize(insertnow=true) - super() - - if insertnow - set_stamp(Time.now) - end - end - - ## - # Get the timestamp - # result:: [Time] or nil - def stamp - if attributes['stamp'] - begin - # Actually this should be Time.xmlschema, - # but "unfortunately, the 'jabber:x:delay' namespace predates" JEP 0082 - Time.parse(attributes['stamp']) - rescue ArgumentError - nil - end - else - nil - end - end - - ## - # Set the timestamp - # t:: [Time] or nil - def stamp=(t) - if t.nil? - attributes['stamp'] = nil - else - attributes['stamp'] = t.strftime("%Y%m%dT%H:%M:%S") - end - end - - ## - # Set the timestamp (chaining-friendly) - def set_stamp(t) - self.stamp = t - self - end - - ## - # Get the timestamp's origin - # result:: [JID] - def from - if attributes['from'] - JID::new(attributes['from']) - else - nil - end - end - - ## - # Set the timestamp's origin - # jid:: [JID] - def from=(jid) - attributes['from'] = jid.nil? ? nil : jid.to_s - end - - ## - # Set the timestamp's origin (chaining-friendly) - def set_from(jid) - self.from = jid - self - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery.rb deleted file mode 100644 index 2fee10a9c..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery.rb +++ /dev/null @@ -1,6 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/discovery/iq/discoinfo.rb' -require 'xmpp4r/discovery/iq/discoitems.rb' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoinfo.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoinfo.rb deleted file mode 100755 index 421f944c0..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoinfo.rb +++ /dev/null @@ -1,212 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/query' - -module Jabber - module Discovery - ## - # Class for handling Service Discovery queries, - # info - # (JEP 0030) - # - # This may contain multiple Identity and Feature - # elements, describing the type and the supported namespaces of - # the service. - class IqQueryDiscoInfo < IqQuery - name_xmlns 'query', 'http://jabber.org/protocol/disco#info' - - ## - # Get the queried Service Discovery node or nil - # - # See IqQueryDiscoItems#node for a - # small explanation of this. - def node - attributes['node'] - end - - ## - # Get the queried Service Discovery node or nil - # val:: [String] - def node=(val) - attributes['node'] = val - end - - ## - # Get the queried Service Discovery node or nil - # (chaining-friendly) - # val:: [String] - def set_node(val) - self.node = val - self - end - - ## - # Get the first identity child - # result:: [Identity] - def identity - first_element('identity') - end - - ## - # Get list of identities - # result:: [Array] of [Identity] - def identities - res = [] - each_element('identity') { |id| - res.push(id) - } - res - end - - ## - # Get list of features - # result:: [Array] of [String] - def features - res = [] - each_element('feature') { |feature| - res.push(feature.var) - } - res - end - end - - - ## - # Service Discovery identity to add() to IqQueryDiscoInfo - # - # Please note that JEP 0030 requires both category and type to occur - class Identity < XMPPElement - name_xmlns 'identity', 'http://jabber.org/protocol/disco#info' - - ## - # Initialize a new Identity - # category:: [String] Initial category or nil - # iname:: [String] Initial identity name or nil - # type:: [String] Initial type or nil - def initialize(category=nil, iname=nil, type=nil) - super() - set_category(category) - set_iname(iname) - set_type(type) - end - - ## - # Get the identity's category or nil - # result:: [String] - def category - attributes['category'] - end - - ## - # Set the identity's category - # - # Service Discovery categories should be somewhat - # standardized by some registry, so clients may - # represent specific categories by specific icons... - # (see http://www.jabber.org/registrar/disco-categories.html) - # val:: [String] - def category=(val) - attributes['category'] = val - end - - ## - # Set the identity's category (chaining-friendly) - # val:: [String] - def set_category(val) - self.category = val - self - end - - ## - # Get the identity's name or nil - # - # This has been renamed from to "iname" here - # to keep REXML::Element#name accessible - # result:: [String] - def iname - attributes['name'] - end - - ## - # Set the identity's name - # val:: [String] - def iname=(val) - attributes['name'] = val - end - - ## - # Set the identity's name (chaining-friendly) - # val:: [String] - def set_iname(val) - self.iname = val - self - end - - ## - # Get the identity's type or nil - # result:: [String] - def type - attributes['type'] - end - - ## - # Set the identity's type - # (see http://www.jabber.org/registrar/disco-categories.html) - # val:: [String] - def type=(val) - attributes['type'] = val - end - - ## - # Set the identity's type (chaining-friendly) - # val:: [String] - def set_type(val) - self.type = val - self - end - end - - ## - # Service Discovery feature to add() to IqQueryDiscoInfo - # - # Please note that JEP 0030 requires var to be set - class Feature < XMPPElement - name_xmlns 'feature', 'http://jabber.org/protocol/disco#info' - - ## - # Create a new element - # var:: [String] New var - def initialize(var=nil) - super() - set_var(var) - end - - ## - # Get the feature's var or nil - # result:: [String] - def var - attributes['var'] - end - - ## - # Set the feature's var - # - # This is a namespace the identity supports. - # val:: [String] - def var=(val) - attributes['var'] = val - end - - ## - # Set the feature's var (chaining-friendly) - # val:: [String] - def set_var(val) - self.var = val - self - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoitems.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoitems.rb deleted file mode 100755 index 1299a9e8c..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/discovery/iq/discoitems.rb +++ /dev/null @@ -1,139 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/query' - -module Jabber - module Discovery - ## - # Class for handling Service Discovery queries, - # items - # (JEP 0030) - # - # This may contain multiple Item elements, - # describing multiple services to be browsed by Jabber clients. - # These may then get further information about these items by - # querying IqQueryDiscoInfo and further sub-items by querying - # IqQueryDiscoItems. - class IqQueryDiscoItems < IqQuery - name_xmlns 'query', 'http://jabber.org/protocol/disco#items' - - ## - # Get the queried Service Discovery node or nil - # - # A Service Discovery node is _not_ a JID node, - # this may be a bit confusing. It's just to make - # Service Discovery browsing a bit more structured. - def node - attributes['node'] - end - - ## - # Get the queried Service Discovery node or nil - def node=(val) - attributes['node'] = val - end - - ## - # Get the queried Service Discovery node or nil - # (chaining-friendly) - def set_node(val) - self.node = val - self - end - end - - - ## - # Service Discovery item to add() to IqQueryDiscoItems - # - # Please note that JEP 0030 requires the jid to occur - class Item < XMPPElement - name_xmlns 'item', 'http://jabber.org/protocol/disco#items' - - ## - # Initialize a new Service Discovery - # to be added to IqQueryDiscoItems - # jid:: [JID] - # iname:: [String] Item name - # node:: [String] Service Discovery node (_not_ JID#node) - def initialize(jid=nil, iname=nil, node=nil) - super() - set_jid(jid) - set_iname(iname) - set_node(node) - end - - ## - # Get the item's jid or nil - # result:: [String] - def jid - JID::new(attributes['jid']) - end - - ## - # Set the item's jid - # val:: [JID] - def jid=(val) - attributes['jid'] = val.to_s - end - - ## - # Set the item's jid (chaining-friendly) - # val:: [JID] - def set_jid(val) - self.jid = val - self - end - - ## - # Get the item's name or nil - # - # This has been renamed from to "iname" here - # to keep REXML::Element#name accessible - # result:: [String] - def iname - attributes['name'] - end - - ## - # Set the item's name - # val:: [String] - def iname=(val) - attributes['name'] = val - end - - ## - # Set the item's name (chaining-friendly) - # val:: [String] - def set_iname(val) - self.iname = val - self - end - - ## - # Get the item's Service Discovery node or nil - # result:: [String] - def node - attributes['node'] - end - - ## - # Set the item's Service Discovery node - # val:: [String] - def node=(val) - attributes['node'] = val - end - - ## - # Set the item's Service Discovery node (chaining-friendly) - # val:: [String] - def set_node(val) - self.node = val - self - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/error.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/error.rb deleted file mode 100644 index 888a0a406..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/error.rb +++ /dev/null @@ -1,225 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # A class used to build/parse elements. - # Look at JEP 0086 for explanation. - class Error < XMPPElement - name_xmlns 'error' - - ## - # errorcondition:: [nil] or [String] of the following: - # * "bad-request" - # * "conflict" - # * "feature-not-implemented" - # * "forbidden" - # * "gone" - # * "internal-server-error" - # * "item-not-found" - # * "jid-malformed" - # * "not-acceptable" - # * "not-allowed" - # * "not-authorized" - # * "payment-required" - # * "recipient-unavailable" - # * "redirect" - # * "registration-required" - # * "remote-server-not-found" - # * "remote-server-timeout" - # * "resource-constraint" - # * "service-unavailable" - # * "subscription-required" - # * "undefined-condition" - # * "unexpected-request" - # Will raise an [Exception] if not [nil] and none of the above - # - # Does also set type and code to appropriate values according to errorcondition - # - # text: [nil] or [String] Error text - def initialize(errorcondition=nil, text=nil) - if errorcondition.nil? - super() - set_text(text) unless text.nil? - else - errortype = nil - errorcode = nil - @@Errors.each { |cond,type,code| - if errorcondition == cond - errortype = type - errorcode = code - end - } - - if errortype.nil? || errorcode.nil? - raise("Unknown error condition when initializing Error") - end - - super() - set_error(errorcondition) - set_type(errortype) - set_code(errorcode) - set_text(text) unless text.nil? - end - end - - ## - # Get the 'Legacy error code' or nil - # result:: [Integer] Error code - def code - if attributes['code'] - attributes['code'].to_i - else - nil - end - end - - ## - # Set the 'Legacy error code' or nil - # i:: [Integer] Error code - def code=(i) - if i.nil? - attributes['code'] = nil - else - attributes['code'] = i.to_s - end - end - - ## - # Set the 'Legacy error code' (chaining-friendly) - def set_code(i) - self.code = i - self - end - - ## - # Get the 'XMPP error condition' - # - # This can be anything that possess the specific namespace, - # checks don't apply here - def error - name = nil - each_element { |e| name = e.name if (e.namespace == 'urn:ietf:params:xml:ns:xmpp-stanzas') && (e.name != 'text') } - name - end - - ## - # Set the 'XMPP error condition' - # - # One previous element with that namespace will be deleted before - # - # s:: [String] Name of the element to be added, - # namespace will be added automatically, checks don't apply here - def error=(s) - xe = nil - each_element { |e| xe = e if (e.namespace == 'urn:ietf:params:xml:ns:xmpp-stanzas') && (e.name != 'text') } - unless xe.nil? - delete_element(xe) - end - - add_element(s).add_namespace('urn:ietf:params:xml:ns:xmpp-stanzas') - end - - ## - # Set the 'XMPP error condition' (chaining-friendly) - def set_error(s) - self.error = s - self - end - - ## - # Get the errors element text - # result:: [String] or nil - def text - first_element_text('text') || super - end - - ## - # Set the errors element text - # (Previous elements will be deleted first) - # s:: [String] content or [nil] if no element - def text=(s) - delete_elements('text') - - unless s.nil? - e = add_element('text') - e.add_namespace('urn:ietf:params:xml:ns:xmpp-stanzas') - e.text = s - end - end - - ## - # Set the errors element text (chaining-friendly) - def set_text(s) - self.text = s - self - end - - ## - # Get the type of error - # (meaning how to proceed) - # result:: [Symbol] or [nil] as following: - # * :auth - # * :cancel - # * :continue - # * :modify - # * :wait - def type - case attributes['type'] - when 'auth' then :auth - when 'cancel' then :cancel - when 'continue' then :continue - when 'modify' then :modify - when 'wait' then :wait - else nil - end - end - - ## - # Set the type of error (see Error#type) - def type=(t) - case t - when :auth then attributes['type'] = 'auth' - when :cancel then attributes['type'] = 'cancel' - when :continue then attributes['type'] = 'continue' - when :modify then attributes['type'] = 'modify' - when :wait then attributes['type'] = 'wait' - else attributes['type'] = nil - end - end - - ## - # Set the type of error (chaining-friendly) - def set_type(t) - self.type = t - self - end - - ## - # Possible XMPP error conditions, types and codes - # (JEP 0086) - @@Errors = [['bad-request', :modify, 400], - ['conflict', :cancel, 409], - ['feature-not-implemented', :cancel, 501], - ['forbidden', :auth, 403], - ['gone', :modify, 302], - ['internal-server-error', :wait, 500], - ['item-not-found', :cancel, 404], - ['jid-malformed', :modify, 400], - ['not-acceptable', :modify, 406], - ['not-allowed', :cancel, 405], - ['not-authorized', :auth, 401], - ['payment-required', :auth, 402], - ['recipient-unavailable', :wait, 404], - ['redirect', :modify, 302], - ['registration-required', :auth, 407], - ['remote-server-not-found', :cancel, 404], - ['remote-server-timeout', :wait, 504], - ['resource-constraint', :wait, 500], - ['service-unavailable', :cancel, 503], - ['subscription-required', :auth, 407], - ['undefined-condition', nil, 500], - ['unexpected-request', :wait, 400]] - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/errorexception.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/errorexception.rb deleted file mode 100644 index 34b9b1c56..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/errorexception.rb +++ /dev/null @@ -1,32 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # This exception can be raised by Helpers when they - # receive answers with type='error' - # - # The ErrorException carries a Jabber::Error element - class ErrorException < RuntimeError - ## - # The error element which caused this exception - attr_reader :error - - ## - # Initialize an ErrorException - # error:: [Error] - def initialize(error) - @error = error - end - - ## - # Textual output - # - # Sample: - # subscription-required: Please subscribe first - def to_s - "#{@error.error}: #{@error.text}" - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation.rb deleted file mode 100644 index 9a6841197..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation.rb +++ /dev/null @@ -1,5 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/feature_negotiation/iq/feature.rb' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation/iq/feature.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation/iq/feature.rb deleted file mode 100644 index 5a20b4e0f..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/feature_negotiation/iq/feature.rb +++ /dev/null @@ -1,28 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' -require 'xmpp4r/dataforms/x/data' - -module Jabber - module FeatureNegotiation - ## - # Feature negotiation, - # can appear as direct child to Iq - # or as child of IqSi - class IqFeature < XMPPElement - name_xmlns 'feature', 'http://jabber.org/protocol/feature-neg' - - ## - # First child with xmlns='jabber:x:data' - def x - res = nil - each_element('x') { |e| - res = e if e.namespace == 'jabber:x:data' - } - res - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding.rb deleted file mode 100644 index a15e7a33a..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding.rb +++ /dev/null @@ -1,5 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/httpbinding/client' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding/client.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding/client.rb deleted file mode 100644 index a4d6a7056..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/httpbinding/client.rb +++ /dev/null @@ -1,285 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - - -require 'xmpp4r/client' -require 'net/http' - -module Jabber - module HTTPBinding - ## - # This class implements an alternative Client - # using HTTP Binding (JEP0124). - # - # This class is designed to be a drop-in replacement - # for Jabber::Client, except for the - # Jabber::HTTP::Client#connect method which takes an URI - # as argument. - # - # HTTP requests are buffered to not exceed the negotiated - # 'polling' and 'requests' parameters. - # - # Stanzas in HTTP resonses may be delayed to arrive in the - # order defined by 'rid' parameters. - # - # =Debugging - # Turning Jabber::debug to true will make debug output - # not only spit out stanzas but HTTP request/response - # bodies, too. - class Client < Jabber::Client - - # Content-Type to be used for communication - # (you can set this to "text/html") - attr_accessor :http_content_type - # The server should wait this value seconds if - # there is no stanza to be received - attr_accessor :http_wait - # The server may hold this amount of stanzas - # to reduce number of HTTP requests - attr_accessor :http_hold - - ## - # Initialize - # jid:: [JID or String] - def initialize(jid) - super - - @lock = Mutex.new - @pending_requests = 0 - @last_send = Time.at(0) - @send_buffer = '' - - @http_wait = 20 - @http_hold = 1 - @http_content_type = 'text/xml; charset=utf-8' - end - - ## - # Set up the stream using uri as the HTTP Binding URI - # - # You may optionally pass host and port parameters - # to make use of the JEP0124 'route' feature. - # - # uri:: [URI::Generic or String] - # host:: [String] Optional host to route to - # port:: [Fixnum] Port for route feature - def connect(uri, host=nil, port=5222) - uri = URI::parse(uri) unless uri.kind_of? URI::Generic - @uri = uri - - @allow_tls = false # Shall be done at HTTP level - @stream_mechanisms = [] - @stream_features = {} - @http_rid = IdGenerator.generate_id.to_i - @pending_rid = @http_rid - @pending_rid_lock = Mutex.new - - req_body = REXML::Element.new('body') - req_body.attributes['rid'] = @http_rid - req_body.attributes['content'] = @http_content_type - req_body.attributes['hold'] = @http_hold.to_s - req_body.attributes['wait'] = @http_wait.to_s - req_body.attributes['to'] = @jid.domain - if host - req_body.attributes['route'] = 'xmpp:#{host}:#{port}' - end - req_body.attributes['secure'] = 'true' - req_body.attributes['xmlns'] = 'http://jabber.org/protocol/httpbind' - res_body = post(req_body) - unless res_body.name == 'body' - raise 'Response body is no element' - end - - @streamid = res_body.attributes['authid'] - @status = CONNECTED - @http_sid = res_body.attributes['sid'] - @http_wait = res_body.attributes['wait'].to_i if res_body.attributes['wait'] - @http_hold = res_body.attributes['hold'].to_i if res_body.attributes['hold'] - @http_inactivity = res_body.attributes['inactivity'].to_i - @http_polling = res_body.attributes['polling'].to_i - @http_polling = 5 if @http_polling == 0 - @http_requests = res_body.attributes['requests'].to_i - @http_requests = 1 if @http_requests == 0 - - receive_elements_with_rid(@http_rid, res_body.children) - - @features_sem.run - end - - ## - # Send a stanza, additionally with block - # - # This method ensures a 'jabber:client' namespace for - # the stanza - def send(xml, &block) - if xml.kind_of? REXML::Element - xml.add_namespace('jabber:client') - end - - super - end - - ## - # Ensure that there is one pending request - # - # Will be automatically called if you've sent - # a stanza. - def ensure_one_pending_request - return if is_disconnected? - - if @lock.synchronize { @pending_requests } < 1 - send_data('') - end - end - - ## - # Close the session by sending - # - def close - @status = DISCONNECTED - send(Jabber::Presence.new.set_type(:unavailable)) - end - - private - - ## - # Receive stanzas ensuring that the 'rid' order is kept - # result:: [REXML::Element] - def receive_elements_with_rid(rid, elements) - while rid > @pending_rid - @pending_rid_lock.lock - end - @pending_rid = rid + 1 - - elements.each { |e| - receive(e) - } - - @pending_rid_lock.unlock - end - - ## - # Do a POST request - def post(body) - body = body.to_s - request = Net::HTTP::Post.new(@uri.path) - request.content_length = body.size - request.body = body - request['Content-Type'] = @http_content_type - Jabber::debuglog("HTTP REQUEST (#{@pending_requests}/#{@http_requests}):\n#{request.body}") - response = Net::HTTP.start(@uri.host, @uri.port) { |http| - http.use_ssl = true if @uri.kind_of? URI::HTTPS - http.request(request) - } - Jabber::debuglog("HTTP RESPONSE (#{@pending_requests}/#{@http_requests}):\n#{response.body}") - - unless response.kind_of? Net::HTTPSuccess - # Unfortunately, HTTPResponses aren't exceptions - # TODO: rescue'ing code should be able to distinguish - raise Net::HTTPBadResponse, "#{response.class}" - end - - body = REXML::Document.new(response.body).root - if body.name != 'body' and body.namespace != 'http://jabber.org/protocol/httpbind' - raise REXML::ParseException.new('Malformed body') - end - body - end - - ## - # Prepare data to POST and - # handle the result - def post_data(data) - req_body = nil - current_rid = nil - - begin - begin - @lock.synchronize { - # Do not send unneeded requests - if data.size < 1 and @pending_requests > 0 - return - end - - req_body = " e - Jabber::debuglog("POST error (will retry): #{e.class}: #{e}") - receive_elements_with_rid(current_rid, []) - # It's not good to resend on *any* exception, - # but there are too many cases (Timeout, 404, 502) - # where resending is appropriate - # TODO: recognize these conditions and act appropriate - send_data(data) - end - end - - ## - # Send data, - # buffered and obeying 'polling' and 'requests' limits - def send_data(data) - @lock.synchronize do - - @send_buffer += data - limited_by_polling = (@last_send + @http_polling >= Time.now) - limited_by_requests = (@pending_requests + 1 > @http_requests) - - # Can we send? - if !limited_by_polling and !limited_by_requests - data = @send_buffer - @send_buffer = '' - - Thread.new do - Thread.current.abort_on_exception = true - post_data(data) - end - - elsif !limited_by_requests - Thread.new do - Thread.current.abort_on_exception = true - # Defer until @http_polling has expired - wait = @last_send + @http_polling - Time.now - sleep(wait) if wait > 0 - # Ignore locking, it's already threaded ;-) - send_data('') - end - end - - end - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/idgenerator.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/idgenerator.rb deleted file mode 100644 index 71b964d3f..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/idgenerator.rb +++ /dev/null @@ -1,37 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'singleton' - -module Jabber - ## - # The Jabber::IdGenerator class generates unique IDs for use - # in XMMP stanzas. Jabber::IdGenerator includes the Singleton - # Mixin, usage as following: - # Jabber::IdGenerator.generate_id - # => "23" - class IdGenerator - include Singleton - - def initialize - @last_id = 0 - end - - ## - # Generate an unique ID. - # - # This is kind of boring this way, as it just counts up - # a number. Maybe something more random somewhen... - def IdGenerator.generate_id - IdGenerator.instance.generate_id - end - - def generate_id - @last_id += 1 - timefrac = Time.new.to_f.to_s.split(/\./, 2).last[-3..-1] - - "#{@last_id}#{timefrac}" - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/iq.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/iq.rb deleted file mode 100644 index d330752ee..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/iq.rb +++ /dev/null @@ -1,210 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppstanza' -require 'xmpp4r/jid' -require 'digest/sha1' - -require 'xmpp4r/query' -require 'xmpp4r/vcard/iq/vcard' - -module Jabber - ## - # IQ: Information/Query - # (see RFC3920 - 9.2.3 - # - # A class used to build/parse IQ requests/responses - class Iq < XMPPStanza - name_xmlns 'iq', 'jabber:client' - force_xmlns true - - @@element_classes = {} - - ## - # Build a new stanza - # type:: [Symbol] or nil, see Iq#type - # to:: [JID] Recipient - def initialize(type = nil, to = nil) - super() - - if not to.nil? - set_to(to) - end - if not type.nil? - set_type(type) - end - end - - ## - # Get the type of the Iq stanza - # - # The following values are allowed: - # * :get - # * :set - # * :result - # * :error - # result:: [Symbol] or nil - def type - case super - when 'get' then :get - when 'set' then :set - when 'result' then :result - when 'error' then :error - else nil - end - end - - ## - # Set the type of the Iq stanza (see Iq#type) - # v:: [Symbol] or nil - def type=(v) - case v - when :get then super('get') - when :set then super('set') - when :result then super('result') - when :error then super('error') - else super(nil) - end - end - - ## - # Set the type of the Iq stanza (chaining-friendly) - # v:: [Symbol] or nil - def set_type(v) - self.type = v - self - end - - ## - # Returns the iq's query child, or nil - # result:: [IqQuery] - def query - first_element('query') - end - - ## - # Delete old elements named newquery.name - # - # newquery:: [REXML::Element] will be added - def query=(newquery) - delete_elements(newquery.name) - add(newquery) - end - - ## - # Returns the iq's query's namespace, or nil - # result:: [String] - def queryns - e = first_element('query') - if e - return e.namespace - else - return nil - end - end - - ## - # Returns the iq's child, or nil - # result:: [IqVcard] - def vcard - first_element('vCard') - end - - ## - # Returns the iq's child, or nil - # result:: [IqVcard] - def pubsub - first_element('pubsub') - end - - ## - # Returns the iq's child, or nil - # resulte:: [IqCommand] - def command - first_element("command") - end - - ## - # Create a new Iq stanza with an unspecified query child - # ( has no namespace) - def Iq.new_query(type = nil, to = nil) - iq = Iq::new(type, to) - query = IqQuery::new - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:auth set Stanza. - def Iq.new_authset(jid, password) - iq = Iq::new(:set) - query = IqQuery::new - query.add_namespace('jabber:iq:auth') - query.add(REXML::Element::new('username').add_text(jid.node)) - query.add(REXML::Element::new('password').add_text(password)) - query.add(REXML::Element::new('resource').add_text(jid.resource)) if not jid.resource.nil? - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:auth set Stanza for Digest authentication - def Iq.new_authset_digest(jid, session_id, password) - iq = Iq::new(:set) - query = IqQuery::new - query.add_namespace('jabber:iq:auth') - query.add(REXML::Element::new('username').add_text(jid.node)) - query.add(REXML::Element::new('digest').add_text(Digest::SHA1.hexdigest(session_id + password))) - query.add(REXML::Element::new('resource').add_text(jid.resource)) if not jid.resource.nil? - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:register set stanza for service/server registration - # username:: [String] (Element will be ommited if unset) - # password:: [String] (Element will be ommited if unset) - def Iq.new_register(username=nil, password=nil) - iq = Iq::new(:set) - query = IqQuery::new - query.add_namespace('jabber:iq:register') - query.add(REXML::Element::new('username').add_text(username)) if username - query.add(REXML::Element::new('password').add_text(password)) if password - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:roster get Stanza. - # - # IqQueryRoster is unused here because possibly not require'd - def Iq.new_rosterget - iq = Iq::new(:get) - query = IqQuery::new - query.add_namespace('jabber:iq:roster') - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:roster get Stanza. - def Iq.new_browseget - iq = Iq::new(:get) - query = IqQuery::new - query.add_namespace('jabber:iq:browse') - iq.add(query) - iq - end - - ## - # Create a new jabber:iq:roster set Stanza. - def Iq.new_rosterset - iq = Iq::new(:set) - query = IqQuery::new - query.add_namespace('jabber:iq:roster') - iq.add(query) - iq - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/jid.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/jid.rb deleted file mode 100755 index 809cd40ee..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/jid.rb +++ /dev/null @@ -1,167 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # The JID class represents a Jabber Identifier as described by - # RFC3920 section 3.1. - # - # Note that you can use JIDs also for Sorting, Hash keys, ... - class JID - include Comparable - - PATTERN = /^(?:([^@]*)@)??([^@\/]*)(?:\/(.*?))?$/ - - begin - require 'idn' - USE_STRINGPREP = true - rescue LoadError - USE_STRINGPREP = false - end - - ## - # Create a new JID. If called as new('a@b/c'), parse the string and - # split (node, domain, resource) - def initialize(node = "", domain = nil, resource = nil) - @resource = resource - @domain = domain - @node = node - if @domain.nil? and @resource.nil? and @node - @node, @domain, @resource = @node.to_s.scan(PATTERN).first - end - - if USE_STRINGPREP - @node = IDN::Stringprep.nodeprep(@node) if @node - @domain = IDN::Stringprep.nameprep(@domain) if @domain - @resource = IDN::Stringprep.resourceprep(@resource) if @resource - else - @node.downcase! if @node - @domain.downcase! if @domain - end - - raise ArgumentError, 'Node too long' if (@node || '').length > 1023 - raise ArgumentError, 'Domain too long' if (@domain || '').length > 1023 - raise ArgumentError, 'Resource too long' if (@resource || '').length > 1023 - end - - ## - # Returns a string representation of the JID - # * "" - # * "domain" - # * "node@domain" - # * "domain/resource" - # * "node@domain/resource" - def to_s - s = @domain - s = "#{@node}@#{s}" if @node - s += "/#{@resource}" if @resource - return s - end - - ## - # Returns a new JID with resource removed. - # return:: [JID] - def strip - JID::new(@node, @domain) - end - alias_method :bare, :strip - - ## - # Removes the resource (sets it to nil) - # return:: [JID] self - def strip! - @resource = nil - self - end - alias_method :bare!, :strip! - - ## - # Returns a hash value of the String representation - # (see JID#to_s) - def hash - return to_s.hash - end - - ## - # Ccompare to another JID - # - # String representations are compared, see JID#to_s - def eql?(o) - to_s.eql?(o.to_s) - end - - ## - # Ccompare to another JID - # - # String representations are compared, see JID#to_s - def ==(o) - to_s == o.to_s - end - - ## - # Compare two JIDs, - # helpful for sorting etc. - # - # String representations are compared, see JID#to_s - def <=>(o) - to_s <=> o.to_s - end - - # Get the JID's node - def node - @node - end - - # Set the JID's node - def node=(v) - @node = v.to_s - if USE_STRINGPREP - @node = IDN::Stringprep.nodeprep(@node) if @node - end - end - - # Get the JID's domain - def domain - return nil if @domain.empty? - @domain - end - - # Set the JID's domain - def domain=(v) - @domain = v.to_s - if USE_STRINGPREP - @domain = IDN::Stringprep.nodeprep(@domain) - end - end - - # Get the JID's resource - def resource - @resource - end - - # Set the JID's resource - def resource=(v) - @resource = v.to_s - if USE_STRINGPREP - @resource = IDN::Stringprep.nodeprep(@resource) - end - end - - # Escape JID - def JID::escape(jid) - return jid.to_s.gsub('@', '%') - end - - # Test if jid is empty - def empty? - to_s.empty? - end - - # Test id jid is strepped - def stripped? - @resource.nil? - end - alias_method :bared?, :stripped? - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/message.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/message.rb deleted file mode 100644 index 357eb8faf..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/message.rb +++ /dev/null @@ -1,148 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppstanza' -require 'xmpp4r/x' - -module Jabber - ## - # The Message class manages the stanzas, - # which is used for all messaging communication. - class Message < XMPPStanza - - name_xmlns 'message', 'jabber:client' - force_xmlns true - - include XParent - - ## - # Create a new message - # >to:: a JID or a String object to send the message to. - # >body:: the message's body - def initialize(to = nil, body = nil) - super() - if not to.nil? - set_to(to) - end - if !body.nil? - add_element(REXML::Element::new("body").add_text(body)) - end - end - - ## - # Get the type of the Message stanza - # - # The following Symbols are allowed: - # * :chat - # * :error - # * :groupchat - # * :headline - # * :normal - # result:: [Symbol] or nil - def type - case super - when 'chat' then :chat - when 'error' then :error - when 'groupchat' then :groupchat - when 'headline' then :headline - when 'normal' then :normal - else nil - end - end - - ## - # Set the type of the Message stanza (see Message#type for details) - # v:: [Symbol] or nil - def type=(v) - case v - when :chat then super('chat') - when :error then super('error') - when :groupchat then super('groupchat') - when :headline then super('headline') - when :normal then super('normal') - else super(nil) - end - end - - ## - # Set the type of the Message stanza (chaining-friendly) - # v:: [Symbol] or nil - def set_type(v) - self.type = v - self - end - - ## - # Returns the message's body, or nil. - # This is the message's plain-text content. - def body - first_element_text('body') - end - - ## - # Sets the message's body - # - # b:: [String] body to set - def body=(b) - replace_element_text('body', b) - end - - ## - # Sets the message's body - # - # b:: [String] body to set - # return:: [REXML::Element] self for chaining - def set_body(b) - self.body = b - self - end - - ## - # sets the message's subject - # - # s:: [String] subject to set - def subject=(s) - replace_element_text('subject', s) - end - - ## - # sets the message's subject - # - # s:: [String] subject to set - # return:: [REXML::Element] self for chaining - def set_subject(s) - self.subject = s - self - end - - ## - # Returns the message's subject, or nil - def subject - first_element_text('subject') - end - - ## - # sets the message's thread - # s:: [String] thread to set - def thread=(s) - delete_elements('thread') - replace_element_text('thread', s) unless s.nil? - end - - ## - # gets the message's thread (chaining-friendly) - # Please note that this are not [Thread] but a [String]-Identifier to track conversations - # s:: [String] thread to set - def set_thread(s) - self.thread = s - self - end - - ## - # Returns the message's thread, or nil - def thread - first_element_text('thread') - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc.rb deleted file mode 100644 index e0d5fa400..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc.rb +++ /dev/null @@ -1,12 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/dataforms' -require 'xmpp4r/muc/x/muc' -require 'xmpp4r/muc/x/mucuserinvite' -require 'xmpp4r/muc/x/mucuseritem' -require 'xmpp4r/muc/iq/mucowner' -require 'xmpp4r/muc/helper/mucbrowser' -require 'xmpp4r/muc/helper/mucclient' -require 'xmpp4r/muc/helper/simplemucclient' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucbrowser.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucbrowser.rb deleted file mode 100644 index 0e92490ef..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucbrowser.rb +++ /dev/null @@ -1,107 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/discovery' - -module Jabber - module MUC - ## - # The MUCBrowser helper can be used to discover - # Multi-User-Chat components via Service Discovery - # - # See JEP 0045 sections 6.1. and 6.2. - # - # Usage of its functions should be threaded as - # responses can take a while - class MUCBrowser - ## - # Initialize a new MUCBrowser helper - def initialize(stream) - @stream = stream - end - - ## - # Retrieve the name of a MUC component, - # depending upon whether the target entity supports - # the MUC protocol. - # - # A return-value of nil does *not* mean that the entity - # does not exist or does not support Service Discovery! - # nil just means that this is not a MUC-compliant service. - # - # Throws an ErrorException when receiving - # - # jid:: [JID] Target entity (set only domain!) - # return:: [String] or [nil] - def muc_name(jid) - iq = Iq.new(:get, jid) - iq.from = @stream.jid # Enable components to use this - iq.add(Discovery::IqQueryDiscoInfo.new) - - res = nil - - @stream.send_with_id(iq) do |answer| - if answer.type == :result - answer.query.each_element('feature') { |feature| - # Look if the component has a MUC or Groupchat feature - if feature.var == 'http://jabber.org/protocol/muc' or feature.var == 'gc-1.0' - # If so, get the identity - if answer.query.first_element('identity') - res = answer.query.first_element('identity').iname - end - end - } - true - else - false - end - end - - res - end - - ## - # Retrieve the existing rooms of a MUC component - # - # The resulting Hash contains pairs of room JID and room name - # - # Usage: - # my_mucbrowse_helper.muc_rooms('conference.jabber.org').each { |jid,name| ... } - # - # Throws an exception when receiving - # jid:: [JID] Target entity (set only domain!) - # return:: [Hash] - def muc_rooms(jid) - iq = Iq.new(:get, jid) - iq.from = @stream.jid # Enable components to use this - iq.add(Discovery::IqQueryDiscoItems.new) - - rooms = {} - err = nil - - @stream.send_with_id(iq) do |answer| - - if answer.type == :result - answer.query.each_element('item') { |item| - rooms[item.jid] = item.iname - } - true - elsif answer.type == :error - err = answer.error - true - else - false - end - end - - if err - raise "Error getting MUC rooms: #{err.error}, #{err.text}" - end - - rooms - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucclient.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucclient.rb deleted file mode 100644 index 858806782..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/mucclient.rb +++ /dev/null @@ -1,431 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/muc/x/muc' - -module Jabber - module MUC - ## - # The MUCClient Helper handles low-level stuff of the - # Multi-User Chat (JEP 0045). - # - # Use one instance per room. - # - # Note that one client cannot join a single room multiple - # times. At least the clients' resources must be different. - # This is a protocol design issue. But don't consider it as - # a bug, it is just a clone-preventing feature. - class MUCClient - ## - # Sender JID, set this to use MUCClient from Components - # my_jid:: [JID] Defaults to nil - attr_accessor :my_jid - - ## - # MUC room roster - # roster:: [Hash] of [String] Nick => [Presence] - attr_reader :roster - - ## - # MUC JID - # jid:: [JID] room@component/nick - attr_reader :jid - - ## - # Initialize a MUCClient - # - # Call MUCClient#join *after* you have registered your - # callbacks to avoid reception of stanzas after joining - # and before registration of callbacks. - # stream:: [Stream] to operate on - def initialize(stream) - # Attributes initialization - @stream = stream - @my_jid = nil - @jid = nil - @roster = {} - @roster_lock = Mutex.new - - @active = false - - @join_cbs = CallbackList.new - @leave_cbs = CallbackList.new - @presence_cbs = CallbackList.new - @message_cbs = CallbackList.new - @private_message_cbs = CallbackList.new - end - - ## - # Join a room - # - # This registers its own callbacks on the stream - # provided to initialize and sends initial presence - # to the room. May throw ErrorException if joining - # fails. - # jid:: [JID] room@component/nick - # password:: [String] Optional password - # return:: [MUCClient] self (chain-able) - def join(jid, password=nil) - if active? - raise "MUCClient already active" - end - - @jid = (jid.kind_of?(JID) ? jid : JID.new(jid)) - activate - - # Joining - pres = Presence.new - pres.to = @jid - pres.from = @my_jid - xmuc = XMUC.new - xmuc.password = password - pres.add(xmuc) - - # We don't use Stream#send_with_id here as it's unknown - # if the MUC component *always* uses our stanza id. - error = nil - @stream.send(pres) { |r| - if from_room?(r.from) and r.kind_of?(Presence) and r.type == :error - # Error from room - error = r.error - true - # type='unavailable' may occur when the MUC kills our previous instance, - # but all join-failures should be type='error' - elsif r.from == jid and r.kind_of?(Presence) and r.type != :unavailable - # Our own presence reflected back - success - if r.x(XMUCUser) and (i = r.x(XMUCUser).items.first) - @affiliation = i.affiliation # we're interested in if it's :owner - @role = i.role # :moderator ? - end - - handle_presence(r, false) - true - else - # Everything else - false - end - } - - if error - deactivate - raise ErrorException.new(error) - end - - self - end - - ## - # Exit the room - # - # * Sends presence with type='unavailable' with an optional - # reason in , - # * then waits for a reply from the MUC component (will be - # processed by leave-callbacks), - # * then deletes callbacks from the stream. - # reason:: [String] Optional custom exit message - def exit(reason=nil) - unless active? - raise "MUCClient hasn't yet joined" - end - - pres = Presence.new - pres.type = :unavailable - pres.to = jid - pres.from = @my_jid - pres.status = reason if reason - @stream.send(pres) { |r| - Jabber::debuglog "exit: #{r.to_s.inspect}" - if r.kind_of?(Presence) and r.type == :unavailable and r.from == jid - @leave_cbs.process(r) - true - else - false - end - } - - deactivate - - self - end - - ## - # Is the MUC client active? - # - # This is false after initialization, - # true after joining and - # false after exit/kick - def active? - @active - end - - ## - # The MUCClient's own nick - # (= resource) - # result:: [String] Nickname - def nick - @jid ? @jid.resource : nil - end - - ## - # Change nick - # - # Threading is, again, suggested. This method waits for two - # stanzas, one indicating unavailabilty of the old - # transient JID, one indicating availability of the new - # transient JID. - # - # If the service denies nick-change, ErrorException will be raisen. - def nick=(new_nick) - unless active? - raise "MUCClient not active" - end - - new_jid = JID.new(@jid.node, @jid.domain, new_nick) - - # Joining - pres = Presence.new - pres.to = new_jid - pres.from = @my_jid - - error = nil - # Keeping track of the two stanzas enables us to process stanzas - # which don't arrive in the order specified by JEP-0045 - presence_unavailable = false - presence_available = false - # We don't use Stream#send_with_id here as it's unknown - # if the MUC component *always* uses our stanza id. - @stream.send(pres) { |r| - if from_room?(r.from) and r.kind_of?(Presence) and r.type == :error - # Error from room - error = r.error - elsif r.from == @jid and r.kind_of?(Presence) and r.type == :unavailable and - r.x and r.x.kind_of?(XMUCUser) and r.x.status_code == 303 - # Old JID is offline, but wait for the new JID and let stanza be handled - # by the standard callback - presence_unavailable = true - handle_presence(r) - elsif r.from == new_jid and r.kind_of?(Presence) and r.type != :unavailable - # Our own presence reflected back - success - presence_available = true - handle_presence(r) - end - - if error or (presence_available and presence_unavailable) - true - else - false - end - } - - if error - raise ErrorException.new(error) - end - - # Apply new JID - @jid = new_jid - end - - ## - # The room name - # (= node) - # result:: [String] Room name - def room - @jid ? @jid.node : nil - end - - ## - # Send a stanza to the room - # - # If stanza is a Jabber::Message, stanza.type will be - # automatically set to :groupchat if directed to room or :chat - # if directed to participant. - # stanza:: [XMPPStanza] to send - # to:: [String] Stanza destination recipient, or room if +nil+ - def send(stanza, to=nil) - if stanza.kind_of? Message - stanza.type = to ? :chat : :groupchat - end - stanza.from = @my_jid - stanza.to = JID::new(jid.node, jid.domain, to) - @stream.send(stanza) - end - - ## - # Add a callback for stanzas indicating availability - # of a MUC participant - # - # This callback will *not* be called for initial presences when - # a client joins a room, but only for the presences afterwards. - # - # The callback will be called from MUCClient#handle_presence with - # one argument: the stanza. - # Note that this stanza will have been already inserted into - # MUCClient#roster. - def add_join_callback(prio = 0, ref = nil, &block) - @join_cbs.add(prio, ref, block) - end - - ## - # Add a callback for stanzas indicating unavailability - # of a MUC participant - # - # The callback will be called with one argument: the stanza. - # - # Note that this is called just *before* the stanza is removed from - # MUCClient#roster, so it is still possible to see the last presence - # in the given block. - # - # If the presence's origin is your MUC JID, the MUCClient will be - # deactivated *afterwards*. - def add_leave_callback(prio = 0, ref = nil, &block) - @leave_cbs.add(prio, ref, block) - end - - ## - # Add a callback for a stanza which is neither a join - # nor a leave. This will be called when a room participant simply - # changes his status. - def add_presence_callback(prio = 0, ref = nil, &block) - @presence_cbs.add(prio, ref, block) - end - - ## - # Add a callback for stanza directed to the whole room. - # - # See MUCClient#add_private_message_callback for private messages - # between MUC participants. - def add_message_callback(prio = 0, ref = nil, &block) - @message_cbs.add(prio, ref, block) - end - - ## - # Add a callback for stanza with type='chat'. - # - # These stanza are normally not broadcasted to all room occupants - # but are some sort of private messaging. - def add_private_message_callback(prio = 0, ref = nil, &block) - @private_message_cbs.add(prio, ref, block) - end - - ## - # Does this JID belong to that room? - # jid:: [JID] - # result:: [true] or [false] - def from_room?(jid) - @jid.strip == jid.strip - end - - private - - ## - # call_join_cbs:: [Bool] Do not call them if we receive initial presences from room - def handle_presence(pres, call_join_cbs=true) # :nodoc: - if pres.type == :unavailable or pres.type == :error - @leave_cbs.process(pres) - @roster_lock.synchronize { - @roster.delete(pres.from.resource) - } - - if pres.from == jid and !(pres.x and pres.x.kind_of?(XMUCUser) and pres.x.status_code == 303) - deactivate - end - else - is_join = ! @roster.has_key?(pres.from.resource) - @roster_lock.synchronize { - @roster[pres.from.resource] = pres - } - if is_join - @join_cbs.process(pres) if call_join_cbs - else - @presence_cbs.process(pres) - end - end - end - - def handle_message(msg) # :nodoc: - if msg.type == :chat - @private_message_cbs.process(msg) - else # type == :groupchat or anything else - @message_cbs.process(msg) - end - end - - def activate # :nodoc: - @active = true - - # Callbacks - @stream.add_presence_callback(150, self) { |presence| - if from_room?(presence.from) - handle_presence(presence) - true - else - false - end - } - - @stream.add_message_callback(150, self) { |message| - if from_room?(message.from) - handle_message(message) - true - else - false - end - } - end - - def deactivate # :nodoc: - @active = false - @jid = nil - - # Callbacks - @stream.delete_presence_callback(self) - @stream.delete_message_callback(self) - end - - public - def owner? - @affiliation == :owner - end - - def configure(options={}) - raise 'You are not the owner' unless owner? - - iq = Iq.new(:get, jid) - iq.to = @jid - iq.from = @my_jid - iq.add(IqQueryMUCOwner.new) - - fields = [] - - answer = @stream.send_with_id(iq) - raise "Configuration not possible for this room" unless answer.query && answer.query.x(XData) - - answer.query.x(XData).fields.each { |field| - if (var = field.attributes['var']) - fields << var - end - } - - - # fill out the reply form - iq = Iq.new(:set, jid) - iq.to = @jid - iq.from = @my_jid - query = IqQueryMUCOwner.new - form = Dataforms::XData.new - form.type = :submit - options.each do |var, values| - field = Dataforms::XDataField.new - values = [values] unless values.is_a?(Array) - field.var, field.values = var, values - form.add(field) - end - query.add(form) - iq.add(query) - - @stream.send_with_id(iq) - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/simplemucclient.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/simplemucclient.rb deleted file mode 100644 index d79be945e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/helper/simplemucclient.rb +++ /dev/null @@ -1,226 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/delay/x/delay' -require 'xmpp4r/muc/helper/mucclient' - -module Jabber - module MUC - ## - # This class attempts to implement a lot of complexity of the - # Multi-User Chat protocol. If you want to implement JEP0045 - # yourself, use Jabber::MUC::MUCClient for some minor - # abstraction. - # - # Minor flexibility penalty: the on_* callbacks are no - # CallbackLists and may therefore only used once. A second - # invocation will overwrite the previous set up block. - # - # *Hint:* the parameter time may be nil if the server didn't - # send it. - # - # Example usage: - # my_muc = Jabber::MUC::SimpleMUCClient.new(my_client) - # my_muc.on_message { |time,nick,text| - # puts (time || Time.new).strftime('%I:%M') + " <#{nick}> #{text}" - # } - # my_muc.join(Jabber::JID.new('jdev@conference.jabber.org/XMPP4R-Bot')) - # - # Please take a look at Jabber::MUC::MUCClient for - # derived methods, such as MUCClient#join, MUCClient#exit, - # ... - class SimpleMUCClient < MUCClient - ## - # Initialize a SimpleMUCClient - # stream:: [Stream] to operate on - # jid:: [JID] room@component/nick - # password:: [String] Optional password - def initialize(stream) - super - - @room_message_block = nil - @message_block = nil - @private_message_block = nil - @subject_block = nil - - @subject = nil - - @join_block = nil - add_join_callback(999) { |pres| - # Presence time - time = nil - pres.each_element('x') { |x| - if x.kind_of?(Delay::XDelay) - time = x.stamp - end - } - - # Invoke... - @join_block.call(time, pres.from.resource) if @join_block - false - } - - @leave_block = nil - @self_leave_block = nil - add_leave_callback(999) { |pres| - # Presence time - time = nil - pres.each_element('x') { |x| - if x.kind_of?(Delay::XDelay) - time = x.stamp - end - } - - # Invoke... - if pres.from == jid - @self_leave_block.call(time) if @self_leave_block - else - @leave_block.call(time, pres.from.resource) if @leave_block - end - false - } - end - - private - - def handle_message(msg) - super - - # Message time (e.g. history) - time = nil - msg.each_element('x') { |x| - if x.kind_of?(Delay::XDelay) - time = x.stamp - end - } - sender_nick = msg.from.resource - - - if msg.subject - @subject = msg.subject - @subject_block.call(time, sender_nick, @subject) if @subject_block - end - - if msg.body - if sender_nick.nil? - @room_message_block.call(time, msg.body) if @room_message_block - else - if msg.type == :chat - @private_message_block.call(time, msg.from.resource, msg.body) if @private_message_block - elsif msg.type == :groupchat - @message_block.call(time, msg.from.resource, msg.body) if @message_block - else - # ...? - end - end - end - end - - public - - ## - # Room subject/topic - # result:: [String] The subject - def subject - @subject - end - - ## - # Change the room's subject/topic - # - # This will not be reflected by SimpleMUCClient#subject - # immediately, wait for SimpleMUCClient#on_subject - # s:: [String] New subject - def subject=(s) - msg = Message.new - msg.subject = s - send(msg) - end - - ## - # Send a simple text message - # text:: [String] Message body - # to:: [String] Optional nick if directed to specific user - def say(text, to=nil) - send(Message.new(nil, text), to) - end - - ## - # Request the MUC to invite users to this room - # - # Sample usage: - # my_muc.invite( {'wiccarocks@shakespeare.lit/laptop' => 'This coven needs both wiccarocks and hag66.', - # 'hag66@shakespeare.lit' => 'This coven needs both hag66 and wiccarocks.'} ) - # recipients:: [Hash] of [JID] => [String] Reason - def invite(recipients) - msg = Message.new - x = msg.add(XMUCUser.new) - recipients.each { |jid,reason| - x.add(XMUCUserInvite.new(jid, reason)) - } - send(msg) - end - - ## - # Block to be invoked when a message *from* the room arrives - # - # Example: - # Astro has joined this session - # block:: Takes two arguments: time, text - def on_room_message(&block) - @room_message_block = block - end - - ## - # Block to be invoked when a message from a participant to - # the whole room arrives - # block:: Takes three arguments: time, sender nickname, text - def on_message(&block) - @message_block = block - end - - ## - # Block to be invoked when a private message from a participant - # to you arrives. - # block:: Takes three arguments: time, sender nickname, text - def on_private_message(&block) - @private_message_block = block - end - - ## - # Block to be invoked when somebody sets a new room subject - # block:: Takes three arguments: time, nickname, new subject - def on_subject(&block) - @subject_block = block - end - - ## - # Block to be called when somebody enters the room - # - # If there is a non-nil time passed to the block, chances - # are great that this is initial presence from a participant - # after you have joined the room. - # block:: Takes two arguments: time, nickname - def on_join(&block) - @join_block = block - end - - ## - # Block to be called when somebody leaves the room - # block:: Takes two arguments: time, nickname - def on_leave(&block) - @leave_block = block - end - - ## - # Block to be called when *you* leave the room - # - # Deactivation occurs *afterwards*. - # block:: Takes one argument: time - def on_self_leave(&block) - @self_leave_block = block - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/iq/mucowner.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/iq/mucowner.rb deleted file mode 100644 index 61e2b001e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/iq/mucowner.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'xmpp4r/x' - -module Jabber - module MUC - class IqQueryMUCOwner < IqQuery - name_xmlns 'query', 'http://jabber.org/protocol/muc#owner' - - include XParent - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/muc.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/muc.rb deleted file mode 100644 index a69702581..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/muc.rb +++ /dev/null @@ -1,70 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/muc/x/mucuseritem' -require 'xmpp4r/muc/x/mucuserinvite' - -module Jabber - module MUC - ## - # Class for elements - # with namespace http://jabber.org/protocol/muc - # - # See JEP-0045 for details - class XMUC < X - name_xmlns 'x', 'http://jabber.org/protocol/muc' - - ## - # Text content of the element - def password - first_element_text('password') - end - - ## - # Set the password for joining a room - # (text content of the element) - def password=(s) - if s - replace_element_text('password', s) - else - delete_elements('password') - end - end - end - - ## - # Class for elements - # with namespace http://jabber.org/protocol/muc#user - # - # See JEP-0058 for details - class XMUCUser < X - name_xmlns 'x', 'http://jabber.org/protocol/muc#user' - - ## - # Retrieve the three-digit code in - # - # result:: [Fixnum] or nil - def status_code - e = nil - each_element('status') { |xe| e = xe } - if e and e.attributes['code'].size == 3 and e.attributes['code'].to_i != 0 - e.attributes['code'].to_i - else - nil - end - end - - ## - # Get all elements - # result:: [Array] of [XMUCUserItem] - def items - res = [] - each_element('item') { |item| - res << item - } - res - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuserinvite.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuserinvite.rb deleted file mode 100644 index c5a037818..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuserinvite.rb +++ /dev/null @@ -1,60 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module MUC - class XMUCUserInvite < XMPPElement - name_xmlns 'invite', 'http://jabber.org/protocol/muc#user' - - def initialize(to=nil, reason=nil) - super() - set_to(to) - set_reason(reason) - end - - def to - attributes['to'].nil? ? nil : JID::new(attributes['to']) - end - - def to=(j) - attributes['to'] = j.nil? ? nil : j.to_s - end - - def set_to(j) - self.to = j - self - end - - def from - attributes['from'].nil? ? nil : JID::new(attributes['from']) - end - - def from=(j) - attributes['from'] = (j.nil? ? nil : j.to_s) - end - - def set_from(j) - self.from = j - self - end - - def reason - first_element_text('reason') - end - - def reason=(s) - if s - replace_element_text('reason', s) - else - delete_elements('reason') - end - end - - def set_reason(s) - self.reason = s - self - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuseritem.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuseritem.rb deleted file mode 100644 index d087b8976..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/muc/x/mucuseritem.rb +++ /dev/null @@ -1,150 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - module MUC - class XMUCUserItem < XMPPElement - name_xmlns 'item', 'http://jabber.org/protocol/muc#user' - - def initialize(affiliation=nil, role=nil, jid=nil) - super() - set_affiliation(affiliation) - set_role(role) - set_jid(jid) - end - - def affiliation - case attributes['affiliation'] - when 'admin' then :admin - when 'member' then :member - when 'none' then :none - when 'outcast' then :outcast - when 'owner' then :owner - else nil - end - end - - def affiliation=(v) - case v - when :admin then attributes['affiliation'] = 'admin' - when :member then attributes['affiliation'] = 'member' - when :none then attributes['affiliation'] = 'none' - when :outcast then attributes['affiliation'] = 'outcast' - when :owner then attributes['affiliation'] = 'owner' - else attributes['affiliation'] = nil - end - end - - def set_affiliation(v) - self.affiliation = v - self - end - - def jid - attributes['jid'].nil? ? nil : JID::new(attributes['jid']) - end - - def jid=(j) - attributes['jid'] = j.nil? ? nil : j.to_s - end - - def set_jid(j) - self.jid = j - self - end - - def nick - attributes['nick'] - end - - def nick=(n) - attributes['nick'] = n - end - - def set_nick(n) - self.nick = n - self - end - - def role - case attributes['role'] - when 'moderator' then :moderator - when 'none' then :none - when 'participant' then :participant - when 'visitor' then :visitor - else nil - end - end - - def role=(r) - case r - when :moderator then attributes['role'] = 'moderator' - when :none then attributes['role'] = 'none' - when :participant then attributes['role'] = 'participant' - when :visitor then attributes['role'] = 'visitor' - else attributes['role'] = nil - end - end - - def set_role(r) - self.role = r - self - end - - def reason - text = nil - each_element('reason') { |xe| text = xe.text } - text - end - - def reason=(s) - delete_elements('reasion') - add_element('reason').text = s - end - - def set_reason(s) - self.reason = s - self - end - - def continue - c = nil - each_element('continue') { |xe| c = xe } - c.nil? - end - - def continue=(c) - delete_elements('continue') - add_element('continue') if c - end - - def set_continue(c) - self.continue = c - self - end - - def actors - a = [] - each_element('actor') { |xe| - a.push(JID::new(xe.attributes['jid'])) - } - a - end - - def actors=(a) - delete_elements('actor') - a.each { |jid| - e = add_element('actor') - e.attributes['jid'] = jid.to_s - } - end - - def set_actors(a) - self.actors = a - self - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/presence.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/presence.rb deleted file mode 100644 index a660f8a96..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/presence.rb +++ /dev/null @@ -1,231 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppstanza' -require 'xmpp4r/x' - -module Jabber - ## - # The presence class is used to construct presence messages to - # send to the Jabber service. - class Presence < XMPPStanza - name_xmlns 'presence', 'jabber:client' - force_xmlns true - - include Comparable - include XParent - - ## - # Create presence stanza - # show:: [String] Initial Availability Status - # status:: [String] Initial status message - # priority:: [Fixnum] Initial priority value - def initialize(show=nil, status=nil, priority=nil) - super() - set_show(show) if show - set_status(status) if status - set_priority(priority) if priority - end - - ## - # Get type of presence - # - # result:: [Symbol] or [Nil] Possible values are: - # * :error - # * :probe (Servers send this to request presence information) - # * :subscribe (Subscription request) - # * :subscribed (Subscription approval) - # * :unavailable (User has gone offline) - # * :unsubscribe (Unsubscription request) - # * :unsubscribed (Unsubscription approval) - # * [nil] (available) - # See RFC3921 - 2.2.1. for explanation. - def type - case super - when 'error' then :error - when 'probe' then :probe - when 'subscribe' then :subscribe - when 'subscribed' then :subscribed - when 'unavailable' then :unavailable - when 'unsubscribe' then :unsubscribe - when 'unsubscribed' then :unsubscribed - else nil - end - end - - ## - # Set type of presence - # val:: [Symbol] See type for possible subscription types - def type=(val) - case val - when :error then super('error') - when :probe then super('probe') - when :subscribe then super('subscribe') - when :subscribed then super('subscribed') - when :unavailable then super('unavailable') - when :unsubscribe then super('unsubscribe') - when :unsubscribed then super('unsubscribed') - else super(nil) - end - end - - ## - # Set type of presence (chaining-friendly) - # val:: [Symbol] See type for possible subscription types - def set_type(val) - self.type = val - self - end - - ## - # Get Availability Status (RFC3921 - 5.2) - # result:: [Symbol] or [Nil] Valid values according to RFC3921: - # * nil (Available, no element) - # * :away - # * :chat (Free for chat) - # * :dnd (Do not disturb) - # * :xa (Extended away) - def show - e = first_element('show') - text = e ? e.text : nil - case text - when 'away' then :away - when 'chat' then :chat - when 'dnd' then :dnd - when 'xa' then :xa - else nil - end - end - - ## - # Set Availability Status - # val:: [Symbol] or [Nil] See show for explanation - def show=(val) - xe = first_element('show') - if xe.nil? - xe = add_element('show') - end - case val - when :away then text = 'away' - when :chat then text = 'chat' - when :dnd then text = 'dnd' - when :xa then text = 'xa' - when nil then text = nil - else raise "Invalid value for show." - end - - if text.nil? - delete_element(xe) - else - xe.text = text - end - end - - ## - # Set Availability Status (chaining-friendly) - # val:: [Symbol] or [Nil] See show for explanation - def set_show(val) - self.show = val - self - end - - ## - # Get status message - # result:: [String] or nil - def status - first_element_text('status') - end - - ## - # Set status message - # val:: [String] or nil - def status=(val) - if val.nil? - delete_element('status') - else - replace_element_text('status', val) - end - end - - ## - # Set status message (chaining-friendly) - # val:: [String] or nil - def set_status(val) - self.status = val - self - end - - ## - # Get presence priority, or nil if absent - # result:: [Integer] - def priority - e = first_element_text('priority') - if e - return e.to_i - else - return nil - end - end - - ## - # Set presence priority - # val:: [Integer] Priority value between -128 and +127 - # - # *Warning:* negative values make you receive no subscription requests etc. - # (RFC3921 - 2.2.2.3.) - def priority=(val) - if val.nil? - delete_element('priority') - else - replace_element_text('priority', val) - end - end - - ## - # Set presence priority (chaining-friendly) - # val:: [Integer] Priority value between -128 and +127 - def set_priority(val) - self.priority = val - self - end - - ## - # Compare two presences using priority - # (with cmp_interest as fall-back). - def <=>(o) - if priority.to_i == o.priority.to_i - cmp_interest(o) - else - priority.to_i <=> o.priority.to_i - end - end - - ## - # Compare two presences. The most suitable to talk with is the - # biggest. - PRESENCE_STATUS = { :chat => 4, - nil => 3, - :dnd => 2, - :away => 1, - :xa => 0, - :unavailable => -1, - :error => -2 } - def cmp_interest(o) - if type.nil? - if o.type.nil? - # both available. - PRESENCE_STATUS[show] <=> PRESENCE_STATUS[o.show] - else - return -1 - end - elsif o.type.nil? - return 1 - else - # both are non-nil. We consider this is equal. - return 0 - end - end - - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub.rb deleted file mode 100644 index 7909055a2..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub.rb +++ /dev/null @@ -1 +0,0 @@ -require 'xmpp4r/pubsub/helper/servicehelper' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodebrowser.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodebrowser.rb deleted file mode 100644 index 4165b37e6..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodebrowser.rb +++ /dev/null @@ -1,174 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/discovery' - -module Jabber - module PubSub - class NodeBrowser - ## - # Initialize a new NodeBrowser - # new(stream,pubsubservice) - # stream:: [Jabber::Stream] - def initialize(stream) - @stream = stream - end - - ## - # Retrive the nodes - # Throws an ErrorException when receiving - # - # jid:: [JID] Target entity (set only domain!) - # return:: [Array] of [String] or [nil] - def nodes(jid) - iq = Iq.new(:get,jid) - iq.from = @stream.jid - iq.add(Discovery::IqQueryDiscoItems.new) - nodes = [] - err = nil - @stream.send_with_id(iq) { |answer| - if answer.type == :result - answer.query.each_element('item') { |item| - nodes.push(item.node) - } - true - elsif answer.type == :error - err = answer.error - true - else - false - end - } - return nodes - end - - ## - # Retrive the nodes with names - # Throws an ErrorExeption when reciving - # - # jid:: [Jabber::JID] Target entity (set only domain!) - # return:: [Array] of [Hash] with keys 'node' => [String] and 'name' => [String] or [nil] - def nodes_names(jid) - iq = Iq.new(:get,jid) - iq.from = @stream.jid - iq.add(Discovery::IqQueryDiscoItems.new) - nodes = [] - err = nil - @stream.send_with_id(iq) { |answer| - if answer.type == :result - answer.query.each_element('item') { |item| - nodes.push( {'node' => item.node,'name' => item.iname } ) - } - true - elsif answer.type == :error - err = answer.error - true - else - false - end - } - return nodes - end - - - ## - # Retrive the items from a node - # Throws an ErrorExeption when reciving - # - # jid:: [Jabber::JID] Target entity (set only domain!) - # node:: [String] - # return:: [Array] of [Hash] with keys 'name' => [String] and 'jid' => [Jabber::JID] - def items(jid,node) - iq = Iq.new(:get,jid) - iq.from = @stream.jid - discoitems = Discovery::IqQueryDiscoItems.new - discoitems.node = node - iq.add(discoitems) - items = [] - err = nil - @stream.send_with_id(iq) { |answer| - if answer.type == :result - answer.query.each_element('item') { |item| - items.push( {'jid' => item.jid,'name' => item.iname } ) - } - true - elsif answer.type == :error - err = answer.error - true - else - false - end - } - return items - end - - ## - # get disco info for a node - # jid:: [Jabber::JID] - # node:: [String] - # return:: [Hash] with possible keys type:: [String] ,category:: [String],features:: [Array] of feature, nodeinformation:: [Jabber::XData] - # check http://www.xmpp.org/extensions/xep-0060.html#entity for more infos - - # this is only for a xep <-> nodebrowser.rb understanding - alias get_metadata get_info - - def get_info(jid,node) - iq = Iq.new(:get,jid) - iq.from = @stream.jid - discoinfo = Discovery::IqQueryDiscoInfo.new - discoinfo.node = node - iq.add(discoinfo) - info = {} - @stream.send_with_id(iq) { |answer| - if answer.type == :result - - identity = answer.query.identity - info['type'] = identity.type - info['category'] = identity.category - - info['features'] = answer.query.features - -# i think its not needed - if you think so then delete it -# answer.query.each_element('identity') { |identity| -# info['type'] = identity.type -# info['category'] = identity.category -# } -# -# features = [] -# answer.query.each_element('feature') { |feature| -# features.push(feature) -# } -# info['features'] = features -# - answer.query.each_element('x') { |x| - info['nodeinformation'] = x - } - end - } - return info - end - - ## - # get type of node - # jid:: [Jabber::JID] - # node:: [String] - # - def type(jid,node) - info = get_info(jid,node) - return info['type'] - end - - ## - # get category of node - # jid:: [Jabber::JID] - # node:: [String] - # - def category(jid,node) - info = get_info(jid,node) - return info['category'] - end - - end #class - end #module -end #module diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodehelper.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodehelper.rb deleted file mode 100644 index d7a0daf20..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/nodehelper.rb +++ /dev/null @@ -1,153 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ -# -# For a documentation of the retunvalues please look into the -# documentation of [Jabber::PubSub::ServiceHelper] -# This class is only a wrapper around [Jabber::PubSub::ServiceHelper] -# - - -require 'xmpp4r/pubsub/helper/servicehelper' -require 'xmpp4r/pubsub/helper/nodebrowser' - -module Jabber - module PubSub - class NodeHelper < ServiceHelper - - attr_reader :nodename - attr_reader :name - attr_reader :jiod - attr_reader :my_subscriptions - ## - # creates a new node - # new(client,service,nodename) - # stream:: [Jabber::Stream] - # jid:: [String] (jid of the pubsub service) - # nodename:: [String] - def initialize(stream,jid,nodename=nil,create_if_not_exist=true) - super(stream,jid) - @nodename = nodename - @jid = jid - @stream = client - - get_subscriptions - - if create_if_not_exist and not node_exist? - # if no nodename is given a instant node will created - # (if the service supports instant nodes) - @nodename = create_node - end - end - - ## - # creates the node - # create(configuration=nil) - # configuration:: [Jabber::XData] - def create_node(configuration=nil) - create(@nodename,configuration) - end - - ## - # get the configuration of the node - # get_configuration(configuration=nil) - # configuration:: [Jabber::XData] - def get_configuration(subid=nil) - get_options(@nodename,subid) - end - - ## - # set the configuration of the node - # set_configuration(configuration=nil) - # configuration:: [Jabber::XData] - # subid:: [String] default is nil - def set_configuration(configuration,subid=nil) - set_options(@nodename,configuration,subid) - end - - ## - # deletes the node - # delete - def delete_node - delete(@nodename) - end - - ## - # publishing content on this node - # publish_content(items) - # items:: [REXML::Element] - def publish_content(items) - publish(@nodename,items) - end - - ## - # gets all items from the node - # get_all_items - def get_all_items - items(@nodename) - end - - ## - # get a count of items - # get_items(count) - # count:: [Fixnum] - def get_items(count) - items(@nodename,count) - end - - ## - # get all node affiliations - # get_affiliations - def get_affiliations - affiliations - end - - ## - # get all subscriptions on this node - # get_subscriptions - def get_subscriptions - subscriptions(@nodename) - end - - ## - # get all subscribers subscribed on this node - # get_subscribers - def get_subscribers - @subscriptions = subscribers(@nodename) - end - - ## - # subscribe to this node - # do_subscribe - def do_subscribe - subscribe(@nodename) - get_subscriptions - end - - ## - # unsubscribe from this node - # do_unsubscribe(subid = nil) - # subid:: [String] - def do_unsubscribe(subid) - unsubscribe(@nodename,subid) - end - - ## - # purge all items from this node - # purge_items - def purge_items - purge(@nodename) - end - - private - - def node_exist? - nodebrowser = PubSub::NodeBrowser.new(@stream) - nodebrowser.nodes.include?(nodename) - end - def disco_info - end - - end #class - end #module -end #module diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/servicehelper.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/servicehelper.rb deleted file mode 100644 index b3c0a9c54..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/helper/servicehelper.rb +++ /dev/null @@ -1,326 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ -# -# It's recommented to read the XEP-0066 before you use this Helper. -# - -require 'xmpp4r/pubsub/iq/pubsub' -require 'xmpp4r/pubsub/stanzas/event' -require 'xmpp4r/pubsub/stanzas/item' -require 'xmpp4r/pubsub/stanzas/items' -require 'xmpp4r/pubsub/stanzas/subscription' -require 'xmpp4r/dataforms' - -module Jabber - module PubSub - ## - # A Helper representing a PubSub Service - class ServiceHelper - - ## - # Creates a new representation of a pubsub service - # client:: [Jabber::Stream] - # pubsubjid:: [String] or [Jabber::JID] - def initialize(client, pubsubjid) - @client = client - @pubsubjid = pubsubjid - @event_cbs = CallbackList.new - @client.add_message_callback(200,self) { |message| - handle_message(message) - } - end - - ## - # Create a new node on the pubsub service - # node:: [String] you node name - otherwise you get a automaticly generated one (in most cases) - # configure:: [Jabber::XMLStanza] if you want to configure you node (default nil) - # return:: [String] - def create(node=nil, configure=nil) - rnode = nil - iq = basic_pubsub_query(:set) - iq.pubsub.add(REXML::Element.new('create')).attributes['node'] = node - if configure - confele = REXML::Element.new('configure') - - if configure.type_of?(XMLStanza) - confele << configure - end - iq.pubsub.add(confele) - end - - @client.send_with_id(iq) do |reply| - if (create = reply.first_element('pubsub/create')) - rnode = create.attributes['node'] - end - true - end - - rnode - end - - ## - # Delete a pubsub node - # node:: [String] - # return:: true - def delete(node) - iq = basic_pubsub_query(:set,true) - iq.pubsub.add(REXML::Element.new('delete')).attributes['node'] = node - @client.send_with_id(iq) { |reply| - true - } - end - - ## - # NOTE: this method sends only one item per publish request because some services may not - # allow batch processing - # maybe this will changed in the future - # node:: [String] - # item:: [Jabber::PubSub::Item] - # return:: true - def publish(node,item) - iq = basic_pubsub_query(:set) - publish = iq.pubsub.add(REXML::Element.new('publish')) - publish.attributes['node'] = node - if item.kind_of?(Jabber::PubSub::Item) - publish.add(item) - @client.send_with_id(iq) { |reply| true } - end - end - - ## - # node:: [String] - # item:: [REXML::Element] - # id:: [String] - # return:: true - def publish_with_id(node,item,id) - if item.kind_of?(REXML::Element) - xmlitem = Jabber::PubSub::Item.new - xmlitem.id = id - xmlitem.add(item) - publish(node,xmlitem) - else - raise "given item is not a proper xml document or Jabber::PubSub::Item" - end - end - - ## - # gets all items from a pubsub node - # node:: [String] - # count:: [Fixnum] - # return:: [Hash] { id => [Jabber::PubSub::Item] } - def items(node,count=nil) - iq = basic_pubsub_query(:get) - items = Jabber::PubSub::Items.new - items.node = node - iq.pubsub.add(items) - res = nil - @client.send_with_id(iq) { |reply| - if reply.kind_of?(Iq) and reply.pubsub and reply.pubsub.first_element('items') - res = {} - reply.pubsub.first_element('items').each_element('item') do |item| - res[item.attributes['id']] = item.children.first if item.children.first - end - end - true - } - res - end - - ## - # shows the affiliations on a pubsub service - # return:: [Hash] of { node => symbol } - def affiliations - iq = basic_pubsub_query(:get) - iq.pubsub.add(REXML::Element.new('affiliations')) - res = nil - @client.send_with_id(iq) { |reply| - if reply.pubsub.first_element('affiliations') - res = {} - reply.pubsub.first_element('affiliations').each_element('affiliation') do |affiliation| - # TODO: This should be handled by an affiliation element class - aff = case affiliation.attributes['affiliation'] - when 'owner' then :owner - when 'publisher' then :publisher - when 'none' then :none - when 'outcast' then :outcast - else nil - end - res[affiliation.attributes['node']] = aff - end - end - true - } - res - end - - ## - # shows all subscriptions on the given node - # node:: [String], or nil for all - # return:: [Array] of [REXML::Element] - def subscriptions(node=nil) - iq = basic_pubsub_query(:get) - entities = iq.pubsub.add(REXML::Element.new('subscriptions')) - entities.attributes['node'] = node - res = nil - @client.send_with_id(iq) { |reply| - if reply.pubsub.first_element('subscriptions') - res = [] - reply.pubsub.first_element('subscriptions').each_element('subscription') { |subscription| - res << REXML::Element.new(subscription) - } - end - true - } - res - end - - ## - # shows all jids of subscribers of a node - # node:: [String] - # return:: [Array] of [String] - def subscribers(node) - res = [] - subscriptions(node).each { |sub| - res << sub.attributes['jid'] - } - res - end - - ## - # subscribe to a node - # node:: [String] - # return:: [Hash] of { attributename => value } - def subscribe(node) - iq = basic_pubsub_query(:set) - sub = REXML::Element.new('subscribe') - sub.attributes['node'] = node - sub.attributes['jid'] = @client.jid.strip - iq.pubsub.add(sub) - res = {} - @client.send_with_id(iq) do |reply| - pubsubanswer = reply.pubsub - if pubsubanswer.first_element('subscription') - pubsubanswer.each_element('subscription') { |element| - element.attributes.each { |name,value| res[name] = value } - } - end - true - end # @client.send_with_id(iq) - res - end - - ## - # Unsubscibe from a node with an optional subscription id - # - # May raise ErrorException - # node:: [String] - # subid:: [String] or nil - # return:: true - def unsubscribe(node,subid=nil) - iq = basic_pubsub_query(:set) - unsub = REXML::Element.new('unsubscribe') - unsub.attributes['node'] = node - unsub.attributes['jid'] = @client.jid.strip - unsub.attributes['subid'] = subid - iq.pubsub.add(unsub) - @client.send_with_id(iq) { |reply| true } # @client.send_with_id(iq) - end - - ## - # get options of a node - # node:: [String] - # subid:: [String] or nil - # return:: [Jabber::XData] - def get_options(node,subid=nil) - iq = basic_pubsub_query(:get) - opt = REXML::Element.new('options') - opt.attributes['node'] = node - opt.attributes['jid'] = @client.jid.strip - opt.attributes['subid'] = subid - iq.pubsub.add(opt) - ret = nil - @client.send_with_id(iq) { |reply| - reply.pubsub.options.first_element('x') { |xdata| - - ret = xdata if xdata.kind_of?(Jabber::XData) - - } - true - } - return ret - end - - ## - # set options for a node - # node:: [String] - # options:: [Jabber::XData] - # subid:: [String] or nil - # return:: true - def set_options(node,options,subid=nil) - iq = basic_pubsub_query(:set) - opt = REXML::Element.new('options') - opt.attributes['node'] = node - opt.attributes['jid'] = @client.jid.strip - opt.attributes['subid'] = subid - iq.pubsub.add(opt) - iq.pubsub.options.add(options) - @client.send_with_id(iq) { |reply| true } - end - - ## - # purges all items on a persist node - # node:: [String] - # return:: true - def purge(node) - iq = basic_pubsub_query(:set) - purge = REXML::Element.new('purge') - purge.attributes['node'] = node - iq.pubsub.add(purge) - @client.send_with_id(iq) { |reply| true } - end - - ## - # String representation - # result:: [String] The PubSub service's JID - def to_s - @pubsubjid.to_s - end - - ## - # Register callbacks for incoming events - # (i.e. Message stanzas containing) PubSub notifications - def add_event_callback(prio = 200, ref = nil, &block) - @event_cbs.add(prio, ref, block) - end - - private - - ## - # creates a basic pubsub iq - # basic_pubsub_query(type) - # type:: [Symbol] - def basic_pubsub_query(type,ownerusecase = false) - iq = Jabber::Iq::new(type,@pubsubjid) - if ownerusecase - iq.add(IqPubSubOwner.new) - else - iq.add(IqPubSub.new) - end - iq - end - - ## - # handling incoming events - # handle_message(message) - # message:: [Jabber::Message] - def handle_message(message) - if message.from == @pubsubjid and message.first_element('event').kind_of?(Jabber::PubSub::Event) - event = message.first_element('event') - @event_cbs.process(event) - end - end - - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/iq/pubsub.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/iq/pubsub.rb deleted file mode 100644 index d3f35018e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/iq/pubsub.rb +++ /dev/null @@ -1,19 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module PubSub - NS_PUBSUB = 'http://jabber.org/protocol/pubsub' - class IqPubSub < XMPPElement - name_xmlns 'pubsub', NS_PUBSUB - force_xmlns true - end - class IqPubSubOwner < XMPPElement - name_xmlns 'pubsub', NS_PUBSUB + '#owner' - force_xmlns true - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/event.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/event.rb deleted file mode 100644 index 51cf77a26..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/event.rb +++ /dev/null @@ -1,49 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module PubSub - - ## - # Event - # a publishing event - class Event < XMPPElement - name_xmlns 'event', NS_PUBSUB + '#event' - force_xmlns true - - ## - # return payload - def payload - elements - end - - ## - # add payload - # payload:: [REXML::Element] - def payload=(pl) - add_element = pl - end - - ## - # return the payload type - def event_type? - # each child of event - # this should interate only one time - each_element('./event/*') { |plelement| - case plelement.name - when 'collection' then return :collection - when 'configuration' then return :configuration - when 'delete' then return :delete - when 'items' then return :items - when 'purge' then return :purge - when 'subscription' then return :subscription - else return nil - end - } - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/item.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/item.rb deleted file mode 100644 index e6445c2b5..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/item.rb +++ /dev/null @@ -1,27 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module PubSub - ## - # Item - # One PubSub Item - class Item < XMPPElement - name_xmlns 'item', NS_PUBSUB - force_xmlns true - def initialize(id=nil) - super() - attributes['id'] = id - end - def id - attributes['id'] - end - def id=(myid) - attributes['id'] = myid - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/items.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/items.rb deleted file mode 100644 index 2bbb8e816..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/items.rb +++ /dev/null @@ -1,35 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module PubSub - ## - # Items - # a collection of Items - class Items < XMPPElement - name_xmlns 'items', NS_PUBSUB - force_xmlns true - def node - attributes['node'] - end - def node=(mynodename) - attributes['node'] = mynodename - end - def subid - attributes['subid'] - end - def subid=(mysubid) - attributes['subid'] = mysubid - end - def max_items - attributes['max_items'] - end - def max_items=(mymaxitems) - attributes['max_items'] = mymaxitems - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/subscription.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/subscription.rb deleted file mode 100644 index 87f1af336..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/pubsub/stanzas/subscription.rb +++ /dev/null @@ -1,58 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module PubSub - ## - # Subscription - class Subscription < XMPPElement - name_xmlns 'subscription', NS_PUBSUB - def initialize(myjid=nil,mynode=nil,mysubid=nil,mysubscription=nil) - super(true) - jid = myjid - node = mynode - subid = mysubid - state = mysubscription - end - def jid - attributes['jid'] - end - def jid=(myjid) - attributes['jid'] = myjid - end - - def node - attributes['node'] - end - def node=(mynode) - attributes['node'] = mynode - end - - def subid - attributes['subid'] - end - def subid=(mysubid) - attributes['subid'] = mysubid - end - - def state - # each child of event - # this should interate only one time - case attributes['subscription'] - when 'none' then return :none - when 'pending' then return :pending - when 'subscribed' then return :subscribed - when 'unconfigured' then return :items - else return nil - end - end - def state=(mystate) - attributes['subscription'] = mystate - end - alias subscription state - end - end -end \ No newline at end of file diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/query.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/query.rb deleted file mode 100644 index 9f9c1ddff..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/query.rb +++ /dev/null @@ -1,15 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppelement' - -module Jabber - ## - # A class used to build/parse IQ Query requests/responses - # - class IqQuery < XMPPElement - name_xmlns 'query' - force_xmlns true - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rexmladdons.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rexmladdons.rb deleted file mode 100644 index 167c7587e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rexmladdons.rb +++ /dev/null @@ -1,123 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'rexml/document' -require 'rexml/parsers/xpathparser' -require 'rexml/source' - -# Turn $VERBOSE off to suppress warnings about redefinition -oldverbose = $VERBOSE -$VERBOSE = false - -# REXML module. This file only adds the following methods to the REXML module, to -# ease the coding: -# * replace_element_text -# * first_element -# * first_element_text -# * typed_add -# * import -# * self.import -# * delete_elements -# -# Further definitions are just copied from REXML out of Ruby-1.8.4 to solve issues -# with REXML in Ruby-1.8.2. -# -# The redefinitions of Text::normalize and Attribute#initialize address an issue -# where entities in element texts and attributes were not escaped. This modifies -# the behavious of REXML a bit but Sean Russell intends a similar behaviour for -# the future of REXML. -module REXML - # this class adds a few helper methods to REXML::Element - class Element - ## - # Replaces or add a child element of name e with text t. - def replace_element_text(e, t) - el = first_element(e) - if el.nil? - el = REXML::Element::new(e) - add_element(el) - end - if t - el.text = t - end - self - end - - ## - # Returns first element of name e - def first_element(e) - each_element(e) { |el| return el } - return nil - end - - ## - # Returns text of first element of name e - def first_element_text(e) - el = first_element(e) - if el - return el.text - else - return nil - end - end - - # This method does exactly the same thing as add(), but it can be - # overriden by subclasses to provide on-the-fly object creations. - # For example, if you import a REXML::Element of name 'plop', and you - # have a Plop class that subclasses REXML::Element, with typed_add you - # can get your REXML::Element to be "magically" converted to Plop. - def typed_add(e) - add(e) - end - - ## - # import this element's children and attributes - def import(xmlelement) - if @name and @name != xmlelement.name - raise "Trying to import an #{xmlelement.name} to a #{@name} !" - end - add_attributes(xmlelement.attributes.clone) - @context = xmlelement.context - xmlelement.each do |e| - if e.kind_of? REXML::Element - typed_add(e.deep_clone) - else # text element, probably. - add(e.clone) - end - end - self - end - - def self.import(xmlelement) - self.new(xmlelement.name).import(xmlelement) - end - - ## - # Deletes one or more children elements, - # not just one like REXML::Element#delete_element - def delete_elements(element) - while(delete_element(element)) do end - end - end -end - -# very dirty fix for the :progress problem in REXML from Ruby 1.8.3 -# http://www.germane-software.com/projects/rexml/ticket/34 -# the fix proposed in REXML changeset 1145 only fixes this for pipes, not for -# TCP sockets, so we have to keep this. -module REXML - class IOSource - def position - 0 - end - - def current_line - [0, 0, ""] - end - end -end - -# Restore the old $VERBOSE setting -$VERBOSE = oldverbose - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster.rb deleted file mode 100644 index 2169cab64..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster.rb +++ /dev/null @@ -1,8 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/roster/iq/roster.rb' -require 'xmpp4r/roster/helper/roster.rb' -require 'xmpp4r/roster/x/roster.rb' - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/helper/roster.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/helper/roster.rb deleted file mode 100644 index 73e1a42e8..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/helper/roster.rb +++ /dev/null @@ -1,508 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/callbacks' -require 'thread' -require 'xmpp4r/roster/iq/roster' - -module Jabber - module Roster - ## - # The Roster helper intercepts stanzas with Jabber::IqQueryRoster - # and stanzas, but provides cbs which allow the programmer - # to keep track of updates. - # - # A thread for any received stanza is spawned, so the user can invoke - # accept_subscription et al in the callback blocks, without stopping - # the current (= parser) thread when waiting for a reply. - class Helper - ## - # All items in your roster - # items:: [Hash] ([JID] => [Roster::Helper::RosterItem]) - attr_reader :items - - ## - # Initialize a new Roster helper - # - # Registers its cbs (prio = 120, ref = self) - # - # Request a roster - # (Remember to send initial presence afterwards!) - # - # The initialization will not wait for the roster being received, - # use add_query_callback to get notifyed when Roster::Helper#items - # has been filled. - def initialize(stream) - @stream = stream - @items = {} - @items_lock = Mutex.new - @query_cbs = CallbackList.new - @update_cbs = CallbackList.new - @presence_cbs = CallbackList.new - @subscription_cbs = CallbackList.new - @subscription_request_cbs = CallbackList.new - - # Register cbs - stream.add_iq_callback(120, self) { |iq| - if iq.query.kind_of?(IqQueryRoster) - Thread.new do - Thread.current.abort_on_exception = true - handle_iq_query_roster(iq) - end - - true - else - false - end - } - stream.add_presence_callback(120, self) { |pres| - Thread.new do - Thread.current.abort_on_exception = true - handle_presence(pres) - end - } - - # Request the roster - rosterget = Iq.new_rosterget - stream.send(rosterget) - end - - ## - # Add a callback to be called when a query has been processed - # - # Because update callbacks are called for each roster item, - # this may be appropriate to notify that *anything* has updated. - # - # Arguments for callback block: The received stanza - def add_query_callback(prio = 0, ref = nil, &block) - @query_cbs.add(prio, ref, block) - end - - ## - # Add a callback for Jabber::Roster::Helper::RosterItem updates - # - # Note that this will be called much after initialization - # for the answer of the initial roster request - # - # The block receives two objects: - # * the old Jabber::Roster::Helper::RosterItem - # * the new Jabber::Roster::Helper::RosterItem - def add_update_callback(prio = 0, ref = nil, &block) - @update_cbs.add(prio, ref, block) - end - - ## - # Add a callback for Jabber::Presence updates - # - # This will be called for stanzas for known RosterItems. - # Unknown JIDs may still pass and can be caught via Jabber::Stream#add_presence_callback. - # - # The block receives three objects: - # * the Jabber::Roster::Helper::RosterItem - # * the old Jabber::Presence (or nil) - # * the new Jabber::Presence (or nil) - def add_presence_callback(prio = 0, ref = nil, &block) - @presence_cbs.add(prio, ref, block) - end - - ## - # Add a callback for subscription updates, - # which will be called upon receiving a stanza - # with type: - # * :subscribed - # * :unsubscribe - # * :unsubscribed - # - # The block receives two objects: - # * the Jabber::Roster::Helper::RosterItem (or nil) - # * the stanza - def add_subscription_callback(prio = 0, ref = nil, &block) - @subscription_cbs.add(prio, ref, block) - end - - ## - # Add a callback for subscription requests, - # which will be called upon receiving a stanza - # - # The block receives two objects: - # * the Jabber::Roster::Helper::RosterItem (or nil) - # * the stanza - # - # Response to this event can be taken with accept_subscription - # and decline_subscription. - # - # Example usage: - # my_roster.add_subscription_request_callback do |item,presence| - # if accept_subscription_requests - # my_roster.accept_subscription(presence.from) - # else - # my_roster.decline_subscription(presence.from) - # end - # end - def add_subscription_request_callback(prio = 0, ref = nil, &block) - @subscription_request_cbs.add(prio, ref, block) - end - - private - - ## - # Handle received stanzas, - # used internally - def handle_iq_query_roster(iq) - # If the contains we just ignore that - # and assume an empty roster - iq.query.each_element('item') do |item| - olditem, newitem = nil, nil - - @items_lock.synchronize { - olditem = @items[item.jid] - - # Handle deletion of item - if item.subscription == :remove - @items.delete(item.jid) - else - newitem = @items[item.jid] = RosterItem.new(@stream).import(item) - end - } - @update_cbs.process(olditem, newitem) - end - - @query_cbs.process(iq) - end - - ## - # Handle received stanzas, - # used internally - def handle_presence(pres) - item = self[pres.from] - - if [:subscribed, :unsubscribe, :unsubscribed].include?(pres.type) - @subscription_cbs.process(item, pres) - true - - elsif pres.type == :subscribe - @subscription_request_cbs.process(item, pres) - true - - else - unless item.nil? - update_presence(item, pres) - true # Callback consumed stanza - else - false # Callback did not consume stanza - end - end - end - - ## - # Update the presence of an item, - # used internally - # - # Callbacks are called here - def update_presence(item, pres) - - # This requires special handling, to announce all resources offline - if pres.from.resource.nil? and pres.type == :error - oldpresences = [] - item.each_presence do |oldpres| - oldpresences << oldpres - end - - item.add_presence(pres) - oldpresences.each { |oldpres| - @presence_cbs.process(item, oldpres, pres) - } - else - oldpres = item.presence(pres.from).nil? ? - nil : - Presence.new.import(item.presence(pres.from)) - - item.add_presence(pres) - @presence_cbs.process(item, oldpres, pres) - end - end - - public - - ## - # Get an item by jid - # - # If not available tries to look for it with the resource stripped - def [](jid) - jid = JID.new(jid) unless jid.kind_of? JID - - @items_lock.synchronize { - if @items.has_key?(jid) - @items[jid] - elsif @items.has_key?(jid.strip) - @items[jid.strip] - else - nil - end - } - end - - ## - # Returns the list of RosterItems which, stripped, are equal to the - # one you are looking for. - def find(jid) - jid = JID.new(jid) unless jid.kind_of? JID - - j = jid.strip - l = {} - @items_lock.synchronize { - @items.each_pair do |k, v| - l[k] = v if k.strip == j - end - } - l - end - - ## - # Groups in this Roster, - # sorted by name - # - # Contains +nil+ if there are ungrouped items - # result:: [Array] containing group names (String) - def groups - res = [] - @items_lock.synchronize { - @items.each_pair do |jid,item| - res += item.groups - res += [nil] if item.groups == [] - end - } - res.uniq.sort { |a,b| a.to_s <=> b.to_s } - end - - ## - # Get items in a group - # - # When group is nil, return ungrouped items - # group:: [String] Group name - # result:: Array of [RosterItem] - def find_by_group(group) - res = [] - @items_lock.synchronize { - @items.each_pair do |jid,item| - res.push(item) if item.groups.include?(group) - res.push(item) if item.groups == [] and group.nil? - end - } - res - end - - ## - # Add a user to your roster - # - # Threading is encouraged as the function waits for - # a result. ErrorException is thrown upon error. - # - # See Jabber::Roster::Helper::RosterItem#subscribe for details - # about subscribing. (This method isn't used here but the - # same functionality applies.) - # - # If the item is already in the local roster - # it will simply send itself - # jid:: [JID] to add - # iname:: [String] Optional item name - # subscribe:: [Boolean] Whether to subscribe to this jid - def add(jid, iname=nil, subscribe=false) - if self[jid] - self[jid].send - else - request = Iq.new_rosterset - request.query.add(Jabber::Roster::RosterItem.new(jid, iname)) - @stream.send_with_id(request) { true } - # Adding to list is handled by handle_iq_query_roster - end - - if subscribe - # Actually the item *should* already be known now, - # but we do it manually to exclude conditions. - pres = Presence.new.set_type(:subscribe).set_to(jid.strip) - @stream.send(pres) - end - end - - ## - # Accept a subscription request - # * Sends a stanza - # * Adds the contact to your roster - # jid:: [JID] of contact - # iname:: [String] Optional roster item name - def accept_subscription(jid, iname=nil) - pres = Presence.new.set_type(:subscribed).set_to(jid.strip) - @stream.send(pres) - - unless self[jid.strip] - request = Iq.new_rosterset - request.query.add(Jabber::Roster::RosterItem.new(jid.strip, iname)) - @stream.send_with_id(request) { true } - end - end - - ## - # Decline a subscription request - # * Sends a stanza - def decline_subscription(jid) - pres = Presence.new.set_type(:unsubscribed).set_to(jid.strip) - @stream.send(pres) - end - - ## - # These are extensions to RosterItem to carry presence information. - # This information is *not* stored in XML! - class RosterItem < Jabber::Roster::RosterItem - ## - # Tracked (online) presences of this RosterItem - attr_reader :presences - - ## - # Initialize an empty RosterItem - def initialize(stream) - super() - @stream = stream - @presences = [] - @presences_lock = Mutex.new - end - - ## - # Send the updated RosterItem to the server, - # i.e. if you modified iname, groups, ... - def send - request = Iq.new_rosterset - request.query.add(self) - @stream.send(request) - end - - ## - # Remove item - # - # This cancels both subscription *from* the contact to you - # and from you *to* the contact. - # - # The methods waits for a roster push from the server (success) - # or throws ErrorException upon failure. - def remove - request = Iq.new_rosterset - request.query.add(Jabber::Roster::RosterItem.new(jid, nil, :remove)) - @stream.send_with_id(request) { true } - # Removing from list is handled by Roster#handle_iq_query_roster - end - - ## - # Is any presence of this person on-line? - # - # (Or is there any presence? Unavailable presences are - # deleted.) - def online? - @presences_lock.synchronize { - @presences.select { |pres| - pres.type.nil? - }.size > 0 - } - end - - ## - # Iterate through all received stanzas - def each_presence(&block) - # Don't lock here, we don't know what block does... - @presences.each { |pres| - yield(pres) - } - end - - ## - # Get specific presence - # jid:: [JID] Full JID - def presence(jid) - @presences_lock.synchronize { - @presences.each { |pres| - return(pres) if pres.from == jid - } - } - nil - end - - ## - # Add presence and sort presences - # (unless type is :unavailable or :error) - # - # This overwrites previous stanzas with the same destination - # JID to keep track of resources. Presence stanzas with - # type == :unavailable or type == :error will - # be deleted as this indicates that this resource has gone - # offline. - # - # If type == :error and the presence's origin has no - # specific resource the contact is treated completely offline. - def add_presence(newpres) - @presences_lock.synchronize { - # Delete old presences with the same JID - @presences.delete_if do |pres| - pres.from == newpres.from or pres.from.resource.nil? - end - - if newpres.type == :error and newpres.from.resource.nil? - # Replace by single error presence - @presences = [newpres] - else - # Add new presence - @presences.push(newpres) - end - - @presences.sort! - } - end - - ## - # Send subscription request to the user - # - # The block given to Jabber::Roster::Roster#add_update_callback will - # be called, carrying the RosterItem with ask="subscribe" - # - # This function returns immediately after sending the subscription - # request and will not wait of approval or declination as it may - # take months for the contact to decide. ;-) - def subscribe - pres = Presence.new.set_type(:subscribe).set_to(jid.strip) - @stream.send(pres) - end - - ## - # Unsubscribe from a contact's presence - # - # This method waits for a presence with type='unsubscribed' - # from the contact. It may throw ErrorException upon failure. - # - # subscription attribute of the item is *from* or *none* - # afterwards. As long as you don't remove that item and - # subscription='from' the contact is subscribed to your - # presence. - def unsubscribe - pres = Presence.new.set_type(:unsubscribe).set_to(jid.strip) - @stream.send(pres) { |answer| - answer.type == :unsubscribed and - answer.from.strip == pres.to - } - end - - ## - # Deny the contact to see your presence. - # - # This method will not wait and returns immediately - # as you will need no confirmation for this action. - # - # Though, you will get a roster update for that item, - # carrying either subscription='to' or 'none'. - def cancel_subscription - pres = Presence.new.set_type(:unsubscribed).set_to(jid) - @stream.send(pres) - end - end - end #Class Roster - end #Module Roster -end #Module Jabber - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/iq/roster.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/iq/roster.rb deleted file mode 100755 index 10b220453..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/iq/roster.rb +++ /dev/null @@ -1,215 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/query' - -module Jabber - module Roster - ## - # Class for handling roster updates - # - # You must do 'client.send(Iq.new_rosterget)' or else you will - # have nothing to put in receive_iq() - # - # You must require 'xmpp4r/rosterquery' to use this class - # as its functionality is not needed for a working XMPP implementation. - # This will make [IqQuery] convert all Queries with namespace 'jabber:iq:roster' - # to [IqQueryRoster] - # - # This contains multiple children. See RosterItem. - class IqQueryRoster < IqQuery - name_xmlns 'query', 'jabber:iq:roster' - - ## - # Iterate through all items - # &block:: Yield for every [RosterItem] - def each(&block) - each_element { |item| - # XPath won't work here as it's missing a prefix... - yield(item) if item.kind_of?(RosterItem) - } - end - - ## - # Get roster item by JID - # jid:: [JID] or [Nil] - # result:: [RosterItem] - def [](jid) - each { |item| - return(item) if item.jid == jid - } - nil - end - - ## - # Get all items - # result:: [Array] of [RosterItem] - def to_a - a = [] - each { |item| - a.push(item) - } - a - end - - ## - # Update roster by stanza - # (to be fed by an iq_callback) - # iq:: [Iq] Containing new roster - # filter:: [Boolean] If false import non-roster-like results too - def receive_iq(iq, filter=true) - if filter && (((iq.type != :set) && (iq.type != :result)) || (iq.queryns != 'jabber:iq:roster')) - return - end - - import(iq.query) - end - - ## - # Output for "p" - # - # JIDs of all contained [RosterItem] elements are joined with a comma - # result:: [String] - def inspect - jids = to_a.collect { |item| item.jid.inspect } - jids.join(', ') - end - end - - ## - # Class containing the elements of the roster - # - # The 'name' attribute has been renamed to 'iname' here - # as 'name' is already used by REXML::Element for the - # element's name. It's still name='...' in XML. - class RosterItem < XMPPElement - name_xmlns 'item', 'jabber:iq:roster' - - ## - # Construct a new roster item - # jid:: [JID] Jabber ID - # iname:: [String] Name in the roster - # subscription:: [Symbol] Type of subscription (see RosterItem#subscription=) - # ask:: [Symbol] or [Nil] Can be :subscribe - def initialize(jid=nil, iname=nil, subscription=nil, ask=nil) - super() - self.jid = jid - self.iname = iname - self.subscription = subscription - self.ask = ask - end - - ## - # Get name of roster item - # - # names can be set by the roster's owner himself - # return:: [String] - def iname - attributes['name'] - end - - ## - # Set name of roster item - # val:: [String] Name for this item - def iname=(val) - attributes['name'] = val - end - - ## - # Get JID of roster item - # Resource of the JID will _not_ be stripped - # return:: [JID] - def jid - (a = attributes['jid']) ? JID::new(a) : nil - end - - ## - # Set JID of roster item - # val:: [JID] or nil - def jid=(val) - attributes['jid'] = val.nil? ? nil : val.to_s - end - - ## - # Get subscription type of roster item - # result:: [Symbol] or [Nil] The following values are valid according to RFC3921: - # * :both - # * :from - # * :none - # * :remove - # * :to - def subscription - case attributes['subscription'] - when 'both' then :both - when 'from' then :from - when 'none' then :none - when 'remove' then :remove - when 'to' then :to - else nil - end - end - - ## - # Set subscription type of roster item - # val:: [Symbol] or [Nil] See subscription for possible Symbols - def subscription=(val) - case val - when :both then attributes['subscription'] = 'both' - when :from then attributes['subscription'] = 'from' - when :none then attributes['subscription'] = 'none' - when :remove then attributes['subscription'] = 'remove' - when :to then attributes['subscription'] = 'to' - else attributes['subscription'] = nil - end - end - - ## - # Get if asking for subscription - # result:: [Symbol] nil or :subscribe - def ask - case attributes['ask'] - when 'subscribe' then :subscribe - else nil - end - end - - ## - # Set if asking for subscription - # val:: [Symbol] nil or :subscribe - def ask=(val) - case val - when :subscribe then attributes['ask'] = 'subscribe' - else attributes['ask'] = nil - end - end - - ## - # Get groups the item belongs to - # result:: [Array] of [String] The groups - def groups - result = [] - each_element('group') { |group| - result.push(group.text) - } - result.uniq - end - - ## - # Set groups the item belongs to, - # deletes old groups first. - # - # See JEP 0083 for nested groups - # ary:: [Array] New groups, duplicate values will be removed - def groups=(ary) - # Delete old group elements - delete_elements('group') - - # Add new group elements - ary.uniq.each { |group| - add_element('group').text = group - } - end - end - end #Module Roster -end #Module Jabber diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/x/roster.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/x/roster.rb deleted file mode 100755 index c0f60fff0..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/roster/x/roster.rb +++ /dev/null @@ -1,138 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/x' -require 'xmpp4r/jid' - -module Jabber - module Roster - ## - # Implementation of JEP-0144 - # for - # attached to stanzas - # - # Should be backwards compatible to JEP-0093, - # as only action attribute of roster items are missing there. - # Pay attention to the namespace which is jabber:x:roster - # for JEP-0093! - class XRoster < X - name_xmlns 'x', 'jabber:x:roster' - end #Class XRoster - - class RosterX < XRoster - name_xmlns 'x', 'http://jabber.org/protocol/rosterx' - end - - ## - # Class containing an element - # - # The 'name' attribute has been renamed to 'iname' here - # as 'name' is already used by REXML::Element for the - # element's name. It's still name='...' in XML. - # - # This is all a bit analoguous to Jabber::RosterItem, used by - # Jabber::IqQueryRoster. But this class lacks the subscription and - # ask attributes. - class XRosterItem < XMPPElement - name_xmlns 'item', 'jabber:x:roster' - - ## - # Construct a new roster item - # jid:: [JID] Jabber ID - # iname:: [String] Name in the roster - def initialize(jid=nil, iname=nil) - super() - self.jid = jid - self.iname = iname - end - - ## - # Get name of roster item - # - # names can be set by the roster's owner himself - # return:: [String] - def iname - attributes['name'] - end - - ## - # Set name of roster item - # val:: [String] Name for this item - def iname=(val) - attributes['name'] = val - end - - ## - # Get JID of roster item - # Resource of the JID will _not_ be stripped - # return:: [JID] - def jid - JID::new(attributes['jid']) - end - - ## - # Set JID of roster item - # val:: [JID] or nil - def jid=(val) - attributes['jid'] = val.nil? ? nil : val.to_s - end - - ## - # Get action for this roster item - # * :add - # * :modify - # * :delete - # result:: [Symbol] (defaults to :add according to JEP-0144) - def action - case attributes['action'] - when 'modify' then :modify - when 'delete' then :delete - else :add - end - end - - ## - # Set action for this roster item - # (see action) - def action=(a) - case a - when :modify then attributes['action'] = 'modify' - when :delete then attributes['action'] = 'delete' - else attributes['action'] = 'add' - end - end - - ## - # Get groups the item belongs to - # result:: [Array] of [String] The groups - def groups - result = [] - each_element('group') { |group| - result.push(group.text) - } - result - end - - ## - # Set groups the item belongs to, - # deletes old groups first. - # - # See JEP 0083 for nested groups - # ary:: [Array] New groups, duplicate values will be removed - def groups=(ary) - # Delete old group elements - delete_elements('group') - - # Add new group elements - ary.uniq.each { |group| - add_element('group').text = group - } - end - end #Class XRosterItem - - class RosterXItem < XRosterItem - name_xmlns 'item', 'http://jabber.org/protocol/rosterx' - end - end #Module Roster -end #Module Jabber diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc.rb deleted file mode 100644 index 584680068..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc.rb +++ /dev/null @@ -1,2 +0,0 @@ -require 'xmpp4r/rpc/helper/client' -require 'xmpp4r/rpc/helper/server' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/client.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/client.rb deleted file mode 100644 index 6b31c0c0a..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/client.rb +++ /dev/null @@ -1,114 +0,0 @@ -require 'xmlrpc/server' -require 'xmlrpc/parser' -require 'xmlrpc/create' -require 'xmlrpc/config' -require 'xmlrpc/utils' # ParserWriterChooseMixin - -require 'xmpp4r/dataforms/x/data' -require 'xmpp4r/rpc/iq/rpc' -require 'xmpp4r/rpc/helper/xmlrpcaddons' - -module Jabber - module RPC - - ## - # XMLRPC Client - class Client - - include XMLRPC::ParserWriterChooseMixin - include XMLRPC::ParseContentType - - attr_accessor :my_jid - - ## - # xmppstream - # stream:: [Stream] - # jid where you want to send the rpc requests to - # jid:: [JID] rpcserver@jabberserver/ressource - def initialize(stream,jid) - @jid = JID.new(jid) - @my_jid = stream.jid - @stream = stream - @parser = nil - @create = XMLRPC::Create.new - end - - def call(method, *args) - ok, param = call2(method, *args) - if ok - param - else - raise param - end - end - - def call2(method, *args) - request = @create.methodCall(method, *args) - data = do_rpc(request) - parser().parseMethodResponse(data) - end - - ## - # adds multi rpcalls to the query - # methods:: [Array] - def multicall(*methods) - ok, params = multicall2(*methods) - if ok - params - else - raise params - end - end - - ## - # generate a multicall - # methods:: [Array] - def multicall2(*methods) - gen_multicall(methods) - end - - def do_rpc(xmlrpc) - iq = Iq.new(:set, @jid) - iq.from = @my_jid - iq.id = IdGenerator::generate_id - rpcquery = iq.add(IqQueryRPC.new) - rpcquery.typed_add(xmlrpc) - - result = nil - @stream.send_with_id(iq) { |iqreply| - if iqreply.type == :result and iqreply.query.kind_of?(IqQueryRPC) - result = iqreply.query.to_s - true - else - false - end - } - - result - end - - private - - def gen_multicall(methods=[]) - ok, params = call2("system.multicall", - methods.collect { |m| {'methodName' => m[0], 'params' => m[1..-1]} } - ) - - if ok - params = params.collect{ |param| - if param.is_a? Array - param[0] - elsif param.is_a? Hash - XMLRPC::FaultException.new(param["faultCode"], param["faultString"]) - else - raise "Wrong multicall return value" - end - } - end - - return ok, params - end - end - end # Helpers -end # Jabber - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/server.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/server.rb deleted file mode 100644 index 45d342036..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/server.rb +++ /dev/null @@ -1,75 +0,0 @@ -require 'xmlrpc/server' -require 'xmlrpc/parser' -require 'xmlrpc/create' -require 'xmlrpc/config' -require 'xmlrpc/utils' # ParserWriterChooseMixin - -require 'xmpp4r/dataforms/x/data' -require 'xmpp4r/rpc/iq/rpc' -require 'xmpp4r/rpc/helper/xmlrpcaddons' - -module Jabber - module RPC - - ## - # XMLRPC Server - class Server < XMLRPC::BasicServer - - include XMLRPC::ParserWriterChooseMixin - include XMLRPC::ParseContentType - - ## - # new - creates a new server - # - def initialize(stream,class_delim=".") - super(class_delim) - @stream = stream - @stream.add_iq_callback(120,"Helpers::RPCServer") { |iq| - if iq.type == :set and iq.type != :result - handle_iq(iq) - true - else - false - end - } - end - - ## - # handles incoming iqs - # iq:: [Jabber::IQ] - the jabber iq - def handle_iq(iq) - if iq.type == :set - if iq.query.kind_of?(IqQueryRPC) - data = iq.query - response = IqQueryRPC.new - data.elements.each { |rpc| - if rpc - response.typed_add(handle_rpc_requests(rpc)) - end - } - - respiq = iq.answer(false) - respiq.type = :result - respiq.add(response) - @stream.send(respiq) - end - end - end - - private - - ## - # handles the rpc requests - # takes rpcdata:: [String] - def handle_rpc_requests(rpcdata) - resp = process(rpcdata.to_s) - if resp == nil or resp.size <= 0 - raise Jabber::Error.new(:forbidden) - else - return resp - end - end - end # RPCServer - end # Helpers -end # Jabber - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb deleted file mode 100644 index 7a52bb161..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/helper/xmlrpcaddons.rb +++ /dev/null @@ -1,57 +0,0 @@ -require "xmlrpc/parser" -require "xmlrpc/create" -require "xmlrpc/config" -require "xmlrpc/utils" # ParserWriterChooseMixin - - -module XMLRPC - class Create - ## - # create a Method Call - # name:: [String] name of the method - # params:: [Array] params of the method as a array - def methodCall(name, *params) - name = name.to_s - - if name !~ /[a-zA-Z0-9_.:\/]+/ - raise ArgumentError, "Wrong XML-RPC method-name" - end - - parameter = params.collect { |param| - @writer.ele("param", conv2value(param)) - } - - tree = @writer.document( - @writer.ele("methodCall", - @writer.tag("methodName", name), - @writer.ele("params", *parameter) - ) - ) - - @writer.document_to_str(tree) + "\n" - end - ## - # create a response to a method call - # is_ret:: [TrueClass] is this a return (true) or a error (false) - # params:: [Array] a array of params - - def methodResponse(is_ret, *params) - - if is_ret - resp = params.collect do |param| - @writer.ele("param", conv2value(param)) - end - - resp = [@writer.ele("params", *resp)] - else - if params.size != 1 or params[0] === XMLRPC::FaultException - raise ArgumentError, "no valid fault-structure given" - end - resp = @writer.ele("fault", conv2value(params[0].to_h)) - end - - tree = @writer.document(@writer.ele("methodResponse", resp)) - @writer.document_to_str(tree) + "\n" - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/iq/rpc.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/iq/rpc.rb deleted file mode 100644 index fd373812d..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/rpc/iq/rpc.rb +++ /dev/null @@ -1,24 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/query' - -module Jabber - module RPC - class IqQueryRPC < IqQuery - NS_RPC = 'jabber:iq:rpc' - name_xmlns 'query', NS_RPC - - # TODO: Is typed_add with a String right here? - def typed_add(e) - if e.kind_of? String - typed_add(REXML::Document.new(e).root) - else - super - end - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/sasl.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/sasl.rb deleted file mode 100644 index 915400991..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/sasl.rb +++ /dev/null @@ -1,216 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'base64' -require 'digest/md5' - -module Jabber - ## - # Helpers for SASL authentication (RFC2222) - # - # You might not need to use them directly, they are - # invoked by Jabber::Client#auth - module SASL - NS_SASL = 'urn:ietf:params:xml:ns:xmpp-sasl' - - ## - # Factory function to obtain a SASL helper for the specified mechanism - def SASL::new(stream, mechanism) - case mechanism - when 'DIGEST-MD5' - DigestMD5.new(stream) - when 'PLAIN' - Plain.new(stream) - else - raise "Unknown SASL mechanism: #{mechanism}" - end - end - - ## - # SASL mechanism base class (stub) - class Base - def initialize(stream) - @stream = stream - end - - private - - def generate_auth(mechanism, text=nil) - auth = REXML::Element.new 'auth' - auth.add_namespace NS_SASL - auth.attributes['mechanism'] = mechanism - auth.text = text - auth - end - - def generate_nonce - Digest::MD5.hexdigest(Time.new.to_f.to_s) - end - end - - ## - # SASL PLAIN authentication helper (RFC2595) - class Plain < Base - ## - # Authenticate via sending password in clear-text - def auth(password) - auth_text = "#{@stream.jid.strip}\x00#{@stream.jid.node}\x00#{password}" - error = nil - @stream.send(generate_auth('PLAIN', Base64::encode64(auth_text).gsub(/\s/, ''))) { |reply| - if reply.name != 'success' - error = reply.first_element(nil).name - end - true - } - - raise error if error - end - end - - ## - # SASL DIGEST-MD5 authentication helper (RFC2831) - class DigestMD5 < Base - ## - # Sends the wished auth mechanism and wait for a challenge - # - # (proceed with DigestMD5#auth) - def initialize(stream) - super - - challenge = {} - error = nil - @stream.send(generate_auth('DIGEST-MD5')) { |reply| - if reply.name == 'challenge' and reply.namespace == NS_SASL - challenge = decode_challenge(reply.text) - else - error = reply.first_element(nil).name - end - true - } - raise error if error - - @nonce = challenge['nonce'] - @realm = challenge['realm'] - end - - def decode_challenge(challenge) - text = Base64::decode64(challenge) - res = {} - - state = :key - key = '' - value = '' - - text.scan(/./) do |ch| - if state == :key - if ch == '=' - state = :value - else - key += ch - end - - elsif state == :value - if ch == ',' - res[key] = value - key = '' - value = '' - state = :key - elsif ch == '"' and value == '' - state = :quote - else - value += ch - end - - elsif state == :quote - if ch == '"' - state = :value - else - value += ch - end - end - end - res[key] = value unless key == '' - - Jabber::debuglog("SASL DIGEST-MD5 challenge:\n#{text.inspect}\n#{res.inspect}") - - res - end - - ## - # * Send a response - # * Wait for the server's challenge (which aren't checked) - # * Send a blind response to the server's challenge - def auth(password) - response = {} - response['nonce'] = @nonce - response['charset'] = 'utf-8' - response['username'] = @stream.jid.node - response['realm'] = @realm || @stream.jid.domain - response['cnonce'] = generate_nonce - response['nc'] = '00000001' - response['qop'] = 'auth' - response['digest-uri'] = "xmpp/#{@stream.jid.domain}" - response['response'] = response_value(@stream.jid.node, @stream.jid.domain, response['digest-uri'], password, @nonce, response['cnonce'], response['qop']) - response.each { |key,value| - unless %w(nc qop response charset).include? key - response[key] = "\"#{value}\"" - end - } - - response_text = response.collect { |k,v| "#{k}=#{v}" }.join(',') - Jabber::debuglog("SASL DIGEST-MD5 response:\n#{response_text}") - - r = REXML::Element.new('response') - r.add_namespace NS_SASL - r.text = Base64::encode64(response_text).gsub(/\s/, '') - - success_already = false - error = nil - @stream.send(r) { |reply| - if reply.name == 'success' - success_already = true - elsif reply.name != 'challenge' - error = reply.first_element(nil).name - end - true - } - - return if success_already - raise error if error - - # TODO: check the challenge from the server - - r.text = nil - @stream.send(r) { |reply| - if reply.name != 'success' - error = reply.first_element(nil).name - end - true - } - - raise error if error - end - - private - - ## - # Function from RFC2831 - def h(s); Digest::MD5.digest(s); end - ## - # Function from RFC2831 - def hh(s); Digest::MD5.hexdigest(s); end - - ## - # Calculate the value for the response field - def response_value(username, realm, digest_uri, passwd, nonce, cnonce, qop) - a1_h = h("#{username}:#{realm}:#{passwd}") - a1 = "#{a1_h}:#{nonce}:#{cnonce}" - #a2 = "AUTHENTICATE:#{digest_uri}#{(qop == 'auth') ? '' : ':00000000000000000000000000000000'}" - a2 = "AUTHENTICATE:#{digest_uri}" - - hh("#{hh(a1)}:#{nonce}:00000001:#{cnonce}:#{qop}:#{hh(a2)}") - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/semaphore.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/semaphore.rb deleted file mode 100644 index 23e7e4e41..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/semaphore.rb +++ /dev/null @@ -1,38 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -module Jabber - ## - # This class implements semaphore for threads synchronization. - class Semaphore - - ## - # Initialize new semaphore - # - # val:: [Integer] number of threads, that can enter to section - def initialize(val=0) - @tickets = val - @lock = Mutex.new - @cond = ConditionVariable.new - end - - ## - # Waits until are available some free tickets - def wait - @lock.synchronize { - @cond.wait(@lock) while !(@tickets > 0) - @tickets -= 1 - } - end - - ## - # Unlocks guarded section, increments number of free tickets - def run - @lock.synchronize { - @tickets += 1 - @cond.signal - } - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/stream.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/stream.rb deleted file mode 100644 index a3b6e27a9..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/stream.rb +++ /dev/null @@ -1,502 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/callbacks' -require 'socket' -require 'thread' -require 'xmpp4r/semaphore' -require 'xmpp4r/streamparser' -require 'xmpp4r/presence' -require 'xmpp4r/message' -require 'xmpp4r/iq' -require 'xmpp4r/errorexception' -require 'xmpp4r/debuglog' -require 'xmpp4r/idgenerator' - -module Jabber - ## - # The stream class manages a connection stream (a file descriptor using which - # XML messages are read and sent) - # - # You may register callbacks for the three Jabber stanzas - # (message, presence and iq) and use the send and send_with_id - # methods. - # - # To ensure the order of received stanzas, callback blocks are - # launched in the parser thread. If further blocking operations - # are intended in those callbacks, run your own thread there. - class Stream - DISCONNECTED = 1 - CONNECTED = 2 - - # file descriptor used - attr_reader :fd - - # connection status - attr_reader :status - - ## - # Create a new stream - # (just initializes) - def initialize(threaded = true) - unless threaded - raise "Non-threaded mode was removed from XMPP4R." - end - @fd = nil - @status = DISCONNECTED - @xmlcbs = CallbackList::new - @stanzacbs = CallbackList::new - @messagecbs = CallbackList::new - @iqcbs = CallbackList::new - @presencecbs = CallbackList::new - @send_lock = Mutex.new - @last_send = Time.now - @exception_block = nil - @threadblocks = [] - @wakeup_thread = nil - @streamid = nil - @streamns = 'jabber:client' - @features_sem = Semaphore.new - @parser_thread = nil - end - - ## - # Start the XML parser on the fd - def start(fd) - @stream_mechanisms = [] - @stream_features = {} - - @fd = fd - @parser = StreamParser.new(@fd, self) - @parser_thread = Thread.new do - Thread.current.abort_on_exception = true - begin - @parser.parse - Jabber::debuglog("DISCONNECTED\n") - - if @exception_block - Thread.new { close!; @exception_block.call(nil, self, :disconnected) } - else - close! - end - rescue Exception => e - Jabber::debuglog("EXCEPTION:\n#{e.class}\n#{e.message}\n#{e.backtrace.join("\n")}") - - if @exception_block - Thread.new do - Thread.current.abort_on_exception = true - close - @exception_block.call(e, self, :start) - end - else - if Jabber::debug - puts "Exception caught in Parser thread! (#{e.class})" - puts e.backtrace - end - close! - raise - end - end - end - - @status = CONNECTED - end - - def stop - @parser_thread.kill - @parser = nil - end - - ## - # Mounts a block to handle exceptions if they occur during the - # poll send. This will likely be the first indication that - # the socket dropped in a Jabber Session. - # - # The block has to take three arguments: - # * the Exception - # * the Jabber::Stream object (self) - # * a symbol where it happened, namely :start, :parser, :sending and :end - def on_exception(&block) - @exception_block = block - end - - ## - # This method is called by the parser when a failure occurs - def parse_failure(e) - Jabber::debuglog("EXCEPTION:\n#{e.class}\n#{e.message}\n#{e.backtrace.join("\n")}") - - # A new thread has to be created because close will cause the thread - # to commit suicide(???) - if @exception_block - # New thread, because close will kill the current thread - Thread.new do - Thread.current.abort_on_exception = true - close - @exception_block.call(e, self, :parser) - end - else - puts "Stream#parse_failure was called by XML parser. Dumping " + - "backtrace...\n" + e.exception + "\n" - puts e.backtrace - close - raise - end - end - - ## - # This method is called by the parser upon receiving - def parser_end - if @exception_block - Thread.new do - Thread.current.abort_on_exception = true - close - @exception_block.call(nil, self, :close) - end - else - close - end - end - - ## - # Returns if this connection is connected to a Jabber service - # return:: [Boolean] Connection status - def is_connected? - return @status == CONNECTED - end - - ## - # Returns if this connection is NOT connected to a Jabber service - # - # return:: [Boolean] Connection status - def is_disconnected? - return @status == DISCONNECTED - end - - ## - # Processes a received REXML::Element and executes - # registered thread blocks and filters against it. - # - # element:: [REXML::Element] The received element - def receive(element) - Jabber::debuglog("RECEIVED:\n#{element.to_s}") - - if element.namespace('').to_s == '' # REXML namespaces are always strings - element.add_namespace(@streamns) - end - - case element.prefix - when 'stream' - case element.name - when 'stream' - stanza = element - @streamid = element.attributes['id'] - @streamns = element.namespace('') if element.namespace('') - - # Hack: component streams are basically client streams. - # Someday we may want to create special stanza classes - # for components/s2s deriving from normal stanzas but - # posessing these namespaces - @streamns = 'jabber:client' if @streamns == 'jabber:component:accept' - - unless element.attributes['version'] # isn't XMPP compliant, so - Jabber::debuglog("FEATURES: server not XMPP compliant, will not wait for features") - @features_sem.run # don't wait for - end - when 'features' - stanza = element - element.each { |e| - if e.name == 'mechanisms' and e.namespace == 'urn:ietf:params:xml:ns:xmpp-sasl' - e.each_element('mechanism') { |mech| - @stream_mechanisms.push(mech.text) - } - else - @stream_features[e.name] = e.namespace - end - } - Jabber::debuglog("FEATURES: received") - @features_sem.run - else - stanza = element - end - else - # Any stanza, classes are registered by XMPPElement::name_xmlns - begin - stanza = XMPPStanza::import(element) - rescue NoNameXmlnsRegistered - stanza = element - end - end - - # Iterate through blocked threads (= waiting for an answer) - # - # We're dup'ping the @threadblocks here, so that we won't end up in an - # endless loop if Stream#send is being nested. That means, the nested - # threadblock won't receive the stanza currently processed, but the next - # one. - threadblocks = @threadblocks.dup - threadblocks.each { |threadblock| - exception = nil - r = false - begin - r = threadblock.call(stanza) - rescue Exception => e - exception = e - end - - if r == true - @threadblocks.delete(threadblock) - threadblock.wakeup - return - elsif exception - @threadblocks.delete(threadblock) - threadblock.raise(exception) - end - } - - Jabber::debuglog("PROCESSING:\n#{stanza.to_s} (#{stanza.class})") - return true if @xmlcbs.process(stanza) - return true if @stanzacbs.process(stanza) - case stanza - when Message - return true if @messagecbs.process(stanza) - when Iq - return true if @iqcbs.process(stanza) - when Presence - return true if @presencecbs.process(stanza) - end - end - - ## - # This is used by Jabber::Stream internally to - # keep track of any blocks which were passed to - # Stream#send. - class ThreadBlock - def initialize(block) - @block = block - @waiter = Semaphore.new - @exception = nil - end - def call(*args) - @block.call(*args) - end - def wait - @waiter.wait - raise @exception if @exception - end - def wakeup - # TODO: Handle threadblock removal if !alive? - @waiter.run - end - def raise(exception) - @exception = exception - @waiter.run - end - end - - def send_data(data) - @send_lock.synchronize do - @last_send = Time.now - @fd << data - @fd.flush - end - end - - ## - # Sends XML data to the socket and (optionally) waits - # to process received data. - # - # Do not invoke this in a callback but in a seperate thread - # because we may not suspend the parser-thread (in whose - # context callbacks are executed). - # - # xml:: [String] The xml data to send - # &block:: [Block] The optional block - def send(xml, &block) - Jabber::debuglog("SENDING:\n#{xml}") - @threadblocks.unshift(threadblock = ThreadBlock.new(block)) if block - begin - # Temporarily remove stanza's namespace to - # reduce bandwidth consumption - if xml.kind_of? XMPPStanza and xml.namespace == 'jabber:client' - xml.delete_namespace - send_data(xml.to_s) - xml.add_namespace(@streamns) - else - send_data(xml.to_s) - end - rescue Exception => e - Jabber::debuglog("EXCEPTION:\n#{e.class}\n#{e.message}\n#{e.backtrace.join("\n")}") - - if @exception_block - Thread.new do - Thread.current.abort_on_exception = true - close! - @exception_block.call(e, self, :sending) - end - else - if Jabber::debug - puts "Exception caught while sending! (#{e.class})" - puts e.backtrace - end - close! - raise - end - end - # The parser thread might be running this (think of a callback running send()) - # If this is the case, we mustn't stop (or we would cause a deadlock) - if block and Thread.current != @parser_thread - threadblock.wait - elsif block - Jabber::debuglog("WARNING:\nCannot stop current thread in Jabber::Stream#send because it is the parser thread!") - end - end - - ## - # Send an XMMP stanza with an Jabber::XMPPStanza#id. The id will be - # generated by Jabber::IdGenerator if not already set. - # - # The block will be called once: when receiving a stanza with the - # same Jabber::XMPPStanza#id. There is no need to return true to - # complete this! Instead the return value of the block will be - # returned. - # - # Be aware that if a stanza with type='error' is received - # the function does not yield but raises an ErrorException with - # the corresponding error element. - # - # Please see Stream#send for some implementational details. - # - # Please read the note about nesting at Stream#send - # xml:: [XMPPStanza] - def send_with_id(xml, &block) - if xml.id.nil? - xml.id = Jabber::IdGenerator.instance.generate_id - end - - res = nil - error = nil - send(xml) do |received| - if received.kind_of? XMPPStanza and received.id == xml.id - if received.type == :error - error = (received.error ? received.error : Error.new) - true - else - res = yield(received) - true - end - else - false - end - end - - unless error.nil? - raise ErrorException.new(error) - end - - res - end - - ## - # Adds a callback block to process received XML messages - # - # priority:: [Integer] The callback's priority, the higher, the sooner - # ref:: [String] The callback's reference - # &block:: [Block] The optional block - def add_xml_callback(priority = 0, ref = nil, &block) - @xmlcbs.add(priority, ref, block) - end - - ## - # Delete an XML-messages callback - # - # ref:: [String] The reference of the callback to delete - def delete_xml_callback(ref) - @xmlcbs.delete(ref) - end - - ## - # Adds a callback block to process received Messages - # - # priority:: [Integer] The callback's priority, the higher, the sooner - # ref:: [String] The callback's reference - # &block:: [Block] The optional block - def add_message_callback(priority = 0, ref = nil, &block) - @messagecbs.add(priority, ref, block) - end - - ## - # Delete an Message callback - # - # ref:: [String] The reference of the callback to delete - def delete_message_callback(ref) - @messagecbs.delete(ref) - end - - ## - # Adds a callback block to process received Stanzas - # - # priority:: [Integer] The callback's priority, the higher, the sooner - # ref:: [String] The callback's reference - # &block:: [Block] The optional block - def add_stanza_callback(priority = 0, ref = nil, &block) - @stanzacbs.add(priority, ref, block) - end - - ## - # Delete a Stanza callback - # - # ref:: [String] The reference of the callback to delete - def delete_stanza_callback(ref) - @stanzacbs.delete(ref) - end - - ## - # Adds a callback block to process received Presences - # - # priority:: [Integer] The callback's priority, the higher, the sooner - # ref:: [String] The callback's reference - # &block:: [Block] The optional block - def add_presence_callback(priority = 0, ref = nil, &block) - @presencecbs.add(priority, ref, block) - end - - ## - # Delete a Presence callback - # - # ref:: [String] The reference of the callback to delete - def delete_presence_callback(ref) - @presencecbs.delete(ref) - end - - ## - # Adds a callback block to process received Iqs - # - # priority:: [Integer] The callback's priority, the higher, the sooner - # ref:: [String] The callback's reference - # &block:: [Block] The optional block - def add_iq_callback(priority = 0, ref = nil, &block) - @iqcbs.add(priority, ref, block) - end - - ## - # Delete an Iq callback - # - # ref:: [String] The reference of the callback to delete - # - def delete_iq_callback(ref) - @iqcbs.delete(ref) - end - ## - # Closes the connection to the Jabber service - def close - close! - end - - def close! - @parser_thread.kill if @parser_thread - @fd.close if @fd and !@fd.closed? - @status = DISCONNECTED - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/streamparser.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/streamparser.rb deleted file mode 100644 index 495446e07..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/streamparser.rb +++ /dev/null @@ -1,77 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'rexml/parsers/sax2parser' -require 'rexml/source' -require 'xmpp4r/rexmladdons' - -module Jabber - - ## - # The StreamParser uses REXML to parse the incoming XML stream - # of the Jabber protocol and fires XMPPStanza at the Connection - # instance. - # - class StreamParser - # status if the parser is started - attr_reader :started - - ## - # Constructs a parser for the supplied stream (socket input) - # - # stream:: [IO] Socket input stream - # listener:: [Object.receive(XMPPStanza)] The listener (usually a Jabber::Protocol::Connection instance) - # - def initialize(stream, listener) - @stream = stream - @listener = listener - @current = nil - end - - ## - # Begins parsing the XML stream and does not return until - # the stream closes. - # - def parse - @started = false - begin - parser = REXML::Parsers::SAX2Parser.new @stream - - parser.listen( :start_element ) do |uri, localname, qname, attributes| - e = REXML::Element::new(qname) - e.add_attributes attributes - @current = @current.nil? ? e : @current.add_element(e) - - if @current.name == 'stream' and !@started - @started = true - @listener.receive(@current) - @current = nil - end - end - - parser.listen( :end_element ) do |uri, localname, qname| - if qname == 'stream:stream' and @current.nil? - @started = false - @listener.parser_end - else - @listener.receive(@current) unless @current.parent - @current = @current.parent - end - end - - parser.listen( :characters ) do | text | - @current.text = @current.text.to_s + text if @current - end - - parser.listen( :cdata ) do | text | - raise "Not implemented !" - end - - parser.parse - rescue REXML::ParseException => e - @listener.parse_failure(e) - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard.rb deleted file mode 100644 index 6fc6c6198..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard.rb +++ /dev/null @@ -1,7 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/vcard/helper/vcard.rb' -require 'xmpp4r/vcard/iq/vcard.rb' - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/helper/vcard.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/helper/vcard.rb deleted file mode 100644 index 23a35406a..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/helper/vcard.rb +++ /dev/null @@ -1,86 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' -require 'xmpp4r/errorexception' - -module Jabber - module Vcard - ## - # The Vcard helper retrieves vCards - class Helper - ## - # Initialize a new Vcard helper - def initialize(stream) - @stream = stream - end - - ## - # Retrieve vCard of an entity - # - # Raises exception upon retrieval error, please catch that! - # (The exception is ErrorException and is raisen by - # Stream#send_with_id. - # - # Usage of Threads is suggested here as vCards can be very - # big (see /iq/vCard/PHOTO/BINVAL). - # - # jid:: [Jabber::JID] or nil (should be stripped, nil for the client's own vCard) - # result:: [Jabber::IqVcard] or nil (nil results may be handled as empty vCards) - def get(jid=nil) - res = nil - request = Iq.new(:get, jid) - request.from = @stream.jid # Enable components to use this - request.add(IqVcard.new) - @stream.send_with_id(request) { |answer| - # No check for sender or queryns needed (see send_with_id) - if answer.type == :result - res = answer.vcard - true - else - false - end - } - res - end - - ## - # Set your own vCard (Clients only) - # - # Raises exception when setting fails - # - # Usage of Threads suggested here, too. The function - # waits for approval from the server. - # - # iqvcard:: [Jabber::IqVcard] - def set(iqvcard) - iq = Iq.new(:set) - iq.add(iqvcard) - - @stream.send_with_id(iq) { |answer| - if answer.type == :result - true - else - false - end - } - end - - ## - # Quickly initialize a Vcard helper and get - # a vCard. See Vcard#get - def self.get(stream, jid=nil) - new(stream).get(jid) - end - - ## - # Quickly initialize a Vcard helper and set - # your vCard. See Vcard#set - def self.set(stream, iqvcard) - new(stream).set(iqvcard) - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/iq/vcard.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/iq/vcard.rb deleted file mode 100644 index 0b99a915d..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/vcard/iq/vcard.rb +++ /dev/null @@ -1,95 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' - -module Jabber - module Vcard - ## - # vCard container for User Information - # (can be specified by users themselves, mostly kept on servers) - # (JEP 0054) - class IqVcard < XMPPElement - name_xmlns 'vCard', 'vcard-temp' - force_xmlns true - - ## - # Initialize a element - # fields:: [Hash] Initialize with keys as XPath element names and values for element texts - def initialize(fields=nil) - super() - - unless fields.nil? - fields.each { |name,value| - self[name] = value - } - end - end - - ## - # Get an elements/fields text - # - # vCards have too much possible children, so ask for them here - # and extract the result with iqvcard.element('...').text - # name:: [String] XPath - def [](name) - text = nil - each_element(name) { |child| text = child.text } - text - end - - ## - # Set an elements/fields text - # name:: [String] XPath - # text:: [String] Value - def []=(name, text) - xe = self - name.split(/\//).each do |elementname| - # Does the children already exist? - newxe = nil - xe.each_element(elementname) { |child| newxe = child } - - if newxe.nil? - # Create a new - xe = xe.add_element(elementname) - else - # Or take existing - xe = newxe - end - end - xe.text = text - end - - ## - # Get vCard field names - # - # Example: - # ["NICKNAME", "BDAY", "ORG/ORGUNIT", "PHOTO/TYPE", "PHOTO/BINVAL"] - # - # result:: [Array] of [String] - def fields - element_names(self).uniq - end - - ## - # Recursive helper function, - # returns all element names in an array, concatenated - # to their parent's name with a slash - def element_names(xe, prefix='') # :nodoc: - res = [] - xe.each_element { |child| - if child.kind_of?(REXML::Element) - children = element_names(child, "#{prefix}#{child.name}/") - if children == [] - res.push("#{prefix}#{child.name}") - else - res += children - end - end - } - res - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/version.rb deleted file mode 100644 index 9ca09d1d6..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version.rb +++ /dev/null @@ -1,7 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/version/helper/responder.rb' -require 'xmpp4r/version/helper/simpleresponder.rb' -require 'xmpp4r/version/iq/version.rb' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/responder.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/responder.rb deleted file mode 100644 index 74d4a7a4e..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/responder.rb +++ /dev/null @@ -1,72 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/callbacks' -require 'xmpp4r/version/iq/version' - -module Jabber - module Version - ## - # A class to answer version requests using IqQueryVersion - # - # If you don't need the flexibility of dynamic responses with - # the callback you can register with add_version_callback, - # take a look at SimpleResponder - class Responder - ## - # Initialize a new version responder - # - # Registers it's callback (prio = 180, ref = self) - # stream:: [Stream] Where to register callback handlers - def initialize(stream) - @stream = stream - @versioncbs = CallbackList.new - - stream.add_iq_callback(180, self) { |iq| - iq_callback(iq) - } - end - - ## - # Add a callback for Iq stanzas with IqQueryVersion - # - # First argument passed to block is the Iq stanza, - # second argument is a block, which can be called with - # software name, version and os - # - # Example: - # my_version_helper.add_version_callback { |iq,block| - # block.call('Cool client', '6.0', 'Cool OS') - # } - def add_version_callback(priority = 0, ref = nil, &block) - @versioncbs.add(priority, ref, block) - end - - ## - # callback handler to answer Software Version queries - # (registered by constructor and used internally only) - # - # Used internally - def iq_callback(iq) - if iq.type == :get - if iq.query.kind_of?(IqQueryVersion) - replyblock = lambda { |name,version,os| - answer = iq.answer - answer.type = :result - answer.query.set_iname(name).set_version(version).set_os(os) - - @stream.send(answer) - true - } - @versioncbs.process(iq, replyblock) - else - false - end - else - false - end - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/simpleresponder.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/simpleresponder.rb deleted file mode 100644 index 724050884..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/helper/simpleresponder.rb +++ /dev/null @@ -1,44 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/iq' -require 'xmpp4r/version/helper/responder' - -module Jabber - module Version - ## - # A class to answer version requests using IqQueryVersion - # - # This is simplification as one doesn't need dynamic - # version answering normally. - # - # Example usage: - # Jabber::Version::SimpleResponder.new(my_client, "My cool XMPP4R script", "1.0", "Younicks") - class SimpleResponder < Responder - attr_accessor :name - attr_accessor :version - attr_accessor :os - - ## - # Initialize a new version responder - # - # Registers it's callback (prio = 180, ref = self) - # stream:: [Stream] Where to register callback handlers - # name:: [String] Software name for answers - # version:: [String] Software versio for answers - # os:: [String] Optional operating system name for answers - def initialize(stream, name, version, os=nil) - super stream - - @name = name - @version = version - @os = os - - add_version_callback(180, self) { |iq,block| - block.call(@name, @version, @os) - } - end - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/iq/version.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/iq/version.rb deleted file mode 100755 index c9c94f592..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/version/iq/version.rb +++ /dev/null @@ -1,106 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/query' - -module Jabber - module Version - ## - # Class for handling queries for 'Software Version' - # (JEP 0092) - # - # Notice that according to JEP 0092 only the element can be omitted, - # (iname) and must be present - class IqQueryVersion < IqQuery - name_xmlns 'query', 'jabber:iq:version' - - ## - # Create a new element - def initialize(iname=nil, version=nil, os=nil) - super() - set_iname(iname) if iname - set_version(version) if version - set_os(os) if os - end - - ## - # Get the name of the software - # - # This has been renamed to 'iname' here to keep - # REXML::Element#name accessible - def iname - first_element_text('name') - end - - ## - # Set the name of the software - # - # The element won't be deleted if text is nil as - # it must occur in a version query, but its text will - # be empty. - def iname=(text) - replace_element_text('name', text.nil? ? '' : text) - end - - ## - # Set the name of the software (chaining-friendly) - # result:: [String] or nil - def set_iname(text) - self.iname = text - self - end - - ## - # Get the version of the software - # result:: [String] or nil - def version - first_element_text('version') - end - - ## - # Set the version of the software - # - # The element won't be deleted if text is nil as - # it must occur in a version query - def version=(text) - replace_element_text('version', text.nil? ? '' : text) - end - - ## - # Set the version of the software (chaining-friendly) - # text:: [String] - def set_version(text) - self.version = text - self - end - - ## - # Get the operating system or nil - # (os is not mandatory for Version Query) - def os - first_element_text('os') - end - - ## - # Set the os of the software - # text:: [String] or nil - def os=(text) - if text - replace_element_text('os', text) - else - delete_elements('os') - end - end - - ## - # Set the os of the software (chaining-friendly) - # text:: [String] or nil - def set_os(text) - self.os = text - self - end - end - end -end - diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/x.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/x.rb deleted file mode 100644 index 53e0d03a2..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/x.rb +++ /dev/null @@ -1,37 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppelement' - -module Jabber - ## - # A class used to build/parse elements - # - # These elements may occur as "attachments" - # in [Message] and [Presence] stanzas - class X < XMPPElement - name_xmlns 'x' - force_xmlns true - end - - module XParent - ## - # Get the first element in this stanza, or nil if none found. - # wanted_xmlns:: [String] Optional, find the first element having this xmlns, - # wanted_xmlns can also be a derivate of XMPPElement from which the namespace will be taken - # result:: [REXML::Element] or nil - def x(wanted_xmlns=nil) - if wanted_xmlns.kind_of? Class and wanted_xmlns.ancestors.include? XMPPElement - wanted_xmlns = wanted_xmlns.new.namespace - end - - each_element('x') { |x| - if wanted_xmlns.nil? or wanted_xmlns == x.namespace - return x - end - } - nil - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmpp4r.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmpp4r.rb deleted file mode 100644 index f47a85a6a..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmpp4r.rb +++ /dev/null @@ -1,16 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -## -# The Jabber module is the root namespace of the library. You might want -# to Include it in your script to ease your coding. It provides -# a simple debug logging support. -module Jabber - # XMPP4R Version number - XMPP4R_VERSION = '0.3.2' -end - -require 'xmpp4r/client' -require 'xmpp4r/component' -require 'xmpp4r/debuglog' diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppelement.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppelement.rb deleted file mode 100644 index 670ddf90c..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppelement.rb +++ /dev/null @@ -1,152 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/rexmladdons' - -module Jabber - class NoNameXmlnsRegistered < RuntimeError - def initialize(klass) - super "Class #{klass} has not set name and xmlns" - end - end - - ## - # This class represents an XML element and provides functionality - # for automatic casting of XML element classes according to their - # element name and namespace. - # - # Deriving classes must met these criteria: - # * The element name and namespace must be specified by calling - # the name_xmlns class method - # * The class constructor must be callable with no mandatory parameter - class XMPPElement < REXML::Element - @@name_xmlns_classes = {} - @@force_xmlns = false - - ## - # Specify XML element name and xmlns for a deriving class, - # this pair and the class will be added to a global pool - # - # If the namespace is nil the class is a "wildcard class" - # matching elements with any xmlns if no other class with - # that namespace was defined - def self.name_xmlns(name, xmlns=nil) - @@name_xmlns_classes[[name, xmlns]] = self - end - - ## - # Set whether this element is always built with an xmlns attribute - def self.force_xmlns(force) - @@force_xmlns = force - end - - ## - # Whether this element is always built with an xmlns attribute - def self.force_xmlns? - @@force_xmlns - end - - ## - # Find the name and namespace for a given class. - # This class must have registered these two values - # by calling name_xmlns at definition time. - # - # Raises an exception if none was found - # klass:: [Class] - # result:: [String, String] name and namespace - def self.name_xmlns_for_class(klass) - klass.ancestors.each do |klass1| - @@name_xmlns_classes.each do |name_xmlns,k| - if klass1 == k - return name_xmlns - end - end - end - - raise NoNameXmlnsRegistered.new(klass) - end - - ## - # Find a class for given name and namespace - # name:: [String] - # xmlns:: [String] - # result:: A descendant of XMPPElement or REXML::Element - def self.class_for_name_xmlns(name, xmlns) - if @@name_xmlns_classes.has_key? [name, xmlns] - @@name_xmlns_classes[[name, xmlns]] - elsif @@name_xmlns_classes.has_key? [name, nil] - @@name_xmlns_classes[[name, nil]] - else - REXML::Element - end - end - - ## - # Import another REXML::Element descendant to: - # * Either an element class that registered with - # name and xmlns before - # * Or if none was found to the class itself - # (you may call this class method on a deriving class) - def self.import(element) - klass = class_for_name_xmlns(element.name, element.namespace) - if klass != self and klass.ancestors.include?(self) - klass.new.import(element) - else - self.new.import(element) - end - end - - ## - # Initialize this element, which will then be initialized - # with the name registered with name_xmlns. - def initialize(*arg) - if arg.empty? - name, xmlns = self.class::name_xmlns_for_class(self.class) - super(name) - if self.class::force_xmlns? - add_namespace(xmlns) - end - else - super - end - end - - ## - # Add a child element which will be imported according to the - # child's name and xmlns - # element:: [REXML::Element] Child - # result:: [REXML::Element or descendant of XMPPElement] New child - def typed_add(element) - if element.kind_of? REXML::Element - element_ns = (element.namespace.to_s == '') ? namespace : element.namespace - - klass = XMPPElement::class_for_name_xmlns(element.name, element_ns) - if klass != element.class - element = klass.import(element) - end - end - - super(element) - end - - def parent=(new_parent) - if parent and parent.namespace('') == namespace('') and attributes['xmlns'].nil? - add_namespace parent.namespace('') - end - - super - - if new_parent and new_parent.namespace('') == namespace('') - delete_namespace - end - end - - def clone - cloned = self.class.new - cloned.add_attributes self.attributes.clone - cloned.context = @context - cloned - end - end -end diff --git a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppstanza.rb b/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppstanza.rb deleted file mode 100644 index 084183f08..000000000 --- a/vendor/xmpp4r-0.3.2/lib/xmpp4r/xmppstanza.rb +++ /dev/null @@ -1,162 +0,0 @@ -# =XMPP4R - XMPP Library for Ruby -# License:: Ruby's license (see the LICENSE file) or GNU GPL, at your option. -# Website::http://home.gna.org/xmpp4r/ - -require 'xmpp4r/xmppelement' -require 'xmpp4r/error' -require 'xmpp4r/jid' - -module Jabber - ## - # root class of all Jabber XML elements - class XMPPStanza < XMPPElement - ## - # Compose a response by doing the following: - # * Create a new XMPPStanza of the same subclass - # with the same element-name - # * Import xmppstanza if import is true - # * Swap 'to' and 'from' - # * Copy 'id' - # * Does not take care about the type - # - # *Attention*: Be careful when answering to stanzas with - # type == :error - answering to an error may generate - # another error on the other side, which could be leading to a - # ping-pong effect quickly! - # - # xmppstanza:: [XMPPStanza] source - # import:: [true or false] Copy attributes and children of source - # result:: [XMPPStanza] answer stanza - def XMPPStanza.answer(xmppstanza, import=true) - x = xmppstanza.class::new - if import - x.import(xmppstanza) - end - x.from = xmppstanza.to - x.to = xmppstanza.from - x.id = xmppstanza.id - x - end - - ## - # Return the first child - def error - first_element('error') - end - - ## - # Compose a response of this XMPPStanza - # (see XMPPStanza.answer) - # result:: [XMPPStanza] New constructed stanza - def answer(import=true) - XMPPStanza.answer(self, import) - end - - ## - # Makes some changes to the structure of an XML element to help - # it respect the specification. For example, in a message, we should - # have < < { rest of tags } - def normalize - end - - ## - # get the to attribute - # - # return:: [String] the element's to attribute - def to - (a = attribute('to')).nil? ? a : JID::new(a.value) - end - - ## - # set the to attribute - # - # v:: [String] the value to set - def to= (v) - add_attribute('to', v ? v.to_s : nil) - end - - ## - # set the to attribute (chaining-friendly) - # - # v:: [String] the value to set - def set_to(v) - self.to = v - self - end - - ## - # get the from attribute - # - # return:: [String] the element's from attribute - def from - (a = attribute('from')).nil? ? a : JID::new(a.value) - end - - ## - # set the from attribute - # - # v:: [String] the value from set - def from= (v) - add_attribute('from', v ? v.to_s : nil) - end - - ## - # set the from attribute (chaining-friendly) - # - # v:: [String] the value from set - def set_from(v) - add_attribute('from', v ? v.to_s : nil) - self - end - - ## - # get the id attribute - # - # return:: [String] the element's id attribute - def id - (a = attribute('id')).nil? ? a : a.value - end - - ## - # set the id attribute - # - # v:: [String] the value id set - def id= (v) - add_attribute('id', v) - end - - ## - # set the id attribute (chaining-friendly) - # - # v:: [String] the value id set - def set_id(v) - add_attribute('id', v) - self - end - - ## - # get the type attribute - # - # return:: [String] the element's type attribute - def type - (a = attribute('type')).nil? ? a : a.value - end - - ## - # set the type attribute - # - # v:: [String] the value type set - def type= (v) - add_attribute('type', v) - end - - ## - # set the type attribute (chaining-friendly) - # - # v:: [String] the value type set - def set_type(v) - add_attribute('type', v) - self - end - end -end diff --git a/vendor/xmpp4r-0.3.2/setup.rb b/vendor/xmpp4r-0.3.2/setup.rb deleted file mode 100755 index 03de9bf1a..000000000 --- a/vendor/xmpp4r-0.3.2/setup.rb +++ /dev/null @@ -1,1586 +0,0 @@ -#!/usr/bin/env ruby -# -# setup.rb -# -# Copyright (c) 2000-2005 Minero Aoki -# -# This program is free software. -# You can distribute/modify this program under the terms of -# the GNU LGPL, Lesser General Public License version 2.1. -# - -unless Enumerable.method_defined?(:map) # Ruby 1.4.6 - module Enumerable - alias map collect - end -end - -unless File.respond_to?(:read) # Ruby 1.6 - def File.read(fname) - open(fname) {|f| - return f.read - } - end -end - -unless Errno.const_defined?(:ENOTEMPTY) # Windows? - module Errno - class ENOTEMPTY - # We do not raise this exception, implementation is not needed. - end - end -end - -def File.binread(fname) - open(fname, 'rb') {|f| - return f.read - } -end - -# for corrupted Windows' stat(2) -def File.dir?(path) - File.directory?((path[-1,1] == '/') ? path : path + '/') -end - - -class ConfigTable - - include Enumerable - - def initialize(rbconfig) - @rbconfig = rbconfig - @items = [] - @table = {} - # options - @install_prefix = nil - @config_opt = nil - @verbose = true - @no_harm = false - end - - attr_accessor :install_prefix - attr_accessor :config_opt - - attr_writer :verbose - - def verbose? - @verbose - end - - attr_writer :no_harm - - def no_harm? - @no_harm - end - - def [](key) - lookup(key).resolve(self) - end - - def []=(key, val) - lookup(key).set val - end - - def names - @items.map {|i| i.name } - end - - def each(&block) - @items.each(&block) - end - - def key?(name) - @table.key?(name) - end - - def lookup(name) - @table[name] or setup_rb_error "no such config item: #{name}" - end - - def add(item) - @items.push item - @table[item.name] = item - end - - def remove(name) - item = lookup(name) - @items.delete_if {|i| i.name == name } - @table.delete_if {|name, i| i.name == name } - item - end - - def load_script(path, inst = nil) - if File.file?(path) - MetaConfigEnvironment.new(self, inst).instance_eval File.read(path), path - end - end - - def savefile - '.config' - end - - def load_savefile - begin - File.foreach(savefile()) do |line| - k, v = *line.split(/=/, 2) - self[k] = v.strip - end - rescue Errno::ENOENT - setup_rb_error $!.message + "\n#{File.basename($0)} config first" - end - end - - def save - @items.each {|i| i.value } - File.open(savefile(), 'w') {|f| - @items.each do |i| - f.printf "%s=%s\n", i.name, i.value if i.value? and i.value - end - } - end - - def load_standard_entries - standard_entries(@rbconfig).each do |ent| - add ent - end - end - - def standard_entries(rbconfig) - c = rbconfig - - rubypath = File.join(c['bindir'], c['ruby_install_name'] + c['EXEEXT']) - - major = c['MAJOR'].to_i - minor = c['MINOR'].to_i - teeny = c['TEENY'].to_i - version = "#{major}.#{minor}" - - # ruby ver. >= 1.4.4? - newpath_p = ((major >= 2) or - ((major == 1) and - ((minor >= 5) or - ((minor == 4) and (teeny >= 4))))) - - if c['rubylibdir'] - # V > 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = c['rubylibdir'] - librubyverarch = c['archdir'] - siteruby = c['sitedir'] - siterubyver = c['sitelibdir'] - siterubyverarch = c['sitearchdir'] - elsif newpath_p - # 1.4.4 <= V <= 1.6.3 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = c['sitedir'] - siterubyver = "$siteruby/#{version}" - siterubyverarch = "$siterubyver/#{c['arch']}" - else - # V < 1.4.4 - libruby = "#{c['prefix']}/lib/ruby" - librubyver = "#{c['prefix']}/lib/ruby/#{version}" - librubyverarch = "#{c['prefix']}/lib/ruby/#{version}/#{c['arch']}" - siteruby = "#{c['prefix']}/lib/ruby/#{version}/site_ruby" - siterubyver = siteruby - siterubyverarch = "$siterubyver/#{c['arch']}" - end - parameterize = lambda {|path| - path.sub(/\A#{Regexp.quote(c['prefix'])}/, '$prefix') - } - - if arg = c['configure_args'].split.detect {|arg| /--with-make-prog=/ =~ arg } - makeprog = arg.sub(/'/, '').split(/=/, 2)[1] - else - makeprog = 'make' - end - - [ - ExecItem.new('installdirs', 'std/site/home', - 'std: install under libruby; site: install under site_ruby; home: install under $HOME')\ - {|val, table| - case val - when 'std' - table['rbdir'] = '$librubyver' - table['sodir'] = '$librubyverarch' - when 'site' - table['rbdir'] = '$siterubyver' - table['sodir'] = '$siterubyverarch' - when 'home' - setup_rb_error '$HOME was not set' unless ENV['HOME'] - table['prefix'] = ENV['HOME'] - table['rbdir'] = '$libdir/ruby' - table['sodir'] = '$libdir/ruby' - end - }, - PathItem.new('prefix', 'path', c['prefix'], - 'path prefix of target environment'), - PathItem.new('bindir', 'path', parameterize.call(c['bindir']), - 'the directory for commands'), - PathItem.new('libdir', 'path', parameterize.call(c['libdir']), - 'the directory for libraries'), - PathItem.new('datadir', 'path', parameterize.call(c['datadir']), - 'the directory for shared data'), - PathItem.new('mandir', 'path', parameterize.call(c['mandir']), - 'the directory for man pages'), - PathItem.new('sysconfdir', 'path', parameterize.call(c['sysconfdir']), - 'the directory for system configuration files'), - PathItem.new('localstatedir', 'path', parameterize.call(c['localstatedir']), - 'the directory for local state data'), - PathItem.new('libruby', 'path', libruby, - 'the directory for ruby libraries'), - PathItem.new('librubyver', 'path', librubyver, - 'the directory for standard ruby libraries'), - PathItem.new('librubyverarch', 'path', librubyverarch, - 'the directory for standard ruby extensions'), - PathItem.new('siteruby', 'path', siteruby, - 'the directory for version-independent aux ruby libraries'), - PathItem.new('siterubyver', 'path', siterubyver, - 'the directory for aux ruby libraries'), - PathItem.new('siterubyverarch', 'path', siterubyverarch, - 'the directory for aux ruby binaries'), - PathItem.new('rbdir', 'path', '$siterubyver', - 'the directory for ruby scripts'), - PathItem.new('sodir', 'path', '$siterubyverarch', - 'the directory for ruby extentions'), - PathItem.new('rubypath', 'path', rubypath, - 'the path to set to #! line'), - ProgramItem.new('rubyprog', 'name', rubypath, - 'the ruby program using for installation'), - ProgramItem.new('makeprog', 'name', makeprog, - 'the make program to compile ruby extentions'), - SelectItem.new('shebang', 'all/ruby/never', 'ruby', - 'shebang line (#!) editing mode'), - BoolItem.new('without-ext', 'yes/no', 'no', - 'does not compile/install ruby extentions') - ] - end - private :standard_entries - - def load_multipackage_entries - multipackage_entries().each do |ent| - add ent - end - end - - def multipackage_entries - [ - PackageSelectionItem.new('with', 'name,name...', '', 'ALL', - 'package names that you want to install'), - PackageSelectionItem.new('without', 'name,name...', '', 'NONE', - 'package names that you do not want to install') - ] - end - private :multipackage_entries - - ALIASES = { - 'std-ruby' => 'librubyver', - 'stdruby' => 'librubyver', - 'rubylibdir' => 'librubyver', - 'archdir' => 'librubyverarch', - 'site-ruby-common' => 'siteruby', # For backward compatibility - 'site-ruby' => 'siterubyver', # For backward compatibility - 'bin-dir' => 'bindir', - 'bin-dir' => 'bindir', - 'rb-dir' => 'rbdir', - 'so-dir' => 'sodir', - 'data-dir' => 'datadir', - 'ruby-path' => 'rubypath', - 'ruby-prog' => 'rubyprog', - 'ruby' => 'rubyprog', - 'make-prog' => 'makeprog', - 'make' => 'makeprog' - } - - def fixup - ALIASES.each do |ali, name| - @table[ali] = @table[name] - end - @items.freeze - @table.freeze - @options_re = /\A--(#{@table.keys.join('|')})(?:=(.*))?\z/ - end - - def parse_opt(opt) - m = @options_re.match(opt) or setup_rb_error "config: unknown option #{opt}" - m.to_a[1,2] - end - - def dllext - @rbconfig['DLEXT'] - end - - def value_config?(name) - lookup(name).value? - end - - class Item - def initialize(name, template, default, desc) - @name = name.freeze - @template = template - @value = default - @default = default - @description = desc - end - - attr_reader :name - attr_reader :description - - attr_accessor :default - alias help_default default - - def help_opt - "--#{@name}=#{@template}" - end - - def value? - true - end - - def value - @value - end - - def resolve(table) - @value.gsub(%r<\$([^/]+)>) { table[$1] } - end - - def set(val) - @value = check(val) - end - - private - - def check(val) - setup_rb_error "config: --#{name} requires argument" unless val - val - end - end - - class BoolItem < Item - def config_type - 'bool' - end - - def help_opt - "--#{@name}" - end - - private - - def check(val) - return 'yes' unless val - case val - when /\Ay(es)?\z/i, /\At(rue)?\z/i then 'yes' - when /\An(o)?\z/i, /\Af(alse)\z/i then 'no' - else - setup_rb_error "config: --#{@name} accepts only yes/no for argument" - end - end - end - - class PathItem < Item - def config_type - 'path' - end - - private - - def check(path) - setup_rb_error "config: --#{@name} requires argument" unless path - path[0,1] == '$' ? path : File.expand_path(path) - end - end - - class ProgramItem < Item - def config_type - 'program' - end - end - - class SelectItem < Item - def initialize(name, selection, default, desc) - super - @ok = selection.split('/') - end - - def config_type - 'select' - end - - private - - def check(val) - unless @ok.include?(val.strip) - setup_rb_error "config: use --#{@name}=#{@template} (#{val})" - end - val.strip - end - end - - class ExecItem < Item - def initialize(name, selection, desc, &block) - super name, selection, nil, desc - @ok = selection.split('/') - @action = block - end - - def config_type - 'exec' - end - - def value? - false - end - - def resolve(table) - setup_rb_error "$#{name()} wrongly used as option value" - end - - undef set - - def evaluate(val, table) - v = val.strip.downcase - unless @ok.include?(v) - setup_rb_error "invalid option --#{@name}=#{val} (use #{@template})" - end - @action.call v, table - end - end - - class PackageSelectionItem < Item - def initialize(name, template, default, help_default, desc) - super name, template, default, desc - @help_default = help_default - end - - attr_reader :help_default - - def config_type - 'package' - end - - private - - def check(val) - unless File.dir?("packages/#{val}") - setup_rb_error "config: no such package: #{val}" - end - val - end - end - - class MetaConfigEnvironment - def initialize(config, installer) - @config = config - @installer = installer - end - - def config_names - @config.names - end - - def config?(name) - @config.key?(name) - end - - def bool_config?(name) - @config.lookup(name).config_type == 'bool' - end - - def path_config?(name) - @config.lookup(name).config_type == 'path' - end - - def value_config?(name) - @config.lookup(name).config_type != 'exec' - end - - def add_config(item) - @config.add item - end - - def add_bool_config(name, default, desc) - @config.add BoolItem.new(name, 'yes/no', default ? 'yes' : 'no', desc) - end - - def add_path_config(name, default, desc) - @config.add PathItem.new(name, 'path', default, desc) - end - - def set_config_default(name, default) - @config.lookup(name).default = default - end - - def remove_config(name) - @config.remove(name) - end - - # For only multipackage - def packages - raise '[setup.rb fatal] multi-package metaconfig API packages() called for single-package; contact application package vendor' unless @installer - @installer.packages - end - - # For only multipackage - def declare_packages(list) - raise '[setup.rb fatal] multi-package metaconfig API declare_packages() called for single-package; contact application package vendor' unless @installer - @installer.packages = list - end - end - -end # class ConfigTable - - -# This module requires: #verbose?, #no_harm? -module FileOperations - - def mkdir_p(dirname, prefix = nil) - dirname = prefix + File.expand_path(dirname) if prefix - $stderr.puts "mkdir -p #{dirname}" if verbose? - return if no_harm? - - # Does not check '/', it's too abnormal. - dirs = File.expand_path(dirname).split(%r<(?=/)>) - if /\A[a-z]:\z/i =~ dirs[0] - disk = dirs.shift - dirs[0] = disk + dirs[0] - end - dirs.each_index do |idx| - path = dirs[0..idx].join('') - Dir.mkdir path unless File.dir?(path) - end - end - - def rm_f(path) - $stderr.puts "rm -f #{path}" if verbose? - return if no_harm? - force_remove_file path - end - - def rm_rf(path) - $stderr.puts "rm -rf #{path}" if verbose? - return if no_harm? - remove_tree path - end - - def remove_tree(path) - if File.symlink?(path) - remove_file path - elsif File.dir?(path) - remove_tree0 path - else - force_remove_file path - end - end - - def remove_tree0(path) - Dir.foreach(path) do |ent| - next if ent == '.' - next if ent == '..' - entpath = "#{path}/#{ent}" - if File.symlink?(entpath) - remove_file entpath - elsif File.dir?(entpath) - remove_tree0 entpath - else - force_remove_file entpath - end - end - begin - Dir.rmdir path - rescue Errno::ENOTEMPTY - # directory may not be empty - end - end - - def move_file(src, dest) - force_remove_file dest - begin - File.rename src, dest - rescue - File.open(dest, 'wb') {|f| - f.write File.binread(src) - } - File.chmod File.stat(src).mode, dest - File.unlink src - end - end - - def force_remove_file(path) - begin - remove_file path - rescue - end - end - - def remove_file(path) - File.chmod 0777, path - File.unlink path - end - - def install(from, dest, mode, prefix = nil) - $stderr.puts "install #{from} #{dest}" if verbose? - return if no_harm? - - realdest = prefix ? prefix + File.expand_path(dest) : dest - realdest = File.join(realdest, File.basename(from)) if File.dir?(realdest) - str = File.binread(from) - if diff?(str, realdest) - verbose_off { - rm_f realdest if File.exist?(realdest) - } - File.open(realdest, 'wb') {|f| - f.write str - } - File.chmod mode, realdest - - File.open("#{objdir_root()}/InstalledFiles", 'a') {|f| - if prefix - f.puts realdest.sub(prefix, '') - else - f.puts realdest - end - } - end - end - - def diff?(new_content, path) - return true unless File.exist?(path) - new_content != File.binread(path) - end - - def command(*args) - $stderr.puts args.join(' ') if verbose? - system(*args) or raise RuntimeError, - "system(#{args.map{|a| a.inspect }.join(' ')}) failed" - end - - def ruby(*args) - command config('rubyprog'), *args - end - - def make(task = nil) - command(*[config('makeprog'), task].compact) - end - - def extdir?(dir) - File.exist?("#{dir}/MANIFEST") or File.exist?("#{dir}/extconf.rb") - end - - def files_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.file?("#{dir}/#{ent}") } - } - end - - DIR_REJECT = %w( . .. CVS SCCS RCS CVS.adm .svn ) - - def directories_of(dir) - Dir.open(dir) {|d| - return d.select {|ent| File.dir?("#{dir}/#{ent}") } - DIR_REJECT - } - end - -end - - -# This module requires: #srcdir_root, #objdir_root, #relpath -module HookScriptAPI - - def get_config(key) - @config[key] - end - - alias config get_config - - # obsolete: use metaconfig to change configuration - def set_config(key, val) - @config[key] = val - end - - # - # srcdir/objdir (works only in the package directory) - # - - def curr_srcdir - "#{srcdir_root()}/#{relpath()}" - end - - def curr_objdir - "#{objdir_root()}/#{relpath()}" - end - - def srcfile(path) - "#{curr_srcdir()}/#{path}" - end - - def srcexist?(path) - File.exist?(srcfile(path)) - end - - def srcdirectory?(path) - File.dir?(srcfile(path)) - end - - def srcfile?(path) - File.file?(srcfile(path)) - end - - def srcentries(path = '.') - Dir.open("#{curr_srcdir()}/#{path}") {|d| - return d.to_a - %w(. ..) - } - end - - def srcfiles(path = '.') - srcentries(path).select {|fname| - File.file?(File.join(curr_srcdir(), path, fname)) - } - end - - def srcdirectories(path = '.') - srcentries(path).select {|fname| - File.dir?(File.join(curr_srcdir(), path, fname)) - } - end - -end - - -class ToplevelInstaller - - Version = '3.4.1' - Copyright = 'Copyright (c) 2000-2005 Minero Aoki' - - TASKS = [ - [ 'all', 'do config, setup, then install' ], - [ 'config', 'saves your configurations' ], - [ 'show', 'shows current configuration' ], - [ 'setup', 'compiles ruby extentions and others' ], - [ 'install', 'installs files' ], - [ 'test', 'run all tests in test/' ], - [ 'clean', "does `make clean' for each extention" ], - [ 'distclean',"does `make distclean' for each extention" ] - ] - - def ToplevelInstaller.invoke - config = ConfigTable.new(load_rbconfig()) - config.load_standard_entries - config.load_multipackage_entries if multipackage? - config.fixup - klass = (multipackage?() ? ToplevelInstallerMulti : ToplevelInstaller) - klass.new(File.dirname($0), config).invoke - end - - def ToplevelInstaller.multipackage? - File.dir?(File.dirname($0) + '/packages') - end - - def ToplevelInstaller.load_rbconfig - if arg = ARGV.detect {|arg| /\A--rbconfig=/ =~ arg } - ARGV.delete(arg) - load File.expand_path(arg.split(/=/, 2)[1]) - $".push 'rbconfig.rb' - else - require 'rbconfig' - end - ::Config::CONFIG - end - - def initialize(ardir_root, config) - @ardir = File.expand_path(ardir_root) - @config = config - # cache - @valid_task_re = nil - end - - def config(key) - @config[key] - end - - def inspect - "#<#{self.class} #{__id__()}>" - end - - def invoke - run_metaconfigs - case task = parsearg_global() - when nil, 'all' - parsearg_config - init_installers - exec_config - exec_setup - exec_install - else - case task - when 'config', 'test' - ; - when 'clean', 'distclean' - @config.load_savefile if File.exist?(@config.savefile) - else - @config.load_savefile - end - __send__ "parsearg_#{task}" - init_installers - __send__ "exec_#{task}" - end - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig" - end - - def init_installers - @installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - # - # Hook Script API bases - # - - def srcdir_root - @ardir - end - - def objdir_root - '.' - end - - def relpath - '.' - end - - # - # Option Parsing - # - - def parsearg_global - while arg = ARGV.shift - case arg - when /\A\w+\z/ - setup_rb_error "invalid task: #{arg}" unless valid_task?(arg) - return arg - when '-q', '--quiet' - @config.verbose = false - when '--verbose' - @config.verbose = true - when '--help' - print_usage $stdout - exit 0 - when '--version' - puts "#{File.basename($0)} version #{Version}" - exit 0 - when '--copyright' - puts Copyright - exit 0 - else - setup_rb_error "unknown global option '#{arg}'" - end - end - nil - end - - def valid_task?(t) - valid_task_re() =~ t - end - - def valid_task_re - @valid_task_re ||= /\A(?:#{TASKS.map {|task,desc| task }.join('|')})\z/ - end - - def parsearg_no_options - unless ARGV.empty? - task = caller(0).first.slice(%r<`parsearg_(\w+)'>, 1) - setup_rb_error "#{task}: unknown options: #{ARGV.join(' ')}" - end - end - - alias parsearg_show parsearg_no_options - alias parsearg_setup parsearg_no_options - alias parsearg_test parsearg_no_options - alias parsearg_clean parsearg_no_options - alias parsearg_distclean parsearg_no_options - - def parsearg_config - evalopt = [] - set = [] - @config.config_opt = [] - while i = ARGV.shift - if /\A--?\z/ =~ i - @config.config_opt = ARGV.dup - break - end - name, value = *@config.parse_opt(i) - if @config.value_config?(name) - @config[name] = value - else - evalopt.push [name, value] - end - set.push name - end - evalopt.each do |name, value| - @config.lookup(name).evaluate value, @config - end - # Check if configuration is valid - set.each do |n| - @config[n] if @config.value_config?(n) - end - end - - def parsearg_install - @config.no_harm = false - @config.install_prefix = '' - while a = ARGV.shift - case a - when '--no-harm' - @config.no_harm = true - when /\A--prefix=/ - path = a.split(/=/, 2)[1] - path = File.expand_path(path) unless path[0,1] == '/' - @config.install_prefix = path - else - setup_rb_error "install: unknown option #{a}" - end - end - end - - def print_usage(out) - out.puts 'Typical Installation Procedure:' - out.puts " $ ruby #{File.basename $0} config" - out.puts " $ ruby #{File.basename $0} setup" - out.puts " # ruby #{File.basename $0} install (may require root privilege)" - out.puts - out.puts 'Detailed Usage:' - out.puts " ruby #{File.basename $0} " - out.puts " ruby #{File.basename $0} [] []" - - fmt = " %-24s %s\n" - out.puts - out.puts 'Global options:' - out.printf fmt, '-q,--quiet', 'suppress message outputs' - out.printf fmt, ' --verbose', 'output messages verbosely' - out.printf fmt, ' --help', 'print this message' - out.printf fmt, ' --version', 'print version and quit' - out.printf fmt, ' --copyright', 'print copyright and quit' - out.puts - out.puts 'Tasks:' - TASKS.each do |name, desc| - out.printf fmt, name, desc - end - - fmt = " %-24s %s [%s]\n" - out.puts - out.puts 'Options for CONFIG or ALL:' - @config.each do |item| - out.printf fmt, item.help_opt, item.description, item.help_default - end - out.printf fmt, '--rbconfig=path', 'rbconfig.rb to load',"running ruby's" - out.puts - out.puts 'Options for INSTALL:' - out.printf fmt, '--no-harm', 'only display what to do if given', 'off' - out.printf fmt, '--prefix=path', 'install path prefix', '' - out.puts - end - - # - # Task Handlers - # - - def exec_config - @installer.exec_config - @config.save # must be final - end - - def exec_setup - @installer.exec_setup - end - - def exec_install - @installer.exec_install - end - - def exec_test - @installer.exec_test - end - - def exec_show - @config.each do |i| - printf "%-20s %s\n", i.name, i.value if i.value? - end - end - - def exec_clean - @installer.exec_clean - end - - def exec_distclean - @installer.exec_distclean - end - -end # class ToplevelInstaller - - -class ToplevelInstallerMulti < ToplevelInstaller - - include FileOperations - - def initialize(ardir_root, config) - super - @packages = directories_of("#{@ardir}/packages") - raise 'no package exists' if @packages.empty? - @root_installer = Installer.new(@config, @ardir, File.expand_path('.')) - end - - def run_metaconfigs - @config.load_script "#{@ardir}/metaconfig", self - @packages.each do |name| - @config.load_script "#{@ardir}/packages/#{name}/metaconfig" - end - end - - attr_reader :packages - - def packages=(list) - raise 'package list is empty' if list.empty? - list.each do |name| - raise "directory packages/#{name} does not exist"\ - unless File.dir?("#{@ardir}/packages/#{name}") - end - @packages = list - end - - def init_installers - @installers = {} - @packages.each do |pack| - @installers[pack] = Installer.new(@config, - "#{@ardir}/packages/#{pack}", - "packages/#{pack}") - end - with = extract_selection(config('with')) - without = extract_selection(config('without')) - @selected = @installers.keys.select {|name| - (with.empty? or with.include?(name)) \ - and not without.include?(name) - } - end - - def extract_selection(list) - a = list.split(/,/) - a.each do |name| - setup_rb_error "no such package: #{name}" unless @installers.key?(name) - end - a - end - - def print_usage(f) - super - f.puts 'Inluded packages:' - f.puts ' ' + @packages.sort.join(' ') - f.puts - end - - # - # Task Handlers - # - - def exec_config - run_hook 'pre-config' - each_selected_installers {|inst| inst.exec_config } - run_hook 'post-config' - @config.save # must be final - end - - def exec_setup - run_hook 'pre-setup' - each_selected_installers {|inst| inst.exec_setup } - run_hook 'post-setup' - end - - def exec_install - run_hook 'pre-install' - each_selected_installers {|inst| inst.exec_install } - run_hook 'post-install' - end - - def exec_test - run_hook 'pre-test' - each_selected_installers {|inst| inst.exec_test } - run_hook 'post-test' - end - - def exec_clean - rm_f @config.savefile - run_hook 'pre-clean' - each_selected_installers {|inst| inst.exec_clean } - run_hook 'post-clean' - end - - def exec_distclean - rm_f @config.savefile - run_hook 'pre-distclean' - each_selected_installers {|inst| inst.exec_distclean } - run_hook 'post-distclean' - end - - # - # lib - # - - def each_selected_installers - Dir.mkdir 'packages' unless File.dir?('packages') - @selected.each do |pack| - $stderr.puts "Processing the package `#{pack}' ..." if verbose? - Dir.mkdir "packages/#{pack}" unless File.dir?("packages/#{pack}") - Dir.chdir "packages/#{pack}" - yield @installers[pack] - Dir.chdir '../..' - end - end - - def run_hook(id) - @root_installer.run_hook id - end - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - -end # class ToplevelInstallerMulti - - -class Installer - - FILETYPES = %w( bin lib ext data conf man ) - - include FileOperations - include HookScriptAPI - - def initialize(config, srcroot, objroot) - @config = config - @srcdir = File.expand_path(srcroot) - @objdir = File.expand_path(objroot) - @currdir = '.' - end - - def inspect - "#<#{self.class} #{File.basename(@srcdir)}>" - end - - def noop(rel) - end - - # - # Hook Script API base methods - # - - def srcdir_root - @srcdir - end - - def objdir_root - @objdir - end - - def relpath - @currdir - end - - # - # Config Access - # - - # module FileOperations requires this - def verbose? - @config.verbose? - end - - # module FileOperations requires this - def no_harm? - @config.no_harm? - end - - def verbose_off - begin - save, @config.verbose = @config.verbose?, false - yield - ensure - @config.verbose = save - end - end - - # - # TASK config - # - - def exec_config - exec_task_traverse 'config' - end - - alias config_dir_bin noop - alias config_dir_lib noop - - def config_dir_ext(rel) - extconf if extdir?(curr_srcdir()) - end - - alias config_dir_data noop - alias config_dir_conf noop - alias config_dir_man noop - - def extconf - ruby "#{curr_srcdir()}/extconf.rb", *@config.config_opt - end - - # - # TASK setup - # - - def exec_setup - exec_task_traverse 'setup' - end - - def setup_dir_bin(rel) - files_of(curr_srcdir()).each do |fname| - update_shebang_line "#{curr_srcdir()}/#{fname}" - end - end - - alias setup_dir_lib noop - - def setup_dir_ext(rel) - make if extdir?(curr_srcdir()) - end - - alias setup_dir_data noop - alias setup_dir_conf noop - alias setup_dir_man noop - - def update_shebang_line(path) - return if no_harm? - return if config('shebang') == 'never' - old = Shebang.load(path) - if old - $stderr.puts "warning: #{path}: Shebang line includes too many args. It is not portable and your program may not work." if old.args.size > 1 - new = new_shebang(old) - return if new.to_s == old.to_s - else - return unless config('shebang') == 'all' - new = Shebang.new(config('rubypath')) - end - $stderr.puts "updating shebang: #{File.basename(path)}" if verbose? - open_atomic_writer(path) {|output| - File.open(path, 'rb') {|f| - f.gets if old # discard - output.puts new.to_s - output.print f.read - } - } - end - - def new_shebang(old) - if /\Aruby/ =~ File.basename(old.cmd) - Shebang.new(config('rubypath'), old.args) - elsif File.basename(old.cmd) == 'env' and old.args.first == 'ruby' - Shebang.new(config('rubypath'), old.args[1..-1]) - else - return old unless config('shebang') == 'all' - Shebang.new(config('rubypath')) - end - end - - def open_atomic_writer(path, &block) - tmpfile = File.basename(path) + '.tmp' - begin - File.open(tmpfile, 'wb', &block) - File.rename tmpfile, File.basename(path) - ensure - File.unlink tmpfile if File.exist?(tmpfile) - end - end - - class Shebang - def Shebang.load(path) - line = nil - File.open(path) {|f| - line = f.gets - } - return nil unless /\A#!/ =~ line - parse(line) - end - - def Shebang.parse(line) - cmd, *args = *line.strip.sub(/\A\#!/, '').split(' ') - new(cmd, args) - end - - def initialize(cmd, args = []) - @cmd = cmd - @args = args - end - - attr_reader :cmd - attr_reader :args - - def to_s - "#! #{@cmd}" + (@args.empty? ? '' : " #{@args.join(' ')}") - end - end - - # - # TASK install - # - - def exec_install - rm_f 'InstalledFiles' - exec_task_traverse 'install' - end - - def install_dir_bin(rel) - install_files targetfiles(), "#{config('bindir')}/#{rel}", 0755 - end - - def install_dir_lib(rel) - install_files libfiles(), "#{config('rbdir')}/#{rel}", 0644 - end - - def install_dir_ext(rel) - return unless extdir?(curr_srcdir()) - install_files rubyextentions('.'), - "#{config('sodir')}/#{File.dirname(rel)}", - 0555 - end - - def install_dir_data(rel) - install_files targetfiles(), "#{config('datadir')}/#{rel}", 0644 - end - - def install_dir_conf(rel) - # FIXME: should not remove current config files - # (rename previous file to .old/.org) - install_files targetfiles(), "#{config('sysconfdir')}/#{rel}", 0644 - end - - def install_dir_man(rel) - install_files targetfiles(), "#{config('mandir')}/#{rel}", 0644 - end - - def install_files(list, dest, mode) - mkdir_p dest, @config.install_prefix - list.each do |fname| - install fname, dest, mode, @config.install_prefix - end - end - - def libfiles - glob_reject(%w(*.y *.output), targetfiles()) - end - - def rubyextentions(dir) - ents = glob_select("*.#{@config.dllext}", targetfiles()) - if ents.empty? - setup_rb_error "no ruby extention exists: 'ruby #{$0} setup' first" - end - ents - end - - def targetfiles - mapdir(existfiles() - hookfiles()) - end - - def mapdir(ents) - ents.map {|ent| - if File.exist?(ent) - then ent # objdir - else "#{curr_srcdir()}/#{ent}" # srcdir - end - } - end - - # picked up many entries from cvs-1.11.1/src/ignore.c - JUNK_FILES = %w( - core RCSLOG tags TAGS .make.state - .nse_depinfo #* .#* cvslog.* ,* .del-* *.olb - *~ *.old *.bak *.BAK *.orig *.rej _$* *$ - - *.org *.in .* - ) - - def existfiles - glob_reject(JUNK_FILES, (files_of(curr_srcdir()) | files_of('.'))) - end - - def hookfiles - %w( pre-%s post-%s pre-%s.rb post-%s.rb ).map {|fmt| - %w( config setup install clean ).map {|t| sprintf(fmt, t) } - }.flatten - end - - def glob_select(pat, ents) - re = globs2re([pat]) - ents.select {|ent| re =~ ent } - end - - def glob_reject(pats, ents) - re = globs2re(pats) - ents.reject {|ent| re =~ ent } - end - - GLOB2REGEX = { - '.' => '\.', - '$' => '\$', - '#' => '\#', - '*' => '.*' - } - - def globs2re(pats) - /\A(?:#{ - pats.map {|pat| pat.gsub(/[\.\$\#\*]/) {|ch| GLOB2REGEX[ch] } }.join('|') - })\z/ - end - - # - # TASK test - # - - TESTDIR = 'test' - - def exec_test - unless File.directory?('test') - $stderr.puts 'no test in this package' if verbose? - return - end - $stderr.puts 'Running tests...' if verbose? - begin - require 'test/unit' - rescue LoadError - setup_rb_error 'test/unit cannot loaded. You need Ruby 1.8 or later to invoke this task.' - end - runner = Test::Unit::AutoRunner.new(true) - runner.to_run << TESTDIR - runner.run - end - - # - # TASK clean - # - - def exec_clean - exec_task_traverse 'clean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - alias clean_dir_bin noop - alias clean_dir_lib noop - alias clean_dir_data noop - alias clean_dir_conf noop - alias clean_dir_man noop - - def clean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'clean' if File.file?('Makefile') - end - - # - # TASK distclean - # - - def exec_distclean - exec_task_traverse 'distclean' - rm_f @config.savefile - rm_f 'InstalledFiles' - end - - alias distclean_dir_bin noop - alias distclean_dir_lib noop - - def distclean_dir_ext(rel) - return unless extdir?(curr_srcdir()) - make 'distclean' if File.file?('Makefile') - end - - alias distclean_dir_data noop - alias distclean_dir_conf noop - alias distclean_dir_man noop - - # - # Traversing - # - - def exec_task_traverse(task) - run_hook "pre-#{task}" - FILETYPES.each do |type| - if type == 'ext' and config('without-ext') == 'yes' - $stderr.puts 'skipping ext/* by user option' if verbose? - next - end - traverse task, type, "#{task}_dir_#{type}" - end - run_hook "post-#{task}" - end - - def traverse(task, rel, mid) - dive_into(rel) { - run_hook "pre-#{task}" - __send__ mid, rel.sub(%r[\A.*?(?:/|\z)], '') - directories_of(curr_srcdir()).each do |d| - traverse task, "#{rel}/#{d}", mid - end - run_hook "post-#{task}" - } - end - - def dive_into(rel) - return unless File.dir?("#{@srcdir}/#{rel}") - - dir = File.basename(rel) - Dir.mkdir dir unless File.dir?(dir) - prevdir = Dir.pwd - Dir.chdir dir - $stderr.puts '---> ' + rel if verbose? - @currdir = rel - yield - Dir.chdir prevdir - $stderr.puts '<--- ' + rel if verbose? - @currdir = File.dirname(rel) - end - - def run_hook(id) - path = [ "#{curr_srcdir()}/#{id}", - "#{curr_srcdir()}/#{id}.rb" ].detect {|cand| File.file?(cand) } - return unless path - begin - instance_eval File.read(path), path, 1 - rescue - raise if $DEBUG - setup_rb_error "hook #{path} failed:\n" + $!.message - end - end - -end # class Installer - - -class SetupError < StandardError; end - -def setup_rb_error(msg) - raise SetupError, msg -end - -if $0 == __FILE__ - begin - ToplevelInstaller.invoke - rescue SetupError - raise if $DEBUG - $stderr.puts $!.message - $stderr.puts "Try 'ruby #{$0} --help' for detailed usage." - exit 1 - end -end diff --git a/vendor/xmpp4r-0.3.2/test/bytestreams/tc_ibb.rb b/vendor/xmpp4r-0.3.2/test/bytestreams/tc_ibb.rb deleted file mode 100755 index 7124e5e3d..000000000 --- a/vendor/xmpp4r-0.3.2/test/bytestreams/tc_ibb.rb +++ /dev/null @@ -1,186 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/bytestreams' -require 'xmpp4r/semaphore' -include Jabber - -class IBBTest < Test::Unit::TestCase - include ClientTester - - def create_buffer(size) - ([nil] * size).collect { rand(256).chr }.join - end - - def test_ibb_target2initiator - target = Bytestreams::IBBTarget.new(@server, '1', nil, '1@a.com/1') - initiator = Bytestreams::IBBInitiator.new(@client, '1', nil, '1@a.com/1') - - buffer = create_buffer(9999) - - Thread.new do - target.accept - target.write(buffer) - Thread.pass - target.close - end - - - initiator.open - - received = '' - while buf = initiator.read - received += buf - end - - initiator.close - - assert_equal(buffer, received) - end - - def test_ibb_initiator2target - target = Bytestreams::IBBTarget.new(@server, '1', nil, '1@a.com/1') - initiator = Bytestreams::IBBInitiator.new(@client, '1', nil, '1@a.com/1') - - buffer = create_buffer(9999) - - Thread.new do - Thread.pass - initiator.open - initiator.write(buffer) - Thread.pass - initiator.close - end - - - target.accept - - received = '' - while buf = target.read - received += buf - end - - target.close - - assert_equal(buffer, received) - end - - def test_ibb_pingpong - ignored_stanzas = 0 - wait = Semaphore.new - @server.add_message_callback { ignored_stanzas += 1; wait.run } - @server.add_iq_callback { ignored_stanzas += 1; wait.run } - - - target = Bytestreams::IBBTarget.new(@server, '1', nil, '1@a.com/1') - initiator = Bytestreams::IBBInitiator.new(@client, '1', nil, '1@a.com/1') - - Thread.new do - target.accept - - while buf = target.read - target.write(buf) - target.flush - end - - target.close - end - - - assert_equal(0, ignored_stanzas) - @client.send(" - - ") - wait.wait - assert_equal(1, ignored_stanzas) - - - initiator.open - - - assert_equal(1, ignored_stanzas) - @client.send(" - - ") - wait.wait - assert_equal(2, ignored_stanzas) - @client.send(" - - ") - wait.wait - assert_equal(3, ignored_stanzas) - - - 10.times do - buf = create_buffer(9999) - initiator.write(buf) - initiator.flush - - bufr = '' - begin - bufr += initiator.read - end while bufr.size < buf.size - assert_equal(buf, bufr) - end - - initiator.close - - - assert_equal(3, ignored_stanzas) - end - - def test_ibb_error - target = Bytestreams::IBBTarget.new(@server, '1', nil, '1@a.com/1') - initiator = Bytestreams::IBBInitiator.new(@client, '1', nil, '1@a.com/1') - - Thread.new do - target.accept - - @server.send(" - - ") - end - - - initiator.open - - assert_nil(initiator.read) - - initiator.close - end - - def test_ibb_inactive - target = Bytestreams::IBBTarget.new(@server, '1', nil, '1@a.com/1') - initiator = Bytestreams::IBBInitiator.new(@client, '1', nil, '1@a.com/1') - - assert_nil(target.read) - assert_nil(initiator.read) - - assert_raise(RuntimeError) { - target.write('a' * target.block_size) - } - assert_raise(RuntimeError) { - initiator.write('a' * initiator.block_size) - } - end - - def test_ibb_queueitem - i1 = Bytestreams::IBBQueueItem.new(:close) - assert_equal(:close, i1.type) - assert_nil(i1.seq) - - i2 = Bytestreams::IBBQueueItem.new(:data, 1, Base64::encode64('blah')) - assert_equal(:data, i2.type) - assert_equal(1, i2.seq) - assert_equal('blah', i2.data) - - assert_raise(RuntimeError) { - i3 = Bytestreams::IBBQueueItem.new(:invalid) - } - end -end diff --git a/vendor/xmpp4r-0.3.2/test/bytestreams/tc_socks5bytestreams.rb b/vendor/xmpp4r-0.3.2/test/bytestreams/tc_socks5bytestreams.rb deleted file mode 100755 index 076cc6495..000000000 --- a/vendor/xmpp4r-0.3.2/test/bytestreams/tc_socks5bytestreams.rb +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/bytestreams' -include Jabber - -class SOCKS5BytestreamsTest < Test::Unit::TestCase - include ClientTester - - @@server = Bytestreams::SOCKS5BytestreamsServer.new(65005) - @@server.add_address('localhost') - - def create_buffer(size) - ([nil] * size).collect { rand(256).chr }.join - end - - def test_server2multi - target1 = Bytestreams::SOCKS5BytestreamsTarget.new(@server, '1', '1@a.com/1', '1@a.com/2') - target2 = Bytestreams::SOCKS5BytestreamsTarget.new(@server, '2', '2@a.com/1', '2@a.com/2') - initiator1 = Bytestreams::SOCKS5BytestreamsInitiator.new(@client, '1', '1@a.com/1', '1@a.com/2') - initiator2 = Bytestreams::SOCKS5BytestreamsInitiator.new(@client, '2', '2@a.com/1', '2@a.com/2') - initiator1.add_streamhost(@@server) - initiator2.add_streamhost(@@server) - - buf1 = create_buffer(8192) - buf2 = create_buffer(8192) - - Thread.new do - target1.accept - target1.write(buf1) - target1.flush - target1.close - end - - Thread.new do - target2.accept - target2.write(buf2) - target2.flush - target2.close - end - - initiator1.open - initiator2.open - - recv1 = '' - recv2 = '' - - while buf = initiator2.read(256) - recv2 += buf - end - - while buf = initiator1.read(256) - recv1 += buf - end - - initiator1.close - initiator2.close - - assert_equal(buf1, recv1) - assert_equal(buf2, recv2) - end - - def test_pingpong - target = Bytestreams::SOCKS5BytestreamsTarget.new(@server, '1', '1@a.com/1', '1@a.com/2') - initiator = Bytestreams::SOCKS5BytestreamsInitiator.new(@client, '1', '1@a.com/1', '1@a.com/2') - initiator.add_streamhost(@@server) - - - Thread.new do - target.accept - - while buf = target.read(256) - target.write(buf) - target.flush - end - - target.close - end - - - initiator.open - - 10.times do - buf = create_buffer(8192) - initiator.write(buf) - initiator.flush - - bufr = '' - begin - bufr += initiator.read(256) - end while bufr.size < buf.size - assert_equal(buf, bufr) - end - - initiator.close - end - -end diff --git a/vendor/xmpp4r-0.3.2/test/dataforms/tc_data.rb b/vendor/xmpp4r-0.3.2/test/dataforms/tc_data.rb deleted file mode 100755 index a11934daf..000000000 --- a/vendor/xmpp4r-0.3.2/test/dataforms/tc_data.rb +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/dataforms' -include Jabber - -class DataFormsTest < Test::Unit::TestCase - - def test_create_defaults - v = Dataforms::XDataTitle.new - assert_nil(v.title) - assert_equal("", v.to_s) - - v = Dataforms::XDataInstructions.new - assert_nil(v.instructions) - assert_equal("", v.to_s) - - v = Dataforms::XDataField.new - assert_nil(v.label) - assert_nil(v.var) - assert_nil(v.type) - assert_equal(false, v.required?) - assert_equal([], v.values) - assert_equal({}, v.options) - - v = Dataforms::XData.new - assert_equal([], v.fields) - assert_nil(v.type) - end - - def test_create - v = Dataforms::XDataTitle.new "This is the title" - assert_equal("This is the title",v.title) - assert_equal("This is the title", v.to_s) - - v = Dataforms::XDataInstructions.new "Instructions" - assert_equal("Instructions",v.instructions) - assert_equal("Instructions", v.to_s) - - f = Dataforms::XDataField.new "botname", :text_single - assert_nil(f.label) - assert_equal("botname", f.var) - assert_equal(:text_single, f.type) - assert_equal(false, f.required?) - assert_equal([], f.values) - assert_equal({}, f.options) - f.label = "The name of your bot" - assert_equal("The name of your bot", f.label) - [:boolean, :fixed, :hidden, :jid_multi, :jid_single, - :list_multi, :list_single, :text_multi, :text_private, - :text_single].each do |type| - f.type = type - assert_equal(type, f.type) - end - f.type = :wrong_type - assert_nil(f.type) - f.required= true - assert_equal(true, f.required?) - f.values = ["the value"] - assert_equal(["the value"], f.values) - f.options = { "option 1" => "Label 1", "option 2" => "Label 2", "option 3" => nil } - assert_equal({ "option 1" => "Label 1", "option 2" => "Label 2", "option 3" => nil }, f.options) - - - f = Dataforms::XDataField.new "test", :text_single - v = Dataforms::XData.new :form - assert_equal([], v.fields) - assert_equal(:form, v.type) - [:form, :result, :submit, :cancel].each do |type| - v.type = type - assert_equal(type, v.type) - end - v.add f - assert_equal(f, v.field('test')) - assert_nil(v.field('wrong field')) - assert_equal([f], v.fields) - end - -end diff --git a/vendor/xmpp4r-0.3.2/test/delay/tc_xdelay.rb b/vendor/xmpp4r-0.3.2/test/delay/tc_xdelay.rb deleted file mode 100755 index 64b3dc302..000000000 --- a/vendor/xmpp4r-0.3.2/test/delay/tc_xdelay.rb +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/delay/x/delay' -include Jabber - -class XDelayTest < Test::Unit::TestCase - def test_create1 - d = Delay::XDelay.new(false) - assert_equal(nil, d.stamp) - assert_equal(nil, d.from) - assert_equal('jabber:x:delay', d.namespace) - end - - def test_create2 - d = Delay::XDelay.new - # Hopefully the seconds don't change here... - assert_equal(Time.now.to_s, d.stamp.to_s) - assert_equal(nil, d.from) - assert_equal('jabber:x:delay', d.namespace) - end - - def test_from - d = Delay::XDelay.new - assert_equal(nil, d.from) - d.from = JID::new('astro@spaceboyz.net') - assert_equal(JID::new('astro@spaceboyz.net'), d.from) - assert_equal(d, d.set_from(nil)) - assert_equal(nil, d.from) - end - - def test_stamp - d = Delay::XDelay.new(false) - assert_equal(nil, d.stamp) - now = Time.now - d.stamp = now - assert_equal(now.to_s, d.stamp.to_s) - assert_equal(d, d.set_stamp(nil)) - assert_equal(nil, d.stamp) - end - - def test_import - x1 = X.new - x1.add_namespace('jabber:x:delay') - x2 = X::import(x1) - assert_equal(Delay::XDelay, x2.class) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/lib/clienttester.rb b/vendor/xmpp4r-0.3.2/test/lib/clienttester.rb deleted file mode 100644 index d2e4f6651..000000000 --- a/vendor/xmpp4r-0.3.2/test/lib/clienttester.rb +++ /dev/null @@ -1,113 +0,0 @@ -$:.unshift '../lib' -require 'xmpp4r' -require 'test/unit' -require 'socket' -require 'xmpp4r/semaphore' - -# Turn $VERBOSE off to suppress warnings about redefinition -oldverbose = $VERBOSE -$VERBOSE = false - -module Jabber - ## - # The ClientTester is a mix-in which provides a setup and teardown - # method to prepare a Stream object (@client) and two methods - # interfacing as the "server side": - # * send(xml):: Send a stanza to @client - # * receive:: (Wait and) retrieve a stanza sent by the client (in order) - # - # The server side is a stream, too: add your callbacks to @server - # - # ClientTester is written to test complex helper classes. - module ClientTester - @@SOCKET_PORT = 65223 - - def setup - servlisten = TCPServer.new(@@SOCKET_PORT) - serverwait = Semaphore.new - Thread.new do - Thread.current.abort_on_exception = true - serversock = servlisten.accept - servlisten.close - serversock.sync = true - @server = Stream.new(true) - @server.add_xml_callback do |xml| - if xml.prefix == 'stream' and xml.name == 'stream' - send('') - true - else - false - end - end - @server.start(serversock) - - serverwait.run - end - - clientsock = TCPSocket.new('localhost', @@SOCKET_PORT) - clientsock.sync = true - @client = Stream.new(true) - @client.start(clientsock) - - @client.send('') { |reply| true } - - @state = 0 - @states = [] - @state_wait = Semaphore.new - @state_wait2 = Semaphore.new - @server.add_stanza_callback { |stanza| - if @state < @states.size - @states[@state].call(stanza) - @state += 1 - @state_wait2.wait - @state_wait.run - end - - false - } - - serverwait.wait - end - - def teardown - @client.close - @server.close - end - - def send(xml) - @server.send(xml) - end - - def receive - @receive_lock.lock - - loop { - @stanzas_lock.synchronize { - if @stanzas.size > 0 - @receive_lock.unlock - return @stanzas.shift - end - } - - @receive_lock.lock - @receive_lock.unlock - } - end - - def state(&block) - @states << block - end - - def wait_state - @state_wait2.run - @state_wait.wait - end - - def skip_state - @state_wait2.run - end - end -end - -# Restore the old $VERBOSE setting -$VERBOSE = oldverbose diff --git a/vendor/xmpp4r-0.3.2/test/muc/tc_muc_mucclient.rb b/vendor/xmpp4r-0.3.2/test/muc/tc_muc_mucclient.rb deleted file mode 100755 index 482fea808..000000000 --- a/vendor/xmpp4r-0.3.2/test/muc/tc_muc_mucclient.rb +++ /dev/null @@ -1,594 +0,0 @@ -#!/usr/bin/ruby - - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' -require 'xmpp4r/muc' -require 'xmpp4r/semaphore' -include Jabber - -class MUCClientTest < Test::Unit::TestCase - include ClientTester - - def test_new1 - m = MUC::MUCClient.new(@client) - assert_equal(nil, m.jid) - assert_equal(nil, m.my_jid) - assert_equal({}, m.roster) - assert(!m.active?) - end - - # JEP-0045: 6.3 Entering a Room - def test_enter_room - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/thirdwitch'), pres.to) - send("" + - "" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/thirdwitch'), pres.to) - send("" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "") - } - - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert(!m.active?) - assert_nil(m.room) - - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - wait_state - assert(!m.active?) - assert_nil(m.room) - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - assert_equal('darkcave', m.room) - assert_equal(3, m.roster.size) - m.roster.each { |resource,pres| - assert_equal(resource, pres.from.resource) - assert_equal('darkcave', pres.from.node) - assert_equal('macbeth.shakespeare.lit', pres.from.domain) - assert_kind_of(String, resource) - assert_kind_of(Presence, pres) - assert(%w(firstwitch secondwitch thirdwitch).include?(resource)) - assert_kind_of(MUC::XMUCUser, pres.x) - assert_kind_of(Array, pres.x.items) - assert_equal(1, pres.x.items.size) - } - assert_equal(:owner, m.roster['firstwitch'].x.items[0].affiliation) - assert_equal(:moderator, m.roster['firstwitch'].x.items[0].role) - assert_equal(:admin, m.roster['secondwitch'].x.items[0].affiliation) - assert_equal(:moderator, m.roster['secondwitch'].x.items[0].role) - assert_equal(:member, m.roster['thirdwitch'].x.items[0].affiliation) - assert_equal(:participant, m.roster['thirdwitch'].x.items[0].role) - assert_nil(m.roster['thirdwitch'].x.items[0].jid) - - send("" + - "" + - "") - sleep 0.1 - assert_equal(3, m.roster.size) - assert_equal(:none, m.roster['thirdwitch'].x.items[0].affiliation) - assert_equal(:participant, m.roster['thirdwitch'].x.items[0].role) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), m.roster['thirdwitch'].x.items[0].jid) - end - - def test_enter_room_password - state { |pres| - assert_kind_of(Presence, pres) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal('cauldron', pres.x.password) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - wait_state - assert(!m.active?) - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch', 'cauldron')) - wait_state - assert(m.active?) - end - - def test_members_only_room - state { |pres| - assert_kind_of(Presence, pres) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - assert(!m.active?) - - wait_state - end - - def test_banned_users - state { |pres| - assert_kind_of(Presence, pres) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - assert(!m.active?) - - wait_state - end - - def test_nickname_conflict - state { |pres| - assert_kind_of(Presence, pres) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - assert(!m.active?) - - wait_state - end - - def test_max_users - state { |pres| - assert_kind_of(Presence, pres) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - assert(!m.active?) - - wait_state - end - - def test_locked_room - state { |pres| - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_raises(ErrorException) { - m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') - } - assert(!m.active?) - wait_state - end - - def test_exit_room - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.type) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:unavailable, pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_nil(pres.status) - send("" + - "" + - "") - send("" + - "" + - "") - } - - ignored_stanzas = 0 - @client.add_stanza_callback { |stanza| - ignored_stanzas += 1 - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_equal(0, ignored_stanzas) - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - - assert_equal(0, ignored_stanzas) - assert_equal(m, m.exit) - wait_state - assert(!m.active?) - assert_equal(1, ignored_stanzas) - end - - def test_custom_exit_message - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.type) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:unavailable, pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal('gone where the goblins go', pres.status) - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - assert(m.active?) - wait_state - - assert_equal(m, m.exit('gone where the goblins go')) - assert(!m.active?) - wait_state - end - - def test_joins - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/thirdwitch'), pres.to) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:unavailable, pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/thirdwitch'), pres.to) - assert_nil(pres.status) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/fourthwitch'), pres.to) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:unavailable, pres.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/fourthwitch'), pres.to) - assert_equal(pres.status, 'Exiting one last time') - send("" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - - assert_raises(RuntimeError) { m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') } - assert_raises(RuntimeError) { m.join('darkcave@macbeth.shakespeare.lit/fourthwitch') } - assert(m.active?) - - assert_equal(m, m.exit) - wait_state - assert(!m.active?) - assert_raises(RuntimeError) { m.exit } - assert(!m.active?) - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/fourthwitch')) - wait_state - assert(m.active?) - - assert_raises(RuntimeError) { m.join('darkcave@macbeth.shakespeare.lit/thirdwitch') } - assert_raises(RuntimeError) { m.join('darkcave@macbeth.shakespeare.lit/fourthwitch') } - assert(m.active?) - - assert_equal(m, m.exit('Exiting one last time')) - wait_state - assert(!m.active?) - assert_raises(RuntimeError) { m.exit } - assert(!m.active?) - end - - def test_message_callback - state { |pres| - assert_kind_of(Presence, pres) - assert_equal('cauldron', pres.x.password) - send("" + - "" + - "") - } - - message_lock = Semaphore.new - - messages_client = 0 - @client.add_message_callback { |msg| - messages_client += 1 - message_lock.run - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - messages_muc = 0 - m.add_message_callback { |msg| - messages_muc += 1 - message_lock.run - } - messages_muc_private = 0 - m.add_private_message_callback { |msg| - messages_muc_private += 1 - message_lock.run - } - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch', 'cauldron')) - assert(m.active?) - - assert_equal(0, messages_client) - assert_equal(0, messages_muc) - assert_equal(0, messages_muc_private) - - send("Hello") - message_lock.wait - - assert_equal(0, messages_client) - assert_equal(1, messages_muc) - assert_equal(0, messages_muc_private) - - send("Hello") - message_lock.wait - - assert_equal(1, messages_client) - assert_equal(1, messages_muc) - assert_equal(0, messages_muc_private) - - send("Hello") - message_lock.wait - - assert_equal(1, messages_client) - assert_equal(1, messages_muc) - assert_equal(1, messages_muc_private) - - wait_state - end - - def test_presence_callbacks - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.x.password) - send("" + - "" + - "") - } - - presence_lock = Semaphore.new - - presences_client = 0 - @client.add_presence_callback { |pres| - presences_client += 1 - presence_lock.run - } - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - presences_join = 0 - m.add_join_callback { |pres| - presences_join += 1 - presence_lock.run - } - presences_leave = 0 - m.add_leave_callback { |pres| - presences_leave += 1 - presence_lock.run - } - presences_muc = 0 - m.add_presence_callback { |pres| - presences_muc += 1 - presence_lock.run - } - - assert_equal(0, presences_client) - assert_equal(0, presences_join) - assert_equal(0, presences_leave) - assert_equal(0, presences_muc) - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - assert(m.active?) - - assert_equal(0, presences_client) - assert_equal(0, presences_join) # Joins before own join won't be called back - assert_equal(0, presences_leave) - assert_equal(0, presences_muc) - - send("" + - "" + - "") - presence_lock.wait - assert_equal(0, presences_client) - assert_equal(1, presences_join) - assert_equal(0, presences_leave) - assert_equal(0, presences_muc) - - send("" + - "chat" + - "") - presence_lock.wait - assert_equal(1, presences_client) - assert_equal(1, presences_join) - assert_equal(0, presences_leave) - assert_equal(0, presences_muc) - - send("" + - "" + - "away") - presence_lock.wait - assert_equal(1, presences_client) - assert_equal(1, presences_join) - assert_equal(0, presences_leave) - assert_equal(1, presences_muc) - - send("") - presence_lock.wait - assert_equal(1, presences_client) - assert_equal(1, presences_join) - assert_equal(1, presences_leave) - assert_equal(1, presences_muc) - wait_state - end - - def test_send - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.x.password) - send("" + - "" + - "") - } - state { |stanza| - assert_kind_of(Message, stanza) - assert(:groupchat, stanza.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), stanza.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit'), stanza.to) - assert_equal('First message', stanza.body) - } - state { |stanza| - assert_kind_of(Message, stanza) - assert(:chat, stanza.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), stanza.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/secondwitch'), stanza.to) - assert_equal('Second message', stanza.body) - } - state { |stanza| - assert_kind_of(Message, stanza) - assert(:chat, stanza.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), stanza.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/firstwitch'), stanza.to) - assert_equal('Third message', stanza.body) - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - - m.send(Jabber::Message.new(nil, 'First message')) - wait_state - m.send(Jabber::Message.new(nil, 'Second message'), 'secondwitch') - wait_state - m.send(Jabber::Message.new('secondwitch', 'Third message'), 'firstwitch') - wait_state - end - - def test_nick - state { |pres| - assert_kind_of(Presence, pres) - assert_nil(pres.x.password) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/secondwitch'), pres.to) - assert_nil(pres.type) - send("" + - "" + - "") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/oldhag'), pres.to) - assert_nil(pres.type) - send("" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "") - } - - m = MUC::MUCClient.new(@client) - m.my_jid = 'hag66@shakespeare.lit/pda' - - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - assert_equal('thirdwitch', m.nick) - - assert_raises(ErrorException) { - m.nick = 'secondwitch' - } - wait_state - assert(m.active?) - assert_equal('thirdwitch', m.nick) - - m.nick = 'oldhag' - wait_state - assert(m.active?) - assert_equal('oldhag', m.nick) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/muc/tc_muc_simplemucclient.rb b/vendor/xmpp4r-0.3.2/test/muc/tc_muc_simplemucclient.rb deleted file mode 100755 index f8b48e3a7..000000000 --- a/vendor/xmpp4r-0.3.2/test/muc/tc_muc_simplemucclient.rb +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/ruby - - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' -require 'xmpp4r/muc' -require 'xmpp4r/semaphore' -include Jabber - -class SimpleMUCClientTest < Test::Unit::TestCase - include ClientTester - - def test_new1 - m = MUC::SimpleMUCClient.new(@client) - assert_equal(nil, m.jid) - assert_equal(nil, m.my_jid) - assert_equal({}, m.roster) - assert(!m.active?) - end - - def test_complex - m = MUC::SimpleMUCClient.new(@client) - - block_args = [] - wait = Semaphore.new - block = lambda { |*a| block_args = a; wait.run } - m.on_room_message(&block) - m.on_message(&block) - m.on_private_message(&block) - m.on_subject(&block) - m.on_join(&block) - m.on_leave(&block) - m.on_self_leave(&block) - - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), pres.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit/thirdwitch'), pres.to) - send("" + - "" + - "" + - "" + - "" + - "" + - "" + - "" + - "") - } - m.my_jid = 'hag66@shakespeare.lit/pda' - assert_equal(m, m.join('darkcave@macbeth.shakespeare.lit/thirdwitch')) - wait_state - assert(m.active?) - assert_equal(3, m.roster.size) - - state { |msg| - assert_kind_of(Message, msg) - assert_equal(:groupchat, msg.type) - assert_equal(JID.new('hag66@shakespeare.lit/pda'), msg.from) - assert_equal(JID.new('darkcave@macbeth.shakespeare.lit'), msg.to) - assert_equal('TestCasing room', msg.subject) - assert_nil(msg.body) - send(msg.set_from('darkcave@macbeth.shakespeare.lit/thirdwitch').set_to('hag66@shakespeare.lit/pda')) - } - assert_nil(m.subject) - wait.wait - m.subject = 'TestCasing room' - wait_state - wait.wait - assert_equal([nil, 'thirdwitch', 'TestCasing room'], block_args) - assert_equal('TestCasing room', m.subject) - end - -end diff --git a/vendor/xmpp4r-0.3.2/test/muc/tc_mucowner.rb b/vendor/xmpp4r-0.3.2/test/muc/tc_mucowner.rb deleted file mode 100644 index 4f9015a90..000000000 --- a/vendor/xmpp4r-0.3.2/test/muc/tc_mucowner.rb +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r' -require 'xmpp4r/muc' -include Jabber - -class MUCOwnerTest < Test::Unit::TestCase - def test_parse - s = < - - - Configuration for "darkcave" Room - - Complete this form to make changes to - the configuration of your room. - - - http://jabber.org/protocol/muc#roomconfig - - - A Dark Cave - - - - -EOF - iq = Iq::import(REXML::Document.new(s).root) - - assert_kind_of(Iq, iq) - assert_kind_of(MUC::IqQueryMUCOwner, iq.query) - assert_kind_of(Dataforms::XData, iq.query.x) - assert_kind_of(Dataforms::XData, iq.query.x('jabber:x:data')) - assert_kind_of(Dataforms::XData, iq.query.x(Dataforms::XData)) - - assert_equal(1, iq.query.x.fields.size) - assert_equal('Natural-Language Room Name', iq.query.x.fields[0].label) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/pubsub/tc_helper.rb b/vendor/xmpp4r-0.3.2/test/pubsub/tc_helper.rb deleted file mode 100644 index 7f812663f..000000000 --- a/vendor/xmpp4r-0.3.2/test/pubsub/tc_helper.rb +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/pubsub/helper/servicehelper' -include Jabber - - -class PubSub::ServiceHelperTest < Test::Unit::TestCase - include ClientTester - - def test_create - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - assert_kind_of(PubSub::ServiceHelper, h) - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:set, iq.type) - assert_equal(1, iq.children.size) - assert_equal('http://jabber.org/protocol/pubsub', iq.pubsub.namespace) - assert_equal(1, iq.pubsub.children.size) - assert_equal('create', iq.pubsub.children.first.name) - assert_equal('mynode', iq.pubsub.children.first.attributes['node']) - send(" - - - - ") - } - assert_equal('mynode', h.create('mynode')) - wait_state - end - - def test_delete - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:set, iq.type) - assert_equal(1, iq.children.size) - assert_equal(1, iq.pubsub.children.size) - assert_equal('delete', iq.pubsub.children.first.name) - assert_equal('mynode', iq.pubsub.children.first.attributes['node']) - send("") - } - h.delete('mynode') - wait_state - end - - def test_publish - item1 = Jabber::PubSub::Item.new - item1.text = 'foobar' - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:set, iq.type) - assert_equal(1, iq.children.size) - assert_equal(1, iq.pubsub.children.size) - assert_equal('publish', iq.pubsub.children[0].name) - assert_equal(1, iq.pubsub.children[0].children.size) - assert_equal('item', iq.pubsub.children[0].children[0].name) - assert_nil(iq.pubsub.children[0].children[0].attributes['id']) - assert_equal(1, iq.pubsub.children[0].children[0].children.size) - assert_equal(item1.children.to_s, iq.pubsub.children[0].children[0].children[0].to_s) - send("") - } - h.publish('mynode', item1) - wait_state - end - - def test_items - item1 = Jabber::PubSub::Item.new("1") - item1.text = 'foobar' - item2 = Jabber::PubSub::Item.new("2") - item2.text = 'barfoo' - - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:get, iq.type) - assert_equal(1, iq.pubsub.children.size) - assert_equal('items', iq.pubsub.children.first.name) - assert_equal('mynode', iq.pubsub.children.first.attributes['node']) - send(" - - - #{item1.to_s} - #{item2.to_s} - - - ") - } - - items = h.items('mynode') - assert_equal(2, items.size) - assert_kind_of(REXML::Text, items['1']) - assert_kind_of(REXML::Text, items['2']) - assert_equal(item1.children.to_s, items['1'].to_s) - assert_equal(item2.children.to_s, items['2'].to_s) - wait_state - end - - def test_affiliations - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:get, iq.type) - assert_equal(1, iq.pubsub.children.size) - assert_equal('affiliations', iq.pubsub.children.first.name) - send(" - - - - - - - - - ") - } - - a = h.affiliations - assert_kind_of(Hash, a) - assert_equal(4, a.size) - assert_equal(:owner, a['node1']) - assert_equal(:publisher, a['node2']) - assert_equal(:outcast, a['node5']) - assert_equal(:owner, a['node6']) - wait_state - end - - def test_subscriptions - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:get, iq.type) - assert_equal(1, iq.pubsub.children.size) - assert_equal('subscriptions', iq.pubsub.children.first.name) - send(" - - - - - - - - - ") - } - - s = h.subscriptions('mynode') - assert_kind_of(Array,s) - assert_equal(4,s.size) - assert_kind_of(REXML::Element,s[0]) - assert_kind_of(REXML::Element,s[1]) - assert_kind_of(REXML::Element,s[2]) - assert_kind_of(REXML::Element,s[3]) - wait_state - end - - def test_get_all_subscriptions - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:get, iq.type) - assert_equal(1, iq.pubsub.children.size) - assert_equal('subscriptions', iq.pubsub.children.first.name) - send(" - - - - - - - - - ") - } - - s = h.subscriptions - assert_kind_of(Array,s) - assert_equal(4,s.size) - assert_kind_of(REXML::Element,s[0]) - assert_kind_of(REXML::Element,s[1]) - assert_kind_of(REXML::Element,s[2]) - assert_kind_of(REXML::Element,s[3]) - wait_state - end - - def test_subscribers - h = PubSub::ServiceHelper.new(@client,'pubsub.example.org') - - state { |iq| - assert_kind_of(Jabber::Iq, iq) - assert_equal(:get, iq.type) - assert_equal(1, iq.pubsub.children.size) - assert_equal('subscriptions', iq.pubsub.children.first.name) - send(" - - - - - - - - - ") - } - - s = h.subscribers('princely_musings') - assert_equal(4,s.size) - assert_kind_of(String,s[0]) - assert_kind_of(String,s[1]) - assert_kind_of(String,s[2]) - assert_kind_of(String,s[3]) - wait_state - end -end diff --git a/vendor/xmpp4r-0.3.2/test/roster/tc_helper.rb b/vendor/xmpp4r-0.3.2/test/roster/tc_helper.rb deleted file mode 100644 index b24956977..000000000 --- a/vendor/xmpp4r-0.3.2/test/roster/tc_helper.rb +++ /dev/null @@ -1,515 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/roster/helper/roster' -require 'xmpp4r/semaphore' -include Jabber - -class Roster::HelperTest < Test::Unit::TestCase - include ClientTester - - def test_simple - state { |iq| - assert_kind_of(Iq, iq) - assert_equal(:get, iq.type) - assert_nil(iq.to) - assert_equal('jabber:iq:roster', iq.queryns) - - send("") - send(" - - - - - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| - query_waiter.run - } - wait_state - query_waiter.wait - - assert_equal([nil], h.groups) - jids = h.find_by_group(nil).collect { |item| item.jid }.sort - assert_equal([JID.new('123@xyz'), JID.new('a@b.c'), JID.new('b@b.c')], jids) - assert_equal(1, h.find('123@xyz/res').size) - - assert_kind_of(Roster::Helper::RosterItem, h['a@b.c']) - assert_equal(JID.new('a@b.c'), h['a@b.c'].jid) - assert_nil(h['a@b.c'].iname) - assert_equal(:both, h['a@b.c'].subscription) - assert_nil(h['a@b.c'].ask) - - assert_kind_of(Roster::Helper::RosterItem, h[JID.new('b@b.c')]) - assert_equal(JID.new('b@b.c'), h['b@b.c'].jid) - assert_equal('b guy', h['b@b.c'].iname) - assert_equal(:from, h['b@b.c'].subscription) - assert_equal(:subscribe, h['b@b.c'].ask) - - assert_kind_of(Roster::Helper::RosterItem, h['123@xyz']) - assert_equal(JID.new('123@xyz'), h['123@xyz'].jid) - assert_equal('123', h['123@xyz'].iname) - assert_equal(:to, h['123@xyz'].subscription) - assert_nil(h['123@xyz'].ask) - - assert_nil(h['c@b.c']) - assert_nil(h[JID.new('c@b.c')]) - end - - def test_rosterpush - state { |iq| - send(" - - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| query_waiter.run } - wait_state - query_waiter.wait - - assert_equal([], h.groups) - assert_nil(h['a@b.c']) - - send(" - - - - ") - query_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, h['a@b.c']) - assert_equal(JID.new('a@b.c'), h['a@b.c'].jid) - assert_nil(h['a@b.c'].iname) - assert_nil(h['a@b.c'].subscription) - assert_nil(h['a@b.c'].ask) - - send(" - - - - ") - query_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, h['a@b.c']) - assert_equal(JID.new('a@b.c'), h['a@b.c'].jid) - assert_equal('ABC', h['a@b.c'].iname) - assert_equal(:from, h['a@b.c'].subscription) - assert_equal(:subscribe, h['a@b.c'].ask) - - send(" - - - - ") - query_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, h['a@b.c']) - assert_equal(JID.new('a@b.c'), h['a@b.c'].jid) - assert_nil(h['a@b.c'].iname) - assert_nil(h['a@b.c'].subscription) - assert_nil(h['a@b.c'].ask) - - send(" - - - - ") - query_waiter.wait - - assert_nil(h['a@b.c']) - end - - def test_presence - state { |iq| - send(" - - - - ") - } - - query_waiter = Semaphore.new - presence_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| - query_waiter.run - } - cb_item, cb_op, cb_p = nil, nil, nil - h.add_presence_callback { |item,oldpres,pres| - # HACK: - # if two stanzas are expected for one sent stanza, - # race conditions may appear here - Thread.pass - - cb_item, cb_op, cb_p = item, oldpres, pres - presence_waiter.run - } - - wait_state - query_waiter.wait - - assert_equal(false, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(0, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_nil(cb_op) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(1, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_nil(cb_op) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_nil(cb_op.type) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_nil(cb_op.type) - assert_kind_of(Presence, cb_p) - assert_equal(:error, cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_nil(cb_op.type) - assert_kind_of(Presence, cb_p) - assert_equal(:unavailable, cb_p.type) - assert_equal(false, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_equal(:error, cb_op.type) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_equal(:unavailable, cb_op.type) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(2, presences) - - send("") - 2.times { - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_kind_of(Presence, cb_op) - assert_kind_of(Presence, cb_p) - assert_equal(:error, cb_p.type) - } - assert_equal(false, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(1, presences) - - send("") - presence_waiter.wait - - assert_kind_of(Roster::Helper::RosterItem, cb_item) - assert_nil(cb_op) - assert_kind_of(Presence, cb_p) - assert_nil(cb_p.type) - assert_equal(true, h['a@b.c'].online?) - presences = 0 - h['a@b.c'].each_presence { presences += 1 } - assert_equal(1, presences) - end - - def test_subscribe - state { |iq| - send(" - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| query_waiter.run } - wait_state - query_waiter.wait - - state { |iq| - assert_kind_of(Iq, iq) - assert_equal('jabber:iq:roster', iq.queryns) - assert_equal(JID.new('contact@example.org'), iq.query.first_element('item').jid) - assert_equal('MyContact', iq.query.first_element('item').iname) - send(" - - - - - ") - } - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:subscribe, pres.type) - assert_equal(JID.new('contact@example.org'), pres.to) - Thread.pass - } - h.add('contact@example.org', 'MyContact', true) - wait_state - query_waiter.wait - wait_state - end - - def test_accept_subscription - state { |iq| - send(" - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| query_waiter.run } - wait_state - query_waiter.wait - - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:subscribed, pres.type) - } - state { |iq| - assert_kind_of(Iq, iq) - assert_equal(:set, iq.type) - send("") - } - - cb_lock = Semaphore.new - h.add_subscription_request_callback { |item,pres| - assert_nil(item) - assert_kind_of(Presence, pres) - h.accept_subscription(pres.from) - cb_lock.run - } - send("") - skip_state - wait_state - cb_lock.wait - - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:subscribed, pres.type) - assert_equal(JID.new('contact@example.org'), pres.to) - } - wait_state - end - - def test_decline_subscription - state { |iq| - send(" - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper::new(@client) - h.add_query_callback { |iq| query_waiter.run } - wait_state - query_waiter.wait - - state { |pres| - assert_kind_of(Presence, pres) - assert_equal(:unsubscribed, pres.type) - assert_equal(JID.new('contact@example.org'), pres.to) - } - cb_lock = Semaphore.new - h.add_subscription_request_callback { |item,pres| - assert_nil(item) - assert_kind_of(Presence, pres) - h.decline_subscription(pres.from) - - cb_lock.run - } - - send("") - wait_state - cb_lock.wait - end - - def test_groupset - state { |iq| - send(" - - - One - Two - - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper.new(@client) - h.add_query_callback { query_waiter.run } - wait_state - query_waiter.wait - - assert_equal(1, h.items.size) - assert_equal(%w(One Two).sort, h['test@test'].groups.sort) - - state { |iq| - send("#{iq.query}") - } - h['test@test'].groups = %w(One Two Three) - h['test@test'].send - wait_state - query_waiter.wait - assert_equal(%w(One Two Three).sort, h['test@test'].groups.sort) - end - - def test_nameset - state { |iq| - send(" - - - - ") - } - - query_waiter = Semaphore.new - h = Roster::Helper.new(@client) - h.add_query_callback { query_waiter.run } - wait_state - query_waiter.wait - - assert_equal(1, h.items.size) - assert_nil(h['test@test'].iname) - - state { |iq| - send("#{iq.query}") - } - h['test@test'].iname = 'Unknown' - h['test@test'].send - wait_state - query_waiter.wait - assert_equal('Unknown', h['test@test'].iname) - - state { |iq| - send("#{iq.query}") - } - h['test@test'].iname = 'Known' - h['test@test'].send - wait_state - query_waiter.wait - assert_equal('Known', h['test@test'].iname) - - state { |iq| - send("#{iq.query}") - } - h['test@test'].iname = nil - h['test@test'].send - wait_state - query_waiter.wait - assert_nil(h['test@test'].iname) - end - - def test_update_callback - update_args = nil - update_waiter = Semaphore.new - - h = Roster::Helper.new(@client) - h.add_update_callback { |*a| - update_args = a - update_waiter.run - } - - send(" - - - - ") - update_waiter.wait - assert_nil(update_args[0]) - assert_equal(JID.new('foo@bar'), update_args[1].jid) - assert_equal('Foo', update_args[1].iname) - - send(" - - - - ") - update_waiter.wait - assert_equal(JID.new('foo@bar'), update_args[0].jid) - assert_equal('Foo', update_args[0].iname) - assert_equal(JID.new('foo@bar'), update_args[1].jid) - assert_nil(update_args[1].iname) - - send(" - - - - ") - update_waiter.wait - assert_equal(JID.new('foo@bar'), update_args[0].jid) - assert_nil(update_args[0].iname) - assert_nil(update_args[1]) - end -end - diff --git a/vendor/xmpp4r-0.3.2/test/roster/tc_iqqueryroster.rb b/vendor/xmpp4r-0.3.2/test/roster/tc_iqqueryroster.rb deleted file mode 100755 index f6162a9c6..000000000 --- a/vendor/xmpp4r-0.3.2/test/roster/tc_iqqueryroster.rb +++ /dev/null @@ -1,173 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/roster/iq/roster' -require 'xmpp4r/jid' -require 'xmpp4r/iq' -include Jabber - -class Roster::IqQueryRosterTest < Test::Unit::TestCase - def test_create - r = Roster::IqQueryRoster::new - assert_equal('jabber:iq:roster', r.namespace) - assert_equal(r.to_a.size, 0) - assert_equal(r.to_a, []) - assert_equal(r.to_s, "") - end - - def test_import - iq = Iq::new - q = REXML::Element::new('query') - q.add_namespace('jabber:iq:roster') - iq.add(q) - iq2 = Iq::new.import(iq) - assert_equal(Roster::IqQueryRoster, iq2.query.class) - end - - def test_answer - iq = Iq::new_rosterget - assert_equal(:get, iq.type) - assert_nil(iq.to) - assert_equal('jabber:client', iq.namespace) - assert_equal('jabber:iq:roster', iq.queryns) - assert_equal(0, iq.query.children.size) - - iq2 = iq.answer(true) - assert_equal(:get, iq2.type) - assert_nil(iq2.from) - assert_equal('jabber:client', iq2.namespace) - assert_equal('jabber:iq:roster', iq2.queryns) - assert_equal(0, iq2.query.children.size) - end - - def test_xmlns - ri = Roster::RosterItem.new - assert_equal('jabber:iq:roster', ri.namespace) - assert_equal('jabber:iq:roster', ri.attributes['xmlns']) - - r = Roster::IqQueryRoster.new - assert_equal('jabber:iq:roster', r.namespace) - assert_equal('jabber:iq:roster', r.attributes['xmlns']) - - r.add(ri) - - assert_equal('jabber:iq:roster', ri.namespace) - assert_nil(ri.attributes['xmlns']) - end - - def test_items - r = Roster::IqQueryRoster::new - r.add(Roster::RosterItem.new) - r.add(Roster::RosterItem.new(JID.new('a@b/d'), 'ABC', :none, :subscribe)).groups = ['a'] - itemstr = "" \ - + "SpaceBoyZxmpp4r" - r.typed_add(REXML::Document.new(itemstr).root) - - r.each { |item| - assert_equal(item, r[item.jid]) - } - - r.to_a.each { |item| - assert_equal(item, r[item.jid]) - } - - assert_equal(JID.new, r.to_a[0].jid) - assert_equal(nil, r.to_a[0].iname) - assert_equal(nil, r.to_a[0].subscription) - assert_equal(nil, r.to_a[0].ask) - - assert_equal(JID.new('a@b/d'), r.to_a[1].jid) - assert_equal('ABC', r.to_a[1].iname) - assert_equal(:none, r.to_a[1].subscription) - assert_equal(:subscribe, r.to_a[1].ask) - - assert_equal(REXML::Document.new(itemstr).root.to_s, r.to_a[2].to_s) - end - - def test_dupitems - r = Roster::IqQueryRoster::new - jid = JID::new('a@b') - jid2 = JID::new('c@d') - ri = Roster::RosterItem::new(jid, 'ab') - r.add(ri) - assert_equal('ab', ri.iname) - assert_equal('ab', r[jid].iname) - ri.iname = 'cd' - assert_equal('cd', ri.iname) - # There are no shallow copies - everything is alright. - assert_equal('cd', r[jid].iname) - - r.add(ri) - assert_equal('cd', r[jid].iname) - assert_equal(ri, r[jid]) - - ri.jid = jid2 - assert_equal(nil, r[jid]) - assert_equal(ri, r[jid2]) - assert_equal(2, r.to_a.size) - - r.each_element('item') { |item| - assert_equal(ri, item) - assert_equal(ri.jid, item.jid) - assert_equal(ri.iname, item.iname) - assert_equal(jid2, item.jid) - assert_equal('cd', item.iname) - } - end -end - -class Roster::RosterItemTest < Test::Unit::TestCase - def test_create - ri = Roster::RosterItem::new - assert_equal(JID.new, ri.jid) - assert_equal(nil, ri.iname) - assert_equal(nil, ri.subscription) - assert_equal(nil, ri.ask) - - ri = Roster::RosterItem::new(JID.new('a@b/c'), 'xyz', :both, nil) - assert_equal(JID.new('a@b/c'), ri.jid) - assert_equal('xyz', ri.iname) - assert_equal(:both, ri.subscription) - assert_equal(nil, ri.ask) - end - - def test_modify - ri = Roster::RosterItem::new(JID.new('a@b/c'), 'xyz', :both, :subscribe) - - assert_equal(JID.new('a@b/c'), ri.jid) - ri.jid = nil - assert_equal(JID::new, ri.jid) - - assert_equal('xyz', ri.iname) - ri.iname = nil - assert_equal(nil, ri.iname) - - assert_equal(:both, ri.subscription) - ri.subscription = nil - assert_equal(nil, ri.subscription) - - assert_equal(:subscribe, ri.ask) - ri.ask = nil - assert_equal(nil, ri.ask) - end - - def test_groupdeletion - ri = Roster::RosterItem::new - g1 = ['a', 'b', 'c'] - ri.groups = g1 - assert_equal(g1, ri.groups.sort) - g2 = ['c', 'd', 'e'] - ri.groups = g2 - assert_equal(g2, ri.groups.sort) - end - - def test_dupgroups - ri = Roster::RosterItem::new - mygroups = ['a', 'a', 'b'] - ri.groups = mygroups - assert_equal(mygroups.uniq, ri.groups) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/roster/tc_xroster.rb b/vendor/xmpp4r-0.3.2/test/roster/tc_xroster.rb deleted file mode 100755 index 5665a844c..000000000 --- a/vendor/xmpp4r-0.3.2/test/roster/tc_xroster.rb +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/roster/x/roster' -require 'xmpp4r/jid' -include Jabber - -class Roster::XRosterTest < Test::Unit::TestCase - def test_create - r1 = Roster::XRoster.new - assert_equal('x', r1.name) - assert_equal('jabber:x:roster', r1.namespace) - r2 = Roster::RosterX.new - assert_equal('x', r2.name) - assert_equal('http://jabber.org/protocol/rosterx', r2.namespace) - end - - def test_import - x1 = X.new - x1.add_namespace('jabber:x:roster') - x2 = X::import(x1) - assert_equal(Roster::XRoster, x2.class) - assert_equal('jabber:x:roster', x2.namespace) - end - - def test_typed_add - x = REXML::Element.new('x') - x.add(REXML::Element.new('item')) - r = Roster::XRoster.new.import(x) - assert_kind_of(Roster::XRosterItem, r.first_element('item')) - assert_kind_of(Roster::XRosterItem, r.typed_add(REXML::Element.new('item'))) - end - - def test_items - j1 = Roster::XRosterItem.new - assert_equal(JID.new(nil), j1.jid) - assert_equal(nil, j1.iname) - - j2 = Roster::XRosterItem.new(JID.new('a@b/c')) - assert_equal(JID.new('a@b/c'), j2.jid) - assert_equal(nil, j2.iname) - j3 = Roster::XRosterItem.new(JID.new('a@b/c'), 'Mr. Abc') - assert_equal(JID.new('a@b/c'), j3.jid) - assert_equal('Mr. Abc', j3.iname) - assert_equal([], j3.groups) - - j3.groups = ['X', 'Y', 'Z'] - assert_equal(['X', 'Y', 'Z'], j3.groups) - end - - def test_actions - j = Roster::XRosterItem.new - assert_equal(:add, j.action) - - j.action = :modify - assert_equal(:modify, j.action) - - j.action = :delete - assert_equal(:delete, j.action) - - j.action = :invalid - assert_equal(:add, j.action) - - j.attributes['action'] = 'modify' - assert_equal(:modify, j.action) - - j.attributes['action'] = 'invalid' - assert_equal(:add, j.action) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/rpc/tc_helper.rb b/vendor/xmpp4r-0.3.2/test/rpc/tc_helper.rb deleted file mode 100644 index 7dc8520c6..000000000 --- a/vendor/xmpp4r-0.3.2/test/rpc/tc_helper.rb +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/rpc/helper/client' -require 'xmpp4r/rpc/helper/server' -include Jabber - -class RPC::HelperTest < Test::Unit::TestCase - include ClientTester - - def give_client_jid! - class << @client - def jid; Jabber::JID.new('client@test.com/clienttester'); end - end - end - - def test_create - give_client_jid! - - cl = RPC::Client.new(@client, 'a@b/c') - assert_kind_of(RPC::Client, cl) - sv = RPC::Server.new(@server) - assert_kind_of(RPC::Server, sv) - end - - def test_simple - give_client_jid! - - sv = RPC::Server.new(@server) - sv.add_handler("echo") do |s| s end - - cl = RPC::Client.new(@client, 'a@b/c') - assert_equal('Test string', cl.call("echo", 'Test string')) - end - - def test_introspection - give_client_jid! - - sv = RPC::Server.new(@server) - sv.add_introspection - - cl = RPC::Client.new(@client, 'a@b/c') - cl_methods = cl.call("system.listMethods") - assert(cl_methods.size > 0) - cl_methods.each { |method| - assert_kind_of(String, method) - assert(method =~ /^system\./) - } - end - - def test_multicall - give_client_jid! - - sv = RPC::Server.new(@server) - sv.add_multicall - sv.add_handler("reverse") do |s| s.reverse end - sv.add_handler("upcase") do |s| s.upcase end - - cl = RPC::Client.new(@client, 'a@b/c') - assert_equal(['tseT', 'TEST'], cl.multicall(['reverse', 'Test'], ['upcase', 'Test'])) - end - - def test_100calls - give_client_jid! - - sv = RPC::Server.new(@server) - sv.add_handler("add") do |a,b| a+b end - - cl = RPC::Client.new(@client, 'a@b/c') - correct = true - 100.times { - a, b = rand(1000), rand(1000) - correct &&= (cl.call('add', a, b) == a + b) - } - - assert(correct) - end -end - diff --git a/vendor/xmpp4r-0.3.2/test/tc_callbacks.rb b/vendor/xmpp4r-0.3.2/test/tc_callbacks.rb deleted file mode 100755 index 034d413a1..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_callbacks.rb +++ /dev/null @@ -1,129 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/callbacks' -include Jabber - -class CallbacksTest < Test::Unit::TestCase - def test_test1 - called = 0 - cb = Callback::new(5, "toto", Proc::new { called += 1 }) - assert_equal(5, cb.priority) - assert_equal("toto", cb.ref) - cb.block.call - assert_equal(1, called) - cb.block.call - assert_equal(2, called) - end - - def test_callbacklist1 - cbl = CallbackList::new - called1 = false - called2 = false - called3 = false - called4 = false - cbl.add(5, "ref1") { called1 = true ; true } - cbl.add(7, "ref1") { |e| called2 = true ; false} - cbl.add(9, "ref1") { called3 = true ;false } - cbl.add(11, "ref1") { called4 = true ; false } - o = "aaaa" - assert(cbl.process(o)) - assert(called1) - assert(called2) - assert(called3) - assert(called4) - end - - def test_callbacklist2 - cbl = CallbackList::new - assert(0, cbl.length) - cbl.add(5, "ref1") { called1 = true } - assert(1, cbl.length) - cbl.add(7, "ref2") { |e| called2 = true ; e.consume } - assert(2, cbl.length) - cbl.delete("ref2") - assert(1, cbl.length) - cbl.add(9, "ref3") { called3 = true } - assert(2, cbl.length) - end - - def test_callbacklist4 - cbl = CallbackList::new - cbl.add(5, "ref1") { false } - cbl.add(7, "ref1") { false } - o = "o" - assert(!cbl.process(o)) - end - - def test_callbacklist5 - cbl = CallbackList::new - cbl.add(5, "ref1") { true } - cbl.add(7, "ref1") { false } - o = "o" - assert(cbl.process(o)) - end - - def test_callbacklist6 - cbl = CallbackList::new - ok = false - c = 'a' - d = 'b' - cbl.add(5, "ref1") { |a, b| - if a == 'a' and b == 'b' - ok = true - end - false - } - assert(!cbl.process(c, d)) - assert(ok) - end - - def test_callbacklist7 - cbl = CallbackList::new - called1 = false - called2 = false - called3 = false - called4 = false - cbl.add(3, "ref1") { called4 = true ; true } - cbl.add(5, "ref1") { called1 = true ; true } - cbl.add(7, "ref1") { called2 = true ; 'a'} - cbl.add(9, "ref1") { called3 = true ;1 } - o = "aaaa" - assert(cbl.process(o)) - assert(called1) - assert(called2) - assert(called3) - assert(!called4) - end - - def test_nested - cbl = CallbackList.new - called_outer = 0 - called_inner = 0 - - cbl.add(100, nil) { - called_outer += 1 - - if called_outer == 1 - cbl.add(200, nil) { - called_inner += 1 - } - end - } - - assert_equal(0, called_inner) - assert_equal(0, called_outer) - - cbl.process - - assert_equal(0, called_inner) - assert_equal(1, called_outer) - - cbl.process - - assert_equal(1, called_inner) - assert_equal(2, called_outer) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_class_names.rb b/vendor/xmpp4r-0.3.2/test/tc_class_names.rb deleted file mode 100755 index 169b2cd65..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_class_names.rb +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r' -# No include Jabber, test full namespace - -class JIDTest < Test::Unit::TestCase - def test_base - assert_kind_of(Module, Jabber) - assert_kind_of(Class, Jabber::AuthenticationFailure) - assert_kind_of(Class, Jabber::Client) - assert_kind_of(Class, Jabber::Component) - assert_kind_of(Class, Jabber::Connection) - assert_kind_of(Class, Jabber::Error) - assert_kind_of(Class, Jabber::ErrorException) - assert_kind_of(Class, Jabber::IdGenerator) - assert_kind_of(Class, Jabber::Iq) - assert_kind_of(Class, Jabber::IqQuery) - assert_kind_of(Class, Jabber::JID) - assert_kind_of(Class, Jabber::Message) - assert_kind_of(Class, Jabber::Presence) - assert_kind_of(Module, Jabber::SASL) - assert_respond_to(Jabber::SASL, :new) - assert_kind_of(Class, Jabber::SASL::Base) - assert_kind_of(Class, Jabber::SASL::Plain) - assert_kind_of(Class, Jabber::SASL::DigestMD5) - assert_kind_of(Class, Jabber::Stream) - assert_kind_of(Class, Jabber::StreamParser) - assert_kind_of(Class, Jabber::X) - assert_kind_of(Class, Jabber::XMPPElement) - assert_kind_of(Class, Jabber::XMPPStanza) - end - - def test_roster - require 'xmpp4r/roster' - assert_kind_of(Module, Jabber::Roster) - assert_kind_of(Class, Jabber::Roster::Helper) - assert_kind_of(Class, Jabber::Roster::Helper::RosterItem) - assert_kind_of(Class, Jabber::Roster::RosterItem) - assert_kind_of(Class, Jabber::Roster::IqQueryRoster) - assert_kind_of(Class, Jabber::Roster::XRoster) - assert_kind_of(Class, Jabber::Roster::XRosterItem) - end - - def test_muc - require 'xmpp4r/muc' - assert_kind_of(Module, Jabber::MUC) - assert_kind_of(Class, Jabber::MUC::MUCBrowser) - assert_kind_of(Class, Jabber::MUC::MUCClient) - assert_kind_of(Class, Jabber::MUC::SimpleMUCClient) - assert_kind_of(Class, Jabber::MUC::XMUC) - assert_kind_of(Class, Jabber::MUC::XMUCUser) - assert_kind_of(Class, Jabber::MUC::XMUCUserInvite) - end - - def test_bytestreams - require 'xmpp4r/bytestreams' - assert_kind_of(Module, Jabber::FileTransfer) - assert_kind_of(Module, Jabber::FileTransfer::TransferSource) - assert_kind_of(Class, Jabber::FileTransfer::FileSource) - assert_kind_of(Class, Jabber::FileTransfer::Helper) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5BytestreamsServer) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5BytestreamsServerStreamHost) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5BytestreamsPeer) - assert_kind_of(Class, Jabber::Bytestreams::IqQueryBytestreams) - assert_kind_of(Class, Jabber::Bytestreams::StreamHost) - assert_kind_of(Class, Jabber::Bytestreams::StreamHostUsed) - assert_kind_of(Class, Jabber::Bytestreams::IqSi) - assert_kind_of(Class, Jabber::Bytestreams::IqSiFile) - assert_kind_of(Class, Jabber::Bytestreams::IqSiFileRange) - assert_kind_of(Class, Jabber::Bytestreams::IBB) - assert_kind_of(Class, Jabber::Bytestreams::IBBQueueItem) - assert_kind_of(Class, Jabber::Bytestreams::IBBInitiator) - assert_kind_of(Class, Jabber::Bytestreams::IBBTarget) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5Bytestreams) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5BytestreamsInitiator) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5BytestreamsTarget) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5Error) - assert_kind_of(Class, Jabber::Bytestreams::SOCKS5Socket) - end - - def test_dataforms - require 'xmpp4r/dataforms' - assert_kind_of(Module, Jabber::Dataforms) - assert_kind_of(Class, Jabber::Dataforms::XData) - assert_kind_of(Class, Jabber::Dataforms::XDataTitle) - assert_kind_of(Class, Jabber::Dataforms::XDataInstructions) - assert_kind_of(Class, Jabber::Dataforms::XDataField) - assert_kind_of(Class, Jabber::Dataforms::XDataReported) - end - - def test_delay - require 'xmpp4r/delay' - assert_kind_of(Module, Jabber::Delay) - assert_kind_of(Class, Jabber::Delay::XDelay) - end - - def test_discovery - require 'xmpp4r/discovery' - assert_kind_of(Module, Jabber::Discovery) - assert_kind_of(Class, Jabber::Discovery::IqQueryDiscoInfo) - assert_kind_of(Class, Jabber::Discovery::Identity) - assert_kind_of(Class, Jabber::Discovery::Feature) - assert_kind_of(Class, Jabber::Discovery::IqQueryDiscoItems) - assert_kind_of(Class, Jabber::Discovery::Item) - end - - def test_feature_negotiation - require 'xmpp4r/feature_negotiation' - assert_kind_of(Module, Jabber::FeatureNegotiation) - assert_kind_of(Class, Jabber::FeatureNegotiation::IqFeature) - end - - def test_vcard - require 'xmpp4r/vcard' - assert_kind_of(Module, Jabber::Vcard) - assert_kind_of(Class, Jabber::Vcard::Helper) - assert_kind_of(Class, Jabber::Vcard::IqVcard) - end - - def test_version - require 'xmpp4r/version' - assert_kind_of(Module, Jabber::Version) - assert_kind_of(Class, Jabber::Version::Responder) - assert_kind_of(Class, Jabber::Version::SimpleResponder) - assert_kind_of(Class, Jabber::Version::IqQueryVersion) - end - - def test_rpc - require 'xmpp4r/rpc' - assert_kind_of(Module, Jabber::RPC) - assert_kind_of(Class, Jabber::RPC::Server) - assert_kind_of(Class, Jabber::RPC::Client) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_client.rb b/vendor/xmpp4r-0.3.2/test/tc_client.rb deleted file mode 100755 index 50bce0957..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_client.rb +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/client' -include Jabber - -class ClientTest < Test::Unit::TestCase - def test_client1 -=begin - c = Client::new(JID::new('client1@localhost/res')) - assert_nothing_raised("Couldn't connect") { - c.connect - } - assert_nothing_raised("Couldn't authenticate") { - c.auth('pw') - } -=end - end - - def test_jid_is_jid - c1 = Client::new(JID::new('user@host/resource')) - assert_kind_of(JID, c1.jid) - assert_equal('user@host/resource', c1.jid.to_s) - c2 = Client::new('user@host/resource') - assert_kind_of(JID, c2.jid) - assert_equal('user@host/resource', c2.jid.to_s) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_error.rb b/vendor/xmpp4r-0.3.2/test/tc_error.rb deleted file mode 100755 index c61de8db2..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_error.rb +++ /dev/null @@ -1,104 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/error' -require 'xmpp4r/message' -include Jabber - -class ErrorTest < Test::Unit::TestCase - def test_create - e = Error::new - assert_equal(nil, e.error) - assert_equal(nil, e.code) - assert_equal(nil, e.type) - assert_equal(nil, e.text) - end - - def test_create2 - e = Error::new('payment-required') - assert_equal('payment-required', e.error) - assert_equal(402, e.code) - assert_equal(:auth, e.type) - assert_equal(nil, e.text) - end - - def test_create3 - e = Error::new('gone', 'User moved to afterlife.gov') - assert_equal('gone', e.error) - assert_equal(302, e.code) - assert_equal(:modify, e.type) - assert_equal('User moved to afterlife.gov', e.text) - end - - def test_create_invalid - assert_raise(RuntimeError) { - e = Error::new('invalid error') - } - end - - def test_type - e = Error::new - assert_nil(e.type) - e.type = :auth - assert_equal(:auth, e.type) - e.type = :cancel - assert_equal(:cancel, e.type) - e.type = :continue - assert_equal(:continue, e.type) - e.type = :modify - assert_equal(:modify, e.type) - e.type = :wait - assert_equal(:wait, e.type) - e.type = nil - assert_nil(e.type) - end - - def test_code - e = Error::new - assert_nil(e.code) - e.code = 404 - assert_equal(404, e.code) - assert_equal("", e.to_s) - e.code = nil - assert_nil(e.code) - end - - def test_error - e = Error::new - assert_nil(e.error) - e.error = 'gone' - assert_equal('gone', e.error) - assert_raise(RuntimeError) { - e.error = nil - } - end - - def test_stanzas - m = Message.new - assert_equal(nil, m.error) - m.typed_add(Error.new) - assert_equal('', m.error.to_s) - end - - def test_sample_normal - src = '...' - e = Error.new.import(REXML::Document.new(src).root) - assert_equal(:modify, e.type) - assert_equal(302, e.code) - assert_equal('gone', e.error) - assert_equal('...', e.text) - end - - def test_sample_muc - src = 'Please choose a different nickname.' - e = Error.new.import(REXML::Document.new(src).root) - assert_equal(nil, e.type) - assert_equal(409, e.code) - assert_equal(nil, e.error) - assert_equal('Please choose a different nickname.', e.text) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_idgenerator.rb b/vendor/xmpp4r-0.3.2/test/tc_idgenerator.rb deleted file mode 100755 index 2b80fca40..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_idgenerator.rb +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/idgenerator' -include Jabber - -class IdGeneratorTest < Test::Unit::TestCase - def test_instances - assert_equal(Jabber::IdGenerator.instance, Jabber::IdGenerator.instance) - end - - def test_unique - ids = [] - 100.times { ids.push(Jabber::IdGenerator.generate_id) } - - ok = true - ids.each_index { |a| - ids.each_index { |b| - if a == b - ok = false if ids[a] != ids[b] - else - ok = false if ids[a] == ids[b] - end - } - } - assert(ok) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_iq.rb b/vendor/xmpp4r-0.3.2/test/tc_iq.rb deleted file mode 100755 index 3fcdfe3be..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_iq.rb +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/iq' -include Jabber - -class IqTest < Test::Unit::TestCase - def test_create - x = Iq::new() - assert_equal("iq", x.name) - assert_equal("jabber:client", x.namespace) - assert_equal("", x.to_s) - end - - def test_iqauth - x = Iq::new_authset(JID::new('node@domain/resource'), 'password') - assert_equal("nodepasswordresource", x.to_s) - end - - def test_iqauth_digest - x = Iq::new_authset_digest(JID::new('node@domain/resource'), '', 'password') - assert_equal("node#{Digest::SHA1.hexdigest('password')}resource", x.to_s) - end - - def test_register - x1 = Iq::new_register - assert_equal("", x1.to_s) - x2 = Iq::new_register('node') - assert_equal("node", x2.to_s) - x3 = Iq::new_register('node', 'password') - assert_equal("nodepassword", x3.to_s) - end - - def test_rosterget - x = Iq::new_rosterget - assert_equal("", x.to_s) - end - - def test_rosterset - x = Iq::new_rosterset - assert_equal("", x.to_s) - end - - def test_browseget - x = Iq::new_browseget - assert_equal("", x.to_s) - end - - def test_types - iq = Iq::new - assert_equal(nil, iq.type) - iq.type = :get - assert_equal(:get, iq.type) - iq.type = :set - assert_equal(:set, iq.type) - iq.type = :result - assert_equal(:result, iq.type) - iq.type = :error - assert_equal(:error, iq.type) - iq.type = :invalid - assert_equal(nil, iq.type) - end - - def test_query - x = Iq::new(:set) - assert_equal(nil, x.queryns) - query = REXML::Element::new('query') - x.add(query) - assert_equal('jabber:client', x.queryns) - query.add_namespace('jabber:iq:auth') - assert_equal(query.to_s, x.query.to_s) - assert_equal('jabber:iq:auth', x.queryns) - - query2 = REXML::Element::new('query') - x.query = query2 - assert_equal('jabber:client', x.queryns) - query2.add_namespace('jabber:iq:register') - assert_equal('jabber:iq:register', x.queryns) - end - - def test_vcard - x = Iq::new - assert_equal(nil, x.vcard) - x.add(vcard = REXML::Element.new('vCard')) - assert_equal(vcard, x.vcard) - end - - def test_error - x = Iq::new(:set) - e = REXML::Element::new('error') - x.add(e) - # test if, after an import, the error element is successfully changed - # into an Error object. - x2 = Iq::new.import(x) - assert_equal(Error, x2.first_element('error').class) - end - - def test_new_query - x = Iq::new_query(:get, JID.new('a@b/c')) - assert_equal(:get, x.type) - assert_equal(nil, x.from) - assert_equal(JID.new('a@b/c'), x.to) - assert_kind_of(IqQuery, x.query) - assert_equal('jabber:client', x.queryns) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_iqquery.rb b/vendor/xmpp4r-0.3.2/test/tc_iqquery.rb deleted file mode 100755 index 41a22ace5..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_iqquery.rb +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/query' -include Jabber - -class IqQueryTest < Test::Unit::TestCase - def test_create - x = IqQuery::new() - assert_equal("query", x.name) - assert_equal("", x.to_s) - end - - def test_import - q = IqQuery::new - assert_equal(IqQuery, q.class) - - e = REXML::Element.new('query') - e.add_namespace('jabber:iq:roster') - # kind_of? only checks that the class belongs to the IqQuery class - # hierarchy. See IqQueryRosterTest#test_import for a more strict - # check. - assert_kind_of(IqQuery, IqQuery.import(e)) - - # Importing specific derivates is to be tested in the test case of the derivate - # (e.g. tc_iqqueryroster.rb) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_jid.rb b/vendor/xmpp4r-0.3.2/test/tc_jid.rb deleted file mode 100755 index 07c2abea7..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_jid.rb +++ /dev/null @@ -1,202 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/jid' -include Jabber - -class JIDTest < Test::Unit::TestCase - def test_create1 - j = JID::new('a', 'b', 'c') - assert_equal('a', j.node) - assert_equal('b', j.domain) - assert_equal('c', j.resource) - end - - def test_create2 - j = JID::new('a', 'b', 'c') - j2 = JID::new(j) - assert_equal('a', j2.node) - assert_equal('b', j2.domain) - assert_equal('c', j2.resource) - assert_equal('a@b/c', j.to_s) - end - - def test_create3 - j = JID::new('a@b/c') - assert_equal('a', j.node) - assert_equal('b', j.domain) - assert_equal('c', j.resource) - assert_equal('a@b/c', j.to_s) - end - - def test_create4 - j = JID::new('a@b') - assert_equal('a', j.node) - assert_equal('b', j.domain) - assert_equal(nil, j.resource) - assert_equal('a@b', j.to_s) - end - - def test_create5 - j = JID::new - assert_equal(nil, j.node) - assert_equal(nil, j.domain) - assert_equal(nil, j.resource) - assert_equal('', j.to_s) - end - - def test_create6 - j = JID::new('dom') - assert_equal(nil, j.node) - assert_equal('dom', j.domain) - assert_equal(nil, j.resource) - assert_equal('dom', j.to_s) - end - - def test_create7 - j = JID::new('dom/res') - assert_equal(nil, j.node) - assert_equal('dom', j.domain) - assert_equal('res', j.resource) - assert_equal('dom/res', j.to_s) - end - - def test_create8 - j = JID::new('dom/a@b') - assert_equal(nil, j.node) - assert_equal('dom', j.domain) - assert_equal('a@b', j.resource) - assert_equal('dom/a@b', j.to_s) - end - - def test_create9 - assert_nothing_raised { JID::new("#{'n'*1023}@#{'d'*1023}/#{'r'*1023}") } - assert_raises(ArgumentError) { JID::new("#{'n'*1024}@#{'d'*1023}/#{'r'*1023}") } - assert_raises(ArgumentError) { JID::new("#{'n'*1023}@#{'d'*1024}/#{'r'*1023}") } - assert_raises(ArgumentError) { JID::new("#{'n'*1023}@#{'d'*1023}/#{'r'*1024}") } - end - - def test_create10 - j = JID::new('@b/c') - assert_equal('', j.node) - assert_equal('b', j.domain) - assert_equal('c', j.resource) - assert_equal('@b/c', j.to_s) - end - - def test_create11 - j = JID::new('@b') - assert_equal('', j.node) - assert_equal('b', j.domain) - assert_equal(nil, j.resource) - assert_equal('@b', j.to_s) - end - - def test_create12 - j = JID::new('@b/') - assert_equal('', j.node) - assert_equal('b', j.domain) - assert_equal('', j.resource) - assert_equal('@b/', j.to_s) - end - - def test_create13 - j = JID::new('a@b/') - assert_equal('a', j.node) - assert_equal('b', j.domain) - assert_equal('', j.resource) - assert_equal('a@b/', j.to_s) - end - - def test_create14 - j = JID::new('nOdE@dOmAiN/rEsOuRcE') - assert_equal('node', j.node) - assert_equal('domain', j.domain) - assert_equal('rEsOuRcE', j.resource) - assert_equal('node@domain/rEsOuRcE', j.to_s) - end - - def test_tos - assert_equal('', JID::new.to_s) - assert_equal('domain.fr', JID::new('domain.fr').to_s) - assert_equal('l@domain.fr', JID::new('l','domain.fr').to_s) - assert_equal('l@domain.fr/res', JID::new('l','domain.fr','res').to_s) - assert_equal('domain.fr/res', JID::new(nil,'domain.fr','res').to_s) - end - - def test_equal - assert_equal(JID::new('domain.fr'), JID::new('domain.fr')) - assert_equal(JID::new('domain.fr'), JID::new(nil, 'domain.fr')) - assert_equal(JID::new('l@domain.fr'), JID::new('l@domain.fr')) - assert_equal(JID::new('l@domain.fr'), JID::new('l', 'domain.fr')) - assert_equal(JID::new('l@domain.fr/res'), JID::new('l@domain.fr/res')) - assert_equal(JID::new('l@domain.fr/res'), JID::new('l', 'domain.fr', 'res')) - end - - def test_hash - h = {} - j = JID::new('l@domain.fr/res') - h[j] = 'a' - assert_equal(h[j], h[JID::new('l@domain.fr/res')]) - end - - def test_strip - assert_equal(JID::new('l@domain.fr'), JID::new('l@domain.fr/res').strip) - assert_equal(JID::new('l@domain.fr'), JID::new('l@domain.fr').strip) - assert_equal(JID::new('l@domain.fr'), JID::new('l@domain.fr/res').bare) - jid = JID::new('l@domain.fr/res') - jid.strip! - assert_equal(JID::new('l@domain.fr'), jid) - - jid = JID::new('l@domain.fr/res') - jid.bare! - assert_equal(JID::new('l@domain.fr'), jid) - end - - def test_change1 - j = JID::new('a@b/c') - j.node = 'd' - assert_equal('d@b/c', j.to_s) - j.domain = 'e' - assert_equal('d@e/c', j.to_s) - j.resource = 'f' - assert_equal('d@e/f', j.to_s) - end - - def test_escaping - j = JID::new('user1@server1') - j2 = JID::new(JID::escape(j), 'server2', 'res2') - assert_equal('user1%server1@server2/res2', j2.to_s) - end - -if defined?(libidnbug) # this crashes the interpreter - def test_invalidnode -# assert_raises(IDN::Stringprep::StringprepError) { JID::new('toto@a/a', 'server', 'res') } - assert_raises(IDN::Stringprep::StringprepError) { IDN::Stringprep.nodeprep('toto@a/a') } - end -end - - def test_empty - assert(JID.new.empty?) - assert(!JID.new("test").empty?) - end - - def test_stripped - assert(JID.new("node@domain").stripped?) - assert(!JID.new("node@domain/res").stripped?) - assert(JID.new("node@domain").bared?) - assert(!JID.new("node@domain/res").bared?) - end - - def test_sort - assert_equal(-1, JID.new('a@b') <=> JID.new('b@b')) - assert_equal(0, JID.new('a@b') <=> JID.new('a@b')) - assert_equal(1, JID.new('a@b/r') <=> JID.new('a@b')) - - jids = [JID.new('b@b'), JID.new('a@b/r'), JID.new('a@b')] - jids.sort! - assert_equal([JID.new('a@b'), JID.new('a@b/r'), JID.new('b@b')], jids) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_message.rb b/vendor/xmpp4r-0.3.2/test/tc_message.rb deleted file mode 100755 index c612d1c3f..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_message.rb +++ /dev/null @@ -1,115 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/message' -include Jabber - -class MessageTest < Test::Unit::TestCase - def test_create - x = Message::new() - assert_equal("message", x.name) - assert_equal("jabber:client", x.namespace) - assert_equal(nil, x.to) - assert_equal(nil, x.body) - - x = Message::new("lucas@linux.ensimag.fr", "coucou") - assert_equal("message", x.name) - assert_equal("lucas@linux.ensimag.fr", x.to.to_s) - assert_equal("coucou", x.body) - end - - def test_import - x = Message::new - assert_kind_of(REXML::Element, x.typed_add(REXML::Element.new('thread'))) - assert_kind_of(X, x.typed_add(REXML::Element.new('x'))) - assert_kind_of(X, x.x) - end - - def test_type - x = Message.new - assert_equal(nil, x.type) - x.type = :chat - assert_equal(:chat, x.type) - assert_equal(x, x.set_type(:error)) - assert_equal(:error, x.type) - x.type = :groupchat - assert_equal(:groupchat, x.type) - x.type = :headline - assert_equal(:headline, x.type) - x.type = :normal - assert_equal(:normal, x.type) - x.type = :invalid - assert_equal(nil, x.type) - end - - def test_body - x = Message::new() - assert_equal(nil, x.body) - assert_equal(x, x.set_body("trezrze ezfrezr ezr zer ezr ezrezrez ezr z")) - assert_equal("trezrze ezfrezr ezr zer ezr ezrezrez ezr z", x.body) - x.body = "2" - assert_equal("2", x.body) - end - - def test_subject - x = Message::new - assert_equal(nil, x.subject) - subject = REXML::Element.new('subject') - subject.text = 'A' - x.add(subject) - assert_equal('A', x.subject) - x.subject = 'Test message' - assert_equal('Test message', x.subject) - x.each_element('subject') { |s| assert_equal('Test message', s.text) } - assert_equal(x, x.set_subject('Breaking news')) - assert_equal('Breaking news', x.subject) - end - - def test_thread - x = Message::new - assert_equal(nil, x.thread) - thread = REXML::Element.new('thread') - thread.text = '123' - x.add(thread) - assert_equal('123', x.thread) - x.thread = '321' - assert_equal('321', x.thread) - x.each_element('thread') { |s| assert_equal('321', s.text) } - assert_equal(x, x.set_thread('abc')) - assert_equal('abc', x.thread) - end - - def test_error - x = Message::new() - assert_equal(nil, x.error) - e = REXML::Element::new('error') - x.add(e) - # test if, after an import, the error element is successfully changed - # into an Error object. - x2 = Message::new.import(x) - assert_equal(Error, x2.first_element('error').class) - end - - def test_answer - orig = Message::new - orig.from = 'a@b' - orig.to = 'b@a' - orig.id = '123' - orig.type = :chat - orig.add(REXML::Element.new('x')) - - answer = orig.answer - assert_equal(JID.new('b@a'), answer.from) - assert_equal(JID.new('a@b'), answer.to) - assert_equal('123', answer.id) - assert_equal(:chat, answer.type) - answer.each_element { |e| - assert_equal('x', e.name) - assert_kind_of(X, e) - } - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_presence.rb b/vendor/xmpp4r-0.3.2/test/tc_presence.rb deleted file mode 100755 index f7691bc6b..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_presence.rb +++ /dev/null @@ -1,149 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/presence' -include Jabber - -class PresenceTest < Test::Unit::TestCase - def test_create - x = Presence::new() - assert_equal("presence", x.name) - assert_equal("jabber:client", x.namespace) - assert_equal(nil, x.to) - assert_equal(nil, x.show) - assert_equal(nil, x.status) - assert_equal(nil, x.priority) - - x = Presence::new(:away, "I am away", 23) - assert_equal("presence", x.name) - assert_equal(:away, x.show) - assert_equal("away", x.show.to_s) - assert_equal("I am away", x.status) - assert_equal(23, x.priority) - end - - def test_show - x = Presence::new() - assert_equal(nil, x.show) - assert_raise(RuntimeError) { x.show = "a" } - assert_equal(nil, x.show) - assert_raise(RuntimeError) { x.show = 'away' } - assert_equal(nil, x.show) - x.show = :away - assert_equal(:away, x.show) - x.each_element('show') { |e| assert(e.class == REXML::Element, " is not REXML::Element") } - x.show = nil - assert_equal(nil, x.show) - x.each_element('show') { |e| assert(true, " exists after 'show=nil'") } - x.show = nil - assert_equal(nil, x.show) - - showelement = REXML::Element.new('show') - showelement.text = 'chat' - x.add(showelement) - assert_equal(:chat, x.show) - end - - def test_status - x = Presence::new() - assert_equal(nil, x.status) - x.status = "b" - assert_equal("b", x.status) - x.each_element('status') { |e| assert(e.class == REXML::Element, " is not REXML::Element") } - x.status = nil - assert_equal(nil, x.status) - x.each_element('status') { |e| assert(true, " exists after 'status=nil'") } - x.status = nil - assert_equal(nil, x.status) - end - - def test_priority - x = Presence::new() - assert_equal(nil, x.priority) - x.priority = 5 - assert_equal(5, x.priority) - x.each_element('priority') { |e| assert(e.class == REXML::Element, " is not REXML::Element") } - x.priority = "5" - assert_equal(5, x.priority) - x.priority = nil - assert_equal(nil, x.priority) - x.each_element('priority') { |e| assert(true, " exists after 'priority=nil'") } - end - - def test_type - x = Presence::new() - assert_equal(nil, x.type) - x.type = :delete - assert_equal(nil, x.type) - x.type = nil - assert_equal(nil, x.type) - x.type = nil - assert_equal(nil, x.type) - [:error, :probe, :subscribe, :subscribed, :unavailable, :unsubscribe, :unsubscribed, nil].each { |type| - x.type = type - assert_equal(type, x.type) - } - end - - def test_chaining - x = Presence::new() - x.set_show(:xa).set_status("Plundering the fridge.").set_priority(0) - assert_equal(:xa, x.show) - assert_equal("Plundering the fridge.", x.status) - assert_equal(0, x.priority) - end - - def test_error - x = Presence::new() - e = REXML::Element::new('error') - x.add(e) - x2 = Presence::new.import(x) - # test if, after an import, the error element is successfully changed - # into an Error object. - assert_equal(Error, x2.first_element('error').class) - end - - def test_sample - x = Presence::new - require 'rexml/document' - d = REXML::Document.new("\n xa\n I am the evil fingerprinting robot\n ") - x.import(d.root) - num = 0 - x.each_element('show') { num += 1 } - assert_equal(1, num) - assert_equal(:xa, x.show) - assert_equal('I am the evil fingerprinting robot', x.status) - end - - def test_xpathbug - require 'rexml/document' - d = REXML::Document.new("xa") - x = d.root - num = 0 - x.each_element('tada') { num += 1 } - assert_equal(1, num) - end - - def test_compare_prio - assert_equal(0, Presence::new(:chat, '', 5) <=> Presence::new(:chat, '', 5)) - assert_equal(-1, Presence::new(:chat, '', 4) <=> Presence::new(:chat, '', 5)) - assert_equal(1, Presence::new(:chat, '', 4) <=> Presence::new(:chat, '', 3)) - assert_equal(-1, Presence::new(:chat, '', nil) <=> Presence::new(:chat, '', 3)) - assert_equal(1, Presence::new(:chat, '', 10) <=> Presence::new(:chat, '', nil)) - assert_equal(0, Presence::new(:chat, '', nil) <=> Presence::new(:chat, '', nil)) - end - - def test_compare_interest - unav = Presence::new.set_type(:unavailable) - assert_equal(0, unav.cmp_interest(unav)) - assert_equal(1, unav.cmp_interest(Presence::new)) - assert_equal(-1, Presence::new.cmp_interest(unav)) - assert_equal(1, Presence::new(:chat).cmp_interest(Presence::new)) - assert_equal(-1, Presence::new(:away).cmp_interest(Presence::new(:dnd))) - end - -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_rexml.rb b/vendor/xmpp4r-0.3.2/test/tc_rexml.rb deleted file mode 100755 index b947817a6..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_rexml.rb +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' - -class REXMLTest < Test::Unit::TestCase - def test_simple - e = REXML::Element.new('e') - assert_kind_of(REXML::Element, e) - assert_nil(e.text) - assert_nil(e.attributes['x']) - end - - def test_normalize - assert_equal('&', REXML::Text::normalize('&')) - assert_equal('&amp;', REXML::Text::normalize('&')) - assert_equal('&amp;amp;', REXML::Text::normalize('&amp;')) - assert_equal('&nbsp;', REXML::Text::normalize(' ')) - end - - def test_unnormalize - assert_equal('&', REXML::Text::unnormalize('&')) - assert_equal('&', REXML::Text::unnormalize('&amp;')) - assert_equal('&amp;', REXML::Text::unnormalize('&amp;amp;')) - assert_equal(' ', REXML::Text::unnormalize('&nbsp;')) - assert_equal(' ', REXML::Text::unnormalize(' ')) # ? - end - - def test_text_entities - e = REXML::Element.new('e') - e.text = '&' - assert_equal('&', e.to_s) - e.text = '&' - assert_equal('&amp;', e.to_s) - e.text = ' ' - assert_equal('&nbsp', e.to_s) - e.text = ' ' - assert_equal('&nbsp;', e.to_s) - e.text = '&<;' - assert_equal('&<;', e.to_s) - e.text = '<>"\'' - assert_equal('<>"'', e.to_s) - e.text = '&' - assert_equal('<x>&amp;</x>', e.to_s) - end - - def test_attribute_entites - e = REXML::Element.new('e') - e.attributes['x'] = '&' - assert_equal('&', e.attributes['x']) - e.attributes['x'] = '&' - assert_equal('&', e.attributes['x']) # this one should not be escaped - e.attributes['x'] = ' ' - assert_equal(' ', e.attributes['x']) - e.attributes['x'] = ' ' - assert_equal(' ', e.attributes['x']) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_stream.rb b/vendor/xmpp4r-0.3.2/test/tc_stream.rb deleted file mode 100755 index 2d45d0b06..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_stream.rb +++ /dev/null @@ -1,227 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'tempfile' -require 'test/unit' -require 'socket' -require 'xmpp4r/stream' -require 'xmpp4r/semaphore' -include Jabber - -class StreamTest < Test::Unit::TestCase - def setup - @tmpfile = Tempfile::new("StreamSendTest") - @tmpfilepath = @tmpfile.path() - @tmpfile.unlink - @servlisten = UNIXServer::new(@tmpfilepath) - thServer = Thread.new { @server = @servlisten.accept } - @iostream = UNIXSocket::new(@tmpfilepath) - n = 0 - while not defined? @server and n < 10 - sleep 0.1 - n += 1 - end - @stream = Stream::new - @stream.start(@iostream) - end - - def teardown - @stream.close - @server.close - end - - ## - # tests that connection really waits the call to process() to dispatch - # stanzas to filters - def test_process - called = false - @stream.add_xml_callback { called = true } - assert(!called) - @server.puts('') - @server.flush - assert(called) - end - - def test_process100 - @server.puts('') - @server.flush - - done = Semaphore.new - n = 0 - @stream.add_message_callback { - n += 1 - done.run if n % 100 == 0 - } - - 100.times { - @server.puts('') - @server.flush - } - - done.wait - assert_equal(100, n) - - @server.puts('' * 100) - @server.flush - - done.wait - assert_equal(200, n) - end - - def test_send - @server.puts('') - @server.flush - - Thread.new { - assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>')) - @stream.receive(Iq.new(:result)) - } - - called = 0 - @stream.send(Iq.new(:get)) { |reply| - called += 1 - if reply.kind_of? Iq and reply.type == :result - true - else - false - end - } - - assert_equal(1, called) - end - - def test_send_nested - @server.puts('') - @server.flush - finished = Semaphore.new - - Thread.new { - assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>')) - @server.puts(Iq.new(:result).set_id('1').delete_namespace.to_s) - @server.flush - assert_equal(Iq.new(:set).delete_namespace.to_s, @server.gets('>')) - @server.puts(Iq.new(:result).set_id('2').delete_namespace.to_s) - @server.flush - assert_equal(Iq.new(:get).delete_namespace.to_s, @server.gets('>')) - @server.puts(Iq.new(:result).set_id('3').delete_namespace.to_s) - @server.flush - - finished.run - } - - called_outer = 0 - called_inner = 0 - - @stream.send(Iq.new(:get)) do |reply| - called_outer += 1 - assert_kind_of(Iq, reply) - assert_equal(:result, reply.type) - - if reply.id == '1' - @stream.send(Iq.new(:set)) do |reply2| - called_inner += 1 - assert_kind_of(Iq, reply2) - assert_equal(:result, reply2.type) - assert_equal('2', reply2.id) - - @stream.send(Iq.new(:get)) - - true - end - false - elsif reply.id == '3' - true - else - false - end - end - - assert_equal(2, called_outer) - assert_equal(1, called_inner) - - finished.wait - end - - def test_send_in_callback - @server.puts('') - @server.flush - finished = Semaphore.new - - @stream.add_message_callback { - @stream.send_with_id(Iq.new(:get)) { |reply| - assert_equal(:result, reply.type) - } - } - - Thread.new { - @server.gets('>') - @server.puts(Iq.new(:result)) - finished.run - } - - @server.puts(Message.new) - finished.wait - end - - def test_bidi - @server.puts('') - @server.flush - finished = Semaphore.new - ok = true - n = 100 - - Thread.new { - n.times { |i| - ok &&= (Iq.new(:get).set_id(i).delete_namespace.to_s == @server.gets('>')) - @server.puts(Iq.new(:result).set_id(i).to_s) - @server.flush - } - - finished.run - } - - n.times { |i| - @stream.send(Iq.new(:get).set_id(i)) { |reply| - ok &&= reply.kind_of? Iq - ok &&= (:result == reply.type) - ok &&= (i.to_s == reply.id) - true - } - } - - finished.wait - assert(ok) - end - - def test_similar_children - delay = 0.1 - n = 0 - @stream.add_message_callback { n += 1 } - assert_equal(0, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(1, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(1, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(1, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(2, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(2, n) - @server.puts('') - @server.flush - sleep delay - assert_equal(3, n) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_streamComponent.rb b/vendor/xmpp4r-0.3.2/test/tc_streamComponent.rb deleted file mode 100755 index 59cbb2c5c..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_streamComponent.rb +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'tempfile' -require 'test/unit' -require 'socket' -require 'xmpp4r/component' -require 'xmpp4r/bytestreams' -require 'xmpp4r/semaphore' -require 'xmpp4r' -include Jabber - -class StreamComponentTest < Test::Unit::TestCase - @@SOCKET_PORT = 65224 - - def setup - servlisten = TCPServer.new(@@SOCKET_PORT) - serverwait = Semaphore.new - Thread.new do - Thread.current.abort_on_exception = true - serversock = servlisten.accept - servlisten.close - serversock.sync = true - @server = Stream.new(true) - @server.add_xml_callback do |xml| - if xml.prefix == 'stream' and xml.name == 'stream' - @server.send('') - true - else - false - end - end - @server.start(serversock) - - serverwait.run - end - - @stream = Component::new('test') - @stream.connect('localhost', @@SOCKET_PORT) - - serverwait.wait - end - - def teardown - @stream.close - @server.close - end - - def test_process - stanzas = 0 - message_lock = Semaphore.new - iq_lock = Semaphore.new - presence_lock = Semaphore.new - - @stream.add_message_callback { |msg| - assert_kind_of(Message, msg) - stanzas += 1 - message_lock.run - } - @stream.add_iq_callback { |iq| - assert_kind_of(Iq, iq) - stanzas += 1 - iq_lock.run - } - @stream.add_presence_callback { |pres| - assert_kind_of(Presence, pres) - stanzas += 1 - presence_lock.run - } - - @server.send('') - @server.send('') - @server.send('') - - message_lock.wait - iq_lock.wait - presence_lock.wait - - assert_equal(3, stanzas) - end - - def test_outgoing - received_wait = Semaphore.new - - @server.add_message_callback { |msg| - assert_kind_of(Message, msg) - received_wait.run - } - - @stream.send(Message.new) - received_wait.wait - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_streamError.rb b/vendor/xmpp4r-0.3.2/test/tc_streamError.rb deleted file mode 100755 index 1ad5ee329..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_streamError.rb +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'xmpp4r/client' -include Jabber - -class ConnectionErrorTest < Test::Unit::TestCase - @@SOCKET_PORT = 65225 - - def setup - servlisten = TCPServer.new(@@SOCKET_PORT) - serverwait = Semaphore.new - @server = nil - Thread.new do - Thread.current.abort_on_exception = true - @server = servlisten.accept - servlisten.close - @server.sync = true - - serverwait.run - end - - @conn = TCPSocket::new('localhost', @@SOCKET_PORT) - - serverwait.wait - end - - def teardown - @conn.close if not @conn.closed? - @server.close if not @conn.closed? - end - - def test_connectionError_start_withexcblock - @stream = Stream::new - error = false - @stream.on_exception do |e, o, w| - # strange exception, it's caused by REXML, actually - assert_equal(NameError, e.class) - assert_equal(Jabber::Stream, o.class) - assert_equal(:start, w) - error = true - end - assert(!error) - begin - # wrong port on purpose - conn = TCPSocket::new('localhost', 1) - rescue - end - @stream.start(conn) - sleep 0.2 - assert(error) - @server.close - @stream.close - end - - def test_connectionError_parse_withexcblock - @stream = Stream::new - error = false - @stream.start(@conn) - @stream.on_exception do |e, o, w| - assert_equal(REXML::ParseException, e.class) - assert_equal(Jabber::Stream, o.class) - assert_equal(:parser, w) - error = true - end - @server.puts('') - @server.flush - assert(!error) - @server.puts('') - @server.flush - sleep 0.2 - assert(error) - @server.close - @stream.close - end - - def test_connectionError_send_withexcblock - @stream = Stream::new - error = 0 - @stream.start(@conn) - @stream.on_exception do |exc, o, w| - case w - when :sending - assert_equal(IOError, exc.class) - assert_equal(Jabber::Stream, o.class) - when :disconnected - assert_equal(nil, exc) - assert_equal(Jabber::Stream, o.class) - else - assert(false) - end - error += 1 - end - @server.puts('') - @server.flush - assert_equal(0, error) - @server.close - sleep 0.1 - assert_equal(1, error) - @stream.send('') - sleep 0.1 - @stream.send('') - sleep 0.1 - assert_equal(3, error) - @stream.close - end - - def test_connectionError_send_withoutexcblock - @stream = Stream::new - @stream.start(@conn) - @server.puts('') - @server.flush - assert_raise(Errno::EPIPE) do - @server.close - sleep 0.1 - @stream.send('') - sleep 0.1 - @stream.send('') - sleep 0.1 - end - end -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_streamSend.rb b/vendor/xmpp4r-0.3.2/test/tc_streamSend.rb deleted file mode 100755 index 8acd86009..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_streamSend.rb +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'tempfile' -require 'io/wait' -require 'xmpp4r' -include Jabber - -class StreamSendTest < Test::Unit::TestCase - def setup - @tmpfile = Tempfile::new("StreamSendTest") - @tmpfilepath = @tmpfile.path() - @tmpfile.unlink - @servlisten = UNIXServer::new(@tmpfilepath) - thServer = Thread.new { @server = @servlisten.accept } - @iostream = UNIXSocket::new(@tmpfilepath) - @stream = Stream::new - @stream.start(@iostream) - - thServer.join - end - - def teardown - @stream.close - @server.close - @servlisten.close - end - - def mysend(s) - @stream.send(s) - @stream.send("\n") #needed for easy test writing - end - - ## - # Tries to send a basic message - def test_sendbasic - mysend(Message::new) - assert_equal("\n", @server.gets) - end - - def test_sendmessage - mysend(Message::new('lucas@linux.ensimag.fr', 'coucou')) - assert_equal("coucou\n", @server.gets) - end - - def test_sendpresence - mysend(Presence::new) - assert_equal("\n", @server.gets) - end - - def test_sendiq - mysend(Iq::new) - assert_equal("\n", @server.gets) - end - -end diff --git a/vendor/xmpp4r-0.3.2/test/tc_xmppstanza.rb b/vendor/xmpp4r-0.3.2/test/tc_xmppstanza.rb deleted file mode 100755 index f127173bd..000000000 --- a/vendor/xmpp4r-0.3.2/test/tc_xmppstanza.rb +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift '../lib' - -require 'test/unit' -require 'socket' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/xmppstanza' -require 'xmpp4r/iq' -require 'xmpp4r/feature_negotiation' -require 'xmpp4r/dataforms' -include Jabber - -class XMPPStanzaTest < Test::Unit::TestCase - - ## - # Hack: XMPPStanza derives from XMPPElement - # which enforces element classes to be named at declaration time - class MyXMPPStanza < XMPPStanza - name_xmlns 'stanza', 'http://home.gna.org/xmpp4r' - end - - class MyStanza < XMPPStanza - end - - def test_from - x = MyXMPPStanza::new - assert_equal(nil, x.from) - assert_equal(x, x.set_from("blop")) - assert_equal("blop", x.from.to_s) - x.from = "tada" - assert_equal("tada", x.from.to_s) - end - - def test_to - x = MyXMPPStanza::new - assert_equal(nil, x.to) - assert_equal(x, x.set_to("blop")) - assert_equal("blop", x.to.to_s) - x.to = "tada" - assert_equal("tada", x.to.to_s) - end - - def test_id - x = MyXMPPStanza::new - assert_equal(nil, x.id) - assert_equal(x, x.set_id("blop")) - assert_equal("blop", x.id) - x.id = "tada" - assert_equal("tada", x.id) - end - - def test_type - x = MyXMPPStanza::new - assert_equal(nil, x.type) - assert_equal(x, x.set_type("blop")) - assert_equal("blop", x.type) - x.type = "tada" - assert_equal("tada", x.type) - end - - def test_import - x = MyXMPPStanza::new - x.id = "heya" - q = x.add_element("query") - q.add_namespace("about:blank") - q.add_element("b").text = "I am b" - q.add_text("I am text") - q.add_element("a").add_attribute("href", "http://home.gna.org/xmpp4r/") - x.add_text("yow") - x.add_element("query") - - assert_raise(RuntimeError) { iq = Iq.import(x) } - x.name = 'iq' - iq = Iq.import(x) - - assert_equal(x.id, iq.id) - assert_equal(q.to_s, iq.query.to_s) - assert_equal(x.to_s, iq.to_s) - assert_equal(q.namespace, iq.queryns) - end - - def test_import2 - feature = FeatureNegotiation::IqFeature.new - xdata = feature.add(Dataforms::XData.new(:form)) - field = xdata.add(Dataforms::XDataField.new('stream-method', :list_single)) - - feature2 = FeatureNegotiation::IqFeature.new.import(feature) - assert_equal(field.var, feature2.x.fields.first.var) - assert_equal(field.type, feature2.x.fields.first.type) - end - - def test_error - x = MyXMPPStanza::new - assert_equal(nil, x.error) - x.typed_add(REXML::Element.new('error')) - assert_equal('', x.error.to_s) - assert_equal(Error, x.error.class) - end - - def test_clone_and_dup - x = MyXMPPStanza::new - x.attributes['xyz'] = '123' - x.text = 'abc' - - assert_equal(x.attributes['xyz'], '123') - assert_equal(x.text, 'abc') - - x2 = x.clone - assert_kind_of(MyXMPPStanza, x2) - assert_equal('123', x2.attributes['xyz']) - assert_nil(x2.text) - - x3 = x.dup - assert_kind_of(MyXMPPStanza, x3) - assert_equal('123', x3.attributes['xyz']) - assert_equal('abc', x3.text) - end - - def test_raise - assert_raises(NoNameXmlnsRegistered) { - XMPPStanza.name_xmlns_for_class(MyStanza) - } - end -end diff --git a/vendor/xmpp4r-0.3.2/test/ts_xmpp4r.rb b/vendor/xmpp4r-0.3.2/test/ts_xmpp4r.rb deleted file mode 100755 index 7b7f9124f..000000000 --- a/vendor/xmpp4r-0.3.2/test/ts_xmpp4r.rb +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/ruby -w - -$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') -$:.unshift File.join(File.dirname(__FILE__), '..', 'test') -$:.unshift File.join(File.dirname(__FILE__), 'lib') -$:.unshift File.join(File.dirname(__FILE__), 'test') - -# This is allowed here, to make sure it's enabled in all test. -Thread::abort_on_exception = true - -require 'xmpp4r' -require 'find' - -# List files' basenames, not full path! -# EXCLUDED_FILES = [ 'tc_muc_simplemucclient.rb' ] -EXCLUDED_FILES = [] - -tc_files = [] -tc_subdirs = [] -Find.find(File.dirname(__FILE__)) do |f| - if File::directory?(f) - if f == '.' - # do nothing - elsif File::basename(f) != '.svn' - tc_subdirs << f - Find.prune - end - elsif File::basename(f) =~ /^tc.*\.rb$/ - tc_files << f - end -end - -tc_subdirs.each do |dir| - Find.find(dir) do |f| - if File::file?(f) and File::basename(f) =~ /^tc.*\.rb$/ - tc_files << f - end - end -end - -tc_files.each do |f| - next if EXCLUDED_FILES.include?(File::basename(f)) - require f -end diff --git a/vendor/xmpp4r-0.3.2/test/vcard/tc_helper.rb b/vendor/xmpp4r-0.3.2/test/vcard/tc_helper.rb deleted file mode 100644 index 691e03708..000000000 --- a/vendor/xmpp4r-0.3.2/test/vcard/tc_helper.rb +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/vcard/helper/vcard' -include Jabber - -class Vcard::HelperTest < Test::Unit::TestCase - include ClientTester - - def test_create - h = Vcard::Helper::new(@client) - assert_kind_of(Vcard::Helper, h) - end - - def test_callback - @server.on_exception{|*e| p e} - class << @client - def jid - JID.new('b@b.com/b') - end - end - - state { |iq| - assert_kind_of(Iq, iq) - assert_equal(JID.new('a@b.com'), iq.to) - assert_equal(:get, iq.type) - assert_nil(iq.queryns) - assert_kind_of(Vcard::IqVcard, iq.vcard) - children = 0 - iq.vcard.each_child { children += 1 } - assert_equal(0, children) - - send("Mr. Bimage/png====") - } - - res = Vcard::Helper::get(@client, 'a@b.com') - wait_state - assert_kind_of(Vcard::IqVcard, res) - assert_equal('Mr. B', res['NICKNAME']) - assert_equal('image/png', res['PHOTO/TYPE']) - assert_equal('====', res['PHOTO/BINVAL']) - end -end - diff --git a/vendor/xmpp4r-0.3.2/test/vcard/tc_iqvcard.rb b/vendor/xmpp4r-0.3.2/test/vcard/tc_iqvcard.rb deleted file mode 100755 index f4dda1545..000000000 --- a/vendor/xmpp4r-0.3.2/test/vcard/tc_iqvcard.rb +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/vcard/iq/vcard' -include Jabber - -class IqVcardTest < Test::Unit::TestCase - def test_create - v = Vcard::IqVcard.new - assert_equal([], v.fields) - end - - def test_create_with_fields - v = Vcard::IqVcard.new({'FN' => 'B C', 'NICKNAME' => 'D'}) - assert_equal(['FN', 'NICKNAME'], v.fields.sort) - assert_equal('B C', v['FN']) - assert_equal('D', v['NICKNAME']) - assert_equal(nil, v['x']) - end - - def test_fields - v = Vcard::IqVcard.new - f = ['a', 'b', 'c', 'd', 'e'] - f.each { |s| - v[s.downcase] = s.upcase - } - - assert_equal(f, v.fields.sort) - - f.each { |s| - assert_equal(s.upcase, v[s.downcase]) - assert_equal(nil, v[s.upcase]) - } - end - - def test_deep - v = Vcard::IqVcard.new({ - 'FN' => 'John D. Random', - 'PHOTO/TYPE' => 'image/png', - 'PHOTO/BINVAL' => '===='}) - - assert_equal(['FN', 'PHOTO/BINVAL', 'PHOTO/TYPE'], v.fields.sort) - assert_equal('John D. Random', v['FN']) - assert_equal('image/png', v['PHOTO/TYPE']) - assert_equal('====', v['PHOTO/BINVAL']) - assert_equal(nil, v['PHOTO']) - assert_equal(nil, v['NICKNAME']) - end -end diff --git a/vendor/xmpp4r-0.3.2/test/version/tc_helper.rb b/vendor/xmpp4r-0.3.2/test/version/tc_helper.rb deleted file mode 100755 index 181954d6a..000000000 --- a/vendor/xmpp4r-0.3.2/test/version/tc_helper.rb +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require File::dirname(__FILE__) + '/../lib/clienttester' - -require 'xmpp4r' -require 'xmpp4r/version/helper/responder' -require 'xmpp4r/version/helper/simpleresponder' -include Jabber - -class Version::HelperTest < Test::Unit::TestCase - include ClientTester - - def test_create - h = Version::Responder::new(@client) - assert_kind_of(Version::Responder, h) - assert_respond_to(h, :add_version_callback) - end - - def test_callback - # Prepare helper - h = Version::Responder::new(@client) - - calls = 0 - h.add_version_callback { |iq,responder| - calls += 1 - assert('jabber:iq:version', iq.queryns) - responder.call('Test program', '1.0', 'Ruby Test::Unit') - } - - # Send stanzas which shouldn't match - @server.send("") - @server.send("") - assert_equal(0, calls) - - # Send a query - @server.send("") { |reply| - assert_equal('Test program', reply.query.iname) - assert_equal('1.0', reply.query.version) - assert_equal('Ruby Test::Unit', reply.query.os) - true - } - assert_equal(1, calls) - end - - def test_simple - h = Version::SimpleResponder.new(@client, 'Test program', '1.0', 'Ruby Test::Unit') - - # Send a query - @server.send("") { |reply| - assert_equal('Test program', reply.query.iname) - assert_equal('1.0', reply.query.version) - assert_equal('Ruby Test::Unit', reply.query.os) - true - } - - end -end diff --git a/vendor/xmpp4r-0.3.2/test/version/tc_iqqueryversion.rb b/vendor/xmpp4r-0.3.2/test/version/tc_iqqueryversion.rb deleted file mode 100755 index e2a88fd13..000000000 --- a/vendor/xmpp4r-0.3.2/test/version/tc_iqqueryversion.rb +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/ruby - -$:.unshift File::dirname(__FILE__) + '/../../lib' - -require 'test/unit' -require 'xmpp4r/rexmladdons' -require 'xmpp4r/iq' -require 'xmpp4r/version/iq/version' -include Jabber - -class Version::IqQueryVersionTest < Test::Unit::TestCase - def test_create_empty - x = Version::IqQueryVersion::new - assert_equal('jabber:iq:version', x.namespace) - assert_nil(x.iname) - assert_nil(x.version) - assert_nil(x.os) - end - - def test_create - x = Version::IqQueryVersion::new('my test', 'XP') - assert_equal('jabber:iq:version', x.namespace) - assert_equal('my test', x.iname) - assert_equal('XP', x.version) - assert_equal(nil, x.os) - end - - def test_create_with_os - x = Version::IqQueryVersion::new('superbot', '1.0-final', 'FreeBSD 5.4-RELEASE-p4') - assert_equal('jabber:iq:version', x.namespace) - assert_equal('superbot', x.iname) - assert_equal('1.0-final', x.version) - assert_equal('FreeBSD 5.4-RELEASE-p4', x.os) - end - - def test_import1 - iq = Iq::new - q = REXML::Element::new('query') - q.add_namespace('jabber:iq:version') - iq.add(q) - iq2 = Iq::new.import(iq) - assert_equal(Version::IqQueryVersion, iq2.query.class) - end - - def test_import2 - iq = Iq::new - q = REXML::Element::new('query') - q.add_namespace('jabber:iq:version') - q.add_element('name').text = 'AstroBot' - q.add_element('version').text = 'XP' - q.add_element('os').text = 'FreeDOS' - iq.add(q) - iq = Iq::new.import(iq) - assert_equal(Version::IqQueryVersion, iq.query.class) - assert_equal('AstroBot', iq.query.iname) - assert_equal('XP', iq.query.version) - assert_equal('FreeDOS', iq.query.os) - end - - def test_replace - x = Version::IqQueryVersion::new('name', 'version', 'os') - - num = 0 - x.each_element('name') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('version') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('os') { |e| num += 1 } - assert_equal(1, num) - - x.set_iname('N').set_version('V').set_os('O') - - num = 0 - x.each_element('name') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('version') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('os') { |e| num += 1 } - assert_equal(1, num) - - x.set_iname(nil).set_version(nil).set_os(nil) - - num = 0 - x.each_element('name') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('version') { |e| num += 1 } - assert_equal(1, num) - num = 0 - x.each_element('os') { |e| num += 1 } - assert_equal(0, num) - end -end diff --git a/vendor/xmpp4r-0.3.2/tools/doctoweb.bash b/vendor/xmpp4r-0.3.2/tools/doctoweb.bash deleted file mode 100755 index 1a914111e..000000000 --- a/vendor/xmpp4r-0.3.2/tools/doctoweb.bash +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -if [ -z $CVSDIR ]; then - CVSDIR=$HOME/dev/xmpp4r-web -fi - -TARGET=$CVSDIR/rdoc - -echo "Copying rdoc documentation to $TARGET." - -if [ ! -d $TARGET ]; then - echo "$TARGET doesn't exist, exiting." - exit 1 -fi -rsync -a rdoc/ $TARGET/ - -echo "###########################################################" -echo "CVS status :" -cd $TARGET -cvs -q up -echo "CVS Adding files." -while [ $(cvs -q up | grep "^? " | wc -l) -gt 0 ]; do - cvs add $(cvs -q up | grep "^? " | awk '{print $2}') -done -echo "###########################################################" -echo "CVS status after adding missing files:" -cvs -q up -echo "Commit changes now with" -echo "# (cd $TARGET && cvs commit -m \"rdoc update\")" -exit 0 diff --git a/vendor/xmpp4r-0.3.2/tools/gen_requires.bash b/vendor/xmpp4r-0.3.2/tools/gen_requires.bash deleted file mode 100644 index 40af1b2f8..000000000 --- a/vendor/xmpp4r-0.3.2/tools/gen_requires.bash +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -cd lib -f=$(mktemp) -echo "strict digraph requirestree { " > $f -grep -r "^require " * |grep -v svn |grep -v swp | sed "s/^\(.*\).rb:require '\(.*\)'/\1 -> \2;/" | sed 's/\//_/g' >> $f -echo "}" >> $f -cd .. -dot -Tpng $f -o gen_requires.png -rm -f $f diff --git a/vendor/xmpp4r-simple-0.8.4/CHANGELOG b/vendor/xmpp4r-simple-0.8.4/CHANGELOG deleted file mode 100644 index 9269f0bd8..000000000 --- a/vendor/xmpp4r-simple-0.8.4/CHANGELOG +++ /dev/null @@ -1,40 +0,0 @@ -xmpp4r-simple (0.8.3) - - [ Blaine Cook ] - * Catch broken connections and attempt to reconnect 3 times. - --- Blaine Cook Fri, 23 Dec 2006 00:12:09 -0800 - - -xmpp4r-simple (0.8.3) - - [ Blaine Cook ] - * Update presence_updates to only store one presence_update per user. - Changes methods, will break code that uses presence_updates if not updated - correspondingly, check the documenation for the new semantics. - --- Blaine Cook Thu, 07 Dec 2006 12:45:52 -0800 - - -xmpp4r-simple (0.8.2) - - [ Blaine Cook ] - * Add presence_updates?, received_messages?, and new_subscriptions? methods. - --- Blaine Cook Wed, 06 Dec 2006 09:40:28 -0800 - - -xmpp4r-simple (0.8.1) - - [ Blaine Cook ] - * Make the deferred_delivery method public - --- Blaine Cook Tue, 05 Dec 2006 17:39:14 -0800 - - -xmpp4r-simple (0.8.0) - - [ Blaine Cook ] - * initial import - --- Blaine Cook Wed, 08 Nov 2006 20:42:42 -0800 diff --git a/vendor/xmpp4r-simple-0.8.4/COPYING b/vendor/xmpp4r-simple-0.8.4/COPYING deleted file mode 100644 index 84e494885..000000000 --- a/vendor/xmpp4r-simple-0.8.4/COPYING +++ /dev/null @@ -1,281 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - diff --git a/vendor/xmpp4r-simple-0.8.4/README b/vendor/xmpp4r-simple-0.8.4/README deleted file mode 100644 index 67f01eeac..000000000 --- a/vendor/xmpp4r-simple-0.8.4/README +++ /dev/null @@ -1,59 +0,0 @@ -= Name - -Jabber::Simple - An extremely easy-to-use Jabber client library. - -= Synopsis - - # Send a message to a friend, asking for authorization if necessary: - im = Jabber::Simple.new("user@example.com", "password") - im.deliver("friend@example.com", "Hey there friend!") - - # Get received messages and print them out to the console: - im.received_messages { |msg| puts msg.body if msg.type == :chat } - - # Send an authorization request to a user: - im.add("friend@example.com") - - # Get presence updates from your friends, and print them out to the console: - # (admittedly, this one needs some work) - im.presence_updates { |update| - from = update[0].jid.strip.to_s - status = update[2].status - presence = update[2].show - puts "#{from} went #{presence}: #{status}" - end - - # Remove a user from your contact list: - im.remove("unfriendly@example.com") - - # See the Jabber::Simple documentation for more information. - -= Description - -Jabber::Simple is intended to make Jabber client programming dead simple. XMPP, -the Jabber protocol, is extremely powerful but also carries a steep learning -curve. This library exposes only the most common tasks, and does so in a way -that is familiar to users of traditional instant messenger clients. - -= Known Issues - -* None. If you'd like additional functionality, please contact the developer! - -= Copyright - -Jabber::Simple - An extremely easy-to-use Jabber client library. -Copyright 2006 Blaine Cook , Obvious Corp. - -Jabber::Simple is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -Jabber::Simple is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Jabber::Simple; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA diff --git a/vendor/xmpp4r-simple-0.8.4/lib/xmpp4r-simple.rb b/vendor/xmpp4r-simple-0.8.4/lib/xmpp4r-simple.rb deleted file mode 100644 index 8d9f8bd71..000000000 --- a/vendor/xmpp4r-simple-0.8.4/lib/xmpp4r-simple.rb +++ /dev/null @@ -1,464 +0,0 @@ -# Jabber::Simple - An extremely easy-to-use Jabber client library. -# Copyright 2006 Blaine Cook , Obvious Corp. -# -# Jabber::Simple is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Jabber::Simple is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Jabber::Simple; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -require 'rubygems' -require 'xmpp4r' -require 'xmpp4r/roster' - -module Jabber - - class ConnectionError < StandardError #:nodoc: - end - - class Contact #:nodoc: - - def initialize(client, jid) - @jid = jid.respond_to?(:resource) ? jid : JID.new(jid) - @client = client - end - - def inspect - "Jabber::Contact #{jid.to_s}" - end - - def subscribed? - [:to, :both].include?(subscription) - end - - def subscription - roster_item && roster_item.subscription - end - - def ask_for_authorization! - subscription_request = Presence.new.set_type(:subscribe) - subscription_request.to = jid - client.send!(subscription_request) - end - - def unsubscribe! - unsubscription_request = Presence.new.set_type(:unsubscribe) - unsubscription_request.to = jid - client.send!(unsubscription_request) - client.send!(unsubscription_request.set_type(:unsubscribed)) - end - - def jid(bare=true) - bare ? @jid.strip : @jid - end - - private - - def roster_item - client.roster.items[jid] - end - - def client - @client - end - end - - class Simple - - # Create a new Jabber::Simple client. You will be automatically connected - # to the Jabber server and your status message will be set to the string - # passed in as the status_message argument. - # - # jabber = Jabber::Simple.new("me@example.com", "password", "Chat with me - Please!") - def initialize(jid, password, status = nil, status_message = "Available") - @jid = jid - @password = password - @disconnected = false - status(status, status_message) - start_deferred_delivery_thread - end - - def inspect #:nodoc: - "Jabber::Simple #{@jid}" - end - - # Send a message to jabber user jid. - # - # Valid message types are: - # - # * :normal (default): a normal message. - # * :chat: a one-to-one chat message. - # * :groupchat: a group-chat message. - # * :headline: a "headline" message. - # * :error: an error message. - # - # If the recipient is not in your contacts list, the message will be queued - # for later delivery, and the Contact will be automatically asked for - # authorization (see Jabber::Simple#add). - def deliver(jid, message, type=:chat) - contacts(jid) do |friend| - unless subscribed_to? friend - add(friend.jid) - return deliver_deferred(friend.jid, message, type) - end - msg = Message.new(friend.jid) - msg.type = type - msg.body = message - send!(msg) - end - end - - # Set your presence, with a message. - # - # Available values for presence are: - # - # * nil: online. - # * :chat: free for chat. - # * :away: away from the computer. - # * :dnd: do not disturb. - # * :xa: extended away. - # - # It's not possible to set an offline status - to do that, disconnect! :-) - def status(presence, message) - @presence = presence - @status_message = message - stat_msg = Presence.new(@presence, @status_message) - send!(stat_msg) - end - - # Ask the users specified by jids for authorization (i.e., ask them to add - # you to their contact list). If you are already in the user's contact list, - # add() will not attempt to re-request authorization. In order to force - # re-authorization, first remove() the user, then re-add them. - # - # Example usage: - # - # jabber_simple.add("friend@friendosaurus.com") - # - # Because the authorization process might take a few seconds, or might - # never happen depending on when (and if) the user accepts your - # request, results are placed in the Jabber::Simple#new_subscriptions queue. - def add(*jids) - contacts(*jids) do |friend| - next if subscribed_to? friend - friend.ask_for_authorization! - end - end - - # Remove the jabber users specified by jids from the contact list. - def remove(*jids) - contacts(*jids) do |unfriend| - unfriend.unsubscribe! - end - end - - # Returns true if this Jabber account is subscribed to status updates for - # the jabber user jid, false otherwise. - def subscribed_to?(jid) - contacts(jid) do |contact| - return contact.subscribed? - end - end - - # If contacts is a single contact, returns a Jabber::Contact object - # representing that user; if contacts is an array, returns an array of - # Jabber::Contact objects. - # - # When called with a block, contacts will yield each Jabber::Contact object - # in turn. This is mainly used internally, but exposed as an utility - # function. - def contacts(*contacts, &block) - @contacts ||= {} - contakts = [] - contacts.each do |contact| - jid = contact.to_s - unless @contacts[jid] - @contacts[jid] = contact.respond_to?(:ask_for_authorization!) ? contact : Contact.new(self, contact) - end - yield @contacts[jid] if block_given? - contakts << @contacts[jid] - end - contakts.size > 1 ? contakts : contakts.first - end - - # Returns true if the Jabber client is connected to the Jabber server, - # false otherwise. - def connected? - @client ||= nil - connected = @client.respond_to?(:is_connected?) && @client.is_connected? - return connected - end - - # Returns an array of messages received since the last time - # received_messages was called. Passing a block will yield each message in - # turn, allowing you to break part-way through processing (especially - # useful when your message handling code is not thread-safe (e.g., - # ActiveRecord). - # - # e.g.: - # - # jabber.received_messages do |message| - # puts "Received message from #{message.from}: #{message.body}" - # end - def received_messages(&block) - dequeue(:received_messages, &block) - end - - # Returns true if there are unprocessed received messages waiting in the - # queue, false otherwise. - def received_messages? - !queue(:received_messages).empty? - end - - # Returns an array of presence updates received since the last time - # presence_updates was called. Passing a block will yield each update in - # turn, allowing you to break part-way through processing (especially - # useful when your presence handling code is not thread-safe (e.g., - # ActiveRecord). - # - # e.g.: - # - # jabber.presence_updates do |friend, new_presence| - # puts "Received presence update from #{friend}: #{new_presence}" - # end - def presence_updates(&block) - updates = [] - @presence_mutex.synchronize do - dequeue(:presence_updates) do |friend| - presence = @presence_updates[friend] - next unless presence - new_update = [friend, presence[0], presence[1]] - yield new_update if block_given? - updates << new_update - @presence_updates.delete(friend) - end - end - return updates - end - - # Returns true if there are unprocessed presence updates waiting in the - # queue, false otherwise. - def presence_updates? - !queue(:presence_updates).empty? - end - - # Returns an array of subscription notifications received since the last - # time new_subscriptions was called. Passing a block will yield each update - # in turn, allowing you to break part-way through processing (especially - # useful when your subscription handling code is not thread-safe (e.g., - # ActiveRecord). - # - # e.g.: - # - # jabber.new_subscriptions do |friend, presence| - # puts "Received presence update from #{friend.to_s}: #{presence}" - # end - def new_subscriptions(&block) - dequeue(:new_subscriptions, &block) - end - - # Returns true if there are unprocessed presence updates waiting in the - # queue, false otherwise. - def new_subscriptions? - !queue(:new_subscriptions).empty? - end - - # Returns an array of subscription notifications received since the last - # time subscription_requests was called. Passing a block will yield each update - # in turn, allowing you to break part-way through processing (especially - # useful when your subscription handling code is not thread-safe (e.g., - # ActiveRecord). - # - # e.g.: - # - # jabber.subscription_requests do |friend, presence| - # puts "Received presence update from #{friend.to_s}: #{presence}" - # end - def subscription_requests(&block) - dequeue(:subscription_requests, &block) - end - - # Returns true if auto-accept subscriptions (friend requests) is enabled - # (default), false otherwise. - def accept_subscriptions? - @accept_subscriptions = true if @accept_subscriptions.nil? - @accept_subscriptions - end - - # Change whether or not subscriptions (friend requests) are automatically accepted. - def accept_subscriptions=(accept_status) - @accept_subscriptions = accept_status - end - - # Direct access to the underlying Roster helper. - def roster - return @roster if @roster - self.roster = Roster::Helper.new(client) - end - - # Direct access to the underlying Jabber client. - def client - connect!() unless connected? - @client - end - - # Send a Jabber stanza over-the-wire. - def send!(msg) - attempts = 0 - begin - attempts += 1 - client.send(msg) - rescue Errno::EPIPE, IOError => e - sleep 0.33 - disconnect - reconnect - retry unless attempts > 3 - raise e - end - end - - # Use this to force the client to reconnect after a force_disconnect. - def reconnect - @disconnected = false - connect! - end - - # Use this to force the client to disconnect and not automatically - # reconnect. - def disconnect - disconnect! - end - - # Queue messages for delivery once a user has accepted our authorization - # request. Works in conjunction with the deferred delivery thread. - # - # You can use this method if you want to manually add friends and still - # have the message queued for later delivery. - def deliver_deferred(jid, message, type) - msg = {:to => jid, :message => message, :type => type} - queue(:pending_messages) << [msg] - end - - private - - def client=(client) - self.roster = nil # ensure we clear the roster, since that's now associated with a different client. - @client = client - end - - def roster=(new_roster) - @roster = new_roster - end - - def connect! - raise ConnectionError, "Connections are disabled - use Jabber::Simple::force_connect() to reconnect." if @disconnected - # Pre-connect - @connect_mutex ||= Mutex.new - @connect_mutex.lock - disconnect!(false) if connected? - - # Connect - jid = JID.new(@jid) - my_client = Client.new(@jid) - my_client.connect - my_client.auth(@password) - self.client = my_client - - # Post-connect - register_default_callbacks - status(@presence, @status_message) - @connect_mutex.unlock - end - - def disconnect!(auto_reconnect = true) - if client.respond_to?(:is_connected?) && client.is_connected? - client.close - end - client = nil - @disconnected = auto_reconnect - end - - def register_default_callbacks - client.add_message_callback do |message| - queue(:received_messages) << message unless message.body.nil? - end - - roster.add_subscription_callback do |roster_item, presence| - if presence.type == :subscribed - queue(:new_subscriptions) << [roster_item, presence] - end - end - - roster.add_subscription_request_callback do |roster_item, presence| - if accept_subscriptions? - roster.accept_subscription(presence.from) - else - queue(:subscription_requests) << [roster_item, presence] - end - end - - @presence_updates = {} - @presence_mutex = Mutex.new - roster.add_presence_callback do |roster_item, old_presence, new_presence| - simple_jid = roster_item.jid.strip.to_s - presence = case new_presence.type - when nil: new_presence.show || :online - when :unavailable: :unavailable - else - nil - end - - if presence && @presence_updates[simple_jid] != presence - queue(:presence_updates) << simple_jid - @presence_mutex.synchronize { @presence_updates[simple_jid] = [presence, new_presence.status] } - end - end - end - - # This thread facilitates the delivery of messages to users who haven't yet - # accepted an invitation from us. When we attempt to deliver a message, if - # the user hasn't subscribed, we place the message in a queue for later - # delivery. Once a user has accepted our authorization request, we deliver - # any messages that have been queued up in the meantime. - def start_deferred_delivery_thread #:nodoc: - Thread.new { - loop { - messages = [queue(:pending_messages).pop].flatten - messages.each do |message| - if subscribed_to?(message[:to]) - deliver(message[:to], message[:message], message[:type]) - else - queue(:pending_messages) << message - end - end - } - } - end - - def queue(queue) - @queues ||= Hash.new { |h,k| h[k] = Queue.new } - @queues[queue] - end - - def dequeue(queue, non_blocking = true, max_items = 100, &block) - queue_items = [] - max_items.times do - queue_item = queue(queue).pop(non_blocking) rescue nil - break if queue_item.nil? - queue_items << queue_item - yield queue_item if block_given? - end - queue_items - end - end -end - -true diff --git a/vendor/xmpp4r-simple-0.8.4/test/test_xmpp4r_simple.rb b/vendor/xmpp4r-simple-0.8.4/test/test_xmpp4r_simple.rb deleted file mode 100644 index d8fd29ed3..000000000 --- a/vendor/xmpp4r-simple-0.8.4/test/test_xmpp4r_simple.rb +++ /dev/null @@ -1,242 +0,0 @@ -# Jabber::Simple - An extremely easy-to-use Jabber client library. -# Copyright 2006 Blaine Cook , Obvious Corp. -# -# Jabber::Simple is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# Jabber::Simple is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Jabber::Simple; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -# -$:.unshift "#{File.dirname(__FILE__)}/../lib" - -require 'test/unit' -require 'timeout' -require 'xmpp4r-simple' - -class JabberSimpleTest < Test::Unit::TestCase - - def setup - @@connections ||= {} - - if @@connections.include?(:client1) - @client1 = @@connections[:client1] - @client2 = @@connections[:client2] - @client1.accept_subscriptions = true - @client2.accept_subscriptions = true - @jid1_raw = @@connections[:jid1_raw] - @jid2_raw = @@connections[:jid2_raw] - @jid1 = @jid1_raw.strip.to_s - @jid2 = @jid2_raw.strip.to_s - return true - end - - logins = [] - begin - logins = File.readlines(File.expand_path("~/.xmpp4r-simple-test-config")).map! { |login| login.split(" ") } - raise StandardError unless logins.size == 2 - rescue => e - puts "\nConfiguration Error!\n\nYou must make available two unique Jabber accounts in order for the tests to pass." - puts "Place them in ~/.xmpp4r-simple-test-config, one per line like so:\n\n" - puts "user1@example.com/res password" - puts "user2@example.com/res password\n\n" - raise e - end - - @@connections[:client1] = Jabber::Simple.new(*logins[0]) - @@connections[:client2] = Jabber::Simple.new(*logins[1]) - - @@connections[:jid1_raw] = Jabber::JID.new(logins[0][0]) - @@connections[:jid2_raw] = Jabber::JID.new(logins[1][0]) - - # Force load the client and roster, just to be safe. - @@connections[:client1].roster - @@connections[:client2].roster - - # Re-run this method to setup the local instance variables the first time. - setup - end - - def test_ensure_the_jabber_clients_are_connected_after_setup - assert @client1.client.is_connected? - assert @client2.client.is_connected? - end - - def test_inspect_should_be_custom - assert_equal "Jabber::Simple #{@jid1_raw}", @client1.inspect - end - - def test_inspect_contact_should_be_custom - assert_equal "Jabber::Contact #{@jid2}", @client1.contacts(@jid2).inspect - end - - def test_remove_users_from_our_roster_should_succeed - @client2.remove(@jid1) - @client1.remove(@jid2) - - sleep 3 - - assert_equal false, @client1.subscribed_to?(@jid2) - assert_equal false, @client2.subscribed_to?(@jid1) - end - - def test_add_users_to_our_roster_should_succeed_with_automatic_approval - @client1.remove(@jid2) - @client2.remove(@jid1) - - assert_before 60 do - assert_equal false, @client1.subscribed_to?(@jid2) - assert_equal false, @client2.subscribed_to?(@jid1) - end - - @client1.new_subscriptions - @client1.add(@jid2) - - assert_before 60 do - assert @client1.subscribed_to?(@jid2) - assert @client2.subscribed_to?(@jid1) - end - - new_subscriptions = @client1.new_subscriptions - assert_equal 1, new_subscriptions.size - assert_equal @jid2, new_subscriptions[0][0].jid.strip.to_s - end - - def test_sent_message_should_be_received - # First clear the client's message queue, just in case. - assert_kind_of Array, @client2.received_messages - - # Next ensure that we're not subscribed, so that we can test the deferred message queue. - @client1.remove(@jid2) - @client2.remove(@jid1) - sleep 2 - - # Deliver the messages; this should be received by the other client. - @client1.deliver(@jid2, "test message") - - sleep 2 - - # Fetch the message; allow up to ten seconds for the delivery to occur. - messages = [] - begin - Timeout::timeout(20) { - loop do - messages = @client2.received_messages - break unless messages.empty? - sleep 1 - end - } - rescue Timeout::Error - flunk "Timeout waiting for message" - end - - # Ensure that the message was received intact. - assert_equal @jid1, messages.first.from.strip.to_s - assert_equal "test message", messages.first.body - end - - def test_presence_updates_should_be_received - - @client2.add(@client1) - @client1.add(@client2) - - assert_before(60) { assert @client2.subscribed_to?(@jid1) } - assert_before(60) { assert_equal 0, @client2.presence_updates.size } - - @client1.status(:away, "Doing something else.") - - new_statuses = [] - assert_before(60) do - new_statuses = @client2.presence_updates - assert_equal 1, new_statuses.size - end - - new_status = new_statuses.first - assert_equal @jid1, new_status[0] - assert_equal "Doing something else.", new_status[2] - assert_equal :away, new_status[1] - end - - def test_disable_auto_accept_subscription_requests - @client1.remove(@jid2) - @client2.remove(@jid1) - - assert_before(60) do - assert_equal false, @client1.subscribed_to?(@jid2) - assert_equal false, @client2.subscribed_to?(@jid1) - end - - @client1.accept_subscriptions = false - assert_equal false, @client1.accept_subscriptions? - - assert_before(60) { assert_equal 0, @client1.subscription_requests.size } - - @client2.add(@jid1) - - new_subscription_requests = [] - assert_before(60) do - new_subscription_requests = @client1.subscription_requests - assert_equal 1, new_subscription_requests.size - end - - new_subscription = new_subscription_requests.first - assert_equal @jid2, new_subscription[0].jid.strip.to_s - assert_equal :subscribe, new_subscription[1].type - end - - def test_automatically_reconnect - @client1.client.close - - assert_before 60 do - assert_equal false, @client1.connected? - end - - # empty client 2's received message queue. - @client2.received_messages - - @client1.deliver(@jid2, "Testing") - - assert_before(60) { assert @client1.connected? } - assert @client1.roster.instance_variable_get('@stream').is_connected? - assert_before(60) { assert_equal 1, @client2.received_messages.size } - end - - def test_disconnect_doesnt_allow_auto_reconnects - @client1.disconnect - - assert_equal false, @client1.connected? - - assert_raises Jabber::ConnectionError do - @client1.deliver(@jid2, "testing") - end - - @client1.reconnect - end - - private - - def assert_before(seconds, &block) - error = nil - begin - Timeout::timeout(seconds) { - begin - yield - rescue => e - error = e - sleep 0.5 - retry - end - } - rescue Timeout::Error - raise error - end - end - -end