kentouzu 0.0.10 → 0.0.11

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/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v0.0.11
2
+
3
+ * Save now merges data from Kentouzu.controller_info.
4
+
1
5
  ## v0.0.10
2
6
 
3
7
  * Fixed `all_with_reified_drafts` so that it actually takes a block.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- kentouzu (0.0.10)
4
+ kentouzu (0.0.11)
5
5
  activerecord (>= 3.0)
6
6
  railties (>= 3.0)
7
7
 
@@ -89,8 +89,17 @@ module Kentouzu
89
89
 
90
90
  base.send :define_method, :save do
91
91
  if switched_on? && save_draft?
92
- draft = Draft.new(:item_type => self.class.base_class.to_s, :item_id => self.id, :event => self.persisted? ? 'update' : 'create', :source_type => Kentouzu.source.present? ? Kentouzu.source.class.to_s : nil, :source_id => Kentouzu.source.present? ? Kentouzu.source.id : nil, :object => self.to_yaml)
93
-
92
+ data = {
93
+ :item_type => self.class.base_class.to_s,
94
+ :item_id => self.id,
95
+ :event => self.persisted? ? 'update' : 'create',
96
+ :source_type => Kentouzu.source.present? ? Kentouzu.source.class.to_s : nil,
97
+ :source_id => Kentouzu.source.present? ? Kentouzu.source.id : nil,
98
+ :object => self.to_yaml
99
+ }
100
+ data.merge!(Kentouzu.controller_info || {})
101
+
102
+ draft = Draft.new(data)
94
103
  draft.save
95
104
  else
96
105
  default_save.bind(self).call
@@ -1,3 +1,3 @@
1
1
  module Kentouzu
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kentouzu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-09 00:00:00.000000000 Z
12
+ date: 2013-10-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -259,7 +259,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
259
  version: '0'
260
260
  segments:
261
261
  - 0
262
- hash: 671730910949720598
262
+ hash: -2993608717395902815
263
263
  required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  none: false
265
265
  requirements:
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: '0'
269
269
  segments:
270
270
  - 0
271
- hash: 671730910949720598
271
+ hash: -2993608717395902815
272
272
  requirements: []
273
273
  rubyforge_project: kentouzu
274
274
  rubygems_version: 1.8.25