weary 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +1 -4
- data/Gemfile +5 -5
- data/README.md +1 -1
- data/lib/weary/adapters/typhoeus.rb +1 -1
- data/lib/weary/version.rb +1 -1
- data/spec/support/shared_examples_for_a_rack_app.rb +3 -6
- data/weary.gemspec +4 -4
- metadata +16 -35
- data/Gemfile.lock +0 -65
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: af1244368ca979420b05390cf7a3a387fe1591f6
|
4
|
+
data.tar.gz: 43b59f99e1cd83f5d87c626c0f85039785c9d002
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c13017c381aaf6a6950d0bc439166ac6dc6474d8a24e67c8b5d3eefd79eb9985e0bbf5ce17e1688e5160dae896b369d7f87267f83f2180f504f6c5d0b8843256
|
7
|
+
data.tar.gz: ac7954490695fe21309728bde0023a8b6a07b42bf208df1458061ea781a96afe8b5186cd6f90bfb843ea3f404f4ecf1fc440d7c857eb61d3df521d71f4191ea8
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -6,13 +6,13 @@ gem "rake", "~> 0.9.2"
|
|
6
6
|
gem "excon"
|
7
7
|
|
8
8
|
group :test do
|
9
|
-
gem "rspec", "~> 2.
|
10
|
-
gem "webmock", "~> 1.8
|
9
|
+
gem "rspec", "~> 2.13"
|
10
|
+
gem "webmock", "~> 1.8"
|
11
11
|
end
|
12
12
|
|
13
13
|
group :doc do
|
14
|
-
gem "yard", "~> 0.8
|
15
|
-
gem "yard-tomdoc", "~> 0.
|
14
|
+
gem "yard", "~> 0.8"
|
15
|
+
gem "yard-tomdoc", "~> 0.7"
|
16
16
|
end
|
17
17
|
|
18
18
|
platforms :jruby do
|
@@ -20,5 +20,5 @@ platforms :jruby do
|
|
20
20
|
end
|
21
21
|
|
22
22
|
platforms :mri, :jruby do
|
23
|
-
gem "typhoeus"
|
23
|
+
gem "typhoeus", "~> 0.5"
|
24
24
|
end
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Weary
|
2
2
|
|
3
|
-
[![Build Status](https://secure.travis-ci.org/mwunsch/weary.png)](http://travis-ci.org/mwunsch/weary) [![Code Climate](https://codeclimate.com/
|
3
|
+
[![Build Status](https://secure.travis-ci.org/mwunsch/weary.png)](http://travis-ci.org/mwunsch/weary) [![Code Climate](https://codeclimate.com/github/mwunsch/weary.png)](https://codeclimate.com/github/mwunsch/weary)
|
4
4
|
|
5
5
|
_Weary is a framework and DSL for building clients for (preferably RESTful) web service APIs._
|
6
6
|
|
@@ -8,7 +8,7 @@ module Weary
|
|
8
8
|
include Weary::Adapter
|
9
9
|
|
10
10
|
def connect(rack_request)
|
11
|
-
response = ::Typhoeus::Request.
|
11
|
+
response = ::Typhoeus::Request.new(rack_request.url, parameters_for(rack_request)).run
|
12
12
|
Rack::Response.new response.body, response.code, response.headers_hash
|
13
13
|
end
|
14
14
|
|
data/lib/weary/version.rb
CHANGED
@@ -39,7 +39,8 @@ shared_examples_for "a Rack application" do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
describe "the headers" do
|
42
|
-
let(:
|
42
|
+
let(:response) { subject.call(env) }
|
43
|
+
let(:headers) { response[1] }
|
43
44
|
|
44
45
|
it { headers.should respond_to :each }
|
45
46
|
|
@@ -58,10 +59,6 @@ shared_examples_for "a Rack application" do
|
|
58
59
|
it "contains values of Strings" do
|
59
60
|
headers.values.should be_all {|value| value.kind_of? String }
|
60
61
|
end
|
61
|
-
|
62
|
-
it "contains a 'Content-Type' header" do
|
63
|
-
headers.should have_key 'Content-Type'
|
64
|
-
end
|
65
62
|
end
|
66
63
|
|
67
64
|
describe "the body" do
|
@@ -79,4 +76,4 @@ shared_examples_for "a Rack application" do
|
|
79
76
|
end
|
80
77
|
end
|
81
78
|
|
82
|
-
end
|
79
|
+
end
|
data/weary.gemspec
CHANGED
@@ -17,9 +17,9 @@ Gem::Specification.new do |s|
|
|
17
17
|
|
18
18
|
s.require_paths = ['lib']
|
19
19
|
|
20
|
-
s.add_runtime_dependency "rack", "~> 1.
|
21
|
-
s.add_runtime_dependency "addressable", "~> 2.3
|
20
|
+
s.add_runtime_dependency "rack", "~> 1.5"
|
21
|
+
s.add_runtime_dependency "addressable", "~> 2.3"
|
22
22
|
s.add_runtime_dependency "promise", "~> 0.3.0"
|
23
|
-
s.add_runtime_dependency "simple_oauth", "~> 0.
|
24
|
-
s.add_runtime_dependency "multi_json", "~> 1.
|
23
|
+
s.add_runtime_dependency "simple_oauth", "~> 0.2"
|
24
|
+
s.add_runtime_dependency "multi_json", "~> 1.7"
|
25
25
|
end
|
metadata
CHANGED
@@ -1,52 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Mark Wunsch
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2013-04-15 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rack
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
19
|
+
version: '1.5'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.
|
26
|
+
version: '1.5'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: addressable
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
37
|
-
version: 2.3
|
33
|
+
version: '2.3'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
45
|
-
version: 2.3
|
40
|
+
version: '2.3'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: promise
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -62,36 +55,32 @@ dependencies:
|
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: simple_oauth
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
59
|
- - ~>
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: 0.
|
61
|
+
version: '0.2'
|
70
62
|
type: :runtime
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
66
|
- - ~>
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0.
|
68
|
+
version: '0.2'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: multi_json
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
73
|
- - ~>
|
84
74
|
- !ruby/object:Gem::Version
|
85
|
-
version: 1.
|
75
|
+
version: '1.7'
|
86
76
|
type: :runtime
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
80
|
- - ~>
|
92
81
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.
|
94
|
-
description:
|
82
|
+
version: '1.7'
|
83
|
+
description: 'A framework and DSL to construct Ruby clients to RESTful web services. '
|
95
84
|
email: mark@markwunsch.com
|
96
85
|
executables: []
|
97
86
|
extensions: []
|
@@ -101,7 +90,6 @@ files:
|
|
101
90
|
- .rspec
|
102
91
|
- .travis.yml
|
103
92
|
- Gemfile
|
104
|
-
- Gemfile.lock
|
105
93
|
- LICENSE
|
106
94
|
- README.md
|
107
95
|
- Rakefile
|
@@ -150,33 +138,26 @@ files:
|
|
150
138
|
- weary.gemspec
|
151
139
|
homepage: http://github.com/mwunsch/weary
|
152
140
|
licenses: []
|
141
|
+
metadata: {}
|
153
142
|
post_install_message:
|
154
143
|
rdoc_options: []
|
155
144
|
require_paths:
|
156
145
|
- lib
|
157
146
|
required_ruby_version: !ruby/object:Gem::Requirement
|
158
|
-
none: false
|
159
147
|
requirements:
|
160
|
-
- -
|
148
|
+
- - '>='
|
161
149
|
- !ruby/object:Gem::Version
|
162
150
|
version: '0'
|
163
|
-
segments:
|
164
|
-
- 0
|
165
|
-
hash: -3343377036380223329
|
166
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
152
|
requirements:
|
169
|
-
- -
|
153
|
+
- - '>='
|
170
154
|
- !ruby/object:Gem::Version
|
171
155
|
version: '0'
|
172
|
-
segments:
|
173
|
-
- 0
|
174
|
-
hash: -3343377036380223329
|
175
156
|
requirements: []
|
176
157
|
rubyforge_project: weary
|
177
|
-
rubygems_version:
|
158
|
+
rubygems_version: 2.0.0
|
178
159
|
signing_key:
|
179
|
-
specification_version:
|
160
|
+
specification_version: 4
|
180
161
|
summary: A framework and DSL for the consumption of RESTful web services.
|
181
162
|
test_files:
|
182
163
|
- spec/spec_helper.rb
|
data/Gemfile.lock
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
weary (1.1.2)
|
5
|
-
addressable (~> 2.3.2)
|
6
|
-
multi_json (~> 1.3.0)
|
7
|
-
promise (~> 0.3.0)
|
8
|
-
rack (~> 1.4.0)
|
9
|
-
simple_oauth (~> 0.1.5)
|
10
|
-
|
11
|
-
GEM
|
12
|
-
remote: http://rubygems.org/
|
13
|
-
specs:
|
14
|
-
addressable (2.3.2)
|
15
|
-
courtier (0.2.0)
|
16
|
-
finder
|
17
|
-
loaded
|
18
|
-
crack (0.3.1)
|
19
|
-
diff-lcs (1.1.3)
|
20
|
-
excon (0.16.2)
|
21
|
-
ffi (1.1.5)
|
22
|
-
finder (0.3.0)
|
23
|
-
loaded (0.0.1)
|
24
|
-
mime-types (1.19)
|
25
|
-
multi_json (1.3.6)
|
26
|
-
promise (0.3.0)
|
27
|
-
rack (1.4.1)
|
28
|
-
rake (0.9.2.2)
|
29
|
-
rc (0.2.0)
|
30
|
-
courtier (= 0.2.0)
|
31
|
-
rspec (2.11.0)
|
32
|
-
rspec-core (~> 2.11.0)
|
33
|
-
rspec-expectations (~> 2.11.0)
|
34
|
-
rspec-mocks (~> 2.11.0)
|
35
|
-
rspec-core (2.11.1)
|
36
|
-
rspec-expectations (2.11.3)
|
37
|
-
diff-lcs (~> 1.1.3)
|
38
|
-
rspec-mocks (2.11.2)
|
39
|
-
simple_oauth (0.1.9)
|
40
|
-
tomparse (0.2.1)
|
41
|
-
typhoeus (0.4.2)
|
42
|
-
ffi (~> 1.0)
|
43
|
-
mime-types (~> 1.18)
|
44
|
-
webmock (1.8.10)
|
45
|
-
addressable (>= 2.2.7)
|
46
|
-
crack (>= 0.1.7)
|
47
|
-
yard (0.8.2.1)
|
48
|
-
yard-tomdoc (0.5.0)
|
49
|
-
rc
|
50
|
-
tomparse
|
51
|
-
yard
|
52
|
-
|
53
|
-
PLATFORMS
|
54
|
-
ruby
|
55
|
-
|
56
|
-
DEPENDENCIES
|
57
|
-
excon
|
58
|
-
jruby-openssl
|
59
|
-
rake (~> 0.9.2)
|
60
|
-
rspec (~> 2.11.0)
|
61
|
-
typhoeus
|
62
|
-
weary!
|
63
|
-
webmock (~> 1.8.10)
|
64
|
-
yard (~> 0.8.2)
|
65
|
-
yard-tomdoc (~> 0.5.0)
|