la_maquina 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -0
  3. data/Gemfile.lock +2 -3
  4. data/README.md +25 -6
  5. data/Rakefile +1 -1
  6. data/lib/la_maquina/ciguenal.rb +12 -8
  7. data/lib/la_maquina/error_notifier/base.rb +11 -0
  8. data/lib/la_maquina/error_notifier/honeybadger_notifier.rb +12 -0
  9. data/lib/la_maquina/error_notifier/silent_notifier.rb +10 -0
  10. data/lib/la_maquina/error_notifier.rb +6 -0
  11. data/lib/la_maquina/piston/base.rb +11 -0
  12. data/lib/la_maquina/piston/cache_piston.rb +39 -0
  13. data/lib/la_maquina/piston.rb +3 -6
  14. data/lib/la_maquina/version.rb +1 -1
  15. data/lib/la_maquina/volante.rb +13 -9
  16. data/lib/la_maquina.rb +6 -7
  17. data/test/ciguenal_test.rb +30 -0
  18. data/test/dummy/app/models/admin.rb +3 -3
  19. data/test/dummy/app/models/admin_trait.rb +3 -3
  20. data/test/dummy/app/models/admin_trait_modifier.rb +3 -3
  21. data/test/dummy/app/models/guest.rb +2 -2
  22. data/test/dummy/app/models/guest_trait.rb +3 -3
  23. data/test/dummy/app/models/guest_trait_modifier.rb +3 -2
  24. data/test/dummy/app/models/property.rb +3 -2
  25. data/test/dummy/app/models/standalone.rb +3 -2
  26. data/test/dummy/config/application.rb +1 -1
  27. data/test/dummy/config/initializers/la_maquina.rb +3 -0
  28. data/test/dummy/lib/dummy_comm_object.rb +5 -0
  29. data/test/dummy/lib/exploding_comm_object.rb +5 -0
  30. data/test/dummy/lib/test_notifier.rb +6 -0
  31. data/test/dummy/lib/test_piston.rb +5 -0
  32. data/test/la_maquina_test.rb +2 -2
  33. data/test/volante_test.rb +136 -0
  34. metadata +22 -20
  35. data/lib/la_maquina/pistons/cache_piston.rb +0 -37
  36. data/test/dummy/README.rdoc +0 -28
  37. data/test/dummy/app/models/danny_trejo.rb +0 -5
  38. data/test/dummy/app/models/machete.rb +0 -8
  39. data/test/dummy/config/initializers/cache_machine.rb +0 -2
  40. data/test/dummy/lib/dummy_cache_machine_comm_object.rb +0 -5
  41. data/test/dummy/lib/exploding_cache_machine_comm_object.rb +0 -5
  42. data/test/dummy/log/test.log +0 -3980
  43. data/test/master_cache_object_test.rb +0 -23
  44. data/test/subordinate_cache_object_test.rb +0 -136
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: la_maquina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Orlov
@@ -60,6 +60,7 @@ executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
+ - ".gitignore"
63
64
  - Gemfile
64
65
  - Gemfile.lock
65
66
  - LICENSE.txt
@@ -69,21 +70,24 @@ files:
69
70
  - la_maquina.gemspec
70
71
  - lib/la_maquina.rb
71
72
  - lib/la_maquina/ciguenal.rb
73
+ - lib/la_maquina/error_notifier.rb
74
+ - lib/la_maquina/error_notifier/base.rb
75
+ - lib/la_maquina/error_notifier/honeybadger_notifier.rb
76
+ - lib/la_maquina/error_notifier/silent_notifier.rb
72
77
  - lib/la_maquina/piston.rb
73
- - lib/la_maquina/pistons/cache_piston.rb
78
+ - lib/la_maquina/piston/base.rb
79
+ - lib/la_maquina/piston/cache_piston.rb
74
80
  - lib/la_maquina/version.rb
75
81
  - lib/la_maquina/volante.rb
76
- - test/dummy/README.rdoc
82
+ - test/ciguenal_test.rb
77
83
  - test/dummy/Rakefile
78
84
  - test/dummy/app/models/.keep
79
85
  - test/dummy/app/models/admin.rb
80
86
  - test/dummy/app/models/admin_trait.rb
81
87
  - test/dummy/app/models/admin_trait_modifier.rb
82
- - test/dummy/app/models/danny_trejo.rb
83
88
  - test/dummy/app/models/guest.rb
84
89
  - test/dummy/app/models/guest_trait.rb
85
90
  - test/dummy/app/models/guest_trait_modifier.rb
86
- - test/dummy/app/models/machete.rb
87
91
  - test/dummy/app/models/property.rb
88
92
  - test/dummy/app/models/standalone.rb
89
93
  - test/dummy/app/models/trait.rb
@@ -97,10 +101,10 @@ files:
97
101
  - test/dummy/config/environments/test.rb
98
102
  - test/dummy/config/initializers/assets.rb
99
103
  - test/dummy/config/initializers/backtrace_silencers.rb
100
- - test/dummy/config/initializers/cache_machine.rb
101
104
  - test/dummy/config/initializers/cookies_serializer.rb
102
105
  - test/dummy/config/initializers/filter_parameter_logging.rb
103
106
  - test/dummy/config/initializers/inflections.rb
107
+ - test/dummy/config/initializers/la_maquina.rb
104
108
  - test/dummy/config/initializers/mime_types.rb
105
109
  - test/dummy/config/initializers/session_store.rb
106
110
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -110,11 +114,12 @@ files:
110
114
  - test/dummy/db/development.sqlite3
111
115
  - test/dummy/db/migrate/20150228015009_schema.rb
112
116
  - test/dummy/db/schema.rb
113
- - test/dummy/lib/dummy_cache_machine_comm_object.rb
114
- - test/dummy/lib/exploding_cache_machine_comm_object.rb
117
+ - test/dummy/lib/dummy_comm_object.rb
118
+ - test/dummy/lib/exploding_comm_object.rb
119
+ - test/dummy/lib/test_notifier.rb
120
+ - test/dummy/lib/test_piston.rb
115
121
  - test/dummy/log/.keep
116
122
  - test/dummy/log/development.log
117
- - test/dummy/log/test.log
118
123
  - test/dummy/public/404.html
119
124
  - test/dummy/public/422.html
120
125
  - test/dummy/public/500.html
@@ -129,9 +134,8 @@ files:
129
134
  - test/dummy/test/fixtures/standalones.yml
130
135
  - test/dummy/test/fixtures/traits.yml
131
136
  - test/la_maquina_test.rb
132
- - test/master_cache_object_test.rb
133
- - test/subordinate_cache_object_test.rb
134
137
  - test/test_helper.rb
138
+ - test/volante_test.rb
135
139
  homepage: https://github.com/gaorlov/la_maquina
136
140
  licenses:
137
141
  - MIT
@@ -157,17 +161,15 @@ signing_key:
157
161
  specification_version: 4
158
162
  summary: depnendency tree update notifications
159
163
  test_files:
160
- - test/dummy/README.rdoc
164
+ - test/ciguenal_test.rb
161
165
  - test/dummy/Rakefile
162
166
  - test/dummy/app/models/.keep
163
167
  - test/dummy/app/models/admin.rb
164
168
  - test/dummy/app/models/admin_trait.rb
165
169
  - test/dummy/app/models/admin_trait_modifier.rb
166
- - test/dummy/app/models/danny_trejo.rb
167
170
  - test/dummy/app/models/guest.rb
168
171
  - test/dummy/app/models/guest_trait.rb
169
172
  - test/dummy/app/models/guest_trait_modifier.rb
170
- - test/dummy/app/models/machete.rb
171
173
  - test/dummy/app/models/property.rb
172
174
  - test/dummy/app/models/standalone.rb
173
175
  - test/dummy/app/models/trait.rb
@@ -181,10 +183,10 @@ test_files:
181
183
  - test/dummy/config/environments/test.rb
182
184
  - test/dummy/config/initializers/assets.rb
183
185
  - test/dummy/config/initializers/backtrace_silencers.rb
184
- - test/dummy/config/initializers/cache_machine.rb
185
186
  - test/dummy/config/initializers/cookies_serializer.rb
186
187
  - test/dummy/config/initializers/filter_parameter_logging.rb
187
188
  - test/dummy/config/initializers/inflections.rb
189
+ - test/dummy/config/initializers/la_maquina.rb
188
190
  - test/dummy/config/initializers/mime_types.rb
189
191
  - test/dummy/config/initializers/session_store.rb
190
192
  - test/dummy/config/initializers/wrap_parameters.rb
@@ -194,11 +196,12 @@ test_files:
194
196
  - test/dummy/db/development.sqlite3
195
197
  - test/dummy/db/migrate/20150228015009_schema.rb
196
198
  - test/dummy/db/schema.rb
197
- - test/dummy/lib/dummy_cache_machine_comm_object.rb
198
- - test/dummy/lib/exploding_cache_machine_comm_object.rb
199
+ - test/dummy/lib/dummy_comm_object.rb
200
+ - test/dummy/lib/exploding_comm_object.rb
201
+ - test/dummy/lib/test_notifier.rb
202
+ - test/dummy/lib/test_piston.rb
199
203
  - test/dummy/log/.keep
200
204
  - test/dummy/log/development.log
201
- - test/dummy/log/test.log
202
205
  - test/dummy/public/404.html
203
206
  - test/dummy/public/422.html
204
207
  - test/dummy/public/500.html
@@ -213,7 +216,6 @@ test_files:
213
216
  - test/dummy/test/fixtures/standalones.yml
214
217
  - test/dummy/test/fixtures/traits.yml
215
218
  - test/la_maquina_test.rb
216
- - test/master_cache_object_test.rb
217
- - test/subordinate_cache_object_test.rb
218
219
  - test/test_helper.rb
220
+ - test/volante_test.rb
219
221
  has_rdoc:
@@ -1,37 +0,0 @@
1
- module Pistons
2
- class CachePiston < LaMaquina::Piston
3
- class << self
4
- attr_accessor :redis
5
-
6
- def fire!(klass = "", id = nil)
7
-
8
- updated_at = SecureRandom.uuid()
9
- redis_key_string = redis_key klass, id
10
- # make a class var with a default
11
-
12
- cache_key = "#{redis_key_string}/#{updated_at}"
13
- redis.set redis_key_string, cache_key
14
-
15
- cache_key
16
- end
17
-
18
- def cache_key(klass, id)
19
-
20
- redis_key_string = redis_key klass, id
21
-
22
- key = redis.get redis_key_string
23
- # key found
24
- return key if key
25
-
26
- # there's no key; we can't very well rerun nil for cache_key. Let's make a new entry
27
- touch_cache klass, id
28
- end
29
-
30
- protected
31
-
32
- def redis_key(klass, id)
33
- "#{klass}/#{id}"
34
- end
35
- end
36
- end
37
- end
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
@@ -1,5 +0,0 @@
1
- class DannyTrejo < ActiveRecord::Base
2
-
3
- has_many :machetes
4
-
5
- end
@@ -1,8 +0,0 @@
1
- class Machete < ActiveRecord::Base
2
-
3
- belongs_to :danny_trejo
4
-
5
- include LaMaquina::Volante
6
- notifies :danny_trejo
7
-
8
- end
@@ -1,2 +0,0 @@
1
- CacheMachine.redis = Redis::Namespace.new(:cache_machine, :redis => Redis.new)
2
- CacheMachine.update_error_handler = -> (error, details){ $error = error; $deets = details }
@@ -1,5 +0,0 @@
1
- class DummyCacheMachineCommObject
2
- def self.touch_cache params
3
- $dummy_cache_params = params
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class ExplodingCacheMachineCommObject
2
- def self.touch_cache params
3
- raise "oh noes!"
4
- end
5
- end