active_domain 0.2.0 → 0.3.0

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: c7ba08340129529699ef9c88cbfcd40cc3e12906
4
- data.tar.gz: b6ec97c204f267ef3ae250b95998106b58dd93cd
3
+ metadata.gz: eede4bb2ce3b3023a54aa077a8d7435030c3bc08
4
+ data.tar.gz: aa0e224f1bfc7d5200ccca9af0b06756348b6fb4
5
5
  SHA512:
6
- metadata.gz: 82d9415210f438c7b98f17a3e3f7b16438b09a499d8d323096e5e6e6433c47a75cdd9cbb3caceddb5aff10be6f065d891de2ab105904468d131981d499e1c7e4
7
- data.tar.gz: df0cc6c2652b61237fb639edcb953cc2085740e93a1153262d1a62f54e40a5833f33e79d6db27029c1cdc8e95fd25740cd45dced8fbf2c64ba02ec8a46b76f7f
6
+ metadata.gz: 21cb5c325a92c01c08fea3cf84d3e5990b083e00136d90dffcafc14a555f6bda89127165547961da6d0532661e2f75dc31d4d3c05848d3450616bc9996c48c4f
7
+ data.tar.gz: 132a04dbc70cdc319fef1cf1348635559d96381021b0c2a864f47e78386a70aafffd093bbe07796eb8b947ae4506d8eef3d1c8687591b2c3c28745a505a0380f
@@ -16,7 +16,7 @@ module ActiveDomain
16
16
  end
17
17
 
18
18
  def invoke(event)
19
- event_type = event.class.name.split('::').last.to_sym
19
+ event_type = event.class.name.to_s
20
20
  return unless handlers.has_key? event_type
21
21
  handlers[event_type].each do |handler_method|
22
22
  handler_method.owner.new.send handler_method.name, event
@@ -35,7 +35,7 @@ module ActiveDomain
35
35
  self.class.registry.freeze.each do |handler|
36
36
  handler.public_instance_methods(false).each do |method_name|
37
37
  method = handler.instance_method method_name
38
- event_type = method_name.to_s.camelcase.to_sym
38
+ event_type = (method_name.to_s.split('__')*'/').camelcase
39
39
  raise TooManyArgumentsError if 1 != method.arity
40
40
  handlers[event_type] << method
41
41
  end
@@ -18,6 +18,8 @@ module ActiveDomain
18
18
  drb_uri = URI::Generic.build(options[:drb_server]).to_s
19
19
  DRb.start_service(drb_uri, domain)
20
20
  DRb.thread.join
21
+ rescue Interrupt
22
+ puts 'Catching Interrupt'
21
23
  end
22
24
 
23
25
  def env
@@ -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.2.0'
4
+ Gem::Version.new '0.3.0'
5
5
  end
6
6
 
7
7
  module VERSION #:nodoc:
@@ -2,6 +2,7 @@ require_relative '../spec_helper'
2
2
 
3
3
  describe ActiveDomain::CommandProcessor do
4
4
  class TestDummy
5
+ include ActiveEvent::EventType
5
6
  end
6
7
  class TestDummyProcessor
7
8
  include ActiveDomain::CommandProcessor
@@ -19,7 +20,7 @@ describe ActiveDomain::CommandProcessor do
19
20
 
20
21
  describe 'instance' do
21
22
  it 'allows event method' do
22
- magic_number = 42
23
+ magic_number = TestDummy.new
23
24
  expect(ActiveDomain::ProjectionRegistry).to receive(:invoke).with(magic_number)
24
25
  expect(ActiveDomain::EventRepository).to receive(:store).with(magic_number)
25
26
  expect(ActiveEvent::EventServer).to receive(:publish).with(magic_number)
data/spec/spec_helper.rb CHANGED
@@ -1 +1,5 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+ require 'factory_girl'
4
+
1
5
  require 'active_domain'
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.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Reischuck
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-04 00:00:00.000000000 Z
11
+ date: 2013-10-15 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.2.0
19
+ version: 0.3.0
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.2.0
26
+ version: 0.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activerecord
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -120,8 +120,22 @@ dependencies:
120
120
  - - '>='
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
+ - !ruby/object:Gem::Dependency
124
+ name: coveralls
125
+ requirement: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - '>='
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ type: :development
131
+ prerelease: false
132
+ version_requirements: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - '>='
135
+ - !ruby/object:Gem::Version
136
+ version: '0'
123
137
  description: Domain server, Command processors and routes for rails-disco
124
- email: andreas.reischuck@hicknhack-software.com
138
+ email: rails-disco@hicknhack-software.com
125
139
  executables: []
126
140
  extensions: []
127
141
  extra_rdoc_files: []