active_attr_extended 0.9.0 → 0.9.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.travis.yml +9 -0
- data/Appraisals +15 -0
- data/README.md +0 -3
- data/Rakefile +5 -0
- data/active_attr_extended.gemspec +2 -0
- data/gemfiles/active_attr_0.6.0.gemfile +7 -0
- data/gemfiles/active_attr_0.7.0.gemfile +7 -0
- data/gemfiles/active_attr_0.8.5.gemfile +7 -0
- data/gemfiles/active_attr_0.9.0.gemfile +7 -0
- data/lib/active_attr_extended.rb +8 -1
- data/lib/active_attr_extended/version.rb +1 -1
- metadata +34 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06a0705054e8c8e671c551da25c932ff2ab5cccb
|
4
|
+
data.tar.gz: 02865066347ada684090096e58a6411d1f44917b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7036235bbf490f3c899ad0d7741bd26532b621c8ecb0a85c4fafba016e2e94c9dc428b755bc1dd7a67c14cc4dcbb12ef2f057982585f0b559a72d173de4379fd
|
7
|
+
data.tar.gz: dce76a1807a6e65eddd222dbcc8d713fd66212bd8f97f6fb18a4524bc9c48581c062fe53104e1240ae982e428ecf299d9d561545e3990788f74b13752a34b490
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
+
- 2.3.0
|
3
4
|
- 2.2.4
|
5
|
+
- 2.1.8
|
6
|
+
- 2.0.0
|
7
|
+
- 1.9.3
|
8
|
+
gemfiles:
|
9
|
+
- gemfiles/active_attr_0.6.0.gemfile
|
10
|
+
- gemfiles/active_attr_0.7.0.gemfile
|
11
|
+
- gemfiles/active_attr_0.8.5.gemfile
|
12
|
+
- gemfiles/active_attr_0.9.0.gemfile
|
4
13
|
before_install: gem install bundler -v 1.11.2
|
data/Appraisals
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
appraise "active_attr-0.9.0" do
|
2
|
+
gem "active_attr", "0.9.0"
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise "active_attr-0.8.5" do
|
6
|
+
gem "active_attr", "0.8.5"
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "active_attr-0.7.0" do
|
10
|
+
gem "active_attr", "0.7.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "active_attr-0.6.0" do
|
14
|
+
gem "active_attr", "0.6.0"
|
15
|
+
end
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# ActiveAttrExtended
|
2
2
|
|
3
3
|
[![Build History][travis badge]][travis]
|
4
|
-
[![Code Climate][codeclimate badge]][codeclimate]
|
5
4
|
|
6
5
|
ActiveAttrExtended is an extension of ActiveAttr to include Arrays and Hashes as
|
7
6
|
valid attribute types.
|
@@ -22,8 +21,6 @@ The biggest difference is the ability to use Arrays and Hashes as attribute type
|
|
22
21
|
|
23
22
|
[api]: http://rubydoc.info/gems/active_attr_extended
|
24
23
|
[aa_api]: http://rubydoc.info/gems/active_attr
|
25
|
-
[codeclimate badge]: https://codeclimate.com/github/haruska/active_attr_extended.png
|
26
|
-
[codeclimate]: https://codeclimate.com/github/haruska/active_attr_extended
|
27
24
|
[rubygems]: http://rubygems.org/gems/active_attr_extended
|
28
25
|
[protected_attributes]: https://github.com/rails/protected_attributes
|
29
26
|
[strong_parameters]: https://github.com/rails/strong_parameters
|
data/Rakefile
CHANGED
@@ -20,7 +20,9 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "active_attr", ">= 0.6.0"
|
22
22
|
|
23
|
+
spec.add_development_dependency "appraisal", "~> 2.1.0"
|
23
24
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
25
|
spec.add_development_dependency "rake", "~> 10.0"
|
25
26
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "wwtd", "~> 1.3.0"
|
26
28
|
end
|
data/lib/active_attr_extended.rb
CHANGED
@@ -7,7 +7,8 @@ module ActiveAttrExtended; end
|
|
7
7
|
|
8
8
|
|
9
9
|
# Reassign the typecaster mapping to include collections
|
10
|
-
ActiveAttr::Typecasting.module_eval { send(:remove_const, :TYPECASTER_MAP) }
|
10
|
+
ActiveAttr::Typecasting.module_eval { send(:remove_const, :TYPECASTER_MAP) if defined?(ActiveAttr::Typecasting::TYPECASTER_MAP) }
|
11
|
+
|
11
12
|
module ActiveAttr
|
12
13
|
module Typecasting
|
13
14
|
# @private
|
@@ -23,5 +24,11 @@ module ActiveAttr
|
|
23
24
|
Object => ObjectTypecaster,
|
24
25
|
String => StringTypecaster
|
25
26
|
}.freeze
|
27
|
+
|
28
|
+
# redefine for active_attr <= 0.7.0
|
29
|
+
def typecaster_for(type)
|
30
|
+
typecaster = TYPECASTER_MAP[type]
|
31
|
+
typecaster.new if typecaster
|
32
|
+
end
|
26
33
|
end
|
27
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_attr_extended
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.0
|
4
|
+
version: 0.9.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Haruska
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.6.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: appraisal
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.1.0
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.1.0
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +80,20 @@ dependencies:
|
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: wwtd
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.3.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.3.0
|
69
97
|
description: An extension of the active_attr gem, adding Arrays and Hashes as valid
|
70
98
|
attribute types. Create plain old ruby models without reinventing the wheel.
|
71
99
|
email:
|
@@ -80,6 +108,7 @@ files:
|
|
80
108
|
- ".rspec"
|
81
109
|
- ".ruby-version"
|
82
110
|
- ".travis.yml"
|
111
|
+
- Appraisals
|
83
112
|
- Gemfile
|
84
113
|
- LICENSE.txt
|
85
114
|
- README.md
|
@@ -87,6 +116,10 @@ files:
|
|
87
116
|
- active_attr_extended.gemspec
|
88
117
|
- bin/console
|
89
118
|
- bin/setup
|
119
|
+
- gemfiles/active_attr_0.6.0.gemfile
|
120
|
+
- gemfiles/active_attr_0.7.0.gemfile
|
121
|
+
- gemfiles/active_attr_0.8.5.gemfile
|
122
|
+
- gemfiles/active_attr_0.9.0.gemfile
|
90
123
|
- lib/active_attr_extended.rb
|
91
124
|
- lib/active_attr_extended/typecasting/array_typecaster.rb
|
92
125
|
- lib/active_attr_extended/typecasting/hash_typecaster.rb
|