farscape 1.3.2 → 1.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63a7aec872a6722f3ffde3ad602478c02080a274
4
- data.tar.gz: 63cf22a66beeab65230a3d6148f72d5109051176
3
+ metadata.gz: 0295eeb941697f2f5431f22ef35ad8ddf265488a
4
+ data.tar.gz: 6b02a9352436b5373a95e51ff5085af5cbf828bd
5
5
  SHA512:
6
- metadata.gz: 5445b41defd7429335e80386e2081db72731b7f19c2bd85a48aceef7db3e616d9600dbf0ca5d9ba5cd46ff5030eafb803ddfee3d4901d054c6563aff726ee01a
7
- data.tar.gz: 517acdf7fc8d45fa51f506e060903b4458b3ac7606e03220acaf362540e922119fbeccb6e818061287c4ec2a434d9e590f66f78f827291bc210872c6ea096337
6
+ metadata.gz: f28b1b7596e1a3a1a2ec40682b20518cac9a952597a0d378f3cb7db1b76cd0c5fee625cef46ab05557bb59e2d6b038edde2e03d5274b87b9523580f060191ed8
7
+ data.tar.gz: e58f00fa498f2c92b64601d34f0ed2eceaa4783a11c19887d5a5fef0765d443870dc42f85c8f7717d9f4d68a99be37a422607eb8fef57f397c6473f00bc1915f
@@ -1,3 +1,6 @@
1
+ # 1.3.3
2
+ * Update to make GET request query in lowercase.
3
+
1
4
  # 1.3.2
2
5
  * Add support for use of JSON in request body.
3
6
 
@@ -27,7 +27,13 @@ module Farscape
27
27
 
28
28
  if call_options[:method].downcase == 'get'
29
29
  # delegate the URL building to representors so we can use templated URIs
30
- call_options[:url] = @transition.uri(params)
30
+
31
+ # We are in another unfortunate situation in which Mauth-client might not be able to validate
32
+ # if a request query string contains uppercase characters.
33
+ # Somebody, probably Nginx, converts the query string to lowercase, and Mauth-client uses it
34
+ # to compare with the signature which is generated using the original query string.
35
+ # https://github.com/mdsol/mauth-client-ruby/blob/v4.0.1/lib/mauth/client.rb#L333
36
+ call_options[:url] = @transition.uri(params).downcase
31
37
  # still need to use this for extra params... (e.g. "conditions=can_do_anything")
32
38
  if params.present?
33
39
  if @transition.templated?
@@ -1,6 +1,6 @@
1
1
  # Used to prevent the class/module from being loaded more than once
2
2
  unless defined?(::Farscape::VERSION)
3
3
  module Farscape
4
- VERSION = '1.3.2'.freeze
4
+ VERSION = '1.3.3'.freeze
5
5
  end
6
6
  end
@@ -50,14 +50,14 @@ describe Farscape::TransitionAgent do
50
50
  context "GET" do
51
51
  let(:http_method) { "get" }
52
52
 
53
- it "interpolates a templated URI" do
53
+ it "interpolates a templated URI in lowercase" do
54
54
  options = call_options.merge(
55
55
  method: http_method,
56
56
  url: "https://example.com/api/v1/issues/#{issue_uuid}",
57
57
  params: arg
58
58
  )
59
59
  expect(client).to receive(:invoke).with(options)
60
- transition_agent.invoke(arg.merge(issue_uuid: issue_uuid))
60
+ transition_agent.invoke(arg.merge(issue_uuid: issue_uuid.upcase))
61
61
  end
62
62
  end
63
63
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: farscape
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark W. Foster
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-28 00:00:00.000000000 Z
11
+ date: 2016-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -249,4 +249,3 @@ signing_key:
249
249
  specification_version: 4
250
250
  summary: It shoots through wormholes and takes you to unknown places in the universe!
251
251
  test_files: []
252
- has_rdoc: