github-ds 0.4.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 235c233b2750caaa258c1fc172f6b2b14d117d533f247fbce0cb34ca83779b96
4
- data.tar.gz: 88caf6d96cce86f1ad841e22397e2f21ed63982a00fc3469009ed230126001a1
3
+ metadata.gz: 88208f2b8cc24184dce9a984af467c44d9560196e9832d637ee99aac34082da8
4
+ data.tar.gz: 70f8c5e30c4b237e33e0d96ff747c4719bcf300f5a67472fe7d347e6779ff0f7
5
5
  SHA512:
6
- metadata.gz: 47af7f674f862f846be53c0546cbb76ec38f9d96c8043b0107a7406a5bbf8bdfa7773fcbdf0071165d18105327471f7b06ee41c7e46f3464ea1c621d0f9dac0e
7
- data.tar.gz: 5a73591ab5bd465376ec8d2e849aaf1fd10f269121eb50bc1428f1f7c42c91d9a4305299f70b21df1aecb9757c16de516ceab7594ba8f290d5e37d491615986b
6
+ metadata.gz: 5afcb251c8dcbb250db23eb758f67a38baa8933fcf6325f2c9a419ae1dcee5455d7571a0eb0cfed0b401134225e482c74cab421b0bd116931996b5b954710c78
7
+ data.tar.gz: bda6aa58192ec5d29d3a909f1d14d939fcb4b069019c7d617ede8f3e580eceedaddb180cf2c266cf9e8d21e262d7752d3d04d20ecfe1e5491cf75f544a611395
@@ -3,15 +3,12 @@ before_install:
3
3
  - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
4
4
  - gem install bundler -v '<2'
5
5
  rvm:
6
- - 2.3
7
- - 2.4
8
6
  - 2.5
7
+ - 2.6
8
+ - 2.7
9
9
  script: bundle exec rake
10
10
  env:
11
- - RAILS_VERSION=6.0.0.rc1
11
+ - RAILS_VERSION=6.0.3.1
12
12
  - RAILS_VERSION=5.2.0
13
- - RAILS_VERSION=5.1.5
14
- - RAILS_VERSION=5.0.6
15
- - RAILS_VERSION=4.2.10
16
13
  services:
17
14
  - mysql
data/Gemfile CHANGED
@@ -1,12 +1,18 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
3
 
4
- DEFAULT_RAILS_VERSION = '5.0.2'
4
+ DEFAULT_RAILS_VERSION = '6.0.3'
5
+ ENV['RAILS_VERSION'] ||= DEFAULT_RAILS_VERSION
5
6
 
6
- if ENV['RAILS_VERSION'] = '4.2.10'
7
+ if ENV['RAILS_VERSION'] == '4.2.10'
7
8
  gem 'mysql2', '~> 0.3.18'
8
9
  else
9
10
  gem "mysql2"
10
11
  end
11
- gem "rails", "~> #{ENV['RAILS_VERSION'] || DEFAULT_RAILS_VERSION}"
12
- gem "activerecord", "~> #{ENV['RAILS_VERSION'] || DEFAULT_RAILS_VERSION}"
12
+
13
+ if ENV['RAILS_VERSION'] == 'master'
14
+ gem "activerecord", git: "https://github.com/rails/rails"
15
+ else
16
+ gem "rails", "~> #{ENV['RAILS_VERSION'] || DEFAULT_RAILS_VERSION}"
17
+ gem "activerecord", "~> #{ENV['RAILS_VERSION'] || DEFAULT_RAILS_VERSION}"
18
+ end
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_dependency "activerecord", ">= 3.2"
34
34
 
35
35
  spec.add_development_dependency "bundler", ">= 1.14"
36
- spec.add_development_dependency "rake", "~> 10.0"
36
+ spec.add_development_dependency "rake", "~> 12.0"
37
37
  spec.add_development_dependency "minitest", "~> 5.0"
38
38
  spec.add_development_dependency "timecop", "~> 0.8.1"
39
39
  spec.add_development_dependency "activesupport"
@@ -18,7 +18,7 @@ module Github
18
18
  end
19
19
 
20
20
  def self.migration_version
21
- if Rails.version.start_with?('5')
21
+ if Rails::VERSION::MAJOR.to_i >= 5
22
22
  "[#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}]"
23
23
  end
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module GitHub
2
2
  module DS
3
- VERSION = "0.4.0"
3
+ VERSION = "0.5.0"
4
4
  end
5
5
  end
@@ -43,7 +43,7 @@ module GitHub
43
43
  # GitHub::SQL#initialize or overriding connection then you'll need to use
44
44
  # the instance version.
45
45
  def self.transaction(options = {}, &block)
46
- ActiveRecord::Base.connection.transaction(options, &block)
46
+ ActiveRecord::Base.connection.transaction(**options, &block)
47
47
  end
48
48
 
49
49
  # Public: Instantiate a literal SQL value.
@@ -213,7 +213,7 @@ module GitHub
213
213
  # Use select_all to retrieve hashes for each row instead of arrays of values.
214
214
  @models = connection.
215
215
  select_all(query, "#{klass.name} Load via #{self.class.name}").
216
- collect! { |record| klass.send :instantiate, record }
216
+ map { |record| klass.send :instantiate, record }
217
217
 
218
218
  retrieve_found_row_count
219
219
  freeze
@@ -299,7 +299,7 @@ module GitHub
299
299
 
300
300
  # Public: Run inside a transaction for the connection.
301
301
  def transaction(options = {}, &block)
302
- connection.transaction(options, &block)
302
+ connection.transaction(**options, &block)
303
303
  end
304
304
 
305
305
  # Internal: The object we use to execute SQL and retrieve results. Defaults
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-ds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  - John Nunemaker
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-20 00:00:00.000000000 Z
12
+ date: 2020-06-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -45,14 +45,14 @@ dependencies:
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '10.0'
48
+ version: '12.0'
49
49
  type: :development
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
- version: '10.0'
55
+ version: '12.0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: minitest
58
58
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +199,7 @@ licenses:
199
199
  - MIT
200
200
  metadata:
201
201
  allowed_push_host: https://rubygems.org
202
- post_install_message:
202
+ post_install_message:
203
203
  rdoc_options: []
204
204
  require_paths:
205
205
  - lib
@@ -214,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
214
214
  - !ruby/object:Gem::Version
215
215
  version: '0'
216
216
  requirements: []
217
- rubygems_version: 3.0.3
218
- signing_key:
217
+ rubygems_version: 3.1.2
218
+ signing_key:
219
219
  specification_version: 4
220
220
  summary: A collection of libraries for working with SQL on top of ActiveRecord's connection.
221
221
  test_files: []