active_domain 0.5.0.rc4 → 0.5.0.rc5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4294b261d9693394c64dc71701c7c379acd369f0
4
- data.tar.gz: 5f4d3bb6088a46eddbbc4011ba9e6d74b89363a3
3
+ metadata.gz: c578bca76f3fc16070c077cf8ca1952ce09005ca
4
+ data.tar.gz: d72dc78bb181a82692535e80fdcae621a15c302b
5
5
  SHA512:
6
- metadata.gz: 58967c73f53662a93e169fae3f1d1fcb4cdfb3e3b66ea3d91496019a647e061c0d82e0a59f9b9ada67328d16d9447b3c7813389868c91662a5f90fd2a9780083
7
- data.tar.gz: 60b1b44f8e8678befabb4b4d2d26530bcd736d9066eb21cb9196c7a99092b6f434144b7f613a4ee122894c001d2b377482b26e75d1d7cbe7fd7aa7dbae3e1a83
6
+ metadata.gz: 5f27517d7629677b08bc4a1243fc633da9091e882e5ec95892821fb3a0dc1a2bd054daf0ff23cc192a3c63126d34f0b158b95b866dac7f6f481d97778ac8e4f3
7
+ data.tar.gz: dbf2b0571ad252db6d03efd4a01806727da71755d9fab0c47164a75d1cb0569d261f5d3c48a4034e4e39c5523e6b57ea1bb3dc3ba43654cdf9c12e264911e855
@@ -1,35 +1,37 @@
1
- module ActiveDomain
2
- class CommandRoutes
3
- def version
4
- '0.1.0'
5
- end
6
-
7
- def initialize
8
- self.processors = {}
9
- end
10
-
11
- def run_command(command)
12
- RELOADER.execute_if_updated
13
- processor, method = @@routes[command.class]
14
- processor_instance(processor).method(method).call(command)
15
- rescue Exception => e
16
- LOGGER.error e.message
17
- LOGGER.error e.backtrace.join("\n")
18
- raise e
19
- end
20
-
21
- def self.route(type, processor, method)
22
- @@routes[type] = [processor, method]
23
- end
24
-
25
- private
26
-
27
- attr_accessor :processors
28
-
29
- def processor_instance(processor)
30
- processors[processor] ||= processor.new
31
- end
32
-
33
- @@routes = {}
34
- end
35
- end
1
+ require 'active_event/domain'
2
+
3
+ module ActiveDomain
4
+ class CommandRoutes
5
+ def version
6
+ '0.1.0'
7
+ end
8
+
9
+ def initialize
10
+ self.processors = {}
11
+ end
12
+
13
+ def run_command(command)
14
+ RELOADER.execute_if_updated
15
+ processor, method = @@routes[command.class]
16
+ processor_instance(processor).method(method).call(command)
17
+ rescue Exception => e
18
+ LOGGER.error e.message
19
+ LOGGER.error e.backtrace.join("\n")
20
+ raise ActiveEvent::DomainExceptionCapture, ["#{e.class.name}: #{e.message}", e.backtrace].to_json, e.backtrace
21
+ end
22
+
23
+ def self.route(type, processor, method)
24
+ @@routes[type] = [processor, method]
25
+ end
26
+
27
+ private
28
+
29
+ attr_accessor :processors
30
+
31
+ def processor_instance(processor)
32
+ processors[processor] ||= processor.new
33
+ end
34
+
35
+ @@routes = {}
36
+ end
37
+ end
@@ -1,7 +1,7 @@
1
1
  module ActiveDomain
2
2
  # Returns the version of the currently loaded ActiveDomain as a Gem::Version
3
3
  def self.version
4
- Gem::Version.new '0.5.0.rc4'
4
+ Gem::Version.new '0.5.0.rc5'
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0.rc4
4
+ version: 0.5.0.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - HicknHack Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-22 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_event
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0.rc4
19
+ version: 0.5.0.rc5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.0.rc4
26
+ version: 0.5.0.rc5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -146,11 +146,14 @@ executables: []
146
146
  extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
+ - MIT-LICENSE
150
+ - README.md
149
151
  - app/models/active_domain/event.rb
150
152
  - app/models/active_domain/event_repository.rb
151
153
  - app/models/active_domain/unique_command_id.rb
152
154
  - app/models/active_domain/unique_command_id_repository.rb
153
155
  - db/migrate/02_create_unique_command_ids.rb
156
+ - lib/active_domain.rb
154
157
  - lib/active_domain/autoload.rb
155
158
  - lib/active_domain/command_processor.rb
156
159
  - lib/active_domain/command_routes.rb
@@ -158,9 +161,6 @@ files:
158
161
  - lib/active_domain/projection_registry.rb
159
162
  - lib/active_domain/server.rb
160
163
  - lib/active_domain/version.rb
161
- - lib/active_domain.rb
162
- - README.md
163
- - MIT-LICENSE
164
164
  - spec/lib/command_processor_spec.rb
165
165
  - spec/lib/projection_registry_spec.rb
166
166
  - spec/lib/projection_spec.rb
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: 1.3.1
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.1.11
188
+ rubygems_version: 2.2.2
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: Domain specifics for the Rails Disco