From f9ed697ec9290e668ebad7b57f9e7033764b28fc Mon Sep 17 00:00:00 2001 From: Preston Lee Date: Mon, 11 May 2009 18:51:20 -0700 Subject: [PATCH] adding examples for presentation --- .../star_field/lib/asynchronous_object.rb | 65 - .../star_field/lib/drawable_star.rb | 14 - ruby/processing/star_field/lib/star.rb | 55 - .../star_field/library/crack-0.1.2/LICENSE | 20 - .../library/crack-0.1.2/README.rdoc | 22 - .../star_field/library/crack-0.1.2/Rakefile | 87 - .../library/crack-0.1.2/VERSION.yml | 4 - .../library/crack-0.1.2/lib/crack.rb | 7 - .../crack-0.1.2/lib/crack/core_extensions.rb | 126 -- .../library/crack-0.1.2/lib/crack/json.rb | 68 - .../library/crack-0.1.2/lib/crack/xml.rb | 211 --- .../library/crack-0.1.2/test/crack_test.rb | 4 - .../test/data/twittersearch-firefox.json | 1 - .../test/data/twittersearch-ie.json | 1 - .../library/crack-0.1.2/test/json_test.rb | 65 - .../library/crack-0.1.2/test/test_helper.rb | 12 - .../library/crack-0.1.2/test/xml_test.rb | 458 ----- .../star_field/library/httparty-0.4.3/History | 125 -- .../library/httparty-0.4.3/MIT-LICENSE | 20 - .../library/httparty-0.4.3/Manifest | 50 - .../star_field/library/httparty-0.4.3/README | 36 - .../library/httparty-0.4.3/Rakefile | 48 - .../library/httparty-0.4.3/bin/httparty | 98 - .../library/httparty-0.4.3/cucumber.yml | 1 - .../library/httparty-0.4.3/examples/aaws.rb | 32 - .../library/httparty-0.4.3/examples/basic.rb | 11 - .../httparty-0.4.3/examples/delicious.rb | 37 - .../library/httparty-0.4.3/examples/google.rb | 16 - .../httparty-0.4.3/examples/rubyurl.rb | 14 - .../httparty-0.4.3/examples/twitter.rb | 31 - .../httparty-0.4.3/examples/whoismyrep.rb | 10 - .../features/basic_authentication.feature | 20 - .../features/command_line.feature | 7 - .../deals_with_http_error_codes.feature | 26 - .../features/handles_multiple_formats.feature | 34 - .../httparty-0.4.3/features/steps/env.rb | 15 - .../features/steps/httparty_response_steps.rb | 26 - .../features/steps/httparty_steps.rb | 15 - .../features/steps/mongrel_helper.rb | 55 - .../features/steps/remote_service_steps.rb | 47 - .../features/supports_redirection.feature | 22 - .../library/httparty-0.4.3/httparty.gemspec | 40 - .../library/httparty-0.4.3/lib/httparty.rb | 205 --- .../lib/httparty/cookie_hash.rb | 9 - .../lib/httparty/core_extensions.rb | 25 - .../httparty-0.4.3/lib/httparty/exceptions.rb | 7 - .../httparty/module_inheritable_attributes.rb | 25 - .../httparty-0.4.3/lib/httparty/request.rb | 141 -- .../httparty-0.4.3/lib/httparty/response.rb | 18 - .../httparty-0.4.3/lib/httparty/version.rb | 3 - .../library/httparty-0.4.3/setup.rb | 1585 ----------------- .../spec/fixtures/delicious.xml | 23 - .../httparty-0.4.3/spec/fixtures/empty.xml | 0 .../httparty-0.4.3/spec/fixtures/google.html | 3 - .../httparty-0.4.3/spec/fixtures/twitter.json | 1 - .../httparty-0.4.3/spec/fixtures/twitter.xml | 403 ----- .../undefined_method_add_node_for_nil.xml | 2 - .../library/httparty-0.4.3/spec/hash_spec.rb | 49 - .../spec/httparty/cookie_hash_spec.rb | 38 - .../spec/httparty/request_spec.rb | 196 -- .../spec/httparty/response_spec.rb | 62 - .../httparty-0.4.3/spec/httparty_spec.rb | 283 --- .../library/httparty-0.4.3/spec/spec.opts | 3 - .../httparty-0.4.3/spec/spec_helper.rb | 21 - .../httparty-0.4.3/spec/string_spec.rb | 27 - .../httparty-0.4.3/website/css/common.css | 47 - .../library/httparty-0.4.3/website/index.html | 74 - .../star_field/library/mash-0.0.3/History.txt | 18 - .../library/mash-0.0.3/Manifest.txt | 7 - .../star_field/library/mash-0.0.3/README.txt | 58 - .../star_field/library/mash-0.0.3/Rakefile | 18 - .../star_field/library/mash-0.0.3/lib/mash.rb | 226 --- .../library/mash-0.0.3/spec/mash_spec.rb | 114 -- .../library/mash-0.0.3/spec/spec_helper.rb | 1 - .../library/oauth-0.3.2/History.txt | 66 - .../library/oauth-0.3.2/License.txt | 20 - .../library/oauth-0.3.2/Manifest.txt | 83 - .../library/oauth-0.3.2/README.rdoc | 71 - .../star_field/library/oauth-0.3.2/Rakefile | 36 - .../star_field/library/oauth-0.3.2/TODO | 32 - .../star_field/library/oauth-0.3.2/bin/oauth | 5 - .../library/oauth-0.3.2/examples/yql.rb | 44 - .../library/oauth-0.3.2/lib/oauth.rb | 4 - .../library/oauth-0.3.2/lib/oauth/cli.rb | 300 ---- .../library/oauth-0.3.2/lib/oauth/client.rb | 4 - .../oauth/client/action_controller_request.rb | 53 - .../oauth-0.3.2/lib/oauth/client/helper.rb | 71 - .../oauth-0.3.2/lib/oauth/client/net_http.rb | 78 - .../library/oauth-0.3.2/lib/oauth/consumer.rb | 296 --- .../library/oauth-0.3.2/lib/oauth/errors.rb | 3 - .../oauth-0.3.2/lib/oauth/errors/error.rb | 4 - .../oauth-0.3.2/lib/oauth/errors/problem.rb | 14 - .../lib/oauth/errors/unauthorized.rb | 12 - .../library/oauth-0.3.2/lib/oauth/helper.rb | 55 - .../library/oauth-0.3.2/lib/oauth/oauth.rb | 7 - .../lib/oauth/oauth_test_helper.rb | 25 - .../oauth-0.3.2/lib/oauth/request_proxy.rb | 24 - .../action_controller_request.rb | 61 - .../lib/oauth/request_proxy/base.rb | 157 -- .../lib/oauth/request_proxy/jabber_request.rb | 41 - .../lib/oauth/request_proxy/mock_request.rb | 44 - .../lib/oauth/request_proxy/net_http.rb | 65 - .../lib/oauth/request_proxy/rack_request.rb | 40 - .../library/oauth-0.3.2/lib/oauth/server.rb | 66 - .../oauth-0.3.2/lib/oauth/signature.rb | 28 - .../oauth-0.3.2/lib/oauth/signature/base.rb | 91 - .../lib/oauth/signature/hmac/base.rb | 12 - .../lib/oauth/signature/hmac/md5.rb | 9 - .../lib/oauth/signature/hmac/rmd160.rb | 9 - .../lib/oauth/signature/hmac/sha1.rb | 9 - .../lib/oauth/signature/hmac/sha2.rb | 9 - .../oauth-0.3.2/lib/oauth/signature/md5.rb | 13 - .../lib/oauth/signature/plaintext.rb | 23 - .../lib/oauth/signature/rsa/sha1.rb | 45 - .../oauth-0.3.2/lib/oauth/signature/sha1.rb | 13 - .../library/oauth-0.3.2/lib/oauth/token.rb | 7 - .../lib/oauth/tokens/access_token.rb | 68 - .../lib/oauth/tokens/consumer_token.rb | 32 - .../lib/oauth/tokens/request_token.rb | 28 - .../lib/oauth/tokens/server_token.rb | 9 - .../oauth-0.3.2/lib/oauth/tokens/token.rb | 17 - .../library/oauth-0.3.2/lib/oauth/version.rb | 3 - .../library/oauth-0.3.2/oauth.gemspec | 49 - .../library/oauth-0.3.2/script/destroy | 14 - .../library/oauth-0.3.2/script/generate | 14 - .../library/oauth-0.3.2/script/txt2html | 74 - .../star_field/library/oauth-0.3.2/setup.rb | 1585 ----------------- .../library/oauth-0.3.2/tasks/deployment.rake | 34 - .../oauth-0.3.2/tasks/environment.rake | 7 - .../library/oauth-0.3.2/tasks/website.rake | 17 - .../oauth-0.3.2/test/cases/oauth_case.rb | 19 - .../1_0-final/test_construct_request_url.rb | 62 - .../test_normalize_request_parameters.rb | 88 - .../1_0-final/test_parameter_encodings.rb | 86 - .../1_0-final/test_signature_base_strings.rb | 77 - .../library/oauth-0.3.2/test/keys/rsa.cert | 11 - .../library/oauth-0.3.2/test/keys/rsa.pem | 16 - .../oauth-0.3.2/test/test_access_token.rb | 28 - .../test_action_controller_request_proxy.rb | 45 - .../library/oauth-0.3.2/test/test_consumer.rb | 327 ---- .../library/oauth-0.3.2/test/test_helper.rb | 10 - .../oauth-0.3.2/test/test_hmac_sha1.rb | 21 - .../oauth-0.3.2/test/test_net_http_client.rb | 169 -- .../test/test_net_http_request_proxy.rb | 38 - .../test/test_rack_request_proxy.rb | 40 - .../oauth-0.3.2/test/test_request_token.rb | 53 - .../library/oauth-0.3.2/test/test_rsa_sha1.rb | 59 - .../library/oauth-0.3.2/test/test_server.rb | 40 - .../oauth-0.3.2/test/test_signature.rb | 11 - .../oauth-0.3.2/test/test_signature_base.rb | 32 - .../test/test_signature_plain_text.rb | 31 - .../library/oauth-0.3.2/test/test_token.rb | 14 - .../library/oauth-0.3.2/website/index.html | 87 - .../library/oauth-0.3.2/website/index.txt | 73 - .../javascripts/rounded_corners_lite.inc.js | 285 --- .../website/stylesheets/screen.css | 138 -- .../oauth-0.3.2/website/template.rhtml | 48 - .../library/ruby-hmac-0.3.2/History.txt | 9 - .../library/ruby-hmac-0.3.2/Manifest.txt | 10 - .../library/ruby-hmac-0.3.2/README.txt | 35 - .../library/ruby-hmac-0.3.2/Rakefile | 25 - .../library/ruby-hmac-0.3.2/lib/hmac-md5.rb | 11 - .../ruby-hmac-0.3.2/lib/hmac-rmd160.rb | 11 - .../library/ruby-hmac-0.3.2/lib/hmac-sha1.rb | 11 - .../library/ruby-hmac-0.3.2/lib/hmac-sha2.rb | 25 - .../library/ruby-hmac-0.3.2/lib/hmac.rb | 117 -- .../library/ruby-hmac-0.3.2/test/test_hmac.rb | 92 - .../star_field/library/twitter-0.6.8/History | 194 -- .../star_field/library/twitter-0.6.8/License | 20 - .../star_field/library/twitter-0.6.8/Notes | 33 - .../library/twitter-0.6.8/README.rdoc | 13 - .../star_field/library/twitter-0.6.8/Rakefile | 103 -- .../library/twitter-0.6.8/VERSION.yml | 4 - .../library/twitter-0.6.8/examples/connect.rb | 30 - .../examples/friendship_existance.rb | 13 - .../examples/helpers/config_store.rb | 38 - .../twitter-0.6.8/examples/httpauth.rb | 11 - .../library/twitter-0.6.8/examples/ids.rb | 13 - .../library/twitter-0.6.8/examples/search.rb | 15 - .../twitter-0.6.8/examples/timeline.rb | 19 - .../twitter-0.6.8/examples/unauthorized.rb | 16 - .../library/twitter-0.6.8/examples/update.rb | 11 - .../library/twitter-0.6.8/examples/user.rb | 5 - .../library/twitter-0.6.8/lib/twitter.rb | 63 - .../library/twitter-0.6.8/lib/twitter/base.rb | 165 -- .../twitter-0.6.8/lib/twitter/httpauth.rb | 27 - .../twitter-0.6.8/lib/twitter/oauth.rb | 34 - .../twitter-0.6.8/lib/twitter/request.rb | 102 -- .../twitter-0.6.8/lib/twitter/search.rb | 106 -- .../twitter-0.6.8/test/fixtures/firehose.json | 1 - .../test/fixtures/follower_ids.json | 1 - .../test/fixtures/friend_ids.json | 1 - .../test/fixtures/friends_timeline.json | 1 - .../test/fixtures/rate_limit_exceeded.json | 1 - .../twitter-0.6.8/test/fixtures/replies.json | 1 - .../twitter-0.6.8/test/fixtures/search.json | 1 - .../test/fixtures/search_from_jnunemaker.json | 1 - .../twitter-0.6.8/test/fixtures/status.json | 1 - .../test/fixtures/status_show.json | 1 - .../twitter-0.6.8/test/fixtures/user.json | 1 - .../test/fixtures/user_timeline.json | 1 - .../library/twitter-0.6.8/test/test_helper.rb | 36 - .../twitter-0.6.8/test/twitter/base_test.rb | 95 - .../test/twitter/httpauth_test.rb | 76 - .../twitter-0.6.8/test/twitter/oauth_test.rb | 71 - .../test/twitter/request_test.rb | 217 --- .../twitter-0.6.8/test/twitter/search_test.rb | 144 -- .../twitter-0.6.8/test/twitter_test.rb | 38 - .../star_field/star_field_1_model.rb | 2 +- .../star_field/star_field_2_view.rb | 2 +- .../star_field/star_field_3_controller.rb | 14 +- ruby/processing/star_field/twitter_field.rb | 226 --- 212 files changed, 15 insertions(+), 13955 deletions(-) delete mode 100644 ruby/processing/star_field/lib/asynchronous_object.rb delete mode 100644 ruby/processing/star_field/lib/drawable_star.rb delete mode 100644 ruby/processing/star_field/lib/star.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/LICENSE delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/README.rdoc delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/Rakefile delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/VERSION.yml delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/lib/crack.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/lib/crack/core_extensions.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/lib/crack/json.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/lib/crack/xml.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/crack_test.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-firefox.json delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-ie.json delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/json_test.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/test_helper.rb delete mode 100644 ruby/processing/star_field/library/crack-0.1.2/test/xml_test.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/History delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/MIT-LICENSE delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/Manifest delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/README delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/Rakefile delete mode 100755 ruby/processing/star_field/library/httparty-0.4.3/bin/httparty delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/cucumber.yml delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/aaws.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/basic.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/delicious.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/google.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/rubyurl.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/twitter.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/examples/whoismyrep.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/basic_authentication.feature delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/command_line.feature delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/deals_with_http_error_codes.feature delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/handles_multiple_formats.feature delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/steps/env.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_response_steps.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_steps.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/steps/mongrel_helper.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/steps/remote_service_steps.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/features/supports_redirection.feature delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/httparty.gemspec delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/cookie_hash.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/core_extensions.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/exceptions.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/module_inheritable_attributes.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/request.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/response.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/version.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/setup.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/delicious.xml delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/empty.xml delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/google.html delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.json delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.xml delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/undefined_method_add_node_for_nil.xml delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/hash_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/cookie_hash_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/request_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/response_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/httparty_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/spec.opts delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/spec_helper.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/spec/string_spec.rb delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/website/css/common.css delete mode 100644 ruby/processing/star_field/library/httparty-0.4.3/website/index.html delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/History.txt delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/Manifest.txt delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/README.txt delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/Rakefile delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/lib/mash.rb delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/spec/mash_spec.rb delete mode 100644 ruby/processing/star_field/library/mash-0.0.3/spec/spec_helper.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/History.txt delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/License.txt delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/Manifest.txt delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/README.rdoc delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/Rakefile delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/TODO delete mode 100755 ruby/processing/star_field/library/oauth-0.3.2/bin/oauth delete mode 100755 ruby/processing/star_field/library/oauth-0.3.2/examples/yql.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/cli.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/action_controller_request.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/helper.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/net_http.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/consumer.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/error.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/problem.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/unauthorized.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/helper.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth_test_helper.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/action_controller_request.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/base.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/jabber_request.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/mock_request.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/net_http.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/rack_request.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/server.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/base.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/base.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/md5.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/rmd160.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha1.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha2.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/md5.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/plaintext.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/rsa/sha1.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/sha1.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/access_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/consumer_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/request_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/server_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/version.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/oauth.gemspec delete mode 100755 ruby/processing/star_field/library/oauth-0.3.2/script/destroy delete mode 100755 ruby/processing/star_field/library/oauth-0.3.2/script/generate delete mode 100755 ruby/processing/star_field/library/oauth-0.3.2/script/txt2html delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/setup.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/tasks/deployment.rake delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/tasks/environment.rake delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/tasks/website.rake delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/cases/oauth_case.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_construct_request_url.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_normalize_request_parameters.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_parameter_encodings.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_signature_base_strings.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.cert delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.pem delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_access_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_action_controller_request_proxy.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_consumer.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_helper.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_hmac_sha1.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_client.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_request_proxy.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_rack_request_proxy.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_request_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_rsa_sha1.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_server.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_signature.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_base.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_plain_text.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/test/test_token.rb delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/website/index.html delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/website/index.txt delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/website/javascripts/rounded_corners_lite.inc.js delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/website/stylesheets/screen.css delete mode 100644 ruby/processing/star_field/library/oauth-0.3.2/website/template.rhtml delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/History.txt delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/Manifest.txt delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/README.txt delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/Rakefile delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-md5.rb delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-rmd160.rb delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha1.rb delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha2.rb delete mode 100644 ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac.rb delete mode 100755 ruby/processing/star_field/library/ruby-hmac-0.3.2/test/test_hmac.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/History delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/License delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/Notes delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/README.rdoc delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/Rakefile delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/VERSION.yml delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/connect.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/friendship_existance.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/helpers/config_store.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/httpauth.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/ids.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/search.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/timeline.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/unauthorized.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/update.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/examples/user.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/base.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/httpauth.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/oauth.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/request.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/search.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/firehose.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/follower_ids.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friend_ids.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friends_timeline.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/rate_limit_exceeded.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/replies.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search_from_jnunemaker.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status_show.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user_timeline.json delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/test_helper.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter/base_test.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter/httpauth_test.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter/oauth_test.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter/request_test.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter/search_test.rb delete mode 100644 ruby/processing/star_field/library/twitter-0.6.8/test/twitter_test.rb delete mode 100644 ruby/processing/star_field/twitter_field.rb diff --git a/ruby/processing/star_field/lib/asynchronous_object.rb b/ruby/processing/star_field/lib/asynchronous_object.rb deleted file mode 100644 index ce446a1..0000000 --- a/ruby/processing/star_field/lib/asynchronous_object.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'thread' - -class AsychronousObject - - attr_reader :thread - attr_reader :update_frequency - attr_reader :last_updated - - def initialize(freq) - @update_freqency = freq - # puts @update_freqency - @mutex = Mutex.new - - start - end - - def start - @last_updated = Time.now - @state = :active # or :inactive - # puts @mutex - @thread = Thread.new do - keep_going = true - while keep_going do - @mutex.synchronize do - # puts "going" - keep_going = false if @state == :inactive - end - if keep_going - now = Time.now - # puts "TL '#{@last_updated}' N #{now} F #{@update_freqency}" - update(@last_updated, now) - @last_updated = now - sleep @update_freqency - end - end - end - end - - def update - puts "FAIL!" - raise "You need to implement this method!" - end - - def activate - @mutex.synchronize do - case @state - when :active - # do nothing - when :inactive - start - end - end - end - - def deactivate - @mutex.synchronize do - @state = :inactive - end - end - - def join - @thread.join - end - -end \ No newline at end of file diff --git a/ruby/processing/star_field/lib/drawable_star.rb b/ruby/processing/star_field/lib/drawable_star.rb deleted file mode 100644 index f30d0f5..0000000 --- a/ruby/processing/star_field/lib/drawable_star.rb +++ /dev/null @@ -1,14 +0,0 @@ -require 'lib/star' - -# We need to make our star drawable! -class DrawableStar < Star - - def draw - $app.push_matrix - $app.translate(@x, @y, @z) - $app.box(8) - # $app.sphere(10) - $app.pop_matrix - end - -end diff --git a/ruby/processing/star_field/lib/star.rb b/ruby/processing/star_field/lib/star.rb deleted file mode 100644 index 9d8c7c9..0000000 --- a/ruby/processing/star_field/lib/star.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'lib/asynchronous_object' - -class Star < AsychronousObject - - attr_reader :x, :y, :z - - DEFAULT_UPDATE_FREQUENCY = 0.05 # In seconds. - DEFAULT_CLIPPING_PLANE = 1800 # The universe is a giant cube, with each side being this long. - - def initialize(freq = DEFAULT_UPDATE_FREQUENCY, clip = DEFAULT_CLIPPING_PLANE) - @clipping_plane = clip - @dxs = rand(20) - 10 # X-axis movement per wall second. - @dys = rand(20) - 10 # Y-axis movement per wall second. - @dzs = rand(400) * 2 # Z-axis movement per wall second. - set_random_position - - super(freq) # We have to do this last since a +Thread+ will be created that needs our instance variables instantiated. - end - - def set_random_position - @x = rand(@clipping_plane * 2) - @clipping_plane - @y = rand(@clipping_plane * 2) - @clipping_plane - @z = rand(@clipping_plane * 2) - @clipping_plane - end - - def set_new_position - set_random_position - @z = -1 * @clipping_plane - end - - def update(last, now) - # Check if the star is getting too far away from the universe, and move it back to a reasonable starting point if so. - # puts "CLIP NIL" if @clipping_plane.nil? - set_new_position if @x >= @clipping_plane - set_new_position if @y >= @clipping_plane - set_new_position if @z >= @clipping_plane - - - # puts "Updating star position. '#{freq}'" - # Figure out the translation required along each axis for this time period. - dtime = now - last - dx = @dxs * dtime - dy = @dys * dtime - dz = @dzs * dtime - - # Move the star. - @x += dx - @y += dy - @z += dz - - # puts "Moving to #{@x}, #{@y}, #{@z}" - end - - -end diff --git a/ruby/processing/star_field/library/crack-0.1.2/LICENSE b/ruby/processing/star_field/library/crack-0.1.2/LICENSE deleted file mode 100644 index fbbebe1..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/README.rdoc b/ruby/processing/star_field/library/crack-0.1.2/README.rdoc deleted file mode 100644 index 2720e1f..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/README.rdoc +++ /dev/null @@ -1,22 +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. - -= 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. diff --git a/ruby/processing/star_field/library/crack-0.1.2/Rakefile b/ruby/processing/star_field/library/crack-0.1.2/Rakefile deleted file mode 100644 index 0b10f19..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/Rakefile +++ /dev/null @@ -1,87 +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 - -begin - require 'rake/contrib/sshpublisher' - namespace :rubyforge do - - desc "Release gem and RDoc documentation to RubyForge" - task :release => ["rubyforge:release:gem", "rubyforge:release:website", "rubyforge:release:docs"] - - namespace :release do - desc "Publish RDoc to RubyForge." - task :docs => [:rdoc] do - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - - host = "#{config['username']}@rubyforge.org" - remote_dir = "/var/www/gforge-projects/crack/rdoc" - local_dir = 'rdoc' - - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - - task :website do - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - - host = "#{config['username']}@rubyforge.org" - remote_dir = "/var/www/gforge-projects/crack/" - local_dir = 'website' - - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - end - end -rescue LoadError - puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured." -end diff --git a/ruby/processing/star_field/library/crack-0.1.2/VERSION.yml b/ruby/processing/star_field/library/crack-0.1.2/VERSION.yml deleted file mode 100644 index 6d2311f..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/VERSION.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -:major: 0 -:minor: 1 -:patch: 2 diff --git a/ruby/processing/star_field/library/crack-0.1.2/lib/crack.rb b/ruby/processing/star_field/library/crack-0.1.2/lib/crack.rb deleted file mode 100644 index 9aa6625..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/lib/crack/core_extensions.rb b/ruby/processing/star_field/library/crack-0.1.2/lib/crack/core_extensions.rb deleted file mode 100644 index 7e2babf..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/lib/crack/core_extensions.rb +++ /dev/null @@ -1,126 +0,0 @@ -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/ruby/processing/star_field/library/crack-0.1.2/lib/crack/json.rb b/ruby/processing/star_field/library/crack-0.1.2/lib/crack/json.rb deleted file mode 100644 index a3a51eb..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/lib/crack/xml.rb b/ruby/processing/star_field/library/crack-0.1.2/lib/crack/xml.rb deleted file mode 100644 index 72dee33..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/lib/crack/xml.rb +++ /dev/null @@ -1,211 +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 - return { name => typecast_value( unnormalize_xml_entities( inner_html ) ) } - 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/ruby/processing/star_field/library/crack-0.1.2/test/crack_test.rb b/ruby/processing/star_field/library/crack-0.1.2/test/crack_test.rb deleted file mode 100644 index 2b9b65d..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/test/crack_test.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'test_helper' - -# class CrackTest < Test::Unit::TestCase -# end diff --git a/ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-firefox.json b/ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-firefox.json deleted file mode 100644 index 0ee9f03..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-ie.json b/ruby/processing/star_field/library/crack-0.1.2/test/data/twittersearch-ie.json deleted file mode 100644 index 8b0664a..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/test/json_test.rb b/ruby/processing/star_field/library/crack-0.1.2/test/json_test.rb deleted file mode 100644 index 5efad80..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/test/json_test.rb +++ /dev/null @@ -1,65 +0,0 @@ -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 \ No newline at end of file diff --git a/ruby/processing/star_field/library/crack-0.1.2/test/test_helper.rb b/ruby/processing/star_field/library/crack-0.1.2/test/test_helper.rb deleted file mode 100644 index 5290ce4..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/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/ruby/processing/star_field/library/crack-0.1.2/test/xml_test.rb b/ruby/processing/star_field/library/crack-0.1.2/test/xml_test.rb deleted file mode 100644 index 598b739..0000000 --- a/ruby/processing/star_field/library/crack-0.1.2/test/xml_test.rb +++ /dev/null @@ -1,458 +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 - - 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/ruby/processing/star_field/library/httparty-0.4.3/History b/ruby/processing/star_field/library/httparty-0.4.3/History deleted file mode 100644 index ddf987e..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/History +++ /dev/null @@ -1,125 +0,0 @@ -== 0.4.5 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/ruby/processing/star_field/library/httparty-0.4.3/MIT-LICENSE b/ruby/processing/star_field/library/httparty-0.4.3/MIT-LICENSE deleted file mode 100644 index ea4d340..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/Manifest b/ruby/processing/star_field/library/httparty-0.4.3/Manifest deleted file mode 100644 index deaccbf..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/Manifest +++ /dev/null @@ -1,50 +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 -setup.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/hash_spec.rb -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 -spec/string_spec.rb -website/css/common.css -website/index.html diff --git a/ruby/processing/star_field/library/httparty-0.4.3/README b/ruby/processing/star_field/library/httparty-0.4.3/README deleted file mode 100644 index 2ec6d8e..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/README +++ /dev/null @@ -1,36 +0,0 @@ -= httparty - -== DESCRIPTION: - -Makes http fun again! - -== 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 \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/Rakefile b/ruby/processing/star_field/library/httparty-0.4.3/Rakefile deleted file mode 100644 index 6580830..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/Rakefile +++ /dev/null @@ -1,48 +0,0 @@ -ProjectName = 'httparty' -WebsitePath = "jnunemaker@rubyforge.org:/var/www/gforge-projects/#{ProjectName}" - -require 'rubygems' -require 'rake' -require 'echoe' -require 'spec/rake/spectask' -require "lib/#{ProjectName}/version" -require 'cucumber/rake/task' - -Echoe.new(ProjectName, HTTParty::Version) do |p| - p.description = "Makes http fun! Also, makes consuming restful web services dead easy." - p.install_message = "When you HTTParty, you must party hard!" - p.url = "http://#{ProjectName}.rubyforge.org" - p.author = "John Nunemaker" - p.email = "nunemaker@gmail.com" - p.extra_deps = [['crack', '>= 0.1.1']] - p.need_tar_gz = false - p.docs_host = WebsitePath -end - -desc 'Upload website files to rubyforge' -task :website do - sh %{rsync -av website/ #{WebsitePath}} - Rake::Task['website_docs'].invoke -end - -task :website_docs do - Rake::Task['redocs'].invoke - sh %{rsync -av doc/ #{WebsitePath}/docs} -end - -desc 'Preps the gem for a new release' -task :prepare do - %w[manifest build_gemspec].each do |task| - Rake::Task[task].invoke - end -end - -Rake::Task[:default].prerequisites.clear -task :default => :spec -Spec::Rake::SpecTask.new do |t| - t.spec_files = FileList["spec/**/*_spec.rb"] -end - -Cucumber::Rake::Task.new(:features) do |t| - t.cucumber_opts = "--format pretty" -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/bin/httparty b/ruby/processing/star_field/library/httparty-0.4.3/bin/httparty deleted file mode 100755 index 729cc8a..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/bin/httparty +++ /dev/null @@ -1,98 +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 -} - -def die(msg) - STDERR.puts(msg) - exit 1 -end - -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 or delete") 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).read - else - opts[:data] = d - end - end - - o.on("-H", "--header [NAME=VALUE]", "Additional HTTP headers in NAME=VALUE form") do |h| - die "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| - die "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! - -puts "Querying #{ARGV.first} with options: #{opts.inspect}" if opts[:verbose] - -if ARGV.empty? - STDERR.puts "You need to provide a URL" - STDERR.puts "USAGE: #{$0} [options] [url]" -end - -if opts[:output_format].nil? - response = HTTParty.send(opts[:action], ARGV.first, opts) - puts "Status: #{response.code}" - pp response -else - print_format = opts[:output_format] - response = HTTParty.send(opts[:action], ARGV.first, opts) - puts "Status: #{response.code}" - 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 \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/cucumber.yml b/ruby/processing/star_field/library/httparty-0.4.3/cucumber.yml deleted file mode 100644 index c1869b5..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/cucumber.yml +++ /dev/null @@ -1 +0,0 @@ -default: features diff --git a/ruby/processing/star_field/library/httparty-0.4.3/examples/aaws.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/aaws.rb deleted file mode 100644 index 3389d11..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/examples/basic.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/basic.rb deleted file mode 100644 index 767589b..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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 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/ruby/processing/star_field/library/httparty-0.4.3/examples/delicious.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/delicious.rb deleted file mode 100644 index e6d6243..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/examples/google.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/google.rb deleted file mode 100644 index f629b4d..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/examples/rubyurl.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/rubyurl.rb deleted file mode 100644 index 65808fb..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/examples/twitter.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/twitter.rb deleted file mode 100644 index c7794fa..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/examples/whoismyrep.rb b/ruby/processing/star_field/library/httparty-0.4.3/examples/whoismyrep.rb deleted file mode 100644 index b59473c..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/features/basic_authentication.feature b/ruby/processing/star_field/library/httparty-0.4.3/features/basic_authentication.feature deleted file mode 100644 index ee27650..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/features/command_line.feature b/ruby/processing/star_field/library/httparty-0.4.3/features/command_line.feature deleted file mode 100644 index 951e236..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/features/deals_with_http_error_codes.feature b/ruby/processing/star_field/library/httparty-0.4.3/features/deals_with_http_error_codes.feature deleted file mode 100644 index ccb9912..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/features/handles_multiple_formats.feature b/ruby/processing/star_field/library/httparty-0.4.3/features/handles_multiple_formats.feature deleted file mode 100644 index 24c91fa..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/features/steps/env.rb b/ruby/processing/star_field/library/httparty-0.4.3/features/steps/env.rb deleted file mode 100644 index b85c79a..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/env.rb +++ /dev/null @@ -1,15 +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 -end - -After do - @server.stop -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_response_steps.rb b/ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_response_steps.rb deleted file mode 100644 index f210cc6..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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 HTTParty::RedirectionTooDeep exception/ do - @exception_from_httparty.should_not be_nil - @exception_from_httparty.class.should eql(HTTParty::RedirectionTooDeep) -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_steps.rb b/ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_steps.rb deleted file mode 100644 index 17c63dd..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/httparty_steps.rb +++ /dev/null @@ -1,15 +0,0 @@ -When /I call HTTParty#get with '(.*)'$/ do |url| - begin - @response_from_httparty = HTTParty.get("http://#{@host_and_port}#{url}") - rescue HTTParty::RedirectionTooDeep => 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/ruby/processing/star_field/library/httparty-0.4.3/features/steps/mongrel_helper.rb b/ruby/processing/star_field/library/httparty-0.4.3/features/steps/mongrel_helper.rb deleted file mode 100644 index 3b78248..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/mongrel_helper.rb +++ /dev/null @@ -1,55 +0,0 @@ -def basic_mongrel_handler - Class.new(Mongrel::HttpHandler) do - attr_writer :content_type, :response_body, :response_code - - def initialize - @content_type = "text/html" - @response_body = "" - @response_code = 200 - @custom_headers = {} - end - - def process(request, response) - 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/ruby/processing/star_field/library/httparty-0.4.3/features/steps/remote_service_steps.rb b/ruby/processing/star_field/library/httparty-0.4.3/features/steps/remote_service_steps.rb deleted file mode 100644 index 08e205c..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/features/steps/remote_service_steps.rb +++ /dev/null @@ -1,47 +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 /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/ruby/processing/star_field/library/httparty-0.4.3/features/supports_redirection.feature b/ruby/processing/star_field/library/httparty-0.4.3/features/supports_redirection.feature deleted file mode 100644 index 1c1deef..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/httparty.gemspec b/ruby/processing/star_field/library/httparty-0.4.3/httparty.gemspec deleted file mode 100644 index d45a8f9..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/httparty.gemspec +++ /dev/null @@ -1,40 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = %q{httparty} - s.version = "0.4.3" - - s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version= - s.authors = ["John Nunemaker"] - s.date = %q{2009-04-23} - 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 = ["bin/httparty", "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", "README"] - s.files = ["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", "setup.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/hash_spec.rb", "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", "spec/string_spec.rb", "website/css/common.css", "website/index.html"] - s.has_rdoc = true - s.homepage = %q{http://httparty.rubyforge.org} - s.post_install_message = %q{When you HTTParty, you must party hard!} - s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Httparty", "--main", "README"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{httparty} - s.rubygems_version = %q{1.3.1} - s.summary = %q{Makes http fun! Also, makes consuming restful web services dead easy.} - - 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 - s.add_runtime_dependency(%q, [">= 0.1.1"]) - s.add_development_dependency(%q, [">= 0"]) - else - s.add_dependency(%q, [">= 0.1.1"]) - s.add_dependency(%q, [">= 0"]) - end - else - s.add_dependency(%q, [">= 0.1.1"]) - s.add_dependency(%q, [">= 0"]) - end -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty.rb deleted file mode 100644 index 5d07e18..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty.rb +++ /dev/null @@ -1,205 +0,0 @@ -$:.unshift(File.dirname(__FILE__)) - -require 'net/http' -require 'net/https' -require 'httparty/module_inheritable_attributes' -require 'rubygems' -# gem 'crack' -require 'crack' - -module HTTParty - - AllowedFormats = { - '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 - } unless defined?(AllowedFormats) - - def self.included(base) - base.extend ClassMethods - base.send :include, HTTParty::ModuleInheritableAttributes - base.send(:mattr_inheritable, :default_options) - base.instance_variable_set("@default_options", {}) - end - - module ClassMethods - # 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_options[:cookies] ||= CookieHash.new - default_options[: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) - raise UnsupportedFormat, "Must be one of: #{AllowedFormats.values.uniq.join(', ')}" unless AllowedFormats.value?(f) - default_options[:format] = f - 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 default_options #:nodoc: - @default_options - end - - private - def perform_request(http_method, path, options) #:nodoc: - process_cookies(options) - Request.new(http_method, path, default_options.dup.merge(options)).perform - end - - def process_cookies(options) #:nodoc: - return unless options[:cookies] || default_options[:cookies] - options[:headers] ||= {} - options[:headers]["cookie"] = cookies(options[:cookies] || {}).to_cookie_string - - default_options.delete(:cookies) - options.delete(:cookies) - 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 -end - -require 'httparty/cookie_hash' -require 'httparty/core_extensions' -require 'httparty/exceptions' -require 'httparty/request' -require 'httparty/response' diff --git a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/cookie_hash.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/cookie_hash.rb deleted file mode 100644 index cf18bd7..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/cookie_hash.rb +++ /dev/null @@ -1,9 +0,0 @@ -class HTTParty::CookieHash < Hash #:nodoc: - def add_cookies(hash) - merge!(hash) - end - - def to_cookie_string - collect { |k, v| "#{k}=#{v}" }.join("; ") - end -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/core_extensions.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/core_extensions.rb deleted file mode 100644 index ad10497..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/core_extensions.rb +++ /dev/null @@ -1,25 +0,0 @@ -class BlankSlate #:nodoc: - instance_methods.each { |m| undef_method m unless m =~ /^__/ } -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/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/exceptions.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/exceptions.rb deleted file mode 100644 index 423f989..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/exceptions.rb +++ /dev/null @@ -1,7 +0,0 @@ -module HTTParty - # Exception raised when you attempt to set a non-existant format - class UnsupportedFormat < StandardError; end - - # Exception that is raised when request has redirected too many times - class RedirectionTooDeep < StandardError; end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/module_inheritable_attributes.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/module_inheritable_attributes.rb deleted file mode 100644 index 0afe608..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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)) - end - end - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/request.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/request.rb deleted file mode 100644 index 12d023c..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/request.rb +++ /dev/null @@ -1,141 +0,0 @@ -require 'uri' - -module HTTParty - class Request #:nodoc: - SupportedHTTPMethods = [Net::HTTP::Get, Net::HTTP::Post, Net::HTTP::Put, Net::HTTP::Delete] - - 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 => {}, - }.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 - - new_uri - end - - def format - options[:format] - 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 = (uri.port == 443) - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - http - end - - def configure_basic_auth - @raw_request.basic_auth(options[:basic_auth][:username], options[:basic_auth][:password]) - end - - def setup_raw_request - @raw_request = http_method.new(uri.request_uri) - - if post? && options[:query] - @raw_request.set_form_data(options[:query]) - end - - @raw_request.body = options[:body].is_a?(Hash) ? options[:body].to_params : options[:body] unless options[:body].blank? - @raw_request.initialize_http_header options[:headers] - - configure_basic_auth if options[:basic_auth] - end - - def perform_actual_request - # require 'pp' - y @raw_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.blank? - - 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].blank? - query_string_parts << options[:query] unless options[:query].blank? - 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 - perform - else - parsed_response = parse_response(response.body) - Response.new(parsed_response, response.body, response.code, response.message, response.to_hash) - end - end - - def parse_response(body) - return nil if body.nil? or body.empty? - case format - when :xml - Crack::XML.parse(body) - when :json - Crack::JSON.parse(body) - when :yaml - YAML::load(body) - else - body - end - 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 AllowedFormats hash - def format_from_mimetype(mimetype) - return nil if mimetype.nil? - AllowedFormats.each { |k, v| return v if mimetype.include?(k) } - end - - def validate - raise HTTParty::RedirectionTooDeep, 'HTTP redirects too deep' if options[:limit].to_i <= 0 - raise ArgumentError, 'only get, post, put and delete 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/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/response.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/response.rb deleted file mode 100644 index 2670b51..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/response.rb +++ /dev/null @@ -1,18 +0,0 @@ -module HTTParty - class Response < BlankSlate #: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/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/version.rb b/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/version.rb deleted file mode 100644 index fefa37a..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/lib/httparty/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module HTTParty #:nodoc: - Version = '0.4.3' -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/setup.rb b/ruby/processing/star_field/library/httparty-0.4.3/setup.rb deleted file mode 100644 index 424a5f3..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/setup.rb +++ /dev/null @@ -1,1585 +0,0 @@ -# -# 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/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/delicious.xml b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/delicious.xml deleted file mode 100644 index f93a1ee..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/delicious.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/empty.xml b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/empty.xml deleted file mode 100644 index e69de29..0000000 diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/google.html b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/google.html deleted file mode 100644 index 1c4221d..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.json b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.json deleted file mode 100644 index 642dd01..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.xml b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/twitter.xml deleted file mode 100644 index 24abaa8..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/undefined_method_add_node_for_nil.xml b/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/undefined_method_add_node_for_nil.xml deleted file mode 100644 index 43d96a7..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/fixtures/undefined_method_add_node_for_nil.xml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/hash_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/hash_spec.rb deleted file mode 100644 index 4ad0e8d..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/hash_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.dirname(__FILE__) + '/spec_helper' - -describe Hash, "to_xml_attributes" do - before do - @hash = { :one => "ONE", "two" => "TWO" } - end - - it "should turn the hash into xml attributes" do - attrs = @hash.to_xml_attributes - attrs.should match(/one="ONE"/m) - attrs.should match(/two="TWO"/m) - end - - it '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 - - -describe Hash, '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| - it "should covert hash: #{hash.inspect} to params: #{params.inspect}" do - hash.to_params.split('&').sort.should == params.split('&').sort - end - end - - it '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 match(/&$/) - end - - it 'should URL encode unsafe characters' do - {:q => "?&\" +"}.to_params.should == "q=%3F%26%22%20%2B" - end - -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/cookie_hash_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/cookie_hash_spec.rb deleted file mode 100644 index f142217..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/cookie_hash_spec.rb +++ /dev/null @@ -1,38 +0,0 @@ -require File.join(File.dirname(__FILE__), '../spec_helper') - -describe HTTParty::CookieHash do - before(:each) do - @cookie_hash = HTTParty::CookieHash.new - end - - describe "#add_cookies" 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 - - # 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 - end -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/request_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/request_spec.rb deleted file mode 100644 index 02cab3f..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/request_spec.rb +++ /dev/null @@ -1,196 +0,0 @@ -require 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 "#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 "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 - 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 - 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 - 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/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/response_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/response_spec.rb deleted file mode 100644 index e3ede68..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty/response_spec.rb +++ /dev/null @@ -1,62 +0,0 @@ -require 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/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty_spec.rb deleted file mode 100644 index 07c042d..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/httparty_spec.rb +++ /dev/null @@ -1,283 +0,0 @@ -require File.join(File.dirname(__FILE__), 'spec_helper') - -describe HTTParty do - before(:each) do - @klass = Class.new - @klass.instance_eval { include HTTParty } - 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 - 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 - 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 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 "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, "Must be one of: json, plain, html, yaml, xml") - 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 - 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 "#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 == nil - end - end -end diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/spec.opts b/ruby/processing/star_field/library/httparty-0.4.3/spec/spec.opts deleted file mode 100644 index 7113a85..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/spec.opts +++ /dev/null @@ -1,3 +0,0 @@ ---format - progress ---colour diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/spec_helper.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/spec_helper.rb deleted file mode 100644 index 358b484..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/spec_helper.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'rubygems' -gem 'rspec' -require 'spec' -require File.join(File.dirname(__FILE__), '..', 'lib', 'httparty') - -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 \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/spec/string_spec.rb b/ruby/processing/star_field/library/httparty-0.4.3/spec/string_spec.rb deleted file mode 100644 index 54867a2..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/spec/string_spec.rb +++ /dev/null @@ -1,27 +0,0 @@ -describe String, "#snake_case" do - it "lowercases one word CamelCase" do - "Merb".snake_case.should == "merb" - end - - it "makes one underscore snake_case two word CamelCase" do - "MerbCore".snake_case.should == "merb_core" - end - - it "handles CamelCase with more than 2 words" do - "SoYouWantContributeToMerbCore".snake_case.should == "so_you_want_contribute_to_merb_core" - end - - it "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 - - it "does NOT change one word lowercase" do - "merb".snake_case.should == "merb" - end - - it "leaves snake_case as is" do - "merb_core".snake_case.should == "merb_core" - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/httparty-0.4.3/website/css/common.css b/ruby/processing/star_field/library/httparty-0.4.3/website/css/common.css deleted file mode 100644 index 61f38ac..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/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/ruby/processing/star_field/library/httparty-0.4.3/website/index.html b/ruby/processing/star_field/library/httparty-0.4.3/website/index.html deleted file mode 100644 index 79ce7b7..0000000 --- a/ruby/processing/star_field/library/httparty-0.4.3/website/index.html +++ /dev/null @@ -1,74 +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 Lightouse.

- - -
- - -
- - - \ No newline at end of file diff --git a/ruby/processing/star_field/library/mash-0.0.3/History.txt b/ruby/processing/star_field/library/mash-0.0.3/History.txt deleted file mode 100644 index b6530e2..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/History.txt +++ /dev/null @@ -1,18 +0,0 @@ -=== 0.0.3 / 2008-04-19 - -* [] no longer defaults to a new Mash, will return nil if -* Attribute-esque method names will yield the default value if not set -* Hash extended with #to_mash and #stringify_keys -* Added #dup and #deep_merge -* Aliased the default Hash methods so they are still accessible -* Cleaned up the recursive conversion process - -=== 0.0.2 / 2008-04-12 - -* Added bang(!) method support -* No longer automatically multi-level assigning -* Hash conversion now calls methods instead of []= to allow for overrides - -=== 0.0.1 / 2008-04-12 - -* Initial release \ No newline at end of file diff --git a/ruby/processing/star_field/library/mash-0.0.3/Manifest.txt b/ruby/processing/star_field/library/mash-0.0.3/Manifest.txt deleted file mode 100644 index fc58b19..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/Manifest.txt +++ /dev/null @@ -1,7 +0,0 @@ -History.txt -Manifest.txt -README.txt -Rakefile -lib/mash.rb -spec/mash_spec.rb -spec/spec_helper.rb \ No newline at end of file diff --git a/ruby/processing/star_field/library/mash-0.0.3/README.txt b/ruby/processing/star_field/library/mash-0.0.3/README.txt deleted file mode 100644 index aabbe34..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/README.txt +++ /dev/null @@ -1,58 +0,0 @@ -= Mash (Mocking Hash) - -http://github.com/mbleigh/mash - -== DESCRIPTION: - -Mash is an extended Hash that gives simple pseudo-object functionality -that can be built from hashes and easily extended. It is designed to -be used in RESTful API libraries to provide easy object-like access -to JSON and XML parsed hashes. - -== SYNOPSIS: - - mash = Mash.new - mash.name? # => false - mash.name # => nil - mash.name = "My Mash" - mash.name # => "My Mash" - mash.name? # => true - mash.inspect # => - - mash = Mash.new - # use bang methods for multi-level assignment - mash.author!.name = "Michael Bleigh" - mash.author # => - -== INSTALL: - -RubyGem: - - sudo gem install mash - -Git: - - git clone git://github.com/mbleigh/mash.git - -== LICENSE: - -Copyright (c) 2008 Michael Bleigh - -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/ruby/processing/star_field/library/mash-0.0.3/Rakefile b/ruby/processing/star_field/library/mash-0.0.3/Rakefile deleted file mode 100644 index 8bfe545..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/Rakefile +++ /dev/null @@ -1,18 +0,0 @@ -# -*- ruby -*- - -require 'rubygems' -require 'hoe' -require './lib/mash.rb' -require 'spec/rake/spectask' - -Hoe.new('mash', Mash::VERSION) do |p| - p.rubyforge_name = 'mash-hash' # if different than lowercase project name - p.developer('Michael Bleigh', 'michael@intridea.com') - p.remote_rdoc_dir = '' -end - -desc "Run specs." -Spec::Rake::SpecTask.new("spec") do |t| - t.spec_files = "spec/*_spec.rb" -end -# vim: syntax=Ruby diff --git a/ruby/processing/star_field/library/mash-0.0.3/lib/mash.rb b/ruby/processing/star_field/library/mash-0.0.3/lib/mash.rb deleted file mode 100644 index 84ba524..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/lib/mash.rb +++ /dev/null @@ -1,226 +0,0 @@ -# Mash allows you to create pseudo-objects that have method-like -# accessors for hash keys. This is useful for such implementations -# as an API-accessing library that wants to fake robust objects -# without the overhead of actually doing so. Think of it as OpenStruct -# with some additional goodies. -# -# A Mash will look at the methods you pass it and perform operations -# based on the following rules: -# -# * No punctuation: Returns the value of the hash for that key, or nil if none exists. -# * Assignment (=): Sets the attribute of the given method name. -# * Existence (?): Returns true or false depending on whether that key has been set. -# * Bang (!): Forces the existence of this key, used for deep Mashes. Think of it as "touch" for mashes. -# -# == Basic Example -# -# mash = Mash.new -# mash.name? # => false -# mash.name = "Bob" -# mash.name # => "Bob" -# mash.name? # => true -# -# == Hash Conversion Example -# -# hash = {:a => {:b => 23, :d => {:e => "abc"}}, :f => [{:g => 44, :h => 29}, 12]} -# mash = Mash.new(hash) -# mash.a.b # => 23 -# mash.a.d.e # => "abc" -# mash.f.first.g # => 44 -# mash.f.last # => 12 -# -# == Bang Example -# -# mash = Mash.new -# mash.author # => nil -# mash.author! # => -# -# mash = Mash.new -# mash.author!.name = "Michael Bleigh" -# mash.author # => -# -class Mash < Hash - VERSION = '0.0.3' - - # If you pass in an existing hash, it will - # convert it to a Mash including recursively - # descending into arrays and hashes, converting - # them as well. - def initialize(source_hash = nil) - deep_update(source_hash) if source_hash - super(nil) - end - - def id #:nodoc: - self["id"] ? self["id"] : super - end - - # Borrowed from Merb's Mash object. - # - # ==== Parameters - # key:: The default value for the mash. Defaults to nil. - # - # ==== Alternatives - # If key is a Symbol and it is a key in the mash, then the default value will - # be set to the value matching the key. - def default(key = nil) - if key.is_a?(Symbol) && key?(key) - self[key] - else - super - end - end - - alias_method :regular_reader, :[] - alias_method :regular_writer, :[]= - - # Retrieves an attribute set in the Mash. Will convert - # any key passed in to a string before retrieving. - def [](key) - key = convert_key(key) - regular_reader(key) - end - - # Sets an attribute in the Mash. Key will be converted to - # a string before it is set. - def []=(key,value) #:nodoc: - key = convert_key(key) - regular_writer(key,convert_value(value)) - end - - # This is the bang method reader, it will return a new Mash - # if there isn't a value already assigned to the key requested. - def initializing_reader(key) - return self[key] if key?(key) - self[key] = Mash.new - end - - # Duplicates the current mash as a new mash. - def dup - Mash.new(self) - end - - alias_method :regular_inspect, :inspect - - alias_method :picky_key?, :key? - def key?(key) - picky_key?(convert_key(key)) - end - - # Prints out a pretty object-like string of the - # defined attributes. - def inspect - ret = "<#{self.class.to_s}" - keys.sort.each do |key| - ret << " #{key}=#{self[key].inspect}" - end - ret << ">" - ret - end - alias_method :to_s, :inspect - - # Performs a deep_update on a duplicate of the - # current mash. - def deep_merge(other_hash) - dup.deep_merge!(other_hash) - end - - # Recursively merges this mash with the passed - # in hash, merging each hash in the hierarchy. - def deep_update(other_hash) - stringified_hash = other_hash.stringify_keys - stringified_hash.each_pair do |k,v| - k = convert_key(k) - self[k] = self[k].to_mash if self[k].is_a?(Hash) unless self[k].is_a?(Mash) - if self[k].is_a?(Hash) && stringified_hash[k].is_a?(Hash) - self[k].deep_merge!(stringified_hash[k]) - else - self.send(k + "=", convert_value(stringified_hash[k])) - end - end - end - alias_method :deep_merge!, :deep_update - - # ==== Parameters - # other_hash:: - # A hash to update values in the mash with. Keys will be - # stringified and Hashes will be converted to Mashes. - # - # ==== Returns - # Mash:: The updated mash. - def update(other_hash) - other_hash.each_pair do |key, value| - if respond_to?(convert_key(key) + "=") - self.send(convert_key(key) + "=", convert_value(value)) - else - regular_writer(convert_key(key), convert_value(value)) - end - end - self - end - alias_method :merge!, :update - - # Converts a mash back to a hash (with stringified keys) - def to_hash - Hash.new(default).merge(self) - end - - def method_missing(method_name, *args) #:nodoc: - if (match = method_name.to_s.match(/(.*)=$/)) && args.size == 1 - self[match[1]] = args.first - elsif (match = method_name.to_s.match(/(.*)\?$/)) && args.size == 0 - key?(match[1]) - elsif (match = method_name.to_s.match(/(.*)!$/)) && args.size == 0 - initializing_reader(match[1]) - elsif key?(method_name) - self[method_name] - elsif match = method_name.to_s.match(/^([a-z][a-z0-9A-Z_]+)$/) - default - else - super - end - end - - protected - - def convert_key(key) #:nodoc: - key.to_s - end - - def convert_value(value) #:nodoc: - case value - when Hash - value.is_a?(Mash) ? value : value.to_mash - when Array - value.collect{ |e| convert_value(e) } - else - value - end - end -end - -class Hash - # Returns a new Mash initialized from this Hash. - def to_mash - mash = Mash.new(self) - mash.default = default - mash - end - - # Returns a duplicate of the current hash with - # all of the keys converted to strings. - def stringify_keys - dup.stringify_keys! - end - - # Converts all of the keys to strings - def stringify_keys! - keys.each{|k| - v = delete(k) - self[k.to_s] = v - v.stringify_keys! if v.is_a?(Hash) - v.each{|p| p.stringify_keys! if p.is_a?(Hash)} if v.is_a?(Array) - } - self - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/mash-0.0.3/spec/mash_spec.rb b/ruby/processing/star_field/library/mash-0.0.3/spec/mash_spec.rb deleted file mode 100644 index 2fa26f7..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/spec/mash_spec.rb +++ /dev/null @@ -1,114 +0,0 @@ -require File.join(File.dirname(__FILE__),"..","lib","mash") -require File.join(File.dirname(__FILE__),"spec_helper") - -describe Mash do - before(:each) do - @mash = Mash.new - end - - it "should inherit from hash" do - @mash.is_a?(Hash).should be_true - end - - it "should be able to set hash values through method= calls" do - @mash.test = "abc" - @mash["test"].should == "abc" - end - - it "should be able to retrieve set values through method calls" do - @mash["test"] = "abc" - @mash.test.should == "abc" - end - - it "should test for already set values when passed a ? method" do - @mash.test?.should be_false - @mash.test = "abc" - @mash.test?.should be_true - end - - it "should make all [] and []= into strings for consistency" do - @mash["abc"] = 123 - @mash.key?('abc').should be_true - @mash["abc"].should == 123 - end - - it "should have a to_s that is identical to its inspect" do - @mash.abc = 123 - @mash.to_s.should == @mash.inspect - end - - it "should return nil instead of raising an error for attribute-esque method calls" do - @mash.abc.should be_nil - end - - it "should return a Mash when passed a bang method to a non-existenct key" do - @mash.abc!.is_a?(Mash).should be_true - end - - it "should return the existing value when passed a bang method for an existing key" do - @mash.name = "Bob" - @mash.name!.should == "Bob" - end - - it "#initializing_reader should return a Mash when passed a non-existent key" do - @mash.initializing_reader(:abc).is_a?(Mash).should be_true - end - - it "should allow for multi-level assignment through bang methods" do - @mash.author!.name = "Michael Bleigh" - @mash.author.should == Mash.new(:name => "Michael Bleigh") - @mash.author!.website!.url = "http://www.mbleigh.com/" - @mash.author.website.should == Mash.new(:url => "http://www.mbleigh.com/") - end - - it "#deep_update should recursively mash mashes and hashes together" do - @mash.first_name = "Michael" - @mash.last_name = "Bleigh" - @mash.details = {:email => "michael@asf.com"}.to_mash - @mash.deep_update({:details => {:email => "michael@intridea.com"}}) - @mash.details.email.should == "michael@intridea.com" - end - - context "#initialize" do - it "should convert an existing hash to a Mash" do - converted = Mash.new({:abc => 123, :name => "Bob"}) - converted.abc.should == 123 - converted.name.should == "Bob" - end - - it "should convert hashes recursively into mashes" do - converted = Mash.new({:a => {:b => 1, :c => {:d => 23}}}) - converted.a.is_a?(Mash).should be_true - converted.a.b.should == 1 - converted.a.c.d.should == 23 - end - - it "should convert hashes in arrays into mashes" do - converted = Mash.new({:a => [{:b => 12}, 23]}) - converted.a.first.b.should == 12 - converted.a.last.should == 23 - end - end -end - -describe Hash do - it "should be convertible to a Mash" do - mash = {:some => "hash"}.to_mash - mash.is_a?(Mash).should be_true - mash.some.should == "hash" - end - - it "#stringify_keys! should turn all keys into strings" do - hash = {:a => "hey", 123 => "bob"} - hash.stringify_keys! - hash.should == {"a" => "hey", "123" => "bob"} - end - - it "#stringify_keys should return a hash with stringified keys" do - hash = {:a => "hey", 123 => "bob"} - stringified_hash = hash.stringify_keys - hash.should == {:a => "hey", 123 => "bob"} - stringified_hash.should == {"a" => "hey", "123" => "bob"} - end - -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/mash-0.0.3/spec/spec_helper.rb b/ruby/processing/star_field/library/mash-0.0.3/spec/spec_helper.rb deleted file mode 100644 index 755a5f7..0000000 --- a/ruby/processing/star_field/library/mash-0.0.3/spec/spec_helper.rb +++ /dev/null @@ -1 +0,0 @@ -require File.join(File.dirname(__FILE__),"..","lib","mash") \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/History.txt b/ruby/processing/star_field/library/oauth-0.3.2/History.txt deleted file mode 100644 index b8b9561..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/History.txt +++ /dev/null @@ -1,66 +0,0 @@ -== 0.3.2 2009-03-23 - -* 2xx statuses should be treated as success (Anders Conbere) -* Support applications using the MethodOverride Rack middleware (László Bácsi) -* `authorize` command for `oauth` CLI (Seth) -* Initial support for Problem Reporting extension (Seth) -* Verify SSL certificates if CA certificates are available (Seth) -* Fixed ActionController parameter escaping behavior (Thiago Arrais, László - Bácsi, Brett Gibson, et al) -* Fixed signature calculation when both options and a block were provided to - OAuth::Signature::Base#initialize (Seth) -* Added help to the 'oauth' CLI (Seth) -* Fixed a problem when attempting to normalize MockRequest URIs (Seth) - -== 0.3.1 2009-1-26 - -* Fixed a problem with relative and absolute token request paths. (Michael - Wood) - -== 0.3.0 2009-1-25 - -* Support ActionController::Request from Edge Rails (László Bácsi) -* Correctly handle multi-valued parameters (Seth) -* Added #normalized_parameters to OAuth::RequestProxy::Base (Pelle) -* OAuth::Signature.sign and friends now yield the RequestProxy instead of the - token when the passed block's arity is 1. (Seth) -* Token requests are made to the configured URL rather than generating a - potentially incorrect one. (Kellan Elliott-McCrea) -* Command-line app for generating signatures. (Seth) -* Improved test-cases and compatibility for encoding issues. (Pelle) - -== 0.2.7 2008-9-10 The lets fix the last release release - -* Fixed plain text signatures (Andrew Arrow) -* Fixed RSA requests using OAuthTokens. (Philip Lipu Tsai) - -== 0.2.6 2008-9-9 The lets RSA release - -* Improved support for Ruby 1.8.7 (Bill Kocik) -* Fixed RSA verification to support RSA providers - now using Ruby and RSA -* Improved RSA testing -* Omit token when signing with RSA -* Added support for 'private_key_file' option for RSA signatures (Chris Mear) -* Fixed several edge cases where params were being incorrectly signed (Scott - Hill) -* Fixed RSA signing (choonkeat) - -== 0.2.2 2008-2-22 Lets actually support SSL release - -* Use HTTPS when required. - -== 0.2 2008-1-19 All together now release - -This is a big release, where we have merged the efforts of various parties into one common library. This means there are definitely some API changes you should be aware of. They should be minimal but please have a look at the unit tests. - -== 0.1.2 2007-12-1 - -* Fixed checks for missing OAuth params to improve performance -* Includes Pat's fix for getting the realm out. - -== 0.1.1 2007-11-26 - -* First release as a GEM -* Moved all non-Rails functionality from the Rails plugin: - http://code.google.com/p/oauth-plugin/ diff --git a/ruby/processing/star_field/library/oauth-0.3.2/License.txt b/ruby/processing/star_field/library/oauth-0.3.2/License.txt deleted file mode 100644 index c06cf4d..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/License.txt +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (c) 2007 Blaine Cook, Larry Halff, Pelle Braendgaard - -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/ruby/processing/star_field/library/oauth-0.3.2/Manifest.txt b/ruby/processing/star_field/library/oauth-0.3.2/Manifest.txt deleted file mode 100644 index bf4ecdf..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/Manifest.txt +++ /dev/null @@ -1,83 +0,0 @@ -History.txt -License.txt -Manifest.txt -README.rdoc -Rakefile -TODO -bin/oauth -examples/yql.rb -lib/oauth.rb -lib/oauth/oauth.rb -lib/oauth/cli.rb -lib/oauth/client.rb -lib/oauth/client/action_controller_request.rb -lib/oauth/client/helper.rb -lib/oauth/client/net_http.rb -lib/oauth/consumer.rb -lib/oauth/errors.rb -lib/oauth/errors/error.rb -lib/oauth/errors/problem.rb -lib/oauth/errors/unauthorized.rb -lib/oauth/helper.rb -lib/oauth/oauth_test_helper.rb -lib/oauth/request_proxy.rb -lib/oauth/request_proxy/action_controller_request.rb -lib/oauth/request_proxy/base.rb -lib/oauth/request_proxy/jabber_request.rb -lib/oauth/request_proxy/mock_request.rb -lib/oauth/request_proxy/net_http.rb -lib/oauth/request_proxy/rack_request.rb -lib/oauth/server.rb -lib/oauth/signature.rb -lib/oauth/signature/base.rb -lib/oauth/signature/hmac/base.rb -lib/oauth/signature/hmac/md5.rb -lib/oauth/signature/hmac/rmd160.rb -lib/oauth/signature/hmac/sha1.rb -lib/oauth/signature/hmac/sha2.rb -lib/oauth/signature/md5.rb -lib/oauth/signature/plaintext.rb -lib/oauth/signature/rsa/sha1.rb -lib/oauth/signature/sha1.rb -lib/oauth/token.rb -lib/oauth/tokens/access_token.rb -lib/oauth/tokens/consumer_token.rb -lib/oauth/tokens/request_token.rb -lib/oauth/tokens/server_token.rb -lib/oauth/tokens/token.rb -lib/oauth/version.rb -oauth.gemspec -script/destroy -script/generate -script/txt2html -setup.rb -tasks/deployment.rake -tasks/environment.rake -tasks/website.rake -test/cases/oauth_case.rb -test/cases/spec/1_0-final/test_construct_request_url.rb -test/cases/spec/1_0-final/test_normalize_request_parameters.rb -test/cases/spec/1_0-final/test_parameter_encodings.rb -test/cases/spec/1_0-final/test_signature_base_strings.rb -test/keys/rsa.cert -test/keys/rsa.pem -test/test_access_token.rb -test/test_action_controller_request_proxy.rb -test/test_consumer.rb -test/test_helper.rb -test/test_hmac_sha1.rb -test/test_net_http_client.rb -test/test_net_http_request_proxy.rb -test/test_rack_request_proxy.rb -test/test_request_token.rb -test/test_rsa_sha1.rb -test/test_server.rb -test/test_signature.rb -test/test_signature_base.rb -test/test_signature_plain_text.rb -test/test_token.rb -website/index.html -website/index.txt -website/javascripts/rounded_corners_lite.inc.js -website/stylesheets/screen.css -website/template.rhtml diff --git a/ruby/processing/star_field/library/oauth-0.3.2/README.rdoc b/ruby/processing/star_field/library/oauth-0.3.2/README.rdoc deleted file mode 100644 index 7f86a06..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/README.rdoc +++ /dev/null @@ -1,71 +0,0 @@ -= Ruby OAuth GEM - -== What - -This is a RubyGem for implementing both OAuth clients and servers in Ruby applications. - -See the OAuth specs http://oauth.net/core/1.0/ - -== Installing - - sudo gem install oauth - -You can also install it from the oauth rubyforge project http://rubyforge.org/projects/oauth/. - -The source code is now hosted on the OAuth GitHub Project http://github.com/pelle/oauth/tree/master - -== The basics - -This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin. - -As a matter of fact it has been pulled out from an OAuth Rails Plugin http://code.google.com/p/oauth-plugin/ which now requires this GEM. - -== Demonstration of usage - -Create a new consumer instance by passing it a configuration hash: - - @consumer = OAuth::Consumer.new("key","secret", :site => "https://agree2") - -Start the process by requesting a token - - @request_token = @consumer.get_request_token - session[:request_token] = @request_token - redirect_to @request_token.authorize_url - -When user returns create an access_token - - @access_token = @request_token.get_access_token - @photos = @access_token.get('/photos.xml') - -For more detailed instructions I have written this OAuth Client Tutorial http://stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby and "How to turn your rails site into an OAuth Provider ":http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider . - -Finally be sure to check out the OAuth RDoc Manual http://oauth.rubyforge.org/rdoc/ . - -== Documentation Wiki - -There is some documentation on the Google Code project for the "OAuth Rails Plugin":http://code.google.com/p/oauth-plugin/ : - -* RequestToken http://code.google.com/p/oauth-plugin/wiki/RequestToken -* AccessToken http://code.google.com/p/oauth-plugin/wiki/AccessToken - -== Forum - -http://groups.google.com/group/oauth-ruby - - -== How to submit patches - -Read the "8 steps for fixing other people's code" http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/. - -The source code is now hosted on the OAuth GitHub Project http://github.com/pelle/oauth/tree/master - -To submit a patch, please fork the oauth project and create a patch with tests. Once you're happy with it send a pull request and post a message to the google group. - -== License - -This code is free to use under the terms of the MIT license. - -== Contact - -Comments are welcome. Send an email to "Pelle Braendgaard" pelleb@gmail.com email via the OAuth Ruby mailing list http://groups.google.com/group/oauth-ruby - diff --git a/ruby/processing/star_field/library/oauth-0.3.2/Rakefile b/ruby/processing/star_field/library/oauth-0.3.2/Rakefile deleted file mode 100644 index 92c33c5..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/Rakefile +++ /dev/null @@ -1,36 +0,0 @@ -%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f } -$LOAD_PATH << File.dirname(__FILE__) + '/lib' -require 'oauth' -require 'oauth/version' - -# Generate all the Rake tasks -# Run 'rake -T' to see list of generated tasks (from gem root directory) -$hoe = Hoe.new('oauth', OAuth::VERSION) do |p| - p.author = ['Pelle Braendgaard','Blaine Cook','Larry Halff','Jesse Clark','Jon Crosby', 'Seth Fitzsimmons'] - p.email = "pelleb@gmail.com" - p.description = "OAuth Core Ruby implementation" - p.summary = p.description - p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n") - p.rubyforge_name = p.name # TODO this is default value - p.url = "http://oauth.rubyforge.org" - - p.extra_deps = [ - ['ruby-hmac','>= 0.3.1'] - ] - p.extra_dev_deps = [ - ['newgem', ">= #{::Newgem::VERSION}"], - ['actionpack'], - ['rack'] - ] - - p.clean_globs |= %w[**/.DS_Store tmp *.log **/.*.sw? *.gem .config **/.DS_Store] - path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}" - p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc') - p.rsync_args = '-av --delete --ignore-errors' -end - -require 'newgem/tasks' # load /tasks/*.rake -Dir['tasks/**/*.rake'].each { |t| load t } - -# TODO - want other tests/tasks run by default? Add them to the list -# task :default => [:spec, :features] diff --git a/ruby/processing/star_field/library/oauth-0.3.2/TODO b/ruby/processing/star_field/library/oauth-0.3.2/TODO deleted file mode 100644 index f131892..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/TODO +++ /dev/null @@ -1,32 +0,0 @@ -Common use-cases should be streamlined: - -* I have a URL that I want to sign (given consumer key/secret, optional - token/secret, optional nonce/timestamp). -* I have a URL that I want to sign AND I want to see what the components - (e.g. signature base string, etc.) are while it's being signed (i.e. verbose - signing). -* I have a URL that I want to sign and I only want the signature. -* I have a URL that I want to sign and I want something suitable to put in - {the header, the querystring, XMPP}. -* I want to make a query to an OAuth-enabled web service (with sensible - errors, if available). -* I want to host an OAuth-enabled web service. -* I want to test my OAuth-enabled web service (i.e. test helpers) - -Example applications for: -* Ning -* Fire Eagle -* Google (blogger, contacts) -* Twitter -* YOS / YQL -* Netflix - -In addition to providing best practices of use, these can also be part of -the pre-release checks to make sure that there have been no regressions. - -Random TODOs: -* finish CLI -* sensible Exception hierarchy -* User Agent -* Tokens as Modules -* don't tie to Net::HTTP diff --git a/ruby/processing/star_field/library/oauth-0.3.2/bin/oauth b/ruby/processing/star_field/library/oauth-0.3.2/bin/oauth deleted file mode 100755 index 45ee16f..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/bin/oauth +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env ruby - -require "oauth/cli" - -OAuth::CLI.execute(STDOUT, STDIN, STDERR, ARGV) diff --git a/ruby/processing/star_field/library/oauth-0.3.2/examples/yql.rb b/ruby/processing/star_field/library/oauth-0.3.2/examples/yql.rb deleted file mode 100755 index ff63ae4..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/examples/yql.rb +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env ruby -rubygems - -# Sample queries: -# ./yql.rb --consumer-key --consumer-secret "show tables" -# ./yql.rb --consumer-key --consumer-secret "select * from flickr.photos.search where text='Cat' limit 10" - -require 'oauth' -require 'optparse' -require 'json' -require 'pp' - -options = {} - -option_parser = OptionParser.new do |opts| - opts.banner = "Usage: #{$0} [options] " - - opts.on("--consumer-key KEY", "Specifies the consumer key to use.") do |v| - options[:consumer_key] = v - end - - opts.on("--consumer-secret SECRET", "Specifies the consumer secret to use.") do |v| - options[:consumer_secret] = v - end -end - -option_parser.parse! -query = ARGV.pop -query = STDIN.read if query == "-" - -if options[:consumer_key].nil? || options[:consumer_secret].nil? || query.nil? - puts option_parser.help - exit 1 -end - -consumer = OAuth::Consumer.new \ - options[:consumer_key], - options[:consumer_secret], - :site => "http://query.yahooapis.com" - -access_token = OAuth::AccessToken.new(consumer) - -response = access_token.request(:get, url = "/v1/yql?q=#{OAuth::Helper.escape(query)}&format=json") -rsp = JSON.parse(response.body) -pp rsp diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth.rb deleted file mode 100644 index f2aa996..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth.rb +++ /dev/null @@ -1,4 +0,0 @@ -require 'oauth/oauth' -require 'oauth/client/helper' -require 'oauth/signature/hmac/sha1' -require 'oauth/request_proxy/mock_request' diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/cli.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/cli.rb deleted file mode 100644 index c1c5791..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/cli.rb +++ /dev/null @@ -1,300 +0,0 @@ -require 'optparse' -require 'oauth' - -module OAuth - class CLI - SUPPORTED_COMMANDS = { - "authorize" => "Obtain an access token and secret for a user", - "debug" => "Verbosely generate an OAuth signature", - "sign" => "Generate an OAuth signature" - } - - attr_reader :command - attr_reader :options - attr_reader :stdout, :stdin - - def self.execute(stdout, stdin, stderr, arguments = []) - self.new.execute(stdout, stdin, stderr, arguments) - end - - def initialize - @options = {} - - # don't dump a backtrace on a ^C - trap(:INT) { - exit - } - end - - def execute(stdout, stdin, stderr, arguments = []) - @stdout = stdout - @stdin = stdin - @stderr = stderr - extract_command_and_parse_options(arguments) - - if sufficient_options? && valid_command? - if command == "debug" - @command = "sign" - @options[:verbose] = true - end - - case command - # TODO move command logic elsewhere - when "authorize" - # Y! token authority requires realm=yahoo.com when headers are in use - # TODO remove :scheme when that's been fixed - # TODO determine endpoints w/ X-RDS-Simple - consumer = OAuth::Consumer.new \ - options[:oauth_consumer_key], - options[:oauth_consumer_secret], - :access_token_url => options[:access_token_url], - :authorize_url => options[:authorize_url], - :request_token_url => options[:request_token_url], - :scheme => :query_string - - # get a request token - request_token = consumer.get_request_token - - stdout.puts "Please visit this url to authorize:" - stdout.puts request_token.authorize_url - - stdout.puts "Press return to continue..." - stdin.gets - - begin - # get an access token - access_token = request_token.get_access_token - - stdout.puts "Response:" - access_token.params.each do |k,v| - stdout.puts " #{k}: #{v}" - end - rescue OAuth::Unauthorized => e - stderr.puts "A problem occurred while attempting to obtain an access token:" - stderr.puts e - end - when "sign" - parameters = prepare_parameters - - request = OAuth::RequestProxy.proxy \ - "method" => options[:method], - "uri" => options[:uri], - "parameters" => parameters - - if verbose? - stdout.puts "OAuth parameters:" - request.oauth_parameters.each do |k,v| - stdout.puts " " + [k, v] * ": " - end - stdout.puts - - if request.non_oauth_parameters.any? - stdout.puts "Parameters:" - request.non_oauth_parameters.each do |k,v| - stdout.puts " " + [k, v] * ": " - end - stdout.puts - end - end - - request.sign! \ - :consumer_secret => options[:oauth_consumer_secret], - :token_secret => options[:oauth_token_secret] - - if verbose? - stdout.puts "Method: #{request.method}" - stdout.puts "URI: #{request.uri}" - stdout.puts "Normalized params: #{request.normalized_parameters}" unless options[:xmpp] - stdout.puts "Signature base string: #{request.signature_base_string}" - - if options[:xmpp] - stdout.puts - stdout.puts "XMPP Stanza:" - stdout.puts <<-EOS - - #{request.oauth_consumer_key} - #{request.oauth_token} - #{request.oauth_signature_method} - #{request.oauth_signature} - #{request.oauth_timestamp} - #{request.oauth_nonce} - #{request.oauth_version} - - EOS - stdout.puts - stdout.puts "Note: You may want to use bare JIDs in your URI." - stdout.puts - else - stdout.puts "OAuth Request URI: #{request.signed_uri}" - stdout.puts "Request URI: #{request.signed_uri(false)}" - stdout.puts "Authorization header: #{request.oauth_header(:realm => options[:realm])}" - end - stdout.puts "Signature: #{request.oauth_signature}" - stdout.puts "Escaped signature: #{OAuth::Helper.escape(request.oauth_signature)}" - else - stdout.puts request.oauth_signature - end - end - else - usage - end - end - - protected - - def extract_command_and_parse_options(arguments) - @command = arguments[-1] - parse_options(arguments[0..-1]) - end - - def option_parser - option_parser = OptionParser.new do |opts| - opts.banner = "Usage: #{$0} [options] " - - # defaults - options[:oauth_nonce] = OAuth::Helper.generate_key - options[:oauth_signature_method] = "HMAC-SHA1" - options[:oauth_timestamp] = OAuth::Helper.generate_timestamp - options[:oauth_version] = "1.0" - options[:params] = [] - - ## Common Options - - opts.on("--consumer-key KEY", "Specifies the consumer key to use.") do |v| - options[:oauth_consumer_key] = v - end - - opts.on("--consumer-secret SECRET", "Specifies the consumer secret to use.") do |v| - options[:oauth_consumer_secret] = v - end - - ## Options for signing - - opts.on("--method METHOD", "Specifies the method (e.g. GET) to use when signing.") do |v| - options[:method] = v - end - - opts.on("--nonce NONCE", "Specifies the none to use.") do |v| - options[:oauth_nonce] = v - end - - opts.on("--parameters PARAMS", "Specifies the parameters to use when signing.") do |v| - options[:params] << v - end - - opts.on("--signature-method METHOD", "Specifies the signature method to use; defaults to HMAC-SHA1.") do |v| - options[:oauth_signature_method] = v - end - - opts.on("--secret SECRET", "Specifies the token secret to use.") do |v| - options[:oauth_token_secret] = v - end - - opts.on("--timestamp TIMESTAMP", "Specifies the timestamp to use.") do |v| - options[:oauth_timestamp] = v - end - - opts.on("--token TOKEN", "Specifies the token to use.") do |v| - options[:oauth_token] = v - end - - opts.on("--realm REALM", "Specifies the realm to use.") do |v| - options[:realm] = v - end - - opts.on("--uri URI", "Specifies the URI to use when signing.") do |v| - options[:uri] = v - end - - opts.on("--version VERSION", "Specifies the OAuth version to use.") do |v| - options[:oauth_version] = v - end - - opts.on("--no-version", "Omit oauth_version.") do - options[:oauth_version] = nil - end - - opts.on("--xmpp", "Generate XMPP stanzas.") do - options[:xmpp] = true - options[:method] ||= "iq" - end - - opts.on("-v", "--verbose", "Be verbose.") do - options[:verbose] = true - end - - ## Options for authorization - - opts.on("--access-token-url URL", "Specifies the access token URL.") do |v| - options[:access_token_url] = v - end - - opts.on("--authorize-url URL", "Specifies the authorization URL.") do |v| - options[:authorize_url] = v - end - - opts.on("--request-token-url URL", "Specifies the request token URL.") do |v| - options[:request_token_url] = v - end - end - end - - def parse_options(arguments) - option_parser.parse!(arguments) - end - - def prepare_parameters - escaped_pairs = options[:params].collect do |pair| - if pair =~ /:/ - Hash[*pair.split(":", 2)].collect do |k,v| - [CGI.escape(k.strip), CGI.escape(v.strip)] * "=" - end - else - pair - end - end - - querystring = escaped_pairs * "&" - cli_params = CGI.parse(querystring) - - { - "oauth_consumer_key" => options[:oauth_consumer_key], - "oauth_nonce" => options[:oauth_nonce], - "oauth_timestamp" => options[:oauth_timestamp], - "oauth_token" => options[:oauth_token], - "oauth_signature_method" => options[:oauth_signature_method], - "oauth_version" => options[:oauth_version] - }.reject { |k,v| v.nil? || v == "" }.merge(cli_params) - end - - def sufficient_options? - case command - # TODO move command logic elsewhere - when "authorize" - options[:oauth_consumer_key] && options[:oauth_consumer_secret] && - options[:access_token_url] && options[:authorize_url] && - options[:request_token_url] - else - options[:oauth_consumer_key] && options[:oauth_consumer_secret] && - options[:method] && options[:uri] - end - end - - def usage - stdout.puts option_parser.help - stdout.puts - stdout.puts "Available commands:" - SUPPORTED_COMMANDS.each do |command, desc| - puts " #{command.ljust(15)}#{desc}" - end - end - - def valid_command? - SUPPORTED_COMMANDS.keys.include?(command) - end - - def verbose? - options[:verbose] - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client.rb deleted file mode 100644 index 0367d8b..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client.rb +++ /dev/null @@ -1,4 +0,0 @@ -module OAuth - module Client - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/action_controller_request.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/action_controller_request.rb deleted file mode 100644 index b73031e..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/action_controller_request.rb +++ /dev/null @@ -1,53 +0,0 @@ -require 'oauth/client/helper' -require 'oauth/request_proxy/action_controller_request' -require 'action_controller/test_process' - -module ActionController - class Base - def process_with_oauth(request, response=nil) - request.apply_oauth! - process_without_oauth(request, response) - end - - alias_method_chain :process, :oauth - end - - class TestRequest - def self.use_oauth=(bool) - @use_oauth = bool - end - - def self.use_oauth? - @use_oauth - end - - def configure_oauth(consumer = nil, token = nil, options = {}) - @oauth_options = { :consumer => consumer, - :token => token, - :scheme => 'header', - :signature_method => nil, - :nonce => nil, - :timestamp => nil }.merge(options) - end - - def apply_oauth! - return unless ActionController::TestRequest.use_oauth? && @oauth_options - - @oauth_helper = OAuth::Client::Helper.new(self, @oauth_options.merge(:request_uri => request_uri)) - - self.send("set_oauth_#{@oauth_options[:scheme]}") - end - - def set_oauth_header - env['Authorization'] = @oauth_helper.header - end - - def set_oauth_parameters - @query_parameters = @oauth_helper.parameters_with_oauth - @query_parameters.merge!(:oauth_signature => @oauth_helper.signature) - end - - def set_oauth_query_string - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/helper.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/helper.rb deleted file mode 100644 index 5e7da9e..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/helper.rb +++ /dev/null @@ -1,71 +0,0 @@ -require 'oauth/client' -require 'oauth/consumer' -require 'oauth/helper' -require 'oauth/token' -require 'oauth/signature/hmac/sha1' - -module OAuth::Client - class Helper - include OAuth::Helper - - def initialize(request, options = {}) - @request = request - @options = options - @options[:signature_method] ||= 'HMAC-SHA1' - end - - def options - @options - end - - def nonce - options[:nonce] ||= generate_key - end - - def timestamp - options[:timestamp] ||= generate_timestamp - end - - def oauth_parameters - { - 'oauth_consumer_key' => options[:consumer].key, - 'oauth_token' => options[:token] ? options[:token].token : '', - 'oauth_signature_method' => options[:signature_method], - 'oauth_timestamp' => timestamp, - 'oauth_nonce' => nonce, - 'oauth_version' => '1.0' - }.reject { |k,v| v.to_s == "" } - end - - def signature(extra_options = {}) - OAuth::Signature.sign(@request, { :uri => options[:request_uri], - :consumer => options[:consumer], - :token => options[:token] }.merge(extra_options) ) - end - - def signature_base_string(extra_options = {}) - OAuth::Signature.signature_base_string(@request, { :uri => options[:request_uri], - :consumer => options[:consumer], - :token => options[:token], - :parameters => oauth_parameters}.merge(extra_options) ) - end - - def header - parameters = oauth_parameters - parameters.merge!('oauth_signature' => signature(options.merge(:parameters => parameters))) - - header_params_str = parameters.map { |k,v| "#{k}=\"#{escape(v)}\"" }.join(', ') - - realm = "realm=\"#{options[:realm]}\", " if options[:realm] - "OAuth #{realm}#{header_params_str}" - end - - def parameters - OAuth::RequestProxy.proxy(@request).parameters - end - - def parameters_with_oauth - oauth_parameters.merge(parameters) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/net_http.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/net_http.rb deleted file mode 100644 index 65a6f9f..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/client/net_http.rb +++ /dev/null @@ -1,78 +0,0 @@ -require 'oauth/helper' -require 'oauth/client/helper' -require 'oauth/request_proxy/net_http' - -class Net::HTTPRequest - include OAuth::Helper - - attr_reader :oauth_helper - - def oauth!(http, consumer = nil, token = nil, options = {}) - options = { :request_uri => oauth_full_request_uri(http), - :consumer => consumer, - :token => token, - :scheme => 'header', - :signature_method => nil, - :nonce => nil, - :timestamp => nil }.merge(options) - - @oauth_helper = OAuth::Client::Helper.new(self, options) - self.send("set_oauth_#{options[:scheme]}") - end - - def signature_base_string(http, consumer = nil, token = nil, options = {}) - options = { :request_uri => oauth_full_request_uri(http), - :consumer => consumer, - :token => token, - :scheme => 'header', - :signature_method => nil, - :nonce => nil, - :timestamp => nil }.merge(options) - - OAuth::Client::Helper.new(self, options).signature_base_string - end - -private - - def oauth_full_request_uri(http) - uri = URI.parse(self.path) - uri.host = http.address - uri.port = http.port - - if http.respond_to?(:use_ssl?) && http.use_ssl? - uri.scheme = "https" - else - uri.scheme = "http" - end - - uri.to_s - end - - def set_oauth_header - self['Authorization'] = @oauth_helper.header - end - - # FIXME: if you're using a POST body and query string parameters, using this - # method will convert those parameters on the query string into parameters in - # the body. this is broken, and should be fixed. - def set_oauth_body - self.set_form_data(@oauth_helper.parameters_with_oauth) - params_with_sig = @oauth_helper.parameters.merge(:oauth_signature => @oauth_helper.signature) - self.set_form_data(params_with_sig) - end - - def set_oauth_query_string - oauth_params_str = @oauth_helper.oauth_parameters.map { |k,v| [escape(k), escape(v)] * "=" }.join("&") - - uri = URI.parse(path) - if uri.query.to_s == "" - uri.query = oauth_params_str - else - uri.query = uri.query + "&" + oauth_params_str - end - - @path = uri.to_s - - @path << "&oauth_signature=#{escape(oauth_helper.signature)}" - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/consumer.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/consumer.rb deleted file mode 100644 index 5527e2c..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/consumer.rb +++ /dev/null @@ -1,296 +0,0 @@ -require 'net/http' -require 'net/https' -require 'oauth/client/net_http' -require 'oauth/errors' - -module OAuth - class Consumer - # determine the certificate authority path to verify SSL certs - CA_FILES = %w(/etc/ssl/certs/ca-certificates.crt /usr/share/curl/curl-ca-bundle.crt) - CA_FILES.each do |ca_file| - if File.exists?(ca_file) - CA_FILE = ca_file - break - end - end - CA_FILE = nil unless defined?(CA_FILE) - - @@default_options = { - # Signature method used by server. Defaults to HMAC-SHA1 - :signature_method => 'HMAC-SHA1', - - # default paths on site. These are the same as the defaults set up by the generators - :request_token_path => '/oauth/request_token', - :authorize_path => '/oauth/authorize', - :access_token_path => '/oauth/access_token', - - # How do we send the oauth values to the server see - # http://oauth.net/core/1.0/#consumer_req_param for more info - # - # Possible values: - # - # :header - via the Authorize header (Default) ( option 1. in spec) - # :body - url form encoded in body of POST request ( option 2. in spec) - # :query_string - via the query part of the url ( option 3. in spec) - :scheme => :header, - - # Default http method used for OAuth Token Requests (defaults to :post) - :http_method => :post, - - :oauth_version => "1.0" - } - - attr_accessor :options, :key, :secret - attr_writer :site, :http - - # Create a new consumer instance by passing it a configuration hash: - # - # @consumer = OAuth::Consumer.new(key, secret, { - # :site => "http://term.ie", - # :scheme => :header, - # :http_method => :post, - # :request_token_path => "/oauth/example/request_token.php", - # :access_token_path => "/oauth/example/access_token.php", - # :authorize_path => "/oauth/example/authorize.php" - # }) - # - # Start the process by requesting a token - # - # @request_token = @consumer.get_request_token - # session[:request_token] = @request_token - # redirect_to @request_token.authorize_url - # - # When user returns create an access_token - # - # @access_token = @request_token.get_access_token - # @photos=@access_token.get('/photos.xml') - # - def initialize(consumer_key, consumer_secret, options = {}) - @key = consumer_key - @secret = consumer_secret - - # ensure that keys are symbols - @options = @@default_options.merge(options.inject({}) { |options, (key, value)| - options[key.to_sym] = value - options - }) - end - - # The default http method - def http_method - @http_method ||= @options[:http_method] || :post - end - - # The HTTP object for the site. The HTTP Object is what you get when you do Net::HTTP.new - def http - @http ||= create_http - end - - # Contains the root URI for this site - def uri(custom_uri = nil) - if custom_uri - @uri = custom_uri - @http = create_http # yike, oh well. less intrusive this way - else # if no custom passed, we use existing, which, if unset, is set to site uri - @uri ||= URI.parse(site) - end - end - - # Makes a request to the service for a new OAuth::RequestToken - # - # @request_token = @consumer.get_request_token - # - def get_request_token(request_options = {}, *arguments) - response = token_request(http_method, (request_token_url? ? request_token_url : request_token_path), nil, request_options, *arguments) - OAuth::RequestToken.new(self, response[:oauth_token], response[:oauth_token_secret]) - end - - # Creates, signs and performs an http request. - # It's recommended to use the OAuth::Token classes to set this up correctly. - # The arguments parameters are a hash or string encoded set of parameters if it's a post request as well as optional http headers. - # - # @consumer.request(:get, '/people', @token, { :scheme => :query_string }) - # @consumer.request(:post, '/people', @token, {}, @person.to_xml, { 'Content-Type' => 'application/xml' }) - # - def request(http_method, path, token = nil, request_options = {}, *arguments) - if path !~ /^\// - @http = create_http(path) - _uri = URI.parse(path) - path = "#{_uri.path}#{_uri.query ? "?#{_uri.query}" : ""}" - end - - rsp = http.request(create_signed_request(http_method, path, token, request_options, *arguments)) - - # check for an error reported by the Problem Reporting extension - # (http://wiki.oauth.net/ProblemReporting) - # note: a 200 may actually be an error; check for an oauth_problem key to be sure - if !(headers = rsp.to_hash["www-authenticate"]).nil? && - (h = headers.select { |h| h =~ /^OAuth / }).any? && - h.first =~ /oauth_problem/ - - # puts "Header: #{h.first}" - - # TODO doesn't handle broken responses from api.login.yahoo.com - # remove debug code when done - params = OAuth::Helper.parse_header(h.first) - - # puts "Params: #{params.inspect}" - # puts "Body: #{rsp.body}" - - raise OAuth::Problem.new(params.delete("oauth_problem"), rsp, params) - end - - rsp - end - - # Creates and signs an http request. - # It's recommended to use the Token classes to set this up correctly - def create_signed_request(http_method, path, token = nil, request_options = {}, *arguments) - request = create_http_request(http_method, path, *arguments) - sign!(request, token, request_options) - request - end - - # Creates a request and parses the result as url_encoded. This is used internally for the RequestToken and AccessToken requests. - def token_request(http_method, path, token = nil, request_options = {}, *arguments) - response = request(http_method, path, token, request_options, *arguments) - - case response.code.to_i - - when (200..299) - CGI.parse(response.body).inject({}) { |h,(k,v)| h[k.to_sym] = v.first; h } - when (300..399) - # this is a redirect - response.error! - when (400..499) - raise OAuth::Unauthorized, response - else - response.error! - end - end - - # Sign the Request object. Use this if you have an externally generated http request object you want to sign. - def sign!(request, token = nil, request_options = {}) - request.oauth!(http, self, token, options.merge(request_options)) - end - - # Return the signature_base_string - def signature_base_string(request, token = nil, request_options = {}) - request.signature_base_string(http, self, token, options.merge(request_options)) - end - - def site - @options[:site].to_s - end - - def scheme - @options[:scheme] - end - - def request_token_path - @options[:request_token_path] - end - - def authorize_path - @options[:authorize_path] - end - - def access_token_path - @options[:access_token_path] - end - - # TODO this is ugly, rewrite - def request_token_url - @options[:request_token_url] || site + request_token_path - end - - def request_token_url? - @options.has_key?(:request_token_url) - end - - def authorize_url - @options[:authorize_url] || site + authorize_path - end - - def authorize_url? - @options.has_key?(:authorize_url) - end - - def access_token_url - @options[:access_token_url] || site + access_token_path - end - - def access_token_url? - @options.has_key?(:access_token_url) - end - - protected - - # Instantiates the http object - def create_http(_url = nil) - if _url.nil? || _url[0] =~ /^\// - our_uri = URI.parse(site) - else - our_uri = URI.parse(_url) - end - - http_object = Net::HTTP.new(our_uri.host, our_uri.port) - - http_object.use_ssl = (our_uri.scheme == 'https') - - if CA_FILE - http_object.ca_file = CA_FILE - http_object.verify_mode = OpenSSL::SSL::VERIFY_PEER - http_object.verify_depth = 5 - else - http_object.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - - http_object - end - - # create the http request object for a given http_method and path - def create_http_request(http_method, path, *arguments) - http_method = http_method.to_sym - - if [:post, :put].include?(http_method) - data = arguments.shift - end - - headers = arguments.first.is_a?(Hash) ? arguments.shift : {} - - case http_method - when :post - request = Net::HTTP::Post.new(path,headers) - request["Content-Length"] = 0 # Default to 0 - when :put - request = Net::HTTP::Put.new(path,headers) - request["Content-Length"] = 0 # Default to 0 - when :get - request = Net::HTTP::Get.new(path,headers) - when :delete - request = Net::HTTP::Delete.new(path,headers) - when :head - request = Net::HTTP::Head.new(path,headers) - else - raise ArgumentError, "Don't know how to handle http_method: :#{http_method.to_s}" - end - - if data.is_a?(Hash) - request.set_form_data(data) - elsif data - request.body = data.to_s - request["Content-Length"] = request.body.length - end - - request - end - - # Unset cached http instance because it cannot be marshalled when - # it has already been used and use_ssl is set to true - def marshal_dump(*args) - @http = nil - self - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors.rb deleted file mode 100644 index 94b9b23..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors.rb +++ /dev/null @@ -1,3 +0,0 @@ -require 'oauth/errors/error' -require 'oauth/errors/unauthorized' -require 'oauth/errors/problem' diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/error.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/error.rb deleted file mode 100644 index 1a39eab..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/error.rb +++ /dev/null @@ -1,4 +0,0 @@ -module OAuth - class Error < StandardError - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/problem.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/problem.rb deleted file mode 100644 index 52662c5..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/problem.rb +++ /dev/null @@ -1,14 +0,0 @@ -module OAuth - class Problem < OAuth::Unauthorized - attr_reader :problem, :params - def initialize(problem, request = nil, params = {}) - super(request) - @problem = problem - @params = params - end - - def to_s - problem - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/unauthorized.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/unauthorized.rb deleted file mode 100644 index 4e79959..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/errors/unauthorized.rb +++ /dev/null @@ -1,12 +0,0 @@ -module OAuth - class Unauthorized < OAuth::Error - attr_reader :request - def initialize(request = nil) - @request = request - end - - def to_s - [request.code, request.message] * " " - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/helper.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/helper.rb deleted file mode 100644 index 6050c49..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/helper.rb +++ /dev/null @@ -1,55 +0,0 @@ -require 'openssl' -require 'base64' - -module OAuth - module Helper - extend self - - def escape(value) - URI::escape(value.to_s, OAuth::RESERVED_CHARACTERS) - end - - def generate_key(size=32) - Base64.encode64(OpenSSL::Random.random_bytes(size)).gsub(/\W/, '') - end - - alias_method :generate_nonce, :generate_key - - def generate_timestamp - Time.now.to_i.to_s - end - - def normalize(params) - params.sort.map do |k, values| - - if values.is_a?(Array) - # multiple values were provided for a single key - values.sort.collect do |v| - [escape(k),escape(v)] * "=" - end - else - [escape(k),escape(values)] * "=" - end - end * "&" - end - - # Parse an Authorization / WWW-Authenticate header into a hash - def parse_header(header) - # decompose - params = header[6,header.length].split(/[,=]/) - - # strip and unescape - params.map! { |v| unescape(v.strip) } - - # strip quotes - params.map! { |v| v =~ /^\".*\"$/ ? v[1..-2] : v } - - # convert into a Hash - Hash[*params.flatten] - end - - def unescape(value) - URI.unescape(value.gsub('+', '%2B')) - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth.rb deleted file mode 100644 index 2b33e7f..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth.rb +++ /dev/null @@ -1,7 +0,0 @@ -module OAuth - # required parameters, per sections 6.1.1, 6.3.1, and 7 - PARAMETERS = %w(oauth_consumer_key oauth_token oauth_signature_method oauth_timestamp oauth_nonce oauth_version oauth_signature) - - # reserved character regexp, per section 5.1 - RESERVED_CHARACTERS = /[^\w\d\-\.\_\~]/ -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth_test_helper.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth_test_helper.rb deleted file mode 100644 index aae316b..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/oauth_test_helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'action_controller' -require 'action_controller/test_process' - -module OAuth - module OAuthTestHelper - def mock_incoming_request_with_query(request) - incoming = ActionController::TestRequest.new(request.to_hash) - incoming.request_uri = request.path - incoming.host = request.uri.host - incoming.env["SERVER_PORT"] = request.uri.port - incoming.env['REQUEST_METHOD'] = request.http_method - incoming - end - - def mock_incoming_request_with_authorize_header(request) - incoming = ActionController::TestRequest.new - incoming.request_uri = request.path - incoming.host = request.uri.host - incoming.env["HTTP_AUTHORIZATION"] = request.to_auth_string - incoming.env["SERVER_PORT"] = request.uri.port - incoming.env['REQUEST_METHOD'] = request.http_method - incoming - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy.rb deleted file mode 100644 index cd23836..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy.rb +++ /dev/null @@ -1,24 +0,0 @@ -module OAuth - module RequestProxy - def self.available_proxies #:nodoc: - @available_proxies ||= {} - end - - def self.proxy(request, options = {}) - return request if request.kind_of?(OAuth::RequestProxy::Base) - - klass = available_proxies[request.class] - - # Search for possible superclass matches. - if klass.nil? - request_parent = available_proxies.keys.find { |rc| request.kind_of?(rc) } - klass = available_proxies[request_parent] - end - - raise UnknownRequestType, request.class.to_s unless klass - klass.new(request, options) - end - - class UnknownRequestType < Exception; end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/action_controller_request.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/action_controller_request.rb deleted file mode 100644 index ff7daa5..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/action_controller_request.rb +++ /dev/null @@ -1,61 +0,0 @@ -require 'active_support' -require 'action_controller/request' -require 'oauth/request_proxy/base' -require 'uri' - -module OAuth::RequestProxy - class ActionControllerRequest < OAuth::RequestProxy::Base - proxies(defined?(ActionController::AbstractRequest) ? ActionController::AbstractRequest : ActionController::Request) - - def method - request.method.to_s.upcase - end - - def uri - request.url - end - - def parameters - if options[:clobber_request] - options[:parameters] || {} - else - params = request_params.merge(query_params).merge(header_params) - params.stringify_keys! if params.respond_to?(:stringify_keys!) - params.merge(options[:parameters] || {}) - end - end - - # Override from OAuth::RequestProxy::Base to avoid roundtrip - # conversion to Hash or Array and thus preserve the original - # parameter names - def parameters_for_signature - params = [] - params << options[:parameters].to_query if options[:parameters] - - unless options[:clobber_request] - params << header_params.to_query - params << request.query_string unless request.query_string.blank? - if request.content_type == Mime::Type.lookup("application/x-www-form-urlencoded") - params << request.raw_post - end - end - - params. - join('&').split('&'). - reject { |kv| kv =~ /^oauth_signature=.*/}. - reject(&:blank?). - map { |p| p.split('=').map{|esc| CGI.unescape(esc)} } - end - - protected - - def query_params - request.query_parameters - end - - def request_params - request.request_parameters - end - - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/base.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/base.rb deleted file mode 100644 index f9c1448..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/base.rb +++ /dev/null @@ -1,157 +0,0 @@ -require 'oauth/request_proxy' -require 'oauth/helper' - -module OAuth::RequestProxy - class Base - include OAuth::Helper - - def self.proxies(klass) - OAuth::RequestProxy.available_proxies[klass] = self - end - - attr_accessor :request, :options - - def initialize(request, options = {}) - @request = request - @options = options - end - - ## OAuth parameters - - def oauth_consumer_key - parameters['oauth_consumer_key'] - end - - def oauth_nonce - parameters['oauth_nonce'] - end - - def oauth_signature - # TODO can this be nil? - parameters['oauth_signature'] || "" - end - - def oauth_signature_method - case parameters['oauth_signature_method'] - when Array - parameters['oauth_signature_method'].first - else - parameters['oauth_signature_method'] - end - end - - def oauth_timestamp - parameters['oauth_timestamp'] - end - - def oauth_token - parameters['oauth_token'] - end - - def oauth_version - parameters["oauth_version"] - end - - # TODO deprecate these - alias_method :consumer_key, :oauth_consumer_key - alias_method :token, :oauth_token - alias_method :nonce, :oauth_nonce - alias_method :timestamp, :oauth_timestamp - alias_method :signature, :oauth_signature - alias_method :signature_method, :oauth_signature_method - - ## Parameter accessors - - def parameters - raise NotImplementedError, "Must be implemented by subclasses" - end - - def parameters_for_signature - parameters.reject { |k,v| k == "oauth_signature" } - end - - def oauth_parameters - parameters.select { |k,v| OAuth::PARAMETERS.include?(k) }.reject { |k,v| v == "" } - end - - def non_oauth_parameters - parameters.reject { |k,v| OAuth::PARAMETERS.include?(k) } - end - - # See 9.1.2 in specs - def normalized_uri - u = URI.parse(uri) - "#{u.scheme.downcase}://#{u.host.downcase}#{(u.scheme.downcase == 'http' && u.port != 80) || (u.scheme.downcase == 'https' && u.port != 443) ? ":#{u.port}" : ""}#{(u.path && u.path != '') ? u.path : '/'}" - end - - # See 9.1.1. in specs Normalize Request Parameters - def normalized_parameters - normalize(parameters_for_signature) - end - - def sign(options = {}) - OAuth::Signature.sign(self, options) - end - - def sign!(options = {}) - parameters["oauth_signature"] = sign(options) - @signed = true - signature - end - - # See 9.1 in specs - def signature_base_string - base = [method, normalized_uri, normalized_parameters] - base.map { |v| escape(v) }.join("&") - end - - # Has this request been signed yet? - def signed? - @signed - end - - # URI, including OAuth parameters - def signed_uri(with_oauth = true) - if signed? - if with_oauth - params = parameters - else - params = non_oauth_parameters - end - - [uri, normalize(params)] * "?" - else - STDERR.puts "This request has not yet been signed!" - end - end - - # Authorization header for OAuth - def oauth_header(options = {}) - header_params_str = oauth_parameters.map { |k,v| "#{k}=\"#{escape(v)}\"" }.join(', ') - - realm = "realm=\"#{options[:realm]}\", " if options[:realm] - "OAuth #{realm}#{header_params_str}" - end - - protected - - def header_params - %w( X-HTTP_AUTHORIZATION Authorization HTTP_AUTHORIZATION ).each do |header| - next unless request.env.include?(header) - - header = request.env[header] - next unless header[0,6] == 'OAuth ' - - # parse the header into a Hash - oauth_params = OAuth::Helper.parse_header(header) - - # remove non-OAuth parameters - oauth_params.reject! { |k,v| k !~ /^oauth_/ } - - return oauth_params - end - - return {} - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/jabber_request.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/jabber_request.rb deleted file mode 100644 index 5c44b5b..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/jabber_request.rb +++ /dev/null @@ -1,41 +0,0 @@ -require 'xmpp4r' -require 'oauth/request_proxy/base' - -module OAuth - module RequestProxy - class JabberRequest < OAuth::RequestProxy::Base - proxies Jabber::Iq - proxies Jabber::Presence - proxies Jabber::Message - - def parameters - return @params if @params - - @params = {} - - oauth = @request.get_elements('//oauth').first - return @params unless oauth - - %w( oauth_token oauth_consumer_key oauth_signature_method oauth_signature - oauth_timestamp oauth_nonce oauth_version ).each do |param| - next unless element = oauth.first_element(param) - @params[param] = element.text - end - - @params - end - - def method - @request.name - end - - def uri - [@request.from.strip.to_s, @request.to.strip.to_s].join("&") - end - - def normalized_uri - uri - end - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/mock_request.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/mock_request.rb deleted file mode 100644 index e7c2d66..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/mock_request.rb +++ /dev/null @@ -1,44 +0,0 @@ -require 'oauth/request_proxy/base' - -module OAuth - module RequestProxy - # RequestProxy for Hashes to facilitate simpler signature creation. - # Usage: - # request = OAuth::RequestProxy.proxy \ - # "method" => "iq", - # "uri" => [from, to] * "&", - # "parameters" => { - # "oauth_consumer_key" => oauth_consumer_key, - # "oauth_token" => oauth_token, - # "oauth_signature_method" => "HMAC-SHA1" - # } - # - # signature = OAuth::Signature.sign \ - # request, - # :consumer_secret => oauth_consumer_secret, - # :token_secret => oauth_token_secret, - class MockRequest < OAuth::RequestProxy::Base - proxies Hash - - def parameters - @request["parameters"] - end - - def method - @request["method"] - end - - def normalized_uri - super - rescue - # if this is a non-standard URI, it may not parse properly - # in that case, assume that it's already been normalized - uri - end - - def uri - @request["uri"] - end - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/net_http.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/net_http.rb deleted file mode 100644 index 273bb43..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/net_http.rb +++ /dev/null @@ -1,65 +0,0 @@ -require 'oauth/request_proxy/base' -require 'net/http' -require 'uri' -require 'cgi' - -module OAuth::RequestProxy::Net - module HTTP - class HTTPRequest < OAuth::RequestProxy::Base - proxies ::Net::HTTPRequest - - def method - request.method - end - - def uri - uri = options[:uri] - uri.to_s - end - - def parameters - if options[:clobber_request] - options[:parameters] - else - all_parameters - end - end - - private - - def all_parameters - request_params = CGI.parse(query_string) - if options[:parameters] - options[:parameters].each do |k,v| - if request_params.has_key?(k) - request_params[k] << v - else - request_params[k] = [v].flatten - end - end - end - request_params - end - - def query_string - params = [ query_params, auth_header_params ] - is_form_urlencoded = request['Content-Type'] != nil && request['Content-Type'].downcase == 'application/x-www-form-urlencoded' - params << post_params if method.to_s.upcase == 'POST' && is_form_urlencoded - params.compact.join('&') - end - - def query_params - URI.parse(request.path).query - end - - def post_params - request.body - end - - def auth_header_params - return nil unless request['Authorization'] && request['Authorization'][0,5] == 'OAuth' - auth_params = request['Authorization'] - end - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/rack_request.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/rack_request.rb deleted file mode 100644 index 8ec63d1..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/request_proxy/rack_request.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'oauth/request_proxy/base' -require 'uri' -require 'rack' - -module OAuth::RequestProxy - class RackRequest < OAuth::RequestProxy::Base - proxies Rack::Request - - def method - request.env["rack.methodoverride.original_method"] || request.request_method - end - - def uri - request.url - end - - def parameters - if options[:clobber_request] - options[:parameters] || {} - else - params = request_params.merge(query_params).merge(header_params) - params.merge(options[:parameters] || {}) - end - end - - def signature - parameters['oauth_signature'] - end - - protected - - def query_params - request.GET - end - - def request_params - request.params - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/server.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/server.rb deleted file mode 100644 index 1aa4f31..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/server.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'oauth/helper' -require 'oauth/consumer' - -module OAuth - # This is mainly used to create consumer credentials and can pretty much be ignored if you want to create your own - class Server - include OAuth::Helper - attr_accessor :base_url - - @@server_paths = { - :request_token_path => "/oauth/request_token", - :authorize_path => "/oauth/authorize", - :access_token_path => "/oauth/access_token" - } - - # Create a new server instance - def initialize(base_url, paths = {}) - @base_url = base_url - @paths = @@server_paths.merge(paths) - end - - def generate_credentials - [generate_key(16), generate_key] - end - - def generate_consumer_credentials(params = {}) - Consumer.new(*generate_credentials) - end - - # mainly for testing purposes - def create_consumer - creds = generate_credentials - Consumer.new(creds[0], creds[1], - { - :site => base_url, - :request_token_path => request_token_path, - :authorize_path => authorize_path, - :access_token_path => access_token_path - }) - end - - def request_token_path - @paths[:request_token_path] - end - - def request_token_url - base_url + request_token_path - end - - def authorize_path - @paths[:authorize_path] - end - - def authorize_url - base_url + authorize_path - end - - def access_token_path - @paths[:access_token_path] - end - - def access_token_url - base_url + access_token_path - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature.rb deleted file mode 100644 index b3e5a95..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature.rb +++ /dev/null @@ -1,28 +0,0 @@ -module OAuth - module Signature - def self.available_methods - @available_methods ||= {} - end - - def self.build(request, options = {}, &block) - request = OAuth::RequestProxy.proxy(request, options) - klass = available_methods[(request.signature_method || "").downcase] - raise UnknownSignatureMethod, request.signature_method unless klass - klass.new(request, options, &block) - end - - def self.sign(request, options = {}, &block) - self.build(request, options, &block).signature - end - - def self.verify(request, options = {}, &block) - self.build(request, options, &block).verify - end - - def self.signature_base_string(request, options = {}, &block) - self.build(request, options, &block).signature_base_string - end - - class UnknownSignatureMethod < Exception; end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/base.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/base.rb deleted file mode 100644 index 807f0ee..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/base.rb +++ /dev/null @@ -1,91 +0,0 @@ -require 'oauth/signature' -require 'oauth/helper' -require 'oauth/request_proxy/base' -require 'base64' - -module OAuth::Signature - class Base - include OAuth::Helper - - attr_accessor :options - attr_reader :token_secret, :consumer_secret, :request - - def self.implements(signature_method) - OAuth::Signature.available_methods[signature_method] = self - end - - def self.digest_class(digest_class = nil) - return @digest_class if digest_class.nil? - @digest_class = digest_class - end - - def initialize(request, options = {}, &block) - raise TypeError unless request.kind_of?(OAuth::RequestProxy::Base) - @request = request - @options = options - - ## consumer secret was determined beforehand - - @consumer_secret = options[:consumer].secret if options[:consumer] - - # presence of :consumer_secret option will override any Consumer that's provided - @consumer_secret = options[:consumer_secret] if options[:consumer_secret] - - ## token secret was determined beforehand - - @token_secret = options[:token].secret if options[:token] - - # presence of :token_secret option will override any Token that's provided - @token_secret = options[:token_secret] if options[:token_secret] - - - # override secrets based on the values returned from the block (if any) - if block_given? - # consumer secret and token secret need to be looked up based on pieces of the request - secrets = yield block.arity == 1 ? request : [token, consumer_key, nonce, request.timestamp] - if secrets.is_a?(Array) && secrets.size == 2 - @token_secret = secrets[0] - @consumer_secret = secrets[1] - end - end - end - - def signature - Base64.encode64(digest).chomp.gsub(/\n/,'') - end - - def ==(cmp_signature) - Base64.decode64(signature) == Base64.decode64(cmp_signature) - end - - def verify - self == self.request.signature - end - - def signature_base_string - request.signature_base_string - end - - private - - def token - request.token - end - - def consumer_key - request.consumer_key - end - - def nonce - request.nonce - end - - def secret - "#{escape(consumer_secret)}&#{escape(token_secret)}" - end - - def digest - self.class.digest_class.digest(signature_base_string) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/base.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/base.rb deleted file mode 100644 index 0646bd9..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/base.rb +++ /dev/null @@ -1,12 +0,0 @@ -require 'oauth/signature/base' - -module OAuth::Signature::HMAC - class Base < OAuth::Signature::Base - - private - - def digest - self.class.digest_class.digest(secret, signature_base_string) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/md5.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/md5.rb deleted file mode 100644 index 5363e98..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/md5.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'oauth/signature/hmac/base' -require 'hmac-md5' - -module OAuth::Signature::HMAC - class MD5 < Base - implements 'hmac-md5' - digest_class ::HMAC::MD5 - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/rmd160.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/rmd160.rb deleted file mode 100644 index 1a5b250..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/rmd160.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'oauth/signature/hmac/base' -require 'hmac-rmd160' - -module OAuth::Signature::HMAC - class RMD160 < Base - implements 'hmac-rmd160' - digest_class ::HMAC::RMD160 - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha1.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha1.rb deleted file mode 100644 index 9391eb4..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha1.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'oauth/signature/hmac/base' -require 'hmac-sha1' - -module OAuth::Signature::HMAC - class SHA1 < Base - implements 'hmac-sha1' - digest_class ::HMAC::SHA1 - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha2.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha2.rb deleted file mode 100644 index f3f4d40..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/hmac/sha2.rb +++ /dev/null @@ -1,9 +0,0 @@ -require 'oauth/signature/hmac/base' -require 'hmac-sha2' - -module OAuth::Signature::HMAC - class SHA2 < Base - implements 'hmac-sha2' - digest_class ::HMAC::SHA2 - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/md5.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/md5.rb deleted file mode 100644 index 620f6f7..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/md5.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'oauth/signature/base' -require 'digest/md5' - -module OAuth::Signature - class MD5 < Base - implements 'md5' - digest_class Digest::MD5 - - def signature_base_string - secret + super - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/plaintext.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/plaintext.rb deleted file mode 100644 index 318bd31..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/plaintext.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'oauth/signature/base' - -module OAuth::Signature - class PLAINTEXT < Base - implements 'plaintext' - - def signature - signature_base_string - end - - def ==(cmp_signature) - signature == escape(cmp_signature) - end - - def signature_base_string - secret - end - - def secret - escape(super) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/rsa/sha1.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/rsa/sha1.rb deleted file mode 100644 index 786dede..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/rsa/sha1.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'oauth/signature/base' -require 'openssl' - -module OAuth::Signature::RSA - class SHA1 < OAuth::Signature::Base - implements 'rsa-sha1' - - def ==(cmp_signature) - public_key.verify(OpenSSL::Digest::SHA1.new, Base64.decode64(cmp_signature.is_a?(Array) ? cmp_signature.first : cmp_signature), signature_base_string) - end - - def public_key - if consumer_secret.is_a?(String) - decode_public_key - elsif consumer_secret.is_a?(OpenSSL::X509::Certificate) - consumer_secret.public_key - else - consumer_secret - end - end - - private - - def decode_public_key - case consumer_secret - when /-----BEGIN CERTIFICATE-----/ - OpenSSL::X509::Certificate.new( consumer_secret).public_key - else - OpenSSL::PKey::RSA.new( consumer_secret) - end - end - - def digest - private_key = OpenSSL::PKey::RSA.new( - if options[:private_key_file] - IO.read(options[:private_key_file]) - else - consumer_secret - end - ) - - private_key.sign(OpenSSL::Digest::SHA1.new, signature_base_string) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/sha1.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/sha1.rb deleted file mode 100644 index 40493e2..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/signature/sha1.rb +++ /dev/null @@ -1,13 +0,0 @@ -require 'oauth/signature/base' -require 'digest/sha1' - -module OAuth::Signature - class SHA1 < Base - implements 'sha1' - digest_class Digest::SHA1 - - def signature_base_string - secret + super - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/token.rb deleted file mode 100644 index 056aba9..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/token.rb +++ /dev/null @@ -1,7 +0,0 @@ -# this exists for backwards-compatibility - -require 'oauth/tokens/token' -require 'oauth/tokens/server_token' -require 'oauth/tokens/consumer_token' -require 'oauth/tokens/request_token' -require 'oauth/tokens/access_token' diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/access_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/access_token.rb deleted file mode 100644 index db1faf2..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/access_token.rb +++ /dev/null @@ -1,68 +0,0 @@ -module OAuth - # The Access Token is used for the actual "real" web service calls that you perform against the server - class AccessToken < ConsumerToken - # The less intrusive way. Otherwise, if we are to do it correctly inside consumer, - # we need to restructure and touch more methods: request(), sign!(), etc. - def request(http_method, path, *arguments) - request_uri = URI.parse(path) - site_uri = consumer.uri - is_service_uri_different = (request_uri.absolute? && request_uri != site_uri) - consumer.uri(request_uri) if is_service_uri_different - @response = super(http_method, path, *arguments) - # NOTE: reset for wholesomeness? meaning that we admit only AccessToken service calls may use different URIs? - # so reset in case consumer is still used for other token-management tasks subsequently? - consumer.uri(site_uri) if is_service_uri_different - @response - end - - # Make a regular GET request using AccessToken - # - # @response = @token.get('/people') - # @response = @token.get('/people', { 'Accept'=>'application/xml' }) - # - def get(path, headers = {}) - request(:get, path, headers) - end - - # Make a regular HEAD request using AccessToken - # - # @response = @token.head('/people') - # - def head(path, headers = {}) - request(:head, path, headers) - end - - # Make a regular POST request using AccessToken - # - # @response = @token.post('/people') - # @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' }) - # @response = @token.post('/people', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' }) - # @response = @token.post('/people', nil, {'Accept' => 'application/xml' }) - # @response = @token.post('/people', @person.to_xml, { 'Accept'=>'application/xml', 'Content-Type' => 'application/xml' }) - # - def post(path, body = '', headers = {}) - request(:post, path, body, headers) - end - - # Make a regular PUT request using AccessToken - # - # @response = @token.put('/people/123') - # @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' }) - # @response = @token.put('/people/123', { :name => 'Bob', :email => 'bob@mailinator.com' }, { 'Accept' => 'application/xml' }) - # @response = @token.put('/people/123', nil, { 'Accept' => 'application/xml' }) - # @response = @token.put('/people/123', @person.to_xml, { 'Accept' => 'application/xml', 'Content-Type' => 'application/xml' }) - # - def put(path, body = '', headers = {}) - request(:put, path, body, headers) - end - - # Make a regular DELETE request using AccessToken - # - # @response = @token.delete('/people/123') - # @response = @token.delete('/people/123', { 'Accept' => 'application/xml' }) - # - def delete(path, headers = {}) - request(:delete, path, headers) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/consumer_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/consumer_token.rb deleted file mode 100644 index 0d7608d..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/consumer_token.rb +++ /dev/null @@ -1,32 +0,0 @@ -module OAuth - # Superclass for tokens used by OAuth Clients - class ConsumerToken < Token - attr_accessor :consumer, :params - attr_reader :response - - def self.from_hash(consumer, hash) - token = self.new(consumer, hash[:oauth_token], hash[:oauth_token_secret]) - token.params = hash - token - end - - def initialize(consumer, token="", secret="") - super(token, secret) - @consumer = consumer - end - - # Make a signed request using given http_method to the path - # - # @token.request(:get, '/people') - # @token.request(:post, '/people', @person.to_xml, { 'Content-Type' => 'application/xml' }) - # - def request(http_method, path, *arguments) - @response = consumer.request(http_method, path, self, {}, *arguments) - end - - # Sign a request generated elsewhere using Net:HTTP::Post.new or friends - def sign!(request, options = {}) - consumer.sign!(request, self, options) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/request_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/request_token.rb deleted file mode 100644 index 2e0ca4a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/request_token.rb +++ /dev/null @@ -1,28 +0,0 @@ -module OAuth - # The RequestToken is used for the initial Request. - # This is normally created by the Consumer object. - class RequestToken < ConsumerToken - - # Generate an authorization URL for user authorization - def authorize_url(params = nil) - params = (params || {}).merge(:oauth_token => self.token) - build_authorize_url(consumer.authorize_url, params) - end - - # exchange for AccessToken on server - def get_access_token(options = {}) - response = consumer.token_request(consumer.http_method, (consumer.access_token_url? ? consumer.access_token_url : consumer.access_token_path), self, options) - OAuth::AccessToken.from_hash(consumer, response) - end - - protected - - # construct an authorization url - def build_authorize_url(base_url, params) - uri = URI.parse(base_url.to_s) - # TODO doesn't handle array values correctly - uri.query = params.map { |k,v| [k, CGI.escape(v)] * "=" } * "&" - uri.to_s - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/server_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/server_token.rb deleted file mode 100644 index 2e09e67..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/server_token.rb +++ /dev/null @@ -1,9 +0,0 @@ -module OAuth - # Used on the server for generating tokens - class ServerToken < Token - - def initialize - super(generate_key(16), generate_key) - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/token.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/token.rb deleted file mode 100644 index ff9b5dd..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/tokens/token.rb +++ /dev/null @@ -1,17 +0,0 @@ -module OAuth - # Superclass for the various tokens used by OAuth - class Token - include OAuth::Helper - - attr_accessor :token, :secret - - def initialize(token, secret) - @token = token - @secret = secret - end - - def to_query - "oauth_token=#{escape(token)}&oauth_secret=#{escape(secret)}" - end - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/version.rb b/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/version.rb deleted file mode 100644 index f7d9aad..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/lib/oauth/version.rb +++ /dev/null @@ -1,3 +0,0 @@ -module OAuth #:nodoc: - VERSION = '0.3.2' -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/oauth.gemspec b/ruby/processing/star_field/library/oauth-0.3.2/oauth.gemspec deleted file mode 100644 index d1ab9cf..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/oauth.gemspec +++ /dev/null @@ -1,49 +0,0 @@ -# -*- encoding: utf-8 -*- - -Gem::Specification.new do |s| - s.name = %q{oauth} - s.version = "0.3.2" - - s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= - s.authors = ["Pelle Braendgaard", "Blaine Cook", "Larry Halff", "Jesse Clark", "Jon Crosby", "Seth Fitzsimmons"] - s.date = %q{2009-03-23} - s.default_executable = %q{oauth} - s.description = %q{OAuth Core Ruby implementation} - s.email = %q{oauth-ruby@googlegroups.com} - s.executables = ["oauth"] - s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "website/index.txt"] - s.files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "Rakefile", "TODO", "bin/oauth", "examples/yql.rb", "lib/oauth.rb", "lib/oauth/oauth.rb", "lib/oauth/cli.rb", "lib/oauth/client.rb", "lib/oauth/client/action_controller_request.rb", "lib/oauth/client/helper.rb", "lib/oauth/client/net_http.rb", "lib/oauth/consumer.rb", "lib/oauth/errors.rb", "lib/oauth/errors/error.rb", "lib/oauth/errors/problem.rb", "lib/oauth/errors/unauthorized.rb", "lib/oauth/helper.rb", "lib/oauth/oauth_test_helper.rb", "lib/oauth/request_proxy.rb", "lib/oauth/request_proxy/action_controller_request.rb", "lib/oauth/request_proxy/base.rb", "lib/oauth/request_proxy/jabber_request.rb", "lib/oauth/request_proxy/mock_request.rb", "lib/oauth/request_proxy/net_http.rb", "lib/oauth/request_proxy/rack_request.rb", "lib/oauth/server.rb", "lib/oauth/signature.rb", "lib/oauth/signature/base.rb", "lib/oauth/signature/hmac/base.rb", "lib/oauth/signature/hmac/md5.rb", "lib/oauth/signature/hmac/rmd160.rb", "lib/oauth/signature/hmac/sha1.rb", "lib/oauth/signature/hmac/sha2.rb", "lib/oauth/signature/md5.rb", "lib/oauth/signature/plaintext.rb", "lib/oauth/signature/rsa/sha1.rb", "lib/oauth/signature/sha1.rb", "lib/oauth/token.rb", "lib/oauth/tokens/access_token.rb", "lib/oauth/tokens/consumer_token.rb", "lib/oauth/tokens/request_token.rb", "lib/oauth/tokens/server_token.rb", "lib/oauth/tokens/token.rb", "lib/oauth/version.rb", "oauth.gemspec", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/cases/oauth_case.rb", "test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/keys/rsa.cert", "test/keys/rsa.pem", "test/test_access_token.rb", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_request_token.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.rhtml"] - s.has_rdoc = true - s.homepage = %q{http://oauth.rubyforge.org} - s.rdoc_options = ["--main", "README.rdoc"] - s.require_paths = ["lib"] - s.rubyforge_project = %q{oauth} - s.rubygems_version = %q{1.3.1} - s.summary = %q{OAuth Core Ruby implementation} - s.test_files = ["test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/test_access_token.rb", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_request_token.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.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 - s.add_runtime_dependency(%q, [">= 0.3.1"]) - s.add_development_dependency(%q, [">= 1.2.3"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 0"]) - s.add_development_dependency(%q, [">= 1.8.0"]) - else - s.add_dependency(%q, [">= 0.3.1"]) - s.add_dependency(%q, [">= 1.2.3"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.8.0"]) - end - else - s.add_dependency(%q, [">= 0.3.1"]) - s.add_dependency(%q, [">= 1.2.3"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 0"]) - s.add_dependency(%q, [">= 1.8.0"]) - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/script/destroy b/ruby/processing/star_field/library/oauth-0.3.2/script/destroy deleted file mode 100755 index 5fa7e10..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/script/destroy +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -APP_ROOT = File.join(File.dirname(__FILE__), '..') - -begin - require 'rubigen' -rescue LoadError - require 'rubygems' - require 'rubigen' -end -require 'rubigen/scripts/destroy' - -ARGV.shift if ['--help', '-h'].include?(ARGV[0]) -RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] -RubiGen::Scripts::Destroy.new.run(ARGV) diff --git a/ruby/processing/star_field/library/oauth-0.3.2/script/generate b/ruby/processing/star_field/library/oauth-0.3.2/script/generate deleted file mode 100755 index 230a186..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/script/generate +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env ruby -APP_ROOT = File.join(File.dirname(__FILE__), '..') - -begin - require 'rubigen' -rescue LoadError - require 'rubygems' - require 'rubigen' -end -require 'rubigen/scripts/generate' - -ARGV.shift if ['--help', '-h'].include?(ARGV[0]) -RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit] -RubiGen::Scripts::Generate.new.run(ARGV) diff --git a/ruby/processing/star_field/library/oauth-0.3.2/script/txt2html b/ruby/processing/star_field/library/oauth-0.3.2/script/txt2html deleted file mode 100755 index 382c877..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/script/txt2html +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env ruby - -require 'rubygems' -begin - require 'newgem' -rescue LoadError - puts "\n\nGenerating the website requires the newgem RubyGem" - puts "Install: gem install newgem\n\n" - exit(1) -end -require 'redcloth' -require 'syntax/convertors/html' -require 'erb' -require File.dirname(__FILE__) + '/../lib/oauth/version.rb' - -version = OAuth::VERSION::STRING -download = 'http://rubyforge.org/projects/oauth' - -class Fixnum - def ordinal - # teens - return 'th' if (10..19).include?(self % 100) - # others - case self % 10 - when 1: return 'st' - when 2: return 'nd' - when 3: return 'rd' - else return 'th' - end - end -end - -class Time - def pretty - return "#{mday}#{mday.ordinal} #{strftime('%B')} #{year}" - end -end - -def convert_syntax(syntax, source) - return Syntax::Convertors::HTML.for_syntax(syntax).convert(source).gsub(%r!^
|
$!,'') -end - -if ARGV.length >= 1 - src, template = ARGV - template ||= File.join(File.dirname(__FILE__), '/../website/template.rhtml') - -else - puts("Usage: #{File.split($0).last} source.txt [template.rhtml] > output.html") - exit! -end - -template = ERB.new(File.open(template).read) - -title = nil -body = nil -File.open(src) do |fsrc| - title_text = fsrc.readline - body_text = fsrc.read - syntax_items = [] - body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)!m){ - ident = syntax_items.length - element, syntax, source = $1, $2, $3 - syntax_items << "<#{element} class='syntax'>#{convert_syntax(syntax, source)}" - "syntax-temp-#{ident}" - } - title = RedCloth.new(title_text).to_html.gsub(%r!<.*?>!,'').strip - body = RedCloth.new(body_text).to_html - body.gsub!(%r!(?:
)?syntax-temp-(\d+)(?:
)?!){ syntax_items[$1.to_i] } -end -stat = File.stat(src) -created = stat.ctime -modified = stat.mtime - -$stdout << template.result(binding) diff --git a/ruby/processing/star_field/library/oauth-0.3.2/setup.rb b/ruby/processing/star_field/library/oauth-0.3.2/setup.rb deleted file mode 100644 index 424a5f3..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/setup.rb +++ /dev/null @@ -1,1585 +0,0 @@ -# -# 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/ruby/processing/star_field/library/oauth-0.3.2/tasks/deployment.rake b/ruby/processing/star_field/library/oauth-0.3.2/tasks/deployment.rake deleted file mode 100644 index 430dad3..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/tasks/deployment.rake +++ /dev/null @@ -1,34 +0,0 @@ -desc 'Release the website and new gem version' -task :deploy => [:check_version, :website, :release] do - puts "Remember to create SVN tag:" - puts "svn copy svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/trunk " + - "svn+ssh://#{rubyforge_username}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} " - puts "Suggested comment:" - puts "Tagging release #{CHANGES}" -end - -desc 'Runs tasks website_generate and install_gem as a local deployment of the gem' -task :local_deploy => [:website_generate, :install_gem] - -task :check_version do - unless ENV['VERSION'] - puts 'Must pass a VERSION=x.y.z release version' - exit - end - unless ENV['VERSION'] == VERS - puts "Please update your version.rb to match the release version, currently #{VERS}" - exit - end -end - -desc 'Install the package as a gem, without generating documentation(ri/rdoc)' -task :install_gem_no_doc => [:clean, :package] do - sh "#{'sudo ' unless Hoe::WINDOZE }gem install pkg/*.gem --no-rdoc --no-ri" -end - -namespace :manifest do - desc 'Recreate Manifest.txt to include ALL files' - task :refresh do - `rake check_manifest | patch -p0 > Manifest.txt` - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/tasks/environment.rake b/ruby/processing/star_field/library/oauth-0.3.2/tasks/environment.rake deleted file mode 100644 index 691ed3b..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/tasks/environment.rake +++ /dev/null @@ -1,7 +0,0 @@ -task :ruby_env do - RUBY_APP = if RUBY_PLATFORM =~ /java/ - "jruby" - else - "ruby" - end unless defined? RUBY_APP -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/tasks/website.rake b/ruby/processing/star_field/library/oauth-0.3.2/tasks/website.rake deleted file mode 100644 index 93e03fa..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/tasks/website.rake +++ /dev/null @@ -1,17 +0,0 @@ -desc 'Generate website files' -task :website_generate => :ruby_env do - (Dir['website/**/*.txt'] - Dir['website/version*.txt']).each do |txt| - sh %{ #{RUBY_APP} script/txt2html #{txt} > #{txt.gsub(/txt$/,'html')} } - end -end - -desc 'Upload website files to rubyforge' -task :website_upload do - host = "#{rubyforge_username}@rubyforge.org" - remote_dir = "/var/www/gforge-projects/#{PATH}/" - local_dir = 'website' - sh %{rsync -aCv #{local_dir}/ #{host}:#{remote_dir}} -end - -desc 'Generate and upload website files' -task :website => [:website_generate, :website_upload, :publish_docs] diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/oauth_case.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/cases/oauth_case.rb deleted file mode 100644 index 51eaa0a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/oauth_case.rb +++ /dev/null @@ -1,19 +0,0 @@ -require 'test/unit' -require 'oauth/signature' -require 'oauth/request_proxy/mock_request' - - -class OAuthCase < Test::Unit::TestCase - # avoid whining about a lack of tests - def run(*args) - return if @method_name.to_s == "default_test" - super - end - - protected - - # Creates a fake request - def request(params={},method='GET',uri="http://photos.example.net/photos") - OAuth::RequestProxy.proxy({'parameters'=>params,'method'=>method,'uri'=>uri}) - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_construct_request_url.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_construct_request_url.rb deleted file mode 100644 index 879b74e..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_construct_request_url.rb +++ /dev/null @@ -1,62 +0,0 @@ -require File.dirname(__FILE__) + '/../../oauth_case' - -# See http://oauth.net/core/1.0/#anchor14 -# -#9.1.2. Construct Request URL -# -#The Signature Base String includes the request absolute URL, tying the signature to a specific endpoint. The URL used in the Signature Base String MUST include the scheme, authority, and path, and MUST exclude the query and fragment as defined by [RFC3986] section 3. -# -#If the absolute request URL is not available to the Service Provider (it is always available to the Consumer), it can be constructed by combining the scheme being used, the HTTP Host header, and the relative HTTP request URL. If the Host header is not available, the Service Provider SHOULD use the host name communicated to the Consumer in the documentation or other means. -# -#The Service Provider SHOULD document the form of URL used in the Signature Base String to avoid ambiguity due to URL normalization. Unless specified, URL scheme and authority MUST be lowercase and include the port number; http default port 80 and https default port 443 MUST be excluded. -# -#For example, the request: -# -# HTTP://Example.com:80/resource?id=123 -#Is included in the Signature Base String as: -# -# http://example.com/resource - - -class ConstructRequestUrlTest < OAuthCase - - def test_from_spec - assert_request_url("http://example.com/resource","HTTP://Example.com:80/resource?id=123") - end - - def test_simple_url_with_ending_slash - assert_request_url("http://example.com/","http://example.com/") - end - - def test_simple_url_without_ending_slash - assert_request_url("http://example.com/","http://example.com") - end - - def test_of_normalized_http - assert_request_url("http://example.com/resource","http://example.com/resource") - end - - def test_of_https - assert_request_url("https://example.com/resource","HTTPS://Example.com:443/resource?id=123") - end - - def test_of_normalized_https - assert_request_url("https://example.com/resource","https://example.com/resource") - end - - def test_of_http_with_non_standard_port - assert_request_url("http://example.com:8080/resource","http://example.com:8080/resource") - end - - def test_of_https_with_non_standard_port - assert_request_url("https://example.com:8080/resource","https://example.com:8080/resource") - end - - protected - - - def assert_request_url(expected,given,message=nil) - assert_equal expected, request({},'GET',given).normalized_uri, message - end - -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_normalize_request_parameters.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_normalize_request_parameters.rb deleted file mode 100644 index 76d6e5a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_normalize_request_parameters.rb +++ /dev/null @@ -1,88 +0,0 @@ -require File.dirname(__FILE__) + '/../../oauth_case' - -# See http://oauth.net/core/1.0/#anchor14 -# -# 9.1.1. Normalize Request Parameters -# -# The request parameters are collected, sorted and concatenated into a normalized string: -# -# Parameters in the OAuth HTTP Authorization header excluding the realm parameter. -# Parameters in the HTTP POST request body (with a content-type of application/x-www-form-urlencoded). -# HTTP GET parameters added to the URLs in the query part (as defined by [RFC3986] section 3). -# The oauth_signature parameter MUST be excluded. -# -# The parameters are normalized into a single string as follows: -# -# Parameters are sorted by name, using lexicographical byte value ordering. -# If two or more parameters share the same name, they are sorted by their value. For example: -# -# a=1, c=hi%20there, f=25, f=50, f=a, z=p, z=t -# Parameters are concatenated in their sorted order into a single string. For each parameter, -# the name is separated from the corresponding value by an ‘=’ character (ASCII code 61), even -# if the value is empty. Each name-value pair is separated by an ‘&’ character (ASCII code 38). For example: -# a=1&c=hi%20there&f=25&f=50&f=a&z=p&z=t -# - - -class NormalizeRequestParametersTest < OAuthCase - - def test_parameters_for_signature - params={'a'=>1, 'c'=>'hi there', 'f'=>'25', 'f'=>'50', 'f'=>'a', 'z'=>'p', 'z'=>'t'} - assert_equal params,request(params).parameters_for_signature - end - - - def test_parameters_for_signature_removes_oauth_signature - params={'a'=>1, 'c'=>'hi there', 'f'=>'25', 'f'=>'50', 'f'=>'a', 'z'=>'p', 'z'=>'t'} - assert_equal params,request(params.merge({'oauth_signature'=>'blalbla'})).parameters_for_signature - end - - def test_spec_example - assert_normalized 'a=1&c=hi%20there&f=25&f=50&f=a&z=p&z=t', { 'a' => 1, 'c' => 'hi there', 'f' => ['25', '50', 'a'], 'z' => ['p', 't'] } - end - - def test_sorts_parameters_correctly - # values for 'f' are scrambled - assert_normalized 'a=1&c=hi%20there&f=5&f=70&f=a&z=p&z=t', { 'a' => 1, 'c' => 'hi there', 'f' => ['a', '70', '5'], 'z' => ['p', 't'] } - end - - def test_empty - assert_normalized "",{} - end - - - # These are from the wiki http://wiki.oauth.net/TestCases - # in the section Normalize Request Parameters - # Parameters have already been x-www-form-urlencoded (i.e. + = ) - def test_wiki1 - assert_normalized "name=",{"name"=>nil} - end - - def test_wiki2 - assert_normalized "a=b",{'a'=>'b'} - end - - def test_wiki3 - assert_normalized "a=b&c=d",{'a'=>'b','c'=>'d'} - end - - def test_wiki4 - assert_normalized "a=x%20y&a=x%21y",{'a'=>["x!y","x y"]} - - end - - def test_wiki5 - assert_normalized "x=a&x%21y=a",{"x!y"=>'a','x'=>'a'} - end - - protected - - - def assert_normalized(expected,params,message=nil) - assert_equal expected, normalize_request_parameters(params), message - end - - def normalize_request_parameters(params={}) - request(params).normalized_parameters - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_parameter_encodings.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_parameter_encodings.rb deleted file mode 100644 index 3ce0726..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_parameter_encodings.rb +++ /dev/null @@ -1,86 +0,0 @@ -require File.dirname(__FILE__) + '/../../oauth_case' - -# See http://oauth.net/core/1.0/#encoding_parameters -# -# 5.1. Parameter Encoding -# -# All parameter names and values are escaped using the [RFC3986] percent-encoding (%xx) mechanism. -# Characters not in the unreserved character set ([RFC3986] section 2.3) MUST be encoded. Characters -# in the unreserved character set MUST NOT be encoded. Hexadecimal characters in encodings MUST be -# upper case. Text names and values MUST be encoded as UTF-8 octets before percent-encoding them per [RFC3629]. -# -# unreserved = ALPHA, DIGIT, '-', '.', '_', '~' -# - -class ParameterEncodingTest < OAuthCase - def test_encodings_alpha_num - assert_encoding 'abcABC123', 'abcABC123' - end - - def test_encodings_non_escaped - assert_encoding '-._~', '-._~' - end - - def test_encodings_percent - assert_encoding '%25', '%' - end - - def test_encodings_plus - assert_encoding '%2B', '+' - end - - def test_encodings_space - assert_encoding '%20', ' ' - end - - def test_encodings_query_param_symbols - assert_encoding '%26%3D%2A', '&=*' - end - - def test_encodings_unicode_lf - assert_encoding '%0A', unicode_to_utf8('U+000A') - end - - def test_encodings_unicode_space - assert_encoding '%20', unicode_to_utf8('U+0020') - end - - def test_encodings_unicode_007f - assert_encoding '%7F', unicode_to_utf8('U+007F') - end - - def test_encodings_unicode_0080 - assert_encoding '%C2%80', unicode_to_utf8('U+0080') - end - - def test_encoding_unicode_2708 - assert_encoding '%E2%9C%88', unicode_to_utf8('U+2708') - end - - def test_encodings_unicode_3001 - assert_encoding '%E3%80%81', unicode_to_utf8('U+3001') - end - -protected - - def unicode_to_utf8(unicode) - return unicode if unicode =~ /\A[[:space:]]*\z/m - - str = '' - - unicode.scan(/(U\+(?:[[:digit:][:xdigit:]]{4,5}|10[[:digit:][:xdigit:]]{4})|.)/mu) do - c = $1 - if c =~ /^U\+/ - str << [c[2..-1].hex].pack('U*') - else - str << c - end - end - - str - end - - def assert_encoding(expected, given, message = nil) - assert_equal expected, OAuth::Helper.escape(given), message - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_signature_base_strings.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_signature_base_strings.rb deleted file mode 100644 index fc099b5..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/cases/spec/1_0-final/test_signature_base_strings.rb +++ /dev/null @@ -1,77 +0,0 @@ -require File.dirname(__FILE__) + '/../../oauth_case' - -# See http://oauth.net/core/1.0/#anchor14 -# -# 9.1. Signature Base String -# -# The Signature Base String is a consistent reproducible concatenation of the request elements -# into a single string. The string is used as an input in hashing or signing algorithms. The -# HMAC-SHA1 signature method provides both a standard and an example of using the Signature -# Base String with a signing algorithm to generate signatures. All the request parameters MUST -# be encoded as described in Parameter Encoding prior to constructing the Signature Base String. -# - -class SignatureBaseStringTest < OAuthCase - - def test_A_5_1 - parameters={ - 'oauth_consumer_key'=>'dpf43f3p2l4k3l03', - 'oauth_token'=>'nnch734d00sl2jdk', - 'oauth_signature_method'=>'HMAC-SHA1', - 'oauth_timestamp'=>'1191242096', - 'oauth_nonce'=>'kllo9940pd9333jh', - 'oauth_version'=>'1.0', - 'file'=>'vacation.jpg', - 'size'=>'original' - } - sbs='GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal' - - assert_signature_base_string sbs,parameters,'GET',"http://photos.example.net/photos" - end - - # These are from the wiki http://wiki.oauth.net/TestCases - # in the section Concatenate Test Elements - - def test_wiki_1_simple_with_ending_slash - parameters={ - 'n'=>'v' - } - sbs='GET&http%3A%2F%2Fexample.com%2F&n%3Dv' - - assert_signature_base_string sbs,parameters,'GET',"http://example.com/" - end - - - def test_wiki_2_simple_without_ending_slash - parameters={ - 'n'=>'v' - } - sbs='GET&http%3A%2F%2Fexample.com%2F&n%3Dv' - - assert_signature_base_string sbs,parameters,'GET',"http://example.com" - end - - def test_wiki_2_request_token - parameters={ -'oauth_version'=>'1.0', -'oauth_consumer_key'=>'dpf43f3p2l4k3l03', -'oauth_timestamp'=>'1191242090', -'oauth_nonce'=>'hsu94j3884jdopsl', -'oauth_signature_method'=>'PLAINTEXT', -'oauth_signature'=>'ignored' } - sbs='POST&https%3A%2F%2Fphotos.example.net%2Frequest_token&oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dhsu94j3884jdopsl%26oauth_signature_method%3DPLAINTEXT%26oauth_timestamp%3D1191242090%26oauth_version%3D1.0' - - assert_signature_base_string sbs,parameters,'POST',"https://photos.example.net/request_token" - end - - protected - - - def assert_signature_base_string(expected,params={},method='GET',uri="http://photos.example.net/photos",message="Signature Base String does not match") - assert_equal expected, signature_base_string(params,method,uri), message - end - - def signature_base_string(params={},method='GET',uri="http://photos.example.net/photos") - request(params,method,uri).signature_base_string - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.cert b/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.cert deleted file mode 100644 index f7b5c09..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.cert +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIBpjCCAQ+gAwIBAgIBATANBgkqhkiG9w0BAQUFADAZMRcwFQYDVQQDDA5UZXN0 -IFByaW5jaXBhbDAeFw03MDAxMDEwODAwMDBaFw0zODEyMzEwODAwMDBaMBkxFzAV -BgNVBAMMDlRlc3QgUHJpbmNpcGFsMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB -gQC0YjCwIfYoprq/FQO6lb3asXrxLlJFuCvtinTF5p0GxvQGu5O3gYytUvtC2JlY -zypSRjVxwxrsuRcP3e641SdASwfrmzyvIgP08N4S0IFzEURkV1wp/IpH7kH41Etb -mUmrXSwfNZsnQRE5SYSOhh+LcK2wyQkdgcMv11l4KoBkcwIDAQABMA0GCSqGSIb3 -DQEBBQUAA4GBAGZLPEuJ5SiJ2ryq+CmEGOXfvlTtEL2nuGtr9PewxkgnOjZpUy+d -4TvuXJbNQc8f4AMWL/tO9w0Fk80rWKp9ea8/df4qMq5qlFWlx6yOLQxumNOmECKb -WpkUQDIDJEoFUzKMVuJf4KO/FJ345+BNLGgbJ6WujreoM1X/gYfdnJ/J ------END CERTIFICATE----- \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.pem b/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.pem deleted file mode 100644 index e0f5542..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/keys/rsa.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALRiMLAh9iimur8V -A7qVvdqxevEuUkW4K+2KdMXmnQbG9Aa7k7eBjK1S+0LYmVjPKlJGNXHDGuy5Fw/d -7rjVJ0BLB+ubPK8iA/Tw3hLQgXMRRGRXXCn8ikfuQfjUS1uZSatdLB81mydBETlJ -hI6GH4twrbDJCR2Bwy/XWXgqgGRzAgMBAAECgYBYWVtleUzavkbrPjy0T5FMou8H -X9u2AC2ry8vD/l7cqedtwMPp9k7TubgNFo+NGvKsl2ynyprOZR1xjQ7WgrgVB+mm -uScOM/5HVceFuGRDhYTCObE+y1kxRloNYXnx3ei1zbeYLPCHdhxRYW7T0qcynNmw -rn05/KO2RLjgQNalsQJBANeA3Q4Nugqy4QBUCEC09SqylT2K9FrrItqL2QKc9v0Z -zO2uwllCbg0dwpVuYPYXYvikNHHg+aCWF+VXsb9rpPsCQQDWR9TT4ORdzoj+Nccn -qkMsDmzt0EfNaAOwHOmVJ2RVBspPcxt5iN4HI7HNeG6U5YsFBb+/GZbgfBT3kpNG -WPTpAkBI+gFhjfJvRw38n3g/+UeAkwMI2TJQS4n8+hid0uus3/zOjDySH3XHCUno -cn1xOJAyZODBo47E+67R4jV1/gzbAkEAklJaspRPXP877NssM5nAZMU0/O/NGCZ+ -3jPgDUno6WbJn5cqm8MqWhW1xGkImgRk+fkDBquiq4gPiT898jusgQJAd5Zrr6Q8 -AO/0isr/3aa6O6NLQxISLKcPDk2NOccAfS/xOtfOz4sJYM3+Bs4Io9+dZGSDCA54 -Lw03eHTNQghS0A== ------END PRIVATE KEY----- \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_access_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_access_token.rb deleted file mode 100644 index 040e2db..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_access_token.rb +++ /dev/null @@ -1,28 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/token' -require 'oauth/consumer' - -class TestAccessToken < Test::Unit::TestCase - def setup - @fake_response = { - :user_id => 5734758743895, - :oauth_token => "key", - :oauth_token_secret => "secret" - } - # setup a fake req. token. mocking Consumer would be more appropriate... - @access_token = OAuth::AccessToken.from_hash( - OAuth::Consumer.new("key", "secret", {}), - @fake_response - ) - end - - def test_provides_response_parameters - assert @access_token - assert_respond_to @access_token, :params - end - - def test_access_token_makes_non_oauth_response_params_available - assert_not_nil @access_token.params[:user_id] - assert_equal 5734758743895, @access_token.params[:user_id] - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_action_controller_request_proxy.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_action_controller_request_proxy.rb deleted file mode 100644 index bc739d9..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_action_controller_request_proxy.rb +++ /dev/null @@ -1,45 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/request_proxy/action_controller_request.rb' -require 'action_controller' -require 'action_controller/test_process' - -class ActionControllerRequestProxyTest < Test::Unit::TestCase - - def request_proxy(parameters={}) - request = ActionController::TestRequest.new({}, parameters) - request.env['CONTENT_TYPE'] = 'application/x-www-form-urlencoded' - yield request if block_given? - OAuth::RequestProxy.proxy(request) - end - - def test_parameter_keys_should_preserve_brackets_from_hash - assert_equal( - [["message[body]", "This is a test"]], - request_proxy({ :message => { :body => 'This is a test' }}).parameters_for_signature - ) - end - - def test_parameter_values_with_amps_should_not_break_parameter_parsing - assert_equal( - [['message[body]', 'http://foo.com/?a=b&c=d']], - request_proxy({ :message => { :body => 'http://foo.com/?a=b&c=d'}}).parameters_for_signature - ) - end - - def test_parameter_keys_should_preserve_brackets_from_array - assert_equal( - [["foo[]", "123"], ["foo[]", "456"]], - request_proxy({ :foo => [123, 456] }).parameters_for_signature.sort - ) - end - - def test_query_string_parameter_values_should_be_cgi_unescaped - request = request_proxy do |r| - r.env['QUERY_STRING'] = 'url=http%3A%2F%2Ffoo.com%2F%3Fa%3Db%26c%3Dd' - end - assert_equal( - [['url', 'http://foo.com/?a=b&c=d']], - request.parameters_for_signature.sort - ) - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_consumer.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_consumer.rb deleted file mode 100644 index 580ffcd..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_consumer.rb +++ /dev/null @@ -1,327 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper' -require 'oauth/consumer' -require 'oauth/signature/rsa/sha1' - - -# This performs testing against Andy Smith's test server http://term.ie/oauth/example/ -# Thanks Andy. -# This also means you have to be online to be able to run these. -class ConsumerTest < Test::Unit::TestCase - def setup - @consumer=OAuth::Consumer.new( - 'consumer_key_86cad9', '5888bf0345e5d237', - { - :site=>"http://blabla.bla", - :request_token_path=>"/oauth/example/request_token.php", - :access_token_path=>"/oauth/example/access_token.php", - :authorize_path=>"/oauth/example/authorize.php", - :scheme=>:header, - :http_method=>:get - }) - @token = OAuth::ConsumerToken.new(@consumer,'token_411a7f', '3196ffd991c8ebdb') - @request_uri = URI.parse('http://example.com/test?key=value') - @request_parameters = { 'key' => 'value' } - @nonce = 225579211881198842005988698334675835446 - @timestamp = "1199645624" - @consumer.http=Net::HTTP.new(@request_uri.host, @request_uri.port) - end - - def test_initializer - assert_equal "consumer_key_86cad9",@consumer.key - assert_equal "5888bf0345e5d237",@consumer.secret - assert_equal "http://blabla.bla",@consumer.site - assert_equal "/oauth/example/request_token.php",@consumer.request_token_path - assert_equal "/oauth/example/access_token.php",@consumer.access_token_path - assert_equal "http://blabla.bla/oauth/example/request_token.php",@consumer.request_token_url - assert_equal "http://blabla.bla/oauth/example/access_token.php",@consumer.access_token_url - assert_equal "http://blabla.bla/oauth/example/authorize.php",@consumer.authorize_url - assert_equal :header,@consumer.scheme - assert_equal :get,@consumer.http_method - end - - def test_defaults - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://twitter.com" - }) - assert_equal "key",@consumer.key - assert_equal "secret",@consumer.secret - assert_equal "http://twitter.com",@consumer.site - assert_equal "/oauth/request_token",@consumer.request_token_path - assert_equal "/oauth/access_token",@consumer.access_token_path - assert_equal "http://twitter.com/oauth/request_token",@consumer.request_token_url - assert_equal "http://twitter.com/oauth/access_token",@consumer.access_token_url - assert_equal "http://twitter.com/oauth/authorize",@consumer.authorize_url - assert_equal :header,@consumer.scheme - assert_equal :post,@consumer.http_method - end - - def test_override_paths - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://twitter.com", - :request_token_url=>"http://oauth.twitter.com/request_token", - :access_token_url=>"http://oauth.twitter.com/access_token", - :authorize_url=>"http://site.twitter.com/authorize" - }) - assert_equal "key",@consumer.key - assert_equal "secret",@consumer.secret - assert_equal "http://twitter.com",@consumer.site - assert_equal "/oauth/request_token",@consumer.request_token_path - assert_equal "/oauth/access_token",@consumer.access_token_path - assert_equal "http://oauth.twitter.com/request_token",@consumer.request_token_url - assert_equal "http://oauth.twitter.com/access_token",@consumer.access_token_url - assert_equal "http://site.twitter.com/authorize",@consumer.authorize_url - assert_equal :header,@consumer.scheme - assert_equal :post,@consumer.http_method - end - - def test_that_signing_auth_headers_on_get_requests_works - request = Net::HTTP::Get.new(@request_uri.path + "?" + request_parameters_to_s) - @token.sign!(request, {:nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'GET', request.method - assert_equal '/test?key=value', request.path - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_setting_signature_method_on_consumer_effects_signing - require 'oauth/signature/plaintext' - request = Net::HTTP::Get.new(@request_uri.path) - consumer = @consumer.dup - consumer.options[:signature_method] = 'PLAINTEXT' - token = OAuth::ConsumerToken.new(consumer, 'token_411a7f', '3196ffd991c8ebdb') - token.sign!(request, {:nonce => @nonce, :timestamp => @timestamp}) - - assert_no_match( /oauth_signature_method="HMAC-SHA1"/, request['authorization']) - assert_match( /oauth_signature_method="PLAINTEXT"/, request['authorization']) - end - - def test_that_setting_signature_method_on_consumer_effects_signature_base_string - require 'oauth/signature/plaintext' - request = Net::HTTP::Get.new(@request_uri.path) - consumer = @consumer.dup - consumer.options[:signature_method] = 'PLAINTEXT' - - request = Net::HTTP::Get.new('/') - signature_base_string = consumer.signature_base_string(request) - - assert_no_match( /HMAC-SHA1/, signature_base_string) - assert_equal( "#{consumer.secret}%26", signature_base_string) - end - - def test_that_plaintext_signature_works - require 'oauth/signature/plaintext' - consumer = OAuth::Consumer.new("key", "secret", - :site => "http://term.ie", :signature_method => 'PLAINTEXT') - access_token = OAuth::AccessToken.new(consumer, 'accesskey', 'accesssecret') - response = access_token.get("/oauth/example/echo_api.php?echo=hello") - - assert_equal 'echo=hello', response.body - end - - def test_that_signing_auth_headers_on_post_requests_works - request = Net::HTTP::Post.new(@request_uri.path) - request.set_form_data( @request_parameters ) - @token.sign!(request, {:nonce => @nonce, :timestamp => @timestamp}) -# assert_equal "",request.oauth_helper.signature_base_string - - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal 'key=value', request.body - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"26g7wHTtNO6ZWJaLltcueppHYiI%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_signing_post_params_works - request = Net::HTTP::Post.new(@request_uri.path) - request.set_form_data( @request_parameters ) - @token.sign!(request, {:scheme => 'body', :nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&") - assert_equal nil, request['authorization'] - end - - def test_that_using_auth_headers_on_get_on_create_signed_requests_works - request=@consumer.create_signed_request(:get,@request_uri.path+ "?" + request_parameters_to_s,@token,{:nonce => @nonce, :timestamp => @timestamp},@request_parameters) - - assert_equal 'GET', request.method - assert_equal '/test?key=value', request.path - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_using_auth_headers_on_post_on_create_signed_requests_works - request=@consumer.create_signed_request(:post,@request_uri.path,@token,{:nonce => @nonce, :timestamp => @timestamp},@request_parameters,{}) - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal 'key=value', request.body - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"26g7wHTtNO6ZWJaLltcueppHYiI%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_signing_post_params_works_2 - request=@consumer.create_signed_request(:post,@request_uri.path,@token,{:scheme => 'body', :nonce => @nonce, :timestamp => @timestamp},@request_parameters,{}) - - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&") - assert_equal nil, request['authorization'] - end - - def test_step_by_step_token_request - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://term.ie", - :request_token_path=>"/oauth/example/request_token.php", - :access_token_path=>"/oauth/example/access_token.php", - :authorize_path=>"/oauth/example/authorize.php", - :scheme=>:header - }) - options={:nonce=>'nonce',:timestamp=>Time.now.to_i.to_s} - - request = Net::HTTP::Get.new("/oauth/example/request_token.php") - signature_base_string=@consumer.signature_base_string(request,nil,options) - assert_equal "GET&http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&oauth_consumer_key%3Dkey%26oauth_nonce%3D#{options[:nonce]}%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D#{options[:timestamp]}%26oauth_version%3D1.0",signature_base_string - @consumer.sign!(request, nil,options) - - assert_equal 'GET', request.method - assert_equal nil, request.body - response=@consumer.http.request(request) - assert_equal "200",response.code - assert_equal "oauth_token=requestkey&oauth_token_secret=requestsecret",response.body - end - - def test_get_token_sequence - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://term.ie", - :request_token_path=>"/oauth/example/request_token.php", - :access_token_path=>"/oauth/example/access_token.php", - :authorize_path=>"/oauth/example/authorize.php" - }) - assert_equal "http://term.ie/oauth/example/request_token.php",@consumer.request_token_url - assert_equal "http://term.ie/oauth/example/access_token.php",@consumer.access_token_url - - assert !@consumer.request_token_url?, "Should not use fully qualified request token url" - assert !@consumer.access_token_url?, "Should not use fully qualified access token url" - assert !@consumer.authorize_url?, "Should not use fully qualified url" - - @request_token=@consumer.get_request_token - assert_not_nil @request_token - assert_equal "requestkey",@request_token.token - assert_equal "requestsecret",@request_token.secret - assert_equal "http://term.ie/oauth/example/authorize.php?oauth_token=requestkey",@request_token.authorize_url - - @access_token=@request_token.get_access_token - assert_not_nil @access_token - assert_equal "accesskey",@access_token.token - assert_equal "accesssecret",@access_token.secret - - @response=@access_token.get("/oauth/example/echo_api.php?ok=hello&test=this") - assert_not_nil @response - assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) - - @response=@access_token.post("/oauth/example/echo_api.php",{'ok'=>'hello','test'=>'this'}) - assert_not_nil @response - assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) - end - - def test_get_token_sequence_using_fqdn - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://term.ie", - :request_token_url=>"http://term.ie/oauth/example/request_token.php", - :access_token_url=>"http://term.ie/oauth/example/access_token.php", - :authorize_url=>"http://term.ie/oauth/example/authorize.php" - }) - assert_equal "http://term.ie/oauth/example/request_token.php",@consumer.request_token_url - assert_equal "http://term.ie/oauth/example/access_token.php",@consumer.access_token_url - - assert @consumer.request_token_url?, "Should use fully qualified request token url" - assert @consumer.access_token_url?, "Should use fully qualified access token url" - assert @consumer.authorize_url?, "Should use fully qualified url" - - @request_token=@consumer.get_request_token - assert_not_nil @request_token - assert_equal "requestkey",@request_token.token - assert_equal "requestsecret",@request_token.secret - assert_equal "http://term.ie/oauth/example/authorize.php?oauth_token=requestkey",@request_token.authorize_url - - @access_token=@request_token.get_access_token - assert_not_nil @access_token - assert_equal "accesskey",@access_token.token - assert_equal "accesssecret",@access_token.secret - - @response=@access_token.get("/oauth/example/echo_api.php?ok=hello&test=this") - assert_not_nil @response - assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) - - @response=@access_token.post("/oauth/example/echo_api.php",{'ok'=>'hello','test'=>'this'}) - assert_not_nil @response - assert_equal "200",@response.code - assert_equal( "ok=hello&test=this",@response.body) - end - - - # This test does an actual https request (the result doesn't matter) - # to initialize the same way as get_request_token does. Can be any - # site that supports https. - # - # It also generates "warning: using default DH parameters." which I - # don't know how to get rid of -# def test_serialization_with_https -# consumer = OAuth::Consumer.new('token', 'secret', :site => 'https://plazes.net') -# consumer.http.verify_mode = OpenSSL::SSL::VERIFY_NONE -# consumer.http.get('/') -# -# assert_nothing_raised do -# # Specifically this should not raise TypeError: no marshal_dump -# # is defined for class OpenSSL::SSL::SSLContext -# Marshal.dump(consumer) -# end -# end -# - def test_get_request_token_with_custom_arguments - @consumer=OAuth::Consumer.new( - "key", - "secret", - { - :site=>"http://term.ie", - :request_token_path=>"/oauth/example/request_token.php", - :access_token_path=>"/oauth/example/access_token.php", - :authorize_path=>"/oauth/example/authorize.php" - }) - - - debug = "" - @consumer.http.set_debug_output(debug) - - # get_request_token should receive our custom request_options and *arguments parameters from get_request_token. - @consumer.get_request_token({}, {:scope => "http://www.google.com/calendar/feeds http://picasaweb.google.com/data"}) - - # Because this is a POST request, create_http_request should take the first element of *arguments - # and turn it into URL-encoded data in the body of the POST. - assert_match( /^<- "scope=http%3a%2f%2fwww.google.com%2fcalendar%2ffeeds%20http%3a%2f%2fpicasaweb.google.com%2fdata"/, - debug) - end - - protected - - def request_parameters_to_s - @request_parameters.map { |k,v| "#{k}=#{v}" }.join("&") - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_helper.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_helper.rb deleted file mode 100644 index 940e32b..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -require 'test/unit' -require File.dirname(__FILE__) + '/../lib/oauth' - -begin - # load redgreen unless running from within TextMate (in which case ANSI - # color codes mess with the output) - require 'redgreen' unless ENV['TM_CURRENT_LINE'] -rescue LoadError - nil -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_hmac_sha1.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_hmac_sha1.rb deleted file mode 100644 index 81c3642..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_hmac_sha1.rb +++ /dev/null @@ -1,21 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/signature/hmac/sha1' - -class TestSignatureHmacSha1 < Test::Unit::TestCase - def test_that_hmac_sha1_implements_hmac_sha1 - assert OAuth::Signature.available_methods.include?('hmac-sha1') - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature - request = Net::HTTP::Get.new('/photos?file=vacation.jpg&size=original&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_token=nnch734d00sl2jdk&oauth_timestamp=1191242096&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=HMAC-SHA1') - - consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03', 'kd94hf93k423kf44') - token = OAuth::Token.new('nnch734d00sl2jdk', 'pfkkdhi9sl3r4s00') - - signature = OAuth::Signature.sign(request, { :consumer => consumer, - :token => token, - :uri => 'http://photos.example.net/photos' } ) - - assert_equal 'tR3+Ty81lMeYAr/Fid0kMTYa/WM=', signature - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_client.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_client.rb deleted file mode 100644 index 7e41f3c..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_client.rb +++ /dev/null @@ -1,169 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/client/net_http' - -class NetHTTPClientTest < Test::Unit::TestCase - - def setup - @consumer = OAuth::Consumer.new('consumer_key_86cad9', '5888bf0345e5d237') - @token = OAuth::Token.new('token_411a7f', '3196ffd991c8ebdb') - @request_uri = URI.parse('http://example.com/test?key=value') - @request_parameters = { 'key' => 'value' } - @nonce = 225579211881198842005988698334675835446 - @timestamp = "1199645624" - @http = Net::HTTP.new(@request_uri.host, @request_uri.port) - end - - def test_that_using_auth_headers_on_get_requests_works - request = Net::HTTP::Get.new(@request_uri.path + "?" + request_parameters_to_s) - request.oauth!(@http, @consumer, @token, {:nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'GET', request.method - assert_equal '/test?key=value', request.path - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"1oO2izFav1GP4kEH2EskwXkCRFg%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_using_auth_headers_on_post_requests_works - request = Net::HTTP::Post.new(@request_uri.path) - request.set_form_data( @request_parameters ) - request.oauth!(@http, @consumer, @token, {:nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal 'key=value', request.body - assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"26g7wHTtNO6ZWJaLltcueppHYiI%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort - end - - def test_that_using_post_params_works - request = Net::HTTP::Post.new(@request_uri.path) - request.set_form_data( @request_parameters ) - request.oauth!(@http, @consumer, @token, {:scheme => 'body', :nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'POST', request.method - assert_equal '/test', request.path - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&") - assert_equal nil, request['authorization'] - end - - def test_that_using_get_params_works - request = Net::HTTP::Get.new(@request_uri.path + "?" + request_parameters_to_s) - request.oauth!(@http, @consumer, @token, {:scheme => 'query_string', :nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'GET', request.method - uri = URI.parse(request.path) - assert_equal '/test', uri.path - assert_equal nil, uri.fragment - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=1oO2izFav1GP4kEH2EskwXkCRFg%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", uri.query.split("&").sort.join("&") - assert_equal nil, request['authorization'] - end - - def test_that_using_get_params_works_with_post_requests - request = Net::HTTP::Post.new(@request_uri.path + "?" + request_parameters_to_s) - request.oauth!(@http, @consumer, @token, {:scheme => 'query_string', :nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'POST', request.method - uri = URI.parse(request.path) - assert_equal '/test', uri.path - assert_equal nil, uri.fragment - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", uri.query.split("&").sort.join('&') - assert_equal nil, request.body - assert_equal nil, request['authorization'] - end - - def test_that_using_get_params_works_with_post_requests_that_have_post_bodies - request = Net::HTTP::Post.new(@request_uri.path + "?" + request_parameters_to_s) - request.set_form_data( { 'key2' => 'value2' } ) - request.oauth!(@http, @consumer, @token, {:scheme => :query_string, :nonce => @nonce, :timestamp => @timestamp}) - - assert_equal 'POST', request.method - uri = URI.parse(request.path) - assert_equal '/test', uri.path - assert_equal nil, uri.fragment - assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=4kSU8Zd1blWo3W6qJH7eaRTMkg0%3D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", uri.query.split("&").sort.join('&') - assert_equal "key2=value2", request.body - assert_equal nil, request['authorization'] - end - - - def test_example_from_specs - consumer=OAuth::Consumer.new("dpf43f3p2l4k3l03","kd94hf93k423kf44") - token = OAuth::Token.new('nnch734d00sl2jdk', 'pfkkdhi9sl3r4s00') - request_uri = URI.parse('http://photos.example.net/photos?file=vacation.jpg&size=original') - nonce = 'kllo9940pd9333jh' - timestamp = "1191242096" - http = Net::HTTP.new(request_uri.host, request_uri.port) - - request = Net::HTTP::Get.new(request_uri.path + "?" + request_uri.query) - signature_base_string=request.signature_base_string(http, consumer, token, {:nonce => nonce, :timestamp => timestamp}) - assert_equal 'GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacation.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3Dkllo9940pd9333jh%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1191242096%26oauth_token%3Dnnch734d00sl2jdk%26oauth_version%3D1.0%26size%3Doriginal',signature_base_string - -# request = Net::HTTP::Get.new(request_uri.path + "?" + request_uri.query) - request.oauth!(http, consumer, token, {:nonce => nonce, :timestamp => timestamp,:realm=>"http://photos.example.net/"}) - - assert_equal 'GET', request.method - assert_equal 'OAuth realm="http://photos.example.net/", oauth_nonce="kllo9940pd9333jh", oauth_signature_method="HMAC-SHA1", oauth_token="nnch734d00sl2jdk", oauth_timestamp="1191242096", oauth_consumer_key="dpf43f3p2l4k3l03", oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D", oauth_version="1.0"'.split(', ').sort, request['authorization'].split(', ').sort - - end - - def test_step_by_step_token_request - consumer=OAuth::Consumer.new( - "key", - "secret") - request_uri = URI.parse('http://term.ie/oauth/example/request_token.php') - nonce = rand(2**128).to_s - timestamp = Time.now.to_i.to_s - http = Net::HTTP.new(request_uri.host, request_uri.port) - - request = Net::HTTP::Get.new(request_uri.path) - signature_base_string=request.signature_base_string(http, consumer, nil, {:scheme=>:query_string,:nonce => nonce, :timestamp => timestamp}) - assert_equal "GET&http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&oauth_consumer_key%3Dkey%26oauth_nonce%3D#{nonce}%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D#{timestamp}%26oauth_version%3D1.0",signature_base_string - -# request = Net::HTTP::Get.new(request_uri.path) - request.oauth!(http, consumer, nil, {:scheme=>:query_string,:nonce => nonce, :timestamp => timestamp}) - assert_equal 'GET', request.method - assert_nil request.body - assert_nil request['authorization'] -# assert_equal 'OAuth oauth_nonce="kllo9940pd9333jh", oauth_signature_method="HMAC-SHA1", oauth_token="", oauth_timestamp="'+timestamp+'", oauth_consumer_key="key", oauth_signature="tR3%2BTy81lMeYAr%2FFid0kMTYa%2FWM%3D", oauth_version="1.0"', request['authorization'] - - response=http.request(request) - assert_equal "200",response.code -# assert_equal request['authorization'],response.body - assert_equal "oauth_token=requestkey&oauth_token_secret=requestsecret",response.body - end - - def test_that_put_bodies_not_signed - request = Net::HTTP::Put.new(@request_uri.path) - request.body = "baz" - request["Content-Type"] = "application/xml" - signature_base_string=request.signature_base_string(@http, @consumer, nil, { :nonce => @nonce, :timestamp => @timestamp }) - assert_equal "PUT&http%3A%2F%2Fexample.com%2Ftest&oauth_consumer_key%3Dconsumer_key_86cad9%26oauth_nonce%3D225579211881198842005988698334675835446%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1199645624%26oauth_version%3D1.0", signature_base_string - end - - def test_that_put_bodies_not_signed_even_if_form_urlencoded - request = Net::HTTP::Put.new(@request_uri.path) - request.set_form_data( { 'key2' => 'value2' } ) - signature_base_string=request.signature_base_string(@http, @consumer, nil, { :nonce => @nonce, :timestamp => @timestamp }) - assert_equal "PUT&http%3A%2F%2Fexample.com%2Ftest&oauth_consumer_key%3Dconsumer_key_86cad9%26oauth_nonce%3D225579211881198842005988698334675835446%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1199645624%26oauth_version%3D1.0", signature_base_string - end - - def test_that_post_bodies_signed_if_form_urlencoded - request = Net::HTTP::Post.new(@request_uri.path) - request.set_form_data( { 'key2' => 'value2' } ) - signature_base_string=request.signature_base_string(@http, @consumer, nil, { :nonce => @nonce, :timestamp => @timestamp }) - assert_equal "POST&http%3A%2F%2Fexample.com%2Ftest&key2%3Dvalue2%26oauth_consumer_key%3Dconsumer_key_86cad9%26oauth_nonce%3D225579211881198842005988698334675835446%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1199645624%26oauth_version%3D1.0", signature_base_string - end - - def test_that_post_bodies_not_signed_if_other_content_type - request = Net::HTTP::Post.new(@request_uri.path) - request.body = "baz" - request["Content-Type"] = "application/xml" - signature_base_string=request.signature_base_string(@http, @consumer, nil, { :nonce => @nonce, :timestamp => @timestamp }) - assert_equal "POST&http%3A%2F%2Fexample.com%2Ftest&oauth_consumer_key%3Dconsumer_key_86cad9%26oauth_nonce%3D225579211881198842005988698334675835446%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1199645624%26oauth_version%3D1.0", signature_base_string - end - - protected - - def request_parameters_to_s - @request_parameters.map { |k,v| "#{k}=#{v}" }.join("&") - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_request_proxy.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_request_proxy.rb deleted file mode 100644 index 1358a5a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_net_http_request_proxy.rb +++ /dev/null @@ -1,38 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/request_proxy/net_http' - -class NetHTTPRequestProxyTest < Test::Unit::TestCase - - def test_that_proxy_simple_get_request_works - request = Net::HTTP::Get.new('/test?key=value') - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test?key=value'}) - - expected_parameters = {'key' => ['value']} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'GET', request_proxy.method - end - - def test_that_proxy_simple_post_request_works - request = Net::HTTP::Post.new('/test') - params = {'key' => 'value'} - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test', :parameters => params}) - - expected_parameters = {'key' => ['value']} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'POST', request_proxy.method - end - - def test_that_proxy_post_and_get_request_works - request = Net::HTTP::Post.new('/test?key=value') - params = {'key2' => 'value2'} - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test?key=value', :parameters => params}) - - expected_parameters = {'key' => ['value'], 'key2' => ['value2']} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'POST', request_proxy.method - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_rack_request_proxy.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_rack_request_proxy.rb deleted file mode 100644 index 4d9fba9..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_rack_request_proxy.rb +++ /dev/null @@ -1,40 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/request_proxy/rack_request' -require 'rack/request' -require 'rack/mock' - -class RackRequestProxyTest < Test::Unit::TestCase - - def test_that_proxy_simple_get_request_works - request = Rack::Request.new(Rack::MockRequest.env_for('http://example.com/test?key=value')) - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test?key=value'}) - - expected_parameters = {'key' => 'value'} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'GET', request_proxy.method - end - - def test_that_proxy_simple_post_request_works - request = Rack::Request.new(Rack::MockRequest.env_for('http://example.com/test', :method => 'POST')) - params = {'key' => 'value'} - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test', :parameters => params}) - - expected_parameters = {'key' => 'value'} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'POST', request_proxy.method - end - - def test_that_proxy_post_and_get_request_works - request = Rack::Request.new(Rack::MockRequest.env_for('http://example.com/test?key=value', :method => 'POST', :input => 'key2=value2')) - params = {'key2' => 'value2'} - request_proxy = OAuth::RequestProxy.proxy(request, {:uri => 'http://example.com/test?key=value', :parameters => params}) - - expected_parameters = {'key' => 'value', 'key2' => 'value2'} - assert_equal expected_parameters, request_proxy.parameters - assert_equal 'http://example.com/test', request_proxy.normalized_uri - assert_equal 'POST', request_proxy.method - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_request_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_request_token.rb deleted file mode 100644 index 4d485c4..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_request_token.rb +++ /dev/null @@ -1,53 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/token' -require 'oauth/consumer' - -class StubbedToken < OAuth::RequestToken - define_method :build_authorize_url_promoted do |root_domain, params| - build_authorize_url root_domain, params - end -end - -class TestRequestToken < Test::Unit::TestCase - def setup - # setup a fake req. token. mocking Consumer would be more appropriate... - @request_token = OAuth::RequestToken.new( - OAuth::Consumer.new("key", "secret", {}), - "key", - "secret" - ) - end - - def test_request_token_builds_authorize_url_connectly_with_additional_params - auth_url = @request_token.authorize_url({:oauth_callback => "github.com"}) - assert_not_nil auth_url - assert_match(/oauth_token/, auth_url) - assert_match(/oauth_callback/, auth_url) - end - - def test_request_token_builds_authorize_url_connectly_with_no_or_nil_params - # we should only have 1 key in the url returned if we didn't pass anything. - # this is the only required param to authenticate the client. - auth_url = @request_token.authorize_url(nil) - assert_not_nil auth_url - assert_match(/\?oauth_token=/, auth_url) - - auth_url = @request_token.authorize_url - assert_not_nil auth_url - assert_match(/\?oauth_token=/, auth_url) - end - - #TODO: mock out the Consumer to test the Consumer/AccessToken interaction. - def test_get_access_token - end - - def test_build_authorize_url - @stubbed_token = StubbedToken.new(nil, nil, nil) - assert_respond_to @stubbed_token, :build_authorize_url_promoted - url = @stubbed_token.build_authorize_url_promoted( - "http://github.com/oauth/authorize", - {:foo => "bar bar"}) - assert url - assert_equal "http://github.com/oauth/authorize?foo=bar+bar", url - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_rsa_sha1.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_rsa_sha1.rb deleted file mode 100644 index 587da9c..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_rsa_sha1.rb +++ /dev/null @@ -1,59 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/consumer' -require 'oauth/signature/rsa/sha1' - -class TestSignatureRsaSha1 < Test::Unit::TestCase - - def setup - @request = Net::HTTP::Get.new('/photos?file=vacaction.jpg&size=original&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_timestamp=1196666512&oauth_nonce=13917289812797014437&oauth_signature_method=RSA-SHA1') - - @consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03', OpenSSL::PKey::RSA.new(IO.read(File.dirname(__FILE__) + "/keys/rsa.pem"))) - - end - - def test_that_rsa_sha1_implements_rsa_sha1 - assert OAuth::Signature.available_methods.include?('rsa-sha1') - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature_base_string - sbs = OAuth::Signature.signature_base_string(@request, { :consumer => @consumer, - :uri => 'http://photos.example.net/photos' } ) - - assert_equal 'GET&http%3A%2F%2Fphotos.example.net%2Fphotos&file%3Dvacaction.jpg%26oauth_consumer_key%3Ddpf43f3p2l4k3l03%26oauth_nonce%3D13917289812797014437%26oauth_signature_method%3DRSA-SHA1%26oauth_timestamp%3D1196666512%26oauth_version%3D1.0%26size%3Doriginal', sbs - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature - signature = OAuth::Signature.sign(@request, { :consumer => @consumer, - :uri => 'http://photos.example.net/photos' } ) - - assert_equal 'jvTp/wX1TYtByB1m+Pbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2/9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW//e+RinhejgCuzoH26dyF8iY2ZZ/5D1ilgeijhV/vBka5twt399mXwaYdCwFYE=', signature - - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature_using_private_key_file - @consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03',nil) - - signature = OAuth::Signature.sign(@request, { :consumer => @consumer, - :private_key_file=>File.dirname(__FILE__) + "/keys/rsa.pem", - :uri => 'http://photos.example.net/photos' } ) - - assert_equal 'jvTp/wX1TYtByB1m+Pbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2/9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW//e+RinhejgCuzoH26dyF8iY2ZZ/5D1ilgeijhV/vBka5twt399mXwaYdCwFYE=', signature - end - - def test_that_get_request_from_oauth_test_cases_verifies_signature - @request = Net::HTTP::Get.new('/photos?oauth_signature_method=RSA-SHA1&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_timestamp=1196666512&oauth_nonce=13917289812797014437&file=vacaction.jpg&size=original&oauth_signature=jvTp%2FwX1TYtByB1m%2BPbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2%2F9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW%2F%2Fe%2BRinhejgCuzoH26dyF8iY2ZZ%2F5D1ilgeijhV%2FvBka5twt399mXwaYdCwFYE%3D') - @consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03',OpenSSL::X509::Certificate.new(IO.read(File.dirname(__FILE__) + "/keys/rsa.cert"))) - - assert OAuth::Signature.verify(@request, { :consumer => @consumer, - :uri => 'http://photos.example.net/photos' } ) - - end - - def test_that_get_request_from_oauth_test_cases_verifies_signature_with_pem - @request = Net::HTTP::Get.new('/photos?oauth_signature_method=RSA-SHA1&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_timestamp=1196666512&oauth_nonce=13917289812797014437&file=vacaction.jpg&size=original&oauth_signature=jvTp%2FwX1TYtByB1m%2BPbyo0lnCOLIsyGCH7wke8AUs3BpnwZJtAuEJkvQL2%2F9n4s5wUmUl4aCI4BwpraNx4RtEXMe5qg5T1LVTGliMRpKasKsW%2F%2Fe%2BRinhejgCuzoH26dyF8iY2ZZ%2F5D1ilgeijhV%2FvBka5twt399mXwaYdCwFYE%3D') - assert OAuth::Signature.verify(@request, { :consumer => @consumer, - :uri => 'http://photos.example.net/photos' } ) - - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_server.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_server.rb deleted file mode 100644 index a0aa992..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_server.rb +++ /dev/null @@ -1,40 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper' -require 'oauth/server' -class ServerTest < Test::Unit::TestCase - def setup - @server=OAuth::Server.new "http://test.com" - end - - def test_default_paths - assert_equal "/oauth/request_token",@server.request_token_path - assert_equal "/oauth/authorize",@server.authorize_path - assert_equal "/oauth/access_token",@server.access_token_path - end - - def test_default_urls - assert_equal "http://test.com/oauth/request_token",@server.request_token_url - assert_equal "http://test.com/oauth/authorize",@server.authorize_url - assert_equal "http://test.com/oauth/access_token",@server.access_token_url - end - - def test_generate_consumer_credentials - consumer=@server.generate_consumer_credentials - assert_not_nil consumer.key - assert_not_nil consumer.secret - end - - def test_create_consumer - @consumer=@server.create_consumer - assert_not_nil @consumer - assert_not_nil @consumer.key - assert_not_nil @consumer.secret - assert_equal "http://test.com",@consumer.site - assert_equal "/oauth/request_token",@consumer.request_token_path - assert_equal "/oauth/authorize",@consumer.authorize_path - assert_equal "/oauth/access_token",@consumer.access_token_path - assert_equal "http://test.com/oauth/request_token",@consumer.request_token_url - assert_equal "http://test.com/oauth/authorize",@consumer.authorize_url - assert_equal "http://test.com/oauth/access_token",@consumer.access_token_url - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature.rb deleted file mode 100644 index 4772301..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature.rb +++ /dev/null @@ -1,11 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' - -class TestOauth < Test::Unit::TestCase - - def setup - end - - def test_truth - assert true - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_base.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_base.rb deleted file mode 100644 index bacdbad..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_base.rb +++ /dev/null @@ -1,32 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/signature/base' -require 'net/http' -class SignatureBaseTest < Test::Unit::TestCase - - def test_that_initialize_requires_one_request_argument - assert_raises ArgumentError do - OAuth::Signature::Base.new() - end - end - - def test_that_initialize_requires_a_valid_request_argument - request = nil - assert_raises TypeError do - OAuth::Signature::Base.new(request) { |token| - # just a stub - } - end - end - - def test_that_initialize_succeeds_when_the_request_proxy_is_valid - # this isn't quite valid, but it will do. - raw_request = Net::HTTP::Get.new('/test') - request = OAuth::RequestProxy.proxy(raw_request) - assert_nothing_raised do - OAuth::Signature::Base.new(request) { |token| - # just a stub - } - end - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_plain_text.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_plain_text.rb deleted file mode 100644 index 8dacb33..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_signature_plain_text.rb +++ /dev/null @@ -1,31 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/signature/plaintext' - -class TestSignaturePlaintext < Test::Unit::TestCase - def test_that_plaintext_implements_plaintext - assert OAuth::Signature.available_methods.include?('plaintext') - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature - request = Net::HTTP::Get.new('/photos?file=vacation.jpg&size=original&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_token=nnch734d00sl2jdk&oauth_signature=kd94hf93k423kf44%26&oauth_timestamp=1191242096&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=PLAINTEXT') - - consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03','kd94hf93k423kf44') - token = OAuth::Token.new('nnch734d00sl2jdk', nil) - - assert OAuth::Signature.verify(request, { :consumer => consumer, - :token => token, - :uri => 'http://photos.example.net/photos' } ) - end - - def test_that_get_request_from_oauth_test_cases_produces_matching_signature_part_two - request = Net::HTTP::Get.new('/photos?file=vacation.jpg&size=original&oauth_version=1.0&oauth_consumer_key=dpf43f3p2l4k3l03&oauth_token=nnch734d00sl2jdk&oauth_signature=kd94hf93k423kf44%26pfkkdhi9sl3r4s00&oauth_timestamp=1191242096&oauth_nonce=kllo9940pd9333jh&oauth_signature_method=PLAINTEXT') - - consumer = OAuth::Consumer.new('dpf43f3p2l4k3l03','kd94hf93k423kf44') - token = OAuth::Token.new('nnch734d00sl2jdk', 'pfkkdhi9sl3r4s00') - - assert OAuth::Signature.verify(request, { :consumer => consumer, - :token => token, - :uri => 'http://photos.example.net/photos' } ) - end - -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/test/test_token.rb b/ruby/processing/star_field/library/oauth-0.3.2/test/test_token.rb deleted file mode 100644 index 7c1cb14..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/test/test_token.rb +++ /dev/null @@ -1,14 +0,0 @@ -require File.dirname(__FILE__) + '/test_helper.rb' -require 'oauth/token' - -class TestToken < Test::Unit::TestCase - - def setup - end - - def test_token_constructor_produces_valid_token - token = OAuth::Token.new('xyz', '123') - assert_equal 'xyz', token.token - assert_equal '123', token.secret - end -end diff --git a/ruby/processing/star_field/library/oauth-0.3.2/website/index.html b/ruby/processing/star_field/library/oauth-0.3.2/website/index.html deleted file mode 100644 index 47d989a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/website/index.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - Ruby OAuth GEM - - - - - - -
- -

Ruby OAuth GEM

-
-

Get Version

- 0.3.2 -
-

What

-

This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.

-

See the OAuth specs

-

Installing

-

sudo gem install oauth

-

You can also install it from the oauth rubyforge project.

-

The source code is now hosted on the OAuth GitHub Project

-

The basics

-

This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin.

-

As a matter of fact it has been pulled out from an OAuth Rails Plugin which now requires this GEM.

-

Demonstration of usage

-

Create a new consumer instance by passing it a configuration hash:

-
@consumer=OAuth::Consumer.new( "key","secret", {
-    :site=>"https://agree2"
-    })
-

Start the process by requesting a token

-
@request_token=@consumer.get_request_token
-session[:request_token]=@request_token
-redirect_to @request_token.authorize_url
-

When user returns create an access_token

-
@access_token=@request_token.get_access_token
-@photos=@access_token.get('/photos.xml')
-

For more detailed instructions I have written this OAuth Client Tutorial and "How to turn your rails site into an OAuth Provider ":http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider.

-

Finally be sure to check out the OAuth RDoc Manual.

-

Documentation Wiki

-

There is some documentation on the Google Code project for the OAuth Rails Plugin :

- -

Forum

-

http://groups.google.com/group/oauth-ruby

-

How to submit patches

-

Read the 8 steps for fixing other people’s code.

-

The source code is now hosted on the OAuth GitHub Project

-

To submit a patch, please fork the oauth project and create a patch with tests. Once you’re happy with it send a pull request and post a message to the google group.

-

License

-

This code is free to use under the terms of the MIT license.

-

Contact

-

Comments are welcome. Send an email to Pelle Braendgaard email via the OAuth Ruby mailing list

-

- FIXME full name, 9th September 2008
- Theme extended from Paul Battley -

-
- - - - - diff --git a/ruby/processing/star_field/library/oauth-0.3.2/website/index.txt b/ruby/processing/star_field/library/oauth-0.3.2/website/index.txt deleted file mode 100644 index 0beea2a..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/website/index.txt +++ /dev/null @@ -1,73 +0,0 @@ -h1. Ruby OAuth GEM - -h2. What - -This is a RubyGem for implementing both OAuth clients and servers in Ruby applications. - -See the "OAuth specs":http://oauth.net/core/1.0/ - -h2. Installing - -
sudo gem install oauth
- -You can also install it from the "oauth rubyforge project":http://rubyforge.org/projects/oauth/. - -The source code is now hosted on the "OAuth GitHub Project":http://github.com/pelle/oauth/tree/master - -h2. The basics - -This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin. - -As a matter of fact it has been pulled out from an "OAuth Rails Plugin":http://code.google.com/p/oauth-plugin/ which now requires this GEM. - -h2. Demonstration of usage - -Create a new consumer instance by passing it a configuration hash: - -
@consumer=OAuth::Consumer.new( "key","secret", {
-    :site=>"https://agree2"
-    })
- -Start the process by requesting a token - -
@request_token=@consumer.get_request_token
-session[:request_token]=@request_token
-redirect_to @request_token.authorize_url
- -When user returns create an access_token - -
@access_token=@request_token.get_access_token
-@photos=@access_token.get('/photos.xml')
- -For more detailed instructions I have written this "OAuth Client Tutorial":http://stakeventures.com/articles/2008/02/23/developing-oauth-clients-in-ruby and "How to turn your rails site into an OAuth Provider ":http://stakeventures.com/articles/2007/11/26/how-to-turn-your-rails-site-into-an-oauth-provider. - -Finally be sure to check out the "OAuth RDoc Manual":http://oauth.rubyforge.org/rdoc/. - -h2. Documentation Wiki - -There is some documentation on the Google Code project for the "OAuth Rails Plugin":http://code.google.com/p/oauth-plugin/ : - -* "RequestToken":http://code.google.com/p/oauth-plugin/wiki/RequestToken -* "AccessToken":http://code.google.com/p/oauth-plugin/wiki/AccessToken - -h2. Forum - -"http://groups.google.com/group/oauth-ruby":http://groups.google.com/group/oauth-ruby - - -h2. How to submit patches - -Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/. - -The source code is now hosted on the "OAuth GitHub Project":http://github.com/pelle/oauth/tree/master - -To submit a patch, please fork the oauth project and create a patch with tests. Once you're happy with it send a pull request and post a message to the google group. - -h2. License - -This code is free to use under the terms of the MIT license. - -h2. Contact - -Comments are welcome. Send an email to "Pelle Braendgaard":mailto:pelleb@gmail.com email via the "OAuth Ruby mailing list":http://groups.google.com/group/oauth-ruby - diff --git a/ruby/processing/star_field/library/oauth-0.3.2/website/javascripts/rounded_corners_lite.inc.js b/ruby/processing/star_field/library/oauth-0.3.2/website/javascripts/rounded_corners_lite.inc.js deleted file mode 100644 index afc3ea3..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/website/javascripts/rounded_corners_lite.inc.js +++ /dev/null @@ -1,285 +0,0 @@ - - /**************************************************************** - * * - * curvyCorners * - * ------------ * - * * - * This script generates rounded corners for your divs. * - * * - * Version 1.2.9 * - * Copyright (c) 2006 Cameron Cooke * - * By: Cameron Cooke and Tim Hutchison. * - * * - * * - * Website: http://www.curvycorners.net * - * Email: info@totalinfinity.com * - * Forum: http://www.curvycorners.net/forum/ * - * * - * * - * This library is free software; you can redistribute * - * it and/or modify it under the terms of the GNU * - * Lesser General Public License as published by the * - * Free Software Foundation; either version 2.1 of the * - * License, or (at your option) any later version. * - * * - * This library 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 Lesser General Public * - * License for more details. * - * * - * You should have received a copy of the GNU Lesser * - * General Public License along with this library; * - * Inc., 59 Temple Place, Suite 330, Boston, * - * MA 02111-1307 USA * - * * - ****************************************************************/ - -var isIE = navigator.userAgent.toLowerCase().indexOf("msie") > -1; var isMoz = document.implementation && document.implementation.createDocument; var isSafari = ((navigator.userAgent.toLowerCase().indexOf('safari')!=-1)&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1))?true:false; function curvyCorners() -{ if(typeof(arguments[0]) != "object") throw newCurvyError("First parameter of curvyCorners() must be an object."); if(typeof(arguments[1]) != "object" && typeof(arguments[1]) != "string") throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name."); if(typeof(arguments[1]) == "string") -{ var startIndex = 0; var boxCol = getElementsByClass(arguments[1]);} -else -{ var startIndex = 1; var boxCol = arguments;} -var curvyCornersCol = new Array(); if(arguments[0].validTags) -var validElements = arguments[0].validTags; else -var validElements = ["div"]; for(var i = startIndex, j = boxCol.length; i < j; i++) -{ var currentTag = boxCol[i].tagName.toLowerCase(); if(inArray(validElements, currentTag) !== false) -{ curvyCornersCol[curvyCornersCol.length] = new curvyObject(arguments[0], boxCol[i]);} -} -this.objects = curvyCornersCol; this.applyCornersToAll = function() -{ for(var x = 0, k = this.objects.length; x < k; x++) -{ this.objects[x].applyCorners();} -} -} -function curvyObject() -{ this.box = arguments[1]; this.settings = arguments[0]; this.topContainer = null; this.bottomContainer = null; this.masterCorners = new Array(); this.contentDIV = null; var boxHeight = get_style(this.box, "height", "height"); var boxWidth = get_style(this.box, "width", "width"); var borderWidth = get_style(this.box, "borderTopWidth", "border-top-width"); var borderColour = get_style(this.box, "borderTopColor", "border-top-color"); var boxColour = get_style(this.box, "backgroundColor", "background-color"); var backgroundImage = get_style(this.box, "backgroundImage", "background-image"); var boxPosition = get_style(this.box, "position", "position"); var boxPadding = get_style(this.box, "paddingTop", "padding-top"); this.boxHeight = parseInt(((boxHeight != "" && boxHeight != "auto" && boxHeight.indexOf("%") == -1)? boxHeight.substring(0, boxHeight.indexOf("px")) : this.box.scrollHeight)); this.boxWidth = parseInt(((boxWidth != "" && boxWidth != "auto" && boxWidth.indexOf("%") == -1)? boxWidth.substring(0, boxWidth.indexOf("px")) : this.box.scrollWidth)); this.borderWidth = parseInt(((borderWidth != "" && borderWidth.indexOf("px") !== -1)? borderWidth.slice(0, borderWidth.indexOf("px")) : 0)); this.boxColour = format_colour(boxColour); this.boxPadding = parseInt(((boxPadding != "" && boxPadding.indexOf("px") !== -1)? boxPadding.slice(0, boxPadding.indexOf("px")) : 0)); this.borderColour = format_colour(borderColour); this.borderString = this.borderWidth + "px" + " solid " + this.borderColour; this.backgroundImage = ((backgroundImage != "none")? backgroundImage : ""); this.boxContent = this.box.innerHTML; if(boxPosition != "absolute") this.box.style.position = "relative"; this.box.style.padding = "0px"; if(isIE && boxWidth == "auto" && boxHeight == "auto") this.box.style.width = "100%"; if(this.settings.autoPad == true && this.boxPadding > 0) -this.box.innerHTML = ""; this.applyCorners = function() -{ for(var t = 0; t < 2; t++) -{ switch(t) -{ case 0: -if(this.settings.tl || this.settings.tr) -{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var topMaxRadius = Math.max(this.settings.tl ? this.settings.tl.radius : 0, this.settings.tr ? this.settings.tr.radius : 0); newMainContainer.style.height = topMaxRadius + "px"; newMainContainer.style.top = 0 - topMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.topContainer = this.box.appendChild(newMainContainer);} -break; case 1: -if(this.settings.bl || this.settings.br) -{ var newMainContainer = document.createElement("DIV"); newMainContainer.style.width = "100%"; newMainContainer.style.fontSize = "1px"; newMainContainer.style.overflow = "hidden"; newMainContainer.style.position = "absolute"; newMainContainer.style.paddingLeft = this.borderWidth + "px"; newMainContainer.style.paddingRight = this.borderWidth + "px"; var botMaxRadius = Math.max(this.settings.bl ? this.settings.bl.radius : 0, this.settings.br ? this.settings.br.radius : 0); newMainContainer.style.height = botMaxRadius + "px"; newMainContainer.style.bottom = 0 - botMaxRadius + "px"; newMainContainer.style.left = 0 - this.borderWidth + "px"; this.bottomContainer = this.box.appendChild(newMainContainer);} -break;} -} -if(this.topContainer) this.box.style.borderTopWidth = "0px"; if(this.bottomContainer) this.box.style.borderBottomWidth = "0px"; var corners = ["tr", "tl", "br", "bl"]; for(var i in corners) -{ if(i > -1 < 4) -{ var cc = corners[i]; if(!this.settings[cc]) -{ if(((cc == "tr" || cc == "tl") && this.topContainer != null) || ((cc == "br" || cc == "bl") && this.bottomContainer != null)) -{ var newCorner = document.createElement("DIV"); newCorner.style.position = "relative"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; if(this.backgroundImage == "") -newCorner.style.backgroundColor = this.boxColour; else -newCorner.style.backgroundImage = this.backgroundImage; switch(cc) -{ case "tl": -newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.tr.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.left = -this.borderWidth + "px"; break; case "tr": -newCorner.style.height = topMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.tl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderTop = this.borderString; newCorner.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; newCorner.style.left = this.borderWidth + "px"; break; case "bl": -newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginRight = this.settings.br.radius - (this.borderWidth*2) + "px"; newCorner.style.borderLeft = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = -this.borderWidth + "px"; newCorner.style.backgroundPosition = "-" + (this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break; case "br": -newCorner.style.height = botMaxRadius - this.borderWidth + "px"; newCorner.style.marginLeft = this.settings.bl.radius - (this.borderWidth*2) + "px"; newCorner.style.borderRight = this.borderString; newCorner.style.borderBottom = this.borderString; newCorner.style.left = this.borderWidth + "px" -newCorner.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (botMaxRadius + this.borderWidth)) + "px"; break;} -} -} -else -{ if(this.masterCorners[this.settings[cc].radius]) -{ var newCorner = this.masterCorners[this.settings[cc].radius].cloneNode(true);} -else -{ var newCorner = document.createElement("DIV"); newCorner.style.height = this.settings[cc].radius + "px"; newCorner.style.width = this.settings[cc].radius + "px"; newCorner.style.position = "absolute"; newCorner.style.fontSize = "1px"; newCorner.style.overflow = "hidden"; var borderRadius = parseInt(this.settings[cc].radius - this.borderWidth); for(var intx = 0, j = this.settings[cc].radius; intx < j; intx++) -{ if((intx +1) >= borderRadius) -var y1 = -1; else -var y1 = (Math.floor(Math.sqrt(Math.pow(borderRadius, 2) - Math.pow((intx+1), 2))) - 1); if(borderRadius != j) -{ if((intx) >= borderRadius) -var y2 = -1; else -var y2 = Math.ceil(Math.sqrt(Math.pow(borderRadius,2) - Math.pow(intx, 2))); if((intx+1) >= j) -var y3 = -1; else -var y3 = (Math.floor(Math.sqrt(Math.pow(j ,2) - Math.pow((intx+1), 2))) - 1);} -if((intx) >= j) -var y4 = -1; else -var y4 = Math.ceil(Math.sqrt(Math.pow(j ,2) - Math.pow(intx, 2))); if(y1 > -1) this.drawPixel(intx, 0, this.boxColour, 100, (y1+1), newCorner, -1, this.settings[cc].radius); if(borderRadius != j) -{ for(var inty = (y1 + 1); inty < y2; inty++) -{ if(this.settings.antiAlias) -{ if(this.backgroundImage != "") -{ var borderFract = (pixelFraction(intx, inty, borderRadius) * 100); if(borderFract < 30) -{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, 0, this.settings[cc].radius);} -else -{ this.drawPixel(intx, inty, this.borderColour, 100, 1, newCorner, -1, this.settings[cc].radius);} -} -else -{ var pixelcolour = BlendColour(this.boxColour, this.borderColour, pixelFraction(intx, inty, borderRadius)); this.drawPixel(intx, inty, pixelcolour, 100, 1, newCorner, 0, this.settings[cc].radius, cc);} -} -} -if(this.settings.antiAlias) -{ if(y3 >= y2) -{ if (y2 == -1) y2 = 0; this.drawPixel(intx, y2, this.borderColour, 100, (y3 - y2 + 1), newCorner, 0, 0);} -} -else -{ if(y3 >= y1) -{ this.drawPixel(intx, (y1 + 1), this.borderColour, 100, (y3 - y1), newCorner, 0, 0);} -} -var outsideColour = this.borderColour;} -else -{ var outsideColour = this.boxColour; var y3 = y1;} -if(this.settings.antiAlias) -{ for(var inty = (y3 + 1); inty < y4; inty++) -{ this.drawPixel(intx, inty, outsideColour, (pixelFraction(intx, inty , j) * 100), 1, newCorner, ((this.borderWidth > 0)? 0 : -1), this.settings[cc].radius);} -} -} -this.masterCorners[this.settings[cc].radius] = newCorner.cloneNode(true);} -if(cc != "br") -{ for(var t = 0, k = newCorner.childNodes.length; t < k; t++) -{ var pixelBar = newCorner.childNodes[t]; var pixelBarTop = parseInt(pixelBar.style.top.substring(0, pixelBar.style.top.indexOf("px"))); var pixelBarLeft = parseInt(pixelBar.style.left.substring(0, pixelBar.style.left.indexOf("px"))); var pixelBarHeight = parseInt(pixelBar.style.height.substring(0, pixelBar.style.height.indexOf("px"))); if(cc == "tl" || cc == "bl"){ pixelBar.style.left = this.settings[cc].radius -pixelBarLeft -1 + "px";} -if(cc == "tr" || cc == "tl"){ pixelBar.style.top = this.settings[cc].radius -pixelBarHeight -pixelBarTop + "px";} -switch(cc) -{ case "tr": -pixelBar.style.backgroundPosition = "-" + Math.abs((this.boxWidth - this.settings[cc].radius + this.borderWidth) + pixelBarLeft) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "tl": -pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs(this.settings[cc].radius -pixelBarHeight -pixelBarTop - this.borderWidth) + "px"; break; case "bl": -pixelBar.style.backgroundPosition = "-" + Math.abs((this.settings[cc].radius -pixelBarLeft -1) - this.borderWidth) + "px -" + Math.abs((this.boxHeight + this.settings[cc].radius + pixelBarTop) -this.borderWidth) + "px"; break;} -} -} -} -if(newCorner) -{ switch(cc) -{ case "tl": -if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "tr": -if(newCorner.style.position == "absolute") newCorner.style.top = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.topContainer) this.topContainer.appendChild(newCorner); break; case "bl": -if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.left = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break; case "br": -if(newCorner.style.position == "absolute") newCorner.style.bottom = "0px"; if(newCorner.style.position == "absolute") newCorner.style.right = "0px"; if(this.bottomContainer) this.bottomContainer.appendChild(newCorner); break;} -} -} -} -var radiusDiff = new Array(); radiusDiff["t"] = Math.abs(this.settings.tl.radius - this.settings.tr.radius) -radiusDiff["b"] = Math.abs(this.settings.bl.radius - this.settings.br.radius); for(z in radiusDiff) -{ if(z == "t" || z == "b") -{ if(radiusDiff[z]) -{ var smallerCornerType = ((this.settings[z + "l"].radius < this.settings[z + "r"].radius)? z +"l" : z +"r"); var newFiller = document.createElement("DIV"); newFiller.style.height = radiusDiff[z] + "px"; newFiller.style.width = this.settings[smallerCornerType].radius+ "px" -newFiller.style.position = "absolute"; newFiller.style.fontSize = "1px"; newFiller.style.overflow = "hidden"; newFiller.style.backgroundColor = this.boxColour; switch(smallerCornerType) -{ case "tl": -newFiller.style.bottom = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.topContainer.appendChild(newFiller); break; case "tr": -newFiller.style.bottom = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.topContainer.appendChild(newFiller); break; case "bl": -newFiller.style.top = "0px"; newFiller.style.left = "0px"; newFiller.style.borderLeft = this.borderString; this.bottomContainer.appendChild(newFiller); break; case "br": -newFiller.style.top = "0px"; newFiller.style.right = "0px"; newFiller.style.borderRight = this.borderString; this.bottomContainer.appendChild(newFiller); break;} -} -var newFillerBar = document.createElement("DIV"); newFillerBar.style.position = "relative"; newFillerBar.style.fontSize = "1px"; newFillerBar.style.overflow = "hidden"; newFillerBar.style.backgroundColor = this.boxColour; newFillerBar.style.backgroundImage = this.backgroundImage; switch(z) -{ case "t": -if(this.topContainer) -{ if(this.settings.tl.radius && this.settings.tr.radius) -{ newFillerBar.style.height = topMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.tl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.tr.radius - this.borderWidth + "px"; newFillerBar.style.borderTop = this.borderString; if(this.backgroundImage != "") -newFillerBar.style.backgroundPosition = "-" + (topMaxRadius + this.borderWidth) + "px 0px"; this.topContainer.appendChild(newFillerBar);} -this.box.style.backgroundPosition = "0px -" + (topMaxRadius - this.borderWidth) + "px";} -break; case "b": -if(this.bottomContainer) -{ if(this.settings.bl.radius && this.settings.br.radius) -{ newFillerBar.style.height = botMaxRadius - this.borderWidth + "px"; newFillerBar.style.marginLeft = this.settings.bl.radius - this.borderWidth + "px"; newFillerBar.style.marginRight = this.settings.br.radius - this.borderWidth + "px"; newFillerBar.style.borderBottom = this.borderString; if(this.backgroundImage != "") -newFillerBar.style.backgroundPosition = "-" + (botMaxRadius + this.borderWidth) + "px -" + (this.boxHeight + (topMaxRadius + this.borderWidth)) + "px"; this.bottomContainer.appendChild(newFillerBar);} -} -break;} -} -} -if(this.settings.autoPad == true && this.boxPadding > 0) -{ var contentContainer = document.createElement("DIV"); contentContainer.style.position = "relative"; contentContainer.innerHTML = this.boxContent; contentContainer.className = "autoPadDiv"; var topPadding = Math.abs(topMaxRadius - this.boxPadding); var botPadding = Math.abs(botMaxRadius - this.boxPadding); if(topMaxRadius < this.boxPadding) -contentContainer.style.paddingTop = topPadding + "px"; if(botMaxRadius < this.boxPadding) -contentContainer.style.paddingBottom = botMaxRadius + "px"; contentContainer.style.paddingLeft = this.boxPadding + "px"; contentContainer.style.paddingRight = this.boxPadding + "px"; this.contentDIV = this.box.appendChild(contentContainer);} -} -this.drawPixel = function(intx, inty, colour, transAmount, height, newCorner, image, cornerRadius) -{ var pixel = document.createElement("DIV"); pixel.style.height = height + "px"; pixel.style.width = "1px"; pixel.style.position = "absolute"; pixel.style.fontSize = "1px"; pixel.style.overflow = "hidden"; var topMaxRadius = Math.max(this.settings["tr"].radius, this.settings["tl"].radius); if(image == -1 && this.backgroundImage != "") -{ pixel.style.backgroundImage = this.backgroundImage; pixel.style.backgroundPosition = "-" + (this.boxWidth - (cornerRadius - intx) + this.borderWidth) + "px -" + ((this.boxHeight + topMaxRadius + inty) -this.borderWidth) + "px";} -else -{ pixel.style.backgroundColor = colour;} -if (transAmount != 100) -setOpacity(pixel, transAmount); pixel.style.top = inty + "px"; pixel.style.left = intx + "px"; newCorner.appendChild(pixel);} -} -function insertAfter(parent, node, referenceNode) -{ parent.insertBefore(node, referenceNode.nextSibling);} -function BlendColour(Col1, Col2, Col1Fraction) -{ var red1 = parseInt(Col1.substr(1,2),16); var green1 = parseInt(Col1.substr(3,2),16); var blue1 = parseInt(Col1.substr(5,2),16); var red2 = parseInt(Col2.substr(1,2),16); var green2 = parseInt(Col2.substr(3,2),16); var blue2 = parseInt(Col2.substr(5,2),16); if(Col1Fraction > 1 || Col1Fraction < 0) Col1Fraction = 1; var endRed = Math.round((red1 * Col1Fraction) + (red2 * (1 - Col1Fraction))); if(endRed > 255) endRed = 255; if(endRed < 0) endRed = 0; var endGreen = Math.round((green1 * Col1Fraction) + (green2 * (1 - Col1Fraction))); if(endGreen > 255) endGreen = 255; if(endGreen < 0) endGreen = 0; var endBlue = Math.round((blue1 * Col1Fraction) + (blue2 * (1 - Col1Fraction))); if(endBlue > 255) endBlue = 255; if(endBlue < 0) endBlue = 0; return "#" + IntToHex(endRed)+ IntToHex(endGreen)+ IntToHex(endBlue);} -function IntToHex(strNum) -{ base = strNum / 16; rem = strNum % 16; base = base - (rem / 16); baseS = MakeHex(base); remS = MakeHex(rem); return baseS + '' + remS;} -function MakeHex(x) -{ if((x >= 0) && (x <= 9)) -{ return x;} -else -{ switch(x) -{ case 10: return "A"; case 11: return "B"; case 12: return "C"; case 13: return "D"; case 14: return "E"; case 15: return "F";} -} -} -function pixelFraction(x, y, r) -{ var pixelfraction = 0; var xvalues = new Array(1); var yvalues = new Array(1); var point = 0; var whatsides = ""; var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x,2))); if ((intersect >= y) && (intersect < (y+1))) -{ whatsides = "Left"; xvalues[point] = 0; yvalues[point] = intersect - y; point = point + 1;} -var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y+1,2))); if ((intersect >= x) && (intersect < (x+1))) -{ whatsides = whatsides + "Top"; xvalues[point] = intersect - x; yvalues[point] = 1; point = point + 1;} -var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(x+1,2))); if ((intersect >= y) && (intersect < (y+1))) -{ whatsides = whatsides + "Right"; xvalues[point] = 1; yvalues[point] = intersect - y; point = point + 1;} -var intersect = Math.sqrt((Math.pow(r,2) - Math.pow(y,2))); if ((intersect >= x) && (intersect < (x+1))) -{ whatsides = whatsides + "Bottom"; xvalues[point] = intersect - x; yvalues[point] = 0;} -switch (whatsides) -{ case "LeftRight": -pixelfraction = Math.min(yvalues[0],yvalues[1]) + ((Math.max(yvalues[0],yvalues[1]) - Math.min(yvalues[0],yvalues[1]))/2); break; case "TopRight": -pixelfraction = 1-(((1-xvalues[0])*(1-yvalues[1]))/2); break; case "TopBottom": -pixelfraction = Math.min(xvalues[0],xvalues[1]) + ((Math.max(xvalues[0],xvalues[1]) - Math.min(xvalues[0],xvalues[1]))/2); break; case "LeftBottom": -pixelfraction = (yvalues[0]*xvalues[1])/2; break; default: -pixelfraction = 1;} -return pixelfraction;} -function rgb2Hex(rgbColour) -{ try{ var rgbArray = rgb2Array(rgbColour); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); var hexColour = "#" + IntToHex(red) + IntToHex(green) + IntToHex(blue);} -catch(e){ alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex");} -return hexColour;} -function rgb2Array(rgbColour) -{ var rgbValues = rgbColour.substring(4, rgbColour.indexOf(")")); var rgbArray = rgbValues.split(", "); return rgbArray;} -function setOpacity(obj, opacity) -{ opacity = (opacity == 100)?99.999:opacity; if(isSafari && obj.tagName != "IFRAME") -{ var rgbArray = rgb2Array(obj.style.backgroundColor); var red = parseInt(rgbArray[0]); var green = parseInt(rgbArray[1]); var blue = parseInt(rgbArray[2]); obj.style.backgroundColor = "rgba(" + red + ", " + green + ", " + blue + ", " + opacity/100 + ")";} -else if(typeof(obj.style.opacity) != "undefined") -{ obj.style.opacity = opacity/100;} -else if(typeof(obj.style.MozOpacity) != "undefined") -{ obj.style.MozOpacity = opacity/100;} -else if(typeof(obj.style.filter) != "undefined") -{ obj.style.filter = "alpha(opacity:" + opacity + ")";} -else if(typeof(obj.style.KHTMLOpacity) != "undefined") -{ obj.style.KHTMLOpacity = opacity/100;} -} -function inArray(array, value) -{ for(var i = 0; i < array.length; i++){ if (array[i] === value) return i;} -return false;} -function inArrayKey(array, value) -{ for(key in array){ if(key === value) return true;} -return false;} -function addEvent(elm, evType, fn, useCapture) { if (elm.addEventListener) { elm.addEventListener(evType, fn, useCapture); return true;} -else if (elm.attachEvent) { var r = elm.attachEvent('on' + evType, fn); return r;} -else { elm['on' + evType] = fn;} -} -function removeEvent(obj, evType, fn, useCapture){ if (obj.removeEventListener){ obj.removeEventListener(evType, fn, useCapture); return true;} else if (obj.detachEvent){ var r = obj.detachEvent("on"+evType, fn); return r;} else { alert("Handler could not be removed");} -} -function format_colour(colour) -{ var returnColour = "#ffffff"; if(colour != "" && colour != "transparent") -{ if(colour.substr(0, 3) == "rgb") -{ returnColour = rgb2Hex(colour);} -else if(colour.length == 4) -{ returnColour = "#" + colour.substring(1, 2) + colour.substring(1, 2) + colour.substring(2, 3) + colour.substring(2, 3) + colour.substring(3, 4) + colour.substring(3, 4);} -else -{ returnColour = colour;} -} -return returnColour;} -function get_style(obj, property, propertyNS) -{ try -{ if(obj.currentStyle) -{ var returnVal = eval("obj.currentStyle." + property);} -else -{ if(isSafari && obj.style.display == "none") -{ obj.style.display = ""; var wasHidden = true;} -var returnVal = document.defaultView.getComputedStyle(obj, '').getPropertyValue(propertyNS); if(isSafari && wasHidden) -{ obj.style.display = "none";} -} -} -catch(e) -{ } -return returnVal;} -function getElementsByClass(searchClass, node, tag) -{ var classElements = new Array(); if(node == null) -node = document; if(tag == null) -tag = '*'; var els = node.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\s)"+searchClass+"(\s|$)"); for (i = 0, j = 0; i < elsLen; i++) -{ if(pattern.test(els[i].className)) -{ classElements[j] = els[i]; j++;} -} -return classElements;} -function newCurvyError(errorMessage) -{ return new Error("curvyCorners Error:\n" + errorMessage) -} diff --git a/ruby/processing/star_field/library/oauth-0.3.2/website/stylesheets/screen.css b/ruby/processing/star_field/library/oauth-0.3.2/website/stylesheets/screen.css deleted file mode 100644 index 2c84cd0..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/website/stylesheets/screen.css +++ /dev/null @@ -1,138 +0,0 @@ -body { - background-color: #E1D1F1; - font-family: "Georgia", sans-serif; - font-size: 16px; - line-height: 1.6em; - padding: 1.6em 0 0 0; - color: #333; -} -h1, h2, h3, h4, h5, h6 { - color: #444; -} -h1 { - font-family: sans-serif; - font-weight: normal; - font-size: 4em; - line-height: 0.8em; - letter-spacing: -0.1ex; - margin: 5px; -} -li { - padding: 0; - margin: 0; - list-style-type: square; -} -a { - color: #5E5AFF; - background-color: #DAC; - font-weight: normal; - text-decoration: underline; -} -blockquote { - font-size: 90%; - font-style: italic; - border-left: 1px solid #111; - padding-left: 1em; -} -.caps { - font-size: 80%; -} - -#main { - width: 45em; - padding: 0; - margin: 0 auto; -} -.coda { - text-align: right; - color: #77f; - font-size: smaller; -} - -table { - font-size: 90%; - line-height: 1.4em; - color: #ff8; - background-color: #111; - padding: 2px 10px 2px 10px; - border-style: dashed; -} - -th { - color: #fff; -} - -td { - padding: 2px 10px 2px 10px; -} - -.success { - color: #0CC52B; -} - -.failed { - color: #E90A1B; -} - -.unknown { - color: #995000; -} -pre, code { - font-family: monospace; - font-size: 90%; - line-height: 1.4em; - color: #ff8; - background-color: #111; - padding: 2px 10px 2px 10px; -} -.comment { color: #aaa; font-style: italic; } -.keyword { color: #eff; font-weight: bold; } -.punct { color: #eee; font-weight: bold; } -.symbol { color: #0bb; } -.string { color: #6b4; } -.ident { color: #ff8; } -.constant { color: #66f; } -.regex { color: #ec6; } -.number { color: #F99; } -.expr { color: #227; } - -#version { - float: right; - text-align: right; - font-family: sans-serif; - font-weight: normal; - background-color: #B3ABFF; - color: #141331; - padding: 15px 20px 10px 20px; - margin: 0 auto; - margin-top: 15px; - border: 3px solid #141331; -} - -#version .numbers { - display: block; - font-size: 4em; - line-height: 0.8em; - letter-spacing: -0.1ex; - margin-bottom: 15px; -} - -#version p { - text-decoration: none; - color: #141331; - background-color: #B3ABFF; - margin: 0; - padding: 0; -} - -#version a { - text-decoration: none; - color: #141331; - background-color: #B3ABFF; -} - -.clickable { - cursor: pointer; - cursor: hand; -} - diff --git a/ruby/processing/star_field/library/oauth-0.3.2/website/template.rhtml b/ruby/processing/star_field/library/oauth-0.3.2/website/template.rhtml deleted file mode 100644 index e851735..0000000 --- a/ruby/processing/star_field/library/oauth-0.3.2/website/template.rhtml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - <%= title %> - - - - - - -
- -

<%= title %>

-
-

Get Version

- <%= version %> -
- <%= body %> -

- FIXME full name, <%= modified.pretty %>
- Theme extended from Paul Battley -

-
- - - - - diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/History.txt b/ruby/processing/star_field/library/ruby-hmac-0.3.2/History.txt deleted file mode 100644 index bd9ef43..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/History.txt +++ /dev/null @@ -1,9 +0,0 @@ -== 0.3.2 / 2008-08-20 - -* Removed spurious constants that cause warnings on load [Blaine Cook] -* Move hoe to build dependency if build deps are supported [Blaine Cook] - -== 0.3.1 / 2007-08-13 - -* Converted to gem by Geoffrey Grosenbach -* Tests converted to Test::Unit diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/Manifest.txt b/ruby/processing/star_field/library/ruby-hmac-0.3.2/Manifest.txt deleted file mode 100644 index 9f93cce..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/Manifest.txt +++ /dev/null @@ -1,10 +0,0 @@ -History.txt -Manifest.txt -README.txt -Rakefile -lib/hmac-md5.rb -lib/hmac-rmd160.rb -lib/hmac-sha1.rb -lib/hmac-sha2.rb -lib/hmac.rb -test/test_hmac.rb diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/README.txt b/ruby/processing/star_field/library/ruby-hmac-0.3.2/README.txt deleted file mode 100644 index 7c194b5..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/README.txt +++ /dev/null @@ -1,35 +0,0 @@ -ruby-hmac - by Daiki Ueno - http://ruby-hmac.rubyforge.org - -== DESCRIPTION: - -This module provides common interface to HMAC functionality. HMAC is a kind of "Message Authentication Code" (MAC) algorithm whose standard is documented in RFC2104. Namely, a MAC provides a way to check the integrity of information transmitted over or stored in an unreliable medium, based on a secret key. - -Originally written by Daiki Ueno. Converted to a RubyGem by Geoffrey Grosenbach - -== LICENSE: - -(The MIT License) - -Copyright (c) 2007 Daiki Ueno - -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/ruby/processing/star_field/library/ruby-hmac-0.3.2/Rakefile b/ruby/processing/star_field/library/ruby-hmac-0.3.2/Rakefile deleted file mode 100644 index 95f9cea..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/Rakefile +++ /dev/null @@ -1,25 +0,0 @@ -require 'rubygems' -require 'hoe' -$:.unshift(File.dirname(__FILE__) + "/lib") -require 'hmac' - -Hoe.new('ruby-hmac', HMAC::VERSION) do |p| - p.name = "ruby-hmac" - p.author = ["Daiki Ueno", "Geoffrey Grosenbach"] - p.email = 'boss@topfunky.com' - p.summary = "An implementation of the HMAC authentication code in Ruby." - p.description = "A MAC provides a way to check the integrity of information transmitted over or stored in an unreliable medium, based on a secret key." - p.url = "http://ruby-hmac.rubyforge.org" - p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") - p.remote_rdoc_dir = '' # Release to root -end - -desc "Simple require on packaged files to make sure they are all there" -task :verify => :package do - # An error message will be displayed if files are missing - if system %(ruby -e "require 'pkg/ruby-hmac-#{HMAC::VERSION}/lib/hmac'") - puts "\nThe library files are present" - end -end - -task :release => :verify diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-md5.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-md5.rb deleted file mode 100644 index c7650c9..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-md5.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'hmac' -require 'digest/md5' - -module HMAC - class MD5 < Base - def initialize(key = nil) - super(Digest::MD5, 64, 16, key) - end - public_class_method :new, :digest, :hexdigest - end -end diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-rmd160.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-rmd160.rb deleted file mode 100644 index 4129cf0..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-rmd160.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'hmac' -require 'digest/rmd160' - -module HMAC - class RMD160 < Base - def initialize(key = nil) - super(Digest::RMD160, 64, 20, key) - end - public_class_method :new, :digest, :hexdigest - end -end diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha1.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha1.rb deleted file mode 100644 index 26a5b51..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha1.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'hmac' -require 'digest/sha1' - -module HMAC - class SHA1 < Base - def initialize(key = nil) - super(Digest::SHA1, 64, 20, key) - end - public_class_method :new, :digest, :hexdigest - end -end diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha2.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha2.rb deleted file mode 100644 index 6e0902d..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac-sha2.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'hmac' -require 'digest/sha2' - -module HMAC - class SHA256 < Base - def initialize(key = nil) - super(Digest::SHA256, 64, 32, key) - end - public_class_method :new, :digest, :hexdigest - end - - class SHA384 < Base - def initialize(key = nil) - super(Digest::SHA384, 128, 48, key) - end - public_class_method :new, :digest, :hexdigest - end - - class SHA512 < Base - def initialize(key = nil) - super(Digest::SHA512, 128, 64, key) - end - public_class_method :new, :digest, :hexdigest - end -end diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac.rb deleted file mode 100644 index 98991fc..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/lib/hmac.rb +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (C) 2001 Daiki Ueno -# This library is distributed under the terms of the Ruby license. - -# This module provides common interface to HMAC engines. -# HMAC standard is documented in RFC 2104: -# -# H. Krawczyk et al., "HMAC: Keyed-Hashing for Message Authentication", -# RFC 2104, February 1997 -# -# These APIs are inspired by JCE 1.2's javax.crypto.Mac interface. -# -# -# -# Source repository is at -# -# http://github.com/topfunky/ruby-hmac/tree/master - -module HMAC - - VERSION = '0.3.2' - - class Base - def initialize(algorithm, block_size, output_length, key) - @algorithm = algorithm - @block_size = block_size - @output_length = output_length - @initialized = false - @key_xor_ipad = '' - @key_xor_opad = '' - set_key(key) unless key.nil? - end - - private - def check_status - unless @initialized - raise RuntimeError, - "The underlying hash algorithm has not yet been initialized." - end - end - - public - def set_key(key) - # If key is longer than the block size, apply hash function - # to key and use the result as a real key. - key = @algorithm.digest(key) if key.size > @block_size - key_xor_ipad = "\x36" * @block_size - key_xor_opad = "\x5C" * @block_size - for i in 0 .. key.size - 1 - key_xor_ipad[i] ^= key[i] - key_xor_opad[i] ^= key[i] - end - @key_xor_ipad = key_xor_ipad - @key_xor_opad = key_xor_opad - @md = @algorithm.new - @initialized = true - end - - def reset_key - @key_xor_ipad.gsub!(/./, '?') - @key_xor_opad.gsub!(/./, '?') - @key_xor_ipad[0..-1] = '' - @key_xor_opad[0..-1] = '' - @initialized = false - end - - def update(text) - check_status - # perform inner H - md = @algorithm.new - md.update(@key_xor_ipad) - md.update(text) - str = md.digest - # perform outer H - md = @algorithm.new - md.update(@key_xor_opad) - md.update(str) - @md = md - end - alias << update - - def digest - check_status - @md.digest - end - - def hexdigest - check_status - @md.hexdigest - end - alias to_s hexdigest - - # These two class methods below are safer than using above - # instance methods combinatorially because an instance will have - # held a key even if it's no longer in use. - def Base.digest(key, text) - begin - hmac = self.new(key) - hmac.update(text) - hmac.digest - ensure - hmac.reset_key - end - end - - def Base.hexdigest(key, text) - begin - hmac = self.new(key) - hmac.update(text) - hmac.hexdigest - ensure - hmac.reset_key - end - end - - private_class_method :new, :digest, :hexdigest - end -end diff --git a/ruby/processing/star_field/library/ruby-hmac-0.3.2/test/test_hmac.rb b/ruby/processing/star_field/library/ruby-hmac-0.3.2/test/test_hmac.rb deleted file mode 100755 index dbc6fa3..0000000 --- a/ruby/processing/star_field/library/ruby-hmac-0.3.2/test/test_hmac.rb +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env ruby - -require 'test/unit' - -require 'hmac-md5' -require 'hmac-sha1' - -class TestHMAC < Test::Unit::TestCase - - def test_s_digest - key = "\x0b" * 16 - text = "Hi There" - - hmac = HMAC::MD5.new(key) - hmac.update(text) - - assert_equal(hmac.digest, HMAC::MD5.digest(key, text)) - end - - def test_s_hexdigest - key = "\x0b" * 16 - text = "Hi There" - - hmac = HMAC::MD5.new(key) - hmac.update(text) - - assert_equal(hmac.hexdigest, HMAC::MD5.hexdigest(key, text)) - end - - def test_hmac_md5_1 - assert_equal(HMAC::MD5.hexdigest("\x0b" * 16, "Hi There"), - "9294727a3638bb1c13f48ef8158bfc9d") - end - - def test_hmac_md5_2 - assert_equal(HMAC::MD5.hexdigest("Jefe", "what do ya want for nothing?"), - "750c783e6ab0b503eaa86e310a5db738") - end - - def test_hmac_md5_3 - assert_equal(HMAC::MD5.hexdigest("\xaa" * 16, "\xdd" * 50), - "56be34521d144c88dbb8c733f0e8b3f6") - end - - def test_hmac_md5_4 - assert_equal(HMAC::MD5.hexdigest(["0102030405060708090a0b0c0d0e0f10111213141516171819"].pack("H*"), "\xcd" * 50), - "697eaf0aca3a3aea3a75164746ffaa79") - end - - def test_hmac_md5_5 - assert_equal(HMAC::MD5.hexdigest("\x0c" * 16, "Test With Truncation"), - "56461ef2342edc00f9bab995690efd4c") - end - -# def test_hmac_md5_6 -# assert_equal(HMAC::MD5.hexdigest("\x0c" * 16, "Test With Truncation"), -# "56461ef2342edc00f9bab995") -# end - - def test_hmac_md5_7 - assert_equal(HMAC::MD5.hexdigest("\xaa" * 80, "Test Using Larger Than Block-Size Key - Hash Key First"), - "6b1ab7fe4bd7bf8f0b62e6ce61b9d0cd") - end - - def test_hmac_md5_8 - assert_equal(HMAC::MD5.hexdigest("\xaa" * 80, "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data"), - "6f630fad67cda0ee1fb1f562db3aa53e") - end - - def test_reset_key - hmac = HMAC::MD5.new("key") - assert_nothing_raised { - hmac.reset_key - } - assert_raise(RuntimeError) { - hmac.update("foo") - } - end - - def test_set_key - hmac = HMAC::MD5.new - assert_raise(RuntimeError) { - hmac.update("foo") - } - assert_nothing_raised { - hmac.reset_key - } - assert_raise(RuntimeError) { - hmac.update("foo") - } - end -end diff --git a/ruby/processing/star_field/library/twitter-0.6.8/History b/ruby/processing/star_field/library/twitter-0.6.8/History deleted file mode 100644 index 2a9e5fc..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/History +++ /dev/null @@ -1,194 +0,0 @@ -0.6.8 - April 23, 2009 -* 1 dependency fix - * forgot to update rakefile rendering previous 0.6.7 release useless. crap! - -0.6.7 - April 23, 2009 -* 1 minor fix - * Bumped httparty version to 0.4.3 which allows response.message and fixes errors that the lack of response.message was causing to the twitter gem - -0.6.6 - April 16, 2009 -* 1 minor enhancement - * added ability to pass query parameters to user method - * httpauth can now accept :ssl option to use https instead of http - * Added Twitter.status method for no auth calls to fetch status - * Added Twitter.friend_ids method for no auth calls to fetch status - * Added Twitter.follower_ids method for no auth calls to fetch status - -0.6.5 - April 15, 2009 -* 1 bug fix - * fixed that friend_ids and follower_ids were bombing from trying to mash them. Added :mash option to Twitter::Request so I can specifically not mash certain responses from twitter - -0.6.4 - April 14, 2009 -* 1 minor tweak - * More explicit about dependency versions in gemspec and when requiring. - -0.6.3 - April 14, 2009 -* 1 minor addition - * Added Twitter.user method to get user's information without authenticating - -0.6.2 - April 14, 2009 -* 1 minor addition - * added max to search so you can set the max id that should be used - -0.6.1 - April 12, 2009 -* 1 minor fix - * Had two friend_ids functions. Renamed one of them to follower_ids. - -0.6.0 - April 11, 2009 -* 1 feature addition - * Added http authentication back in. You can now use oauth or http auth as your client. - -0.5.3 - April 10, 2009 -* 1 minor fix - * Twitter API assumed follow true whether true or false. Now only sending follow along to request if follow is true for calls to friendship_create. - -0.5.2 - April 8, 2009 -* 4 minor fixes - * added mash as an install dependency, forgot it initially - * fixed that search wasn't taking into account a bunch of options duh! - * fixed some missing vars and stuff in exception raising - * added development dependencies to rake file to make that more explicit (technomancy) - * lame workaround for Mash#hash that allows using return objects in sets and such (technomancy) - -0.5.1 - April 5, 2009 -* 1 minor change - * Added data error hash returned from twitter to a few of the exceptions to help with debugging - * Fixed friendship_exists?. Was throwing mash stringify keys error because it was returning true or false instead of hash or array. - -0.5.0 - April 3, 2009 -* 1 major rewrite for OAuth - * Backwards compatibility thrown to the wind - * Proxy no longer supported (someone please add it back in, I never use proxies) - * Identica support killed with an axe (nothing against them but I don't use it) - * CLI shot to death (will be reborn at a later date using oauth and its own gem) - -0.4.3 - February 21, 2009 -* 1 minor enhancement - * verify_credentials now returns a Twitter::User rather than an hpricot doc - -0.4.2 - February 10, 2009 -* 1 minor enhancement - * Adding the Social Graph API methods (Josh Owens) - -0.4.1 - January 1, 2009 -* 4 minor enhancements and 2 bug fixes: - * Added better exception handling (Billy Gray) - * Added page to search (Michael Ivey) - * Adding an option to display tweets on CLI in reverse order (oldest first). (Cameron Booth) - * Added in_reply_to_status_id option for replying to statuses (anthonycrumley) - * Fixed a bug where the @config was improperly set (K. Adam Christensen) - * Fix verify_credentials to include a format (breaks in laconica). (dustin) - -0.4.0 - December 23, 2008 -* 3 major changes - * Removed active support as dependency - * Removed CLI dependencies from install dependency list - (they are now only installed by you manually) - * Switched to echoe for gem managment - -0.3.7 - August 26, 2008 - * Fixed source param not getting through - -0.3.6 - August 11, 2008 - * Fixed a few more methods that required post. - * Refactored the remaining methods that were not using #request to use it. - -0.3.5 - August 4, 2008 - * Removed sqlite-ruby 1.2.2 as a dependency due to install issues on linux - -0.3.4 - August 3, 2008 - * Added search support - -0.3.3 - August 3, 2008 - * Now has option for host when initializing to support identi.ca (Dustin Sallings) - * Twitter changed a bunch of methods to POST only so I updated those to now work - -0.3.2 - July 26, 2008 - * added the CLI gems as dependencies for now until I separate out the CLI from the API wrapper - * cleaner CLI errors for no active account or no accounts at all - * remove sets a new active account if there are none - * added username and password optional arguments to add - * added import attempt on install and on anything that uses #current_account helper - -0.3.1 - July 23, 2008 - * added open to CLI twitter open jnunemaker would open default browser to http://twitter.com/jnunemaker - * added -f to timeline and replies which ignores the since_id and shows all results - * added clear_config to remove all cached since id's and such - * Majorly pimped the output of timelines and replies. - -0.3.0 - July 22, 2008 - * complete rewrite of CLI. Now supports multiple accounts and changing between them. - * added source, truncated, in_reply_to_status_id, in_reply_to_user_id, and favorited to Twitter::Status - * added protected to Twitter::User - * d CLI method now takes standard input like post - * Rewrote several methods that had since parameter to now use a hash instead. This makes it more flexible as API updates. - * Rewrote the methods that took lite or since as an argument to instead take a hash. - * added Twitter::Base#friendship_exists? - * added Twitter::Base#update_location - * added Twitter::Base#update_delivery_device - * added Twitter::Base#favorites - * added Twitter::Base#create_favorite - * added Twitter::Base#destroy_favorite - * added Twitter::Base#block - * added Twitter::Base#unblock - - BACKWORDS COMPATIBILITY BREAK: - Any method that you have using lite or since as an argument - will no longer work with this version. Simply change to a - hash and you'll be fine. For example: - - friends(true) would now be friends(:lite => true) - -0.2.7 - June 29, 2008 - * added #rate_limit_status (Daniel Morrison) - * added source parameter option to Base#post - * added twittergem as source when posting from command line - * Twitter::RateExceeded raised when you hit your limit (Jim O'Leary) - * Twitter::Unavailable raised when twitter returns 503 - * Twitter::CantConnect is now more descriptive as to what is the problem when it is raised during a request - * quoting your message when using twitter post on the command line is now optional (Benoit Caccinolo) - * aliased post to p on command line so it's shorter (Benoit Caccinolo) - * unescaped html and added some color in command line view (Miles Z. Sterrett) - * added gemspec (technoweenie, Miles Z. Sterrett) - * Fixed stack trace error on first command line operation (Matt Rose) -0.2.6 - April 2, 2008 - * found a more simple way of doing stdin without any extra gem dependencies -0.2.5 - April 2, 2008 - * Command line interface can now use stdin for posting (ideas and example code from Jeremy Friesen) - $ twitter post 'test without stdin' # => twitters: test without stdin - $ echo 'test with stdin' | twitter post 'and an argv[1]' # => twitters: test with stdin and an argv[1] - $ echo 'test with stdin without any argv[1]' | twitter post # => twitters: test with stdin without any argv[1] -0.2.4 - Mar 31, 2008 - * Added lite option to friends and followers, which doesn't include the user's current status (Daniel Morrison) - * Updated since option to use HTTP header, and added the option on timeline() and replies(). (Daniel Morrison) -0.2.3 - Jan 16, 2008 - * added d to command line interface twitter d jnunemaker 'hola' (Humbucker) - * added progress dots when posting for confirmation when twitter is running slow (Hendy Irawan) -0.2.2 - added leave and follow which are new twitter api methods for turning notifications on and off -0.2.0 - Aug 4, 2007 - * added sent_messages - * alias direct_messages to received_messages - * added create_friendship - * added destroy_friendship - * added featured to retrieve the featured twitter users - * added replies - * added destroy to destroy a status by id - * added status to find a status by id - * added active support as an extra dependency - * implemented d method to send direct messages (jnewland) - * fixed since argument in direct_messages method (jnewland) -0.1.1 - May 20, 2007 - * hpricot 0.5+ now supported; just a bug fix (Ryan Waldron is the man!) -0.1.0 - March 31, 2007 - * added d method for creating direct messages (waiting for it to work as documented) - * added featured method for getting featured users statuses (waiting for it to work as documented) - * added direct_messages method - * added friends_for method - * added a few tests - * removed relative_created_at as it is deprecated - * separated out the call method into call, request and parse methods -0.0.5 - just a bit of code cleanup -0.0.4 - added :location, :description, :url, :profile_image_url to user class (Alex Payne) -0.0.3 - added a bit more informative message when things go wrong -0.0.2 - added the command line options i forgot to add (friend and follower); improved some docs -0.0.1 - initial release \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/License b/ruby/processing/star_field/library/twitter-0.6.8/License deleted file mode 100644 index fbbebe1..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/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/ruby/processing/star_field/library/twitter-0.6.8/Notes b/ruby/processing/star_field/library/twitter-0.6.8/Notes deleted file mode 100644 index 944df35..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/Notes +++ /dev/null @@ -1,33 +0,0 @@ -***************************************************************** -* From Twitter API Docs, so I don't have to keep going to them. * -***************************************************************** - -http://apiwiki.twitter.com/REST+API+Documentation - -200 OK: everything went awesome. -304 Not Modified: there was no new data to return. -400 Bad Request: your request is invalid, and we'll return an error message that tells you why. This is the status code returned if you've exceeded the rate limit (see below). -401 Not Authorized: either you need to provide authentication credentials, or the credentials provided aren't valid. -403 Forbidden: we understand your request, but are refusing to fulfill it. An accompanying error message should explain why. -404 Not Found: either you're requesting an invalid URI or the resource in question doesn't exist (ex: no such user). -500 Internal Server Error: we did something wrong. Please post to the group about it and the Twitter team will investigate. -502 Bad Gateway: returned if Twitter is down or being upgraded. -503 Service Unavailable: the Twitter servers are up, but are overloaded with requests. Try again later. - -********** -* Errors * -********** - - - - /direct_messages/destroy/456.xml - No direct message with that ID found. - - -********************** -* Rate Limit Headers * -********************** - -X-RateLimit-Limit the current limit in effect -X-RateLimit-Remaining the number of hits remaining before you are rate limited -X-RateLimit-Reset the time the current rate limiting period ends (in epoch time, number of seconds since 1970-01-01 00:00:00) \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/README.rdoc b/ruby/processing/star_field/library/twitter-0.6.8/README.rdoc deleted file mode 100644 index db5bdca..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/README.rdoc +++ /dev/null @@ -1,13 +0,0 @@ -= twitter - -The ruby twitter gem. The gem heard round the world and famous on the streets. Haha. This gem works with both oauth and http auth, if you care. - -For now this is just an API wrapper. The command line interface is temporarily dead until I have time to make it work with oauth. At that point, I'll make it a new gem twitter-cli or something and it will depend on this gem to work. That will keep the separation of the api wrapper and cli and fix a lot of dependency issues. - -= examples - - See the examples directory. - -== Copyright - -Copyright (c) 2009 John Nunemaker. See LICENSE for details. diff --git a/ruby/processing/star_field/library/twitter-0.6.8/Rakefile b/ruby/processing/star_field/library/twitter-0.6.8/Rakefile deleted file mode 100644 index 839054d..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/Rakefile +++ /dev/null @@ -1,103 +0,0 @@ -require 'rubygems' -require 'rake' - -begin - require 'jeweler' - Jeweler::Tasks.new do |gem| - gem.name = "twitter" - gem.summary = %Q{wrapper for the twitter api (oauth only)} - gem.email = "nunemaker@gmail.com" - gem.homepage = "http://github.com/jnunemaker/twitter" - gem.authors = ["John Nunemaker"] - gem.rubyforge_project = "twitter" - gem.files = FileList["[A-Z]*", "{examples,lib,test}/**/*"] - - gem.add_dependency('oauth', '0.3.2') - gem.add_dependency('mash', '0.0.3') - gem.add_dependency('httparty', '0.4.3') - - gem.add_development_dependency('thoughtbot-shoulda') - gem.add_development_dependency('jeremymcanally-matchy') - gem.add_development_dependency('mocha') - gem.add_development_dependency('fakeweb') - gem.add_development_dependency('mash') - end -rescue LoadError - puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com" -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 - -require 'rake/rdoctask' -Rake::RDocTask.new do |rdoc| - if File.exist?('VERSION.yml') - config = YAML.load(File.read('VERSION.yml')) - version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" - else - version = "" - end - - rdoc.rdoc_dir = 'rdoc' - rdoc.title = "twitter #{version}" - rdoc.rdoc_files.include('README*') - rdoc.rdoc_files.include('lib/**/*.rb') -end - -begin - require 'rake/contrib/sshpublisher' - namespace :rubyforge do - - desc "Release gem and RDoc documentation to RubyForge" - task :release => ["rubyforge:release:gem", "rubyforge:release:website", "rubyforge:release:docs"] - - namespace :release do - desc "Publish RDoc to RubyForge." - task :docs => [:rdoc] do - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - - host = "#{config['username']}@rubyforge.org" - remote_dir = "/var/www/gforge-projects/twitter/rdoc" - local_dir = 'rdoc' - - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - - task :website do - config = YAML.load( - File.read(File.expand_path('~/.rubyforge/user-config.yml')) - ) - - host = "#{config['username']}@rubyforge.org" - remote_dir = "/var/www/gforge-projects/twitter/" - local_dir = 'website' - - Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload - end - end - end -rescue LoadError - puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured." -end diff --git a/ruby/processing/star_field/library/twitter-0.6.8/VERSION.yml b/ruby/processing/star_field/library/twitter-0.6.8/VERSION.yml deleted file mode 100644 index 955ca23..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/VERSION.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -:major: 0 -:minor: 6 -:patch: 8 diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/connect.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/connect.rb deleted file mode 100644 index dae9d8b..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/connect.rb +++ /dev/null @@ -1,30 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") -oauth = Twitter::OAuth.new(config['token'], config['secret']) - -if config['atoken'] && config['asecret'] - oauth.authorize_from_access(config['atoken'], config['asecret']) - twitter = Twitter::Base.new(oauth) - pp twitter.friends_timeline - -elsif config['rtoken'] && config['rsecret'] - oauth.authorize_from_request(config['rtoken'], config['rsecret']) - twitter = Twitter::Base.new(oauth) - pp twitter.friends_timeline - - config.update({ - 'atoken' => oauth.access_token.token, - 'asecret' => oauth.access_token.secret, - }).delete('rtoken', 'rsecret') -else - config.update({ - 'rtoken' => oauth.request_token.token, - 'rsecret' => oauth.request_token.secret, - }) - - # authorize in browser - %x(open #{oauth.request_token.authorize_url}) -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/friendship_existance.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/friendship_existance.rb deleted file mode 100644 index c3d5a2c..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/friendship_existance.rb +++ /dev/null @@ -1,13 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") - -oauth = Twitter::OAuth.new(config['token'], config['secret']) -oauth.authorize_from_access(config['atoken'], config['asecret']) - -client = Twitter::Base.new(oauth) - -puts client.friendship_exists?('jnunemaker', 'orderedlist') -puts client.friendship_exists?('jnunemaker', 'biz') \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/helpers/config_store.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/helpers/config_store.rb deleted file mode 100644 index 6ffb20b..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/helpers/config_store.rb +++ /dev/null @@ -1,38 +0,0 @@ -class ConfigStore - attr_reader :file - - def initialize(file) - @file = file - end - - def load - @config ||= YAML::load(open(file)) - self - end - - def [](key) - load - @config[key] - end - - def []=(key, value) - @config[key] = value - end - - def delete(*keys) - keys.each { |key| @config.delete(key) } - save - self - end - - def update(c={}) - @config.merge!(c) - save - self - end - - def save - File.open(file, 'w') { |f| f.write(YAML.dump(@config)) } - self - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/httpauth.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/httpauth.rb deleted file mode 100644 index 8b3f0cf..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/httpauth.rb +++ /dev/null @@ -1,11 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") - -httpauth = Twitter::HTTPAuth.new(config['email'], config['password']) -base = Twitter::Base.new(httpauth) - -pp base.user_timeline -pp base.verify_credentials \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/ids.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/ids.rb deleted file mode 100644 index 3eb9bdd..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/ids.rb +++ /dev/null @@ -1,13 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") - -oauth = Twitter::OAuth.new(config['token'], config['secret']) -oauth.authorize_from_access(config['atoken'], config['asecret']) - -client = Twitter::Base.new(oauth) - -puts client.friend_ids -puts client.follower_ids \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/search.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/search.rb deleted file mode 100644 index b8dc644..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/search.rb +++ /dev/null @@ -1,15 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require 'pp' - -search = Twitter::Search.new.from('jnunemaker') - -puts '*'*50, 'First Run', '*'*50 -search.each { |result| pp result } - -puts '*'*50, 'Second Run', '*'*50 -search.each { |result| pp result } - -puts '*'*50, 'Parameter Check', '*'*50 -pp Twitter::Search.new('#austineats').fetch().results.first -pp Twitter::Search.new('#austineats').page(2).fetch().results.first -pp Twitter::Search.new('#austineats').since(1412737343).fetch().results.first \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/timeline.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/timeline.rb deleted file mode 100644 index e5ad002..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/timeline.rb +++ /dev/null @@ -1,19 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") - -oauth = Twitter::OAuth.new(config['token'], config['secret']) -oauth.authorize_from_access(config['atoken'], config['asecret']) - -client = Twitter::Base.new(oauth) - -pp client.friends_timeline -puts '*'*50 - -pp client.user_timeline -puts '*'*50 - -pp client.replies -puts '*'*50 \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/unauthorized.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/unauthorized.rb deleted file mode 100644 index a4d1c6b..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/unauthorized.rb +++ /dev/null @@ -1,16 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require 'pp' - -puts 'User', '*'*50 -pp Twitter.user('jnunemaker') -pp Twitter.user('snitch_test') - -puts 'Status', '*'*50 -pp Twitter.status(1533815199) - -puts 'Friend Ids', '*'*50 -pp Twitter.friend_ids('jnunemaker') - -puts 'Follower Ids', '*'*50 -pp Twitter.follower_ids('jnunemaker') - diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/update.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/update.rb deleted file mode 100644 index b243354..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/update.rb +++ /dev/null @@ -1,11 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require File.join(File.dirname(__FILE__), 'helpers', 'config_store') -require 'pp' - -config = ConfigStore.new("#{ENV['HOME']}/.twitter") - -oauth = Twitter::OAuth.new(config['token'], config['secret']) -oauth.authorize_from_access(config['atoken'], config['asecret']) - -client = Twitter::Base.new(oauth) -pp client.update('This is an update from the twitter gem') \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/examples/user.rb b/ruby/processing/star_field/library/twitter-0.6.8/examples/user.rb deleted file mode 100644 index 3e3061d..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/examples/user.rb +++ /dev/null @@ -1,5 +0,0 @@ -require File.join(File.dirname(__FILE__), '..', 'lib', 'twitter') -require 'pp' - -pp Twitter.user('jnunemaker') -pp Twitter.user('snitch_test') \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter.rb deleted file mode 100644 index b3ed1b6..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter.rb +++ /dev/null @@ -1,63 +0,0 @@ -require 'forwardable' -# require 'rubygems' - -# gem 'oauth', '0.3.2' -require 'oauth' - -# gem 'mash', '0.0.3' -require 'mash' - -# gem 'httparty', '0.4.3' -require 'httparty' - -module Twitter - class TwitterError < StandardError - attr_reader :data - - def initialize(data) - @data = data - super - end - end - - class RateLimitExceeded < TwitterError; end - class Unauthorized < TwitterError; end - class General < TwitterError; end - - class Unavailable < StandardError; end - class InformTwitter < StandardError; end - class NotFound < StandardError; end - - - def self.firehose - response = HTTParty.get('http://twitter.com/statuses/public_timeline.json', :format => :json) - response.map { |tweet| Mash.new(tweet) } - end - - def self.user(id) - response = HTTParty.get("http://twitter.com/users/show/#{id}.json", :format => :json) - Mash.new(response) - end - - def self.status(id) - response = HTTParty.get("http://twitter.com/statuses/show/#{id}.json", :format => :json) - Mash.new(response) - end - - def self.friend_ids(id) - HTTParty.get("http://twitter.com/friends/ids/#{id}.json", :format => :json) - end - - def self.follower_ids(id) - HTTParty.get("http://twitter.com/followers/ids/#{id}.json", :format => :json) - end -end - -directory = File.dirname(__FILE__) -$:.unshift(directory) unless $:.include?(directory) - -require 'twitter/oauth' -require 'twitter/httpauth' -require 'twitter/request' -require 'twitter/base' -require 'twitter/search' \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/base.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/base.rb deleted file mode 100644 index a0b4ed9..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/base.rb +++ /dev/null @@ -1,165 +0,0 @@ -module Twitter - class Base - extend Forwardable - - def_delegators :client, :get, :post - - attr_reader :client - - def initialize(client) - @client = client - end - - # Options: since_id, max_id, count, page, since - def friends_timeline(query={}) - perform_get('/statuses/friends_timeline.json', :query => query) - end - - # Options: id, user_id, screen_name, since_id, max_id, page, since - def user_timeline(query={}) - perform_get('/statuses/user_timeline.json', :query => query) - end - - def status(id) - perform_get("/statuses/show/#{id}.json") - end - - # Options: in_reply_to_status_id - def update(status, query={}) - perform_post("/statuses/update.json", :body => {:status => status}.merge(query)) - end - - # Options: since_id, max_id, since, page - def replies(query={}) - perform_get('/statuses/replies.json', :query => query) - end - - def status_destroy(id) - perform_post("/statuses/destroy/#{id}.json") - end - - # Options: id, user_id, screen_name, page - def friends(query={}) - perform_get('/statuses/friends.json', :query => query) - end - - # Options: id, user_id, screen_name, page - def followers(query={}) - perform_get('/statuses/followers.json', :query => query) - end - - def user(id, query={}) - perform_get("/users/show/#{id}.json", :query => query) - end - - # Options: since, since_id, page - def direct_messages(query={}) - perform_get("/direct_messages.json", :query => query) - end - - # Options: since, since_id, page - def direct_messages_sent(query={}) - perform_get("/direct_messages/sent.json", :query => query) - end - - def direct_message_create(user, text) - perform_post("/direct_messages/new.json", :body => {:user => user, :text => text}) - end - - def direct_message_destroy(id) - perform_post("/direct_messages/destroy/#{id}.json") - end - - def friendship_create(id, follow=false) - body = {} - body.merge!(:follow => follow) if follow - perform_post("/friendships/create/#{id}.json", :body => body) - end - - def friendship_destroy(id) - perform_post("/friendships/destroy/#{id}.json") - end - - def friendship_exists?(a, b) - perform_get("/friendships/exists.json", :query => {:user_a => a, :user_b => b}) - end - - # Options: id, user_id, screen_name - def friend_ids(query={}) - perform_get("/friends/ids.json", :query => query, :mash => false) - end - - # Options: id, user_id, screen_name - def follower_ids(query={}) - perform_get("/followers/ids.json", :query => query, :mash => false) - end - - def verify_credentials - perform_get("/account/verify_credentials.json") - end - - # Device must be sms, im or none - def update_delivery_device(device) - perform_post('/account/update_delivery_device.json', :body => {:device => device}) - end - - # One or more of the following must be present: - # profile_background_color, profile_text_color, profile_link_color, - # profile_sidebar_fill_color, profile_sidebar_border_color - def update_profile_colors(colors={}) - perform_post('/account/update_profile_colors.json', :body => colors) - end - - def rate_limit_status - perform_get('/account/rate_limit_status.json') - end - - # One or more of the following must be present: - # name, email, url, location, description - def update_profile(body={}) - perform_post('/account/update_profile.json', :body => body) - end - - # Options: id, page - def favorites(query={}) - perform_get('/favorites.json', :query => query) - end - - def favorite_create(id) - perform_post("/favorites/create/#{id}.json") - end - - def favorite_destroy(id) - perform_post("/favorites/destroy/#{id}.json") - end - - def enable_notifications(id) - perform_post("/notifications/follow/#{id}.json") - end - - def disable_notifications(id) - perform_post("/notifications/leave/#{id}.json") - end - - def block(id) - perform_post("/blocks/create/#{id}.json") - end - - def unblock(id) - perform_post("/blocks/destroy/#{id}.json") - end - - def help - perform_get('/help/test.json') - end - - private - def perform_get(path, options={}) - Twitter::Request.get(self, path, options) - end - - def perform_post(path, options={}) - Twitter::Request.post(self, path, options) - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/httpauth.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/httpauth.rb deleted file mode 100644 index 9269e68..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/httpauth.rb +++ /dev/null @@ -1,27 +0,0 @@ -module Twitter - class HTTPAuth - include HTTParty - format :plain - - attr_reader :username, :password, :options - - def initialize(username, password, options={}) - @username, @password = username, password - @options = {:ssl => false}.merge(options) - self.class.base_uri "http#{'s' if options[:ssl]}://twitter.com" - end - - def get(uri, headers={}) - self.class.get(uri, :headers => headers, :basic_auth => basic_auth) - end - - def post(uri, body={}, headers={}) - self.class.post(uri, :body => body, :headers => headers, :basic_auth => basic_auth) - end - - private - def basic_auth - @basic_auth ||= {:username => @username, :password => @password} - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/oauth.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/oauth.rb deleted file mode 100644 index d63d696..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/oauth.rb +++ /dev/null @@ -1,34 +0,0 @@ -module Twitter - class OAuth - extend Forwardable - def_delegators :access_token, :get, :post - - attr_reader :ctoken, :csecret - - def initialize(ctoken, csecret) - @ctoken, @csecret = ctoken, csecret - end - - def consumer - @consumer ||= ::OAuth::Consumer.new(@ctoken, @csecret, {:site => 'http://twitter.com'}) - end - - def request_token - @request_token ||= consumer.get_request_token - end - - def authorize_from_request(rtoken, rsecret) - request_token = ::OAuth::RequestToken.new(consumer, rtoken, rsecret) - access_token = request_token.get_access_token - @atoken, @asecret = access_token.token, access_token.secret - end - - def access_token - @access_token ||= ::OAuth::AccessToken.new(consumer, @atoken, @asecret) - end - - def authorize_from_access(atoken, asecret) - @atoken, @asecret = atoken, asecret - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/request.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/request.rb deleted file mode 100644 index c7b0500..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/request.rb +++ /dev/null @@ -1,102 +0,0 @@ -module Twitter - class Request - extend Forwardable - - def self.get(client, path, options={}) - new(client, :get, path, options).perform - end - - def self.post(client, path, options={}) - new(client, :post, path, options).perform - end - - attr_reader :client, :method, :path, :options - - def_delegators :client, :get, :post - - def initialize(client, method, path, options={}) - @client, @method, @path, @options = client, method, path, {:mash => true}.merge(options) - end - - def uri - @uri ||= begin - uri = URI.parse(path) - - if options[:query] && options[:query] != {} - uri.query = to_query(options[:query]) - end - - uri.to_s - end - end - - def perform - make_friendly(send("perform_#{method}")) - end - - private - def perform_get - send(:get, uri, options[:headers]) - end - - def perform_post - send(:post, uri, options[:body], options[:headers]) - end - - def make_friendly(response) - raise_errors(response) - data = parse(response) - options[:mash] ? mash(data) : data - end - - def raise_errors(response) - case response.code.to_i - when 400 - data = parse(response) - raise RateLimitExceeded.new(data), "(#{response.code}): #{response.message} - #{data['error'] if data}" - when 401 - data = parse(response) - raise Unauthorized.new(data), "(#{response.code}): #{response.message} - #{data['error'] if data}" - when 403 - data = parse(response) - raise General.new(data), "(#{response.code}): #{response.message} - #{data['error'] if data}" - when 404 - raise NotFound, "(#{response.code}): #{response.message}" - when 500 - raise InformTwitter, "Twitter had an internal error. Please let them know in the group. (#{response.code}): #{response.message}" - when 502..503 - raise Unavailable, "(#{response.code}): #{response.message}" - end - end - - def parse(response) - Crack::JSON.parse(response.body) - end - - def mash(obj) - if obj.is_a?(Array) - obj.map { |item| make_mash_with_consistent_hash(item) } - elsif obj.is_a?(Hash) - make_mash_with_consistent_hash(obj) - else - obj - end - end - - # Lame workaround for the fact that mash doesn't hash correctly - def make_mash_with_consistent_hash(obj) - m = Mash.new(obj) - def m.hash - inspect.hash - end - return m - end - - def to_query(options) - options.inject([]) do |collection, opt| - collection << "#{opt[0]}=#{opt[1]}" - collection - end * '&' - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/search.rb b/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/search.rb deleted file mode 100644 index 8c9968e..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/lib/twitter/search.rb +++ /dev/null @@ -1,106 +0,0 @@ -module Twitter - class Search - include HTTParty - include Enumerable - - attr_reader :result, :query - - def initialize(q=nil) - clear - containing(q) if q && q.strip != '' - end - - def from(user) - @query[:q] << "from:#{user}" - self - end - - def to(user) - @query[:q] << "to:#{user}" - self - end - - def referencing(user) - @query[:q] << "@#{user}" - self - end - alias :references :referencing - alias :ref :referencing - - def containing(word) - @query[:q] << "#{word}" - self - end - alias :contains :containing - - # adds filtering based on hash tag ie: #twitter - def hashed(tag) - @query[:q] << "##{tag}" - self - end - - # lang must be ISO 639-1 code ie: en, fr, de, ja, etc. - # - # when I tried en it limited my results a lot and took - # out several tweets that were english so i'd avoid - # this unless you really want it - def lang(lang) - @query[:lang] = lang - self - end - - # Limits the number of results per page - def per_page(num) - @query[:rpp] = num - self - end - - # Which page of results to fetch - def page(num) - @query[:page] = num - self - end - - # Only searches tweets since a given id. - # Recommended to use this when possible. - def since(since_id) - @query[:since_id] = since_id - self - end - - # Search tweets by longitude, latitude and a given range. - # Ranges like 25km and 50mi work. - def geocode(long, lat, range) - @query[:geocode] = [long, lat, range].join(',') - self - end - - def max(id) - @query[:max_id] = id - self - end - - # Clears all the query filters to make a new search - def clear - @fetch = nil - @query = {} - @query[:q] = [] - self - end - - def fetch(force=false) - if @fetch.nil? || force - query = @query.dup - query[:q] = query[:q].join(' ') - response = self.class.get('http://search.twitter.com/search.json', :query => query, :format => :json) - @fetch = Mash.new(response) - end - - @fetch - end - - def each - fetch()['results'].each { |r| yield r } - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/firehose.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/firehose.json deleted file mode 100644 index 45af935..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/firehose.json +++ /dev/null @@ -1 +0,0 @@ -[{"user":{"followers_count":74,"description":"This is a p2p torrent feed from various online torrent sources.","url":"","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Earth","screen_name":"P2P_Torrents","name":"P2P Torrents","id":27694960},"text":"#torrents Ultimativer Flirt Guide - In 10 Minuten jede Frau erobern: Ultimativer Flirt Guide - In 10 Mi.. http:\/\/tinyurl.com\/d3okh4","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:28 +0000 2009","source":"twitterfeed<\/a>","in_reply_to_status_id":null,"id":1447485843},{"user":{"followers_count":136860,"description":"I'm MO-RIS. Freestyle,Freeride,Freelife. MountainBike and BMX rider. My favorite Music is Jazz, Funk and Hip-Hop. Sorry, I use Japanese only.","url":"http:\/\/iddy.jp\/profile\/mo-ris\/","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Okazaki, Aichi, Japan","screen_name":"moooris","name":"MO-RiS \/ もーりす","id":14523894},"text":"@moccai はい、がんばってくださいねっ! [at Home]","truncated":false,"favorited":false,"in_reply_to_user_id":7796422,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"Tween<\/a>","in_reply_to_status_id":1447479571,"id":1447485827},{"user":{"followers_count":69,"description":"","url":"http:\/\/frosh.tumblr.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Mexico","screen_name":"fer_sure","name":"fer","id":13189472},"text":"Terminando de comer en casa de @isaak182","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485826},{"user":{"followers_count":296,"description":"Kevin Yarr, Web Journalist","url":"http:\/\/www.cbc.ca\/pei\/","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Charlottetown","screen_name":"CBCPEI","name":"CBC P.E.I.","id":18999995},"text":"UPDATE coming. Two of three deputies to return PNP money","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485825},{"user":{"followers_count":129,"description":"Heyy :)","url":"http:\/\/www.myspace.com\/smegzx","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"England","screen_name":"Megzx","name":"Megan.","id":23615322},"text":"\"I Will Break.., Into Your Thoughts.., With Whats Written On Myy Heart..\" (8) =)","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485823},{"user":{"followers_count":2,"description":"","url":"","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"fatherearth2011","name":"burt m","id":24932539},"text":"Has found his research for his PhD in plant biology. Evolution of floral color, watch out Cambridge.","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"txt<\/a>","in_reply_to_status_id":null,"id":1447485820},{"user":{"followers_count":148,"description":"Director of Public Affairs, Minnesota House Republican Caucus","url":"http:\/\/www.mnhousegop.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"kwatt","name":"Kevin Watterson","id":9082192},"text":"It's all garbage to me. http:\/\/twitpic.com\/2rz8v","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:28 +0000 2009","source":"TwitterFon<\/a>","in_reply_to_status_id":null,"id":1447485819},{"user":{"followers_count":1307,"description":"Wife, homeschool mom & Arbonne Rep #15970532. I specialize in Arbonne's weightloss program. I can help you lose weight! Blog address: http:\/\/bit.ly\/zQnHH","url":"http:\/\/www.peggyalvarado.myarbonne.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"peggyalvarado","name":"Peggy Alvarado","id":21317064},"text":"Follow Friday! @thoughtcoach #followfriday","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485817},{"user":{"followers_count":24,"description":"I'm me.","url":"","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"Crazier_Me","name":"lisamaries.","id":24554902},"text":"@RiRi_Twin Wow. Once. Okay, whatever. Why can't you just calm down and get over it?? Or you wanna fight?!","truncated":false,"favorited":false,"in_reply_to_user_id":24706147,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"web","in_reply_to_status_id":1447471539,"id":1447485815},{"user":{"followers_count":24,"description":"I'm Steve. I like scary things, viddya games, and being a ninja. And Notorious Fluffy T","url":"http:\/\/www.myspace.com\/psychodboy","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Elkridge MD","screen_name":"ShinobiSteve","name":"Steve Hinz","id":20456870},"text":"@laylakayleigh I get my mom books or dvds or sweets usually. She's not open on things she wants when I ask.","truncated":false,"favorited":false,"in_reply_to_user_id":17349900,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"twhirl<\/a>","in_reply_to_status_id":1447448955,"id":1447485813},{"user":{"followers_count":49,"description":"i AM UNiQUE iN MY OWN WAY!! i AM A liVING WALKiNG BARBi3..i SET MORE THAN TRENDS.i iNSPiRE...","url":"","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"cottage grove, mn","screen_name":"AD3OLA","name":"Adeola Gbadebo","id":26118515},"text":"i don't see myself as concided..i am just confident and i carry myself high.. i mean is that concided..damnnn there is a difference there..","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485811},{"user":{"followers_count":659,"description":"An advertising\/social media\/interactive junkie who lives on the 'net","url":"http:\/\/www.brentter.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Atlanta, GA","screen_name":"brentter","name":"Brent Terrazas","id":6426682},"text":"@stuntdubl http:\/\/seopro.com.au\/free-seo-tools\/new\/link-checker\/ and http:\/\/seoanalytic.com\/tools\/internal_pagerank_checker\/","truncated":false,"favorited":false,"in_reply_to_user_id":1359731,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"web","in_reply_to_status_id":1447477924,"id":1447485810},{"user":{"followers_count":10,"description":"Match Results from The Blue Alliance. More at @thebluealliance and http:\/\/www.thebluealliance.net","url":"http:\/\/www.thebluealliance.net","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"TBAMatchResults","name":"TBA Match Results","id":27573276},"text":"2518, 2052, 3082 lost to 2498, 2529, 2574 [46 to 73] in Qualifications 44 at Minnesota 10000 Lakes Regional","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485809},{"user":{"followers_count":431,"description":"I am living well and learning every day. I am a marketer who founded Ciena's community initiative and I help them find success with all their web initiatives.","url":"http:\/\/www.ciena.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Massachusetts","screen_name":"NaomiMarr","name":"Naomi Marr","id":14419908},"text":"RT @coryereed: Check out video from visit earlier this week at @Ciena Innovation Lab. http:\/\/bit.ly\/84DJ5 (Sorry, no @britneyspears cameos)","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"TweetDeck<\/a>","in_reply_to_status_id":null,"id":1447485808},{"user":{"followers_count":34,"description":"","url":"","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"","screen_name":"Lilwildgirlrawr","name":"Lizzie is da name","id":20962388},"text":"Dis qurl is sinqle iqht here! Ohh yeah man...Flirtinq is qonna start toniqht at da partay<3","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485807},{"user":{"followers_count":0,"description":null,"url":null,"profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":null,"screen_name":"elliethomasbubz","name":"ellie thomas","id":28426326},"text":"waitinf for the video :)","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485806},{"user":{"followers_count":427,"description":"Restaurant Recruiter \/ Industry Blogger \/ LifeChurch.tv partner","url":"http:\/\/www.restaurantmanagerresources.blogspot.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Oklahoma City, OK","screen_name":"headhunterbrian","name":"Brian Bruce","id":15346984},"text":"@sunnythomas Dave Ramsey rocks! We're debt free but for the house thanks in large part to him.","truncated":false,"favorited":false,"in_reply_to_user_id":14160713,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":1447461266,"id":1447485805},{"user":{"followers_count":469,"description":"Christian. Student. Filmmaker. Daydreamer. Real dude. OBSESSED w\/ EVERYTHING 80'S-90'S!!! Allergic to fake.","url":"http:\/\/www.myspace.com\/itsboywonder","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"Orange County, Cali","screen_name":"Hollywood_Trey","name":"Trumaine Smith","id":23739806},"text":"@jenskiii About what?","truncated":false,"favorited":false,"in_reply_to_user_id":18823582,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":1447473524,"id":1447485804},{"user":{"followers_count":220,"description":"Azz Monkey Clothing is a premium clothing brand offering the very best in urban lifestyle, skateboard, and snowboard apparel.","url":"http:\/\/www.azzmonkey.com","profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":"SnowDirtWaterSidewalkStreets","screen_name":"azzmonkey","name":"Azz Monkey Clothing","id":17183594},"text":"How are enjoying the new digs?","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:29 +0000 2009","source":"txt<\/a>","in_reply_to_status_id":null,"id":1447485803},{"user":{"followers_count":13,"description":null,"url":null,"profile_image_url":"http:\/\/static.twitter.com\/images\/default_profile_normal.png","protected":false,"location":null,"screen_name":"ljross","name":"Liam Ross","id":20691904},"text":"Don't understand the need for suicidal thoughts to include murder, too. For instance, in Binghamton. http:\/\/tinyurl.com\/crrg3c","truncated":false,"favorited":false,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 20:13:27 +0000 2009","source":"web","in_reply_to_status_id":null,"id":1447485799}] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/follower_ids.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/follower_ids.json deleted file mode 100644 index 3c8f36a..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/follower_ids.json +++ /dev/null @@ -1 +0,0 @@ -[613,12796,12938,5765,13518,15323,8906,453593,598503,629603,628623,713263,697893,646123,720583,754990,755264,702653,611823,792399,12606,1226011,969631,3038211,2396591,5594932,5891052,5493662,768288,6247142,6609302,6833532,5104571,3672651,19413,7174582,6991162,6806472,6426602,10718,7430672,8396042,1182631,8597622,6845342,8883422,6816462,702613,1156261,9241962,9264222,6738932,9292132,8882412,5784962,79283,9767172,6996312,654653,9864902,8140482,9907312,6469542,874,9885102,1993721,6466022,8616122,7671872,10477902,723873,7821622,9874262,10845072,763224,5803002,12543,10452452,11094492,10560,12661,12741,75413,1714531,779169,13229,3560241,11485452,9733422,9573202,9870612,7152562,3576061,7574002,7808572,12081432,13346,10904502,9861982,482253,12235182,12223582,12515312,12251592,8407962,9255062,12728492,6141442,12750862,12488072,9291992,9390942,12084572,13156282,5790592,12412462,13510782,627303,1254261,616673,6368162,13706912,13782402,99723,12219102,56813,14070811,13826102,8766242,14090477,14094961,14096589,7019942,14099976,8293102,14119520,1328941,14051749,7508082,8095722,10193732,1307011,12707,12156682,6123982,14178038,10824762,11040972,13908992,14199456,10486382,13726052,11562312,6556972,14166387,14227633,3148,4513781,9548262,5840792,14257836,14055920,14262452,659933,10767782,14287223,14288480,652313,637763,66983,7462822,4448101,14332039,12579382,14332997,14287820,8033832,127583,14122477,816954,2477051,14302268,14206126,14378107,7879442,14328574,3628081,14398763,14162251,14377330,14010712,9468052,14221051,14409089,13955252,12681842,937561,14427863,14466143,14062005,14470429,14450143,13499872,14076758,14527633,14234012,960021,14380090,14073831,780561,14563161,14563260,9462972,14590521,1140261,12906952,6836402,1019951,5977,14361042,14588083,10967052,14169810,5462572,14687070,2898661,11946,14676814,14220413,11380312,14655491,7163912,38353,15403,14776551,14789853,14900453,5531452,14250972,5167141,14712637,14886813,14423603,14771453,12982472,14946593,14777840,8494682,1175831,14936183,14415989,2058881,6474562,14984654,13722,14169869,12478292,5467712,586803,10085192,14345945,6651022,8748292,14999286,9929452,1104891,785975,14706300,15033995,9100012,6221832,14140936,14942738,15094584,12350092,15114739,14351457,14798512,15126780,3283321,14073810,9764082,14259623,10733192,1152571,14899320,14367500,14128132,14911154,9371582,8922,15273534,14156043,1768041,15242061,14009722,13108342,75603,15264105,14740219,7758072,15028397,819302,15348010,752673,14543058,1274141,3185531,6306542,13108322,12686592,15375222,15430874,14424415,15352422,14317036,2019081,15491618,15024280,15464324,14168885,808074,15465686,12892292,10037622,15104784,15638865,12093512,14412322,14292165,10572372,12591,14803076,1243511,13971202,5504782,14649039,645353,5743852,13357,15095182,14469207,1585,7606742,790038,2006261,755028,10089142,12885682,15809772,15796373,15845499,15527007,15468368,14802005,15432802,5483162,8409072,1705591,15142405,4670021,14689610,9572062,12601,1000841,14713941,16002464,7219322,14292285,13353212,16143088,16152707,9866922,14205289,16199846,16233822,13602072,15657520,754747,7475362,15040976,50213,12500052,7152,16200523,9741672,16455427,9980812,14590839,14946654,15151626,16381951,16590772,1566201,16568594,16605678,7372912,638323,5715642,16103569,4632211,6446182,15820948,6778152,16661360,14366390,11889272,8070462,65273,14994463,16692958,627033,3732061,10633482,14380132,14943451,12468852,16828265,14402895,5099921,16885851,14675469,16697903,2900941,14451461,1496591,6164712,15778099,14191988,14431413,14182540,15783687,13856062,3791401,15424241,5206801,8905562,10073922,785340,756264,17009966,9723312,17058191,15768409,1676,15770176,14246143,16664183,823615,16987638,15754496,17100288,16011929,5576742,16876792,5815992,7605802,17134532,16033573,15518671,17200223,16918853,6082492,845611,16220947,16734204,6967822,5748162,5812572,16941853,10527202,1004071,10293122,3123671,17188350,17127839,813198,15690398,15377515,14402837,15353105,9492192,15839304,11589532,14816455,17331141,10879162,14116750,11088,15615165,15827231,16493323,6144652,17489546,14541533,17502272,728893,14365840,17503660,15239784,6525062,6148812,9887162,40863,16950740,14642335,14575376,14100886,17477873,14404318,16981333,14957975,10261302,17655861,17365218,3175171,15747123,6915102,7356622,16604035,17428418,14651825,15896029,16577001,1372651,15005954,14265787,14879573,15386336,17816690,16425887,17834170,16684812,149083,17862753,792632,14193132,6051562,17904110,9380652,14381877,2983251,5643432,16205983,14189032,389153,16211186,8126672,15085140,15585336,14223716,14071467,17870682,14409240,17987541,18001148,17985989,15442984,9695352,7939892,18050862,17481197,7617722,14198590,7935042,17037553,6817252,17378007,17938529,14339150,18149901,1684601,6279162,15846853,35953,14384158,9523302,18173702,10319902,14582075,16531891,12357582,18210267,18043449,4584551,774234,16893238,18222267,18222794,15848007,7858242,15948895,18227971,18128544,16472254,17823286,8233892,12581032,799194,33493,785875,12087292,16064905,15012307,14212434,17146581,670653,13999762,17034483,7948072,9700282,766652,16271041,9237312,15454740,6309042,9532132,15701745,14810774,10456332,808549,6154882,12241342,14486918,14606633,11603,9439332,17052841,14512472,14848368,16826149,16831553,13332232,9407382,49873,11115922,14099654,7776092,15868801,12669172,14046670,15196200,15395778,16739253,1663751,2355631,1277191,3659691,18333815,16112732,18353799,16039614,18250230,18073179,18332874,18214919,4628831,16547430,17586908,18413162,7278032,10832,17725290,1388321,1761301,14768495,17136292,14914403,15595306,6466912,2531521,14422605,828881,10255262,735053,57753,17232987,16798806,11923112,17988073,18044614,12436422,13439,17905573,18483916,17537056,15797213,18470553,18529984,643463,18571972,18575796,18594356,18607270,5218641,13560862,14974634,14464047,17999470,625943,14474670,18526656,14273725,14579367,14803587,18173533,17643364,10415882,809693,15558320,18674931,7018532,9360872,16481323,10286,6258202,10075872,893111,14093286,5533332,2550611,17009251,14281860,14641005,6730622,16452903,2738011,7839552,18597832,18700008,15905871,5933482,16840273,16736196,12321122,12270222,18833825,18834036,18332117,2883681,15697354,18852714,722103,16859405,18669941,668523,2049071,18879392,18631418,814580,16751180,18927092,17236341,18936955,18936577,10423432,17005083,18483113,15776217,15683541,14952014,18913504,6087472,1505961,18016189,18598615,14335551,17658632,18658388,14234004,2778231,8910282,15609931,14247987,649823,18883909,14281405,10324882,9675652,15320102,17498367,18390929,15315836,12474212,9988852,19158240,16419355,183813,15257407,14297166,19113783,16440108,12743592,18664783,9453872,16204699,15020118,14345587,780429,5969702,7219042,14948485,17620522,14671169,16680410,19353133,17994112,17429908,14908912,19600123,18170649,14748148,14571331,17229194,5457352,48773,19679367,9397012,15382766,16343513,14911144,17395851,15533248,17076389,9358602,16406528,18099640,17767547,19670419,18096662,17822704,14293292,6893792,53533,19795241,18110885,19810631,19827904,17558167,5117751,15638508,14926752,14149756,19634908,4468761,14567574,19948841,19954092,11835742,19938151,18423380,15904774,17560204,15074377,19231436,14165452,14469692,19036617,18807589,19788955,4080231,12920142,15399430,19578455,19482274,16996285,16259172,17667997,15203555,18214599,18781842,16621912,15479835,2202971,14410783,19736005,15135447,20163695,900601,6823692,292343,20131136,16808303,19978953,19547434,1089691,15871043,18809171,20609277,3560581,17432169,19691213,18098007,15417592,17833536,15177003,14381339,14194819,15407324,16731023,17149004,18491112,13972462,12370632,20067154,19073088,14127807,20553221,15107495,19851613,19870989,20420301,20681696,2148071,20100721,14633348,5573992,20705043,635793,10785892,20402565,14565733,20098787,20021607,15874552,20729126,21181647,18180272,14978802,18323749,7140702,18178441,21310249,15751895,5447882,19711370,18478757,2819,21278339,15442621,16301737,15070016,21320738,8348382,18600952,13770172,1649221,18360116,18276818,19900631,21379159,19935253,18737620,15195247,14658472,364,6813682,13074,1623,15000151,16912019,15235415,14101380,16599558,19037300,12687402,16889733,857501,19821374,1092621,21683201,20758237,12981172,19781549,20222971,15389148,12226202,14875570,17892372,5502392,843551,21804545,15723434,18391040,19292759,3286561,774060,14796100,12099752,18787589,13959242,10275892,629743,18234697,2230561,22072861,18670512,18820221,22300190,22340666,18216320,22400526,22431378,20899175,6330782,16883585,15935078,1364461,6179812,20589092,22508751,16933064,13183022,9808812,21062351,18381622,17183132,19018761,15899431,16188278,5661552,173813,15533585,22744648,22068050,22780485,20782318,60173,65583,22251010,21407715,5847082,18577007,15213923,22648234,18891726,15348242,2221741,19762959,17073317,22391658,19507837,17938747,5490442,22602883,20118508,13015632,19587710,15408479,23344603,17151343,14675249,15503518,22568737,18430448,18427032,23545306,23573979,7876602,11844,23221906,19193268,21311227,21634137,15458901,14714195,17788144,16927093,17450808,23713422,16467378,18642131,717233,10936152,23482614,19608005,23783966,19041419,13649,21328766,21203364,24187338,21884359,17192822,22128553,24257748,22132860,8868052,17879103,22593469,24204485,14660636,20857214,23501805,24347906,24567825,22294133,20089217,14262730,20987428,18588717,9922002,21980551,11905432,15492087,17067434,24851973,24677391,16822505,15917082,22224252,23923379,19288013,18402842,8274972,25121859,24833951,24888158,25241640,22232760,18893301,15644361,2633481,22660688,24562858,18755300,23567427,25566300,25569710,14464510,25745097,23751200,25817409,25259149,24622977,16401257,14882304,25771412,19388022,21922054,25542506,25599456,25782929,24801749,25538391,16651984,17834535,26040534,753973,26297795,15605658,16823020,19956062,16794261,13422802,26779699,21743486,14319649,25535757,26931958,26579479,7124752,25059528,3054021,25692022,8328752,17911850,15441990,6660852,17012066,27389560,25564238,22783131,27494001,27458253,7362512,21980433,14397705,18152191,14737211,44883,27809050,12125972,15558717,27838986,27117081,16651813,21723920,27862035,14452237,27406847,18630290,15344521,24496939,22762300,14879654,25107835,7888382,1011261,15518890,17487435,14131856,28279311,12384042,21721761,12480492,28532385,21380989,28468396,28504645,15919836,28793082,28816818,5857812,19498371,28912805,28956077,26423794,22239593,18425965,25147645,26723451,1087421,14212679,29380265,29398462,770952,22916479,20017276,19534762,10316422,936161,25097218,5538522,16344576,2819741,30440861,30514010,29775532,2071301,27839741,28711633,28210955,29374100,31023933,14798962,24529511,28983323,31438725,22543443,3636011,15376537] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friend_ids.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friend_ids.json deleted file mode 100644 index 040f416..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friend_ids.json +++ /dev/null @@ -1 +0,0 @@ -[15323,12796,18713,697893,598503,13518,12938,10718,616163,8906,713263,792399,246,780561,658343,3038211,790205,46413,7124752,3672651,1182631,8883422,9264222,6738932,9907312,9885102,717233,5784962,12661,75413,779169,12543,9241962,12741,6186692,12707,38353,5502392,1714531,3560241,11485452,761613,10193732,482253,12235182,6141442,8028152,627303,13782402,13826102,14094961,14096589,14119520,20,14257836,14262452,8616122,14288480,1768041,14763,12196,14122477,1140261,6707392,654653,937561,33493,9929452,5877822,14246143,14561327,3191321,6927562,12591,615403,9941002,12047992,15403,676573,8494682,9887162,2058881,5444392,127583,14973933,15033995,14351457,14740219,613,819302,752673,25993,808074,14482752,11132462,13108342,2006261,16143088,9572062,14398763,10486382,56813,12081432,13108322,13722,6474562,2049071,4037,9980812,14080083,14372143,8033832,16623244,16623407,13560862,12081692,65273,624683,16828397,16893238,14380132,784171,54793,6082492,6556972,17058191,11294,15005954,6967822,845611,13856062,14994463,15432802,1104891,7846,5812572,17311462,6446182,792632,14365840,18222794,18227971,14345587,15948437,657863,17889970,17667997,18660239,17461978,3286561,5391882,19058681,11718,22391658,14522546,17919972,25745097,19483147,13334762,16373523,20017276] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friends_timeline.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friends_timeline.json deleted file mode 100644 index 1ab87f7..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/friends_timeline.json +++ /dev/null @@ -1 +0,0 @@ -[{"in_reply_to_screen_name":null,"user":{"profile_sidebar_border_color":"181A1E","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","profile_background_tile":false,"profile_text_color":"666666","followers_count":1231,"protected":false,"favourites_count":73,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","statuses_count":4664,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif"},"text":"Rob Dyrdek is the funniest man alive. That is all.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 22:57:00 +0000 2009","favorited":false,"id":1441588944,"source":"Tweetie<\/a>"},{"favorited":false,"user":{"profile_sidebar_fill_color":"252429","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","followers_count":1228,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":161,"time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":73,"profile_background_color":"1A1B1F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4663,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Dang, forgot about CAN http:\/\/calendaraboutnothing.com\/~jnunemaker yesterday and broke my streak of 5 days in a row.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1438916463,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 15:24:17 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"friends_count":161,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_text_color":"666666","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","protected":false,"statuses_count":4660,"profile_sidebar_fill_color":"252429","notifications":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E","followers_count":1228,"profile_background_tile":false,"location":"Mishawaka, Indiana","id":4243},"text":"@kebabsylan yes. I'll be there at noon.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:38:03 +0000 2009","favorited":false,"id":1438637063,"source":"txt<\/a>"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4659,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1228},"text":"http:\/\/twitpic.com\/2pwjy - The books I'm reading right now. Wish I had more time.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:34:10 +0000 2009","favorited":false,"id":1438613754,"source":"TwitPic<\/a>"},{"favorited":false,"user":{"statuses_count":4658,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"followers_count":1226,"profile_text_color":"666666","following":true,"favourites_count":72,"time_zone":"Indiana (East)","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_sidebar_fill_color":"252429","friends_count":161,"screen_name":"jnunemaker","profile_sidebar_border_color":"181A1E","profile_background_tile":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Reading a couple hokey named books of late, but really enjoying them. \"I Will Teach You To Be Rich\" and \"Get Anyone To Do Anything\".","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1436286949,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 03:52:02 +0000 2009"},{"favorited":false,"user":{"profile_link_color":"2FC2EF","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_fill_color":"252429","followers_count":1226,"following":true,"time_zone":"Indiana (East)","profile_sidebar_border_color":"181A1E","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","notifications":false,"profile_background_tile":false,"friends_count":161,"protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","favourites_count":72,"profile_background_color":"1A1B1F","screen_name":"jnunemaker","statuses_count":4657,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Megan Joy turned into a train wreck tonight.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1435963959,"in_reply_to_user_id":null,"source":"txt<\/a>","created_at":"Thu Apr 02 02:51:01 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4656,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Watching latest House. Cool idea.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 01:25:46 +0000 2009","favorited":false,"id":1435502494,"source":"Tweetie<\/a>"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":179,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4650,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Sat on a fat bob today. Want! http:\/\/tr.im\/i7ha Love the flat black. Wish I could get a used one for less money, but they are too new.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Wed Apr 01 23:16:13 +0000 2009","favorited":false,"id":1434842036,"source":"web"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1226,"screen_name":"jnunemaker"},"in_reply_to_status_id":null,"text":"Just test drove an Escape with @nunieswife and visited the Harley Store. Johnny want a Harley...BAD!","in_reply_to_user_id":null,"favorited":false,"created_at":"Wed Apr 01 22:31:04 +0000 2009","in_reply_to_screen_name":null,"id":1434591491,"source":"web"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1222,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"text":"I hope the Bears go after Jay Cutler.","favorited":false,"created_at":"Wed Apr 01 12:35:28 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"id":1431011290,"in_reply_to_status_id":null,"source":"txt<\/a>"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1216,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"text":"Bundled up HTTParty's JSON and XML parsers (ganked from Merb and Rails) into a separate gem for all to enjoy. http:\/\/tr.im\/i4rc","favorited":false,"created_at":"Wed Apr 01 04:30:10 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"id":1429401587,"in_reply_to_status_id":null,"source":"web"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1215,"screen_name":"jnunemaker"},"in_reply_to_status_id":null,"text":"Opened an ING savings account tonight. First step towards automating more of my finances.","in_reply_to_user_id":null,"favorited":false,"created_at":"Wed Apr 01 01:13:13 +0000 2009","in_reply_to_screen_name":null,"id":1428332783,"source":"Lounge<\/a>"},{"in_reply_to_status_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"in_reply_to_user_id":null,"text":"Working from the ND bookstore.","created_at":"Tue Mar 31 19:19:44 +0000 2009","favorited":false,"in_reply_to_screen_name":null,"truncated":false,"id":1426346076,"source":"web"},{"in_reply_to_status_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","followers_count":1214,"location":"Mishawaka, Indiana","id":4243,"screen_name":"jnunemaker"},"text":"Wishes the slide screen on the iPhone had an api so he could put weather and ego app stats there.","in_reply_to_user_id":null,"favorited":false,"created_at":"Tue Mar 31 14:46:14 +0000 2009","in_reply_to_screen_name":null,"id":1424683964,"truncated":false,"source":"Tweetie<\/a>"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"favorited":false,"text":"En route to @ebrackley's. We're going to a fondue murder mystery tonight. Who killed the fondue!","created_at":"Sun Mar 29 17:44:43 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1413049459,"source":"Tweetie<\/a>"},{"favorited":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","followers_count":1214,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","screen_name":"jnunemaker","protected":false,"location":"Mishawaka, Indiana","id":4243},"in_reply_to_screen_name":null,"text":"Added a sexy bar graph of the RailsTips archives in the footer. http:\/\/tr.im\/hWt5","created_at":"Sun Mar 29 06:09:54 +0000 2009","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"id":1411056131,"source":"web"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"favorited":false,"text":"Corn!!!","created_at":"Sun Mar 29 03:34:49 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1410528666,"source":"txt<\/a>"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"favorited":false,"text":"Famous Dave's was so tasty tonight. Had fun with @nunieswife, @orderedlist, @carrie, @oaknd1, @lizsmc1 and @catbrad. Dang lots of tweeps.","created_at":"Sun Mar 29 00:26:09 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1409709416,"source":"Tweetie<\/a>"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"favorited":false,"text":"We told him he was making a big mistake and that he obviously didn't know who we are.","created_at":"Sat Mar 28 22:30:04 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1409188633,"source":"txt<\/a>"},{"in_reply_to_user_id":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","protected":false,"followers_count":1214,"screen_name":"jnunemaker","location":"Mishawaka, Indiana","id":4243},"favorited":false,"text":"Just brainstormed next addition to @harmonyapp with @orderedlist. It is going to be awesome.","created_at":"Sat Mar 28 21:15:34 +0000 2009","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1408861206,"source":"Tweetie<\/a>"}] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/rate_limit_exceeded.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/rate_limit_exceeded.json deleted file mode 100644 index 580df2a..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/rate_limit_exceeded.json +++ /dev/null @@ -1 +0,0 @@ -{"error": "Rate limit exceeded"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/replies.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/replies.json deleted file mode 100644 index 3b22657..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/replies.json +++ /dev/null @@ -1 +0,0 @@ -[{"favorited":false,"user":{"profile_link_color":"1DA9DE","description":"oAk is a designer who tweets, but not necessarily about design. I work at the University of Notre Dame.","utc_offset":-18000,"profile_sidebar_fill_color":"ebebeb","followers_count":208,"following":true,"time_zone":"Indiana (East)","profile_sidebar_border_color":"8f8f8f","url":"http:\/\/atimcalledoak.com","name":"-oAk-","notifications":false,"profile_background_tile":false,"friends_count":111,"protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/101535873\/avatarone_normal.png","favourites_count":214,"profile_background_color":"000000","screen_name":"oaknd1","statuses_count":3918,"profile_background_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_background_images\/3616500\/twitterblack.jpg","profile_text_color":"243d5b","location":"iPhone: 41.703415,-86.246094","id":3038211,"created_at":"Sat Mar 31 04:30:35 +0000 2007"},"text":"@jnunemaker cold out today. cold yesterday. even colder today.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1446039519,"in_reply_to_user_id":4243,"source":"twitterrific<\/a>","created_at":"Fri Apr 03 15:51:12 +0000 2009"},{"favorited":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","statuses_count":2412,"utc_offset":0,"profile_sidebar_fill_color":"f7f7f7","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","following":false,"profile_sidebar_border_color":"ff0007","time_zone":"Lisbon","friends_count":391,"url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","notifications":false,"profile_background_color":"f0f0f0","screen_name":"paulozoom","profile_background_tile":false,"profile_text_color":"000000","followers_count":350,"location":"Porto, Portugal","id":14452237,"favourites_count":8,"created_at":"Sun Apr 20 15:11:38 +0000 2008","profile_link_color":"ff0007"},"text":"@jnunemaker could you try to do HTTParty.get(\"http:\/\/digg.com\") ? I find myself waiting forever for the response. Posted a ticket on that.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1445973779,"in_reply_to_user_id":4243,"source":"EventBox<\/a>","created_at":"Fri Apr 03 15:40:20 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"just another ruby hacker","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_text_color":"663B12","followers_count":128,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/66571046\/john7_normal.jpg","following":false,"notifications":false,"profile_background_tile":false,"favourites_count":0,"profile_link_color":"1F98C7","url":"http:\/\/wiseheartdesign.com","screen_name":"johnwlong2000","name":"John W. Long","statuses_count":729,"profile_sidebar_fill_color":"DAECF4","protected":false,"created_at":"Fri Oct 26 02:45:58 +0000 2007","profile_sidebar_border_color":"C6E2EE","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme2\/bg.gif","friends_count":63,"location":"Cary, North Carolina","id":9700282,"profile_background_color":"C6E2EE"},"text":"@jnunemaker An unobtrusive Fancy Zoom image behavior for use with LowPro: http:\/\/gist.github.com\/89299","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 17:23:21 +0000 2009","favorited":false,"id":1439627059,"source":"twitterrific<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":390,"description":"Web guy in the making. Design, coding, usability. Typography addict.","utc_offset":0,"profile_sidebar_border_color":"ff0007","following":true,"time_zone":"Lisbon","profile_background_color":"f0f0f0","followers_count":350,"url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","notifications":false,"profile_background_tile":false,"favourites_count":7,"profile_text_color":"000000","screen_name":"paulozoom","statuses_count":2365,"profile_link_color":"ff0007","location":"Porto, Portugal","id":14452237,"created_at":"Sun Apr 20 15:11:38 +0000 2008","profile_sidebar_fill_color":"f7f7f7"},"text":"@jnunemaker Trying to dominate the world, heh?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1438613754,"id":1438634711,"in_reply_to_user_id":4243,"source":"EventBox<\/a>","created_at":"Thu Apr 02 14:37:38 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"me.awesomize()","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","notifications":true,"profile_background_tile":false,"friends_count":24,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51681870\/kebabdylan-32_normal.jpg","following":true,"favourites_count":0,"profile_background_color":"9ae4e8","url":null,"screen_name":"kebabdylan","name":"Jonathan","statuses_count":98,"protected":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","created_at":"Tue Mar 11 12:45:25 +0000 2008","profile_link_color":"0000ff","location":"","id":14122477,"profile_sidebar_fill_color":"e0ff92","followers_count":21},"text":"@jnunemaker la e today?","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 14:34:55 +0000 2009","favorited":false,"id":1438618345,"source":"twitterrific<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_background_images\/4652948\/willie_grovey_collage.jpg","friends_count":717,"description":"Raccoon Willie is the most celebrated animal on the web... he's bigger than Shrek!!!","utc_offset":-25200,"profile_background_color":"9AE4E8","following":true,"time_zone":"Mountain Time (US & Canada)","profile_text_color":"333333","followers_count":371,"url":"http:\/\/www.youtube.com\/damygeebo","name":"Raccoon Willie","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71327390\/wilcat_normal.jpg","notifications":false,"profile_background_tile":true,"favourites_count":0,"profile_link_color":"c81614","screen_name":"damygeebo","statuses_count":1401,"profile_sidebar_fill_color":"ebe3bc","location":"Midwest","id":19037300,"created_at":"Thu Jan 15 20:26:20 +0000 2009","profile_sidebar_border_color":"d0ba86"},"text":"@jnunemaker ...have you read \"Raccoon Willie: Dead Man\" yet?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1436286949,"id":1436292726,"in_reply_to_user_id":4243,"source":"web","created_at":"Thu Apr 02 03:53:16 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"notifications":false,"profile_background_tile":false,"friends_count":177,"description":"don't judge me by my crappy website","time_zone":"Pacific Time (US & Canada)","utc_offset":-28800,"favourites_count":18,"profile_background_color":"98AA5F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","url":"http:\/\/screenflicker.com\/mike\/","screen_name":"stickel","name":"Mike Stickel","statuses_count":6951,"protected":false,"profile_link_color":"0000ff","created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_fill_color":"FFF591","location":"San Francisco","id":15403,"profile_sidebar_border_color":"BCA944","followers_count":529},"text":"@jnunemaker Ouch. That sucks. I rode bitch know a sport bike but that was before I knew how to ride (that person taught me a bit).","truncated":false,"in_reply_to_status_id":1435431849,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 03:20:20 +0000 2009","favorited":false,"id":1436127953,"source":"Tweetie<\/a>"},{"in_reply_to_screen_name":"jnunemaker","user":{"notifications":false,"description":"Rails Machine CEO, DJ, Bird dog enthusiast","time_zone":"Eastern Time (US & Canada)","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","profile_background_tile":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56157945\/Photo_1_normal.jpg","following":true,"friends_count":104,"profile_background_color":"9ae4e8","url":"http:\/\/bradley.is","screen_name":"bradleyktaylor","name":"Bradley Taylor","protected":false,"favourites_count":0,"profile_text_color":"000000","created_at":"Thu Feb 21 18:50:49 +0000 2008","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_link_color":"0000ff","followers_count":142,"location":"Savannah, GA","id":13782402,"statuses_count":793,"profile_sidebar_fill_color":"e0ff92"},"text":"@jnunemaker thanks for the heads up. I'm mostly just using email as an api.","truncated":false,"in_reply_to_status_id":1435440065,"in_reply_to_user_id":4243,"created_at":"Thu Apr 02 01:18:18 +0000 2009","favorited":false,"id":1435461339,"source":"web"},{"favorited":false,"user":{"profile_sidebar_fill_color":"e0ff92","description":"http:\/\/iphoneonrails.com","utc_offset":-18000,"profile_sidebar_border_color":"87bc44","followers_count":287,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":32,"time_zone":"Eastern Time (US & Canada)","url":"http:\/\/yfactorial.com","name":"Ryan Daigle","favourites_count":1,"profile_background_color":"9ae4e8","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/45111492\/ryan_vector_normal.png","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","screen_name":"rwdaigle","statuses_count":529,"profile_link_color":"0000ff","location":"iPhone: 35.778992,-78.842484","id":658343,"created_at":"Thu Jan 18 02:46:57 +0000 2007"},"text":"@jnunemaker don't do it man. Step away from the bike.","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":1434842036,"id":1435366505,"in_reply_to_user_id":4243,"source":"twitterrific<\/a>","created_at":"Thu Apr 02 01:00:55 +0000 2009"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":177,"description":"don't judge me by my crappy website","utc_offset":-28800,"profile_background_color":"98AA5F","following":true,"time_zone":"Pacific Time (US & Canada)","profile_text_color":"000000","followers_count":527,"url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":18,"profile_link_color":"0000ff","screen_name":"stickel","statuses_count":6949,"profile_sidebar_fill_color":"FFF591","location":"San Francisco","id":15403,"created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_border_color":"BCA944"},"text":"@jnunemaker No? Why not? And which part wouldn't you wish on anyone?","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1435238296,"in_reply_to_user_id":4243,"source":"twitterrific<\/a>","created_at":"Thu Apr 02 00:36:48 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_fill_color":"FFF591","description":"don't judge me by my crappy website","utc_offset":-28800,"profile_sidebar_border_color":"BCA944","followers_count":527,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":177,"time_zone":"Pacific Time (US & Canada)","url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","favourites_count":18,"profile_background_color":"98AA5F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","profile_text_color":"000000","screen_name":"stickel","statuses_count":6944,"profile_link_color":"0000ff","location":"San Francisco","id":15403,"created_at":"Wed Nov 22 15:38:28 +0000 2006"},"text":"@jnunemaker And they'd all cheer and buy us drinks the entire time we are there. It will be AWESOME! @orderedlist can ride bitch. :)","in_reply_to_screen_name":"jnunemaker","truncated":false,"in_reply_to_status_id":null,"id":1435063394,"in_reply_to_user_id":4243,"source":"twitterrific<\/a>","created_at":"Wed Apr 01 23:58:39 +0000 2009"},{"in_reply_to_screen_name":"jnunemaker","user":{"description":"don't judge me by my crappy website","time_zone":"Pacific Time (US & Canada)","utc_offset":-28800,"profile_background_color":"98AA5F","followers_count":527,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","following":true,"notifications":false,"profile_background_tile":false,"favourites_count":18,"profile_text_color":"000000","url":"http:\/\/screenflicker.com\/mike\/","screen_name":"stickel","name":"Mike Stickel","statuses_count":6943,"profile_link_color":"0000ff","protected":false,"created_at":"Wed Nov 22 15:38:28 +0000 2006","profile_sidebar_fill_color":"FFF591","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme1\/bg.gif","friends_count":177,"profile_sidebar_border_color":"BCA944","location":"San Francisco","id":15403},"text":"@jnunemaker I dunno. The V-ROD Muscle is pretty hot. http:\/\/moourl.com\/p0q99","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":4243,"created_at":"Wed Apr 01 23:36:31 +0000 2009","favorited":false,"id":1434948902,"source":"twitterrific<\/a>"},{"truncated":false,"user":{"description":"don't judge me by my crappy website","url":"http:\/\/screenflicker.com\/mike\/","name":"Mike Stickel","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","location":"San Francisco","id":15403,"followers_count":527,"screen_name":"stickel"},"in_reply_to_status_id":null,"text":"@jnunemaker Johnny should get a Harley. :D Then ride it to Sturgis with me one of these years. :)","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 22:51:20 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1434706104,"source":"twitterrific<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Researcher - eLearning and machine consciousness, community and identity","url":"http:\/\/brains.parslow.net","name":"PatParslow","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53254225\/pat_normal.jpg","protected":false,"followers_count":292,"screen_name":"PatParslow","location":"Reading, UK","id":14512018},"text":"@jnunemaker http:\/\/twitter.rubyforge.org\/ down?","favorited":false,"created_at":"Wed Apr 01 20:22:38 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1433804708,"in_reply_to_status_id":null,"source":"TweetDeck<\/a>"},{"truncated":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","location":"Porto, Portugal","id":14452237,"followers_count":349,"screen_name":"paulozoom"},"in_reply_to_status_id":null,"text":"@jnunemaker found the problem, it was an unset variable. sry","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 13:15:06 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1431202286,"source":"EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","protected":false,"followers_count":349,"screen_name":"paulozoom","location":"Porto, Portugal","id":14452237},"text":"@jnunemaker tks a lot for your feedback. also, can u check what's going on with httparty? doesn't work at all. http:\/\/bit.ly\/RTR5","favorited":false,"created_at":"Wed Apr 01 13:04:46 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1431150482,"in_reply_to_status_id":1430926191,"source":"EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Web developer for the University of Notre Dame","url":"http:\/\/weedygarden.net","name":"Erik Runyon","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/43767822\/Photo_5_normal.jpg","protected":false,"followers_count":65,"screen_name":"erunyon","location":"Michiana","id":9241962},"text":"@jnunemaker I think the Lions are looking at him... which is funny since they already have 5 or so QB's","favorited":false,"created_at":"Wed Apr 01 12:39:20 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1431028594,"in_reply_to_status_id":1431011290,"source":"twitterrific<\/a>"},{"truncated":false,"user":{"description":"Web guy in the making. Design, coding, usability. Typography addict.","url":"http:\/\/paulozoom.com","name":"Paulo Pereira","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","location":"Porto, Portugal","id":14452237,"followers_count":348,"screen_name":"paulozoom"},"in_reply_to_status_id":null,"text":"@jnunemaker I've never tested any code, and I'm considering Rspec and Shoulda for both rails and non-rails code. Which one do you suggest?","in_reply_to_user_id":4243,"favorited":false,"created_at":"Wed Apr 01 10:49:02 +0000 2009","in_reply_to_screen_name":"jnunemaker","id":1430619438,"source":"EventBox<\/a>"},{"in_reply_to_user_id":4243,"user":{"description":"Twenty-something physician, entrepreneur, biker, on Rails, et cetera.","url":"http:\/\/y.freshpursuits.com\/","name":"Yasser Dahab","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/65001080\/feet_normal.png","protected":false,"followers_count":191,"screen_name":"yasserdahab","location":"Denver","id":728893},"text":"@jnunemaker you are my hero.","favorited":false,"created_at":"Wed Apr 01 05:34:36 +0000 2009","in_reply_to_screen_name":"jnunemaker","truncated":false,"id":1429670006,"in_reply_to_status_id":1429401587,"source":"Tweetie<\/a>"}] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search.json deleted file mode 100644 index e650ee4..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search.json +++ /dev/null @@ -1 +0,0 @@ -{"results":[{"text":"Someone asked about a tweet reader. Easy to do in ruby with @jnunemaker's twitter gem and the win32-sapi gem, if you are on windows.","to_user_id":null,"from_user":"PatParslow","id":1446425395,"from_user_id":297147,"iso_language_code":"en","source":"<a href="http:\/\/www.tweetdeck.com\/">TweetDeck<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/53254225\/pat_normal.jpg","created_at":"Fri, 03 Apr 2009 16:55:40 +0000"},{"text":"@jnunemaker cold out today. cold yesterday. even colder today.","to_user_id":19106,"to_user":"jnunemaker","from_user":"oaknd1","id":1446039519,"from_user_id":112472,"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\/101535873\/avatarone_normal.png","created_at":"Fri, 03 Apr 2009 15:51:12 +0000"},{"text":"@jnunemaker could you try to do HTTParty.get("http:\/\/digg.com") ? I find myself waiting forever for the response. Posted a ticket on that.","to_user_id":19106,"to_user":"jnunemaker","from_user":"paulozoom","id":1445973779,"from_user_id":258387,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","created_at":"Fri, 03 Apr 2009 15:40:20 +0000"},{"text":"Crack, @jnunemaker's new gem for XML and JSON parsing, is aptly named. One hit and I know it will be hard to quit.","to_user_id":null,"from_user":"jerry","id":1442399154,"from_user_id":78336,"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\/54424361\/jerry135x135_normal.jpg","created_at":"Fri, 03 Apr 2009 01:27:02 +0000"},{"text":"@jnunemaker An unobtrusive Fancy Zoom image behavior for use with LowPro: http:\/\/gist.github.com\/89299","to_user_id":19106,"to_user":"jnunemaker","from_user":"johnwlong2000","id":1439627059,"from_user_id":445276,"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\/66571046\/john7_normal.jpg","created_at":"Thu, 02 Apr 2009 17:23:21 +0000"},{"text":"@jnunemaker Trying to dominate the world, heh?","to_user_id":19106,"to_user":"jnunemaker","from_user":"paulozoom","id":1438634711,"from_user_id":258387,"iso_language_code":"en","source":"<a href="http:\/\/thecosmicmachine.com\/eventbox\/">EventBox<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/64142495\/zoom2_normal.png","created_at":"Thu, 02 Apr 2009 14:37:38 +0000"},{"text":"@jnunemaker la e today?","to_user_id":19106,"to_user":"jnunemaker","from_user":"kebabdylan","id":1438618345,"from_user_id":162717,"iso_language_code":"es","source":"<a href="http:\/\/iconfactory.com\/software\/twitterrific">twitterrific<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/51681870\/kebabdylan-32_normal.jpg","created_at":"Thu, 02 Apr 2009 14:34:55 +0000"},{"text":"@jnunemaker ...have you read "Raccoon Willie: Dead Man" yet?","to_user_id":19106,"to_user":"jnunemaker","from_user":"damygeebo","id":1436292726,"from_user_id":3653781,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/71327390\/wilcat_normal.jpg","created_at":"Thu, 02 Apr 2009 03:53:16 +0000"},{"text":"@jnunemaker Ouch. That sucks. I rode bitch know a sport bike but that was before I knew how to ride (that person taught me a bit).","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1436127953,"from_user_id":2132320,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Thu, 02 Apr 2009 03:20:20 +0000"},{"text":"@jnunemaker thanks for the heads up. I'm mostly just using email as an api.","to_user_id":19106,"to_user":"jnunemaker","from_user":"bradleyktaylor","id":1435461339,"from_user_id":49333,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/56157945\/Photo_1_normal.jpg","created_at":"Thu, 02 Apr 2009 01:18:18 +0000"},{"text":"@jnunemaker don't do it man. Step away from the bike.","to_user_id":19106,"to_user":"jnunemaker","from_user":"rwdaigle","id":1435366505,"from_user_id":153214,"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\/45111492\/ryan_vector_normal.png","created_at":"Thu, 02 Apr 2009 01:00:55 +0000"},{"text":"@jnunemaker No? Why not? And which part wouldn't you wish on anyone?","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1435238296,"from_user_id":2132320,"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\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Thu, 02 Apr 2009 00:36:48 +0000"},{"text":"@jnunemaker And they'd all cheer and buy us drinks the entire time we are there. It will be AWESOME! @orderedlist can ride bitch. :)","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1435063394,"from_user_id":2132320,"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\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 23:58:39 +0000"},{"text":"@jnunemaker I dunno. The V-ROD Muscle is pretty hot. http:\/\/moourl.com\/p0q99","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1434948902,"from_user_id":2132320,"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\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 23:36:31 +0000"},{"text":"@jnunemaker Johnny should get a Harley. :D Then ride it to Sturgis with me one of these years. :)","to_user_id":19106,"to_user":"jnunemaker","from_user":"stickel","id":1434706104,"from_user_id":2132320,"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\/14998572\/mike-sxsw07-56x56_normal.jpg","created_at":"Wed, 01 Apr 2009 22:51:20 +0000"}],"since_id":0,"max_id":1446791544,"refresh_url":"?since_id=1446791544&q=%40jnunemaker","results_per_page":15,"next_page":"?page=2&max_id=1446791544&q=%40jnunemaker","completed_in":0.023961,"page":1,"query":"%40jnunemaker"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search_from_jnunemaker.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search_from_jnunemaker.json deleted file mode 100644 index ac5590c..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/search_from_jnunemaker.json +++ /dev/null @@ -1 +0,0 @@ -{"results":[{"text":"Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...","to_user_id":null,"from_user":"jnunemaker","id":1445986256,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Fri, 03 Apr 2009 15:42:24 +0000"},{"text":"@jerry haha. @erunyon said he didn't think it was unique enough for google searches. :)","to_user_id":78336,"to_user":"jerry","from_user":"jnunemaker","id":1443087283,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Fri, 03 Apr 2009 03:34:26 +0000"},{"text":"Rob Dyrdek is the funniest man alive. That is all.","to_user_id":null,"from_user":"jnunemaker","id":1441588944,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 22:57:00 +0000"},{"text":"Dang, forgot about CAN http:\/\/calendaraboutnothing.com\/~jnunemaker yesterday and broke my streak of 5 days in a row.","to_user_id":null,"from_user":"jnunemaker","id":1438916463,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 15:24:17 +0000"},{"text":"@bryckbost yep. I haven't used dash much but it seems cool. Give it a try.","to_user_id":12964,"to_user":"bryckbost","from_user":"jnunemaker","id":1438754546,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:57:49 +0000"},{"text":"@nateklaiber dive into python is free online.","to_user_id":128782,"to_user":"nateklaiber","from_user":"jnunemaker","id":1438718326,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:51:47 +0000"},{"text":"@kebabsylan yes. I'll be there at noon.","to_user_id":9689026,"to_user":"kebabsylan","from_user":"jnunemaker","id":1438637063,"from_user_id":19106,"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\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:38:03 +0000"},{"text":"http:\/\/twitpic.com\/2pwjy - The books I'm reading right now. Wish I had more time.","to_user_id":null,"from_user":"jnunemaker","id":1438613754,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitpic.com\/">TwitPic<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 14:34:10 +0000"},{"text":"Reading a couple hokey named books of late, but really enjoying them. "I Will Teach You To Be Rich" and "Get Anyone To Do Anything".","to_user_id":null,"from_user":"jnunemaker","id":1436286949,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/twitter.com\/">web<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 03:52:02 +0000"},{"text":"Megan Joy turned into a train wreck tonight.","to_user_id":null,"from_user":"jnunemaker","id":1435963959,"from_user_id":19106,"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\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 02:51:01 +0000"},{"text":"Watching latest House. Cool idea.","to_user_id":null,"from_user":"jnunemaker","id":1435502494,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:25:46 +0000"},{"text":"@rwdaigle not a motorcycle man?","to_user_id":153214,"to_user":"rwdaigle","from_user":"jnunemaker","id":1435443029,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:14:52 +0000"},{"text":"@bradleyktaylor I did some ruby wufoo a few months back. It's on github.","to_user_id":49333,"to_user":"bradleyktaylor","from_user":"jnunemaker","id":1435440065,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:14:19 +0000"},{"text":"@stickel riding bitch on motorcycle. Bike died once on trip and had to ride on back of my dad's.","to_user_id":2132320,"to_user":"stickel","from_user":"jnunemaker","id":1435431849,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 01:12:46 +0000"},{"text":"@stickel haha. Having done that twice I wouldn't wish it on anyone. :)","to_user_id":2132320,"to_user":"stickel","from_user":"jnunemaker","id":1435217155,"from_user_id":19106,"iso_language_code":"en","source":"<a href="http:\/\/www.atebits.com\/software\/tweetie\/">Tweetie<\/a>","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","created_at":"Thu, 02 Apr 2009 00:31:52 +0000"}],"since_id":0,"max_id":1446791544,"refresh_url":"?since_id=1446791544&q=from%3Ajnunemaker","results_per_page":15,"next_page":"?page=2&max_id=1446791544&q=from%3Ajnunemaker","completed_in":0.024906,"page":1,"query":"from%3Ajnunemaker"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status.json deleted file mode 100644 index 06084d9..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status.json +++ /dev/null @@ -1 +0,0 @@ -{"in_reply_to_screen_name":null,"user":{"profile_sidebar_border_color":"181A1E","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","profile_background_tile":false,"profile_text_color":"666666","followers_count":1231,"protected":false,"favourites_count":73,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","statuses_count":4664,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif"},"text":"Rob Dyrdek is the funniest man alive. That is all.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 22:57:00 +0000 2009","favorited":false,"id":1441588944,"source":"Tweetie<\/a>"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status_show.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status_show.json deleted file mode 100644 index ddf9137..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/status_show.json +++ /dev/null @@ -1 +0,0 @@ -{"in_reply_to_screen_name":null,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_sidebar_border_color":"181A1E","following":false,"favourites_count":80,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","statuses_count":4771,"protected":false,"profile_background_tile":false,"profile_text_color":"666666","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","screen_name":"jnunemaker","id":4243,"profile_sidebar_fill_color":"252429","followers_count":1252},"text":"Eating some oatmeal and butterscotch cookies with a cold glass of milk for breakfast. Tasty!","truncated":false,"in_reply_to_status_id":null,"created_at":"Thu Apr 16 14:12:36 +0000 2009","in_reply_to_user_id":null,"id":1533815199,"favorited":false,"source":"Twitter App<\/a>"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user.json deleted file mode 100644 index 397c3cc..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user.json +++ /dev/null @@ -1 +0,0 @@ -{"profile_background_tile":false,"friends_count":159,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"notifications":null,"favourites_count":79,"profile_background_color":"1A1B1F","following":null,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","statuses_count":4752,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","time_zone":"Indiana (East)","protected":false,"screen_name":"jnunemaker","status":{"in_reply_to_status_id":null,"in_reply_to_user_id":null,"text":"224! http:\/\/flightcontrolled.com\/ Holy crap. There are some really high flight control scorers out there. *gives up* :D","favorited":false,"in_reply_to_screen_name":null,"created_at":"Tue Apr 14 20:38:49 +0000 2009","truncated":false,"id":1519558635,"source":"Twitter App<\/a>"},"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","followers_count":1248,"location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E"} \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user_timeline.json b/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user_timeline.json deleted file mode 100644 index 1e95109..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/fixtures/user_timeline.json +++ /dev/null @@ -1 +0,0 @@ -[{"in_reply_to_screen_name":null,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","notifications":false,"profile_background_tile":false,"friends_count":160,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"favourites_count":74,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4666,"protected":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_fill_color":"252429","followers_count":1234},"text":"Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Fri Apr 03 15:42:24 +0000 2009","favorited":false,"id":1445986256,"source":"Tweetie<\/a>"},{"in_reply_to_screen_name":"jerry","user":{"notifications":false,"profile_background_tile":false,"friends_count":160,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":73,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4665,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1231},"text":"@jerry haha. @erunyon said he didn't think it was unique enough for google searches. :)","truncated":false,"in_reply_to_status_id":1442399154,"in_reply_to_user_id":613,"created_at":"Fri Apr 03 03:34:26 +0000 2009","favorited":false,"id":1443087283,"source":"web"},{"in_reply_to_screen_name":null,"user":{"profile_sidebar_border_color":"181A1E","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"friends_count":161,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":false,"profile_background_color":"1A1B1F","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","profile_background_tile":false,"profile_text_color":"666666","followers_count":1231,"protected":false,"favourites_count":73,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_link_color":"2FC2EF","statuses_count":4664,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif"},"text":"Rob Dyrdek is the funniest man alive. That is all.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 22:57:00 +0000 2009","favorited":false,"id":1441588944,"source":"Tweetie<\/a>"},{"favorited":false,"user":{"profile_sidebar_fill_color":"252429","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","followers_count":1228,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":161,"time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":73,"profile_background_color":"1A1B1F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4663,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Dang, forgot about CAN http:\/\/calendaraboutnothing.com\/~jnunemaker yesterday and broke my streak of 5 days in a row.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1438916463,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 15:24:17 +0000 2009"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_background_color":"1A1B1F","following":true,"time_zone":"Indiana (East)","profile_text_color":"666666","followers_count":1228,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":73,"profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4662,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E"},"text":"@bryckbost yep. I haven't used dash much but it seems cool. Give it a try.","in_reply_to_screen_name":"bryckbost","truncated":false,"in_reply_to_status_id":1438082787,"id":1438754546,"in_reply_to_user_id":8494682,"source":"Tweetie<\/a>","created_at":"Thu Apr 02 14:57:49 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_fill_color":"252429","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","followers_count":1228,"following":true,"notifications":false,"profile_background_tile":false,"friends_count":161,"time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":73,"profile_background_color":"1A1B1F","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4661,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"@nateklaiber dive into python is free online.","in_reply_to_screen_name":"nateklaiber","truncated":false,"in_reply_to_status_id":1438415604,"id":1438718326,"in_reply_to_user_id":13722,"source":"Tweetie<\/a>","created_at":"Thu Apr 02 14:51:47 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"friends_count":161,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_text_color":"666666","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","protected":false,"statuses_count":4660,"profile_sidebar_fill_color":"252429","notifications":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E","followers_count":1228,"profile_background_tile":false,"location":"Mishawaka, Indiana","id":4243},"text":"@kebabsylan yes. I'll be there at noon.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:38:03 +0000 2009","favorited":false,"id":1438637063,"source":"txt<\/a>"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4659,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1228},"text":"http:\/\/twitpic.com\/2pwjy - The books I'm reading right now. Wish I had more time.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 14:34:10 +0000 2009","favorited":false,"id":1438613754,"source":"TwitPic<\/a>"},{"favorited":false,"user":{"statuses_count":4658,"profile_background_color":"1A1B1F","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"followers_count":1226,"profile_text_color":"666666","following":true,"favourites_count":72,"time_zone":"Indiana (East)","profile_link_color":"2FC2EF","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_sidebar_fill_color":"252429","friends_count":161,"screen_name":"jnunemaker","profile_sidebar_border_color":"181A1E","profile_background_tile":false,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Reading a couple hokey named books of late, but really enjoying them. \"I Will Teach You To Be Rich\" and \"Get Anyone To Do Anything\".","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1436286949,"in_reply_to_user_id":null,"source":"web","created_at":"Thu Apr 02 03:52:02 +0000 2009"},{"favorited":false,"user":{"profile_link_color":"2FC2EF","description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_fill_color":"252429","followers_count":1226,"following":true,"time_zone":"Indiana (East)","profile_sidebar_border_color":"181A1E","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","notifications":false,"profile_background_tile":false,"friends_count":161,"protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","favourites_count":72,"profile_background_color":"1A1B1F","screen_name":"jnunemaker","statuses_count":4657,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"Megan Joy turned into a train wreck tonight.","in_reply_to_screen_name":null,"truncated":false,"in_reply_to_status_id":null,"id":1435963959,"in_reply_to_user_id":null,"source":"txt<\/a>","created_at":"Thu Apr 02 02:51:01 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4656,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Watching latest House. Cool idea.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Thu Apr 02 01:25:46 +0000 2009","favorited":false,"id":1435502494,"source":"Tweetie<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","following":true,"time_zone":"Indiana (East)","profile_background_color":"1A1B1F","followers_count":1226,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4655,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429"},"text":"@rwdaigle not a motorcycle man?","in_reply_to_screen_name":"rwdaigle","truncated":false,"in_reply_to_status_id":1435366505,"id":1435443029,"in_reply_to_user_id":658343,"source":"Tweetie<\/a>","created_at":"Thu Apr 02 01:14:52 +0000 2009"},{"favorited":false,"user":{"profile_sidebar_border_color":"181A1E","followers_count":1226,"description":"Loves his wife, ruby, notre dame football and iu basketball","profile_background_tile":false,"utc_offset":-18000,"following":true,"friends_count":161,"profile_background_color":"1A1B1F","time_zone":"Indiana (East)","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","favourites_count":72,"profile_text_color":"666666","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4654,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"notifications":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006"},"text":"@bradleyktaylor I did some ruby wufoo a few months back. It's on github.","in_reply_to_screen_name":"bradleyktaylor","truncated":false,"in_reply_to_status_id":1435320189,"id":1435440065,"in_reply_to_user_id":13782402,"source":"Tweetie<\/a>","created_at":"Thu Apr 02 01:14:19 +0000 2009"},{"in_reply_to_screen_name":"stickel","user":{"notifications":true,"profile_background_tile":false,"friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4653,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"@stickel riding bitch on motorcycle. Bike died once on trip and had to ride on back of my dad's.","truncated":false,"in_reply_to_status_id":1435238296,"in_reply_to_user_id":15403,"created_at":"Thu Apr 02 01:12:46 +0000 2009","favorited":false,"id":1435431849,"source":"Tweetie<\/a>"},{"in_reply_to_screen_name":"stickel","user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"profile_background_color":"1A1B1F","followers_count":1226,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"notifications":true,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4652,"profile_link_color":"2FC2EF","protected":false,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"profile_sidebar_border_color":"181A1E","location":"Mishawaka, Indiana","id":4243},"text":"@stickel haha. Having done that twice I wouldn't wish it on anyone. :)","truncated":false,"in_reply_to_status_id":1435063394,"in_reply_to_user_id":15403,"created_at":"Thu Apr 02 00:31:52 +0000 2009","favorited":false,"id":1435217155,"source":"Tweetie<\/a>"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":161,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_sidebar_border_color":"181A1E","following":true,"time_zone":"Indiana (East)","profile_background_color":"1A1B1F","followers_count":1225,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_text_color":"666666","screen_name":"jnunemaker","statuses_count":4651,"profile_link_color":"2FC2EF","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429"},"text":"@stickel Dude. We would roll in and be like \"LISTEN UP! WE ARE WEB DEVELOPERS!\" Heads would turn.","in_reply_to_screen_name":"stickel","truncated":false,"in_reply_to_status_id":1434706104,"id":1434998057,"in_reply_to_user_id":15403,"source":"web","created_at":"Wed Apr 01 23:46:00 +0000 2009"},{"in_reply_to_screen_name":null,"user":{"notifications":false,"profile_background_tile":false,"friends_count":179,"description":"Loves his wife, ruby, notre dame football and iu basketball","time_zone":"Indiana (East)","utc_offset":-18000,"favourites_count":72,"profile_background_color":"1A1B1F","profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","following":true,"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","profile_text_color":"666666","url":"http:\/\/railstips.org\/about","screen_name":"jnunemaker","name":"John Nunemaker","statuses_count":4650,"protected":false,"profile_link_color":"2FC2EF","created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"profile_sidebar_border_color":"181A1E","followers_count":1226},"text":"Sat on a fat bob today. Want! http:\/\/tr.im\/i7ha Love the flat black. Wish I could get a used one for less money, but they are too new.","truncated":false,"in_reply_to_status_id":null,"in_reply_to_user_id":null,"created_at":"Wed Apr 01 23:16:13 +0000 2009","favorited":false,"id":1434842036,"source":"web"},{"favorited":false,"user":{"profile_background_image_url":"http:\/\/static.twitter.com\/images\/themes\/theme9\/bg.gif","friends_count":179,"description":"Loves his wife, ruby, notre dame football and iu basketball","utc_offset":-18000,"profile_background_color":"1A1B1F","following":true,"time_zone":"Indiana (East)","profile_text_color":"666666","followers_count":1226,"url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","notifications":false,"profile_background_tile":false,"favourites_count":72,"profile_link_color":"2FC2EF","screen_name":"jnunemaker","statuses_count":4649,"profile_sidebar_fill_color":"252429","location":"Mishawaka, Indiana","id":4243,"created_at":"Sun Aug 13 22:56:06 +0000 2006","profile_sidebar_border_color":"181A1E"},"text":"@Carrie I agree with @orderedlist. Taco Bell is better than Hacienda.","in_reply_to_screen_name":"Carrie","truncated":false,"in_reply_to_status_id":1434732331,"id":1434741725,"in_reply_to_user_id":15323,"source":"Lounge<\/a>","created_at":"Wed Apr 01 22:57:45 +0000 2009"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1226,"screen_name":"jnunemaker"},"in_reply_to_status_id":null,"text":"Just test drove an Escape with @nunieswife and visited the Harley Store. Johnny want a Harley...BAD!","in_reply_to_user_id":null,"favorited":false,"created_at":"Wed Apr 01 22:31:04 +0000 2009","in_reply_to_screen_name":null,"id":1434591491,"source":"web"},{"truncated":false,"user":{"description":"Loves his wife, ruby, notre dame football and iu basketball","url":"http:\/\/railstips.org\/about","name":"John Nunemaker","protected":false,"profile_image_url":"http:\/\/s3.amazonaws.com\/twitter_production\/profile_images\/61024905\/black250_normal.jpg","location":"Mishawaka, Indiana","id":4243,"followers_count":1222,"screen_name":"jnunemaker"},"in_reply_to_status_id":1431726310,"text":"@acornoAk Consider yourself unfollowed for that prank.","in_reply_to_user_id":18173702,"favorited":false,"created_at":"Wed Apr 01 14:52:45 +0000 2009","in_reply_to_screen_name":"acornoAk","id":1431763938,"source":"web"}] \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/test_helper.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/test_helper.rb deleted file mode 100644 index ab0a5f6..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/test_helper.rb +++ /dev/null @@ -1,36 +0,0 @@ -require 'rubygems' -require 'test/unit' -require 'shoulda' -require 'matchy' -require 'mocha' -require 'fakeweb' - -FakeWeb.allow_net_connect = false - -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) -require 'twitter' - -class Test::Unit::TestCase -end - -def fixture_file(filename) - return '' if filename == '' - file_path = File.expand_path(File.dirname(__FILE__) + '/fixtures/' + filename) - File.read(file_path) -end - -def twitter_url(url) - url =~ /^http/ ? url : "http://twitter.com:80#{url}" -end - -def stub_get(url, filename, status=nil) - options = {:string => fixture_file(filename)} - options.merge!({:status => status}) unless status.nil? - - FakeWeb.register_uri(:get, twitter_url(url), options) -end - -def stub_post(url, filename) - FakeWeb.register_uri(:post, twitter_url(url), :string => fixture_file(filename)) -end diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/base_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/base_test.rb deleted file mode 100644 index 6a4c8df..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/base_test.rb +++ /dev/null @@ -1,95 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class BaseTest < Test::Unit::TestCase - context "base" do - setup do - oauth = Twitter::OAuth.new('token', 'secret') - @access_token = OAuth::AccessToken.new(oauth.consumer, 'atoken', 'asecret') - oauth.stubs(:access_token).returns(@access_token) - @twitter = Twitter::Base.new(oauth) - end - - context "initialize" do - should "require a client" do - @twitter.client.should respond_to(:get) - @twitter.client.should respond_to(:post) - end - end - - should "delegate get to the client" do - @access_token.expects(:get).with('/foo').returns(nil) - @twitter.get('/foo') - end - - should "delegate post to the client" do - @access_token.expects(:post).with('/foo', {:bar => 'baz'}).returns(nil) - @twitter.post('/foo', {:bar => 'baz'}) - end - - context "hitting the api" do - should "be able to get friends timeline" do - stub_get('/statuses/friends_timeline.json', 'friends_timeline.json') - timeline = @twitter.friends_timeline - timeline.size.should == 20 - first = timeline.first - first.source.should == 'Tweetie' - first.user.name.should == 'John Nunemaker' - first.user.url.should == 'http://railstips.org/about' - first.id.should == 1441588944 - first.favorited.should be(false) - end - - should "be able to get user timeline" do - stub_get('/statuses/user_timeline.json', 'user_timeline.json') - timeline = @twitter.user_timeline - timeline.size.should == 20 - first = timeline.first - first.text.should == 'Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...' - first.user.name.should == 'John Nunemaker' - end - - should "be able to get a status" do - stub_get('/statuses/show/1441588944.json', 'status.json') - status = @twitter.status(1441588944) - status.user.name.should == 'John Nunemaker' - status.id.should == 1441588944 - end - - should "be able to update status" do - stub_post('/statuses/update.json', 'status.json') - status = @twitter.update('Rob Dyrdek is the funniest man alive. That is all.') - status.user.name.should == 'John Nunemaker' - status.text.should == 'Rob Dyrdek is the funniest man alive. That is all.' - end - - should "be able to get replies" do - stub_get('/statuses/replies.json', 'replies.json') - replies = @twitter.replies - replies.size.should == 19 - first = replies.first - first.user.name.should == '-oAk-' - first.text.should == '@jnunemaker cold out today. cold yesterday. even colder today.' - end - - should "be able to get follower ids" do - stub_get('/followers/ids.json', 'follower_ids.json') - follower_ids = @twitter.follower_ids - follower_ids.size.should == 1252 - follower_ids.first.should == 613 - end - - should "be able to get friend ids" do - stub_get('/friends/ids.json', 'friend_ids.json') - friend_ids = @twitter.friend_ids - friend_ids.size.should == 161 - friend_ids.first.should == 15323 - end - - should "correctly hash statuses" do - stub_get('/statuses/friends_timeline.json', 'friends_timeline.json') - hashes = @twitter.friends_timeline.map{ |s| s.hash } - hashes.should == @twitter.friends_timeline.map{ |s| s.hash } - end - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/httpauth_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/httpauth_test.rb deleted file mode 100644 index 8ce1416..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/httpauth_test.rb +++ /dev/null @@ -1,76 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class HTTPAuthTest < Test::Unit::TestCase - context "Creating new instance" do - should "should take user and password" do - twitter = Twitter::HTTPAuth.new('username', 'password') - twitter.username.should == 'username' - twitter.password.should == 'password' - end - - should "accept options" do - twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => true) - twitter.options.should == {:ssl => true} - end - - should "default ssl to false" do - twitter = Twitter::HTTPAuth.new('username', 'password') - twitter.options[:ssl].should be(false) - end - - should "use https if ssl is true" do - Twitter::HTTPAuth.expects(:base_uri).with('https://twitter.com') - twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => true) - end - - should "use http if ssl is false" do - Twitter::HTTPAuth.expects(:base_uri).with('http://twitter.com') - twitter = Twitter::HTTPAuth.new('username', 'password', :ssl => false) - end - end - - context "Client methods" do - setup do - @twitter = Twitter::HTTPAuth.new('username', 'password') - end - - should "not throw error when accessing response message" do - stub_get('http://twitter.com:80/statuses/user_timeline.json', 'user_timeline.json') - response = @twitter.get('/statuses/user_timeline.json') - response.message.should == 'OK' - end - - should "be able to get" do - stub_get('http://twitter.com:80/statuses/user_timeline.json', 'user_timeline.json') - response = @twitter.get('/statuses/user_timeline.json') - response.should == fixture_file('user_timeline.json') - end - - should "be able to get with headers" do - @twitter.class.expects(:get).with( - '/statuses/user_timeline.json', { - :basic_auth => {:username => 'username', :password => 'password'}, - :headers => {'Foo' => 'Bar'} - } - ).returns(fixture_file('user_timeline.json')) - @twitter.get('/statuses/user_timeline.json', {'Foo' => 'Bar'}) - end - - should "be able to post" do - stub_post('http://twitter.com:80/statuses/update.json', 'status.json') - response = @twitter.post('/statuses/update.json', :text => 'My update.') - response.should == fixture_file('status.json') - end - - should "be able to post with headers" do - @twitter.class.expects(:post).with( - '/statuses/update.json', { - :headers => {'Foo' => 'Bar'}, - :body => {:text => 'My update.'}, - :basic_auth => {:username => 'username', :password => 'password'} - } - ).returns(fixture_file('status.json')) - @twitter.post('/statuses/update.json', {:text => 'My update.'}, {'Foo' => 'Bar'}) - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/oauth_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/oauth_test.rb deleted file mode 100644 index 5967cb0..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/oauth_test.rb +++ /dev/null @@ -1,71 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class OAuthTest < Test::Unit::TestCase - should "initialize with consumer token and secret" do - twitter = Twitter::OAuth.new('token', 'secret') - - twitter.ctoken.should == 'token' - twitter.csecret.should == 'secret' - end - - should "have a consumer" do - consumer = mock('oauth consumer') - OAuth::Consumer.expects(:new).with('token', 'secret', {:site => 'http://twitter.com'}).returns(consumer) - twitter = Twitter::OAuth.new('token', 'secret') - - twitter.consumer.should == consumer - end - - should "have a request token from the consumer" do - consumer = mock('oauth consumer') - request_token = mock('request token') - consumer.expects(:get_request_token).returns(request_token) - OAuth::Consumer.expects(:new).with('token', 'secret', {:site => 'http://twitter.com'}).returns(consumer) - twitter = Twitter::OAuth.new('token', 'secret') - - twitter.request_token.should == request_token - end - - should "be able to create access token from request token and secret" do - twitter = Twitter::OAuth.new('token', 'secret') - consumer = OAuth::Consumer.new('token', 'secret', {:site => 'http://twitter.com'}) - twitter.stubs(:consumer).returns(consumer) - - access_token = mock('access token', :token => 'atoken', :secret => 'asecret') - request_token = mock('request token') - request_token.expects(:get_access_token).returns(access_token) - OAuth::RequestToken.expects(:new).with(consumer, 'rtoken', 'rsecret').returns(request_token) - - twitter.authorize_from_request('rtoken', 'rsecret') - twitter.access_token.class.should be(OAuth::AccessToken) - twitter.access_token.token.should == 'atoken' - twitter.access_token.secret.should == 'asecret' - end - - should "be able to create access token from access token and secret" do - twitter = Twitter::OAuth.new('token', 'secret') - consumer = OAuth::Consumer.new('token', 'secret', {:site => 'http://twitter.com'}) - twitter.stubs(:consumer).returns(consumer) - - twitter.authorize_from_access('atoken', 'asecret') - twitter.access_token.class.should be(OAuth::AccessToken) - twitter.access_token.token.should == 'atoken' - twitter.access_token.secret.should == 'asecret' - end - - should "delegate get to access token" do - access_token = mock('access token') - twitter = Twitter::OAuth.new('token', 'secret') - twitter.stubs(:access_token).returns(access_token) - access_token.expects(:get).returns(nil) - twitter.get('/foo') - end - - should "delegate post to access token" do - access_token = mock('access token') - twitter = Twitter::OAuth.new('token', 'secret') - twitter.stubs(:access_token).returns(access_token) - access_token.expects(:post).returns(nil) - twitter.post('/foo') - end -end diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/request_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/request_test.rb deleted file mode 100644 index 2f4083c..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/request_test.rb +++ /dev/null @@ -1,217 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class RequestTest < Test::Unit::TestCase - context "new get request" do - setup do - @client = mock('twitter client') - @request = Twitter::Request.new(@client, :get, '/statuses/user_timeline.json', {:query => {:since_id => 1234}}) - end - - should "have client" do - @request.client.should == @client - end - - should "have method" do - @request.method.should == :get - end - - should "have path" do - @request.path.should == '/statuses/user_timeline.json' - end - - should "have options" do - @request.options[:query].should == {:since_id => 1234} - end - - should "have uri" do - @request.uri.should == '/statuses/user_timeline.json?since_id=1234' - end - - context "performing request for collection" do - setup do - response = mock('response') do - stubs(:body).returns(fixture_file('user_timeline.json')) - stubs(:code).returns('200') - end - - @client.expects(:get).returns(response) - @object = @request.perform - end - - should "return array of mashes" do - @object.size.should == 20 - @object.each { |obj| obj.class.should be(Mash) } - @object.first.text.should == 'Colder out today than expected. Headed to the Beanery for some morning wakeup drink. Latte or coffee...hmmm...' - end - end - - context "performing a request for a single object" do - setup do - response = mock('response') do - stubs(:body).returns(fixture_file('status.json')) - stubs(:code).returns('200') - end - - @client.expects(:get).returns(response) - @object = @request.perform - end - - should "return a single mash" do - @object.class.should be(Mash) - @object.text.should == 'Rob Dyrdek is the funniest man alive. That is all.' - end - end - - context "with no query string" do - should "not have any query string" do - request = Twitter::Request.new(@client, :get, '/statuses/user_timeline.json') - request.uri.should == '/statuses/user_timeline.json' - end - end - - context "with blank query string" do - should "not have any query string" do - request = Twitter::Request.new(@client, :get, '/statuses/user_timeline.json', :query => {}) - request.uri.should == '/statuses/user_timeline.json' - end - end - - should "have get shortcut to initialize and perform all in one" do - Twitter::Request.any_instance.expects(:perform).returns(nil) - Twitter::Request.get(@client, '/foo') - end - - should "allow setting query string and headers" do - response = mock('response') do - stubs(:body).returns('') - stubs(:code).returns('200') - end - - @client.expects(:get).with('/statuses/friends_timeline.json?since_id=1234', {'Foo' => 'Bar'}).returns(response) - Twitter::Request.get(@client, '/statuses/friends_timeline.json?since_id=1234', :headers => {'Foo' => 'Bar'}) - end - end - - context "new post request" do - setup do - @client = mock('twitter client') - @request = Twitter::Request.new(@client, :post, '/statuses/update.json', {:body => {:status => 'Woohoo!'}}) - end - - should "allow setting body and headers" do - response = mock('response') do - stubs(:body).returns('') - stubs(:code).returns('200') - end - - @client.expects(:post).with('/statuses/update.json', {:status => 'Woohoo!'}, {'Foo' => 'Bar'}).returns(response) - Twitter::Request.post(@client, '/statuses/update.json', :body => {:status => 'Woohoo!'}, :headers => {'Foo' => 'Bar'}) - end - - context "performing request" do - setup do - response = mock('response') do - stubs(:body).returns(fixture_file('status.json')) - stubs(:code).returns('200') - end - - @client.expects(:post).returns(response) - @object = @request.perform - end - - should "return a mash of the object" do - @object.text.should == 'Rob Dyrdek is the funniest man alive. That is all.' - end - end - - should "have post shortcut to initialize and perform all in one" do - Twitter::Request.any_instance.expects(:perform).returns(nil) - Twitter::Request.post(@client, '/foo') - end - end - - context "error raising" do - setup do - oauth = Twitter::OAuth.new('token', 'secret') - oauth.authorize_from_access('atoken', 'asecret') - @client = Twitter::Base.new(oauth) - end - - should "not raise error for 200" do - stub_get('http://twitter.com:80/foo', '', ['200']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should_not raise_error - end - - should "not raise error for 304" do - stub_get('http://twitter.com:80/foo', '', ['304']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should_not raise_error - end - - should "raise RateLimitExceeded for 400" do - stub_get('http://twitter.com:80/foo', 'rate_limit_exceeded.json', ['400']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::RateLimitExceeded) - end - - should "raise Unauthorized for 401" do - stub_get('http://twitter.com:80/foo', '', ['401']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::Unauthorized) - end - - should "raise General for 403" do - stub_get('http://twitter.com:80/foo', '', ['403']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::General) - end - - should "raise NotFound for 404" do - stub_get('http://twitter.com:80/foo', '', ['404']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::NotFound) - end - - should "raise InformTwitter for 500" do - stub_get('http://twitter.com:80/foo', '', ['500']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::InformTwitter) - end - - should "raise Unavailable for 502" do - stub_get('http://twitter.com:80/foo', '', ['502']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::Unavailable) - end - - should "raise Unavailable for 503" do - stub_get('http://twitter.com:80/foo', '', ['503']) - lambda { - Twitter::Request.get(@client, '/foo') - }.should raise_error(Twitter::Unavailable) - end - end - - context "Making request with mash option set to false" do - setup do - oauth = Twitter::OAuth.new('token', 'secret') - oauth.authorize_from_access('atoken', 'asecret') - @client = Twitter::Base.new(oauth) - end - - should "not attempt to create mash of return object" do - stub_get('http://twitter.com:80/foo', 'friend_ids.json') - object = Twitter::Request.get(@client, '/foo', :mash => false) - object.class.should_not be(Mash) - end - end -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/search_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/search_test.rb deleted file mode 100644 index ab35551..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter/search_test.rb +++ /dev/null @@ -1,144 +0,0 @@ -require File.dirname(__FILE__) + '/../test_helper' - -class SearchTest < Test::Unit::TestCase - context "searching" do - setup do - @search = Twitter::Search.new - end - - should "should be able to initialize with a search term" do - Twitter::Search.new('httparty').query[:q].should include('httparty') - end - - should "should be able to specify from" do - @search.from('jnunemaker').query[:q].should include('from:jnunemaker') - end - - should "should be able to specify to" do - @search.to('jnunemaker').query[:q].should include('to:jnunemaker') - end - - should "should be able to specify referencing" do - @search.referencing('jnunemaker').query[:q].should include('@jnunemaker') - end - - should "should alias references to referencing" do - @search.references('jnunemaker').query[:q].should include('@jnunemaker') - end - - should "should alias ref to referencing" do - @search.ref('jnunemaker').query[:q].should include('@jnunemaker') - end - - should "should be able to specify containing" do - @search.containing('milk').query[:q].should include('milk') - end - - should "should alias contains to containing" do - @search.contains('milk').query[:q].should include('milk') - end - - should "should be able to specify hashed" do - @search.hashed('twitter').query[:q].should include('#twitter') - end - - should "should be able to specify the language" do - @search.lang('en') - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:lang => 'en', :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to specify the number of results per page" do - @search.per_page(25) - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:rpp => 25, :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to specify the page number" do - @search.page(20) - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:page => 20, :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to specify only returning results greater than an id" do - @search.since(1234) - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:since_id => 1234, :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to specify geo coordinates" do - @search.geocode('40.757929', '-73.985506', '25mi') - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:geocode => '40.757929,-73.985506,25mi', :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to specify max id" do - @search.max(1234) - @search.class.expects(:get).with('http://search.twitter.com/search.json', :query => {:max_id => 1234, :q => ''}, :format => :json).returns({'foo' => 'bar'}) - @search.fetch() - end - - should "should be able to clear the filters set" do - @search.from('jnunemaker').to('oaknd1') - @search.clear.query.should == {:q => []} - end - - should "should be able to chain methods together" do - @search.from('jnunemaker').to('oaknd1').referencing('orderedlist').containing('milk').hashed('twitter').lang('en').per_page(20).since(1234).geocode('40.757929', '-73.985506', '25mi') - @search.query[:q].should == ['from:jnunemaker', 'to:oaknd1', '@orderedlist', 'milk', '#twitter'] - @search.query[:lang].should == 'en' - @search.query[:rpp].should == 20 - @search.query[:since_id].should == 1234 - @search.query[:geocode].should == '40.757929,-73.985506,25mi' - end - - context "fetching" do - setup do - stub_get('http://search.twitter.com:80/search.json?q=%40jnunemaker', 'search.json') - @search = Twitter::Search.new('@jnunemaker') - @response = @search.fetch - end - - should "should return results" do - @response.results.size.should == 15 - end - - should "should support dot notation" do - first = @response.results.first - first.text.should == %q(Someone asked about a tweet reader. Easy to do in ruby with @jnunemaker's twitter gem and the win32-sapi gem, if you are on windows.) - first.from_user.should == 'PatParslow' - end - - should "cache fetched results so multiple fetches don't keep hitting api" do - Twitter::Search.expects(:get).never - @search.fetch - end - - should "rehit api if fetch is called with true" do - Twitter::Search.expects(:get).once - @search.fetch(true) - end - end - - context "iterating over results" do - setup do - stub_get('http://search.twitter.com:80/search.json?q=from%3Ajnunemaker', 'search_from_jnunemaker.json') - @search.from('jnunemaker') - end - - should "work" do - @search.each { |result| result.should_not be(nil) } - end - - should "work multiple times in a row" do - @search.each { |result| result.should_not be(nil) } - @search.each { |result| result.should_not be(nil) } - end - end - - should "should be able to iterate over results" do - @search.respond_to?(:each).should be(true) - end - end - -end \ No newline at end of file diff --git a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter_test.rb b/ruby/processing/star_field/library/twitter-0.6.8/test/twitter_test.rb deleted file mode 100644 index 5b4a27c..0000000 --- a/ruby/processing/star_field/library/twitter-0.6.8/test/twitter_test.rb +++ /dev/null @@ -1,38 +0,0 @@ -require 'test_helper' - -class TwitterTest < Test::Unit::TestCase - should "have firehose method for public timeline" do - stub_get('http://twitter.com:80/statuses/public_timeline.json', 'firehose.json') - hose = Twitter.firehose - hose.size.should == 20 - first = hose.first - first.text.should == '#torrents Ultimativer Flirt Guide - In 10 Minuten jede Frau erobern: Ultimativer Flirt Guide - In 10 Mi.. http://tinyurl.com/d3okh4' - first.user.name.should == 'P2P Torrents' - end - - should "have user method for unauthenticated calls to get a user's information" do - stub_get('http://twitter.com:80/users/show/jnunemaker.json', 'user.json') - user = Twitter.user('jnunemaker') - user.name.should == 'John Nunemaker' - user.description.should == 'Loves his wife, ruby, notre dame football and iu basketball' - end - - should "have status method for unauthenticated calls to get a status" do - stub_get('http://twitter.com:80/statuses/show/1533815199.json', 'status_show.json') - status = Twitter.status(1533815199) - status.id.should == 1533815199 - status.text.should == 'Eating some oatmeal and butterscotch cookies with a cold glass of milk for breakfast. Tasty!' - end - - should "have friend_ids method" do - stub_get('http://twitter.com:80/friends/ids/jnunemaker.json', 'friend_ids.json') - ids = Twitter.friend_ids('jnunemaker') - ids.size.should == 161 - end - - should "have follower_ids method" do - stub_get('http://twitter.com:80/followers/ids/jnunemaker.json', 'follower_ids.json') - ids = Twitter.follower_ids('jnunemaker') - ids.size.should == 1252 - end -end diff --git a/ruby/processing/star_field/star_field_1_model.rb b/ruby/processing/star_field/star_field_1_model.rb index f15cb23..01ae985 100644 --- a/ruby/processing/star_field/star_field_1_model.rb +++ b/ruby/processing/star_field/star_field_1_model.rb @@ -1,6 +1,6 @@ # Copyright © 2009 Preston Lee. All rights reserved. -require 'lib/star' +require 'star' NUM_STARS = 100 SECONDS = 10.0 diff --git a/ruby/processing/star_field/star_field_2_view.rb b/ruby/processing/star_field/star_field_2_view.rb index 86f1a1c..09a1a3a 100644 --- a/ruby/processing/star_field/star_field_2_view.rb +++ b/ruby/processing/star_field/star_field_2_view.rb @@ -1,6 +1,6 @@ # Copyright © 2009 Preston Lee. All rights reserved. -require 'lib/drawable_star' +require 'drawable_star' class StarfieldSimulator < Processing::App diff --git a/ruby/processing/star_field/star_field_3_controller.rb b/ruby/processing/star_field/star_field_3_controller.rb index 1aecef3..e87c414 100644 --- a/ruby/processing/star_field/star_field_3_controller.rb +++ b/ruby/processing/star_field/star_field_3_controller.rb @@ -1,7 +1,7 @@ # Copyright © 2009 Preston Lee. All rights reserved. -require 'lib/drawable_star' +require 'drawable_star' class StarfieldSimulator < Processing::App @@ -75,9 +75,20 @@ def mouse_dragged + # def key_pressed + # # puts "KEY_PRESSED: #{key_code}" + # handle_camera_change_start + # # handle_pause_and_resume + + # end + def key_pressed # puts "KEY_PRESSED: #{key_code}" handle_camera_change_start + handle_pause_and_resume + end + + def handle_pause_and_resume case key_code when TAB: @active_mutex.synchronize do @@ -89,6 +100,7 @@ def key_pressed end end + def key_released # puts "KEY_RELEASED: #{key_code}" handle_camera_change_stop diff --git a/ruby/processing/star_field/twitter_field.rb b/ruby/processing/star_field/twitter_field.rb deleted file mode 100644 index b884eb9..0000000 --- a/ruby/processing/star_field/twitter_field.rb +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright © 2009 Preston Lee. All rights reserved. - -lib_dir = File.join(File.dirname(__FILE__), 'library') -Dir.new(lib_dir).entries.each do |e| - # puts "#{e} #{e.class}" - if File::directory?(File.join(lib_dir,e)) && !['.','..'].include?(e) - l = File.join(lib_dir, e, 'lib') - # puts "PUSHING #{l}" - $LOAD_PATH.unshift(l) - end -end -# puts $LOAD_PATH -puts $GEM_PATH - -require 'lib/star' -# require 'oauth' -# require 'hmac-sha1' -require 'twitter' - -class TwitterStar < Star - - - @data_mutex = Mutex.new - attr_accessor :data - - def draw - $app.push_matrix - $app.translate(@x, @y, @z) - if @data.nil? - $app.box(8) - else - text(data.id) - end - # $app.sphere(10) - $app.pop_matrix - end - -end - -class TwitterField < Processing::App - - - load_library :opengl - # load_library 'twitter-0.6.8' - - NUM_STARS = 200; - CAMERA_SPEED = 20 # Pixels per wall second. - CAMERA_ROTATE_SPEED = 0.08 # Radians per wall second. - FRAME_RATE = 30 # Target frame per second. - - - - attr_accessor :stars - - def setup - # load_library('twitter') - library_loaded?(:opengl) ? render_mode(OPENGL) : render_mode(P3D) - # puts library_loaded?('twitter-0.6.8') - frame_rate FRAME_RATE - - - # config = YAML.load(File.read(File.join(ENV['HOME'], '.twitter', 'config'))) - # puts config - # Twitter::Client.configure do |conf| - # conf.protocol = :http - # conf.port = 80 # 443 for ssl - # end - # @twitter = Twitter::Client.new(config['default']) - # @twitter = Twitter::Base.new(config['default']) - config = YAML::load(open(ENV['HOME'] + '/.twitter/config'))['default'] - auth = Twitter::HTTPAuth.new(config['login'], config['password'], :ssl => false) - @twitter = Twitter::Base.new(auth) - @friends_timeline = @twitter.friends_timeline - puts @friends_timeline - - - @mouse_last_x = nil - @mouse_last_y = nil - @stars = [] - for n in 0..NUM_STARS do - @stars << TwitterStar.new(1.0 / FRAME_RATE) - end - @twitter_thread = Thread.new do - while true do # FIXME - # Get new data. - puts "Updating Twitter data. #{@twitter}" - puts "Received #{@friends_timeline.size} records. Updating field." - # Update available stars. - if @friends_timeline.size > 0 - @stars.each_with_index do |star, i| - status = @friends_timeline[i % @friends_timeline.size] - star.data = status - puts "Set #{status.id} to star #{i}." - end - end - sleep 30 - end - end - text_font load_font("Univers66.vlw.gz"), 1.0 - - end - - - def draw - background 0 # Paint the entire screen solid black. - fill(255) - color(100,255,255) - # text("Moving starfield demo aoenu hreouh rcohurcoeuh arochuoaentuhoe u.", 0, 0, 0) - - @stars.each do |s| - push_matrix - s.draw - pop_matrix - end - move_camera_for_frame - end - - def mouse_released - @mouse_last_x = nil - @mouse_last_y = nil - end - - def mouse_dragged - @mouse_last_x = mouse_x if @mouse_last_x.nil? - @mouse_last_y = mouse_y if @mouse_last_y.nil? - - dx = @mouse_last_x - mouse_x - dy = @mouse_last_y - mouse_y - - begin_camera - if dx != 0 - # puts "#{mouse_x} #{mouse_y}" - rotate_y radians(-dx) * 0.1 - end - if dy != 0 - rotate_x radians(dy) * 0.1 - end - - end_camera - - @mouse_last_x = mouse_x - @mouse_last_y = mouse_y - end - - - def key_pressed - # puts "KEY_PRESSED: #{key_code}" - handle_camera_change_start - end - - def key_released - # puts "KEY_RELEASED: #{key_code}" - handle_camera_change_stop - end - - def handle_camera_change_start - begin_camera - case key_code - when UP: - @camera_move_z = -1 - when DOWN, 's', 'o': - @camera_move_z = 1 - when LEFT: - @camera_move_x = -1 - when RIGHT: - @camera_move_x = 1 - end - - case key - when 'w', ',': - @camera_move_z = -1 - when 's', 'o': - @camera_move_z = 1 - when 'a': - @camera_move_x = -1 - when 'd', 'e': - @camera_move_x = 1 - when 'r', 'p': - @camera_move_y = -1 - when 'f', 'u': - @camera_move_y = 1 - when 'z', ';': - @camera_rotate_z = -1 - when 'c', 'j': - @camera_rotate_z = 1 - end - - end_camera - end - - def handle_camera_change_stop - begin_camera - case key_code - when UP, DOWN, 'w', ',', 's', 'o': - @camera_move_z = 0 - when LEFT, RIGHT, 'a', 'd', 'e': - @camera_move_x = 0 - end - - case key - when 'w', ',', 's', 'o': - @camera_move_z = 0 - when 'a', 'd', 'e': - @camera_move_x = 0 - when 'r', 'p', 'f', 'u': - @camera_move_y = 0 - when 'z', ';', 'c', 'j': - @camera_rotate_z = 0 - end - end_camera - end - - def move_camera_for_frame - begin_camera - translate(@camera_move_x * CAMERA_SPEED, 0, 0) if !@camera_move_x.nil? && @camera_move_x != 0 - translate(0, @camera_move_y * CAMERA_SPEED, 0) if !@camera_move_y.nil? && @camera_move_y != 0 - translate(0, 0, @camera_move_z * CAMERA_SPEED) if !@camera_move_z.nil? && @camera_move_z != 0 - rotate_z(@camera_rotate_z * CAMERA_ROTATE_SPEED) if !@camera_rotate_z.nil? && @camera_rotate_z != 0 - end_camera - end - -end - -TwitterField.new :width => 1000, :height => 800, :title => "Twitter status messages flying through space." - -