property_sets 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Appraisals +6 -0
- data/Gemfile +2 -2
- data/Rakefile +0 -1
- data/gemfiles/rails2.3.gemfile +3 -2
- data/gemfiles/rails3.2.gemfile +3 -2
- data/gemfiles/rails4.0.gemfile +20 -0
- data/lib/property_sets/property_set_model.rb +2 -8
- data/lib/property_sets/version.rb +1 -1
- data/property_sets.gemspec +2 -2
- data/test/helper.rb +6 -6
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8b5df00e29ccc0cd797287b319e2590be6da231
|
4
|
+
data.tar.gz: 7c8d678433474ed11ca89649ed4462636d5cffbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 695435a9ae1e80b85144188233235e602eeaec33389167711860fe6fc6903dc65bd76d7e0acb9286df9e1d4a2073ab3ded08779a4912ff1ae803309595597caf
|
7
|
+
data.tar.gz: 0f26718d6f50123d1516733b5083f028322b12a0ab8fcef60682865b3c336f44187ee3e033d1143d6668a8631b1dadb46fdcbbedb0ae46798629771746f37189
|
data/.travis.yml
CHANGED
@@ -8,6 +8,7 @@ script: "bundle exec rake test"
|
|
8
8
|
gemfile:
|
9
9
|
- gemfiles/rails2.3.gemfile
|
10
10
|
- gemfiles/rails3.2.gemfile
|
11
|
+
- gemfiles/rails4.0.gemfile
|
11
12
|
matrix:
|
12
13
|
exclude:
|
13
14
|
- rvm: 2.0.0
|
@@ -16,3 +17,5 @@ matrix:
|
|
16
17
|
gemfile: gemfiles/rails2.3.gemfile
|
17
18
|
- rvm: ree
|
18
19
|
gemfile: gemfiles/rails3.2.gemfile
|
20
|
+
- rvm: ree
|
21
|
+
gemfile: gemfiles/rails4.0.gemfile
|
data/Appraisals
CHANGED
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'activerecord-jdbcmysql-adapter', '1.
|
3
|
+
gem 'activerecord-jdbcmysql-adapter', '1.3.5', :platforms => :jruby
|
4
4
|
gem 'mysql2', :platforms => :ruby
|
5
5
|
|
6
6
|
gem 'bump'
|
@@ -10,7 +10,7 @@ gem 'shoulda'
|
|
10
10
|
gem 'mocha'
|
11
11
|
gem 'appraisal'
|
12
12
|
gem 'test-unit', '>= 2.5.2'
|
13
|
-
gem 'actionpack', '>= 2.3.14', '<
|
13
|
+
gem 'actionpack', '>= 2.3.14', '< 4.1'
|
14
14
|
gem 'iconv', :platforms => :ruby_20
|
15
15
|
|
16
16
|
gemspec
|
data/Rakefile
CHANGED
data/gemfiles/rails2.3.gemfile
CHANGED
@@ -2,11 +2,12 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord-jdbcmysql-adapter", "1.
|
5
|
+
gem "activerecord-jdbcmysql-adapter", "1.3.5", :platforms=>:jruby
|
6
|
+
gem "bump"
|
6
7
|
gem "rake"
|
7
8
|
gem "bundler"
|
8
9
|
gem "appraisal"
|
9
|
-
gem "actionpack", ">= 2.3.14", "<
|
10
|
+
gem "actionpack", ">= 2.3.14", "< 4.1"
|
10
11
|
gem "iconv", :platforms=>:ruby_20
|
11
12
|
gem "activerecord", "~> 2.3.14"
|
12
13
|
gem "activesupport", "~> 2.3.14"
|
data/gemfiles/rails3.2.gemfile
CHANGED
@@ -2,15 +2,16 @@
|
|
2
2
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
|
-
gem "activerecord-jdbcmysql-adapter", "1.
|
5
|
+
gem "activerecord-jdbcmysql-adapter", "1.3.5", :platforms=>:jruby
|
6
6
|
gem "mysql2", :platforms=>:ruby
|
7
|
+
gem "bump"
|
7
8
|
gem "rake"
|
8
9
|
gem "bundler"
|
9
10
|
gem "shoulda"
|
10
11
|
gem "mocha"
|
11
12
|
gem "appraisal"
|
12
13
|
gem "test-unit", ">= 2.5.2"
|
13
|
-
gem "actionpack", ">= 2.3.14", "<
|
14
|
+
gem "actionpack", ">= 2.3.14", "< 4.1"
|
14
15
|
gem "iconv", :platforms=>:ruby_20
|
15
16
|
gem "activerecord", "~> 3.2.6"
|
16
17
|
gem "activesupport", "~> 3.2.6"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
gem "activerecord-jdbcmysql-adapter", "1.3.5", :platforms=>:jruby
|
6
|
+
gem "mysql2", :platforms=>:ruby
|
7
|
+
gem "bump"
|
8
|
+
gem "rake"
|
9
|
+
gem "bundler"
|
10
|
+
gem "shoulda"
|
11
|
+
gem "mocha"
|
12
|
+
gem "appraisal"
|
13
|
+
gem "test-unit", ">= 2.5.2"
|
14
|
+
gem "actionpack", ">= 2.3.14", "< 4.1"
|
15
|
+
gem "iconv", :platforms=>:ruby_20
|
16
|
+
gem "activerecord", "~> 4.0.2"
|
17
|
+
gem "activesupport", "~> 4.0.2"
|
18
|
+
gem "protected_attributes"
|
19
|
+
|
20
|
+
gemspec :path=>"../"
|
@@ -87,10 +87,7 @@ module PropertySets
|
|
87
87
|
base.validate :validate_format_of_name
|
88
88
|
base.validate :validate_length_of_serialized_data
|
89
89
|
base.before_create :coerce_value
|
90
|
-
|
91
|
-
if ActiveRecord::VERSION::MAJOR < 4
|
92
|
-
base.attr_accessible :name, :value
|
93
|
-
end
|
90
|
+
base.attr_accessible :name, :value
|
94
91
|
end
|
95
92
|
|
96
93
|
def property(key, options = nil)
|
@@ -125,10 +122,7 @@ module PropertySets
|
|
125
122
|
belongs_to owner_class_sym
|
126
123
|
validates_presence_of owner_class_sym
|
127
124
|
validates_uniqueness_of :name, :scope => owner_class_key_sym
|
128
|
-
|
129
|
-
if ActiveRecord::VERSION::MAJOR < 4
|
130
|
-
attr_accessible owner_class_key_sym, owner_class_sym
|
131
|
-
end
|
125
|
+
attr_accessible owner_class_key_sym, owner_class_sym
|
132
126
|
end
|
133
127
|
|
134
128
|
def owner_assoc=(association)
|
data/property_sets.gemspec
CHANGED
@@ -11,8 +11,8 @@ Gem::Specification.new "property_sets", PropertySets::VERSION do |s|
|
|
11
11
|
s.homepage = 'http://github.com/zendesk/property_sets'
|
12
12
|
s.license = 'Apache License Version 2.0'
|
13
13
|
|
14
|
-
s.add_runtime_dependency("activesupport", ">= 2.3.14", "<
|
15
|
-
s.add_runtime_dependency("activerecord", ">= 2.3.14", "<
|
14
|
+
s.add_runtime_dependency("activesupport", ">= 2.3.14", "< 4.1")
|
15
|
+
s.add_runtime_dependency("activerecord", ">= 2.3.14", "< 4.1")
|
16
16
|
s.add_runtime_dependency("json")
|
17
17
|
|
18
18
|
s.files = `git ls-files`.split("\n")
|
data/test/helper.rb
CHANGED
@@ -16,11 +16,13 @@ require 'active_record'
|
|
16
16
|
require 'active_record/fixtures'
|
17
17
|
require 'shoulda'
|
18
18
|
|
19
|
-
if ActiveRecord::VERSION::MAJOR > 2
|
19
|
+
if ActiveRecord::VERSION::MAJOR > 2
|
20
20
|
if ActiveRecord::VERSION::MINOR > 1
|
21
21
|
ActiveRecord::Base.mass_assignment_sanitizer = :strict
|
22
22
|
end
|
23
|
-
|
23
|
+
if ActiveRecord::VERSION::MAJOR == 4
|
24
|
+
require 'protected_attributes'
|
25
|
+
end
|
24
26
|
ActiveRecord::Base.attr_accessible
|
25
27
|
end
|
26
28
|
|
@@ -60,10 +62,8 @@ class Account < ActiveRecord::Base
|
|
60
62
|
include PropertySets::Delegator
|
61
63
|
delegate_to_property_set :settings, :old => :hep
|
62
64
|
|
63
|
-
|
64
|
-
|
65
|
-
attr_accessible :texts_attributes
|
66
|
-
end
|
65
|
+
attr_accessible :name
|
66
|
+
attr_accessible :texts_attributes
|
67
67
|
|
68
68
|
property_set :settings do
|
69
69
|
property :foo
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: property_sets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Morten Primdahl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 2.3.14
|
20
20
|
- - <
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '4.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 2.3.14
|
30
30
|
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '4.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activerecord
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 2.3.14
|
40
40
|
- - <
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '4.1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: 2.3.14
|
50
50
|
- - <
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '4.1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: json
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- benchmark/read.rb
|
83
83
|
- gemfiles/rails2.3.gemfile
|
84
84
|
- gemfiles/rails3.2.gemfile
|
85
|
+
- gemfiles/rails4.0.gemfile
|
85
86
|
- lib/property_sets.rb
|
86
87
|
- lib/property_sets/action_view_extension.rb
|
87
88
|
- lib/property_sets/active_record_extension.rb
|