apitizer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.rspec +2 -0
- data/CHANGELOG.md +1 -0
- data/Gemfile +3 -0
- data/Guardfile +7 -0
- data/LICENSE.txt +22 -0
- data/README.md +91 -0
- data/Rakefile +7 -0
- data/apitizer.gemspec +32 -0
- data/lib/apitizer.rb +14 -0
- data/lib/apitizer/base.rb +61 -0
- data/lib/apitizer/connection.rb +10 -0
- data/lib/apitizer/connection/adaptor.rb +13 -0
- data/lib/apitizer/connection/adaptor/standard.rb +34 -0
- data/lib/apitizer/connection/dispatcher.rb +24 -0
- data/lib/apitizer/connection/request.rb +16 -0
- data/lib/apitizer/connection/response.rb +12 -0
- data/lib/apitizer/core.rb +24 -0
- data/lib/apitizer/helper.rb +46 -0
- data/lib/apitizer/processing.rb +8 -0
- data/lib/apitizer/processing/parser.rb +14 -0
- data/lib/apitizer/processing/parser/json.rb +15 -0
- data/lib/apitizer/processing/parser/yaml.rb +15 -0
- data/lib/apitizer/processing/translator.rb +13 -0
- data/lib/apitizer/result.rb +15 -0
- data/lib/apitizer/routing.rb +10 -0
- data/lib/apitizer/routing/mapper.rb +47 -0
- data/lib/apitizer/routing/node.rb +5 -0
- data/lib/apitizer/routing/node/base.rb +44 -0
- data/lib/apitizer/routing/node/collection.rb +34 -0
- data/lib/apitizer/routing/node/operation.rb +32 -0
- data/lib/apitizer/routing/node/root.rb +15 -0
- data/lib/apitizer/routing/node/scope.rb +19 -0
- data/lib/apitizer/routing/path.rb +26 -0
- data/lib/apitizer/routing/proxy.rb +17 -0
- data/lib/apitizer/version.rb +3 -0
- data/spec/apitizer/base_spec.rb +71 -0
- data/spec/apitizer/connection/adaptor_spec.rb +24 -0
- data/spec/apitizer/connection/dispatcher_spec.rb +39 -0
- data/spec/apitizer/helper_spec.rb +87 -0
- data/spec/apitizer/processing/parser_spec.rb +23 -0
- data/spec/apitizer/result_spec.rb +19 -0
- data/spec/apitizer/routing/mapper_spec.rb +80 -0
- data/spec/apitizer/routing/node_spec.rb +63 -0
- data/spec/apitizer/routing/path_spec.rb +102 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/support/factory_helper.rb +23 -0
- data/spec/support/resource_helper.rb +18 -0
- metadata +203 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
module ResourceHelper
|
2
|
+
def restful_actions
|
3
|
+
[ :index, :show, :create, :update, :delete ]
|
4
|
+
end
|
5
|
+
|
6
|
+
def restful_collection_actions
|
7
|
+
[ :index, :create ]
|
8
|
+
end
|
9
|
+
|
10
|
+
def restful_member_actions
|
11
|
+
[ :show, :update, :delete ]
|
12
|
+
end
|
13
|
+
|
14
|
+
def rest_http_dictionary
|
15
|
+
{ :index => :get, :show => :get, :create => :post,
|
16
|
+
:update => :put, :delete => :delete }
|
17
|
+
end
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: apitizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ivan Ukhov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rack
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '2.14'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '2.14'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '4.2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '4.2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: webmock
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.18'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.18'
|
111
|
+
description: A Ruby library that provides a flexible engine for developing RESTful
|
112
|
+
API clients.
|
113
|
+
email:
|
114
|
+
- ivan.ukhov@gmail.com
|
115
|
+
executables: []
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- CHANGELOG.md
|
122
|
+
- Gemfile
|
123
|
+
- Guardfile
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- apitizer.gemspec
|
128
|
+
- lib/apitizer.rb
|
129
|
+
- lib/apitizer/base.rb
|
130
|
+
- lib/apitizer/connection.rb
|
131
|
+
- lib/apitizer/connection/adaptor.rb
|
132
|
+
- lib/apitizer/connection/adaptor/standard.rb
|
133
|
+
- lib/apitizer/connection/dispatcher.rb
|
134
|
+
- lib/apitizer/connection/request.rb
|
135
|
+
- lib/apitizer/connection/response.rb
|
136
|
+
- lib/apitizer/core.rb
|
137
|
+
- lib/apitizer/helper.rb
|
138
|
+
- lib/apitizer/processing.rb
|
139
|
+
- lib/apitizer/processing/parser.rb
|
140
|
+
- lib/apitizer/processing/parser/json.rb
|
141
|
+
- lib/apitizer/processing/parser/yaml.rb
|
142
|
+
- lib/apitizer/processing/translator.rb
|
143
|
+
- lib/apitizer/result.rb
|
144
|
+
- lib/apitizer/routing.rb
|
145
|
+
- lib/apitizer/routing/mapper.rb
|
146
|
+
- lib/apitizer/routing/node.rb
|
147
|
+
- lib/apitizer/routing/node/base.rb
|
148
|
+
- lib/apitizer/routing/node/collection.rb
|
149
|
+
- lib/apitizer/routing/node/operation.rb
|
150
|
+
- lib/apitizer/routing/node/root.rb
|
151
|
+
- lib/apitizer/routing/node/scope.rb
|
152
|
+
- lib/apitizer/routing/path.rb
|
153
|
+
- lib/apitizer/routing/proxy.rb
|
154
|
+
- lib/apitizer/version.rb
|
155
|
+
- spec/apitizer/base_spec.rb
|
156
|
+
- spec/apitizer/connection/adaptor_spec.rb
|
157
|
+
- spec/apitizer/connection/dispatcher_spec.rb
|
158
|
+
- spec/apitizer/helper_spec.rb
|
159
|
+
- spec/apitizer/processing/parser_spec.rb
|
160
|
+
- spec/apitizer/result_spec.rb
|
161
|
+
- spec/apitizer/routing/mapper_spec.rb
|
162
|
+
- spec/apitizer/routing/node_spec.rb
|
163
|
+
- spec/apitizer/routing/path_spec.rb
|
164
|
+
- spec/spec_helper.rb
|
165
|
+
- spec/support/factory_helper.rb
|
166
|
+
- spec/support/resource_helper.rb
|
167
|
+
homepage: https://github.com/IvanUkhov/apitizer
|
168
|
+
licenses:
|
169
|
+
- MIT
|
170
|
+
metadata: {}
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '2.1'
|
180
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
|
+
requirements:
|
182
|
+
- - ">="
|
183
|
+
- !ruby/object:Gem::Version
|
184
|
+
version: '0'
|
185
|
+
requirements: []
|
186
|
+
rubyforge_project:
|
187
|
+
rubygems_version: 2.2.2
|
188
|
+
signing_key:
|
189
|
+
specification_version: 4
|
190
|
+
summary: The main ingredient of a RESTful API client
|
191
|
+
test_files:
|
192
|
+
- spec/apitizer/base_spec.rb
|
193
|
+
- spec/apitizer/connection/adaptor_spec.rb
|
194
|
+
- spec/apitizer/connection/dispatcher_spec.rb
|
195
|
+
- spec/apitizer/helper_spec.rb
|
196
|
+
- spec/apitizer/processing/parser_spec.rb
|
197
|
+
- spec/apitizer/result_spec.rb
|
198
|
+
- spec/apitizer/routing/mapper_spec.rb
|
199
|
+
- spec/apitizer/routing/node_spec.rb
|
200
|
+
- spec/apitizer/routing/path_spec.rb
|
201
|
+
- spec/spec_helper.rb
|
202
|
+
- spec/support/factory_helper.rb
|
203
|
+
- spec/support/resource_helper.rb
|