saddle 0.0.49 → 0.0.50
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.travis.yml +1 -0
- data/lib/saddle/endpoint.rb +5 -0
- data/lib/saddle/requester.rb +1 -1
- data/lib/saddle/version.rb +1 -1
- data/saddle.gemspec +6 -1
- data/spec/endpoint/base_endpoint_spec.rb +14 -0
- data/spec/endpoint/traversal_endpoint_spec.rb +10 -0
- data/spec/requester/post_spec.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2YwNTRjYjcwYWE2NDY5NjQ5N2I3ZTU2ODNhM2JlYmY3YjA0NWU3YQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2Y3OTg4YzYwMWM5NGJiYmRlYWM5MzRkNDFkZjJkNzk2ZTNlMjIxNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YjEyZGVkNTkwMjhhNTk3OTZlZTE3M2UyYzIyNzFiZmFhZDg3NjVlMzY0YTlk
|
10
|
+
YjQ5MDZhODJhYTUyYTQ2NTEwNjgzNWJjODI5YWYyZjA0NWJjNmMyNDk1NWVl
|
11
|
+
OTMxN2NlMGI4NDdkNmE5M2ZiOWRlNjU2ODU4OWZmM2IzOTNlNjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjJkYzU3NzYzMTU2ZjFlMGNhMTk0OTZjMzg5ZTQzMGUzMDc3YTI3Y2IxODkw
|
14
|
+
OWVlMjY3YzIzYTdhZDYxZDFhMGZmNTJhOTllMzA3NjFkZGE4YmVjOWZlMjU5
|
15
|
+
MWQxOWEzZDczMjU2ZGNkZjQ5MjAxZTRkNjFiZWUwZmI2MzA5ODk=
|
data/.travis.yml
CHANGED
data/lib/saddle/endpoint.rb
CHANGED
data/lib/saddle/requester.rb
CHANGED
@@ -156,7 +156,7 @@ module Saddle
|
|
156
156
|
|
157
157
|
# Apply additional implementation-specific middlewares
|
158
158
|
@additional_middlewares.each do |m|
|
159
|
-
builder.use(m[:klass], *m[:args])
|
159
|
+
m[:args] ? builder.use(m[:klass], *m[:args]) : builder.use(m[:klass])
|
160
160
|
end
|
161
161
|
|
162
162
|
# Request encoding
|
data/lib/saddle/version.rb
CHANGED
data/saddle.gemspec
CHANGED
@@ -21,8 +21,13 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.files = `git ls-files`.split($\)
|
22
22
|
s.executables = ['saddle']
|
23
23
|
s.test_files = s.files.grep(%r{^(spec)/})
|
24
|
+
|
25
|
+
if RUBY_VERSION < '1.9'
|
26
|
+
s.add_dependency 'activesupport', '~> 3.0'
|
27
|
+
else
|
28
|
+
s.add_dependency 'activesupport', '>= 3.0'
|
29
|
+
end
|
24
30
|
|
25
|
-
s.add_dependency 'activesupport', '>= 3.0'
|
26
31
|
s.add_dependency 'faraday', '~> 0.8.7'
|
27
32
|
s.add_dependency 'faraday_middleware', '~> 0.9.0'
|
28
33
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Saddle::BaseEndpoint do
|
4
|
+
let(:base_endpoint) { Saddle::BaseEndpoint.new(Saddle::Client.create) }
|
5
|
+
|
6
|
+
it 'can define singleton methods' do
|
7
|
+
expect(base_endpoint.respond_to?(:define_singleton_method)).to be_true
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'responds to any defined singleton methods' do
|
11
|
+
base_endpoint.define_singleton_method(:my_method) { true }
|
12
|
+
expect(base_endpoint.my_method).to be_true
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Saddle::TraversalEndpoint do
|
4
|
+
it 'can build and attach nodes' do
|
5
|
+
class TestEndpoint < Saddle::TraversalEndpoint; end
|
6
|
+
expect {
|
7
|
+
TestEndpoint.new(Saddle::Client.create)._build_and_attach_node(Saddle::TraversalEndpoint)
|
8
|
+
}.to_not raise_error
|
9
|
+
end
|
10
|
+
end
|
data/spec/requester/post_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saddle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Lewis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -107,6 +107,8 @@ files:
|
|
107
107
|
- lib/saddle/requester.rb
|
108
108
|
- lib/saddle/version.rb
|
109
109
|
- saddle.gemspec
|
110
|
+
- spec/endpoint/base_endpoint_spec.rb
|
111
|
+
- spec/endpoint/traversal_endpoint_spec.rb
|
110
112
|
- spec/middleware/authentication/oauth2_authentication_spec.rb
|
111
113
|
- spec/middleware/instrumentation_spec.rb
|
112
114
|
- spec/middleware/logging/airbrake_spec.rb
|
@@ -144,6 +146,8 @@ specification_version: 4
|
|
144
146
|
summary: A full-featured, generic consumer layer for you to build API client implementations
|
145
147
|
with.
|
146
148
|
test_files:
|
149
|
+
- spec/endpoint/base_endpoint_spec.rb
|
150
|
+
- spec/endpoint/traversal_endpoint_spec.rb
|
147
151
|
- spec/middleware/authentication/oauth2_authentication_spec.rb
|
148
152
|
- spec/middleware/instrumentation_spec.rb
|
149
153
|
- spec/middleware/logging/airbrake_spec.rb
|