serialization_scopes 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/.travis.yml +2 -4
- data/Gemfile +0 -1
- data/{Gemfile.3.0.x → Gemfile.4.0.x} +1 -1
- data/Gemfile.4.0.x.lock +57 -0
- data/Gemfile.lock +40 -61
- data/Rakefile +1 -0
- data/lib/serialization_scopes/matchers/serialize_matcher.rb +1 -1
- data/serialization_scopes.gemspec +5 -6
- data/spec/helper_models.rb +0 -11
- data/spec/serialization_scopes/responder_spec.rb +1 -1
- data/spec/serialization_scopes_spec.rb +25 -29
- data/spec/spec_helper.rb +0 -2
- metadata +35 -62
- data/Gemfile.3.0.x.lock +0 -49
- data/Gemfile.3.1.x +0 -4
- data/Gemfile.3.1.x.lock +0 -51
- data/Gemfile.3.2.x +0 -4
- data/Gemfile.3.2.x.lock +0 -51
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: defe1dc275da07efbffac55b9f34a761720117c1
|
4
|
+
data.tar.gz: 8942a5cf5e2d76d6c6379c96663b9d04e78e5f6e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a5887eab281c85e13b6e9d2e1465fcba0b47df99e8f42438a535c7910dcce6bd6560d798beaaada890e1c1eefcbbf4043fbadc99432b810350cc43edc9804bc8
|
7
|
+
data.tar.gz: 6b64a0d093fdf3fd19518298088c4b628b60180cc1bad49f9be048ecc1e069bb16ad3503c4ee8f9dfa3b4445cef0a4335874c1be40705c79cf91bc5992bf6b80
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.4.0.x.lock
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
serialization_scopes (1.5.0)
|
5
|
+
activemodel (>= 4.0.0, < 5.0.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activemodel (4.0.10)
|
11
|
+
activesupport (= 4.0.10)
|
12
|
+
builder (~> 3.1.0)
|
13
|
+
activerecord (4.0.10)
|
14
|
+
activemodel (= 4.0.10)
|
15
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
16
|
+
activesupport (= 4.0.10)
|
17
|
+
arel (~> 4.0.0)
|
18
|
+
activerecord-deprecated_finders (1.0.3)
|
19
|
+
activesupport (4.0.10)
|
20
|
+
i18n (~> 0.6, >= 0.6.9)
|
21
|
+
minitest (~> 4.2)
|
22
|
+
multi_json (~> 1.3)
|
23
|
+
thread_safe (~> 0.1)
|
24
|
+
tzinfo (~> 0.3.37)
|
25
|
+
arel (4.0.2)
|
26
|
+
builder (3.1.4)
|
27
|
+
diff-lcs (1.2.5)
|
28
|
+
i18n (0.6.11)
|
29
|
+
minitest (4.7.5)
|
30
|
+
multi_json (1.10.1)
|
31
|
+
rake (10.3.2)
|
32
|
+
rspec (3.1.0)
|
33
|
+
rspec-core (~> 3.1.0)
|
34
|
+
rspec-expectations (~> 3.1.0)
|
35
|
+
rspec-mocks (~> 3.1.0)
|
36
|
+
rspec-core (3.1.5)
|
37
|
+
rspec-support (~> 3.1.0)
|
38
|
+
rspec-expectations (3.1.2)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.1.0)
|
41
|
+
rspec-mocks (3.1.2)
|
42
|
+
rspec-support (~> 3.1.0)
|
43
|
+
rspec-support (3.1.1)
|
44
|
+
sqlite3 (1.3.9)
|
45
|
+
thread_safe (0.3.4)
|
46
|
+
tzinfo (0.3.41)
|
47
|
+
|
48
|
+
PLATFORMS
|
49
|
+
ruby
|
50
|
+
|
51
|
+
DEPENDENCIES
|
52
|
+
activemodel (~> 4.0.0)
|
53
|
+
activerecord
|
54
|
+
rake
|
55
|
+
rspec
|
56
|
+
serialization_scopes!
|
57
|
+
sqlite3
|
data/Gemfile.lock
CHANGED
@@ -1,78 +1,57 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
serialization_scopes (1.
|
5
|
-
activemodel (>=
|
4
|
+
serialization_scopes (1.5.0)
|
5
|
+
activemodel (>= 4.0.0, < 5.0.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
9
9
|
specs:
|
10
|
-
|
11
|
-
activesupport (= 4.
|
12
|
-
builder (~> 3.1
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
10
|
+
activemodel (4.1.6)
|
11
|
+
activesupport (= 4.1.6)
|
12
|
+
builder (~> 3.1)
|
13
|
+
activerecord (4.1.6)
|
14
|
+
activemodel (= 4.1.6)
|
15
|
+
activesupport (= 4.1.6)
|
16
|
+
arel (~> 5.0.0)
|
17
|
+
activesupport (4.1.6)
|
18
|
+
i18n (~> 0.6, >= 0.6.9)
|
19
|
+
json (~> 1.7, >= 1.7.7)
|
20
|
+
minitest (~> 5.1)
|
21
|
+
thread_safe (~> 0.1)
|
22
|
+
tzinfo (~> 1.1)
|
23
|
+
arel (5.0.1.20140414130214)
|
24
|
+
builder (3.2.2)
|
25
|
+
diff-lcs (1.2.5)
|
26
|
+
i18n (0.6.11)
|
27
|
+
json (1.8.1)
|
28
|
+
json (1.8.1-java)
|
29
|
+
minitest (5.4.2)
|
30
|
+
rake (10.3.2)
|
31
|
+
rspec (3.1.0)
|
32
|
+
rspec-core (~> 3.1.0)
|
33
|
+
rspec-expectations (~> 3.1.0)
|
34
|
+
rspec-mocks (~> 3.1.0)
|
35
|
+
rspec-core (3.1.5)
|
36
|
+
rspec-support (~> 3.1.0)
|
37
|
+
rspec-expectations (3.1.2)
|
38
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
39
|
+
rspec-support (~> 3.1.0)
|
40
|
+
rspec-mocks (3.1.2)
|
41
|
+
rspec-support (~> 3.1.0)
|
42
|
+
rspec-support (3.1.1)
|
43
|
+
sqlite3 (1.3.9)
|
44
|
+
thread_safe (0.3.4)
|
45
|
+
thread_safe (0.3.4-java)
|
46
|
+
tzinfo (1.2.2)
|
33
47
|
thread_safe (~> 0.1)
|
34
|
-
tzinfo (~> 0.3.37)
|
35
|
-
arel (4.0.0)
|
36
|
-
atomic (1.1.10)
|
37
|
-
atomic (1.1.10-java)
|
38
|
-
builder (3.1.4)
|
39
|
-
diff-lcs (1.2.4)
|
40
|
-
erubis (2.7.0)
|
41
|
-
i18n (0.6.4)
|
42
|
-
minitest (4.7.5)
|
43
|
-
multi_json (1.7.7)
|
44
|
-
rack (1.5.2)
|
45
|
-
rack-test (0.6.2)
|
46
|
-
rack (>= 1.0)
|
47
|
-
rails-observers (0.1.1)
|
48
|
-
railties (~> 4.0.0.beta)
|
49
|
-
railties (4.0.0)
|
50
|
-
actionpack (= 4.0.0)
|
51
|
-
activesupport (= 4.0.0)
|
52
|
-
rake (>= 0.8.7)
|
53
|
-
thor (>= 0.18.1, < 2.0)
|
54
|
-
rake (10.1.0)
|
55
|
-
rspec (2.13.0)
|
56
|
-
rspec-core (~> 2.13.0)
|
57
|
-
rspec-expectations (~> 2.13.0)
|
58
|
-
rspec-mocks (~> 2.13.0)
|
59
|
-
rspec-core (2.13.1)
|
60
|
-
rspec-expectations (2.13.0)
|
61
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
62
|
-
rspec-mocks (2.13.1)
|
63
|
-
sqlite3 (1.3.7)
|
64
|
-
thor (0.18.1)
|
65
|
-
thread_safe (0.1.0)
|
66
|
-
atomic
|
67
|
-
tzinfo (0.3.37)
|
68
48
|
|
69
49
|
PLATFORMS
|
70
50
|
java
|
71
51
|
ruby
|
72
52
|
|
73
53
|
DEPENDENCIES
|
74
|
-
activerecord
|
75
|
-
activeresource (>= 3.0.0)
|
54
|
+
activerecord
|
76
55
|
rake
|
77
56
|
rspec
|
78
57
|
serialization_scopes!
|
data/Rakefile
CHANGED
@@ -2,13 +2,13 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
|
-
s.required_ruby_version = '>=
|
6
|
-
s.required_rubygems_version = ">= 1.
|
5
|
+
s.required_ruby_version = '>= 2.0.0'
|
6
|
+
s.required_rubygems_version = ">= 1.8.5"
|
7
7
|
|
8
8
|
s.name = "serialization_scopes"
|
9
9
|
s.summary = "Named scopes for ActiveRecord/ActiveResource serialization methods (to_xml, to_json)"
|
10
10
|
s.description = "Adds named scopes for ActiveRecord/ActiveResource serialization methods (to_xml, to_json)"
|
11
|
-
s.version = "1.
|
11
|
+
s.version = "1.5.0"
|
12
12
|
|
13
13
|
s.authors = ["Dimitrij Denissenko", "Evgeniy Dolzhenko"]
|
14
14
|
s.email = "info@blacksquaremedia.com"
|
@@ -18,9 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.files = `git ls-files`.split("\n")
|
19
19
|
s.test_files = `git ls-files -- spec/*`.split("\n")
|
20
20
|
|
21
|
-
s.add_dependency 'activemodel', '>=
|
22
|
-
s.add_development_dependency 'activerecord'
|
23
|
-
s.add_development_dependency 'activeresource', '>= 3.0.0'
|
21
|
+
s.add_dependency 'activemodel', '>= 4.0.0', '< 5.0.0'
|
22
|
+
s.add_development_dependency 'activerecord'
|
24
23
|
s.add_development_dependency 'rspec'
|
25
24
|
s.add_development_dependency 'rake'
|
26
25
|
s.add_development_dependency 'sqlite3'
|
data/spec/helper_models.rb
CHANGED
@@ -53,14 +53,3 @@ class OtherModel < ActiveRecord::Base
|
|
53
53
|
serialization_scope :default, :only => :description
|
54
54
|
serialization_scope :admin, :only => [:description, :rank]
|
55
55
|
end
|
56
|
-
|
57
|
-
class SomeResource < ActiveResource::Base
|
58
|
-
self.site = 'http://example.com'
|
59
|
-
|
60
|
-
schema do
|
61
|
-
integer 'id'
|
62
|
-
string 'name', 'secret'
|
63
|
-
end
|
64
|
-
|
65
|
-
serialization_scope :default, :only => [:id, :name]
|
66
|
-
end
|
@@ -25,7 +25,7 @@ describe SerializationScopes::Responder do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
it 'should apply scopes by default' do
|
28
|
-
ActualResponder.new.display(nil, {}).
|
28
|
+
expect(ActualResponder.new.display(nil, {})).to eq({ :scope => :author })
|
29
29
|
end
|
30
30
|
|
31
31
|
end
|
@@ -31,78 +31,74 @@ describe SerializationScopes do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it 'should scope to_xml' do
|
34
|
-
via_xml(some_record).
|
34
|
+
expect(via_xml(some_record)).to eq({ "some_model" => { "name" => "Any", "currency" => "USD", "id" => some_record.id }})
|
35
35
|
end
|
36
36
|
|
37
37
|
it 'should scope to_json' do
|
38
|
-
via_json(some_record).
|
38
|
+
expect(via_json(some_record)).to eq({ "name" => "Any", "currency" => "USD", "id" => some_record.id })
|
39
39
|
end
|
40
40
|
|
41
41
|
it 'should apply default scope' do
|
42
|
-
via_json(other_record).
|
42
|
+
expect(via_json(other_record)).to eq({ "description" => "Other" })
|
43
43
|
end
|
44
44
|
|
45
45
|
it 'should allow to bypass default scope' do
|
46
|
-
via_json(some_record, :scope => false).
|
46
|
+
expect(via_json(some_record, :scope => false)).to eq({ "name" => "Any", "id" => some_record.id, "secret" => "key" })
|
47
47
|
end
|
48
48
|
|
49
49
|
it 'should allow to apply additional restrictions' do
|
50
|
-
via_json(some_record, :only => :name).
|
51
|
-
via_json(some_record, :methods => []).
|
50
|
+
expect(via_json(some_record, :only => :name)).to eq({ "name" => "Any", "currency" => "USD" })
|
51
|
+
expect(via_json(some_record, :methods => [])).to eq({ "name" => "Any", "id" => some_record.id })
|
52
52
|
end
|
53
53
|
|
54
54
|
it 'should not allow loosening scopes' do
|
55
|
-
via_json(some_record, :only => [:id, :secret]).keys.
|
56
|
-
via_json(some_record, :methods => [:discount, :currency]).keys.
|
57
|
-
via_json(some_record, :scope => :excepted, :except => :id).keys.
|
55
|
+
expect(via_json(some_record, :only => [:id, :secret]).keys).not_to include("secret")
|
56
|
+
expect(via_json(some_record, :methods => [:discount, :currency]).keys).not_to include("discount")
|
57
|
+
expect(via_json(some_record, :scope => :excepted, :except => :id).keys).not_to include("secret")
|
58
58
|
end
|
59
59
|
|
60
60
|
it 'should have separate behaviours for different scopes' do
|
61
|
-
via_json(some_record, :scope => :admin).
|
61
|
+
expect(via_json(some_record, :scope => :admin)).to eq({ "id" => some_record.id, "secret" => "key" })
|
62
62
|
end
|
63
63
|
|
64
64
|
it 'should fallback to default scope if invalid scope is given' do
|
65
|
-
via_json(some_record, :scope => :invalid).
|
65
|
+
expect(via_json(some_record, :scope => :invalid)).to eq({ "name" => "Any", "currency" => "USD", "id" => some_record.id })
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should pass through options it doesn't know about" do
|
69
|
-
some_record.to_xml(:root => "wow-root").
|
70
|
-
some_record.to_xml(:scope => :wow_root).
|
69
|
+
expect(some_record.to_xml(:root => "wow-root")).to include('<wow-root>')
|
70
|
+
expect(some_record.to_xml(:scope => :wow_root)).to include('<wow-root>')
|
71
71
|
end
|
72
72
|
|
73
73
|
it 'should use default serialization scope when serialized as part of another object' do
|
74
|
-
via_json(:k => some_record).
|
74
|
+
expect(via_json(:k => some_record)).to eq({ 'k' => { "name" => "Any", "currency" => "USD", "id" => some_record.id } })
|
75
75
|
end
|
76
76
|
|
77
77
|
it 'should pass the scope to the nested object so that they can use own settings' do
|
78
|
-
via_json(some_record, :scope => :nested)['another'].
|
78
|
+
expect(via_json(some_record, :scope => :nested)['another']).to eq({ 'description' => 'Random' })
|
79
79
|
end
|
80
80
|
|
81
81
|
it 'should correctly apply scopes to nested includes' do
|
82
82
|
some_record.others.create :description => "New", :rank => 100
|
83
|
-
via_json(some_record, :include => :others).
|
83
|
+
expect(via_json(some_record, :include => :others)).to eq({ "name"=>"Any", "id"=>1, "currency"=>"USD", "others"=>[{ "description" => "New" }] })
|
84
84
|
end
|
85
85
|
|
86
86
|
it 'should propagate scopes to nested includes' do
|
87
87
|
some_record.others.create :description => "New", :rank => 100
|
88
|
-
via_json(some_record, :include => :others, :scope => :admin).
|
89
|
-
|
88
|
+
expect(via_json(some_record, :include => :others, :scope => :admin)).
|
89
|
+
to eq({ "id"=>1, "secret"=>"key", "others"=>[{ "description" => "New", "rank" => 100 }] })
|
90
90
|
end
|
91
91
|
|
92
92
|
it 'should inherit serialization options correctly' do
|
93
|
-
SomeModel.send(:serialization_scopes)[:default].
|
94
|
-
SubModel.send(:serialization_scopes)[:default].
|
93
|
+
expect(SomeModel.send(:serialization_scopes)[:default]).to eq({:only=>[:id, :name], :methods=>:currency})
|
94
|
+
expect(SubModel.send(:serialization_scopes)[:default]).to eq({:only=>[:id, :name], :methods=>:currency})
|
95
95
|
|
96
|
-
SomeModel.send(:serialization_scopes)[:admin].
|
97
|
-
SubModel.send(:serialization_scopes)[:admin].
|
96
|
+
expect(SomeModel.send(:serialization_scopes)[:admin]).to eq({:only=>[:id, :secret]})
|
97
|
+
expect(SubModel.send(:serialization_scopes)[:admin]).to eq({:only=>[:id, :secret, :token]})
|
98
98
|
end
|
99
99
|
|
100
100
|
it 'should correctly inherit serialization' do
|
101
|
-
via_json(sub_record).
|
102
|
-
end
|
103
|
-
|
104
|
-
it 'should be enabled on ActiveResource models' do
|
105
|
-
via_json(some_resource).should == { 'some_resource' => { 'id' => 1, 'name' => 'a name' } }
|
101
|
+
expect(via_json(sub_record)).to eq({ "name"=>"Any", "id"=>1, "currency"=>"USD" })
|
106
102
|
end
|
107
103
|
|
108
104
|
describe "additional option arguments" do
|
@@ -113,12 +109,12 @@ describe SerializationScopes do
|
|
113
109
|
|
114
110
|
it 'should not tamper options' do
|
115
111
|
original = {}
|
116
|
-
|
112
|
+
expect { some_record.to_json(original) }.not_to change { original }
|
117
113
|
end
|
118
114
|
|
119
115
|
it 'should not tamper nested options' do
|
120
116
|
original = { :only => :id, :key => { :other => :value } }
|
121
|
-
|
117
|
+
expect { some_record.to_json(original) }.not_to change { original }
|
122
118
|
end
|
123
119
|
|
124
120
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,10 +6,8 @@ require 'rubygems'
|
|
6
6
|
require 'bundler/setup'
|
7
7
|
|
8
8
|
require 'active_record'
|
9
|
-
require 'active_resource'
|
10
9
|
require 'serialization_scopes'
|
11
10
|
require 'rspec'
|
12
11
|
require File.expand_path('../helper_models', __FILE__)
|
13
12
|
|
14
13
|
ActiveRecord::Base.include_root_in_json = false
|
15
|
-
ActiveResource::Base.include_root_in_json = true
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serialization_scopes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
5
|
-
prerelease:
|
4
|
+
version: 1.5.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Dimitrij Denissenko
|
@@ -10,102 +9,82 @@ authors:
|
|
10
9
|
autorequire:
|
11
10
|
bindir: bin
|
12
11
|
cert_chain: []
|
13
|
-
date:
|
12
|
+
date: 2014-09-30 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: activemodel
|
17
16
|
requirement: !ruby/object:Gem::Requirement
|
18
|
-
none: false
|
19
17
|
requirements:
|
20
|
-
- -
|
18
|
+
- - ">="
|
21
19
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
20
|
+
version: 4.0.0
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 5.0.0
|
23
24
|
type: :runtime
|
24
25
|
prerelease: false
|
25
26
|
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
31
|
-
-
|
32
|
-
name: activerecord
|
33
|
-
requirement: !ruby/object:Gem::Requirement
|
34
|
-
none: false
|
35
|
-
requirements:
|
36
|
-
- - ! '>='
|
30
|
+
version: 4.0.0
|
31
|
+
- - "<"
|
37
32
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
39
|
-
type: :development
|
40
|
-
prerelease: false
|
41
|
-
version_requirements: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
|
-
requirements:
|
44
|
-
- - ! '>='
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 3.0.0
|
33
|
+
version: 5.0.0
|
47
34
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
35
|
+
name: activerecord
|
49
36
|
requirement: !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
37
|
requirements:
|
52
|
-
- -
|
38
|
+
- - ">="
|
53
39
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
40
|
+
version: '0'
|
55
41
|
type: :development
|
56
42
|
prerelease: false
|
57
43
|
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
44
|
requirements:
|
60
|
-
- -
|
45
|
+
- - ">="
|
61
46
|
- !ruby/object:Gem::Version
|
62
|
-
version:
|
47
|
+
version: '0'
|
63
48
|
- !ruby/object:Gem::Dependency
|
64
49
|
name: rspec
|
65
50
|
requirement: !ruby/object:Gem::Requirement
|
66
|
-
none: false
|
67
51
|
requirements:
|
68
|
-
- -
|
52
|
+
- - ">="
|
69
53
|
- !ruby/object:Gem::Version
|
70
54
|
version: '0'
|
71
55
|
type: :development
|
72
56
|
prerelease: false
|
73
57
|
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
none: false
|
75
58
|
requirements:
|
76
|
-
- -
|
59
|
+
- - ">="
|
77
60
|
- !ruby/object:Gem::Version
|
78
61
|
version: '0'
|
79
62
|
- !ruby/object:Gem::Dependency
|
80
63
|
name: rake
|
81
64
|
requirement: !ruby/object:Gem::Requirement
|
82
|
-
none: false
|
83
65
|
requirements:
|
84
|
-
- -
|
66
|
+
- - ">="
|
85
67
|
- !ruby/object:Gem::Version
|
86
68
|
version: '0'
|
87
69
|
type: :development
|
88
70
|
prerelease: false
|
89
71
|
version_requirements: !ruby/object:Gem::Requirement
|
90
|
-
none: false
|
91
72
|
requirements:
|
92
|
-
- -
|
73
|
+
- - ">="
|
93
74
|
- !ruby/object:Gem::Version
|
94
75
|
version: '0'
|
95
76
|
- !ruby/object:Gem::Dependency
|
96
77
|
name: sqlite3
|
97
78
|
requirement: !ruby/object:Gem::Requirement
|
98
|
-
none: false
|
99
79
|
requirements:
|
100
|
-
- -
|
80
|
+
- - ">="
|
101
81
|
- !ruby/object:Gem::Version
|
102
82
|
version: '0'
|
103
83
|
type: :development
|
104
84
|
prerelease: false
|
105
85
|
version_requirements: !ruby/object:Gem::Requirement
|
106
|
-
none: false
|
107
86
|
requirements:
|
108
|
-
- -
|
87
|
+
- - ">="
|
109
88
|
- !ruby/object:Gem::Version
|
110
89
|
version: '0'
|
111
90
|
description: Adds named scopes for ActiveRecord/ActiveResource serialization methods
|
@@ -115,17 +94,13 @@ executables: []
|
|
115
94
|
extensions: []
|
116
95
|
extra_rdoc_files: []
|
117
96
|
files:
|
118
|
-
- .gitignore
|
119
|
-
- .project
|
120
|
-
- .rspec
|
121
|
-
- .travis.yml
|
97
|
+
- ".gitignore"
|
98
|
+
- ".project"
|
99
|
+
- ".rspec"
|
100
|
+
- ".travis.yml"
|
122
101
|
- Gemfile
|
123
|
-
- Gemfile.
|
124
|
-
- Gemfile.
|
125
|
-
- Gemfile.3.1.x
|
126
|
-
- Gemfile.3.1.x.lock
|
127
|
-
- Gemfile.3.2.x
|
128
|
-
- Gemfile.3.2.x.lock
|
102
|
+
- Gemfile.4.0.x
|
103
|
+
- Gemfile.4.0.x.lock
|
129
104
|
- Gemfile.lock
|
130
105
|
- README.md
|
131
106
|
- Rakefile
|
@@ -142,27 +117,26 @@ files:
|
|
142
117
|
- spec/spec_helper.rb
|
143
118
|
homepage: http://github.com/bsm/serialization_scopes
|
144
119
|
licenses: []
|
120
|
+
metadata: {}
|
145
121
|
post_install_message:
|
146
122
|
rdoc_options: []
|
147
123
|
require_paths:
|
148
124
|
- lib
|
149
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
150
|
-
none: false
|
151
126
|
requirements:
|
152
|
-
- -
|
127
|
+
- - ">="
|
153
128
|
- !ruby/object:Gem::Version
|
154
|
-
version:
|
129
|
+
version: 2.0.0
|
155
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
131
|
requirements:
|
158
|
-
- -
|
132
|
+
- - ">="
|
159
133
|
- !ruby/object:Gem::Version
|
160
|
-
version: 1.
|
134
|
+
version: 1.8.5
|
161
135
|
requirements: []
|
162
136
|
rubyforge_project:
|
163
|
-
rubygems_version:
|
137
|
+
rubygems_version: 2.2.2
|
164
138
|
signing_key:
|
165
|
-
specification_version:
|
139
|
+
specification_version: 4
|
166
140
|
summary: Named scopes for ActiveRecord/ActiveResource serialization methods (to_xml,
|
167
141
|
to_json)
|
168
142
|
test_files:
|
@@ -170,4 +144,3 @@ test_files:
|
|
170
144
|
- spec/serialization_scopes/responder_spec.rb
|
171
145
|
- spec/serialization_scopes_spec.rb
|
172
146
|
- spec/spec_helper.rb
|
173
|
-
has_rdoc:
|
data/Gemfile.3.0.x.lock
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
serialization_scopes (1.4.0)
|
5
|
-
activemodel (>= 3.0.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (3.0.20)
|
11
|
-
activesupport (= 3.0.20)
|
12
|
-
builder (~> 2.1.2)
|
13
|
-
i18n (~> 0.5.0)
|
14
|
-
activerecord (3.0.20)
|
15
|
-
activemodel (= 3.0.20)
|
16
|
-
activesupport (= 3.0.20)
|
17
|
-
arel (~> 2.0.10)
|
18
|
-
tzinfo (~> 0.3.23)
|
19
|
-
activeresource (3.0.20)
|
20
|
-
activemodel (= 3.0.20)
|
21
|
-
activesupport (= 3.0.20)
|
22
|
-
activesupport (3.0.20)
|
23
|
-
arel (2.0.10)
|
24
|
-
builder (2.1.2)
|
25
|
-
diff-lcs (1.2.4)
|
26
|
-
i18n (0.5.0)
|
27
|
-
rake (10.1.0)
|
28
|
-
rspec (2.13.0)
|
29
|
-
rspec-core (~> 2.13.0)
|
30
|
-
rspec-expectations (~> 2.13.0)
|
31
|
-
rspec-mocks (~> 2.13.0)
|
32
|
-
rspec-core (2.13.1)
|
33
|
-
rspec-expectations (2.13.0)
|
34
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
35
|
-
rspec-mocks (2.13.1)
|
36
|
-
sqlite3 (1.3.7)
|
37
|
-
tzinfo (0.3.37)
|
38
|
-
|
39
|
-
PLATFORMS
|
40
|
-
ruby
|
41
|
-
|
42
|
-
DEPENDENCIES
|
43
|
-
activemodel (~> 3.0.0)
|
44
|
-
activerecord (>= 3.0.0)
|
45
|
-
activeresource (>= 3.0.0)
|
46
|
-
rake
|
47
|
-
rspec
|
48
|
-
serialization_scopes!
|
49
|
-
sqlite3
|
data/Gemfile.3.1.x
DELETED
data/Gemfile.3.1.x.lock
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
serialization_scopes (1.4.0)
|
5
|
-
activemodel (>= 3.0.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (3.1.12)
|
11
|
-
activesupport (= 3.1.12)
|
12
|
-
builder (~> 3.0.0)
|
13
|
-
i18n (~> 0.6)
|
14
|
-
activerecord (3.1.12)
|
15
|
-
activemodel (= 3.1.12)
|
16
|
-
activesupport (= 3.1.12)
|
17
|
-
arel (~> 2.2.3)
|
18
|
-
tzinfo (~> 0.3.29)
|
19
|
-
activeresource (3.1.12)
|
20
|
-
activemodel (= 3.1.12)
|
21
|
-
activesupport (= 3.1.12)
|
22
|
-
activesupport (3.1.12)
|
23
|
-
multi_json (~> 1.0)
|
24
|
-
arel (2.2.3)
|
25
|
-
builder (3.0.4)
|
26
|
-
diff-lcs (1.2.4)
|
27
|
-
i18n (0.6.4)
|
28
|
-
multi_json (1.7.7)
|
29
|
-
rake (10.1.0)
|
30
|
-
rspec (2.13.0)
|
31
|
-
rspec-core (~> 2.13.0)
|
32
|
-
rspec-expectations (~> 2.13.0)
|
33
|
-
rspec-mocks (~> 2.13.0)
|
34
|
-
rspec-core (2.13.1)
|
35
|
-
rspec-expectations (2.13.0)
|
36
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
37
|
-
rspec-mocks (2.13.1)
|
38
|
-
sqlite3 (1.3.7)
|
39
|
-
tzinfo (0.3.37)
|
40
|
-
|
41
|
-
PLATFORMS
|
42
|
-
ruby
|
43
|
-
|
44
|
-
DEPENDENCIES
|
45
|
-
activemodel (~> 3.1.0)
|
46
|
-
activerecord (>= 3.0.0)
|
47
|
-
activeresource (>= 3.0.0)
|
48
|
-
rake
|
49
|
-
rspec
|
50
|
-
serialization_scopes!
|
51
|
-
sqlite3
|
data/Gemfile.3.2.x
DELETED
data/Gemfile.3.2.x.lock
DELETED
@@ -1,51 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
serialization_scopes (1.4.0)
|
5
|
-
activemodel (>= 3.0.0)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (3.2.13)
|
11
|
-
activesupport (= 3.2.13)
|
12
|
-
builder (~> 3.0.0)
|
13
|
-
activerecord (3.2.13)
|
14
|
-
activemodel (= 3.2.13)
|
15
|
-
activesupport (= 3.2.13)
|
16
|
-
arel (~> 3.0.2)
|
17
|
-
tzinfo (~> 0.3.29)
|
18
|
-
activeresource (3.2.13)
|
19
|
-
activemodel (= 3.2.13)
|
20
|
-
activesupport (= 3.2.13)
|
21
|
-
activesupport (3.2.13)
|
22
|
-
i18n (= 0.6.1)
|
23
|
-
multi_json (~> 1.0)
|
24
|
-
arel (3.0.2)
|
25
|
-
builder (3.0.4)
|
26
|
-
diff-lcs (1.2.4)
|
27
|
-
i18n (0.6.1)
|
28
|
-
multi_json (1.7.7)
|
29
|
-
rake (10.1.0)
|
30
|
-
rspec (2.13.0)
|
31
|
-
rspec-core (~> 2.13.0)
|
32
|
-
rspec-expectations (~> 2.13.0)
|
33
|
-
rspec-mocks (~> 2.13.0)
|
34
|
-
rspec-core (2.13.1)
|
35
|
-
rspec-expectations (2.13.0)
|
36
|
-
diff-lcs (>= 1.1.3, < 2.0)
|
37
|
-
rspec-mocks (2.13.1)
|
38
|
-
sqlite3 (1.3.7)
|
39
|
-
tzinfo (0.3.37)
|
40
|
-
|
41
|
-
PLATFORMS
|
42
|
-
ruby
|
43
|
-
|
44
|
-
DEPENDENCIES
|
45
|
-
activemodel (~> 3.2.0)
|
46
|
-
activerecord (>= 3.0.0)
|
47
|
-
activeresource (>= 3.0.0)
|
48
|
-
rake
|
49
|
-
rspec
|
50
|
-
serialization_scopes!
|
51
|
-
sqlite3
|