shogun 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/bin/shogun +18 -0
  3. data/lib/shogun.rb +29 -0
  4. data/lib/shogun/authorizer.rb +7 -0
  5. data/lib/shogun/control.rb +82 -0
  6. data/lib/shogun/control/null.rb +15 -0
  7. data/lib/shogun/database.rb +44 -0
  8. data/lib/shogun/denormalizer.rb +54 -0
  9. data/lib/shogun/dispatch.rb +67 -0
  10. data/lib/shogun/dispatch/lookup.rb +57 -0
  11. data/lib/shogun/dispatch/payload.rb +18 -0
  12. data/lib/shogun/dispatch/route.rb +34 -0
  13. data/lib/shogun/dispatch/route/null.rb +11 -0
  14. data/lib/shogun/endpoint.rb +11 -0
  15. data/lib/shogun/normalizer.rb +31 -0
  16. data/lib/shogun/presenter.rb +57 -0
  17. data/lib/shogun/presenters.rb +28 -0
  18. data/lib/shogun/server.rb +49 -0
  19. data/lib/shogun/validator.rb +15 -0
  20. data/lib/shogun/verifier.rb +9 -0
  21. data/lib/shogun/verifier/allowed.rb +29 -0
  22. data/lib/shogun/verifier/match.rb +31 -0
  23. data/lib/shogun/verifier/presence.rb +26 -0
  24. data/lib/shogun/verifier/range.rb +30 -0
  25. data/lib/shogun/verifier/uniqueness.rb +23 -0
  26. data/lib/shogun/version.rb +3 -0
  27. data/spec/lib/shogun/authorizer_spec.rb +5 -0
  28. data/spec/lib/shogun/control/null_spec.rb +5 -0
  29. data/spec/lib/shogun/control_spec.rb +5 -0
  30. data/spec/lib/shogun/database_spec.rb +5 -0
  31. data/spec/lib/shogun/denormalizer_spec.rb +5 -0
  32. data/spec/lib/shogun/dispatch/lookup_spec.rb +5 -0
  33. data/spec/lib/shogun/dispatch/payload_spec.rb +5 -0
  34. data/spec/lib/shogun/dispatch/route/null_spec.rb +5 -0
  35. data/spec/lib/shogun/dispatch/route_spec.rb +5 -0
  36. data/spec/lib/shogun/dispatch_spec.rb +5 -0
  37. data/spec/lib/shogun/endpoint_spec.rb +5 -0
  38. data/spec/lib/shogun/normalizer_spec.rb +5 -0
  39. data/spec/lib/shogun/presenter_spec.rb +5 -0
  40. data/spec/lib/shogun/presenters_spec.rb +5 -0
  41. data/spec/lib/shogun/server_spec.rb +5 -0
  42. data/spec/lib/shogun/validator_spec.rb +5 -0
  43. data/spec/lib/shogun/verifier/allowed_spec.rb +5 -0
  44. data/spec/lib/shogun/verifier/match_spec.rb +5 -0
  45. data/spec/lib/shogun/verifier/presence_spec.rb +5 -0
  46. data/spec/lib/shogun/verifier/range_spec.rb +5 -0
  47. data/spec/lib/shogun/verifier/uniqueness_spec.rb +5 -0
  48. data/spec/lib/shogun/verifier_spec.rb +5 -0
  49. data/spec/lib/shogun_spec.rb +5 -0
  50. data/spec/spec_helper.rb +6 -0
  51. metadata +385 -0
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Normalizer do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Presenter do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Presenters do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Server do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Validator do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier::Allowed do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier::Match do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier::Presence do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier::Range do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier::Uniqueness do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun::Verifier do
4
+
5
+ end
@@ -0,0 +1,5 @@
1
+ require "spec_helper"
2
+
3
+ describe Shogun do
4
+
5
+ end
@@ -0,0 +1,6 @@
1
+ require "codeclimate-test-reporter"
2
+ CodeClimate::TestReporter.start
3
+
4
+ require "pry"
5
+ require "rspec"
6
+ require "shogun"
metadata ADDED
@@ -0,0 +1,385 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shogun
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Kurtis Rainbolt-Greene
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: adamantium
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '0.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '0.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rack-protection
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.5'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack-commonlogger
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rack-body_serializer
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.0.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.0.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rack-body_deserializer
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 1.0.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 1.0.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rack-authentication_bearer
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 1.0.0
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 1.0.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rack-accept_setter
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: 1.0.0
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: 1.0.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack-chunker
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 1.0.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 1.0.0
125
+ - !ruby/object:Gem::Dependency
126
+ name: rack-content_length_setter
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 1.0.0
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 1.0.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: rack-runtime
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.0.0
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.0.0
153
+ - !ruby/object:Gem::Dependency
154
+ name: rack-log
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.0.0
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 1.0.0
167
+ - !ruby/object:Gem::Dependency
168
+ name: scrawl
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.0'
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: rake
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - "~>"
186
+ - !ruby/object:Gem::Version
187
+ version: '10.1'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - "~>"
193
+ - !ruby/object:Gem::Version
194
+ version: '10.1'
195
+ - !ruby/object:Gem::Dependency
196
+ name: activerecord
197
+ requirement: !ruby/object:Gem::Requirement
198
+ requirements:
199
+ - - "~>"
200
+ - !ruby/object:Gem::Version
201
+ version: '4.1'
202
+ type: :runtime
203
+ prerelease: false
204
+ version_requirements: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - "~>"
207
+ - !ruby/object:Gem::Version
208
+ version: '4.1'
209
+ - !ruby/object:Gem::Dependency
210
+ name: bundler
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '1.3'
216
+ type: :development
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '1.3'
223
+ - !ruby/object:Gem::Dependency
224
+ name: rspec
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '3.0'
230
+ type: :development
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '3.0'
237
+ - !ruby/object:Gem::Dependency
238
+ name: pry
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '0.9'
244
+ type: :development
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '0.9'
251
+ - !ruby/object:Gem::Dependency
252
+ name: pry-doc
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '0.6'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '0.6'
265
+ - !ruby/object:Gem::Dependency
266
+ name: codeclimate-test-reporter
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: '0.4'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '0.4'
279
+ description: A core library for an HTTP API
280
+ email:
281
+ - me@kurtisrainboltgreene.name
282
+ executables:
283
+ - shogun
284
+ extensions: []
285
+ extra_rdoc_files: []
286
+ files:
287
+ - bin/shogun
288
+ - lib/shogun.rb
289
+ - lib/shogun/authorizer.rb
290
+ - lib/shogun/control.rb
291
+ - lib/shogun/control/null.rb
292
+ - lib/shogun/database.rb
293
+ - lib/shogun/denormalizer.rb
294
+ - lib/shogun/dispatch.rb
295
+ - lib/shogun/dispatch/lookup.rb
296
+ - lib/shogun/dispatch/payload.rb
297
+ - lib/shogun/dispatch/route.rb
298
+ - lib/shogun/dispatch/route/null.rb
299
+ - lib/shogun/endpoint.rb
300
+ - lib/shogun/normalizer.rb
301
+ - lib/shogun/presenter.rb
302
+ - lib/shogun/presenters.rb
303
+ - lib/shogun/server.rb
304
+ - lib/shogun/validator.rb
305
+ - lib/shogun/verifier.rb
306
+ - lib/shogun/verifier/allowed.rb
307
+ - lib/shogun/verifier/match.rb
308
+ - lib/shogun/verifier/presence.rb
309
+ - lib/shogun/verifier/range.rb
310
+ - lib/shogun/verifier/uniqueness.rb
311
+ - lib/shogun/version.rb
312
+ - spec/lib/shogun/authorizer_spec.rb
313
+ - spec/lib/shogun/control/null_spec.rb
314
+ - spec/lib/shogun/control_spec.rb
315
+ - spec/lib/shogun/database_spec.rb
316
+ - spec/lib/shogun/denormalizer_spec.rb
317
+ - spec/lib/shogun/dispatch/lookup_spec.rb
318
+ - spec/lib/shogun/dispatch/payload_spec.rb
319
+ - spec/lib/shogun/dispatch/route/null_spec.rb
320
+ - spec/lib/shogun/dispatch/route_spec.rb
321
+ - spec/lib/shogun/dispatch_spec.rb
322
+ - spec/lib/shogun/endpoint_spec.rb
323
+ - spec/lib/shogun/normalizer_spec.rb
324
+ - spec/lib/shogun/presenter_spec.rb
325
+ - spec/lib/shogun/presenters_spec.rb
326
+ - spec/lib/shogun/server_spec.rb
327
+ - spec/lib/shogun/validator_spec.rb
328
+ - spec/lib/shogun/verifier/allowed_spec.rb
329
+ - spec/lib/shogun/verifier/match_spec.rb
330
+ - spec/lib/shogun/verifier/presence_spec.rb
331
+ - spec/lib/shogun/verifier/range_spec.rb
332
+ - spec/lib/shogun/verifier/uniqueness_spec.rb
333
+ - spec/lib/shogun/verifier_spec.rb
334
+ - spec/lib/shogun_spec.rb
335
+ - spec/spec_helper.rb
336
+ homepage: http://krainboltgreene.github.io/shogun
337
+ licenses:
338
+ - MIT
339
+ metadata: {}
340
+ post_install_message:
341
+ rdoc_options: []
342
+ require_paths:
343
+ - lib
344
+ required_ruby_version: !ruby/object:Gem::Requirement
345
+ requirements:
346
+ - - ">="
347
+ - !ruby/object:Gem::Version
348
+ version: '0'
349
+ required_rubygems_version: !ruby/object:Gem::Requirement
350
+ requirements:
351
+ - - ">="
352
+ - !ruby/object:Gem::Version
353
+ version: '0'
354
+ requirements: []
355
+ rubyforge_project:
356
+ rubygems_version: 2.4.2
357
+ signing_key:
358
+ specification_version: 4
359
+ summary: A core library for an HTTP API
360
+ test_files:
361
+ - spec/lib/shogun/authorizer_spec.rb
362
+ - spec/lib/shogun/control/null_spec.rb
363
+ - spec/lib/shogun/control_spec.rb
364
+ - spec/lib/shogun/database_spec.rb
365
+ - spec/lib/shogun/denormalizer_spec.rb
366
+ - spec/lib/shogun/dispatch/lookup_spec.rb
367
+ - spec/lib/shogun/dispatch/payload_spec.rb
368
+ - spec/lib/shogun/dispatch/route/null_spec.rb
369
+ - spec/lib/shogun/dispatch/route_spec.rb
370
+ - spec/lib/shogun/dispatch_spec.rb
371
+ - spec/lib/shogun/endpoint_spec.rb
372
+ - spec/lib/shogun/normalizer_spec.rb
373
+ - spec/lib/shogun/presenter_spec.rb
374
+ - spec/lib/shogun/presenters_spec.rb
375
+ - spec/lib/shogun/server_spec.rb
376
+ - spec/lib/shogun/validator_spec.rb
377
+ - spec/lib/shogun/verifier/allowed_spec.rb
378
+ - spec/lib/shogun/verifier/match_spec.rb
379
+ - spec/lib/shogun/verifier/presence_spec.rb
380
+ - spec/lib/shogun/verifier/range_spec.rb
381
+ - spec/lib/shogun/verifier/uniqueness_spec.rb
382
+ - spec/lib/shogun/verifier_spec.rb
383
+ - spec/lib/shogun_spec.rb
384
+ - spec/spec_helper.rb
385
+ has_rdoc: