acfs 0.38.0 → 0.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +1 -0
- data/lib/acfs/runner.rb +1 -0
- data/lib/acfs/version.rb +1 -1
- data/spec/acfs/runner_spec.rb +6 -1
- metadata +77 -77
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 081dd28bf87d53899d052c2aaedbed327aa61d80
|
|
4
|
+
data.tar.gz: 7c9085bb11421c078961c47a5b2fe2f638e87962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 224540c3aba3c08dbcd72cc0b42657e48e206d3d927a1d8c898969830c07e2be7dc2f03cab4ce65a580c78e7a617d4d852074a9b9c34c397f7e9bbad49d4fae2
|
|
7
|
+
data.tar.gz: b479878d0979508793ea9bbadf138a4714b6af3c75a574e3ed609a6ab9d76bcb3a3f76f226d578e3751770c7d8b39dc03310533a016595bb3644152e276442f7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -288,6 +288,7 @@ Acfs supports [instrumentation via active support][1].
|
|
|
288
288
|
|
|
289
289
|
Acfs expose to following events
|
|
290
290
|
|
|
291
|
+
* `acfs.operation.before_process(operation)`: Acfs operation about to process
|
|
291
292
|
* `acfs.operation.complete(operation, response)`: Acfs operation completed
|
|
292
293
|
* `acfs.runner.sync_run(operation)`: Run operation right now skipping queue.
|
|
293
294
|
* `acfs.runner.enqueue(operation)`: Enqueue operation to be run later.
|
data/lib/acfs/runner.rb
CHANGED
data/lib/acfs/version.rb
CHANGED
data/spec/acfs/runner_spec.rb
CHANGED
|
@@ -37,6 +37,7 @@ describe ::Acfs::Runner do
|
|
|
37
37
|
let(:adapter) { ::NullAdapter.new }
|
|
38
38
|
let(:runner) { ::Acfs::Runner.new adapter }
|
|
39
39
|
let(:collector) { NotificationCollector.new }
|
|
40
|
+
let(:collector2) { NotificationCollector.new }
|
|
40
41
|
|
|
41
42
|
after do
|
|
42
43
|
::ActiveSupport::Notifications.notifier = \
|
|
@@ -46,12 +47,14 @@ describe ::Acfs::Runner do
|
|
|
46
47
|
describe '#instrumentation' do
|
|
47
48
|
before do
|
|
48
49
|
::ActiveSupport::Notifications.subscribe /^acfs\.runner/, collector
|
|
50
|
+
::ActiveSupport::Notifications.subscribe /^acfs\.operation/, collector2
|
|
49
51
|
end
|
|
50
52
|
|
|
51
53
|
describe '#process' do
|
|
52
54
|
it 'should trigger event' do
|
|
53
55
|
runner.process ::Acfs::Operation.new MyUser, :read, params: {id: 0}
|
|
54
56
|
expect(collector.events).to have(1).items
|
|
57
|
+
expect(collector2.events).to have(1).items
|
|
55
58
|
end
|
|
56
59
|
end
|
|
57
60
|
|
|
@@ -59,13 +62,15 @@ describe ::Acfs::Runner do
|
|
|
59
62
|
it 'should trigger event' do
|
|
60
63
|
runner.run ::Acfs::Operation.new MyUser, :read, params: {id: 0}
|
|
61
64
|
expect(collector.events).to have(1).items
|
|
65
|
+
expect(collector2.events).to have(0).items
|
|
62
66
|
end
|
|
63
67
|
end
|
|
64
68
|
|
|
65
69
|
describe '#enqueue' do
|
|
66
70
|
it 'should trigger event' do
|
|
67
|
-
runner.
|
|
71
|
+
runner.enqueue ::Acfs::Operation.new MyUser, :read, params: {id: 0}
|
|
68
72
|
expect(collector.events).to have(1).items
|
|
73
|
+
expect(collector2.events).to have(0).items
|
|
69
74
|
end
|
|
70
75
|
end
|
|
71
76
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acfs
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.39.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Graichen
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-05-
|
|
11
|
+
date: 2014-05-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -115,97 +115,97 @@ executables: []
|
|
|
115
115
|
extensions: []
|
|
116
116
|
extra_rdoc_files: []
|
|
117
117
|
files:
|
|
118
|
-
-
|
|
118
|
+
- LICENSE
|
|
119
119
|
- acfs.gemspec
|
|
120
|
-
- lib/acfs/service.rb
|
|
121
|
-
- lib/acfs/global.rb
|
|
122
|
-
- lib/acfs/util.rb
|
|
123
|
-
- lib/acfs/resource.rb
|
|
124
120
|
- lib/acfs/adapter/base.rb
|
|
125
121
|
- lib/acfs/adapter/typhoeus.rb
|
|
126
|
-
- lib/acfs/
|
|
127
|
-
- lib/acfs/
|
|
128
|
-
- lib/acfs/
|
|
129
|
-
- lib/acfs/middleware/logger.rb
|
|
130
|
-
- lib/acfs/middleware/json_decoder.rb
|
|
122
|
+
- lib/acfs/collections/paginatable.rb
|
|
123
|
+
- lib/acfs/configuration.rb
|
|
124
|
+
- lib/acfs/location.rb
|
|
131
125
|
- lib/acfs/middleware/base.rb
|
|
126
|
+
- lib/acfs/middleware/json_decoder.rb
|
|
132
127
|
- lib/acfs/middleware/json_encoder.rb
|
|
128
|
+
- lib/acfs/middleware/logger.rb
|
|
133
129
|
- lib/acfs/middleware/msgpack_decoder.rb
|
|
134
|
-
- lib/acfs/
|
|
135
|
-
- lib/acfs/
|
|
136
|
-
- lib/acfs/runner.rb
|
|
137
|
-
- lib/acfs/rspec.rb
|
|
138
|
-
- lib/acfs/configuration.rb
|
|
139
|
-
- lib/acfs/location.rb
|
|
140
|
-
- lib/acfs/model.rb
|
|
141
|
-
- lib/acfs/response.rb
|
|
130
|
+
- lib/acfs/middleware/msgpack_encoder.rb
|
|
131
|
+
- lib/acfs/middleware/print.rb
|
|
142
132
|
- lib/acfs/request/callbacks.rb
|
|
143
|
-
- lib/acfs/
|
|
144
|
-
- lib/acfs/operation.rb
|
|
145
|
-
- lib/acfs/request.rb
|
|
146
|
-
- lib/acfs/version.rb
|
|
147
|
-
- lib/acfs/response/status.rb
|
|
133
|
+
- lib/acfs/response.rb
|
|
148
134
|
- lib/acfs/response/formats.rb
|
|
135
|
+
- lib/acfs/response/status.rb
|
|
136
|
+
- lib/acfs/rspec.rb
|
|
137
|
+
- lib/acfs/service.rb
|
|
149
138
|
- lib/acfs/service/middleware.rb
|
|
139
|
+
- lib/acfs/stub.rb
|
|
140
|
+
- lib/acfs/util.rb
|
|
150
141
|
- lib/acfs/yard.rb
|
|
151
|
-
- lib/acfs/
|
|
152
|
-
- lib/acfs/
|
|
142
|
+
- lib/acfs/collection.rb
|
|
143
|
+
- lib/acfs/errors.rb
|
|
144
|
+
- lib/acfs/global.rb
|
|
145
|
+
- lib/acfs/model.rb
|
|
146
|
+
- lib/acfs/model/attributes.rb
|
|
147
|
+
- lib/acfs/model/attributes/base.rb
|
|
153
148
|
- lib/acfs/model/attributes/boolean.rb
|
|
154
|
-
- lib/acfs/model/attributes/
|
|
155
|
-
- lib/acfs/model/attributes/uuid.rb
|
|
149
|
+
- lib/acfs/model/attributes/date_time.rb
|
|
156
150
|
- lib/acfs/model/attributes/float.rb
|
|
157
|
-
- lib/acfs/model/attributes/base.rb
|
|
158
151
|
- lib/acfs/model/attributes/integer.rb
|
|
159
152
|
- lib/acfs/model/attributes/list.rb
|
|
160
|
-
- lib/acfs/model/attributes/
|
|
153
|
+
- lib/acfs/model/attributes/string.rb
|
|
154
|
+
- lib/acfs/model/attributes/uuid.rb
|
|
155
|
+
- lib/acfs/model/dirty.rb
|
|
161
156
|
- lib/acfs/model/initialization.rb
|
|
162
|
-
- lib/acfs/model/
|
|
157
|
+
- lib/acfs/model/loadable.rb
|
|
163
158
|
- lib/acfs/model/locatable.rb
|
|
159
|
+
- lib/acfs/model/operational.rb
|
|
164
160
|
- lib/acfs/model/persistence.rb
|
|
165
|
-
- lib/acfs/model/
|
|
166
|
-
- lib/acfs/model/loadable.rb
|
|
167
|
-
- lib/acfs/model/dirty.rb
|
|
161
|
+
- lib/acfs/model/query_methods.rb
|
|
168
162
|
- lib/acfs/model/relations.rb
|
|
169
|
-
- lib/acfs/model/
|
|
170
|
-
- lib/acfs/
|
|
163
|
+
- lib/acfs/model/service.rb
|
|
164
|
+
- lib/acfs/model/validation.rb
|
|
165
|
+
- lib/acfs/operation.rb
|
|
166
|
+
- lib/acfs/request.rb
|
|
167
|
+
- lib/acfs/resource.rb
|
|
168
|
+
- lib/acfs/runner.rb
|
|
169
|
+
- lib/acfs/singleton_resource.rb
|
|
170
|
+
- lib/acfs/version.rb
|
|
171
171
|
- lib/acfs.rb
|
|
172
|
-
-
|
|
173
|
-
- LICENSE
|
|
172
|
+
- spec/acfs/adapter/typhoeus_spec.rb
|
|
174
173
|
- spec/acfs/collection_spec.rb
|
|
174
|
+
- spec/acfs/configuration_spec.rb
|
|
175
175
|
- spec/acfs/global_spec.rb
|
|
176
|
-
- spec/acfs/adapter/typhoeus_spec.rb
|
|
177
|
-
- spec/acfs/middleware/msgpack_decoder_spec.rb
|
|
178
176
|
- spec/acfs/middleware/json_decoder_spec.rb
|
|
179
|
-
- spec/acfs/
|
|
180
|
-
- spec/acfs/configuration_spec.rb
|
|
181
|
-
- spec/acfs/service_spec.rb
|
|
182
|
-
- spec/acfs/stub_spec.rb
|
|
183
|
-
- spec/acfs/operation_spec.rb
|
|
177
|
+
- spec/acfs/middleware/msgpack_decoder_spec.rb
|
|
184
178
|
- spec/acfs/request/callbacks_spec.rb
|
|
179
|
+
- spec/acfs/request_spec.rb
|
|
185
180
|
- spec/acfs/response/formats_spec.rb
|
|
186
181
|
- spec/acfs/response/status_spec.rb
|
|
187
182
|
- spec/acfs/service/middleware_spec.rb
|
|
188
|
-
- spec/acfs/
|
|
189
|
-
- spec/acfs/
|
|
190
|
-
- spec/acfs/model/locatable_spec.rb
|
|
191
|
-
- spec/acfs/model/attributes/float_spec.rb
|
|
183
|
+
- spec/acfs/service_spec.rb
|
|
184
|
+
- spec/acfs/stub_spec.rb
|
|
192
185
|
- spec/acfs/model/attributes/boolean_spec.rb
|
|
193
|
-
- spec/acfs/model/attributes/uuid_spec.rb
|
|
194
186
|
- spec/acfs/model/attributes/date_time_spec.rb
|
|
187
|
+
- spec/acfs/model/attributes/float_spec.rb
|
|
195
188
|
- spec/acfs/model/attributes/list_spec.rb
|
|
196
|
-
- spec/acfs/model/
|
|
189
|
+
- spec/acfs/model/attributes/uuid_spec.rb
|
|
190
|
+
- spec/acfs/model/attributes_spec.rb
|
|
191
|
+
- spec/acfs/model/dirty_spec.rb
|
|
197
192
|
- spec/acfs/model/initialization_spec.rb
|
|
198
193
|
- spec/acfs/model/loadable_spec.rb
|
|
199
|
-
- spec/acfs/model/
|
|
200
|
-
- spec/acfs/model/
|
|
194
|
+
- spec/acfs/model/locatable_spec.rb
|
|
195
|
+
- spec/acfs/model/persistance_spec.rb
|
|
201
196
|
- spec/acfs/model/query_methods_spec.rb
|
|
202
|
-
- spec/acfs/model/
|
|
197
|
+
- spec/acfs/model/validation_spec.rb
|
|
198
|
+
- spec/acfs/operation_spec.rb
|
|
199
|
+
- spec/acfs/runner_spec.rb
|
|
200
|
+
- spec/acfs/singleton_resource_spec.rb
|
|
201
|
+
- spec/fixtures/config.yml
|
|
202
|
+
- spec/spec_helper.rb
|
|
203
|
+
- spec/support/response.rb
|
|
203
204
|
- spec/support/service.rb
|
|
204
205
|
- spec/support/shared/find_callbacks.rb
|
|
205
|
-
- spec/support/response.rb
|
|
206
|
-
- spec/spec_helper.rb
|
|
207
|
-
- spec/fixtures/config.yml
|
|
208
206
|
- spec/acfs_spec.rb
|
|
207
|
+
- README.md
|
|
208
|
+
- CHANGELOG.md
|
|
209
209
|
homepage: https://github.com/jgraichen/acfs
|
|
210
210
|
licenses:
|
|
211
211
|
- MIT
|
|
@@ -231,39 +231,39 @@ signing_key:
|
|
|
231
231
|
specification_version: 4
|
|
232
232
|
summary: An abstract API base client for service oriented application.
|
|
233
233
|
test_files:
|
|
234
|
+
- spec/acfs/adapter/typhoeus_spec.rb
|
|
234
235
|
- spec/acfs/collection_spec.rb
|
|
236
|
+
- spec/acfs/configuration_spec.rb
|
|
235
237
|
- spec/acfs/global_spec.rb
|
|
236
|
-
- spec/acfs/adapter/typhoeus_spec.rb
|
|
237
|
-
- spec/acfs/middleware/msgpack_decoder_spec.rb
|
|
238
238
|
- spec/acfs/middleware/json_decoder_spec.rb
|
|
239
|
-
- spec/acfs/
|
|
240
|
-
- spec/acfs/configuration_spec.rb
|
|
241
|
-
- spec/acfs/service_spec.rb
|
|
242
|
-
- spec/acfs/stub_spec.rb
|
|
243
|
-
- spec/acfs/operation_spec.rb
|
|
239
|
+
- spec/acfs/middleware/msgpack_decoder_spec.rb
|
|
244
240
|
- spec/acfs/request/callbacks_spec.rb
|
|
241
|
+
- spec/acfs/request_spec.rb
|
|
245
242
|
- spec/acfs/response/formats_spec.rb
|
|
246
243
|
- spec/acfs/response/status_spec.rb
|
|
247
244
|
- spec/acfs/service/middleware_spec.rb
|
|
248
|
-
- spec/acfs/
|
|
249
|
-
- spec/acfs/
|
|
250
|
-
- spec/acfs/model/locatable_spec.rb
|
|
251
|
-
- spec/acfs/model/attributes/float_spec.rb
|
|
245
|
+
- spec/acfs/service_spec.rb
|
|
246
|
+
- spec/acfs/stub_spec.rb
|
|
252
247
|
- spec/acfs/model/attributes/boolean_spec.rb
|
|
253
|
-
- spec/acfs/model/attributes/uuid_spec.rb
|
|
254
248
|
- spec/acfs/model/attributes/date_time_spec.rb
|
|
249
|
+
- spec/acfs/model/attributes/float_spec.rb
|
|
255
250
|
- spec/acfs/model/attributes/list_spec.rb
|
|
256
|
-
- spec/acfs/model/
|
|
251
|
+
- spec/acfs/model/attributes/uuid_spec.rb
|
|
252
|
+
- spec/acfs/model/attributes_spec.rb
|
|
253
|
+
- spec/acfs/model/dirty_spec.rb
|
|
257
254
|
- spec/acfs/model/initialization_spec.rb
|
|
258
255
|
- spec/acfs/model/loadable_spec.rb
|
|
259
|
-
- spec/acfs/model/
|
|
260
|
-
- spec/acfs/model/
|
|
256
|
+
- spec/acfs/model/locatable_spec.rb
|
|
257
|
+
- spec/acfs/model/persistance_spec.rb
|
|
261
258
|
- spec/acfs/model/query_methods_spec.rb
|
|
262
|
-
- spec/acfs/model/
|
|
259
|
+
- spec/acfs/model/validation_spec.rb
|
|
260
|
+
- spec/acfs/operation_spec.rb
|
|
261
|
+
- spec/acfs/runner_spec.rb
|
|
262
|
+
- spec/acfs/singleton_resource_spec.rb
|
|
263
|
+
- spec/fixtures/config.yml
|
|
264
|
+
- spec/spec_helper.rb
|
|
265
|
+
- spec/support/response.rb
|
|
263
266
|
- spec/support/service.rb
|
|
264
267
|
- spec/support/shared/find_callbacks.rb
|
|
265
|
-
- spec/support/response.rb
|
|
266
|
-
- spec/spec_helper.rb
|
|
267
|
-
- spec/fixtures/config.yml
|
|
268
268
|
- spec/acfs_spec.rb
|
|
269
269
|
has_rdoc:
|