farscape 1.3.1 → 1.3.2

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: 5915942a7f6c1b8f72e8bc1eb081d25715fdf3b3
4
- data.tar.gz: 3775f77a8777c797dfaacaa85f47488278d1dcac
3
+ metadata.gz: 63a7aec872a6722f3ffde3ad602478c02080a274
4
+ data.tar.gz: 63cf22a66beeab65230a3d6148f72d5109051176
5
5
  SHA512:
6
- metadata.gz: 8c443d1bf3f9a189d17864beee7d572bb34d7820589dc8903bf91ab684e989f468ed10e9a8e0ce7f96213406730bcba88e9e80e7c5cd3d191e18b47dd32a769e
7
- data.tar.gz: e2f03a95a06581d5692d205ab7e213b469f9bf8a07db3bfb7d23f20bf9439f70b88befc2e1e9b4e837e51e5635440691ba74a756cc104edb2f961f618392acad
6
+ metadata.gz: 5445b41defd7429335e80386e2081db72731b7f19c2bd85a48aceef7db3e616d9600dbf0ca5d9ba5cd46ff5030eafb803ddfee3d4901d054c6563aff726ee01a
7
+ data.tar.gz: 517acdf7fc8d45fa51f506e060903b4458b3ac7606e03220acaf362540e922119fbeccb6e818061287c4ec2a434d9e590f66f78f827291bc210872c6ea096337
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.3.2
2
+ * Add support for use of JSON in request body.
3
+
1
4
  # 1.3.1
2
5
  * Fix bug to allow new resources to be entered when reusing the same agent.
3
6
 
@@ -2,6 +2,7 @@ require 'faraday'
2
2
  require 'farscape/client/base_client'
3
3
  require 'farscape/plugins'
4
4
  require 'farscape/errors'
5
+ require 'faraday_middleware'
5
6
 
6
7
  module Farscape
7
8
  class Agent
@@ -13,7 +14,7 @@ module Farscape
13
14
 
14
15
  def initialize(agent)
15
16
  @connection = Faraday.new do |builder|
16
- builder.request :url_encoded
17
+ builder.request :json
17
18
  agent.middleware_stack.each do |middleware|
18
19
  if middleware.key?(:config)
19
20
  config = middleware[:config]
@@ -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.1'.freeze
4
+ VERSION = '1.3.2'.freeze
5
5
  end
6
6
  end
@@ -7,10 +7,10 @@ describe Farscape::TransitionAgent do
7
7
  let(:arg) { { additional_fields: { key1: 'value1', key2: 'value2' } } }
8
8
  let(:transition_agent) { described_class.new(transition, agent) }
9
9
  let(:field_list) { double(name: 'additional_fields') }
10
- let(:call_options) { { url: 'com:mdsol', headers: { Accept: 'application/vnd.hale+json' } } }
10
+ let(:call_options) { { url: 'com:mdsol', headers: { 'Accept' => 'application/vnd.hale+json' } } }
11
11
 
12
12
  before do
13
- allow(agent).to receive(:get_accept_header).and_return(Accept: 'application/vnd.hale+json')
13
+ allow(agent).to receive(:get_accept_header).and_return('Accept' => 'application/vnd.hale+json')
14
14
  allow(agent).to receive(:find_exception).and_return(nil)
15
15
  allow(transition).to receive(:interface_method).and_return(http_method)
16
16
  allow(transition).to receive(:parameters).and_return([ field_list ])
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.1
4
+ version: 1.3.2
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-23 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.9'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faraday_middleware
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.10'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.10'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement