surus 0.6.4 → 0.6.5

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: afd6203a513dcb6136faec8044f8dbbb14ed2f35
4
- data.tar.gz: fdec01e83da15fde64daaf59ed496fe65a613ee8
3
+ metadata.gz: ca553e879baa56ea3b059072ecb5cdfbdfc148f4
4
+ data.tar.gz: 9284d9fc51b2d3b50c013e19e77b13a8ce1f8cbe
5
5
  SHA512:
6
- metadata.gz: 4286d4e69d627d9ea2cf774870bf7dfd1e7006313a9921e54bfdc7156bb7d16e4ae460f142851e15d1ba8b6ed0707be0e3626c20a54e490d756f788e7d0d2b45
7
- data.tar.gz: fb9e31a45421de9f476440d6d225d2cd34f8984afd5443f5489613acb79d0242a1ea243ee400a6f1ae03c43296f3840f3b7ec3c0038fd9effe8fa0478ebb7dc8
6
+ metadata.gz: 818f420d11fd94a7e90d67855cdb5e79db3aac8c5d73c08608012e46ee8c73f1067a1555730c369c3817d2ba6dcc36d34a4b79121334cc78fc2c97dcedf82b0e
7
+ data.tar.gz: 4131b91df11f7186e7260b0aed8d87079ed124f7f03fe253bcd80dd35d1068e96f188fd0914251df8c1a8443132cfd1d5a99bfdde3e30f9e59e9d20450aa7cf4
@@ -2,14 +2,14 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.3.1
5
+ - 2.4.1
6
+ - 2.3.4
6
7
  - 2.2.5
7
- - 2.1.10
8
8
  - rbx
9
9
  gemfile:
10
- - gemfiles/4.1.gemfile
11
10
  - gemfiles/4.2.gemfile
12
11
  - gemfiles/5.0.gemfile
12
+ - gemfiles/5.1.gemfile
13
13
 
14
14
  matrix:
15
15
  allow_failures:
@@ -25,4 +25,3 @@ before_script:
25
25
 
26
26
  script:
27
27
  - bundle exec rake spec
28
- - bundle exec rubocop
@@ -1,3 +1,9 @@
1
+ # 0.6.5 (May 5, 2017)
2
+
3
+ * Qualify column references with table names (Zach Schneider)
4
+ * Tested against Rails 5.1 and Ruby 2.4
5
+ * Dropped Rails 4.1 and Ruby 2.1 support
6
+
1
7
  # 0.6.4 (November 5, 2016)
2
8
 
3
9
  * Fix has_and_belongs_to_many scope with non-standard primary key (Nick Inhofe)
data/README.md CHANGED
@@ -16,7 +16,7 @@ substantially faster than converting ActiveRecord objects to JSON.
16
16
 
17
17
  gem install surus
18
18
 
19
- Or add to your Gemfile. This version of Surus only works on Rails 4.
19
+ Or add to your Gemfile. This version of Surus only works on Rails 4.2+.
20
20
 
21
21
  gem 'surus'
22
22
 
@@ -1,5 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "activerecord", "~> 5.0.0.rc1"
3
+ gem "activerecord", "~> 5.0.0"
4
4
 
5
5
  gemspec :path=>"../"
@@ -1,5 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "activerecord", "~> 4.1.14"
3
+ gem "activerecord", "~> 5.1.0"
4
4
 
5
5
  gemspec :path=>"../"
@@ -4,10 +4,18 @@ module Surus
4
4
  def scope
5
5
  s = association
6
6
  .klass
7
- .where("#{quote_column_name association.active_record_primary_key}=#{quote_column_name association.foreign_key}")
7
+ .where("#{association_primary_key}=#{association_foreign_key}")
8
8
  s = s.instance_eval(&association.scope) if association.scope
9
9
  s
10
10
  end
11
+
12
+ def association_primary_key
13
+ "#{association.quoted_table_name}.#{quote_column_name association.active_record_primary_key}"
14
+ end
15
+
16
+ def association_foreign_key
17
+ "#{outside_class.quoted_table_name}.#{quote_column_name association.foreign_key}"
18
+ end
11
19
  end
12
20
  end
13
21
  end
@@ -14,7 +14,7 @@ module Surus
14
14
  end
15
15
 
16
16
  def association_foreign_key
17
- "#{connection.quote_column_name association.foreign_key}"
17
+ "#{association.quoted_table_name}.#{connection.quote_column_name association.foreign_key}"
18
18
  end
19
19
  end
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module Surus
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
@@ -24,13 +24,13 @@ Gem::Specification.new do |s|
24
24
  s.require_paths = ["lib"]
25
25
 
26
26
  # specify any dependencies here; for example:
27
- s.add_dependency 'activerecord', "> 4.1"
27
+ s.add_dependency 'activerecord', "> 4.2"
28
28
 
29
- s.add_development_dependency 'rspec', "~> 3.1.0"
30
- s.add_development_dependency 'rb-fsevent', '~> 0.9.1'
31
- s.add_development_dependency 'oj', '~> 2.0.2'
29
+ s.add_development_dependency 'rspec'
30
+ s.add_development_dependency 'rb-fsevent'
31
+ s.add_development_dependency 'oj'
32
32
  s.add_development_dependency 'pg'
33
- s.add_development_dependency 'pry', '~> 0.9.11'
33
+ s.add_development_dependency 'pry'
34
34
  s.add_development_dependency 'factory_girl', '~> 4.2.0'
35
35
  s.add_development_dependency 'faker', '~> 1.4.3'
36
36
  s.add_development_dependency 'rake'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jack Christensen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-05 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: '4.1'
19
+ version: '4.2'
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.1'
26
+ version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 3.1.0
33
+ version: '0'
34
34
  type: :development
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: 3.1.0
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rb-fsevent
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.9.1
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.1
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: oj
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 2.0.2
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: 2.0.2
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: pg
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: pry
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.11
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.11
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: factory_girl
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -178,9 +178,9 @@ files:
178
178
  - bench/hstore_find.rb
179
179
  - bench/json_generation.rb
180
180
  - bench/synchronous_commit.rb
181
- - gemfiles/4.1.gemfile
182
181
  - gemfiles/4.2.gemfile
183
182
  - gemfiles/5.0.gemfile
183
+ - gemfiles/5.1.gemfile
184
184
  - lib/generators/surus/hstore/install_generator.rb
185
185
  - lib/generators/surus/hstore/templates/install_hstore.rb
186
186
  - lib/surus.rb
@@ -232,8 +232,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
232
232
  version: '0'
233
233
  requirements: []
234
234
  rubyforge_project: ''
235
- rubygems_version: 2.5.1
235
+ rubygems_version: 2.6.11
236
236
  signing_key:
237
237
  specification_version: 4
238
238
  summary: PostgreSQL Acceleration for ActiveRecord
239
- test_files: []
239
+ test_files:
240
+ - spec/array/scope_spec.rb
241
+ - spec/database.yml
242
+ - spec/database.yml.travis
243
+ - spec/database_structure.sql
244
+ - spec/factories.rb
245
+ - spec/hstore/scope_spec.rb
246
+ - spec/hstore/serializer_spec.rb
247
+ - spec/json/json_spec.rb
248
+ - spec/spec_helper.rb
249
+ - spec/synchronous_commit/connection_spec.rb
250
+ - spec/synchronous_commit/model_spec.rb