morpheus 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. data/.rvmrc +1 -0
  2. data/Gemfile +21 -0
  3. data/Gemfile.lock +134 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.rdoc +44 -0
  6. data/Rakefile +48 -0
  7. data/VERSION +1 -0
  8. data/autotest/discover.rb +7 -0
  9. data/lib/ext/typhoeus.rb +37 -0
  10. data/lib/morpheus/associations/association.rb +110 -0
  11. data/lib/morpheus/associations/belongs_to_association.rb +45 -0
  12. data/lib/morpheus/associations/has_many_association.rb +70 -0
  13. data/lib/morpheus/associations/has_one_association.rb +46 -0
  14. data/lib/morpheus/base.rb +66 -0
  15. data/lib/morpheus/client/associations.rb +47 -0
  16. data/lib/morpheus/client/inflections.rb +3 -0
  17. data/lib/morpheus/client/log_subscriber.rb +64 -0
  18. data/lib/morpheus/client/railtie.rb +25 -0
  19. data/lib/morpheus/configuration.rb +49 -0
  20. data/lib/morpheus/errors.rb +32 -0
  21. data/lib/morpheus/filter.rb +18 -0
  22. data/lib/morpheus/mixins/associations.rb +55 -0
  23. data/lib/morpheus/mixins/attributes.rb +133 -0
  24. data/lib/morpheus/mixins/conversion.rb +21 -0
  25. data/lib/morpheus/mixins/filtering.rb +18 -0
  26. data/lib/morpheus/mixins/finders.rb +58 -0
  27. data/lib/morpheus/mixins/introspection.rb +25 -0
  28. data/lib/morpheus/mixins/persistence.rb +46 -0
  29. data/lib/morpheus/mixins/reflections.rb +24 -0
  30. data/lib/morpheus/mixins/request_handling.rb +34 -0
  31. data/lib/morpheus/mixins/response_parsing.rb +27 -0
  32. data/lib/morpheus/mixins/url_support.rb +36 -0
  33. data/lib/morpheus/mock.rb +66 -0
  34. data/lib/morpheus/reflection.rb +22 -0
  35. data/lib/morpheus/relation.rb +57 -0
  36. data/lib/morpheus/request.rb +41 -0
  37. data/lib/morpheus/request_cache.rb +18 -0
  38. data/lib/morpheus/request_queue.rb +44 -0
  39. data/lib/morpheus/response.rb +24 -0
  40. data/lib/morpheus/response_parser.rb +80 -0
  41. data/lib/morpheus/type_caster.rb +80 -0
  42. data/lib/morpheus/url_builder.rb +52 -0
  43. data/lib/morpheus.rb +64 -0
  44. data/morpheus.gemspec +191 -0
  45. data/spec/dummy/Rakefile +7 -0
  46. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  47. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  48. data/spec/dummy/app/models/purchase.rb +3 -0
  49. data/spec/dummy/app/resources/attendee.rb +2 -0
  50. data/spec/dummy/app/resources/author.rb +5 -0
  51. data/spec/dummy/app/resources/automobile.rb +6 -0
  52. data/spec/dummy/app/resources/book.rb +5 -0
  53. data/spec/dummy/app/resources/conference.rb +3 -0
  54. data/spec/dummy/app/resources/dog.rb +10 -0
  55. data/spec/dummy/app/resources/item.rb +5 -0
  56. data/spec/dummy/app/resources/meeting.rb +7 -0
  57. data/spec/dummy/app/resources/speaker.rb +3 -0
  58. data/spec/dummy/app/resources/state.rb +5 -0
  59. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  60. data/spec/dummy/config/application.rb +45 -0
  61. data/spec/dummy/config/boot.rb +10 -0
  62. data/spec/dummy/config/database.yml +22 -0
  63. data/spec/dummy/config/environment.rb +5 -0
  64. data/spec/dummy/config/environments/development.rb +26 -0
  65. data/spec/dummy/config/environments/production.rb +49 -0
  66. data/spec/dummy/config/environments/test.rb +35 -0
  67. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  68. data/spec/dummy/config/initializers/inflections.rb +10 -0
  69. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  70. data/spec/dummy/config/initializers/morpheus.rb +3 -0
  71. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  72. data/spec/dummy/config/initializers/session_store.rb +8 -0
  73. data/spec/dummy/config/locales/en.yml +5 -0
  74. data/spec/dummy/config/routes.rb +58 -0
  75. data/spec/dummy/config.ru +4 -0
  76. data/spec/dummy/db/migrate/20110605002144_create_purchases.rb +13 -0
  77. data/spec/dummy/db/test.sqlite3 +0 -0
  78. data/spec/dummy/public/404.html +26 -0
  79. data/spec/dummy/public/422.html +26 -0
  80. data/spec/dummy/public/500.html +26 -0
  81. data/spec/dummy/public/favicon.ico +0 -0
  82. data/spec/dummy/public/stylesheets/.gitkeep +0 -0
  83. data/spec/dummy/script/rails +6 -0
  84. data/spec/morpheus/associations/association_spec.rb +44 -0
  85. data/spec/morpheus/associations/belongs_to_association_spec.rb +5 -0
  86. data/spec/morpheus/associations/has_many_association_spec.rb +17 -0
  87. data/spec/morpheus/associations/has_one_association_spec.rb +5 -0
  88. data/spec/morpheus/base_spec.rb +126 -0
  89. data/spec/morpheus/client/associations_spec.rb +44 -0
  90. data/spec/morpheus/configuration_spec.rb +136 -0
  91. data/spec/morpheus/mixins/associations_spec.rb +141 -0
  92. data/spec/morpheus/mixins/attributes_spec.rb +99 -0
  93. data/spec/morpheus/mixins/conversion_spec.rb +76 -0
  94. data/spec/morpheus/mixins/finders_spec.rb +255 -0
  95. data/spec/morpheus/mixins/introspection_spec.rb +154 -0
  96. data/spec/morpheus/mixins/persistence_spec.rb +161 -0
  97. data/spec/morpheus/mixins/reflection_spec.rb +100 -0
  98. data/spec/morpheus/mixins/response_parsing_spec.rb +5 -0
  99. data/spec/morpheus/mock_spec.rb +133 -0
  100. data/spec/morpheus/relation_spec.rb +71 -0
  101. data/spec/morpheus/request_cache_spec.rb +5 -0
  102. data/spec/morpheus/request_spec.rb +5 -0
  103. data/spec/morpheus/response_spec.rb +73 -0
  104. data/spec/morpheus/type_caster_spec.rb +343 -0
  105. data/spec/shared/active_model_lint_test.rb +14 -0
  106. data/spec/spec_helper.rb +32 -0
  107. data/spec/support/configuration.rb +26 -0
  108. metadata +427 -0
metadata ADDED
@@ -0,0 +1,427 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: morpheus
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 3
9
+ - 4
10
+ version: 0.3.4
11
+ platform: ruby
12
+ authors:
13
+ - Ryan Moran
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-12-07 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ none: false
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ hash: 59
27
+ segments:
28
+ - 0
29
+ - 8
30
+ - 2
31
+ version: 0.8.2
32
+ name: yajl-ruby
33
+ prerelease: false
34
+ type: :runtime
35
+ requirement: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ~>
41
+ - !ruby/object:Gem::Version
42
+ hash: 31
43
+ segments:
44
+ - 0
45
+ - 2
46
+ - 4
47
+ version: 0.2.4
48
+ name: typhoeus
49
+ prerelease: false
50
+ type: :runtime
51
+ requirement: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ hash: 7
59
+ segments:
60
+ - 3
61
+ - 0
62
+ - 0
63
+ version: 3.0.0
64
+ name: activemodel
65
+ prerelease: false
66
+ type: :runtime
67
+ requirement: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ version_requirements: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ~>
73
+ - !ruby/object:Gem::Version
74
+ hash: 7
75
+ segments:
76
+ - 3
77
+ - 0
78
+ - 0
79
+ version: 3.0.0
80
+ name: activesupport
81
+ prerelease: false
82
+ type: :runtime
83
+ requirement: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ hash: 11
91
+ segments:
92
+ - 0
93
+ - 5
94
+ - 0
95
+ version: 0.5.0
96
+ name: i18n
97
+ prerelease: false
98
+ type: :runtime
99
+ requirement: *id005
100
+ - !ruby/object:Gem::Dependency
101
+ version_requirements: &id006 !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - "="
105
+ - !ruby/object:Gem::Version
106
+ hash: 9
107
+ segments:
108
+ - 3
109
+ - 0
110
+ - 7
111
+ version: 3.0.7
112
+ name: rails
113
+ prerelease: false
114
+ type: :development
115
+ requirement: *id006
116
+ - !ruby/object:Gem::Dependency
117
+ version_requirements: &id007 !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - "="
121
+ - !ruby/object:Gem::Version
122
+ hash: 29
123
+ segments:
124
+ - 1
125
+ - 3
126
+ - 3
127
+ version: 1.3.3
128
+ name: sqlite3
129
+ prerelease: false
130
+ type: :development
131
+ requirement: *id007
132
+ - !ruby/object:Gem::Dependency
133
+ version_requirements: &id008 !ruby/object:Gem::Requirement
134
+ none: false
135
+ requirements:
136
+ - - "="
137
+ - !ruby/object:Gem::Version
138
+ hash: 23
139
+ segments:
140
+ - 2
141
+ - 6
142
+ - 0
143
+ version: 2.6.0
144
+ name: rspec-rails
145
+ prerelease: false
146
+ type: :development
147
+ requirement: *id008
148
+ - !ruby/object:Gem::Dependency
149
+ version_requirements: &id009 !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - "="
153
+ - !ruby/object:Gem::Version
154
+ hash: 23
155
+ segments:
156
+ - 0
157
+ - 6
158
+ - 8
159
+ version: 0.6.8
160
+ name: yard
161
+ prerelease: false
162
+ type: :development
163
+ requirement: *id009
164
+ - !ruby/object:Gem::Dependency
165
+ version_requirements: &id010 !ruby/object:Gem::Requirement
166
+ none: false
167
+ requirements:
168
+ - - "="
169
+ - !ruby/object:Gem::Version
170
+ hash: 15
171
+ segments:
172
+ - 1
173
+ - 6
174
+ - 0
175
+ version: 1.6.0
176
+ name: jeweler
177
+ prerelease: false
178
+ type: :development
179
+ requirement: *id010
180
+ - !ruby/object:Gem::Dependency
181
+ version_requirements: &id011 !ruby/object:Gem::Requirement
182
+ none: false
183
+ requirements:
184
+ - - "="
185
+ - !ruby/object:Gem::Version
186
+ hash: 41
187
+ segments:
188
+ - 0
189
+ - 9
190
+ - 9
191
+ version: 0.9.9
192
+ name: rcov
193
+ prerelease: false
194
+ type: :development
195
+ requirement: *id011
196
+ - !ruby/object:Gem::Dependency
197
+ version_requirements: &id012 !ruby/object:Gem::Requirement
198
+ none: false
199
+ requirements:
200
+ - - "="
201
+ - !ruby/object:Gem::Version
202
+ hash: 35
203
+ segments:
204
+ - 4
205
+ - 4
206
+ - 6
207
+ version: 4.4.6
208
+ name: autotest
209
+ prerelease: false
210
+ type: :development
211
+ requirement: *id012
212
+ - !ruby/object:Gem::Dependency
213
+ version_requirements: &id013 !ruby/object:Gem::Requirement
214
+ none: false
215
+ requirements:
216
+ - - "="
217
+ - !ruby/object:Gem::Version
218
+ hash: 35
219
+ segments:
220
+ - 4
221
+ - 6
222
+ - 2
223
+ version: 4.6.2
224
+ name: ZenTest
225
+ prerelease: false
226
+ type: :development
227
+ requirement: *id013
228
+ - !ruby/object:Gem::Dependency
229
+ version_requirements: &id014 !ruby/object:Gem::Requirement
230
+ none: false
231
+ requirements:
232
+ - - "="
233
+ - !ruby/object:Gem::Version
234
+ hash: 3
235
+ segments:
236
+ - 0
237
+ - 7
238
+ - 0
239
+ version: 0.7.0
240
+ name: rocco
241
+ prerelease: false
242
+ type: :development
243
+ requirement: *id014
244
+ - !ruby/object:Gem::Dependency
245
+ version_requirements: &id015 !ruby/object:Gem::Requirement
246
+ none: false
247
+ requirements:
248
+ - - "="
249
+ - !ruby/object:Gem::Version
250
+ hash: 15
251
+ segments:
252
+ - 0
253
+ - 4
254
+ - 0
255
+ version: 0.4.0
256
+ name: awesome_print
257
+ prerelease: false
258
+ type: :development
259
+ requirement: *id015
260
+ - !ruby/object:Gem::Dependency
261
+ version_requirements: &id016 !ruby/object:Gem::Requirement
262
+ none: false
263
+ requirements:
264
+ - - "="
265
+ - !ruby/object:Gem::Version
266
+ hash: 61
267
+ segments:
268
+ - 0
269
+ - 9
270
+ - 3
271
+ version: 0.9.3
272
+ name: pry
273
+ prerelease: false
274
+ type: :development
275
+ requirement: *id016
276
+ description: RESTful API Client
277
+ email: ryan.moran@revolutionprep.com
278
+ executables: []
279
+
280
+ extensions: []
281
+
282
+ extra_rdoc_files:
283
+ - LICENSE.txt
284
+ - README.rdoc
285
+ files:
286
+ - .rvmrc
287
+ - Gemfile
288
+ - Gemfile.lock
289
+ - LICENSE.txt
290
+ - README.rdoc
291
+ - Rakefile
292
+ - VERSION
293
+ - autotest/discover.rb
294
+ - lib/ext/typhoeus.rb
295
+ - lib/morpheus.rb
296
+ - lib/morpheus/associations/association.rb
297
+ - lib/morpheus/associations/belongs_to_association.rb
298
+ - lib/morpheus/associations/has_many_association.rb
299
+ - lib/morpheus/associations/has_one_association.rb
300
+ - lib/morpheus/base.rb
301
+ - lib/morpheus/client/associations.rb
302
+ - lib/morpheus/client/inflections.rb
303
+ - lib/morpheus/client/log_subscriber.rb
304
+ - lib/morpheus/client/railtie.rb
305
+ - lib/morpheus/configuration.rb
306
+ - lib/morpheus/errors.rb
307
+ - lib/morpheus/filter.rb
308
+ - lib/morpheus/mixins/associations.rb
309
+ - lib/morpheus/mixins/attributes.rb
310
+ - lib/morpheus/mixins/conversion.rb
311
+ - lib/morpheus/mixins/filtering.rb
312
+ - lib/morpheus/mixins/finders.rb
313
+ - lib/morpheus/mixins/introspection.rb
314
+ - lib/morpheus/mixins/persistence.rb
315
+ - lib/morpheus/mixins/reflections.rb
316
+ - lib/morpheus/mixins/request_handling.rb
317
+ - lib/morpheus/mixins/response_parsing.rb
318
+ - lib/morpheus/mixins/url_support.rb
319
+ - lib/morpheus/mock.rb
320
+ - lib/morpheus/reflection.rb
321
+ - lib/morpheus/relation.rb
322
+ - lib/morpheus/request.rb
323
+ - lib/morpheus/request_cache.rb
324
+ - lib/morpheus/request_queue.rb
325
+ - lib/morpheus/response.rb
326
+ - lib/morpheus/response_parser.rb
327
+ - lib/morpheus/type_caster.rb
328
+ - lib/morpheus/url_builder.rb
329
+ - morpheus.gemspec
330
+ - spec/dummy/Rakefile
331
+ - spec/dummy/app/controllers/application_controller.rb
332
+ - spec/dummy/app/helpers/application_helper.rb
333
+ - spec/dummy/app/models/purchase.rb
334
+ - spec/dummy/app/resources/attendee.rb
335
+ - spec/dummy/app/resources/author.rb
336
+ - spec/dummy/app/resources/automobile.rb
337
+ - spec/dummy/app/resources/book.rb
338
+ - spec/dummy/app/resources/conference.rb
339
+ - spec/dummy/app/resources/dog.rb
340
+ - spec/dummy/app/resources/item.rb
341
+ - spec/dummy/app/resources/meeting.rb
342
+ - spec/dummy/app/resources/speaker.rb
343
+ - spec/dummy/app/resources/state.rb
344
+ - spec/dummy/app/views/layouts/application.html.erb
345
+ - spec/dummy/config.ru
346
+ - spec/dummy/config/application.rb
347
+ - spec/dummy/config/boot.rb
348
+ - spec/dummy/config/database.yml
349
+ - spec/dummy/config/environment.rb
350
+ - spec/dummy/config/environments/development.rb
351
+ - spec/dummy/config/environments/production.rb
352
+ - spec/dummy/config/environments/test.rb
353
+ - spec/dummy/config/initializers/backtrace_silencers.rb
354
+ - spec/dummy/config/initializers/inflections.rb
355
+ - spec/dummy/config/initializers/mime_types.rb
356
+ - spec/dummy/config/initializers/morpheus.rb
357
+ - spec/dummy/config/initializers/secret_token.rb
358
+ - spec/dummy/config/initializers/session_store.rb
359
+ - spec/dummy/config/locales/en.yml
360
+ - spec/dummy/config/routes.rb
361
+ - spec/dummy/db/migrate/20110605002144_create_purchases.rb
362
+ - spec/dummy/db/test.sqlite3
363
+ - spec/dummy/public/404.html
364
+ - spec/dummy/public/422.html
365
+ - spec/dummy/public/500.html
366
+ - spec/dummy/public/favicon.ico
367
+ - spec/dummy/public/stylesheets/.gitkeep
368
+ - spec/dummy/script/rails
369
+ - spec/morpheus/associations/association_spec.rb
370
+ - spec/morpheus/associations/belongs_to_association_spec.rb
371
+ - spec/morpheus/associations/has_many_association_spec.rb
372
+ - spec/morpheus/associations/has_one_association_spec.rb
373
+ - spec/morpheus/base_spec.rb
374
+ - spec/morpheus/client/associations_spec.rb
375
+ - spec/morpheus/configuration_spec.rb
376
+ - spec/morpheus/mixins/associations_spec.rb
377
+ - spec/morpheus/mixins/attributes_spec.rb
378
+ - spec/morpheus/mixins/conversion_spec.rb
379
+ - spec/morpheus/mixins/finders_spec.rb
380
+ - spec/morpheus/mixins/introspection_spec.rb
381
+ - spec/morpheus/mixins/persistence_spec.rb
382
+ - spec/morpheus/mixins/reflection_spec.rb
383
+ - spec/morpheus/mixins/response_parsing_spec.rb
384
+ - spec/morpheus/mock_spec.rb
385
+ - spec/morpheus/relation_spec.rb
386
+ - spec/morpheus/request_cache_spec.rb
387
+ - spec/morpheus/request_spec.rb
388
+ - spec/morpheus/response_spec.rb
389
+ - spec/morpheus/type_caster_spec.rb
390
+ - spec/shared/active_model_lint_test.rb
391
+ - spec/spec_helper.rb
392
+ - spec/support/configuration.rb
393
+ homepage: https://github.com/RevolutionPrep/morpheus
394
+ licenses:
395
+ - MIT
396
+ post_install_message:
397
+ rdoc_options: []
398
+
399
+ require_paths:
400
+ - lib
401
+ required_ruby_version: !ruby/object:Gem::Requirement
402
+ none: false
403
+ requirements:
404
+ - - ">="
405
+ - !ruby/object:Gem::Version
406
+ hash: 3
407
+ segments:
408
+ - 0
409
+ version: "0"
410
+ required_rubygems_version: !ruby/object:Gem::Requirement
411
+ none: false
412
+ requirements:
413
+ - - ">="
414
+ - !ruby/object:Gem::Version
415
+ hash: 3
416
+ segments:
417
+ - 0
418
+ version: "0"
419
+ requirements: []
420
+
421
+ rubyforge_project:
422
+ rubygems_version: 1.8.11
423
+ signing_key:
424
+ specification_version: 3
425
+ summary: RESTful API Client
426
+ test_files: []
427
+