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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 568ca469a586ef81471b5a88db4e60d13b5bbdd4
4
- data.tar.gz: cc5ffe80afedebe624d525d791639cb587f13041
3
+ metadata.gz: 4710434e6b306b7dc4408b57091d04b641189635
4
+ data.tar.gz: a6f59ec6fe561cb7381df0f819d3fb0839940301
5
5
  SHA512:
6
- metadata.gz: 9762333312e1708d16ad0269f9fc08ac48653ea847e1cf733dd8251d55ad132ac8d24dc33c2faf811f92632d1ed1bd2d826b5af88215e56894c04b25b164e0b0
7
- data.tar.gz: 96a57d57c54835bc8f84062f29836d5d0245c40c92a33be9ae1cfdc6a811c9309031c2eae21d200eb8752db53db23b61296ccae512f354cb7453775453889b49
6
+ metadata.gz: 177db70b597b1d3ac883dcf3b6ed01acae809d192b0c4c6dcadd89a7e1d9bd49c75b36c1815654d838b0fe0dd2161691568e8d5b06506b84f298bef85e3fb51a
7
+ data.tar.gz: 5573d942806f2bd04f527f84539158379584ac7c6917c8961b395a24fd6e3281a021898b82339c3b6cae4a66fb9b4fa980b09fb36340f5f86f7350ab7a651dc7
data/Gemfile CHANGED
@@ -3,3 +3,5 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'coveralls', require: false
6
+
7
+ gem 'protected_attributes'
@@ -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(:scoped)
14
+ @scope = scope || model_class.send(:all)
15
15
  @include_links = true
16
16
 
17
17
  @page = params[:page].to_i if params[:page]
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Serializer
3
- VERSION = '0.2.15'
3
+ VERSION = '0.2.16'
4
4
  end
5
5
  end
@@ -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', '~> 3.2.0'
21
- gem.add_dependency 'activesupport', '~> 3.2.0'
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.9.1'
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
@@ -1,5 +1,6 @@
1
1
  require 'sqlite3'
2
2
  require 'active_record'
3
+ require 'protected_attributes'
3
4
 
4
5
  ActiveRecord::Base.establish_connection(
5
6
  :adapter => 'sqlite3',
@@ -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.scoped }
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.scoped }
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.15
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-10 00:00:00.000000000 Z
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: 3.2.0
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: 3.2.0
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: 3.2.0
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: 3.2.0
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.9.1
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.9.1
166
+ version: 1.0.1
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: bump
155
169
  requirement: !ruby/object:Gem::Requirement