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 +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +10 -2
- data/gemfiles/5.2.gemfile +5 -0
- data/gemfiles/6.0.gemfile +5 -0
- data/lib/ar-bigint.rb +2 -0
- data/lib/ar/bigint.rb +12 -3
- data/lib/ar/bigint/version.rb +3 -1
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d29e9dddff40abcab22986e66e650003df026cdbb9f0a1818f869bbed562de19
|
4
|
+
data.tar.gz: fff47097e99510c752df1f51f349a7433d18320b8888b69a027716079f1acb64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79a1882b5634ac137c2842b5fc58270c8a014aa3eb12364b780efd177e7e97da5cae9921f663399a0314e6a52b58b9b1dc747dc43b7d7f2ba574cd8f61ba9c72
|
7
|
+
data.tar.gz: 11081fdb79e066ac2fbfd28687b15bac529faefacaa9e309f5496b0b24987061a6d05134b6451b42b939b15fec3642e57bd8216a593896ca3131179df16644b1
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
@@ -1,16 +1,24 @@
|
|
1
|
+
---
|
1
2
|
language: ruby
|
2
3
|
sudo: false
|
3
4
|
cache: bundler
|
4
5
|
rvm:
|
5
|
-
- 2.5
|
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
|
data/lib/ar-bigint.rb
CHANGED
data/lib/ar/bigint.rb
CHANGED
@@ -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] =
|
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::
|
7
|
-
alias_method :integer, :bigint
|
16
|
+
ActiveRecord::ConnectionAdapters::TableDefinition.prepend(extension)
|
8
17
|
end
|
data/lib/ar/bigint/version.rb
CHANGED
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.
|
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:
|
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
|
-
|
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
|