clearwater-roda 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: 4079d75740853002a2b42d3988bbcae1e7fe9585c26b64c05120235503e5117f
4
- data.tar.gz: e0b091f74ffa13553e94cf54b8aa9782119daa71d8eba3217bcbe4112b7ab955
3
+ metadata.gz: 885810ba3da4ca1d9ea2ce70d5b62af70aaad68b0ac452891cb8c0e2abee6815
4
+ data.tar.gz: b98232dd21976a3cad5b2da178b0d9cfb40160fe3690885fbebc82341abaf32d
5
5
  SHA512:
6
- metadata.gz: 6c58ff5a5bb326c3d5b3de78ae735ad5c4d351e5cb97f6d8a2643cf8ebd8b5b9ff5062ec7da2fb30d42b460bca88493f13a19c47608f87912cfb73477eed7ca6
7
- data.tar.gz: 90bff201f01635111a7b33ba7dce997b243c570a618bf4bda565d7d9583b2ebf136e4c96ae660c781526f467d58ed114809a20318b39d1b2c86a2139bb84f798
6
+ metadata.gz: 871183fe9eabbcf581f355b0bc83da6509d44d135df06a97265bb1bcd08f3449735ed6511a366e179b42c529b21bb63ca2054e167ca33358c386ba8659421d16
7
+ data.tar.gz: c80e5341b1dc5045f15ac2a4345e9cf1a5205270243bc98e4d355611478ee15ec5610ab27472941c8b2d6d5fe9bd80cf22d1355a3d37f1b362d60418f64e102c
@@ -1,5 +1,5 @@
1
1
  module Clearwater
2
2
  module Roda
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
data/templates/Gemfile CHANGED
@@ -11,7 +11,7 @@ group :development do
11
11
  # Assets from these gems won't be needed in production since they'll be
12
12
  # precompiled
13
13
  gem 'clearwater', '~> 1.0.0.rc4'
14
- gem 'grand_central'
14
+ gem 'grand_central', '~> 0.6.0'
15
15
  gem 'grand_central-dev_tools'
16
16
  gem 'clearwater-hot_loader'
17
17
  end
@@ -14,7 +14,7 @@ initial_state = AppState.new(
14
14
  counter: 0,
15
15
  )
16
16
 
17
- Store = GrandCentral::Store.new(initial_state) do |state, action|
17
+ handler = proc do |state, action|
18
18
  case action
19
19
  when Increment
20
20
  state.update counter: state.counter + 1
@@ -31,6 +31,13 @@ Store = GrandCentral::Store.new(initial_state) do |state, action|
31
31
  end
32
32
  end
33
33
 
34
+ # Allow swapping out handlers on the same store for hot-loaded code in dev.
35
+ if defined? Store
36
+ Store.handler = handler
37
+ else
38
+ Store = GrandCentral::Store.new(initial_state, &handler)
39
+ end
40
+
34
41
  # When you want to use application state in a component, you can use this module
35
42
  # to add the attribute methods to that component using the following pattern:
36
43
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearwater-roda
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Gaskins
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-17 00:00:00.000000000 Z
11
+ date: 2017-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler