Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Faraday 0.8 #546

Closed
wants to merge 3 commits into from

1 participant

Commits on Mar 12, 2013
  1. @technoweenie

    update to faraday 0.8.6

    technoweenie authored
  2. @technoweenie
  3. @technoweenie

    use 0.8.6

    technoweenie authored
This page is out of date. Refresh to see the latest.
Showing with 80 additions and 83 deletions.
  1. +1 −1  Gemfile
  2. +3 −6 Gemfile.lock
  3. +1 −1  github-services.gemspec
  4. +2 −2 lib/services/shiningpanda.rb
  5. +2 −2 test/CodePorting-C#2Java_test.rb
  6. +2 −2 test/active_collab_test.rb
  7. +2 −2 test/bamboo_test.rb
  8. +1 −1  test/codeclimate_test.rb
  9. +1 −1  test/coffeedocinfo_test.rb
  10. +2 −2 test/depending_test.rb
  11. +1 −1  test/deploy_hq_test.rb
  12. +3 −3 test/ducksboard_test.rb
  13. +2 −2 test/firebase_test.rb
  14. +1 −1  test/habitualist_test.rb
  15. +1 −1  test/hip_chat_test.rb
  16. +1 −1  test/hostedgraphite.rb
  17. +7 −7 test/icescrum_test.rb
  18. +1 −1  test/jenkins_git_test.rb
  19. +1 −1  test/jquery_plugins_test.rb
  20. +1 −1  test/lingohub_test.rb
  21. +2 −2 test/notifo_test.rb
  22. +1 −1  test/notifymyandroid_test.rb
  23. +3 −3 test/packagist_test.rb
  24. +1 −1  test/planio_test.rb
  25. +1 −1  test/prowl_test.rb
  26. +1 −1  test/pushover_test.rb
  27. +1 −1  test/pythonpackages_test.rb
  28. +1 −1  test/rails_brakeman_test.rb
  29. +1 −1  test/railsbp_test.rb
  30. +1 −1  test/rapidpush_test.rb
  31. +1 −1  test/rdocinfo_test.rb
  32. +1 −1  test/read_the_docs_test.rb
  33. +8 −8 test/redmine_test.rb
  34. +1 −1  test/scrumdo_test.rb
  35. +1 −1  test/service_test.rb
  36. +5 −5 test/shiningpanda_test.rb
  37. +1 −1  test/socialcast_test.rb
  38. +1 −1  test/splendid_bacon_test.rb
  39. +1 −1  test/statusnet_test.rb
  40. +1 −1  test/talker_test.rb
  41. +1 −1  test/test_pilot_test.rb
  42. +1 −1  test/trac_test.rb
  43. +2 −2 test/travis_test.rb
  44. +4 −4 test/web_test.rb
  45. +1 −1  test/web_translate_it_test.rb
  46. +1 −1  test/zohoprojects_test.rb
  47. BIN  vendor/cache/faraday-0.7.6.gem
  48. BIN  vendor/cache/faraday-0.8.6.gem
  49. BIN  vendor/cache/multipart-post-1.1.5.gem
  50. BIN  vendor/cache/multipart-post-1.2.0.gem
  51. BIN  vendor/cache/rack-1.4.1.gem
View
2  Gemfile
@@ -5,7 +5,7 @@ gem 'yajl-ruby', '1.1.0'
gem "mash", "~> 0.1.1"
gem "mime-types", "~> 1.15"
gem "ruby-hmac", "0.4.0"
-gem "faraday", "0.7.6"
+gem "faraday", "~> 0.8.6"
gem "SystemTimer"
# Basecamp Classic
View
9 Gemfile.lock
@@ -18,10 +18,8 @@ GEM
builder (2.1.2)
crack (0.1.8)
eventmachine (0.12.10)
- faraday (0.7.6)
- addressable (~> 2.2)
+ faraday (0.8.6)
multipart-post (~> 1.1)
- rack (~> 1.1)
faraday_middleware (0.8.7)
faraday (>= 0.7.4, < 0.9)
hashie (1.2.0)
@@ -40,11 +38,10 @@ GEM
mime-types (1.18)
mqtt (0.0.8)
multi_json (1.3.2)
- multipart-post (1.1.5)
+ multipart-post (1.2.0)
nokogiri (1.5.6)
oauth (0.4.4)
polyglot (0.3.3)
- rack (1.4.1)
rake (0.8.7)
rest-client (1.6.7)
mime-types (>= 1.16)
@@ -92,7 +89,7 @@ DEPENDENCIES
activeresource (~> 3.0.0)
addressable (~> 2.2.7)
aws-sdk (~> 1.8.0)
- faraday (= 0.7.6)
+ faraday (~> 0.8.0)
httparty (= 0.7.4)
mail (~> 2.3)
mash (~> 0.1.1)
View
2  github-services.gemspec
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "mash", "~> 0.1.1"
spec.add_dependency "mime-types", "~> 1.15"
spec.add_dependency "ruby-hmac", "0.4.0"
- spec.add_dependency "faraday", "0.7.6"
+ spec.add_dependency "faraday", "~> 0.8.6"
spec.add_dependency "SystemTimer"
# Basecamp Classic
View
4 lib/services/shiningpanda.rb
@@ -21,7 +21,7 @@ def receive_push
end
branch = payload['ref'].to_s.split('/').last
if branches.empty? || branches.include?(branch)
- Rack::Utils.parse_query(data['parameters']).each do |key, values|
+ Faraday::Utils.parse_query(data['parameters']).each do |key, values|
if !values.is_a?(String) and values.length > 1
raise_config_error "Only one parameter value allowed for " + key
end
@@ -53,7 +53,7 @@ def branches
end
def parameters
- @parameters ||= Rack::Utils.parse_nested_query(cleanup('parameters'))
+ @parameters ||= Faraday::Utils.parse_nested_query(cleanup('parameters'))
end
def query
View
4 test/CodePorting-C#2Java_test.rb
@@ -4,7 +4,7 @@ class CodePortingCSharp2JavaTest < Service::TestCase
def setup
@stubs = Faraday::Adapter::Test::Stubs.new
@stubs.post '/csharp2java/v0/UserSignin' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'codeportingtest', form['LoginName']
assert_equal 'testpassword', form['Password']
[200, {}, %(<xml><Token>MONKEY</Token><return success="True"></return></xml>)]
@@ -13,7 +13,7 @@ def setup
def test_push
@stubs.post '/csharp2java/v0/githubpluginsupport' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'MONKEY', form['token']
assert_equal 'Test_Project', form['ProjectName']
assert_equal 'Test', form['RepoKey']
View
4 test/active_collab_test.rb
@@ -7,8 +7,8 @@ def setup
def test_push
@stubs.post "/foo" do |env|
- query = Rack::Utils.parse_nested_query(env[:url].query)
- body = Rack::Utils.parse_nested_query(env[:body])
+ query = Faraday::Utils.parse_nested_query(env[:url].query)
+ body = Faraday::Utils.parse_nested_query(env[:body])
assert_equal '2', body['discussion']['milestone_id']
assert_equal '3', body['discussion']['parent_id']
assert_equal 'activecollab.com', env[:url].host
View
4 test/bamboo_test.rb
@@ -141,7 +141,7 @@ def compound_data1
# Raises Test::Unit::AssertionFailedError if the assertion doesn't match.
# Returns nothing.
def assert_params(body, expected)
- params = Rack::Utils.parse_query(body)
+ params = Faraday::Utils.parse_query(body)
expected.each do |key, expected_value|
assert value = params.delete(key.to_s), "#{key} not in #{params.inspect}"
assert_equal expected_value, value, "#{key} = #{value.inspect}, not #{expected_value.inspect}"
@@ -154,7 +154,7 @@ def service(*args)
super Service::Bamboo, *args
end
- private
+ private
def valid_response(key)
xml = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
"<restQueuedBuild buildResultKey=\"#{key}-7\" buildNumber=\"7\" planKey=\"#{key}\">" +
View
2  test/codeclimate_test.rb
@@ -21,7 +21,7 @@ def test_posts_payload
assert_equal 'codeclimate.com', env[:url].host
assert_equal basic_auth('github', '5373dd4a3648b88fa9acb8e46ebc188a'),
env[:request_headers]['authorization']
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
View
2  test/coffeedocinfo_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/checkout" do |env|
assert_equal 'coffeedoc.info', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
4 test/depending_test.rb
@@ -21,7 +21,7 @@ def test_post_payload
assert_equal 'depending.in', env[:url].host
assert_equal basic_auth('github', 'bf215181b5140522137b3d4f6b73544a'),
env[:request_headers]['authorization']
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
@@ -37,4 +37,4 @@ def data
{ 'token' => 'bf215181b5140522137b3d4f6b73544a' }
end
-end
+end
View
2  test/deploy_hq_test.rb
@@ -10,7 +10,7 @@ def test_push
@stubs.post '/deploy/projectname/to/servername/serverkey' do |env|
assert_equal 'test.deployhq.com', env[:url].host
assert_equal 'https', env[:url].scheme
- post_payload = JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ post_payload = JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
assert_not_nil payload['after']
assert_equal post_payload['after'], post_payload['after']
View
6 test/ducksboard_test.rb
@@ -10,7 +10,7 @@ def receive_helper(event)
svc = service(event, {'webhook_key' => '1234abcd'}, payload)
@stubs.post '/1234abcd' do |env|
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['content'])
assert_equal recv['payload'], payload
assert_equal recv['event'], event.to_s
@@ -33,7 +33,7 @@ def test_webhook_key_through_url
}, payload)
@stubs.post '/abcd1234' do |env|
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['content'])
assert_equal recv['payload'], payload
[200, {}, '']
@@ -53,7 +53,7 @@ def test_many_webhook_keys
(1..6).each do |endpoint|
@stubs.post "/#{endpoint}" do |env|
posted << endpoint
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['content'])
assert_equal recv['payload'], payload
[200, {}, '']
View
4 test/firebase_test.rb
@@ -29,7 +29,7 @@ def test_push
def test_push_with_secret
@stubs.post '/commits.json' do |env|
- params = Rack::Utils.parse_nested_query(env[:url].query)
+ params = Faraday::Utils.parse_nested_query(env[:url].query)
assert_equal({'auth' => '12345678abcdefgh'}, params)
end
@@ -43,7 +43,7 @@ def test_push_with_secret
def test_push_with_suffix
@stubs.post '/commits.json' do |env|
assert_equal 'test.firebaseio.com', env[:url].host
- params = Rack::Utils.parse_nested_query(env[:url].query)
+ params = Faraday::Utils.parse_nested_query(env[:url].query)
assert_equal({'auth' => '12345678abcdefgh'}, params)
[200, {}, '']
end
View
2  test/habitualist_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/webhooks/github/" do |env|
assert_equal 'habitualist.com', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/hip_chat_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
payload = {'a' => 1, 'ref' => 'refs/heads/master'}
@stubs.post "/v1/webhooks/github" do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal payload, JSON.parse(form['payload'])
assert_equal 'a', form['auth_token']
assert_equal 'r', form['room_id']
View
2  test/hostedgraphite.rb
@@ -8,7 +8,7 @@ def setup
def test_push
url = "/integrations/github/"
@stubs.post url do |env|
- params = Rack::Utils.parse_query env[:body]
+ params = Faraday::Utils.parse_query env[:body]
assert_equal 'payload', JSON.parse(params['payload'])
assert_equal 'test', params['api_key']
[200, {}, '']
View
14 test/icescrum_test.rb
@@ -9,7 +9,7 @@ def test_push_valid
@stubs.post "/a/ws/p/TESTPROJ/commit" do |env|
assert_equal 'www.kagilum.com', env[:url].host
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['payload'])
assert_equal payload, recv
[200, {}, '']
@@ -29,9 +29,9 @@ def test_push_valid_custom_url
@stubs.post "/icescrum/ws/p/TESTPROJ/commit" do |env|
assert_equal 'www.example.com', env[:url].host
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['payload'])
- assert_equal payload, recv
+ assert_equal payload, recv
[200, {}, '']
end
@@ -49,9 +49,9 @@ def test_push_valid_custom_url
def test_push_lowcase_project_key
@stubs.post "/a/ws/p/TESTPROJ/commit" do |env|
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['payload'])
- assert_equal payload, recv
+ assert_equal payload, recv
[200, {}, '']
end
@@ -68,7 +68,7 @@ def test_push_lowcase_project_key
def test_push_whitespace_project_key
@stubs.post "/a/ws/p/TESTPROJ/commit" do |env|
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['payload'])
assert_equal payload, recv
[200, {}, '']
@@ -106,7 +106,7 @@ def test_push_missing_password
end
end
- def test_push_missing_project_key
+ def test_push_missing_project_key
svc = service({
'username' => 'u',
'password' => 'p',
View
2  test/jenkins_git_test.rb
@@ -12,7 +12,7 @@ def test_push
assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization']
- params = Rack::Utils.parse_nested_query(env[:url].query)
+ params = Faraday::Utils.parse_nested_query(env[:url].query)
expected_params = {
'url' => 'http://github.com/mojombo/grit',
'branches' => 'master',
View
2  test/jquery_plugins_test.rb
@@ -10,7 +10,7 @@ def test_push
@stubs.post "/postreceive-hook" do |env|
assert_equal 'plugins.jquery.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/lingohub_test.rb
@@ -20,7 +20,7 @@ def test_http_call
def test_payload
@stubs.post "/github_callback" do |env|
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
received_payload = JSON.parse(body['payload'])
assert_equal payload['after'], received_payload['after']
View
4 test/notifo_test.rb
@@ -10,14 +10,14 @@ def test_push
notified = %w(a b)
@stubs.post "/v1/subscribe_user" do |env|
assert_equal 'api.notifo.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal subscribed.shift, data['username']
[200, {}, '']
end
@stubs.post "/v1/send_notification" do |env|
assert_equal 'api.notifo.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal notified.shift, data['to']
[200, {}, '']
end
View
2  test/notifymyandroid_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/publicapi/notify" do |env|
assert_equal 'www.notifymyandroid.com', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 'a', data['apikey']
[200, {}, '']
end
View
6 test/packagist_test.rb
@@ -31,9 +31,9 @@ def test_constructs_post_receive_url
def test_posts_payload
@stubs.post '/api/github' do |env|
assert_equal 'packagist.example.com', env[:url].host
- assert_equal 'simensen', Rack::Utils.parse_query(env[:body])['username']
- assert_equal '5gieo7lwcd8gww800scs', Rack::Utils.parse_query(env[:body])['apiToken']
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal 'simensen', Faraday::Utils.parse_query(env[:body])['username']
+ assert_equal '5gieo7lwcd8gww800scs', Faraday::Utils.parse_query(env[:body])['apiToken']
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
end
View
2  test/planio_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.get "/a/sys/fetch_changesets" do |env|
assert_equal 'r.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 'a', env[:params]['key']
assert_equal 'p', env[:params]['id']
[200, {}, '']
View
2  test/prowl_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/publicapi/add" do |env|
assert_equal 'api.prowlapp.com', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 'a', data['apikey']
[200, {}, '']
end
View
2  test/pushover_test.rb
@@ -14,7 +14,7 @@ def svc.shorten_url(*args)
@stubs.post "/1/messages.json" do |env|
assert_equal "api.pushover.net", env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal "a", data["user"]
assert_equal "hi", data["device"]
[200, {}, '']
View
2  test/pythonpackages_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/github" do |env|
assert_equal 'pythonpackages.com', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/rails_brakeman_test.rb
@@ -29,7 +29,7 @@ def test_strips_whitespace_from_form_values
def test_posts_payload
@stubs.post "/" do |env|
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
end
View
2  test/railsbp_test.rb
@@ -29,7 +29,7 @@ def test_strips_whitespace_from_form_values
def test_posts_payload
@stubs.post "/" do |env|
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
end
View
2  test/rapidpush_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/api/github/a" do |env|
assert_equal 'rapidpush.net', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal payload.to_json, data['payload']
[200, {}, '']
end
View
2  test/rdocinfo_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/checkout" do |env|
assert_equal 'rubydoc.info', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/read_the_docs_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/github" do |env|
assert_equal 'readthedocs.org', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
16 test/redmine_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.get "/a/sys/fetch_changesets" do |env|
assert_equal 'r.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 'a', env[:params]['key']
assert_equal 'p', env[:params]['id']
[200, {}, '']
@@ -28,17 +28,17 @@ def test_update_issue_module
[200, {}, '']
end
configurations = {
- 'address' => "http://redmine.org",
+ 'address' => "http://redmine.org",
'api_key' => "API_KEY-654321",
'update_redmine_issues_about_commits' => true
}
payloads = {
- 'commits' => [
- { 'message' => "FIX Issue #1234",
- 'timestamp' => "2007-10-10T00:11:02-07:00",
- 'id' => "b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33",
- 'url' => "https://github.com/modsaid/github-services/commit/b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33",
- 'author' => {'name' => "Mahmoud", 'email' => "modsaid@example.com"},
+ 'commits' => [
+ { 'message' => "FIX Issue #1234",
+ 'timestamp' => "2007-10-10T00:11:02-07:00",
+ 'id' => "b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33",
+ 'url' => "https://github.com/modsaid/github-services/commit/b44aa57a6c6c52cc20b9e396cfe3cf97bdfc2b33",
+ 'author' => {'name' => "Mahmoud", 'email' => "modsaid@example.com"},
'added' => [], 'removed' => [], 'modified' => []
}
]
View
2  test/scrumdo_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/hooks/github/slug" do |env|
assert_equal 'www.scrumdo.com', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal 'rick', data['username']
assert_equal 'monkey', data['password']
assert data['payload']
View
2  test/service_test.rb
@@ -54,7 +54,7 @@ def test_url_shorten
url = "http://github.com"
@stubs.post "/" do |env|
assert_equal 'git.io', env[:url].host
- data = Rack::Utils.parse_query(env[:body])
+ data = Faraday::Utils.parse_query(env[:body])
assert_equal url, data['url']
[201, {'Location' => 'short'}, '']
end
View
10 test/shiningpanda_test.rb
@@ -7,7 +7,7 @@ def setup
def test_receive_push_without_parameters
@stubs.post '/shiningpanda.org/job/pygments/build' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'PWFm8c2T', form['token']
assert_equal 'Triggered by a push of omansion to master (commit: 83d9205e73c25092ce7cb7ce530d2414e6d068cb)', form['cause']
end
@@ -17,7 +17,7 @@ def test_receive_push_without_parameters
def test_receive_push_with_parameters
@stubs.post '/shiningpanda.org/job/pygments/buildWithParameters' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'PWFm8c2T', form['token']
assert_equal 'Triggered by a push of omansion to master (commit: 83d9205e73c25092ce7cb7ce530d2414e6d068cb)', form['cause']
assert_equal 'bar', form['foo']
@@ -28,7 +28,7 @@ def test_receive_push_with_parameters
def test_receive_push_branch_match
@stubs.post '/shiningpanda.org/job/pygments/build' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'PWFm8c2T', form['token']
assert_equal 'Triggered by a push of omansion to dev (commit: 83d9205e73c25092ce7cb7ce530d2414e6d068cb)', form['cause']
end
@@ -38,7 +38,7 @@ def test_receive_push_branch_match
def test_receive_push_branches_match
@stubs.post '/shiningpanda.org/job/pygments/build' do |env|
- form = Rack::Utils.parse_query(env[:body])
+ form = Faraday::Utils.parse_query(env[:body])
assert_equal 'PWFm8c2T', form['token']
assert_equal 'Triggered by a push of omansion to master (commit: 83d9205e73c25092ce7cb7ce530d2414e6d068cb)', form['cause']
end
@@ -165,7 +165,7 @@ def test_url_strip_job
def test_strip_token
@stubs.post '/shiningpanda.org/job/pygments/build' do |env|
- assert_equal 'PWFm8c2T', Rack::Utils.parse_query(env[:body])['token']
+ assert_equal 'PWFm8c2T', Faraday::Utils.parse_query(env[:body])['token']
end
svc = service(data.merge({'token' => ' PWFm8c2T '}), payload)
svc.receive_push
View
2  test/socialcast_test.rb
@@ -9,7 +9,7 @@ def test_push
@stubs.post "/api/messages.xml" do |env|
assert_equal 'd', env[:url].host
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
msg = data['message']
assert_match 'Tom Preston-Werner', msg['body']
assert_match '3 commits', msg['title']
View
2  test/splendid_bacon_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/api/v1/projects/p/github" do |env|
assert_equal 'splendidbacon.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/statusnet_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/api/statuses/update.xml" do |env|
assert_equal 's.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 'github', data['source']
[200, {}, '']
end
View
2  test/talker_test.rb
@@ -54,7 +54,7 @@ def stub_message_posting
@stubs.post "/room/1/messages.json" do |env|
assert_equal 's.talkerapp.com', env[:url].host
assert_equal 't', env[:request_headers]['x-talker-token']
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert data.key?('message')
[200, {}, '']
end
View
2  test/test_pilot_test.rb
@@ -28,7 +28,7 @@ def test_constructs_post_receive_url
def test_posts_payload
@stubs.post '/callbacks/github' do |env|
assert_equal env[:params]['token'], @svc.token
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_push
end
View
2  test/trac_test.rb
@@ -9,7 +9,7 @@ def test_push
@stubs.post "/s/github/t" do |env|
assert_equal 's.trac.com', env[:url].host
assert_equal basic_auth(:u, :p), env[:request_headers]['authorization']
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
4 test/travis_test.rb
@@ -38,7 +38,7 @@ def test_posts_payload
assert_equal basic_auth('kronn', '5373dd4a3648b88fa9acb8e46ebc188a'),
env[:request_headers]['authorization']
assert_equal 'push', env[:request_headers]['x-github-event']
- assert_equal payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_event
end
@@ -50,7 +50,7 @@ def test_pull_request_payload
assert_equal basic_auth('kronn', '5373dd4a3648b88fa9acb8e46ebc188a'),
env[:request_headers]['authorization']
assert_equal 'pull_request', env[:request_headers]['x-github-event']
- assert_equal pull_payload, JSON.parse(Rack::Utils.parse_query(env[:body])['payload'])
+ assert_equal pull_payload, JSON.parse(Faraday::Utils.parse_query(env[:body])['payload'])
end
@svc.receive_event
end
View
8 test/web_test.rb
@@ -16,9 +16,9 @@ def test_push
assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization']
assert_match /form/, env[:request_headers]['content-type']
assert_equal 'abc.com', env[:url].host
- params = Rack::Utils.parse_nested_query(env[:url].query)
+ params = Faraday::Utils.parse_nested_query(env[:url].query)
assert_equal({'a' => '1'}, params)
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
assert_equal '1', body['a']
recv = JSON.parse(body['payload'])
assert_equal payload, recv
@@ -57,7 +57,7 @@ def test_push_with_secret
assert_equal 'sha1='+OpenSSL::HMAC.hexdigest(Service::Web::HMAC_DIGEST,
'monkey', env[:body]),
env[:request_headers]['X-Hub-Signature']
- body = Rack::Utils.parse_nested_query(env[:body])
+ body = Faraday::Utils.parse_nested_query(env[:body])
recv = JSON.parse(body['payload'])
assert_equal payload, recv
[200, {}, '']
@@ -74,7 +74,7 @@ def test_push_as_json
@stubs.post "/foo" do |env|
assert_equal 'Basic bW9ua2V5OnNlY3JldA==', env[:request_headers]['authorization']
- params = Rack::Utils.parse_nested_query(env[:url].query)
+ params = Faraday::Utils.parse_nested_query(env[:url].query)
assert_equal({'a' => '1'}, params)
assert_match /json/, env[:request_headers]['content-type']
assert_equal 'abc.com', env[:url].host
View
2  test/web_translate_it_test.rb
@@ -8,7 +8,7 @@ def setup
def test_push
@stubs.post "/api/projects/a/refresh_files" do |env|
assert_equal 'webtranslateit.com', env[:url].host
- data = Rack::Utils.parse_nested_query(env[:body])
+ data = Faraday::Utils.parse_nested_query(env[:body])
assert_equal 1, JSON.parse(data['payload'])['a']
[200, {}, '']
end
View
2  test/zohoprojects_test.rb
@@ -16,7 +16,7 @@ def test_push
url = "/serviceHook"
@stubs.post url do |env|
assert_equal 'projects.zoho.com', env[:url].host
- params = Rack::Utils.parse_query env[:body]
+ params = Faraday::Utils.parse_query env[:body]
assert_equal '1234', params['pId']
assert_equal 'a13d', params['authtoken']
assert_equal payload, JSON.parse(params['payload'])
View
BIN  vendor/cache/faraday-0.7.6.gem
Binary file not shown
View
BIN  vendor/cache/faraday-0.8.6.gem
Binary file not shown
View
BIN  vendor/cache/multipart-post-1.1.5.gem
Binary file not shown
View
BIN  vendor/cache/multipart-post-1.2.0.gem
Binary file not shown
View
BIN  vendor/cache/rack-1.4.1.gem
Binary file not shown
Something went wrong with that request. Please try again.