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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4e1f51f9567dd18fa291875731e3a41c9772461
4
- data.tar.gz: e97629c249e9dd6632892f377b55d551587e1dbb
3
+ metadata.gz: a8b5df00e29ccc0cd797287b319e2590be6da231
4
+ data.tar.gz: 7c8d678433474ed11ca89649ed4462636d5cffbb
5
5
  SHA512:
6
- metadata.gz: 754e8fe910199e3e80a80bfd138c69b2c1dcc81b744095fd1f091442df5ee186bda98c3c57f8de8a485172e2bc2d8a338509af34662e775f8d4fe8cd6710b5bc
7
- data.tar.gz: eb122494452754f9f09b1826fbf653c7eafa730232cda1db6a3462db828d0a0830277396ad38d61e50e5233c37b05f18b6aa5e272f011b38c2b5f0d7bf1b3eee
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
@@ -12,3 +12,9 @@ appraise "rails3.2" do
12
12
  gem "activerecord", "~> 3.2.6"
13
13
  gem "activesupport", "~> 3.2.6"
14
14
  end
15
+
16
+ appraise "rails4.0" do
17
+ gem "activerecord", "~> 4.0.2"
18
+ gem "activesupport", "~> 4.0.2"
19
+ gem "protected_attributes"
20
+ end
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'activerecord-jdbcmysql-adapter', '1.2.2', :platforms => :jruby
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', '< 3.3'
13
+ gem 'actionpack', '>= 2.3.14', '< 4.1'
14
14
  gem 'iconv', :platforms => :ruby_20
15
15
 
16
16
  gemspec
data/Rakefile CHANGED
@@ -5,7 +5,6 @@ require 'bump/tasks'
5
5
 
6
6
  require 'rake/testtask'
7
7
  Rake::TestTask.new do |test|
8
- test.libs << 'lib'
9
8
  test.pattern = 'test/**/test_*.rb'
10
9
  test.verbose = true
11
10
  end
@@ -2,11 +2,12 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord-jdbcmysql-adapter", "1.2.2", :platforms=>:jruby
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", "< 3.3"
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"
@@ -2,15 +2,16 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activerecord-jdbcmysql-adapter", "1.2.2", :platforms=>:jruby
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", "< 3.3"
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)
@@ -1,3 +1,3 @@
1
1
  module PropertySets
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
  end
@@ -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", "< 3.3")
15
- s.add_runtime_dependency("activerecord", ">= 2.3.14", "< 3.3")
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 && ActiveRecord::VERSION::MAJOR < 4
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
- if ActiveRecord::VERSION::MAJOR < 4
64
- attr_accessible :name
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.0
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-01-30 00:00:00.000000000 Z
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: '3.3'
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: '3.3'
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: '3.3'
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: '3.3'
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