attribution 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ruby-version +1 -0
- data/attribution.gemspec +1 -1
- data/lib/attribution/version.rb +1 -1
- data/lib/attribution.rb +5 -1
- data/test/attribution_test.rb +22 -0
- metadata +14 -21
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 47f71dbe5313d245cc8548a49367c9ce1f33a4c0
|
4
|
+
data.tar.gz: 88bffa818cdb84d3a2c3575972af941a5e47e339
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7d6660fca38237e02cd6b042b8c67ad8c4de68e29a70997eb96f0522068562d47455dec03d4855b50f7a4d7b8a9245279cb9276489f7a9827d96799f75a6a034
|
7
|
+
data.tar.gz: 7c1da374f1d0728561d20d6e02179f44c3e7554029e2562616cafc5690f89cc4bd88b3898bfd0f94da36a505399605d011d1bf5fa9608ffc70a7bdd4940ec420
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0-p0
|
data/attribution.gemspec
CHANGED
data/lib/attribution/version.rb
CHANGED
data/lib/attribution.rb
CHANGED
data/test/attribution_test.rb
CHANGED
@@ -76,6 +76,24 @@ class Page
|
|
76
76
|
belongs_to :book
|
77
77
|
end
|
78
78
|
|
79
|
+
class Parent
|
80
|
+
include Attribution
|
81
|
+
|
82
|
+
string :foo
|
83
|
+
end
|
84
|
+
|
85
|
+
class Child < Parent
|
86
|
+
include Attribution
|
87
|
+
|
88
|
+
string :bar
|
89
|
+
end
|
90
|
+
|
91
|
+
class Grandchild < Child
|
92
|
+
include Attribution
|
93
|
+
|
94
|
+
string :baz
|
95
|
+
end
|
96
|
+
|
79
97
|
class AttributionTest < Test::Unit::TestCase
|
80
98
|
|
81
99
|
def test_create
|
@@ -239,4 +257,8 @@ class AttributionTest < Test::Unit::TestCase
|
|
239
257
|
author = Author.new(addresses: [{id: 1}])
|
240
258
|
assert_equal [1], author.addresses.map(&:id)
|
241
259
|
end
|
260
|
+
|
261
|
+
def test_attribute_inheritence
|
262
|
+
assert_equal [:foo, :bar, :baz], Grandchild.attribute_names
|
263
|
+
end
|
242
264
|
end
|
metadata
CHANGED
@@ -1,62 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: attribution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
5
|
-
prerelease:
|
4
|
+
version: 0.6.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Paul Barry
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-09 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: activesupport
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: tzinfo
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: activemodel
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
description: Add attributes to Ruby objects
|
@@ -67,6 +60,7 @@ extensions: []
|
|
67
60
|
extra_rdoc_files: []
|
68
61
|
files:
|
69
62
|
- .gitignore
|
63
|
+
- .ruby-version
|
70
64
|
- Gemfile
|
71
65
|
- LICENSE.txt
|
72
66
|
- README.md
|
@@ -84,27 +78,26 @@ files:
|
|
84
78
|
- test/test_helper.rb
|
85
79
|
homepage: http://github.com/pjb3/attribution
|
86
80
|
licenses: []
|
81
|
+
metadata: {}
|
87
82
|
post_install_message:
|
88
83
|
rdoc_options: []
|
89
84
|
require_paths:
|
90
85
|
- lib
|
91
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
-
none: false
|
93
87
|
requirements:
|
94
|
-
- -
|
88
|
+
- - '>='
|
95
89
|
- !ruby/object:Gem::Version
|
96
90
|
version: '0'
|
97
91
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
92
|
requirements:
|
100
|
-
- -
|
93
|
+
- - '>='
|
101
94
|
- !ruby/object:Gem::Version
|
102
95
|
version: '0'
|
103
96
|
requirements: []
|
104
97
|
rubyforge_project:
|
105
|
-
rubygems_version:
|
98
|
+
rubygems_version: 2.0.0
|
106
99
|
signing_key:
|
107
|
-
specification_version:
|
100
|
+
specification_version: 4
|
108
101
|
summary: Add attributes to Ruby objects
|
109
102
|
test_files:
|
110
103
|
- test/attribution_model_test.rb
|