nomo 0.0.38 → 0.0.39

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.
data/lib/nomo/model.rb CHANGED
@@ -46,8 +46,8 @@ module Nomo
46
46
  page.modify
47
47
  end
48
48
 
49
- after_update modify_page_method, options.fetch(:update, {}) unless options.has_key?(:on) && !options[:on].include?(:update)
50
- after_touch modify_page_method, options.fetch(:touch, {}) unless options.has_key?(:on) && !options[:on].include?(:touch)
49
+ after_update modify_page_method, options.fetch(:update, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:update)
50
+ after_touch modify_page_method, options.fetch(:touch, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:touch)
51
51
  end
52
52
 
53
53
  def modifies(association, name, options = {})
@@ -60,10 +60,10 @@ module Nomo
60
60
  end
61
61
  end
62
62
 
63
- after_create modify_page_method, options.fetch(:create, {}) unless options.has_key?(:on) && !options[:on].include?(:create)
64
- after_update modify_page_method, options.fetch(:update, {}) unless options.has_key?(:on) && !options[:on].include?(:update)
65
- after_destroy modify_page_method, options.fetch(:destroy, {}) unless options.has_key?(:on) && !options[:on].include?(:destroy)
66
- after_touch modify_page_method, options.fetch(:touch, {}) unless options.has_key?(:on) && !options[:on].include?(:touch)
63
+ after_create modify_page_method, options.fetch(:create, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:create)
64
+ after_update modify_page_method, options.fetch(:update, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:update)
65
+ after_destroy modify_page_method, options.fetch(:destroy, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:destroy)
66
+ after_touch modify_page_method, options.fetch(:touch, {}) unless options.has_key?(:on) && ![*options[:on]].include?(:touch)
67
67
  end
68
68
  end
69
69
  end
data/lib/nomo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Nomo
2
- VERSION = "0.0.38"
2
+ VERSION = "0.0.39"
3
3
  end
data/lib/nomo.rb CHANGED
@@ -86,15 +86,17 @@ module Nomo
86
86
  end
87
87
 
88
88
  def exec
89
- for key in @updates.uniq
90
- Nomo.logger.debug("(nomo) update published -- #{key}")
91
- Nomo.redis.publish("updates", key)
92
- end
93
- @updates = []
94
- @in_multi = false
89
+ if @in_multi
90
+ for key in @updates.uniq
91
+ Nomo.logger.debug("(nomo) update published -- #{key}")
92
+ Nomo.redis.publish("updates", key)
93
+ end
94
+ @updates = []
95
+ @in_multi = false
95
96
 
96
- Nomo.logger.debug("(nomo) Nomo.exec")
97
- Nomo.redis.exec
97
+ Nomo.logger.debug("(nomo) Nomo.exec")
98
+ Nomo.redis.exec
99
+ end
98
100
  end
99
101
 
100
102
  def publish(channel, msg)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nomo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.38
4
+ version: 0.0.39
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70173080106580 !ruby/object:Gem::Requirement
16
+ requirement: &70345811248200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70173080106580
24
+ version_requirements: *70345811248200
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redis-namespace
27
- requirement: &70173080106160 !ruby/object:Gem::Requirement
27
+ requirement: &70345811247780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70173080106160
35
+ version_requirements: *70345811247780
36
36
  description: 304 Not Modified Headers made easy.
37
37
  email:
38
38
  - sausman@stackd.com