sunstone 1.4.5 → 1.5.0

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: 78af68acd850a745d32933ddbcf9cdf01b97e984
4
- data.tar.gz: c80eb4622007ac9b90f2ad626ef31d9ba82435f0
3
+ metadata.gz: de464bd6ec203736c41758be7acbed78695fe5c0
4
+ data.tar.gz: bc0a767ead2445820543cb25e2b04a702bd60fe0
5
5
  SHA512:
6
- metadata.gz: 17d1513fe6f1b3908c85dc127d3cfaffcde1e713017c36501924f4d8f6680f32d27c5dd9b8233b5c5cfd506e2975ebaf40f84c84d55ddcf6c67d90d3ae23bf38
7
- data.tar.gz: 60d40d7dfdf31f97725df11e17fd3d038c67a35b53a090ee5feba28f419e7f1d589e3b1911e85953d2b14e6e1c6221a30bade38266cd15ab934215b96d336511
6
+ metadata.gz: 208d6598f8e64ed164b15daa2619a04e5406c56176db72bcab0efda5cf432659e58e185a429caf38706ac0a9efef880b20515d9fba9b8d1358d6836d031e6706
7
+ data.tar.gz: dd31811479848075b4a08e70cff3803cc386f858ec19ed9b16cc7668932595849220fe25d275dd92f7d9597a6d302d839684befc0aca892421dd27fa70fd9d2a
@@ -457,12 +457,12 @@ module Arel
457
457
  # visit o.right, collector
458
458
  # end
459
459
  #
460
- # def visit_Arel_Nodes_GreaterThan o, collector
461
- # collector = visit o.left, collector
462
- # collector << " > "
463
- # visit o.right, collector
464
- # end
465
- #
460
+ def visit_Arel_Nodes_GreaterThan o, collector
461
+ {
462
+ visit(o.left, collector) => { :greater_than => visit(o.right, collector) }
463
+ }
464
+ end
465
+
466
466
  # def visit_Arel_Nodes_LessThanOrEqual o, collector
467
467
  # collector = visit o.left, collector
468
468
  # collector << " <= "
@@ -0,0 +1,12 @@
1
+ module ActiveRecord
2
+ module Batches
3
+
4
+ private
5
+
6
+ # "#{quoted_table_name}.#{quoted_primary_key} ASC"
7
+ def batch_order
8
+ {:id => :asc}
9
+ end
10
+
11
+ end
12
+ end
data/lib/sunstone.rb CHANGED
@@ -18,6 +18,7 @@ require 'ext/arel/select_manager'
18
18
  require 'ext/arel/nodes/eager_load'
19
19
  require 'ext/arel/nodes/select_statement'
20
20
  require 'ext/active_record/finder_methods'
21
+ require 'ext/active_record/batches'
21
22
 
22
23
  # require 'sunstone/parser'
23
24
 
data/sunstone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "sunstone"
3
- s.version = '1.4.5'
3
+ s.version = '1.5.0'
4
4
  s.authors = ["Jon Bracy"]
5
5
  s.email = ["jonbracy@gmail.com"]
6
6
  s.homepage = "http://sunstonerb.com"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.5
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Bracy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-24 00:00:00.000000000 Z
11
+ date: 2014-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -269,6 +269,7 @@ files:
269
269
  - lib/arel/collectors/sunstone.rb
270
270
  - lib/arel/visitors/sunstone.rb
271
271
  - lib/ext/active_record/associations/builder/has_and_belongs_to_many.rb
272
+ - lib/ext/active_record/batches.rb
272
273
  - lib/ext/active_record/finder_methods.rb
273
274
  - lib/ext/active_record/relation.rb
274
275
  - lib/ext/active_record/statement_cache.rb