farscape 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/farscape/agent.rb +4 -3
- data/lib/farscape/version.rb +1 -1
- data/spec/lib/farscape/integration/entry_point_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5915942a7f6c1b8f72e8bc1eb081d25715fdf3b3
|
4
|
+
data.tar.gz: 3775f77a8777c797dfaacaa85f47488278d1dcac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c443d1bf3f9a189d17864beee7d572bb34d7820589dc8903bf91ab684e989f468ed10e9a8e0ce7f96213406730bcba88e9e80e7c5cd3d191e18b47dd32a769e
|
7
|
+
data.tar.gz: e2f03a95a06581d5692d205ab7e213b469f9bf8a07db3bfb7d23f20bf9439f70b88befc2e1e9b4e837e51e5635440691ba74a756cc104edb2f961f618392acad
|
data/CHANGELOG.md
CHANGED
data/lib/farscape/agent.rb
CHANGED
@@ -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 =
|
49
|
-
|
50
|
-
@entry_point
|
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
|
data/lib/farscape/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|