ar-bigint 0.1.0 → 0.2.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
  SHA256:
3
- metadata.gz: 15f1b701b1f42152a0e6b8b1e73ae7f467940863c34b4225db73dd77e80685a8
4
- data.tar.gz: 9a072ebd59fd810440359e518fbecb77c005b4db57eccab56236bda06c9e0055
3
+ metadata.gz: d29e9dddff40abcab22986e66e650003df026cdbb9f0a1818f869bbed562de19
4
+ data.tar.gz: fff47097e99510c752df1f51f349a7433d18320b8888b69a027716079f1acb64
5
5
  SHA512:
6
- metadata.gz: 57f49ed650bb73b354ad53ecd70e9d1924e83910e8031a597b17bf7d6cd597b33268e9ebf33a3893484dcc8adcc3ea57fceead3fe6d2bd3991a26a832dd9b874
7
- data.tar.gz: 648ec9d4e6bc0fc382e1ba3f59e917cb162fefcf4dcb0d4b2ffa3f46af8011a138f9981088cccf55bb1f6a467d5f934fb09555fc5eaca3ac35f25daee4410482
6
+ metadata.gz: 79a1882b5634ac137c2842b5fc58270c8a014aa3eb12364b780efd177e7e97da5cae9921f663399a0314e6a52b58b9b1dc747dc43b7d7f2ba574cd8f61ba9c72
7
+ data.tar.gz: 11081fdb79e066ac2fbfd28687b15bac529faefacaa9e309f5496b0b24987061a6d05134b6451b42b939b15fec3642e57bd8216a593896ca3131179df16644b1
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ *.lock
@@ -0,0 +1,9 @@
1
+ ---
2
+ inherit_gem:
3
+ rubocop-fnando: .rubocop.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+
8
+ Naming/FileName:
9
+ Enabled: false
@@ -1,16 +1,24 @@
1
+ ---
1
2
  language: ruby
2
3
  sudo: false
3
4
  cache: bundler
4
5
  rvm:
5
- - 2.5.3
6
+ - 2.6.5
7
+ - 2.5.7
6
8
  notifications:
7
9
  email: false
10
+ gemfile:
11
+ - gemfiles/6.0.gemfile
12
+ - gemfiles/5.2.gemfile
8
13
  env:
9
14
  global:
10
15
  secure: LXQJ2XOvyi1m91iDDmtVaCpZax/8v5fN0ePdyLVzv+0NpZv+44KdXVM+kXAscd4tIaTpFlbWBYBMWRgWh9goSLxUBJzBi9Oa1R5Zugz+Hh2qOSRd2NqXzTxsqvLdCA7XuE3wCrz0XJdMVvK4GosmJbWqwwKBUFlVYo0cQZ73tkOaL1mk6br0nu7jIoybC4umHA6bag8MD9Zku/McbYRQtQc5lWOf1HFnzDZPUtYdILDhst8R0jIjSPKC9obFb1+aeDFgyA4V/rxzTIkj70GxgOzTjN45/tN/JzN3BSxhkvCXszSzf/T6LGo/BPM8aOHThU9GTIDHPh66LkFF1itIbxnsVyjh3BDAV3xrtVMOMKiWl2tAEtUUsWvL/NOQMGJnNIIY9fScTHu9lDWJuzGFt5t0wfl2ASZxIR5VRdJqkEQLLl59bvBwTmkFFk3jynDpJXLlUhd6e/wI2mlzwDJK5j9L0dbiRAnmjoSCX1LhcJVPOX8l2Dr92H6ZbK67JqELQ3Z4glnO8HJwlxLYt5Oyd4S6M7sGHfR8vdmVUkJhDmFfxb225IxQsQ98DXI4GmChYUgN36cZL2cCY228ID6iNzcTGUp5mfQ0prXtkpXybyuu6e6MnUeMTbFlvSxdodIzYye7RUrzVS/pYWkZutbs1XEnbJ8hmc49emWXYynIOZY=
16
+ services:
17
+ - postgresql
18
+ before_install:
19
+ - gem install bundler
11
20
  before_script:
12
21
  - createdb test
13
- - gem install bundler
14
22
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
15
23
  - chmod +x ./cc-test-reporter
16
24
  - ./cc-test-reporter before-build
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec path: ".."
5
+ gem "activerecord", "~> 5.2"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+ gemspec path: ".."
5
+ gem "activerecord", "~> 6.0.0"
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "ar/bigint"
@@ -1,8 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "active_record"
2
4
  require "active_record/connection_adapters/postgresql_adapter"
3
5
 
4
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:integer] = {name: "integer", limit: 8}
6
+ ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES[:integer][:limit] = 8
7
+
8
+ ActiveRecord::Type.class_eval do
9
+ extension = Module.new do
10
+ def column(name, type, **options)
11
+ type = :bigint if type == :integer
12
+ super(name, type, **options)
13
+ end
14
+ end
5
15
 
6
- ActiveRecord::ConnectionAdapters::ColumnMethods.class_eval do
7
- alias_method :integer, :bigint
16
+ ActiveRecord::ConnectionAdapters::TableDefinition.prepend(extension)
8
17
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AR
2
4
  module BigInt
3
- VERSION = "0.1.0"
5
+ VERSION = "0.2.0"
4
6
  end
5
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar-bigint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-09 00:00:00.000000000 Z
11
+ date: 2019-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -116,6 +116,7 @@ extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
118
  - ".gitignore"
119
+ - ".rubocop.yml"
119
120
  - ".travis.yml"
120
121
  - CHANGELOG.md
121
122
  - CODE_OF_CONDUCT.md
@@ -126,6 +127,8 @@ files:
126
127
  - ar-bigint.gemspec
127
128
  - bin/console
128
129
  - bin/setup
130
+ - gemfiles/5.2.gemfile
131
+ - gemfiles/6.0.gemfile
129
132
  - lib/ar-bigint.rb
130
133
  - lib/ar/bigint.rb
131
134
  - lib/ar/bigint/version.rb
@@ -148,8 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
151
  - !ruby/object:Gem::Version
149
152
  version: '0'
150
153
  requirements: []
151
- rubyforge_project:
152
- rubygems_version: 2.7.6
154
+ rubygems_version: 3.0.3
153
155
  signing_key:
154
156
  specification_version: 4
155
157
  summary: Make ActiveRecord's PostgreSQL adapter always use bigint columns