active_attr 0.8.5 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of active_attr might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6bb7e53f2054586e55a4525ae90cb876f9547a80
4
- data.tar.gz: 4b974df36856198c997f7c4d4cc1f69de62324a0
3
+ metadata.gz: 90382ab62bab088569e23d03aeac97bfc4c1dbe5
4
+ data.tar.gz: 7946b7a58849b4e48a5f44472a57a1e938545dcb
5
5
  SHA512:
6
- metadata.gz: 319453d2ec1608a29f1d2c4d76f24bc6339bb9e53def143aa73eb6af41d5732a36eb03c6d390d43a7200c7e9202f11146009dab765178f27a169c8d7e7a8a750
7
- data.tar.gz: 4014a7911ae766cf7f37dc4df20a36404e45ddd4a83a641914aca6c0cd6054626ae1a1b36f7dd7e1c55d5b70fbf344cd2624ae92b7f5b0989596d09f9e56189f
6
+ metadata.gz: 01069508514442b05ed9d522ec7a634df5a933022a97e5d6c6efc720dee9b23013b794576d5a8abafef3934fba2c1e5e4aab839a219720c2f55a5798878b3751
7
+ data.tar.gz: 3ee86018d579f8de1c0890fb83910c31d257b3d9622d6b202e5e7910e3deb9e0195ebec2659fa6364f623ca4427da51e8c4dae107af4161bae3268d1ef2a4868
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.2
1
+ 2.3.0
data/.travis.yml CHANGED
@@ -1,10 +1,14 @@
1
1
  language: ruby
2
+ sudo: false
2
3
  rvm:
3
4
  - ree
4
5
  - 1.9.2
5
6
  - 1.9.3
6
7
  - 2.0.0
7
8
  - 2.1
9
+ - 2.2.4
10
+ - 2.3.0
11
+ before_install: gem install bundler
8
12
  bundler_args: --without development
9
13
  gemfile:
10
14
  - gemfiles/rails_3_0.gemfile
@@ -12,6 +16,7 @@ gemfile:
12
16
  - gemfiles/rails_3_2.gemfile
13
17
  - gemfiles/rails_4_0.gemfile
14
18
  - gemfiles/rails_4_1.gemfile
19
+ - gemfiles/rails_4_2.gemfile
15
20
  - Gemfile
16
21
  - gemfiles/rails_head.gemfile
17
22
  matrix:
@@ -26,11 +31,27 @@ matrix:
26
31
  gemfile: gemfiles/rails_4_1.gemfile
27
32
  - rvm: 1.9.2
28
33
  gemfile: gemfiles/rails_4_1.gemfile
34
+ - rvm: ree
35
+ gemfile: gemfiles/rails_4_2.gemfile
36
+ - rvm: 1.9.2
37
+ gemfile: gemfiles/rails_4_2.gemfile
29
38
  - rvm: ree
30
39
  gemfile: Gemfile
31
40
  - rvm: 1.9.2
32
41
  gemfile: Gemfile
42
+ - rvm: 1.9.3
43
+ gemfile: Gemfile
44
+ - rvm: 2.0.0
45
+ gemfile: Gemfile
46
+ - rvm: 2.1
47
+ gemfile: Gemfile
33
48
  - rvm: ree
34
49
  gemfile: gemfiles/rails_head.gemfile
35
50
  - rvm: 1.9.2
36
51
  gemfile: gemfiles/rails_head.gemfile
52
+ - rvm: 1.9.3
53
+ gemfile: gemfiles/rails_head.gemfile
54
+ - rvm: 2.0.0
55
+ gemfile: gemfiles/rails_head.gemfile
56
+ - rvm: 2.1
57
+ gemfile: gemfiles/rails_head.gemfile
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ # ActiveAttr 0.9.0 (January 27, 2016) #
2
+
3
+ * ActiveAttr now supports Rails 5.0.0
4
+ * Following the lead of Rails 5, Serialization no longer includes XML
5
+ serialization by default. Include the ActiveModel::Serializers::Xml
6
+ module to get this functionality. With Rails 5. You'll need to
7
+ install the activemodel-serializers-xml gem, which is not yet
8
+ published on RubyGems.org
9
+
1
10
  # ActiveAttr 0.8.5 (December 22, 2014) #
2
11
 
3
12
  * ActiveAttr now supports Rails 4.2.0 (Jesse B. Hannah)
data/Gemfile CHANGED
@@ -2,14 +2,15 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec :development_group => :test
4
4
 
5
- gem "activemodel", "~> 4.2.0"
6
- gem "activesupport", "~> 4.2.0"
7
- gem "actionpack", "~> 4.2.0", :group => :test
5
+ gem "activemodel", ">= 5.0.0.beta1", "< 5.1"
6
+ gem "activesupport", ">= 5.0.0.beta1", "< 5.1"
7
+ gem "actionpack", ">= 5.0.0.beta1", "< 5.1", :group => :test
8
+ gem "activemodel-serializers-xml", :group => :test, :git => "git://github.com/rails/activemodel-serializers-xml.git"
8
9
  gem "protected_attributes", :group => :test
9
10
 
10
11
  group :development do
11
12
  gem "debugger", :platforms => :mri_19
12
- gem "debugger2", :platforms => [:mri_20, :mri_21]
13
+ gem "byebug", :platforms => [:mri_20, :mri_21, :mri_22, :mri_23]
13
14
  gem "growl"
14
15
  gem "guard"
15
16
  gem "guard-bundler"
@@ -18,7 +19,7 @@ group :development do
18
19
  gem "rdiscount"
19
20
  gem "rdoc"
20
21
  gem "ruby-debug", :platforms => :mri_18
21
- gem "spec_coverage", :platforms => [:mri_19, :mri_20, :mri_21], :git => "https://github.com/getaroom/spec_coverage.git"
22
- gem "travis-lint"
22
+ gem "spec_coverage", :platforms => [:mri_19, :mri_20, :mri_21, :mri_22, :mri_23], :git => "https://github.com/getaroom/spec_coverage.git"
23
+ gem "travis"
23
24
  gem "yard"
24
25
  end
data/README.md CHANGED
@@ -158,11 +158,11 @@ are silently ignored.
158
158
 
159
159
  class Person
160
160
  include ActiveAttr::MassAssignment
161
- attr_accessor :first_name, :last_name
161
+ attr_accessor :first_name, :last_name, :age
162
162
  end
163
163
 
164
- person = Person.new(:first_name => "Chris")
165
- person.attributes = { :last_name => "Griego" }
164
+ person = Person.new(:first_name => "Christopher", :last_name => "Griego")
165
+ person.attributes = { :first_name => "Chris", :age => 21 }
166
166
  person.first_name #=> "Chris"
167
167
  person.last_name #=> "Griego"
168
168
 
data/active_attr.gemspec CHANGED
@@ -15,12 +15,13 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = ActiveAttr::VERSION
17
17
 
18
- gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 5.0"
19
- gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 5.0"
18
+ gem.add_runtime_dependency "activemodel", ">= 3.0.2", "< 5.1"
19
+ gem.add_runtime_dependency "activesupport", ">= 3.0.2", "< 5.1"
20
20
 
21
21
  gem.add_development_dependency "bundler", "~> 1.0"
22
22
  gem.add_development_dependency "factory_girl", ">= 2.2", "< 5.0"
23
- gem.add_development_dependency "rake", ">= 0.9.0", "< 10.4"
23
+ gem.add_development_dependency "minitest"
24
+ gem.add_development_dependency "rake", ">= 0.9.0", "< 10.6"
24
25
  gem.add_development_dependency "rspec", "~> 3.0"
25
26
  gem.add_development_dependency "tzinfo"
26
27
  end
@@ -10,6 +10,10 @@ if RUBY_VERSION < "1.9.3"
10
10
  gem "i18n", "< 0.7"
11
11
  end
12
12
 
13
+ if RUBY_VERSION < "1.9.3"
14
+ gem "rack-cache", "< 1.3", :group => :test
15
+ end
16
+
13
17
  gem "activemodel", "~> 3.2.0"
14
18
  gem "activesupport", "~> 3.2.0"
15
19
  gem "strong_parameters", ">= 0.2.0", :group => :test
@@ -0,0 +1,8 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :development_group => :test, :path => ".."
4
+
5
+ gem "activemodel", "~> 4.2.0"
6
+ gem "activesupport", "~> 4.2.0"
7
+ gem "actionpack", "~> 4.2.0", :group => :test
8
+ gem "protected_attributes", :group => :test
@@ -8,5 +8,6 @@ git "git://github.com/rails/rails.git" do
8
8
  gem "actionpack", :group => :test
9
9
  end
10
10
 
11
- gem "protected_attributes", :git => "git://github.com/rails/protected_attributes.git", :group => :test
12
- gem "rack", :git => "git://github.com/rack/rack.git", :group => :test
11
+ gem "activemodel-serializers-xml", :group => :test, :git => "git://github.com/rails/activemodel-serializers-xml.git"
12
+ gem "protected_attributes", :group => :test, :git => "git://github.com/rails/protected_attributes.git"
13
+ gem "rack", :group => :test, :git => "git://github.com/rack/rack.git"
@@ -20,6 +20,5 @@ module ActiveAttr
20
20
  include Attributes
21
21
  include MassAssignment
22
22
  include ActiveModel::Serializers::JSON
23
- include ActiveModel::Serializers::Xml
24
23
  end
25
24
  end
@@ -1,5 +1,5 @@
1
1
  module ActiveAttr
2
2
  # Complete version string
3
3
  # @since 0.1.0
4
- VERSION = "0.8.5"
4
+ VERSION = "0.9.0"
5
5
  end
@@ -81,13 +81,6 @@ module ActiveAttr
81
81
  model_class.new.from_json(model.to_json).first_name.should == "Chris"
82
82
  end
83
83
 
84
- it "serializes to/from XML" do
85
- model.first_name = "Chris"
86
- model.last_name = "Griego"
87
- model.age = 21
88
- model_class.new.from_xml(model.to_xml).first_name.should == "Chris"
89
- end
90
-
91
84
  it "supports attribute name translation" do
92
85
  model_class.human_attribute_name(:first_name).should == "First name"
93
86
  end
@@ -1,5 +1,6 @@
1
1
  require "spec_helper"
2
2
  require "active_attr/serialization"
3
+ require "active_model/serializers/xml"
3
4
  require "active_support/core_ext/hash/conversions"
4
5
  require "active_support/json/decoding"
5
6
 
@@ -8,6 +9,7 @@ module ActiveAttr
8
9
  let :model_class do
9
10
  Class.new do
10
11
  include Serialization
12
+ include ActiveModel::Serializers::Xml
11
13
  attribute :first_name
12
14
 
13
15
  def self.name
@@ -6,15 +6,15 @@ shared_examples_for "ActiveModel" do
6
6
  begin
7
7
  require "minitest/assertions"
8
8
  include Minitest::Assertions
9
+ rescue LoadError
10
+ require "minitest/unit"
11
+ include MiniTest::Assertions
12
+ end
9
13
 
10
- attr_writer :assertions
14
+ attr_writer :assertions
11
15
 
12
- def assertions
13
- @assertions ||= 0
14
- end
15
- rescue LoadError
16
- require "test/unit/assertions"
17
- include Test::Unit::Assertions
16
+ def assertions
17
+ @assertions ||= 0
18
18
  end
19
19
 
20
20
  before { @model = subject }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_attr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Griego
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-22 00:00:00.000000000 Z
12
+ date: 2016-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: 3.0.2
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5.0'
23
+ version: '5.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: 3.0.2
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5.0'
33
+ version: '5.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: activesupport
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -40,7 +40,7 @@ dependencies:
40
40
  version: 3.0.2
41
41
  - - "<"
42
42
  - !ruby/object:Gem::Version
43
- version: '5.0'
43
+ version: '5.1'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
@@ -50,7 +50,7 @@ dependencies:
50
50
  version: 3.0.2
51
51
  - - "<"
52
52
  - !ruby/object:Gem::Version
53
- version: '5.0'
53
+ version: '5.1'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: bundler
56
56
  requirement: !ruby/object:Gem::Requirement
@@ -85,6 +85,20 @@ dependencies:
85
85
  - - "<"
86
86
  - !ruby/object:Gem::Version
87
87
  version: '5.0'
88
+ - !ruby/object:Gem::Dependency
89
+ name: minitest
90
+ requirement: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ type: :development
96
+ prerelease: false
97
+ version_requirements: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
88
102
  - !ruby/object:Gem::Dependency
89
103
  name: rake
90
104
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +108,7 @@ dependencies:
94
108
  version: 0.9.0
95
109
  - - "<"
96
110
  - !ruby/object:Gem::Version
97
- version: '10.4'
111
+ version: '10.6'
98
112
  type: :development
99
113
  prerelease: false
100
114
  version_requirements: !ruby/object:Gem::Requirement
@@ -104,7 +118,7 @@ dependencies:
104
118
  version: 0.9.0
105
119
  - - "<"
106
120
  - !ruby/object:Gem::Version
107
- version: '10.4'
121
+ version: '10.6'
108
122
  - !ruby/object:Gem::Dependency
109
123
  name: rspec
110
124
  requirement: !ruby/object:Gem::Requirement
@@ -158,6 +172,7 @@ files:
158
172
  - gemfiles/rails_3_2.gemfile
159
173
  - gemfiles/rails_4_0.gemfile
160
174
  - gemfiles/rails_4_1.gemfile
175
+ - gemfiles/rails_4_2.gemfile
161
176
  - gemfiles/rails_head.gemfile
162
177
  - lib/active_attr.rb
163
178
  - lib/active_attr/attribute_defaults.rb
@@ -250,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
265
  version: '0'
251
266
  requirements: []
252
267
  rubyforge_project:
253
- rubygems_version: 2.4.2
268
+ rubygems_version: 2.5.1
254
269
  signing_key:
255
270
  specification_version: 4
256
271
  summary: What ActiveModel left out