ar-ondemand 1.1.8 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/README.md +7 -7
- data/ar-ondemand.gemspec +2 -3
- data/lib/ar-ondemand/delete_all_by_pk.rb +7 -8
- data/lib/ar-ondemand/fast_enumeration.rb +10 -1
- data/lib/ar-ondemand/for_enumeration_reading.rb +8 -2
- data/lib/ar-ondemand/for_reading.rb +8 -9
- data/lib/ar-ondemand/for_streaming.rb +8 -1
- data/lib/ar-ondemand/record.rb +16 -2
- data/lib/ar-ondemand/result.rb +18 -4
- data/lib/ar-ondemand/version.rb +1 -1
- data/rails_3.2.Gemfile +4 -0
- data/rails_4.0.Gemfile +4 -0
- data/rails_4.1.Gemfile +4 -0
- data/rails_4.2.Gemfile +4 -0
- data/solano.yml +30 -7
- data/spec/lib/for_streaming_spec.rb +1 -1
- metadata +22 -7
- data/Gemfile.lock +0 -60
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
NDk0NjYyYTNiZDkzNTRkNzlhNTcxNGY5OTQ3NzlkY2E4MjZhMDczOQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZDc5YzJjODZjZDM3Yjk1ODcwZWE1MTZjMzEyZGI4MGM2NWQ2MmJlZQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
MTA2NGM0NmM2YWU0MzgyNjI2ZmNkMWQxZGEyYWMwZWY1ODk4ZmJkODljNzM0
|
|
10
|
+
MzQ0NTY4ZGI3YjJiZGIyZjA0NTI3ZTRkNmRkMWUxOWQyMzI0OThjNDJhNjQy
|
|
11
|
+
ZDk3Y2NmZGRhNzM0ZGFlOTc1NDQzNTJlYzNhYmJiN2Q3OTFhZDc=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
YWQwZTFlMjU3Yjc3NTNkMzdhODJlMGVjZmVlZTI3ZjE5MDE1NzRlZGY4Y2M2
|
|
14
|
+
MTYyN2ZhZWQ2ZjEyNmU3NDIyNDgyMjU1ZjVmYmQwMmQzZjllNDQwZTgxZDJi
|
|
15
|
+
YzhhMzExN2NkN2FiZGQ2ZDkwM2I2ZmU1OThkNDBkNGM3ZTZmNDQ=
|
data/.gitignore
CHANGED
data/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
The `ar-ondemand` gem adds functionality to ActiveRecord to help deal with AR's bloat.
|
|
4
4
|
|
|
5
5
|
[](http://badge.fury.io/rb/ar-ondemand)
|
|
6
|
-
[](https://ci.solanolabs.com:443/cloudhealthtech/ar-ondemand/suites/170027)
|
|
7
7
|
|
|
8
8
|
# Getting Started
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ The `ar-ondemand` gem adds functionality to ActiveRecord to help deal with AR's
|
|
|
11
11
|
require 'ar-ondemand'
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Please note that this library has been written for our needs, and even though it has gotten significant usage in
|
|
14
|
+
Please note that this library has been written for our needs, and even though it has gotten significant usage in
|
|
15
15
|
production environments, it hasn't seen the myriad ways others use and abuse ActiveRecord, so please experiment
|
|
16
16
|
locally first.
|
|
17
17
|
|
|
@@ -21,14 +21,14 @@ It has been used with ActiveRecord 3.2, MRI 1.9.3, JRuby 1.7 and the MySQL adapt
|
|
|
21
21
|
|
|
22
22
|
## on_demand
|
|
23
23
|
|
|
24
|
-
This was the original impetus for the gem. The issue was that we had to compare ~500k records between the source
|
|
24
|
+
This was the original impetus for the gem. The issue was that we had to compare ~500k records between the source
|
|
25
25
|
dataset and our database, and we had no idea which records were new, changed or deleted. We'd preload everything from
|
|
26
26
|
the database, but due to ActiveRecord's massive bloat, we'd constantly run into OOM exceptions. To get around that,
|
|
27
27
|
the concept of a [lightweight ActiveRecord object](https://github.com/CloudHealth/ar-ondemand/blob/master/lib/ar-ondemand/record.rb)
|
|
28
28
|
was introduced that had the absolute bare minimum needed to handle comparing the source data with the database.
|
|
29
29
|
|
|
30
30
|
With this new type of object, we could easily interate over the 500k records extremely quickly and determine what has
|
|
31
|
-
changed. The on-demand aspect comes when `.save` is called. If changes were noticed, it
|
|
31
|
+
changed. The on-demand aspect comes when `.save` is called. If changes were noticed, it
|
|
32
32
|
[secretly](https://github.com/CloudHealth/ar-ondemand/blob/master/lib/ar-ondemand/record.rb#L67) instantiates an actual
|
|
33
33
|
ActiveRecord model so that all the real functionality you'd expect, such as validation and callbacks, occurs.
|
|
34
34
|
|
|
@@ -38,8 +38,8 @@ ActiveRecord model so that all the real functionality you'd expect, such as vali
|
|
|
38
38
|
assets = Widget.on_demand :identifier, {customer_id: 1, account_id: 42}
|
|
39
39
|
source.each do |dso|
|
|
40
40
|
w = assets[dso[:identifier]]
|
|
41
|
-
w.name = dso[:name]
|
|
42
|
-
w.foo = dso[:foo]
|
|
41
|
+
w.name = dso[:name]
|
|
42
|
+
w.foo = dso[:foo]
|
|
43
43
|
w.bar = dso[:bar]
|
|
44
44
|
ar_obj = w.save
|
|
45
45
|
# If new or changed, ar_obj will be an ActiveRecord instance, and ar_obj.id will now be set
|
|
@@ -126,7 +126,7 @@ Widget.where(customer_id: 1).for_streaming(for_reading: true, batch_size: 1_000_
|
|
|
126
126
|
## delete_all_by_pk
|
|
127
127
|
|
|
128
128
|
Deleting many records or even a few records in a massive table can be an expensive operation, and can even lock up
|
|
129
|
-
your table during the duration of the delete, as well as perform a complete table scan. A common pattern to deal with
|
|
129
|
+
your table during the duration of the delete, as well as perform a complete table scan. A common pattern to deal with
|
|
130
130
|
this is querying the table first to find the primary keys that meet the criteria and then doing a delete specifying
|
|
131
131
|
the primary keys as the `where` condition. This function does that all for you.
|
|
132
132
|
|
data/ar-ondemand.gemspec
CHANGED
|
@@ -5,7 +5,6 @@ require File.dirname(__FILE__) + '/lib/ar-ondemand/version'
|
|
|
5
5
|
Gem::Specification.new do |s|
|
|
6
6
|
s.name = 'ar-ondemand'
|
|
7
7
|
s.version = ::ArOnDemand::VERSION
|
|
8
|
-
s.date = '2015-01-06'
|
|
9
8
|
s.summary = 'ActiveRecord On-demand'
|
|
10
9
|
s.description = 'Fast access to database results without the memory overhead of ActiveRecord objects'
|
|
11
10
|
s.authors = ['Steve Frank']
|
|
@@ -20,6 +19,6 @@ Gem::Specification.new do |s|
|
|
|
20
19
|
|
|
21
20
|
s.require_paths = %w(lib)
|
|
22
21
|
|
|
23
|
-
s.add_dependency 'activesupport', '
|
|
24
|
-
s.add_dependency 'activerecord', '
|
|
22
|
+
s.add_dependency 'activesupport', '>= 3.2', '< 5'
|
|
23
|
+
s.add_dependency 'activerecord', '>= 3.2', '< 5'
|
|
25
24
|
end
|
|
@@ -10,17 +10,16 @@ module ActiveRecord
|
|
|
10
10
|
# Based on find_in_batches function
|
|
11
11
|
def delete_all_by_pk(options = {})
|
|
12
12
|
relation = self
|
|
13
|
-
relation = self.scoped unless respond_to? :arel
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
# TODO Clean this up after dropping support for Rails 3
|
|
15
|
+
if ActiveRecord::VERSION::MAJOR == 3
|
|
16
|
+
relation = self.scoped unless respond_to? :arel
|
|
17
|
+
else
|
|
18
|
+
relation = self.all unless respond_to? :arel
|
|
17
19
|
end
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
raise "You can't specify a limit, it's forced to be the batch_size" if options[:limit].present?
|
|
22
|
-
|
|
23
|
-
relation = apply_finder_options(finder_options)
|
|
21
|
+
unless relation.arel.orders.blank? && relation.arel.taken.blank?
|
|
22
|
+
::ActiveRecord::Base.logger.warn("Scoped order and limit are ignored, it's forced to be batch order and batch size")
|
|
24
23
|
end
|
|
25
24
|
|
|
26
25
|
start = options.delete(:start)
|
|
@@ -9,7 +9,16 @@ module ActiveRecord
|
|
|
9
9
|
column_model = @column_models[name]
|
|
10
10
|
self.define_singleton_method(name) {
|
|
11
11
|
raise "Not accessible outside of enumeration" if @row.nil?
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
# Rails 4.2 renamed type_cast into type_cast_from_database
|
|
14
|
+
# This is not documented in their upgrade docs or release notes.
|
|
15
|
+
# See https://github.com/rails/rails/commit/d24e640
|
|
16
|
+
# TODO Remove this when dropping support for Rails 3
|
|
17
|
+
if column_model.respond_to?(:type_cast)
|
|
18
|
+
column_model.type_cast @row[index]
|
|
19
|
+
else
|
|
20
|
+
column_model.type_cast_from_database @row[index]
|
|
21
|
+
end
|
|
13
22
|
}
|
|
14
23
|
end
|
|
15
24
|
end
|
|
@@ -13,7 +13,14 @@ module ActiveRecord
|
|
|
13
13
|
|
|
14
14
|
private
|
|
15
15
|
def query_for_enumeration_reading(ar)
|
|
16
|
-
|
|
16
|
+
|
|
17
|
+
# TODO Clean this up after dropping support for Rails 3
|
|
18
|
+
if ActiveRecord::VERSION::MAJOR == 3
|
|
19
|
+
ar = ar.scoped unless ar.respond_to?(:to_sql)
|
|
20
|
+
else
|
|
21
|
+
ar = ar.all unless ar.respond_to?(:to_sql)
|
|
22
|
+
end
|
|
23
|
+
|
|
17
24
|
::ActiveRecord::OnDemand::FastEnumeration.new(ar.arel.engine, ::ActiveRecord::Base.connection.exec_query(ar.to_sql))
|
|
18
25
|
end
|
|
19
26
|
|
|
@@ -24,4 +31,3 @@ end
|
|
|
24
31
|
|
|
25
32
|
::ActiveRecord::Base.send :include, ::ActiveRecord::OnDemand::EnumerationReading
|
|
26
33
|
::ActiveRecord::Relation.send :include, ::ActiveRecord::OnDemand::EnumerationReading::ClassMethods
|
|
27
|
-
|
|
@@ -25,17 +25,10 @@ module ActiveRecord
|
|
|
25
25
|
|
|
26
26
|
relation = self
|
|
27
27
|
|
|
28
|
-
unless arel.orders.blank? && arel.taken.blank?
|
|
28
|
+
unless self.arel.orders.blank? && self.arel.taken.blank?
|
|
29
29
|
::ActiveRecord::Base.logger.warn("Scoped order and limit are ignored, it's forced to be batch order and batch size")
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
if (finder_options = options.except(:start, :batch_size)).present?
|
|
33
|
-
raise "You can't specify an order, it's forced to be #{batch_order_for_reading}" if options[:order].present?
|
|
34
|
-
raise "You can't specify a limit, it's forced to be the batch_size" if options[:limit].present?
|
|
35
|
-
|
|
36
|
-
relation = apply_finder_options(finder_options)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
32
|
start = options.delete(:start)
|
|
40
33
|
batch_size = options.delete(:batch_size) || 1000
|
|
41
34
|
|
|
@@ -61,7 +54,13 @@ module ActiveRecord
|
|
|
61
54
|
private
|
|
62
55
|
|
|
63
56
|
def query_for_reading(ar, options = {})
|
|
64
|
-
|
|
57
|
+
# TODO Clean this up after dropping support for Rails 3
|
|
58
|
+
if ActiveRecord::VERSION::MAJOR == 3
|
|
59
|
+
ar = ar.scoped unless ar.respond_to?(:to_sql)
|
|
60
|
+
else
|
|
61
|
+
ar = ar.all unless ar.respond_to?(:to_sql)
|
|
62
|
+
end
|
|
63
|
+
|
|
65
64
|
results = ::ActiveRecord::Base.connection.exec_query ar.to_sql
|
|
66
65
|
::ActiveRecord::OnDemand::ResultSet.new ar.arel.engine, results, options
|
|
67
66
|
end
|
|
@@ -10,7 +10,14 @@ module ActiveRecord
|
|
|
10
10
|
def for_streaming(options = {})
|
|
11
11
|
options[:batch_size] ||= 50_000
|
|
12
12
|
fr = options.delete(:for_reading)
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
# TODO Clean this up after dropping support for Rails 3
|
|
15
|
+
if ActiveRecord::VERSION::MAJOR == 3
|
|
16
|
+
s = self.respond_to?(:to_sql) ? self : self.scoped
|
|
17
|
+
else
|
|
18
|
+
s = self.respond_to?(:to_sql) ? self : self.all
|
|
19
|
+
end
|
|
20
|
+
|
|
14
21
|
::Enumerator.new do |n|
|
|
15
22
|
s.send(fr ? :for_reading : :find_in_batches, options) do |b|
|
|
16
23
|
b.each { |r| n << r }
|
data/lib/ar-ondemand/record.rb
CHANGED
|
@@ -9,6 +9,11 @@ module ActiveRecord
|
|
|
9
9
|
@model = model
|
|
10
10
|
@defaults = defaults
|
|
11
11
|
@changes = {}
|
|
12
|
+
|
|
13
|
+
# Memoizing Rails 4.2 capability here for performance purposes. See
|
|
14
|
+
# `#save` method for more details
|
|
15
|
+
# TODO Remove when dropping Rails 3 support
|
|
16
|
+
@model_instantiate = @model.respond_to?(:instantiate)
|
|
12
17
|
end
|
|
13
18
|
|
|
14
19
|
def is_readonly?
|
|
@@ -65,10 +70,19 @@ module ActiveRecord
|
|
|
65
70
|
def save
|
|
66
71
|
raise ActiveRecord::ReadOnlyRecord if is_readonly?
|
|
67
72
|
return nil if @changes.empty?
|
|
68
|
-
|
|
73
|
+
|
|
74
|
+
# `@model.allocate.init_with` breaks in Rails 4.2. Construction has been
|
|
75
|
+
# replaced with `instantiate` (see http://stackoverflow.com/q/20409650/1935861
|
|
76
|
+
# and https://github.com/rails/rails/blob/31a95ed/activerecord/lib/active_record/persistence.rb#L56-L70).
|
|
77
|
+
# TODO Remove when dropping Rails 3 support
|
|
78
|
+
if @model_instantiate
|
|
79
|
+
rec = @model.instantiate(@record)
|
|
80
|
+
else
|
|
81
|
+
rec = @model.allocate.init_with('attributes' => @record)
|
|
82
|
+
end
|
|
69
83
|
@changes.each_pair do |key, val|
|
|
70
84
|
next if key == 'id'
|
|
71
|
-
rec
|
|
85
|
+
rec.send("#{key}=".to_sym, val)
|
|
72
86
|
end
|
|
73
87
|
rec.save
|
|
74
88
|
@changes.clear
|
data/lib/ar-ondemand/result.rb
CHANGED
|
@@ -53,7 +53,7 @@ module ActiveRecord
|
|
|
53
53
|
def create_readonly_class
|
|
54
54
|
attrs = @col_indexes.keys.map(&:to_sym)
|
|
55
55
|
return CACHED_READONLY_CLASSES[attrs] if CACHED_READONLY_CLASSES[attrs]
|
|
56
|
-
CACHED_READONLY_CLASSES[attrs] = ::Struct.new
|
|
56
|
+
CACHED_READONLY_CLASSES[attrs] = ::Struct.new(*attrs)
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def convert_to_hash(rec)
|
|
@@ -61,7 +61,14 @@ module ActiveRecord
|
|
|
61
61
|
h = {}
|
|
62
62
|
@col_indexes.each_pair do |k, v|
|
|
63
63
|
if @column_types[k]
|
|
64
|
-
|
|
64
|
+
# Rails 4.2 renamed type_cast into type_cast_from_database
|
|
65
|
+
# This is not documented in their upgrade docs or release notes.
|
|
66
|
+
# See https://github.com/rails/rails/commit/d24e640
|
|
67
|
+
if @column_types[k].respond_to?(:type_cast)
|
|
68
|
+
h[k] = @column_types[k].type_cast rec[v]
|
|
69
|
+
else
|
|
70
|
+
h[k] = @column_types[k].type_cast_from_database rec[v]
|
|
71
|
+
end
|
|
65
72
|
else
|
|
66
73
|
h[k] = rec[v]
|
|
67
74
|
end
|
|
@@ -72,9 +79,16 @@ module ActiveRecord
|
|
|
72
79
|
def convert_to_struct(klass, rec)
|
|
73
80
|
vals = []
|
|
74
81
|
@col_indexes.each_pair do |k, v|
|
|
75
|
-
|
|
82
|
+
# Rails 4.2 renamed type_cast into type_cast_from_database
|
|
83
|
+
# This is not documented in their upgrade docs or release notes.
|
|
84
|
+
# See https://github.com/rails/rails/commit/d24e640
|
|
85
|
+
if @column_types[k].respond_to?(:type_cast)
|
|
86
|
+
vals << @column_types[k].type_cast(rec[v])
|
|
87
|
+
else
|
|
88
|
+
vals << @column_types[k].type_cast_from_database(rec[v])
|
|
89
|
+
end
|
|
76
90
|
end
|
|
77
|
-
klass.new
|
|
91
|
+
klass.new(*vals)
|
|
78
92
|
end
|
|
79
93
|
end
|
|
80
94
|
end
|
data/lib/ar-ondemand/version.rb
CHANGED
data/rails_3.2.Gemfile
ADDED
data/rails_4.0.Gemfile
ADDED
data/rails_4.1.Gemfile
ADDED
data/rails_4.2.Gemfile
ADDED
data/solano.yml
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
---
|
|
2
|
-
:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
ruby_version: ruby-1.9.3-p392
|
|
3
|
+
coverage: false
|
|
4
|
+
|
|
5
|
+
rake:
|
|
6
|
+
rails_env: test
|
|
7
|
+
|
|
8
|
+
environment:
|
|
9
|
+
TZ: UTC
|
|
10
|
+
|
|
11
|
+
# Build pipelines run concurrently (http://docs.solanolabs.com/Beta/build-pipelines/)
|
|
12
|
+
pipeline:
|
|
13
|
+
- rails_3_2
|
|
14
|
+
- rails_4_0
|
|
15
|
+
- rails_4_1
|
|
16
|
+
- rails_4_2
|
|
17
|
+
|
|
18
|
+
# Named profile steps that can be used by build profiles and pipelines
|
|
19
|
+
profiles:
|
|
20
|
+
rails_3_2:
|
|
21
|
+
environment:
|
|
22
|
+
BUNDLE_GEMFILE: rails_3.2.Gemfile
|
|
23
|
+
rails_4_0:
|
|
24
|
+
environment:
|
|
25
|
+
BUNDLE_GEMFILE: rails_4.0.Gemfile
|
|
26
|
+
rails_4_1:
|
|
27
|
+
environment:
|
|
28
|
+
BUNDLE_GEMFILE: rails_4.1.Gemfile
|
|
29
|
+
rails_4_2:
|
|
30
|
+
environment:
|
|
31
|
+
BUNDLE_GEMFILE: rails_4.2.Gemfile
|
|
@@ -31,7 +31,7 @@ describe 'ForStreaming' do
|
|
|
31
31
|
|
|
32
32
|
it 'should support select' do
|
|
33
33
|
total = 0
|
|
34
|
-
AuditRecord.select([:customer_id]).where(customer_id: 1).for_streaming.each do |r|
|
|
34
|
+
AuditRecord.select([:id, :customer_id]).where(customer_id: 1).for_streaming.each do |r|
|
|
35
35
|
expect(r).to be_an_instance_of(AuditRecord)
|
|
36
36
|
expect(r.customer_id).to eq(1)
|
|
37
37
|
expect { r.model_type_id }.to raise_error(::ActiveModel::MissingAttributeError)
|
metadata
CHANGED
|
@@ -1,43 +1,55 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ar-ondemand
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Frank
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ! '>='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '3.2'
|
|
20
|
+
- - <
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: '5'
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
26
|
requirements:
|
|
24
|
-
- -
|
|
27
|
+
- - ! '>='
|
|
25
28
|
- !ruby/object:Gem::Version
|
|
26
29
|
version: '3.2'
|
|
30
|
+
- - <
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '5'
|
|
27
33
|
- !ruby/object:Gem::Dependency
|
|
28
34
|
name: activerecord
|
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
|
30
36
|
requirements:
|
|
31
|
-
- -
|
|
37
|
+
- - ! '>='
|
|
32
38
|
- !ruby/object:Gem::Version
|
|
33
39
|
version: '3.2'
|
|
40
|
+
- - <
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '5'
|
|
34
43
|
type: :runtime
|
|
35
44
|
prerelease: false
|
|
36
45
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
46
|
requirements:
|
|
38
|
-
- -
|
|
47
|
+
- - ! '>='
|
|
39
48
|
- !ruby/object:Gem::Version
|
|
40
49
|
version: '3.2'
|
|
50
|
+
- - <
|
|
51
|
+
- !ruby/object:Gem::Version
|
|
52
|
+
version: '5'
|
|
41
53
|
description: Fast access to database results without the memory overhead of ActiveRecord
|
|
42
54
|
objects
|
|
43
55
|
email:
|
|
@@ -51,7 +63,6 @@ files:
|
|
|
51
63
|
- CHANGELOG.md
|
|
52
64
|
- CONTRIBUTORS.md
|
|
53
65
|
- Gemfile
|
|
54
|
-
- Gemfile.lock
|
|
55
66
|
- LICENSE.md
|
|
56
67
|
- README.md
|
|
57
68
|
- ar-ondemand.gemspec
|
|
@@ -66,6 +77,10 @@ files:
|
|
|
66
77
|
- lib/ar-ondemand/record.rb
|
|
67
78
|
- lib/ar-ondemand/result.rb
|
|
68
79
|
- lib/ar-ondemand/version.rb
|
|
80
|
+
- rails_3.2.Gemfile
|
|
81
|
+
- rails_4.0.Gemfile
|
|
82
|
+
- rails_4.1.Gemfile
|
|
83
|
+
- rails_4.2.Gemfile
|
|
69
84
|
- solano.yml
|
|
70
85
|
- spec/app/models/audit_record.rb
|
|
71
86
|
- spec/app/models/widget.rb
|
data/Gemfile.lock
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
ar-ondemand (1.1.8)
|
|
5
|
-
activerecord (~> 3.2)
|
|
6
|
-
activesupport (~> 3.2)
|
|
7
|
-
|
|
8
|
-
GEM
|
|
9
|
-
remote: http://rubygems.org/
|
|
10
|
-
specs:
|
|
11
|
-
activemodel (3.2.22.5)
|
|
12
|
-
activesupport (= 3.2.22.5)
|
|
13
|
-
builder (~> 3.0.0)
|
|
14
|
-
activerecord (3.2.22.5)
|
|
15
|
-
activemodel (= 3.2.22.5)
|
|
16
|
-
activesupport (= 3.2.22.5)
|
|
17
|
-
arel (~> 3.0.2)
|
|
18
|
-
tzinfo (~> 0.3.29)
|
|
19
|
-
activesupport (3.2.22.5)
|
|
20
|
-
i18n (~> 0.6, >= 0.6.4)
|
|
21
|
-
multi_json (~> 1.0)
|
|
22
|
-
arel (3.0.3)
|
|
23
|
-
builder (3.0.4)
|
|
24
|
-
coderay (1.1.1)
|
|
25
|
-
diff-lcs (1.2.5)
|
|
26
|
-
factory_girl (4.7.0)
|
|
27
|
-
activesupport (>= 3.0.0)
|
|
28
|
-
i18n (0.7.0)
|
|
29
|
-
method_source (0.8.2)
|
|
30
|
-
multi_json (1.12.1)
|
|
31
|
-
pry (0.10.4)
|
|
32
|
-
coderay (~> 1.1.0)
|
|
33
|
-
method_source (~> 0.8.1)
|
|
34
|
-
slop (~> 3.4)
|
|
35
|
-
rspec (3.5.0)
|
|
36
|
-
rspec-core (~> 3.5.0)
|
|
37
|
-
rspec-expectations (~> 3.5.0)
|
|
38
|
-
rspec-mocks (~> 3.5.0)
|
|
39
|
-
rspec-core (3.5.4)
|
|
40
|
-
rspec-support (~> 3.5.0)
|
|
41
|
-
rspec-expectations (3.5.0)
|
|
42
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
43
|
-
rspec-support (~> 3.5.0)
|
|
44
|
-
rspec-mocks (3.5.0)
|
|
45
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
|
-
rspec-support (~> 3.5.0)
|
|
47
|
-
rspec-support (3.5.0)
|
|
48
|
-
slop (3.6.0)
|
|
49
|
-
sqlite3 (1.3.12)
|
|
50
|
-
tzinfo (0.3.52)
|
|
51
|
-
|
|
52
|
-
PLATFORMS
|
|
53
|
-
ruby
|
|
54
|
-
|
|
55
|
-
DEPENDENCIES
|
|
56
|
-
ar-ondemand!
|
|
57
|
-
factory_girl
|
|
58
|
-
pry
|
|
59
|
-
rspec
|
|
60
|
-
sqlite3
|