event_sourced_record 0.1.0 → 0.1.1

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: 11467089bb5e302e5ba7458442510f7c635a9665
4
- data.tar.gz: 6eb6064de3952fc90fc8ddba4aea5cf8b417e220
3
+ metadata.gz: 572708800666a6ac438befd0004e290e42cde341
4
+ data.tar.gz: bd813aa2a7f22f68fd9578c4793725c8e990a57f
5
5
  SHA512:
6
- metadata.gz: e6d3a67f2edaf5c8d3907ea7eb2c9423fa39508542673acdcf3b881cabf05301b65893fa6057cfecf393e99f44f07f37afc7a5ab5d07049dea8b57a9ba24992e
7
- data.tar.gz: d3ede2905cfacc55d72692e469c7d954eec68fa58b0221b542a38c76fdfea23eb6cc412f627941c7bdf15e36b05d97a0af2229b62bb08fba45b9ae8f780da532
6
+ metadata.gz: c7dd4787019fa7924f435bf9e62515a77ee3df7f201a13763868296fea317ace10f1bdcc4fe660b49eeaf7254358d6017f5725d76e05bde3cdffa61c34236e02
7
+ data.tar.gz: 6271f822d88dd64ebc65d0c22800596a5674393354b0110b0e64b17c598f7329c19673dddf6ab1171954ed80b1d95d43667eef85135dfdb9bc37278ad635273c
@@ -1,3 +1,3 @@
1
1
  module EventSourcedRecord
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -10,7 +10,8 @@ class EventSourcedRecord::ObserverGenerator < Rails::Generators::NamedBase
10
10
 
11
11
  def create_application_observer_hook
12
12
  application do
13
- "config.active_record.observers = :#{file_name}"
13
+ "config.active_record.observers ||= []
14
+ config.active_record.observers << :#{file_name}"
14
15
  end
15
16
  end
16
17
 
@@ -16,4 +16,10 @@ class EventSourcedRecord::ObserverGeneratorTest < Rails::Generators::TestCase
16
16
  test "creates a file for the observer" do
17
17
  assert_file("app/observers/subscription_event_observer.rb")
18
18
  end
19
+
20
+ test "appends to the observer list in application.rb" do
21
+ assert_file("config/application.rb") do |contents|
22
+ assert_match(/config.active_record.observers \|\|= \[\]/, contents)
23
+ end
24
+ end
19
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: event_sourced_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francis Hwang