restpack_serializer 0.2.15 → 0.2.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/restpack_serializer/options.rb +1 -1
- data/lib/restpack_serializer/version.rb +1 -1
- data/restpack_serializer.gemspec +4 -3
- data/spec/fixtures/db.rb +1 -0
- data/spec/serializable/options_spec.rb +2 -2
- metadata +22 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4710434e6b306b7dc4408b57091d04b641189635
|
4
|
+
data.tar.gz: a6f59ec6fe561cb7381df0f819d3fb0839940301
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 177db70b597b1d3ac883dcf3b6ed01acae809d192b0c4c6dcadd89a7e1d9bd49c75b36c1815654d838b0fe0dd2161691568e8d5b06506b84f298bef85e3fb51a
|
7
|
+
data.tar.gz: 5573d942806f2bd04f527f84539158379584ac7c6917c8961b395a24fd6e3281a021898b82339c3b6cae4a66fb9b4fa980b09fb36340f5f86f7350ab7a651dc7
|
data/Gemfile
CHANGED
@@ -11,7 +11,7 @@ module RestPack::Serializer
|
|
11
11
|
@filters = filters_from_params(params, serializer)
|
12
12
|
@serializer = serializer
|
13
13
|
@model_class = serializer.model_class
|
14
|
-
@scope = scope || model_class.send(:
|
14
|
+
@scope = scope || model_class.send(:all)
|
15
15
|
@include_links = true
|
16
16
|
|
17
17
|
@page = params[:page].to_i if params[:page]
|
data/restpack_serializer.gemspec
CHANGED
@@ -17,8 +17,9 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_dependency 'activerecord', '~>
|
21
|
-
gem.add_dependency 'activesupport', '~>
|
20
|
+
gem.add_dependency 'activerecord', '~> 4.0'
|
21
|
+
gem.add_dependency 'activesupport', '~> 4.0'
|
22
|
+
gem.add_dependency 'protected_attributes', '~> 1.0.3'
|
22
23
|
gem.add_dependency 'will_paginate', '~> 3.0'
|
23
24
|
|
24
25
|
gem.add_development_dependency 'rake', '~> 10.0.3'
|
@@ -27,6 +28,6 @@ Gem::Specification.new do |gem|
|
|
27
28
|
gem.add_development_dependency 'growl', '~> 1.0.3'
|
28
29
|
gem.add_development_dependency 'factory_girl', '~> 4.2.0'
|
29
30
|
gem.add_development_dependency 'sqlite3', '~> 1.3.7'
|
30
|
-
gem.add_development_dependency 'database_cleaner', '~> 0.
|
31
|
+
gem.add_development_dependency 'database_cleaner', '~> 1.0.1'
|
31
32
|
gem.add_development_dependency 'bump'
|
32
33
|
end
|
data/spec/fixtures/db.rb
CHANGED
@@ -11,7 +11,7 @@ describe RestPack::Serializer::Options do
|
|
11
11
|
it { subject.page.should == 1 }
|
12
12
|
it { subject.page_size.should == 10 }
|
13
13
|
it { subject.filters.should == {} }
|
14
|
-
it { subject.scope.should == Song.
|
14
|
+
it { subject.scope.should == Song.all }
|
15
15
|
it { subject.default_page_size?.should == true }
|
16
16
|
it { subject.filters_as_url_params.should == '' }
|
17
17
|
end
|
@@ -61,7 +61,7 @@ describe RestPack::Serializer::Options do
|
|
61
61
|
|
62
62
|
context 'scopes' do
|
63
63
|
describe 'with default scope' do
|
64
|
-
it { subject.scope.should == Song.
|
64
|
+
it { subject.scope.should == Song.all }
|
65
65
|
end
|
66
66
|
|
67
67
|
describe 'with custom scope' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: restpack_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gavin Joyce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,28 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '4.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: protected_attributes
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.0.3
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.0.3
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: will_paginate
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +156,14 @@ dependencies:
|
|
142
156
|
requirements:
|
143
157
|
- - ~>
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
159
|
+
version: 1.0.1
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
164
|
- - ~>
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
166
|
+
version: 1.0.1
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: bump
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|