service_api 0.0.1 → 0.0.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3011d5900d368b5667436e94dea95a0e5d185ab8
|
4
|
+
data.tar.gz: b5f2d3a2731f8b87233467105227aa52db36705e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04e57921b787ac37766f34cb9c06e2cfb8731e265deaa5bbf6c31d31b264f26bb44e46e6c6032bb4b8e42f727f71350040ebcc4c0047c13a3cae3c41b48f0e8d
|
7
|
+
data.tar.gz: a4240168d0795b24c5cd40be56fdbb54ca4947307bd426d549fe3d9bb53156fcc5af1c609013c36bc359233f9f76637ab765b442ef7c9da37adffa05b557d722
|
data/lib/service_api/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ServiceApi::UriTokens do
|
4
|
+
describe 'default' do
|
5
|
+
let(:template) { ServiceApi::UriTokens.new('http://{host}/{segments}/{file}.{extensions}') }
|
6
|
+
|
7
|
+
it 'should use RFC6570 class' do
|
8
|
+
template.uri_template.class.should == URITemplate::RFC6570
|
9
|
+
end
|
10
|
+
|
11
|
+
it 'should return token values' do
|
12
|
+
template.token_values.sort.should == ['host', 'segments', 'file', 'extensions'].sort
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
describe 'colon' do
|
17
|
+
let(:template) { ServiceApi::UriTokens.new(:colon, 'http://:host/:segments/:file.:extensions') }
|
18
|
+
|
19
|
+
it 'should use Colon class' do
|
20
|
+
template.uri_template.class.should == URITemplate::Colon
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should return token values' do
|
24
|
+
template.token_values.sort.should == ['host', 'segments', 'file', 'extensions'].sort
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Wawer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -125,8 +125,8 @@ files:
|
|
125
125
|
- lib/service_api/uri_tokens.rb
|
126
126
|
- lib/service_api/version.rb
|
127
127
|
- service_api.gemspec
|
128
|
-
- spec/
|
129
|
-
- spec/
|
128
|
+
- spec/functionals/base_faraday_spec.rb
|
129
|
+
- spec/functionals/uri_tokens_spec.rb
|
130
130
|
- spec/spec_helper.rb
|
131
131
|
homepage: http://github.com/wafcio/service_api
|
132
132
|
licenses:
|
@@ -153,6 +153,6 @@ signing_key:
|
|
153
153
|
specification_version: 4
|
154
154
|
summary: Set of useful modules, classes for api gems
|
155
155
|
test_files:
|
156
|
-
- spec/
|
157
|
-
- spec/
|
156
|
+
- spec/functionals/base_faraday_spec.rb
|
157
|
+
- spec/functionals/uri_tokens_spec.rb
|
158
158
|
- spec/spec_helper.rb
|
@@ -1,9 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe ServiceApi::UriTokens do
|
4
|
-
let(:template) { ServiceApi::UriTokens.new('http://{host}/{segments}/{file}.{extensions}') }
|
5
|
-
|
6
|
-
it 'should return token values' do
|
7
|
-
template.token_values.sort.should == ['extensions', 'file', 'host', 'segments']
|
8
|
-
end
|
9
|
-
end
|