has_dynamic_columns 0.3.2 → 0.3.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f872c8cb5a681f06b58bd3e57477bc275a153c3c
4
- data.tar.gz: c4d47b6fb08df2fd3bdd4d531988adc00c5312b0
3
+ metadata.gz: 2f728b40892f557858d9809deb92fe4f6c80e54a
4
+ data.tar.gz: f8c151d8a22042bfb7803be46dce5aefd06600a4
5
5
  SHA512:
6
- metadata.gz: dd399b22a0be68a064d8e9f8e67bbc2558d290035c59fce659be6597d0406d928766d75f514b4c7b7cf67d0aa363abaa6af4c0ec79f85251195ef4bbbc8ca367
7
- data.tar.gz: 7de3e24535b04a0b3a5abcbd40d573c6688164e954088f5e3f5878c46a2a2e5364a95b5792c19b78db9cb35564953dbabf3595f51d9c59605383fe93b99af191
6
+ metadata.gz: 7a73f110f7ea4dd8e4509e9cb62b53016976e4cdf98286511e5ccd8fa09fe939b1535e829ef561179fc46c87d36fc084c53abf2bdc1fa6cbba19c5aa4977e382
7
+ data.tar.gz: a186cb3ab5e69896847bb6e91a8f291435680547d1013fae4c76b189642f12714f0cd7c95cfacb893bf81d460d4fd871623733b98b1d1db8039cf695756b2ddf
@@ -226,7 +226,7 @@ module HasDynamicColumns
226
226
  if opts == :chain
227
227
  ::ActiveRecord::QueryMethods::WhereChain.new(clone)
228
228
  else
229
- where_without_dynamic_columns(opts, rest)
229
+ where_without_dynamic_columns(opts, *rest)
230
230
  end
231
231
  end
232
232
 
@@ -202,7 +202,7 @@ module HasDynamicColumns
202
202
  chain = ::ActiveRecord::QueryMethods::WhereChain.new(scope)
203
203
  chain.send(:extend, WhereChainCompatibility)
204
204
  else
205
- where_without_dynamic_columns(opts, rest)
205
+ where_without_dynamic_columns(opts, *rest)
206
206
  end
207
207
  end
208
208
 
@@ -1,3 +1,3 @@
1
1
  module HasDynamicColumns
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -42,6 +42,7 @@ describe ::HasDynamicColumns::ActiveRecord::QueryMethods do
42
42
  }
43
43
  customer.save
44
44
  end
45
+
45
46
  context 'Customer' do
46
47
  it 'should order by first_name' do
47
48
  table = Customer.arel_table
@@ -249,4 +250,12 @@ describe ::HasDynamicColumns::ActiveRecord::QueryMethods do
249
250
  expect(result).to eq([["1", 30, "Butch", "Casidy"], ["2", 30, "Butch", "Marshall"], ["1", 10, "George", "Marshall"]])
250
251
  end
251
252
  end
253
+
254
+ context 'ActiveRecord' do
255
+ it 'should not clobber where IN queries' do
256
+ sql = Account.where("id IN (?)", [1,2,3]).to_sql
257
+ expect(sql).to eq('SELECT "accounts".* FROM "accounts" WHERE (id IN (1,2,3))')
258
+ end
259
+ end
260
+
252
261
  end
@@ -1,7 +1,5 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe HasDynamicColumns::DynamicColumnStringDatum do
4
- it 'test' do
5
- #puts FactoryGirl.create(:account_with_customer_dynamic_columns).inspect
6
- end
4
+
7
5
  end
data/spec/spec_helper.rb CHANGED
@@ -31,7 +31,7 @@ require "generators/has_dynamic_columns/templates/migration"
31
31
  require "generators/has_dynamic_columns/templates/migration_0.3.0"
32
32
  ActiveRecord::Schema.define do
33
33
  AddHasDynamicColumns.up
34
- AddHasDynamicColumnsDatastore.up
34
+ Upgrade030HasDynamicColumns.up
35
35
 
36
36
  create_table :accounts, force: true do |t|
37
37
  t.string :name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: has_dynamic_columns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Butch Marshall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord