audited_change_set 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -2
- data/VERSION +1 -1
- data/audited_change_set.gemspec +26 -35
- data/lib/audited_change_set/change.rb +3 -5
- data/spec/spec_helper.rb +1 -0
- metadata +50 -79
- data/.gitignore +0 -22
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gem.description = gem.summary
|
10
10
|
gem.email = "dchelimsky@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/dchelimsky/audited_change_set"
|
12
|
-
gem.authors = ["David Chelimsky","Brian Tatnall", "Nate Jackson", "Corey Haines"]
|
12
|
+
gem.authors = ["David Chelimsky","Brian Tatnall", "Nate Jackson", "Corey Haines", "Justin Dell"]
|
13
13
|
gem.add_dependency "acts_as_audited", ">= 1.1.1"
|
14
14
|
gem.add_development_dependency "rspec", ">= 2.0.0.beta.8"
|
15
15
|
gem.add_development_dependency "sqlite3-ruby", ">= 1.2.5"
|
@@ -29,7 +29,6 @@ task :default => :spec
|
|
29
29
|
require 'rake/rdoctask'
|
30
30
|
Rake::RDocTask.new do |rdoc|
|
31
31
|
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
32
|
-
|
33
32
|
rdoc.rdoc_dir = 'rdoc'
|
34
33
|
rdoc.title = "audited_change_set #{version}"
|
35
34
|
rdoc.rdoc_files.include('README*')
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/audited_change_set.gemspec
CHANGED
@@ -1,56 +1,47 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.0.
|
7
|
+
s.name = "audited_change_set"
|
8
|
+
s.version = "0.0.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["David Chelimsky", "Brian Tatnall", "Nate Jackson", "Corey Haines"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
11
|
+
s.authors = ["David Chelimsky", "Brian Tatnall", "Nate Jackson", "Corey Haines", "Justin Dell"]
|
12
|
+
s.date = "2012-08-09"
|
13
|
+
s.description = "change_set for acts_as_audited"
|
14
|
+
s.email = "dchelimsky@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
|
17
|
+
"README.markdown"
|
18
18
|
]
|
19
19
|
s.files = [
|
20
20
|
".document",
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
"spec/audited_change_set/change_spec.rb",
|
33
|
-
"spec/db/schema.rb",
|
34
|
-
"spec/spec_helper.rb",
|
35
|
-
"specs.watchr"
|
36
|
-
]
|
37
|
-
s.homepage = %q{http://github.com/dchelimsky/audited_change_set}
|
38
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
39
|
-
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = %q{1.3.6}
|
41
|
-
s.summary = %q{change_set for acts_as_audited}
|
42
|
-
s.test_files = [
|
21
|
+
".rspec",
|
22
|
+
"LICENSE",
|
23
|
+
"README.markdown",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"audited_change_set.gemspec",
|
27
|
+
"lib/audited_change_set.rb",
|
28
|
+
"lib/audited_change_set/change.rb",
|
29
|
+
"lib/audited_change_set/change_set.rb",
|
30
|
+
"spec/audited_change_set/change_set_spec.rb",
|
31
|
+
"spec/audited_change_set/change_spec.rb",
|
43
32
|
"spec/db/schema.rb",
|
44
|
-
|
45
|
-
|
46
|
-
"spec/spec_helper.rb"
|
33
|
+
"spec/spec_helper.rb",
|
34
|
+
"specs.watchr"
|
47
35
|
]
|
36
|
+
s.homepage = "http://github.com/dchelimsky/audited_change_set"
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = "1.8.15"
|
39
|
+
s.summary = "change_set for acts_as_audited"
|
48
40
|
|
49
41
|
if s.respond_to? :specification_version then
|
50
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
51
42
|
s.specification_version = 3
|
52
43
|
|
53
|
-
if Gem::Version.new(Gem::
|
44
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
45
|
s.add_runtime_dependency(%q<acts_as_audited>, [">= 1.1.1"])
|
55
46
|
s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.8"])
|
56
47
|
s.add_development_dependency(%q<sqlite3-ruby>, [">= 1.2.5"])
|
@@ -44,7 +44,7 @@ module AuditedChangeSet
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def transform_value(val)
|
47
|
-
hook(:transform_value, val) || (
|
47
|
+
hook(:transform_value, val) || (association_class ? associated_value(val) : val.to_s)
|
48
48
|
end
|
49
49
|
|
50
50
|
def associated_value(val)
|
@@ -60,6 +60,8 @@ module AuditedChangeSet
|
|
60
60
|
name.to_s =~ /(.*)_id$/
|
61
61
|
$1.camelize.constantize
|
62
62
|
end
|
63
|
+
ensure
|
64
|
+
nil
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
@@ -72,10 +74,6 @@ module AuditedChangeSet
|
|
72
74
|
hook(:get_associated_object, id) || association_class.find_by_id(id)
|
73
75
|
end
|
74
76
|
|
75
|
-
def association_field?
|
76
|
-
name.ends_with? "_id"
|
77
|
-
end
|
78
|
-
|
79
77
|
def name_without_id
|
80
78
|
name.chomp "_id"
|
81
79
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,81 +1,62 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: audited_change_set
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 4
|
9
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.5
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- David Chelimsky
|
13
9
|
- Brian Tatnall
|
14
10
|
- Nate Jackson
|
15
11
|
- Corey Haines
|
12
|
+
- Justin Dell
|
16
13
|
autorequire:
|
17
14
|
bindir: bin
|
18
15
|
cert_chain: []
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
dependencies:
|
23
|
-
- !ruby/object:Gem::Dependency
|
16
|
+
date: 2012-08-09 00:00:00.000000000 Z
|
17
|
+
dependencies:
|
18
|
+
- !ruby/object:Gem::Dependency
|
24
19
|
name: acts_as_audited
|
25
|
-
|
26
|
-
|
27
|
-
requirements:
|
28
|
-
- -
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
segments:
|
31
|
-
- 1
|
32
|
-
- 1
|
33
|
-
- 1
|
20
|
+
requirement: &70126637171520 !ruby/object:Gem::Requirement
|
21
|
+
none: false
|
22
|
+
requirements:
|
23
|
+
- - ! '>='
|
24
|
+
- !ruby/object:Gem::Version
|
34
25
|
version: 1.1.1
|
35
26
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rspec
|
39
27
|
prerelease: false
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
- beta
|
49
|
-
- 8
|
28
|
+
version_requirements: *70126637171520
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rspec
|
31
|
+
requirement: &70126637170220 !ruby/object:Gem::Requirement
|
32
|
+
none: false
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
50
36
|
version: 2.0.0.beta.8
|
51
37
|
type: :development
|
52
|
-
version_requirements: *id002
|
53
|
-
- !ruby/object:Gem::Dependency
|
54
|
-
name: sqlite3-ruby
|
55
38
|
prerelease: false
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
39
|
+
version_requirements: *70126637170220
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: sqlite3-ruby
|
42
|
+
requirement: &70126637169340 !ruby/object:Gem::Requirement
|
43
|
+
none: false
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
64
47
|
version: 1.2.5
|
65
48
|
type: :development
|
66
|
-
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: *70126637169340
|
67
51
|
description: change_set for acts_as_audited
|
68
52
|
email: dchelimsky@gmail.com
|
69
53
|
executables: []
|
70
|
-
|
71
54
|
extensions: []
|
72
|
-
|
73
|
-
extra_rdoc_files:
|
55
|
+
extra_rdoc_files:
|
74
56
|
- LICENSE
|
75
57
|
- README.markdown
|
76
|
-
files:
|
58
|
+
files:
|
77
59
|
- .document
|
78
|
-
- .gitignore
|
79
60
|
- .rspec
|
80
61
|
- LICENSE
|
81
62
|
- README.markdown
|
@@ -90,38 +71,28 @@ files:
|
|
90
71
|
- spec/db/schema.rb
|
91
72
|
- spec/spec_helper.rb
|
92
73
|
- specs.watchr
|
93
|
-
has_rdoc: true
|
94
74
|
homepage: http://github.com/dchelimsky/audited_change_set
|
95
75
|
licenses: []
|
96
|
-
|
97
76
|
post_install_message:
|
98
|
-
rdoc_options:
|
99
|
-
|
100
|
-
require_paths:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
101
79
|
- lib
|
102
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
requirements:
|
111
|
-
- -
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
|
114
|
-
- 0
|
115
|
-
version: "0"
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
116
92
|
requirements: []
|
117
|
-
|
118
93
|
rubyforge_project:
|
119
|
-
rubygems_version: 1.
|
94
|
+
rubygems_version: 1.8.15
|
120
95
|
signing_key:
|
121
96
|
specification_version: 3
|
122
97
|
summary: change_set for acts_as_audited
|
123
|
-
test_files:
|
124
|
-
- spec/db/schema.rb
|
125
|
-
- spec/audited_change_set/change_spec.rb
|
126
|
-
- spec/audited_change_set/change_set_spec.rb
|
127
|
-
- spec/spec_helper.rb
|
98
|
+
test_files: []
|