scoped_from 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +34 -31
- data/VERSION +1 -1
- data/scoped_from.gemspec +4 -3
- data/spec/scoped_from/query_spec.rb +2 -1
- data/spec/spec_helper.rb +1 -0
- metadata +37 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33415592b83c182b2e07977e66d43ec741a0f6fa
|
4
|
+
data.tar.gz: f2b6dd6536d3f05bd9fc715a73ce9414dc288921
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8004f60872868ee9ea77324aad627cd4c756b911736fe5556d2d17ce1e53b36052898149676bb136e9782efafd2a94a830810791c76dad9008ea38e2ecbcfbe2
|
7
|
+
data.tar.gz: f57c020a4f82d71bef14d4eee6b38e864774e54b074eddfad99c5cba316947dc34bf66c08c6a48c4777c7e7d5dbcadd9d4a450b30273e42e8a352a073304c18f
|
data/Gemfile.lock
CHANGED
@@ -1,56 +1,59 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
scoped_from (0.8.
|
5
|
-
activerecord (~> 4.
|
6
|
-
activesupport (~> 4.
|
4
|
+
scoped_from (0.8.2)
|
5
|
+
activerecord (~> 4.1.0)
|
6
|
+
activesupport (~> 4.1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
activemodel (4.
|
12
|
-
activesupport (= 4.
|
13
|
-
builder (~> 3.1
|
14
|
-
activerecord (4.
|
15
|
-
activemodel (= 4.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
minitest (~> 4.2)
|
23
|
-
multi_json (~> 1.3)
|
11
|
+
activemodel (4.1.1)
|
12
|
+
activesupport (= 4.1.1)
|
13
|
+
builder (~> 3.1)
|
14
|
+
activerecord (4.1.1)
|
15
|
+
activemodel (= 4.1.1)
|
16
|
+
activesupport (= 4.1.1)
|
17
|
+
arel (~> 5.0.0)
|
18
|
+
activesupport (4.1.1)
|
19
|
+
i18n (~> 0.6, >= 0.6.9)
|
20
|
+
json (~> 1.7, >= 1.7.7)
|
21
|
+
minitest (~> 5.1)
|
24
22
|
thread_safe (~> 0.1)
|
25
|
-
tzinfo (~>
|
26
|
-
arel (
|
27
|
-
|
28
|
-
|
23
|
+
tzinfo (~> 1.1)
|
24
|
+
arel (5.0.1.20140414130214)
|
25
|
+
builder (3.2.2)
|
26
|
+
byebug (3.1.2)
|
27
|
+
columnize (~> 0.8)
|
28
|
+
debugger-linecache (~> 1.2)
|
29
|
+
columnize (0.8.9)
|
30
|
+
debugger-linecache (1.2.0)
|
29
31
|
diff-lcs (1.2.5)
|
30
32
|
i18n (0.6.9)
|
31
|
-
|
32
|
-
|
33
|
-
rake (10.1
|
33
|
+
json (1.8.1)
|
34
|
+
minitest (5.3.3)
|
35
|
+
rake (10.3.1)
|
34
36
|
rspec (2.14.1)
|
35
37
|
rspec-core (~> 2.14.0)
|
36
38
|
rspec-expectations (~> 2.14.0)
|
37
39
|
rspec-mocks (~> 2.14.0)
|
38
|
-
rspec-core (2.14.
|
39
|
-
rspec-expectations (2.14.
|
40
|
+
rspec-core (2.14.8)
|
41
|
+
rspec-expectations (2.14.5)
|
40
42
|
diff-lcs (>= 1.1.3, < 2.0)
|
41
|
-
rspec-mocks (2.14.
|
42
|
-
sqlite3 (1.3.
|
43
|
+
rspec-mocks (2.14.6)
|
44
|
+
sqlite3 (1.3.9)
|
43
45
|
sqlite3-ruby (1.3.3)
|
44
46
|
sqlite3 (>= 1.3.3)
|
45
|
-
thread_safe (0.
|
46
|
-
|
47
|
-
|
47
|
+
thread_safe (0.3.3)
|
48
|
+
tzinfo (1.1.0)
|
49
|
+
thread_safe (~> 0.1)
|
48
50
|
|
49
51
|
PLATFORMS
|
50
52
|
ruby
|
51
53
|
|
52
54
|
DEPENDENCIES
|
53
|
-
|
55
|
+
byebug (~> 3.1.2)
|
56
|
+
rake (~> 10.3.0)
|
54
57
|
rspec (~> 2.14.0)
|
55
58
|
scoped_from!
|
56
59
|
sqlite3-ruby (~> 1.3.0)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
data/scoped_from.gemspec
CHANGED
@@ -16,10 +16,11 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
17
|
s.require_paths = ['lib']
|
18
18
|
|
19
|
-
s.add_dependency 'activerecord', '~> 4.
|
20
|
-
s.add_dependency 'activesupport', '~> 4.
|
19
|
+
s.add_dependency 'activerecord', '~> 4.1.0'
|
20
|
+
s.add_dependency 'activesupport', '~> 4.1.0'
|
21
21
|
|
22
|
-
s.add_development_dependency '
|
22
|
+
s.add_development_dependency 'byebug', '~> 3.1.2'
|
23
|
+
s.add_development_dependency 'rake', '~> 10.3.0'
|
23
24
|
s.add_development_dependency 'rspec', '~> 2.14.0'
|
24
25
|
s.add_development_dependency 'sqlite3-ruby', '~> 1.3.0'
|
25
26
|
end
|
@@ -413,7 +413,8 @@ describe ScopedFrom::Query do
|
|
413
413
|
query(User, order: ['lastname', 'firstname']).relation.should == [users(:jane), users(:john), users(:jane2)]
|
414
414
|
query(User, order: ['lastname', 'firstname.desc']).relation.should == [users(:john), users(:jane), users(:jane2)]
|
415
415
|
query(User, order: ['firstname', 'lastname.desc']).relation.should == [users(:jane2), users(:jane), users(:john)]
|
416
|
-
query(User, order: ['firstname.desc', 'lastname']).relation.order_values.should == [
|
416
|
+
query(User, order: ['firstname.desc', 'lastname']).relation.order_values.map(&:class).should == [Arel::Nodes::Descending, Arel::Nodes::Ascending]
|
417
|
+
query(User, order: ['firstname.desc', 'lastname']).relation.order_values.map(&:expr).map(&:name).should == ['firstname', 'lastname']
|
417
418
|
end
|
418
419
|
|
419
420
|
it 'defines #query method on returned relation' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,83 +1,97 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoped_from
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexis Toulotte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.1.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: 4.
|
26
|
+
version: 4.1.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: 4.
|
33
|
+
version: 4.1.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: 4.
|
40
|
+
version: 4.1.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: byebug
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.1.2
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.1.2
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - ~>
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: 10.
|
61
|
+
version: 10.3.0
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - ~>
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: 10.
|
68
|
+
version: 10.3.0
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - ~>
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: 2.14.0
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - ~>
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: 2.14.0
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: sqlite3-ruby
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - ~>
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: 1.3.0
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - ~>
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: 1.3.0
|
83
97
|
description: Provides a simple mapping between Active Record scopes and controller
|
@@ -87,8 +101,8 @@ executables: []
|
|
87
101
|
extensions: []
|
88
102
|
extra_rdoc_files: []
|
89
103
|
files:
|
90
|
-
- .gitignore
|
91
|
-
- .rspec
|
104
|
+
- ".gitignore"
|
105
|
+
- ".rspec"
|
92
106
|
- Gemfile
|
93
107
|
- Gemfile.lock
|
94
108
|
- MIT-LICENSE
|
@@ -122,17 +136,17 @@ require_paths:
|
|
122
136
|
- lib
|
123
137
|
required_ruby_version: !ruby/object:Gem::Requirement
|
124
138
|
requirements:
|
125
|
-
- -
|
139
|
+
- - ">="
|
126
140
|
- !ruby/object:Gem::Version
|
127
141
|
version: '0'
|
128
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
143
|
requirements:
|
130
|
-
- -
|
144
|
+
- - ">="
|
131
145
|
- !ruby/object:Gem::Version
|
132
146
|
version: '0'
|
133
147
|
requirements: []
|
134
148
|
rubyforge_project: scoped_from
|
135
|
-
rubygems_version: 2.
|
149
|
+
rubygems_version: 2.2.2
|
136
150
|
signing_key:
|
137
151
|
specification_version: 4
|
138
152
|
summary: Mapping between scopes and parameters for Rails
|