ampere 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. data/CHANGELOG.md +15 -0
  2. data/Gemfile +2 -2
  3. data/Gemfile.lock +36 -26
  4. data/README.md +25 -11
  5. data/Rakefile +10 -0
  6. data/VERSION +1 -1
  7. data/ampere.gemspec +83 -9
  8. data/example/.gitignore +5 -0
  9. data/example/.rspec +1 -0
  10. data/example/Gemfile +21 -0
  11. data/example/Gemfile.lock +143 -0
  12. data/example/README +261 -0
  13. data/example/Rakefile +7 -0
  14. data/example/app/assets/images/rails.png +0 -0
  15. data/example/app/assets/javascripts/application.js +9 -0
  16. data/example/app/assets/javascripts/posts.js.coffee +3 -0
  17. data/example/app/assets/stylesheets/application.css +7 -0
  18. data/example/app/assets/stylesheets/posts.css.scss +3 -0
  19. data/example/app/assets/stylesheets/scaffolds.css.scss +56 -0
  20. data/example/app/controllers/application_controller.rb +3 -0
  21. data/example/app/controllers/posts_controller.rb +83 -0
  22. data/example/app/helpers/application_helper.rb +2 -0
  23. data/example/app/helpers/posts_helper.rb +2 -0
  24. data/example/app/mailers/.gitkeep +0 -0
  25. data/example/app/models/.gitkeep +0 -0
  26. data/example/app/models/post.rb +7 -0
  27. data/example/app/views/layouts/application.html.erb +14 -0
  28. data/example/app/views/posts/_form.html.erb +25 -0
  29. data/example/app/views/posts/edit.html.erb +6 -0
  30. data/example/app/views/posts/index.html.erb +25 -0
  31. data/example/app/views/posts/new.html.erb +5 -0
  32. data/example/app/views/posts/show.html.erb +15 -0
  33. data/example/config/ampere.yml +11 -0
  34. data/example/config/application.rb +54 -0
  35. data/example/config/boot.rb +6 -0
  36. data/example/config/environment.rb +5 -0
  37. data/example/config/environments/development.rb +30 -0
  38. data/example/config/environments/production.rb +60 -0
  39. data/example/config/environments/test.rb +39 -0
  40. data/example/config/initializers/backtrace_silencers.rb +7 -0
  41. data/example/config/initializers/inflections.rb +10 -0
  42. data/example/config/initializers/mime_types.rb +5 -0
  43. data/example/config/initializers/secret_token.rb +7 -0
  44. data/example/config/initializers/session_store.rb +8 -0
  45. data/example/config/initializers/wrap_parameters.rb +10 -0
  46. data/example/config/locales/en.yml +5 -0
  47. data/example/config/routes.rb +60 -0
  48. data/example/config.ru +4 -0
  49. data/example/db/seeds.rb +7 -0
  50. data/example/lib/assets/.gitkeep +0 -0
  51. data/example/lib/tasks/.gitkeep +0 -0
  52. data/example/log/.gitkeep +0 -0
  53. data/example/public/404.html +26 -0
  54. data/example/public/422.html +26 -0
  55. data/example/public/500.html +26 -0
  56. data/example/public/favicon.ico +0 -0
  57. data/example/public/index.html +241 -0
  58. data/example/public/robots.txt +5 -0
  59. data/example/script/rails +6 -0
  60. data/example/spec/controllers/posts_controller_spec.rb +164 -0
  61. data/example/spec/helpers/posts_helper_spec.rb +15 -0
  62. data/example/spec/models/post_spec.rb +5 -0
  63. data/example/spec/requests/posts_spec.rb +11 -0
  64. data/example/spec/routing/posts_routing_spec.rb +35 -0
  65. data/example/spec/spec_helper.rb +34 -0
  66. data/example/spec/views/posts/edit.html.erb_spec.rb +20 -0
  67. data/example/spec/views/posts/index.html.erb_spec.rb +23 -0
  68. data/example/spec/views/posts/new.html.erb_spec.rb +20 -0
  69. data/example/spec/views/posts/show.html.erb_spec.rb +17 -0
  70. data/example/vendor/assets/stylesheets/.gitkeep +0 -0
  71. data/example/vendor/plugins/.gitkeep +0 -0
  72. data/lib/ampere/collection.rb +6 -0
  73. data/lib/ampere/keys.rb +37 -0
  74. data/lib/ampere/model.rb +117 -58
  75. data/lib/ampere/timestamps.rb +23 -0
  76. data/lib/ampere.rb +17 -1
  77. data/lib/rails/generators/ampere/config/config_generator.rb +15 -0
  78. data/lib/rails/generators/ampere/config/templates/ampere.yml +11 -0
  79. data/lib/rails/generators/ampere/model/model_generator.rb +27 -0
  80. data/lib/rails/generators/ampere/model/templates/model.rb.tt +10 -0
  81. data/lib/rails/railtie.rb +49 -0
  82. data/lib/rails/tasks/ampere.rake +7 -0
  83. data/spec/models/model_spec.rb +12 -2
  84. data/spec/models/timestamps_spec.rb +45 -0
  85. data/spec/module/collections_spec.rb +5 -0
  86. data/spec/spec_helper.rb +1 -0
  87. metadata +153 -29
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ampere
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-12 00:00:00.000000000 Z
12
+ date: 2012-06-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: activesupport
16
- requirement: &2166309900 !ruby/object:Gem::Requirement
15
+ name: activerecord
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,21 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2166309900
25
- - !ruby/object:Gem::Dependency
26
- name: activemodel
27
- requirement: &2166309360 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
27
  - - ! '>='
31
28
  - !ruby/object:Gem::Version
32
29
  version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *2166309360
36
30
  - !ruby/object:Gem::Dependency
37
31
  name: redis
38
- requirement: &2166308860 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
34
  requirements:
41
35
  - - ! '>='
@@ -43,10 +37,15 @@ dependencies:
43
37
  version: '0'
44
38
  type: :runtime
45
39
  prerelease: false
46
- version_requirements: *2166308860
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
47
46
  - !ruby/object:Gem::Dependency
48
47
  name: shoulda
49
- requirement: &2166308340 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
50
49
  none: false
51
50
  requirements:
52
51
  - - ! '>='
@@ -54,10 +53,15 @@ dependencies:
54
53
  version: '0'
55
54
  type: :development
56
55
  prerelease: false
57
- version_requirements: *2166308340
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
58
62
  - !ruby/object:Gem::Dependency
59
63
  name: cucumber
60
- requirement: &2166307820 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
61
65
  none: false
62
66
  requirements:
63
67
  - - ! '>='
@@ -65,10 +69,15 @@ dependencies:
65
69
  version: '0'
66
70
  type: :development
67
71
  prerelease: false
68
- version_requirements: *2166307820
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: bundler
71
- requirement: &2166307260 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
72
81
  none: false
73
82
  requirements:
74
83
  - - ! '>='
@@ -76,10 +85,15 @@ dependencies:
76
85
  version: 1.0.0
77
86
  type: :development
78
87
  prerelease: false
79
- version_requirements: *2166307260
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: 1.0.0
80
94
  - !ruby/object:Gem::Dependency
81
95
  name: jeweler
82
- requirement: &2166306720 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
83
97
  none: false
84
98
  requirements:
85
99
  - - ~>
@@ -87,10 +101,15 @@ dependencies:
87
101
  version: 1.6.4
88
102
  type: :development
89
103
  prerelease: false
90
- version_requirements: *2166306720
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.6.4
91
110
  - !ruby/object:Gem::Dependency
92
111
  name: simplecov
93
- requirement: &2166306160 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
94
113
  none: false
95
114
  requirements:
96
115
  - - ! '>='
@@ -98,10 +117,15 @@ dependencies:
98
117
  version: '0'
99
118
  type: :development
100
119
  prerelease: false
101
- version_requirements: *2166306160
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
102
126
  - !ruby/object:Gem::Dependency
103
127
  name: rspec
104
- requirement: &2166305600 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
105
129
  none: false
106
130
  requirements:
107
131
  - - ! '>='
@@ -109,10 +133,31 @@ dependencies:
109
133
  version: '0'
110
134
  type: :development
111
135
  prerelease: false
112
- version_requirements: *2166305600
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
113
142
  - !ruby/object:Gem::Dependency
114
143
  name: rdoc
115
- requirement: &2166305100 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: timecop
160
+ requirement: !ruby/object:Gem::Requirement
116
161
  none: false
117
162
  requirements:
118
163
  - - ! '>='
@@ -120,7 +165,12 @@ dependencies:
120
165
  version: '0'
121
166
  type: :development
122
167
  prerelease: false
123
- version_requirements: *2166305100
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
124
174
  description: An ActiveRecord/Mongoid-esque object model for the Redis key/value data
125
175
  store.
126
176
  email: max@villainousindustri.es
@@ -133,6 +183,7 @@ files:
133
183
  - .document
134
184
  - .rspec
135
185
  - .rvmrc
186
+ - CHANGELOG.md
136
187
  - Gemfile
137
188
  - Gemfile.lock
138
189
  - LICENSE.txt
@@ -140,18 +191,91 @@ files:
140
191
  - Rakefile
141
192
  - VERSION
142
193
  - ampere.gemspec
194
+ - example/.gitignore
195
+ - example/.rspec
196
+ - example/Gemfile
197
+ - example/Gemfile.lock
198
+ - example/README
199
+ - example/Rakefile
200
+ - example/app/assets/images/rails.png
201
+ - example/app/assets/javascripts/application.js
202
+ - example/app/assets/javascripts/posts.js.coffee
203
+ - example/app/assets/stylesheets/application.css
204
+ - example/app/assets/stylesheets/posts.css.scss
205
+ - example/app/assets/stylesheets/scaffolds.css.scss
206
+ - example/app/controllers/application_controller.rb
207
+ - example/app/controllers/posts_controller.rb
208
+ - example/app/helpers/application_helper.rb
209
+ - example/app/helpers/posts_helper.rb
210
+ - example/app/mailers/.gitkeep
211
+ - example/app/models/.gitkeep
212
+ - example/app/models/post.rb
213
+ - example/app/views/layouts/application.html.erb
214
+ - example/app/views/posts/_form.html.erb
215
+ - example/app/views/posts/edit.html.erb
216
+ - example/app/views/posts/index.html.erb
217
+ - example/app/views/posts/new.html.erb
218
+ - example/app/views/posts/show.html.erb
219
+ - example/config.ru
220
+ - example/config/ampere.yml
221
+ - example/config/application.rb
222
+ - example/config/boot.rb
223
+ - example/config/environment.rb
224
+ - example/config/environments/development.rb
225
+ - example/config/environments/production.rb
226
+ - example/config/environments/test.rb
227
+ - example/config/initializers/backtrace_silencers.rb
228
+ - example/config/initializers/inflections.rb
229
+ - example/config/initializers/mime_types.rb
230
+ - example/config/initializers/secret_token.rb
231
+ - example/config/initializers/session_store.rb
232
+ - example/config/initializers/wrap_parameters.rb
233
+ - example/config/locales/en.yml
234
+ - example/config/routes.rb
235
+ - example/db/seeds.rb
236
+ - example/lib/assets/.gitkeep
237
+ - example/lib/tasks/.gitkeep
238
+ - example/log/.gitkeep
239
+ - example/public/404.html
240
+ - example/public/422.html
241
+ - example/public/500.html
242
+ - example/public/favicon.ico
243
+ - example/public/index.html
244
+ - example/public/robots.txt
245
+ - example/script/rails
246
+ - example/spec/controllers/posts_controller_spec.rb
247
+ - example/spec/helpers/posts_helper_spec.rb
248
+ - example/spec/models/post_spec.rb
249
+ - example/spec/requests/posts_spec.rb
250
+ - example/spec/routing/posts_routing_spec.rb
251
+ - example/spec/spec_helper.rb
252
+ - example/spec/views/posts/edit.html.erb_spec.rb
253
+ - example/spec/views/posts/index.html.erb_spec.rb
254
+ - example/spec/views/posts/new.html.erb_spec.rb
255
+ - example/spec/views/posts/show.html.erb_spec.rb
256
+ - example/vendor/assets/stylesheets/.gitkeep
257
+ - example/vendor/plugins/.gitkeep
143
258
  - features/ampere.feature
144
259
  - features/step_definitions/ampere_steps.rb
145
260
  - features/support/env.rb
146
261
  - lib/ampere.rb
147
262
  - lib/ampere/collection.rb
263
+ - lib/ampere/keys.rb
148
264
  - lib/ampere/model.rb
265
+ - lib/ampere/timestamps.rb
266
+ - lib/rails/generators/ampere/config/config_generator.rb
267
+ - lib/rails/generators/ampere/config/templates/ampere.yml
268
+ - lib/rails/generators/ampere/model/model_generator.rb
269
+ - lib/rails/generators/ampere/model/templates/model.rb.tt
270
+ - lib/rails/railtie.rb
271
+ - lib/rails/tasks/ampere.rake
149
272
  - spec/models/indices_spec.rb
150
273
  - spec/models/model_spec.rb
151
274
  - spec/models/queries_spec.rb
152
275
  - spec/models/relationships/belongs_to_spec.rb
153
276
  - spec/models/relationships/has_many_spec.rb
154
277
  - spec/models/relationships/has_one_spec.rb
278
+ - spec/models/timestamps_spec.rb
155
279
  - spec/models/updates_spec.rb
156
280
  - spec/models/validations_spec.rb
157
281
  - spec/module/ampere_spec.rb
@@ -175,7 +299,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
175
299
  version: '0'
176
300
  segments:
177
301
  - 0
178
- hash: -3870431853959501764
302
+ hash: -2028445124986586521
179
303
  required_rubygems_version: !ruby/object:Gem::Requirement
180
304
  none: false
181
305
  requirements:
@@ -184,7 +308,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
308
  version: '0'
185
309
  requirements: []
186
310
  rubyforge_project:
187
- rubygems_version: 1.8.15
311
+ rubygems_version: 1.8.24
188
312
  signing_key:
189
313
  specification_version: 3
190
314
  summary: A pure Ruby ORM for Redis.