rapidash 0.3.0 → 0.3.1

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
- ---
2
- SHA1:
3
- metadata.gz: 7f5e8e318d7e78e310f4e8d6e1aa5df9541c0bab
4
- data.tar.gz: d60a8d1e46879c53a71937bf5cb8357d0b1f3813
5
- SHA512:
6
- metadata.gz: c23f539bfa09b478c08d4e71eeef3b47373d8398ff3fc4ac356e024d0c0eae72393cdc5c1603ff8c1b26f8222494e6227458d168046aea15afe1146b15c46d78
7
- data.tar.gz: 74f4aca9d1d5d5991b72dba679df96003c8e63e47013505e4132cc924b3b8497f450262eab789e67d183a50a0b66733991d1bf1c683e3f4995f34b106303ce4a
1
+ ---
2
+ SHA512:
3
+ data.tar.gz: b62fefb161e5c2171a36bdac90549d2cf41c33cb19b0d76f2738876a27370a91ee9fc5fd76d3df47c18b0c92cb1ccfa8bc3fc3813df78dbbb0a347ed8c784fe5
4
+ metadata.gz: 0f553c52c3d89edc685e192726661b10116898ae01b2735172116f8e4144a2d35c8c501eb68af322da925abf10f8578b61aa205e9b9b61c7fba9582f21bc3872
5
+ SHA1:
6
+ data.tar.gz: ec0208f74c6ac0a9d02691baf5727dc1d4d2330d
7
+ metadata.gz: a6adad2e79593a67d205b702b2e05e489a37d9cc
@@ -6,5 +6,3 @@ rvm:
6
6
  - 2.0.0
7
7
  - jruby-18mode
8
8
  - jruby-19mode
9
- - rbx-18mode
10
- - rbx-19mode
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- # Rapidash [![Build Status](https://travis-ci.org/Gazler/rapidash.png?branch=master)](https://travis-ci.org/Gazler/rapidash)
2
-
3
- ![Rapidash](http://rapidashgem.com/images/rapidash.png)
1
+ # Rapidash [![Build Status](https://travis-ci.org/Gazler/rapidash.png?branch=master)](https://travis-ci.org/Gazler/rapidash) [![Coverage Status](https://coveralls.io/repos/Gazler/rapidash/badge.png?branch=master)](https://coveralls.io/r/Gazler/rapidash?branch=master)
4
2
 
5
3
  Rapidash is a core for you to build a client for your API on. The goal is to define a standard way that developers can quickly write a client for the consumption of their RESTful API.
6
4
 
@@ -93,6 +91,29 @@ class AnotherResource < Rapidash::Base
93
91
  end
94
92
  ```
95
93
 
94
+
95
+ ### Collections
96
+
97
+ The collection method allows you to add methods to a resource.
98
+
99
+ ```ruby
100
+ class Project < Rapidash::Base
101
+ collection :archived
102
+ end
103
+
104
+ # creates the method below which performs a
105
+ # GET /projects/archived
106
+ client.projects.archived!
107
+
108
+ class Project < Rapidash::Base
109
+ collection :delete_all, path: 'destroy', method: :post
110
+ end
111
+
112
+ # creates the method below which performs a
113
+ # POST /projects/destroy
114
+ client.projects.delete_all!
115
+ ```
116
+
96
117
  ### Client
97
118
 
98
119
  The main thing a client must do is define a method, `oauth` and `http` are currently supported. You can also define resources which links a resource as defined above to the client.
@@ -157,6 +178,7 @@ p client.me!.first_name #Gary
157
178
  require 'rapidash'
158
179
 
159
180
  class Repo < Rapidash::Base
181
+ end
160
182
 
161
183
  class User < Rapidash::Base
162
184
  resource :repos
@@ -197,7 +219,3 @@ client = Client.new({
197
219
  4. Write your tests, start and check coverage: open file coverage/index.html in your browser. Must be 100.0% covered
198
220
  5. Push to the branch (`git push origin my-new-feature`)
199
221
  6. Create new Pull Request (into the development branch)
200
-
201
- ## Credits
202
-
203
- Thanks to [@Sid3show](https://github.com/Sid3show) for the sweet logo!
@@ -1,3 +1,3 @@
1
1
  module Rapidash
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -18,20 +18,22 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
+ if RUBY_VERSION < "1.9.3"
22
+ spec.add_dependency "activesupport", "~> 3.0"
23
+ spec.add_dependency "mime-types", "~> 1.25.0"
24
+ else
25
+ spec.add_dependency "activesupport", ">= 3.0.0"
26
+ end
21
27
  spec.add_development_dependency "bundler", "~> 1.0"
22
28
  spec.add_development_dependency "rake"
23
29
  spec.add_development_dependency "rspec", "~> 2.8"
24
30
  spec.add_development_dependency "simplecov", "~> 0.7"
25
31
  spec.add_development_dependency "json"
32
+ spec.add_development_dependency "coveralls"
26
33
 
27
34
  spec.add_dependency "faraday", "~> 0.8"
28
35
  spec.add_dependency "faraday_middleware", "~> 0.9"
29
36
  spec.add_dependency "faraday_middleware-multi_json", "~> 0.0"
30
37
  spec.add_dependency "oauth2", "~>0.6"
31
38
  spec.add_dependency "hashie", "~>1.2"
32
- if RUBY_VERSION < "1.9.3"
33
- spec.add_dependency "activesupport", "~> 3.0"
34
- else
35
- spec.add_dependency "activesupport", ">= 3.0.0"
36
- end
37
39
  end
@@ -1,3 +1,6 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+
1
4
  require "simplecov"
2
5
  SimpleCov.start
3
6
 
metadata CHANGED
@@ -1,176 +1,153 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rapidash
3
- version: !ruby/object:Gem::Version
4
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Gary 'Gazler' Rennie
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-15 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
11
+
12
+ date: 2014-05-30 00:00:00 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: activesupport
16
+ prerelease: false
17
+ requirement: &id001 !ruby/object:Gem::Requirement
18
+ requirements:
17
19
  - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :development
20
+ - !ruby/object:Gem::Version
21
+ version: "3.0"
22
+ type: :runtime
23
+ version_requirements: *id001
24
+ - !ruby/object:Gem::Dependency
25
+ name: mime-types
21
26
  prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
27
+ requirement: &id002 !ruby/object:Gem::Requirement
28
+ requirements:
24
29
  - - ~>
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '>='
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
30
+ - !ruby/object:Gem::Version
31
+ version: 1.25.0
32
+ type: :runtime
33
+ version_requirements: *id002
34
+ - !ruby/object:Gem::Dependency
35
+ name: bundler
35
36
  prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '>='
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
37
+ requirement: &id003 !ruby/object:Gem::Requirement
38
+ requirements:
45
39
  - - ~>
46
- - !ruby/object:Gem::Version
47
- version: '2.8'
40
+ - !ruby/object:Gem::Version
41
+ version: "1.0"
48
42
  type: :development
43
+ version_requirements: *id003
44
+ - !ruby/object:Gem::Dependency
45
+ name: rake
49
46
  prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '2.8'
55
- - !ruby/object:Gem::Dependency
56
- name: simplecov
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
47
+ requirement: &id004 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - &id007
50
+ - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ type: :development
54
+ version_requirements: *id004
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ prerelease: false
58
+ requirement: &id005 !ruby/object:Gem::Requirement
59
+ requirements:
59
60
  - - ~>
60
- - !ruby/object:Gem::Version
61
- version: '0.7'
61
+ - !ruby/object:Gem::Version
62
+ version: "2.8"
62
63
  type: :development
64
+ version_requirements: *id005
65
+ - !ruby/object:Gem::Dependency
66
+ name: simplecov
63
67
  prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
68
+ requirement: &id006 !ruby/object:Gem::Requirement
69
+ requirements:
66
70
  - - ~>
67
- - !ruby/object:Gem::Version
68
- version: '0.7'
69
- - !ruby/object:Gem::Dependency
71
+ - !ruby/object:Gem::Version
72
+ version: "0.7"
73
+ type: :development
74
+ version_requirements: *id006
75
+ - !ruby/object:Gem::Dependency
70
76
  name: json
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - '>='
74
- - !ruby/object:Gem::Version
75
- version: '0'
77
+ prerelease: false
78
+ requirement: &id008 !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - *id007
76
81
  type: :development
82
+ version_requirements: *id008
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
77
85
  prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
86
+ requirement: &id009 !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - *id007
89
+ type: :development
90
+ version_requirements: *id009
91
+ - !ruby/object:Gem::Dependency
84
92
  name: faraday
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: '0.8'
90
- type: :runtime
91
93
  prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
+ requirement: &id010 !ruby/object:Gem::Requirement
95
+ requirements:
94
96
  - - ~>
95
- - !ruby/object:Gem::Version
96
- version: '0.8'
97
- - !ruby/object:Gem::Dependency
98
- name: faraday_middleware
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ~>
102
- - !ruby/object:Gem::Version
103
- version: '0.9'
97
+ - !ruby/object:Gem::Version
98
+ version: "0.8"
104
99
  type: :runtime
100
+ version_requirements: *id010
101
+ - !ruby/object:Gem::Dependency
102
+ name: faraday_middleware
105
103
  prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ~>
109
- - !ruby/object:Gem::Version
110
- version: '0.9'
111
- - !ruby/object:Gem::Dependency
112
- name: faraday_middleware-multi_json
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
104
+ requirement: &id011 !ruby/object:Gem::Requirement
105
+ requirements:
115
106
  - - ~>
116
- - !ruby/object:Gem::Version
117
- version: '0.0'
107
+ - !ruby/object:Gem::Version
108
+ version: "0.9"
118
109
  type: :runtime
110
+ version_requirements: *id011
111
+ - !ruby/object:Gem::Dependency
112
+ name: faraday_middleware-multi_json
119
113
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ~>
123
- - !ruby/object:Gem::Version
124
- version: '0.0'
125
- - !ruby/object:Gem::Dependency
126
- name: oauth2
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
114
+ requirement: &id012 !ruby/object:Gem::Requirement
115
+ requirements:
129
116
  - - ~>
130
- - !ruby/object:Gem::Version
131
- version: '0.6'
117
+ - !ruby/object:Gem::Version
118
+ version: "0.0"
132
119
  type: :runtime
120
+ version_requirements: *id012
121
+ - !ruby/object:Gem::Dependency
122
+ name: oauth2
133
123
  prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
124
+ requirement: &id013 !ruby/object:Gem::Requirement
125
+ requirements:
136
126
  - - ~>
137
- - !ruby/object:Gem::Version
138
- version: '0.6'
139
- - !ruby/object:Gem::Dependency
140
- name: hashie
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ~>
144
- - !ruby/object:Gem::Version
145
- version: '1.2'
127
+ - !ruby/object:Gem::Version
128
+ version: "0.6"
146
129
  type: :runtime
130
+ version_requirements: *id013
131
+ - !ruby/object:Gem::Dependency
132
+ name: hashie
147
133
  prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
134
+ requirement: &id014 !ruby/object:Gem::Requirement
135
+ requirements:
150
136
  - - ~>
151
- - !ruby/object:Gem::Version
152
- version: '1.2'
153
- - !ruby/object:Gem::Dependency
154
- name: activesupport
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - '>='
158
- - !ruby/object:Gem::Version
159
- version: 3.0.0
137
+ - !ruby/object:Gem::Version
138
+ version: "1.2"
160
139
  type: :runtime
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - '>='
165
- - !ruby/object:Gem::Version
166
- version: 3.0.0
140
+ version_requirements: *id014
167
141
  description: Evolve your API
168
- email:
142
+ email:
169
143
  - gazler@gmail.com
170
144
  executables: []
145
+
171
146
  extensions: []
147
+
172
148
  extra_rdoc_files: []
173
- files:
149
+
150
+ files:
174
151
  - .gitignore
175
152
  - .rspec
176
153
  - .travis.yml
@@ -204,30 +181,29 @@ files:
204
181
  - spec/rapidash/urlable_spec.rb
205
182
  - spec/spec_helper.rb
206
183
  homepage: http://github.com/Gazler/rapidash
207
- licenses:
184
+ licenses:
208
185
  - MIT
209
186
  metadata: {}
187
+
210
188
  post_install_message:
211
189
  rdoc_options: []
212
- require_paths:
190
+
191
+ require_paths:
213
192
  - lib
214
- required_ruby_version: !ruby/object:Gem::Requirement
215
- requirements:
216
- - - '>='
217
- - !ruby/object:Gem::Version
218
- version: '0'
219
- required_rubygems_version: !ruby/object:Gem::Requirement
220
- requirements:
221
- - - '>='
222
- - !ruby/object:Gem::Version
223
- version: '0'
193
+ required_ruby_version: !ruby/object:Gem::Requirement
194
+ requirements:
195
+ - *id007
196
+ required_rubygems_version: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - *id007
224
199
  requirements: []
200
+
225
201
  rubyforge_project:
226
- rubygems_version: 2.0.0
202
+ rubygems_version: 2.1.11
227
203
  signing_key:
228
204
  specification_version: 4
229
205
  summary: An opinionated core for creating clients for RESTful APIs quickly
230
- test_files:
206
+ test_files:
231
207
  - spec/faraday/raise_rapidash_error_spec.rb
232
208
  - spec/rapidash/base_spec.rb
233
209
  - spec/rapidash/client_spec.rb