farscape 1.3.0 → 1.3.1

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: 42ff32e415677a4ca1cb6419518d7cbf78a6df1c
4
- data.tar.gz: 2f7d3081526f4e913c7b4d66f35378db2212de31
3
+ metadata.gz: 5915942a7f6c1b8f72e8bc1eb081d25715fdf3b3
4
+ data.tar.gz: 3775f77a8777c797dfaacaa85f47488278d1dcac
5
5
  SHA512:
6
- metadata.gz: a45910ae4df9afafafa01805c07de5948c5a912367f5ee184b870d26167b75710d2c49055cd34d08fbaae804be542c683fc42c41d409e30007bfc44343b1fcd0
7
- data.tar.gz: 8ee0a64cefcad9ecfc1e4c50c7f295031467b84846920baf1baffa1a3391dda3fead82eeda67144c78511cf41a8f922caf44c4a49fade8ad1a1fd395dd8324b5
6
+ metadata.gz: 8c443d1bf3f9a189d17864beee7d572bb34d7820589dc8903bf91ab684e989f468ed10e9a8e0ce7f96213406730bcba88e9e80e7c5cd3d191e18b47dd32a769e
7
+ data.tar.gz: e2f03a95a06581d5692d205ab7e213b469f9bf8a07db3bfb7d23f20bf9439f70b88befc2e1e9b4e837e51e5635440691ba74a756cc104edb2f961f618392acad
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 1.3.1
2
+ * Fix bug to allow new resources to be entered when reusing the same agent.
3
+
1
4
  # 1.3.0
2
5
  * Add discover method and configuration to the Farscape agent.
3
6
 
@@ -45,9 +45,10 @@ module Farscape
45
45
  Discovery.new.discover(self.class.config, key, template_variables)
46
46
  end
47
47
 
48
- def enter(entry = entry_point, template_variables = {})
49
- raise "No Entry Point Provided!" unless entry
50
- @entry_point ||= entry
48
+ def enter(entry = nil, template_variables = {})
49
+ @entry_point = entry || @entry_point # If provided entry will update our current entry point
50
+ raise "No Entry Point Provided!" unless @entry_point
51
+
51
52
  unless Addressable::URI.parse(@entry_point).absolute?
52
53
  @entry_point = discover_entry_point(@entry_point, template_variables)
53
54
  end
@@ -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.0'.freeze
4
+ VERSION = '1.3.1'.freeze
5
5
  end
6
6
  end
@@ -48,6 +48,12 @@ describe Farscape::Agent do
48
48
  expect(Farscape::Agent.new.enter(entry_point)).to be_a Farscape::RepresentorAgent
49
49
  end
50
50
 
51
+ it 'can change entry points when new entry point is provided' do
52
+ agent = Farscape::Agent.instance
53
+ expect { agent.enter("http://localhost:#{RAILS_PORT}/drds/ninja_boot") }.to raise_error(Farscape::Exceptions::UnprocessableEntity)
54
+ expect(agent.enter(entry_point)).to be_a Farscape::RepresentorAgent
55
+ end
56
+
51
57
  #TODO decide on the appropriate error
52
58
  it 'raises an appropriate error if no entry point is specified' do
53
59
  expect{ Farscape::Agent.new.enter }.to raise_error(RuntimeError)
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.0
4
+ version: 1.3.1
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-06 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport