signatureio 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/signatureio/version.rb +1 -1
- data/lib/signatureio.rb +10 -1
- data/spec/signatureio/version_spec.rb +1 -1
- data/spec/signatureio_spec.rb +9 -0
- metadata +3 -3
data/lib/signatureio/version.rb
CHANGED
data/lib/signatureio.rb
CHANGED
@@ -51,8 +51,17 @@ module Signatureio
|
|
51
51
|
0
|
52
52
|
end
|
53
53
|
|
54
|
+
def _root_url=(_root_url)
|
55
|
+
@_root_url = _root_url
|
56
|
+
end
|
57
|
+
|
58
|
+
def _root_url
|
59
|
+
return @_root_url if @_root_url
|
60
|
+
"https://www.signature.io"
|
61
|
+
end
|
62
|
+
|
54
63
|
def api_endpoint
|
55
|
-
["
|
64
|
+
[_root_url, "/api/v", api_version].join
|
56
65
|
end
|
57
66
|
|
58
67
|
private
|
data/spec/signatureio_spec.rb
CHANGED
@@ -32,4 +32,13 @@ describe Signatureio do
|
|
32
32
|
it { subject.secret_api_key.should eq secret_api_key }
|
33
33
|
it { subject.api_endpoint.should eq "https://www.signature.io/api/v1" }
|
34
34
|
end
|
35
|
+
|
36
|
+
describe "setting _root_url" do
|
37
|
+
before do
|
38
|
+
subject._root_url = "http://localhost:3000"
|
39
|
+
end
|
40
|
+
|
41
|
+
it { subject._root_url = "http://localhost:3000" }
|
42
|
+
it { subject.api_endpoint.should eq "http://localhost:3000/api/v1" }
|
43
|
+
end
|
35
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: signatureio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash: -
|
145
|
+
hash: -493432354269638459
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
none: false
|
148
148
|
requirements:
|
@@ -151,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
version: '0'
|
152
152
|
segments:
|
153
153
|
- 0
|
154
|
-
hash: -
|
154
|
+
hash: -493432354269638459
|
155
155
|
requirements: []
|
156
156
|
rubyforge_project:
|
157
157
|
rubygems_version: 1.8.23
|