schema_plus_default_expr 0.1.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/prs.yml +119 -0
- data/.gitignore +1 -0
- data/.simplecov +20 -0
- data/README.md +29 -22
- data/gemfiles/Gemfile.base +1 -1
- data/gemfiles/activerecord-5.2/Gemfile.base +2 -1
- data/gemfiles/activerecord-5.2/Gemfile.postgresql +2 -2
- data/gemfiles/activerecord-5.2/Gemfile.sqlite3 +3 -3
- data/gemfiles/activerecord-6.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-6.0/Gemfile.postgresql +10 -0
- data/gemfiles/{activerecord-5.1 → activerecord-6.0}/Gemfile.sqlite3 +3 -3
- data/lib/schema_plus/default_expr/middleware.rb +1 -1
- data/lib/schema_plus/default_expr/version.rb +1 -1
- data/lib/schema_plus/default_expr.rb +0 -1
- data/schema_dev.yml +4 -4
- data/schema_plus_default_expr.gemspec +7 -8
- data/spec/column_default_spec.rb +13 -3
- data/spec/migration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -2
- metadata +27 -75
- data/.travis.yml +0 -23
- data/gemfiles/activerecord-4.2/Gemfile.base +0 -3
- data/gemfiles/activerecord-4.2/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-4.2/Gemfile.sqlite3 +0 -10
- data/gemfiles/activerecord-5.0/Gemfile.base +0 -3
- data/gemfiles/activerecord-5.0/Gemfile.postgresql +0 -10
- data/gemfiles/activerecord-5.0/Gemfile.sqlite3 +0 -10
- data/gemfiles/activerecord-5.1/Gemfile.base +0 -3
- data/gemfiles/activerecord-5.1/Gemfile.postgresql +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c24085ed3bb05ff633fe8317b15b33bec10b8f3b113843d858f09910dec72738
|
4
|
+
data.tar.gz: cc98c4e98034a47315afe49030f6282bc61bc2d591c469bd979727fc54572a1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e38b77bed24b4fe6ca1bc56e27b230910aa4e5ef69b70edb6d80032bbbedd7b77cf40d84b2444c390d318c313b73c7b7b79ec4b895274ef254c33469813844f
|
7
|
+
data.tar.gz: acafe28b6be7464f484150bbaaaf645fc0d39853e6247ece343f1745e0c96af3bed7a0cae5d4c3e6a543afcd26dcedbc011d1147dda2cb579f7bc964772c3d9c
|
@@ -0,0 +1,119 @@
|
|
1
|
+
# This file was auto-generated by the schema_dev tool, based on the data in
|
2
|
+
# ./schema_dev.yml
|
3
|
+
# Please do not edit this file; any changes will be overwritten next time
|
4
|
+
# schema_dev gets run.
|
5
|
+
---
|
6
|
+
name: CI PR Builds
|
7
|
+
'on':
|
8
|
+
push:
|
9
|
+
branches:
|
10
|
+
- master
|
11
|
+
pull_request:
|
12
|
+
concurrency:
|
13
|
+
group: ci-${{ github.ref }}
|
14
|
+
cancel-in-progress: true
|
15
|
+
jobs:
|
16
|
+
test:
|
17
|
+
runs-on: ubuntu-latest
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby:
|
22
|
+
- '2.5'
|
23
|
+
- '2.7'
|
24
|
+
- '3.0'
|
25
|
+
activerecord:
|
26
|
+
- '5.2'
|
27
|
+
- '6.0'
|
28
|
+
db:
|
29
|
+
- sqlite3
|
30
|
+
- skip
|
31
|
+
dbversion:
|
32
|
+
- skip
|
33
|
+
exclude:
|
34
|
+
- ruby: '3.0'
|
35
|
+
activerecord: '5.2'
|
36
|
+
- db: skip
|
37
|
+
dbversion: skip
|
38
|
+
include:
|
39
|
+
- ruby: '2.5'
|
40
|
+
activerecord: '5.2'
|
41
|
+
db: postgresql
|
42
|
+
dbversion: '9.6'
|
43
|
+
- ruby: '2.5'
|
44
|
+
activerecord: '6.0'
|
45
|
+
db: postgresql
|
46
|
+
dbversion: '9.6'
|
47
|
+
- ruby: '2.7'
|
48
|
+
activerecord: '5.2'
|
49
|
+
db: postgresql
|
50
|
+
dbversion: '9.6'
|
51
|
+
- ruby: '2.7'
|
52
|
+
activerecord: '6.0'
|
53
|
+
db: postgresql
|
54
|
+
dbversion: '9.6'
|
55
|
+
- ruby: '3.0'
|
56
|
+
activerecord: '6.0'
|
57
|
+
db: postgresql
|
58
|
+
dbversion: '9.6'
|
59
|
+
env:
|
60
|
+
BUNDLE_GEMFILE: "${{ github.workspace }}/gemfiles/activerecord-${{ matrix.activerecord }}/Gemfile.${{ matrix.db }}"
|
61
|
+
POSTGRESQL_DB_HOST: 127.0.0.1
|
62
|
+
POSTGRESQL_DB_USER: schema_plus_test
|
63
|
+
POSTGRESQL_DB_PASS: database
|
64
|
+
steps:
|
65
|
+
- uses: actions/checkout@v2
|
66
|
+
- name: Set up Ruby
|
67
|
+
uses: ruby/setup-ruby@v1
|
68
|
+
with:
|
69
|
+
ruby-version: "${{ matrix.ruby }}"
|
70
|
+
bundler-cache: true
|
71
|
+
- name: Run bundle update
|
72
|
+
run: bundle update
|
73
|
+
- name: Start Postgresql
|
74
|
+
if: matrix.db == 'postgresql'
|
75
|
+
run: |
|
76
|
+
docker run --rm --detach \
|
77
|
+
-e POSTGRES_USER=$POSTGRESQL_DB_USER \
|
78
|
+
-e POSTGRES_PASSWORD=$POSTGRESQL_DB_PASS \
|
79
|
+
-p 5432:5432 \
|
80
|
+
--health-cmd "pg_isready -q" \
|
81
|
+
--health-interval 5s \
|
82
|
+
--health-timeout 5s \
|
83
|
+
--health-retries 5 \
|
84
|
+
--name database postgres:${{ matrix.dbversion }}
|
85
|
+
- name: Wait for database to start
|
86
|
+
if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
|
87
|
+
run: |
|
88
|
+
COUNT=0
|
89
|
+
ATTEMPTS=20
|
90
|
+
until [[ $COUNT -eq $ATTEMPTS ]]; do
|
91
|
+
[ "$(docker inspect -f {{.State.Health.Status}} database)" == "healthy" ] && break
|
92
|
+
echo $(( COUNT++ )) > /dev/null
|
93
|
+
sleep 2
|
94
|
+
done
|
95
|
+
- name: Create testing database
|
96
|
+
if: "(matrix.db == 'postgresql' || matrix.db == 'mysql2')"
|
97
|
+
run: bundle exec rake create_ci_database
|
98
|
+
- name: Run tests
|
99
|
+
run: bundle exec rake spec
|
100
|
+
- name: Shutdown database
|
101
|
+
if: always() && (matrix.db == 'postgresql' || matrix.db == 'mysql2')
|
102
|
+
run: docker stop database
|
103
|
+
- name: Coveralls Parallel
|
104
|
+
if: "${{ !env.ACT }}"
|
105
|
+
uses: coverallsapp/github-action@master
|
106
|
+
with:
|
107
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
108
|
+
flag-name: run-${{ matrix.ruby }}-${{ matrix.activerecord }}-${{ matrix.db }}-${{ matrix.dbversion }}
|
109
|
+
parallel: true
|
110
|
+
finish:
|
111
|
+
needs: test
|
112
|
+
runs-on: ubuntu-latest
|
113
|
+
steps:
|
114
|
+
- name: Coveralls Finished
|
115
|
+
if: "${{ !env.ACT }}"
|
116
|
+
uses: coverallsapp/github-action@master
|
117
|
+
with:
|
118
|
+
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
119
|
+
parallel-finished: true
|
data/.gitignore
CHANGED
data/.simplecov
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
SimpleCov.configure do
|
4
|
+
enable_coverage :branch
|
5
|
+
add_filter '/spec/'
|
6
|
+
|
7
|
+
add_group 'Binaries', '/bin/'
|
8
|
+
add_group 'Libraries', '/lib/'
|
9
|
+
|
10
|
+
if ENV['CI']
|
11
|
+
require 'simplecov-lcov'
|
12
|
+
|
13
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
14
|
+
c.report_with_single_file = true
|
15
|
+
c.single_report_path = 'coverage/lcov.info'
|
16
|
+
end
|
17
|
+
|
18
|
+
formatter SimpleCov::Formatter::LcovFormatter
|
19
|
+
end
|
20
|
+
end
|
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/schema_plus_default_expr.svg)](http://badge.fury.io/rb/schema_plus_default_expr)
|
2
|
-
[![Build Status](https://
|
3
|
-
[![Coverage Status](https://
|
4
|
-
[![Dependency Status](https://gemnasium.com/lomba/schema_plus_default_expr.svg)](https://gemnasium.com/SchemaPlus/schema_plus_default_expr)
|
2
|
+
[![Build Status](https://github.com/SchemaPlus/schema_plus_default_expr/actions/workflows/prs.yml/badge.svg)](https://github.com/SchemaPlus/schema_plus_default_expr/actions)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/SchemaPlus/schema_plus_default_expr/badge.svg?branch=master)](https://coveralls.io/github/SchemaPlus/schema_plus_default_expr?branch=master)
|
5
4
|
|
6
5
|
# SchemaPlus::DefaultExpr
|
7
6
|
|
@@ -30,10 +29,11 @@ SchemaPlus::DefaultExpr is tested on:
|
|
30
29
|
|
31
30
|
<!-- SCHEMA_DEV: MATRIX - begin -->
|
32
31
|
<!-- These lines are auto-generated by schema_dev based on schema_dev.yml -->
|
33
|
-
* ruby **2.
|
34
|
-
* ruby **2.
|
35
|
-
* ruby **2.
|
36
|
-
* ruby **2.
|
32
|
+
* ruby **2.5** with activerecord **5.2**, using **sqlite3** and **postgresql:9.6**
|
33
|
+
* ruby **2.5** with activerecord **6.0**, using **sqlite3** and **postgresql:9.6**
|
34
|
+
* ruby **2.7** with activerecord **5.2**, using **sqlite3** and **postgresql:9.6**
|
35
|
+
* ruby **2.7** with activerecord **6.0**, using **sqlite3** and **postgresql:9.6**
|
36
|
+
* ruby **3.0** with activerecord **6.0**, using **sqlite3** and **postgresql:9.6**
|
37
37
|
|
38
38
|
<!-- SCHEMA_DEV: MATRIX - end -->
|
39
39
|
|
@@ -43,16 +43,22 @@ MySQL only supports SQL expression defaults for `TIMESTAMP` column types, which
|
|
43
43
|
|
44
44
|
SchemaPlus::DefaultExpr augments the syntax for setting column defaults, to support expressions or constant values:
|
45
45
|
|
46
|
-
|
47
|
-
|
46
|
+
```ruby
|
47
|
+
t.datetime :seen_at, default: { expr: 'NOW()' }
|
48
|
+
t.datetime :seen_at, default: { value: "2011-12-11 00:00:00" }
|
49
|
+
```
|
48
50
|
|
49
51
|
The standard syntax will still work as usual:
|
50
52
|
|
51
|
-
|
53
|
+
```ruby
|
54
|
+
t.datetime :seen_at, default: "2011-12-11 00:00:00"
|
55
|
+
```
|
52
56
|
|
53
57
|
Also, as a convenience
|
54
58
|
|
55
|
-
|
59
|
+
```ruby
|
60
|
+
t.datetime :seen_at, default: :now
|
61
|
+
```
|
56
62
|
|
57
63
|
resolves to:
|
58
64
|
|
@@ -64,18 +70,20 @@ resolves to:
|
|
64
70
|
|
65
71
|
If you are using Postgresql with a `json` column, ActiveRecord allows you to use a Hash for a default value. Be aware that if the hash contains just one key which is `:expr` or `:value`, then SchemaPlus::DefaultExpr will interpret, and use the corresponding value for the default. That is, these are equivalent:
|
66
72
|
|
67
|
-
|
68
|
-
|
69
|
-
|
73
|
+
```ruby
|
74
|
+
t.json :fields, default: { value: { field1: 'a', field2: 'b' } }
|
75
|
+
t.json :fields, default: { field1: 'a', field2: 'b' }
|
76
|
+
```
|
70
77
|
|
71
78
|
## History
|
72
79
|
|
73
|
-
* 0.
|
74
|
-
* 0.1.
|
75
|
-
* 0.1.
|
76
|
-
* 0.1.
|
77
|
-
* 0.1.
|
78
|
-
* 0.1.
|
80
|
+
* **1.0.0** - Add AR 6.0, Ruby 3.0 and dropped AR < 5.2 and Ruby < 5.2
|
81
|
+
* **0.1.5** - Compatibility with AR 5.2.
|
82
|
+
* **0.1.4** - Compatibility with AR 5. Thanks to [@pedantic-git](https://github.com/pedantic-git)
|
83
|
+
* **0.1.3** - Missing require
|
84
|
+
* **0.1.2** - Explicit gem dependencies
|
85
|
+
* **0.1.1** - Fix dumping bug (#1); upgrade to schema_plus_core 1.0
|
86
|
+
* **0.1.0** - Initial release, extracted from schema_plus 1.x
|
79
87
|
|
80
88
|
## Development & Testing
|
81
89
|
|
@@ -90,7 +98,7 @@ Some things to know about to help you develop and test:
|
|
90
98
|
* **schema_dev**: SchemaPlus::DefaultExpr uses [schema_dev](https://github.com/SchemaPlus/schema_dev) to
|
91
99
|
facilitate running rspec tests on the matrix of ruby, activerecord, and database
|
92
100
|
versions that the gem supports, both locally and on
|
93
|
-
[
|
101
|
+
[github actions](https://github.com/SchemaPlus/schema_plus_default_expr/actions)
|
94
102
|
|
95
103
|
To to run rspec locally on the full matrix, do:
|
96
104
|
|
@@ -102,7 +110,6 @@ Some things to know about to help you develop and test:
|
|
102
110
|
The matrix of configurations is specified in `schema_dev.yml` in
|
103
111
|
the project root.
|
104
112
|
|
105
|
-
|
106
113
|
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_DEV - end -->
|
107
114
|
|
108
115
|
<!-- SCHEMA_DEV: TEMPLATE USES SCHEMA_PLUS_CORE - begin -->
|
data/gemfiles/Gemfile.base
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
eval
|
1
|
+
base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
|
2
|
+
eval File.read(base_gemfile), binding, base_gemfile
|
3
3
|
|
4
4
|
platform :ruby do
|
5
5
|
gem "sqlite3"
|
@@ -7,4 +7,4 @@ end
|
|
7
7
|
|
8
8
|
platform :jruby do
|
9
9
|
gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
|
10
|
-
end
|
10
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
eval
|
1
|
+
base_gemfile = File.expand_path('../Gemfile.base', __FILE__)
|
2
|
+
eval File.read(base_gemfile), binding, base_gemfile
|
3
3
|
|
4
4
|
platform :ruby do
|
5
5
|
gem "sqlite3"
|
@@ -7,4 +7,4 @@ end
|
|
7
7
|
|
8
8
|
platform :jruby do
|
9
9
|
gem 'activerecord-jdbcsqlite3-adapter', '>=1.3.0.beta2'
|
10
|
-
end
|
10
|
+
end
|
@@ -41,7 +41,7 @@ module SchemaPlus::DefaultExpr
|
|
41
41
|
def after(env)
|
42
42
|
env.connection.columns(env.table.name).each do |column|
|
43
43
|
if !column.default_function.nil?
|
44
|
-
if col = env.table.columns.find
|
44
|
+
if col = env.table.columns.find { |it| it.name == column.name }
|
45
45
|
col.options[:default] = { expr: column.default_function }
|
46
46
|
end
|
47
47
|
end
|
data/schema_dev.yml
CHANGED
@@ -17,14 +17,13 @@ Gem::Specification.new do |gem|
|
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.
|
21
|
-
gem.add_dependency "schema_plus_core"
|
22
|
-
gem.add_dependency "its-it", "~> 1.2"
|
20
|
+
gem.required_ruby_version = ">= 2.5.0"
|
23
21
|
|
24
|
-
gem.
|
25
|
-
gem.
|
22
|
+
gem.add_dependency "activerecord", ">= 5.2", "< 6.1"
|
23
|
+
gem.add_dependency "schema_plus_core", '~> 3.0.0'
|
24
|
+
|
25
|
+
gem.add_development_dependency "bundler"
|
26
|
+
gem.add_development_dependency "rake", "~> 13.0"
|
26
27
|
gem.add_development_dependency "rspec", "~> 3.0"
|
27
|
-
gem.add_development_dependency "schema_dev", "~>
|
28
|
-
gem.add_development_dependency "simplecov"
|
29
|
-
gem.add_development_dependency "simplecov-gem-profile"
|
28
|
+
gem.add_development_dependency "schema_dev", "~> 4.1"
|
30
29
|
end
|
data/spec/column_default_spec.rb
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe "Column definition" do
|
4
|
+
def stub_model(name, base = ActiveRecord::Base, &block)
|
5
|
+
klass = Class.new(base)
|
6
|
+
|
7
|
+
if block_given?
|
8
|
+
klass.instance_eval(&block)
|
9
|
+
end
|
10
|
+
|
11
|
+
stub_const(name, klass)
|
12
|
+
end
|
13
|
+
|
4
14
|
before(:each) do
|
5
15
|
define_schema do
|
6
16
|
create_table :models, :force => true do |t|
|
7
17
|
end
|
8
18
|
end
|
9
|
-
|
19
|
+
stub_model('Model')
|
10
20
|
end
|
11
21
|
|
12
22
|
subject {
|
@@ -114,10 +124,10 @@ describe "Column definition" do
|
|
114
124
|
|
115
125
|
private
|
116
126
|
|
117
|
-
def define_test_column(type,
|
127
|
+
def define_test_column(type, **options)
|
118
128
|
ActiveRecord::Migration.suppress_messages do
|
119
129
|
ActiveRecord::Migration.create_table Model.table_name, :force => true do |t|
|
120
|
-
t.send type, :test_column,
|
130
|
+
t.send type, :test_column, **options
|
121
131
|
t.integer :dummy
|
122
132
|
end
|
123
133
|
end
|
data/spec/migration_spec.rb
CHANGED
@@ -37,7 +37,7 @@ describe ActiveRecord::Migration do
|
|
37
37
|
|
38
38
|
def recreate_table(model, opts={}, &block)
|
39
39
|
ActiveRecord::Migration.suppress_messages do
|
40
|
-
ActiveRecord::Migration.create_table model.table_name, opts.merge(:force => true), &block
|
40
|
+
ActiveRecord::Migration.create_table model.table_name, **opts.merge(:force => true), &block
|
41
41
|
end
|
42
42
|
model.reset_column_information
|
43
43
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_default_expr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ronen barzel
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,76 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '6.
|
22
|
+
version: '6.1'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
29
|
+
version: '5.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '6.
|
32
|
+
version: '6.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: schema_plus_core
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
40
|
-
type: :runtime
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
requirements:
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0'
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: its-it
|
49
35
|
requirement: !ruby/object:Gem::Requirement
|
50
36
|
requirements:
|
51
37
|
- - "~>"
|
52
38
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
39
|
+
version: 3.0.0
|
54
40
|
type: :runtime
|
55
41
|
prerelease: false
|
56
42
|
version_requirements: !ruby/object:Gem::Requirement
|
57
43
|
requirements:
|
58
44
|
- - "~>"
|
59
45
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
46
|
+
version: 3.0.0
|
61
47
|
- !ruby/object:Gem::Dependency
|
62
48
|
name: bundler
|
63
49
|
requirement: !ruby/object:Gem::Requirement
|
64
50
|
requirements:
|
65
|
-
- - "
|
51
|
+
- - ">="
|
66
52
|
- !ruby/object:Gem::Version
|
67
|
-
version: '
|
53
|
+
version: '0'
|
68
54
|
type: :development
|
69
55
|
prerelease: false
|
70
56
|
version_requirements: !ruby/object:Gem::Requirement
|
71
57
|
requirements:
|
72
|
-
- - "
|
58
|
+
- - ">="
|
73
59
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
60
|
+
version: '0'
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: rake
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
78
64
|
requirements:
|
79
65
|
- - "~>"
|
80
66
|
- !ruby/object:Gem::Version
|
81
|
-
version: '
|
67
|
+
version: '13.0'
|
82
68
|
type: :development
|
83
69
|
prerelease: false
|
84
70
|
version_requirements: !ruby/object:Gem::Requirement
|
85
71
|
requirements:
|
86
72
|
- - "~>"
|
87
73
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
74
|
+
version: '13.0'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: rspec
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -106,68 +92,35 @@ dependencies:
|
|
106
92
|
requirements:
|
107
93
|
- - "~>"
|
108
94
|
- !ruby/object:Gem::Version
|
109
|
-
version: '
|
95
|
+
version: '4.1'
|
110
96
|
type: :development
|
111
97
|
prerelease: false
|
112
98
|
version_requirements: !ruby/object:Gem::Requirement
|
113
99
|
requirements:
|
114
100
|
- - "~>"
|
115
101
|
- !ruby/object:Gem::Version
|
116
|
-
version: '
|
117
|
-
|
118
|
-
name: simplecov
|
119
|
-
requirement: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - ">="
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '0'
|
124
|
-
type: :development
|
125
|
-
prerelease: false
|
126
|
-
version_requirements: !ruby/object:Gem::Requirement
|
127
|
-
requirements:
|
128
|
-
- - ">="
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: '0'
|
131
|
-
- !ruby/object:Gem::Dependency
|
132
|
-
name: simplecov-gem-profile
|
133
|
-
requirement: !ruby/object:Gem::Requirement
|
134
|
-
requirements:
|
135
|
-
- - ">="
|
136
|
-
- !ruby/object:Gem::Version
|
137
|
-
version: '0'
|
138
|
-
type: :development
|
139
|
-
prerelease: false
|
140
|
-
version_requirements: !ruby/object:Gem::Requirement
|
141
|
-
requirements:
|
142
|
-
- - ">="
|
143
|
-
- !ruby/object:Gem::Version
|
144
|
-
version: '0'
|
145
|
-
description:
|
102
|
+
version: '4.1'
|
103
|
+
description:
|
146
104
|
email:
|
147
105
|
- ronen@barzel.org
|
148
106
|
executables: []
|
149
107
|
extensions: []
|
150
108
|
extra_rdoc_files: []
|
151
109
|
files:
|
110
|
+
- ".github/workflows/prs.yml"
|
152
111
|
- ".gitignore"
|
153
|
-
- ".
|
112
|
+
- ".simplecov"
|
154
113
|
- Gemfile
|
155
114
|
- LICENSE.txt
|
156
115
|
- README.md
|
157
116
|
- Rakefile
|
158
117
|
- gemfiles/Gemfile.base
|
159
|
-
- gemfiles/activerecord-4.2/Gemfile.base
|
160
|
-
- gemfiles/activerecord-4.2/Gemfile.postgresql
|
161
|
-
- gemfiles/activerecord-4.2/Gemfile.sqlite3
|
162
|
-
- gemfiles/activerecord-5.0/Gemfile.base
|
163
|
-
- gemfiles/activerecord-5.0/Gemfile.postgresql
|
164
|
-
- gemfiles/activerecord-5.0/Gemfile.sqlite3
|
165
|
-
- gemfiles/activerecord-5.1/Gemfile.base
|
166
|
-
- gemfiles/activerecord-5.1/Gemfile.postgresql
|
167
|
-
- gemfiles/activerecord-5.1/Gemfile.sqlite3
|
168
118
|
- gemfiles/activerecord-5.2/Gemfile.base
|
169
119
|
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
170
120
|
- gemfiles/activerecord-5.2/Gemfile.sqlite3
|
121
|
+
- gemfiles/activerecord-6.0/Gemfile.base
|
122
|
+
- gemfiles/activerecord-6.0/Gemfile.postgresql
|
123
|
+
- gemfiles/activerecord-6.0/Gemfile.sqlite3
|
171
124
|
- lib/schema_plus/default_expr.rb
|
172
125
|
- lib/schema_plus/default_expr/active_record/connection_adapters/abstract_adapter.rb
|
173
126
|
- lib/schema_plus/default_expr/active_record/connection_adapters/column.rb
|
@@ -186,7 +139,7 @@ homepage: https://github.com/SchemaPlus/schema_plus_default_expr
|
|
186
139
|
licenses:
|
187
140
|
- MIT
|
188
141
|
metadata: {}
|
189
|
-
post_install_message:
|
142
|
+
post_install_message:
|
190
143
|
rdoc_options: []
|
191
144
|
require_paths:
|
192
145
|
- lib
|
@@ -194,16 +147,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
194
147
|
requirements:
|
195
148
|
- - ">="
|
196
149
|
- !ruby/object:Gem::Version
|
197
|
-
version:
|
150
|
+
version: 2.5.0
|
198
151
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
199
152
|
requirements:
|
200
153
|
- - ">="
|
201
154
|
- !ruby/object:Gem::Version
|
202
155
|
version: '0'
|
203
156
|
requirements: []
|
204
|
-
|
205
|
-
|
206
|
-
signing_key:
|
157
|
+
rubygems_version: 3.0.8
|
158
|
+
signing_key:
|
207
159
|
specification_version: 4
|
208
160
|
summary: Extends ActiveRecord migrations to allow an SQL expression for the default
|
209
161
|
value of a column
|
data/.travis.yml
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# This file was auto-generated by the schema_dev tool, based on the data in
|
2
|
-
# ./schema_dev.yml
|
3
|
-
# Please do not edit this file; any changes will be overwritten next time
|
4
|
-
# schema_dev gets run.
|
5
|
-
---
|
6
|
-
sudo: false
|
7
|
-
rvm:
|
8
|
-
- 2.3.1
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/activerecord-4.2/Gemfile.postgresql
|
11
|
-
- gemfiles/activerecord-4.2/Gemfile.sqlite3
|
12
|
-
- gemfiles/activerecord-5.0/Gemfile.postgresql
|
13
|
-
- gemfiles/activerecord-5.0/Gemfile.sqlite3
|
14
|
-
- gemfiles/activerecord-5.1/Gemfile.postgresql
|
15
|
-
- gemfiles/activerecord-5.1/Gemfile.sqlite3
|
16
|
-
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
17
|
-
- gemfiles/activerecord-5.2/Gemfile.sqlite3
|
18
|
-
env: POSTGRESQL_DB_USER=postgres
|
19
|
-
addons:
|
20
|
-
postgresql: '9.4'
|
21
|
-
before_script: bundle exec rake create_databases
|
22
|
-
after_script: bundle exec rake drop_databases
|
23
|
-
script: bundle exec rake travis
|