order 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/.travis.yml +7 -0
- data/Gemfile +13 -2
- data/README.markdown +2 -1
- data/lib/order.rb +2 -1
- data/lib/order/version.rb +1 -1
- metadata +5 -5
- data/Gemfile.lock +0 -50
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
@@ -2,9 +2,20 @@ source :rubygems
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
+
platforms :jruby do
|
6
|
+
group :test do
|
7
|
+
gem 'activerecord-jdbcsqlite3-adapter', '~> 1.2.2'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
platforms :ruby do
|
12
|
+
group :test do
|
13
|
+
gem 'sqlite3'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
5
17
|
group :test do
|
6
|
-
gem 'rake'
|
7
|
-
gem 'sqlite3'
|
8
18
|
gem 'simplecov', :require => false
|
19
|
+
gem 'rake', '~> 10.0'
|
9
20
|
gem 'rspec', '~> 2.12'
|
10
21
|
end
|
data/README.markdown
CHANGED
data/lib/order.rb
CHANGED
@@ -39,7 +39,8 @@ module Order
|
|
39
39
|
# the +name+ is to be an alias for the ordering. You may also provide a block that defines a
|
40
40
|
# custom ordering strategy.
|
41
41
|
def order_scope(name, attribute = nil, &block)
|
42
|
-
scope "order_by_#{name}", lambda{ |
|
42
|
+
scope "order_by_#{name}", lambda{ |*arguments|
|
43
|
+
direction = arguments.first
|
43
44
|
if block_given?
|
44
45
|
yield normalize_direction(direction)
|
45
46
|
else
|
data/lib/order/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: order
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -34,8 +34,8 @@ extensions: []
|
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
36
|
- .gitignore
|
37
|
+
- .travis.yml
|
37
38
|
- Gemfile
|
38
|
-
- Gemfile.lock
|
39
39
|
- LICENSE
|
40
40
|
- README.markdown
|
41
41
|
- Rakefile
|
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
segments:
|
62
62
|
- 0
|
63
|
-
hash: -
|
63
|
+
hash: -1189068835728440995
|
64
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
segments:
|
71
71
|
- 0
|
72
|
-
hash: -
|
72
|
+
hash: -1189068835728440995
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
75
|
rubygems_version: 1.8.24
|
data/Gemfile.lock
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
order (0.1.0)
|
5
|
-
activerecord (~> 3.2)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
activemodel (3.2.9)
|
11
|
-
activesupport (= 3.2.9)
|
12
|
-
builder (~> 3.0.0)
|
13
|
-
activerecord (3.2.9)
|
14
|
-
activemodel (= 3.2.9)
|
15
|
-
activesupport (= 3.2.9)
|
16
|
-
arel (~> 3.0.2)
|
17
|
-
tzinfo (~> 0.3.29)
|
18
|
-
activesupport (3.2.9)
|
19
|
-
i18n (~> 0.6)
|
20
|
-
multi_json (~> 1.0)
|
21
|
-
arel (3.0.2)
|
22
|
-
builder (3.0.4)
|
23
|
-
diff-lcs (1.1.3)
|
24
|
-
i18n (0.6.1)
|
25
|
-
multi_json (1.5.0)
|
26
|
-
rake (10.0.2)
|
27
|
-
rspec (2.12.0)
|
28
|
-
rspec-core (~> 2.12.0)
|
29
|
-
rspec-expectations (~> 2.12.0)
|
30
|
-
rspec-mocks (~> 2.12.0)
|
31
|
-
rspec-core (2.12.1)
|
32
|
-
rspec-expectations (2.12.0)
|
33
|
-
diff-lcs (~> 1.1.3)
|
34
|
-
rspec-mocks (2.12.0)
|
35
|
-
simplecov (0.7.1)
|
36
|
-
multi_json (~> 1.0)
|
37
|
-
simplecov-html (~> 0.7.1)
|
38
|
-
simplecov-html (0.7.1)
|
39
|
-
sqlite3 (1.3.6)
|
40
|
-
tzinfo (0.3.35)
|
41
|
-
|
42
|
-
PLATFORMS
|
43
|
-
ruby
|
44
|
-
|
45
|
-
DEPENDENCIES
|
46
|
-
order!
|
47
|
-
rake
|
48
|
-
rspec (~> 2.12)
|
49
|
-
simplecov
|
50
|
-
sqlite3
|