schema_plus_views 0.3.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/prs.yml +194 -0
- data/.gitignore +1 -0
- data/.simplecov +20 -0
- data/Gemfile +4 -1
- data/README.md +58 -31
- data/Rakefile +2 -0
- data/gemfiles/Gemfile.base +1 -1
- data/gemfiles/activerecord-5.2/Gemfile.base +4 -0
- data/gemfiles/activerecord-5.2/Gemfile.mysql2 +10 -0
- data/gemfiles/activerecord-5.2/Gemfile.postgresql +10 -0
- data/gemfiles/{activerecord-4.2 → activerecord-5.2}/Gemfile.sqlite3 +3 -3
- data/gemfiles/activerecord-6.0/Gemfile.base +4 -0
- data/gemfiles/activerecord-6.0/Gemfile.mysql2 +10 -0
- data/gemfiles/activerecord-6.0/Gemfile.postgresql +10 -0
- data/gemfiles/activerecord-6.0/Gemfile.sqlite3 +10 -0
- data/lib/schema_plus/views/active_record/connection_adapters/abstract_adapter.rb +21 -5
- data/lib/schema_plus/views/active_record/connection_adapters/mysql2_adapter.rb +7 -11
- data/lib/schema_plus/views/active_record/connection_adapters/postgresql_adapter.rb +76 -17
- data/lib/schema_plus/views/active_record/connection_adapters/sqlite3_adapter.rb +7 -9
- data/lib/schema_plus/views/active_record/migration/command_recorder.rb +5 -1
- data/lib/schema_plus/views/middleware.rb +35 -34
- data/lib/schema_plus/views/schema_dump.rb +28 -0
- data/lib/schema_plus/views/version.rb +3 -1
- data/lib/schema_plus/views.rb +3 -0
- data/lib/schema_plus_views.rb +2 -0
- data/schema_dev.yml +7 -2
- data/schema_plus_views.gemspec +10 -9
- data/spec/dumper_spec.rb +60 -10
- data/spec/introspection_spec.rb +54 -6
- data/spec/middleware_spec.rb +3 -18
- data/spec/migration_spec.rb +108 -58
- data/spec/named_schemas_spec.rb +10 -42
- data/spec/sanity_spec.rb +2 -0
- data/spec/spec_helper.rb +16 -3
- metadata +39 -56
- data/.travis.yml +0 -18
- data/gemfiles/activerecord-4.2/Gemfile.base +0 -3
- data/gemfiles/activerecord-4.2/Gemfile.mysql2 +0 -10
- data/gemfiles/activerecord-4.2/Gemfile.postgresql +0 -10
data/spec/migration_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
class Item < ActiveRecord::Base
|
@@ -13,100 +15,148 @@ describe "Migration" do
|
|
13
15
|
|
14
16
|
let(:migration) { ActiveRecord::Migration }
|
15
17
|
let(:connection) { ActiveRecord::Base.connection }
|
16
|
-
let(:schema) { ActiveRecord::Schema }
|
17
18
|
|
18
19
|
before(:each) do
|
19
20
|
define_schema_and_data
|
20
21
|
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
shared_examples 'view checks' do |options = {}|
|
24
|
+
context "creation" do
|
25
|
+
it "should create correct views" do
|
26
|
+
expect(AOnes.all.collect(&:s)).to eq(%W[one_one one_two])
|
27
|
+
expect(ABOnes.all.collect(&:s)).to eq(%W[one_one])
|
28
|
+
end
|
26
29
|
end
|
27
|
-
end
|
28
30
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
context "duplicate creation" do
|
32
|
+
before(:each) do
|
33
|
+
migration.create_view('dupe_me', 'SELECT * FROM items WHERE (a=1)', options)
|
34
|
+
end
|
33
35
|
|
34
|
-
|
35
|
-
|
36
|
-
|
36
|
+
it "should raise an error by default" do
|
37
|
+
expect { migration.create_view('dupe_me', 'SELECT * FROM items WHERE (a=2)', options) }.to raise_error ActiveRecord::StatementInvalid
|
38
|
+
end
|
37
39
|
|
38
|
-
|
39
|
-
|
40
|
-
expect(connection.view_definition('dupe_me')).to match(%r{WHERE .*a.*=.*2}i)
|
41
|
-
end
|
42
|
-
|
43
|
-
context "Postgres and MySQL only", :sqlite3 => :skip do
|
44
|
-
it "should override existing definition if :allow_replace is true" do
|
45
|
-
migration.create_view('dupe_me', 'SELECT * FROM items WHERE (a=2)', :allow_replace => true)
|
40
|
+
it "should override existing definition if :force true" do
|
41
|
+
migration.create_view('dupe_me', 'SELECT * FROM items WHERE (a=2)', options.merge(force: true))
|
46
42
|
expect(connection.view_definition('dupe_me')).to match(%r{WHERE .*a.*=.*2}i)
|
47
43
|
end
|
48
|
-
end
|
49
|
-
end
|
50
44
|
|
51
|
-
|
52
|
-
|
53
|
-
|
45
|
+
unless options[:materialized]
|
46
|
+
context "Postgres and MySQL only", :sqlite3 => :skip do
|
47
|
+
it "should override existing definition if :allow_replace is true" do
|
48
|
+
migration.create_view('dupe_me', 'SELECT * FROM items WHERE (a=2)', options.merge(allow_replace: true))
|
49
|
+
expect(connection.view_definition('dupe_me')).to match(%r{WHERE .*a.*=.*2}i)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
54
53
|
end
|
55
54
|
|
56
|
-
|
57
|
-
|
55
|
+
context "dropping" do
|
56
|
+
it "should raise an error if the view doesn't exist" do
|
57
|
+
expect { migration.drop_view('doesnt_exist', options) }.to raise_error ActiveRecord::StatementInvalid
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should fail silently when using if_exists option" do
|
61
|
+
expect { migration.drop_view('doesnt_exist', options.merge(if_exists: true)) }.not_to raise_error
|
62
|
+
end
|
63
|
+
|
64
|
+
context "with a view that exists" do
|
65
|
+
before { migration.create_view('view_that_exists', 'SELECT * FROM items WHERE (a=1)', options) }
|
66
|
+
|
67
|
+
it "should succeed" do
|
68
|
+
migration.drop_view('view_that_exists', options)
|
69
|
+
expect(connection.views).not_to include('view_that_exists')
|
70
|
+
end
|
71
|
+
end
|
58
72
|
end
|
59
73
|
|
60
|
-
|
61
|
-
|
74
|
+
describe "rollback" do
|
75
|
+
it "properly rolls back a create_view" do
|
76
|
+
m = build_migration do
|
77
|
+
define_method(:change) {
|
78
|
+
create_view :copy, "SELECT * FROM items", options
|
79
|
+
}
|
80
|
+
end
|
81
|
+
m.migrate(:up)
|
82
|
+
expect(connection.views).to include("copy")
|
83
|
+
m.migrate(:down)
|
84
|
+
expect(connection.views).not_to include("copy")
|
85
|
+
end
|
62
86
|
|
63
|
-
it "
|
64
|
-
|
65
|
-
|
87
|
+
it "raises error for drop_view" do
|
88
|
+
m = build_migration do
|
89
|
+
define_method(:change) {
|
90
|
+
drop_view :a_ones, options
|
91
|
+
}
|
92
|
+
end
|
93
|
+
expect { m.migrate(:down) }.to raise_error(::ActiveRecord::IrreversibleMigration)
|
66
94
|
end
|
67
95
|
end
|
68
96
|
end
|
69
97
|
|
70
|
-
describe
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
}
|
98
|
+
describe 'regular views' do
|
99
|
+
before(:each) do
|
100
|
+
apply_migration do
|
101
|
+
create_view :a_ones, Item.select('b, s').where(:a => 1)
|
102
|
+
create_view :ab_ones, "select s from a_ones where b = 1"
|
76
103
|
end
|
77
|
-
m.migrate(:up)
|
78
|
-
expect(connection.views).to include("copy")
|
79
|
-
m.migrate(:down)
|
80
|
-
expect(connection.views).not_to include("copy")
|
81
104
|
end
|
82
105
|
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
106
|
+
include_examples 'view checks'
|
107
|
+
end
|
108
|
+
|
109
|
+
describe 'materialized views', postgresql: :only do
|
110
|
+
before(:each) do
|
111
|
+
apply_migration do
|
112
|
+
create_view :a_ones, Item.select('b, s').where(:a => 1), materialized: true
|
113
|
+
create_view :ab_ones, "select s from items where a = 1 AND b = 1", materialized: true
|
88
114
|
end
|
89
|
-
expect { m.migrate(:down) }.to raise_error(::ActiveRecord::IrreversibleMigration)
|
90
115
|
end
|
91
|
-
end
|
92
116
|
|
117
|
+
include_examples 'view checks', materialized: true
|
118
|
+
|
119
|
+
describe 'refreshing the view' do
|
120
|
+
it "refreshes the view" do
|
121
|
+
expect(AOnes.count).to eq(2)
|
122
|
+
Item.create!(a: 1, b: 3, s: 'one_three')
|
123
|
+
expect(AOnes.count).to eq(2)
|
124
|
+
connection.refresh_view('a_ones')
|
125
|
+
expect(AOnes.count).to eq(3)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
context 'with indexes' do
|
130
|
+
it 'allows creating indexes on the materialized view' do
|
131
|
+
apply_migration do
|
132
|
+
add_index :a_ones, :s
|
133
|
+
add_index :a_ones, :b, unique: true
|
134
|
+
end
|
135
|
+
|
136
|
+
expect(connection.indexes(:a_ones)).to contain_exactly(
|
137
|
+
have_attributes(columns: ['s'], unique: false),
|
138
|
+
have_attributes(columns: ['b'], unique: true)
|
139
|
+
)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
93
143
|
|
94
144
|
protected
|
95
145
|
|
96
146
|
def define_schema_and_data
|
97
|
-
connection.views.each do |view|
|
98
|
-
|
99
|
-
|
100
|
-
|
147
|
+
connection.views.each do |view|
|
148
|
+
connection.drop_view view
|
149
|
+
end
|
150
|
+
connection.tables.each do |table|
|
151
|
+
connection.drop_table table, cascade: true
|
152
|
+
end
|
101
153
|
|
154
|
+
apply_migration do
|
102
155
|
create_table :items, :force => true do |t|
|
103
156
|
t.integer :a
|
104
157
|
t.integer :b
|
105
|
-
t.string
|
158
|
+
t.string :s
|
106
159
|
end
|
107
|
-
|
108
|
-
create_view :a_ones, Item.select('b, s').where(:a => 1)
|
109
|
-
create_view :ab_ones, "select s from a_ones where b = 1"
|
110
160
|
end
|
111
161
|
connection.execute "insert into items (a, b, s) values (1, 1, 'one_one')"
|
112
162
|
connection.execute "insert into items (a, b, s) values (1, 2, 'one_two')"
|
data/spec/named_schemas_spec.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe "with multiple schemas" do
|
@@ -6,10 +8,10 @@ describe "with multiple schemas" do
|
|
6
8
|
end
|
7
9
|
|
8
10
|
before(:each) do
|
9
|
-
newdb = case
|
10
|
-
when
|
11
|
-
when
|
12
|
-
when
|
11
|
+
newdb = case
|
12
|
+
when SchemaDev::Rspec::Helpers.mysql? then "CREATE SCHEMA IF NOT EXISTS schema_plus_views_test2"
|
13
|
+
when SchemaDev::Rspec::Helpers.postgresql? then "CREATE SCHEMA schema_plus_views_test2"
|
14
|
+
when SchemaDev::Rspec::Helpers.sqlite3? then "ATTACH ':memory:' AS schema_plus_views_test2"
|
13
15
|
end
|
14
16
|
begin
|
15
17
|
ActiveRecord::Base.connection.execute newdb
|
@@ -28,10 +30,10 @@ describe "with multiple schemas" do
|
|
28
30
|
end
|
29
31
|
|
30
32
|
connection.execute 'DROP TABLE IF EXISTS schema_plus_views_test2.users'
|
31
|
-
connection.execute 'CREATE TABLE schema_plus_views_test2.users (id ' + case
|
32
|
-
when
|
33
|
-
when
|
34
|
-
when
|
33
|
+
connection.execute 'CREATE TABLE schema_plus_views_test2.users (id ' + case
|
34
|
+
when SchemaDev::Rspec::Helpers.mysql? then "integer primary key auto_increment"
|
35
|
+
when SchemaDev::Rspec::Helpers.postgresql? then "serial primary key"
|
36
|
+
when SchemaDev::Rspec::Helpers.sqlite3? then "integer primary key autoincrement"
|
35
37
|
end + ", login varchar(255))"
|
36
38
|
end
|
37
39
|
|
@@ -60,38 +62,4 @@ describe "with multiple schemas" do
|
|
60
62
|
end
|
61
63
|
end
|
62
64
|
|
63
|
-
context "when using PostGIS", :postgresql => :only do
|
64
|
-
before(:all) do
|
65
|
-
begin
|
66
|
-
connection.execute "CREATE SCHEMA postgis"
|
67
|
-
rescue ActiveRecord::StatementInvalid => e
|
68
|
-
raise unless e.message =~ /already exists/
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
around(:each) do |example|
|
73
|
-
begin
|
74
|
-
connection.execute "SET search_path to '$user','public','postgis'"
|
75
|
-
example.run
|
76
|
-
ensure
|
77
|
-
connection.execute "SET search_path to '$user','public'"
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
before(:each) do
|
82
|
-
allow(connection).to receive(:adapter_name).and_return('PostGIS')
|
83
|
-
end
|
84
|
-
|
85
|
-
it "should hide views in postgis schema" do
|
86
|
-
begin
|
87
|
-
connection.create_view "postgis.hidden", "select 1", :force => true
|
88
|
-
connection.create_view :myview, "select 2", :force => true
|
89
|
-
expect(connection.views).to eq(["myview"])
|
90
|
-
ensure
|
91
|
-
connection.execute 'DROP VIEW postgis.hidden' rescue nil
|
92
|
-
connection.execute 'DROP VIEW myview' rescue nil
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
65
|
end
|
data/spec/sanity_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'simplecov'
|
2
|
-
|
3
|
-
SimpleCov.start "gem"
|
4
|
+
SimpleCov.start
|
4
5
|
|
5
6
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
6
7
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
@@ -12,7 +13,7 @@ require 'schema_dev/rspec'
|
|
12
13
|
|
13
14
|
SchemaDev::Rspec.setup
|
14
15
|
|
15
|
-
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each {|f| require f}
|
16
|
+
Dir[File.dirname(__FILE__) + "/support/**/*.rb"].each { |f| require f }
|
16
17
|
|
17
18
|
RSpec.configure do |config|
|
18
19
|
config.warnings = true
|
@@ -29,4 +30,16 @@ RSpec.configure do |config|
|
|
29
30
|
end
|
30
31
|
end
|
31
32
|
|
33
|
+
def apply_migration(config = {}, &block)
|
34
|
+
ActiveRecord::Schema.define do
|
35
|
+
instance_eval &block
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def build_migration(version: 5.0, &block)
|
40
|
+
Class.new(::ActiveRecord::Migration[version]) do
|
41
|
+
instance_eval &block
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
32
45
|
SimpleCov.command_name "[ruby #{RUBY_VERSION} - ActiveRecord #{::ActiveRecord::VERSION::STRING} - #{ActiveRecord::Base.connection.adapter_name}]"
|
metadata
CHANGED
@@ -1,71 +1,77 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: schema_plus_views
|
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-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5.2'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
22
|
+
version: '6.1'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '5.2'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '6.1'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: schema_plus_core
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
30
36
|
requirements:
|
31
37
|
- - "~>"
|
32
38
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
39
|
+
version: '3.0'
|
34
40
|
type: :runtime
|
35
41
|
prerelease: false
|
36
42
|
version_requirements: !ruby/object:Gem::Requirement
|
37
43
|
requirements:
|
38
44
|
- - "~>"
|
39
45
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
46
|
+
version: '3.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: bundler
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
53
|
+
version: '0'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
51
57
|
requirements:
|
52
|
-
- - "
|
58
|
+
- - ">="
|
53
59
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
60
|
+
version: '0'
|
55
61
|
- !ruby/object:Gem::Dependency
|
56
62
|
name: rake
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
65
|
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
67
|
+
version: '13.0'
|
62
68
|
type: :development
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
72
|
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
74
|
+
version: '13.0'
|
69
75
|
- !ruby/object:Gem::Dependency
|
70
76
|
name: rspec
|
71
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,60 +92,37 @@ dependencies:
|
|
86
92
|
requirements:
|
87
93
|
- - "~>"
|
88
94
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
95
|
+
version: '4.1'
|
90
96
|
type: :development
|
91
97
|
prerelease: false
|
92
98
|
version_requirements: !ruby/object:Gem::Requirement
|
93
99
|
requirements:
|
94
100
|
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
97
|
-
|
98
|
-
name: simplecov
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: simplecov-gem-profile
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
description:
|
102
|
+
version: '4.1'
|
103
|
+
description:
|
126
104
|
email:
|
127
105
|
- ronen@barzel.org
|
128
106
|
executables: []
|
129
107
|
extensions: []
|
130
108
|
extra_rdoc_files: []
|
131
109
|
files:
|
110
|
+
- ".github/workflows/prs.yml"
|
132
111
|
- ".gitignore"
|
133
|
-
- ".
|
112
|
+
- ".simplecov"
|
134
113
|
- Gemfile
|
135
114
|
- LICENSE.txt
|
136
115
|
- README.md
|
137
116
|
- Rakefile
|
138
117
|
- gemfiles/Gemfile.base
|
139
|
-
- gemfiles/activerecord-
|
140
|
-
- gemfiles/activerecord-
|
141
|
-
- gemfiles/activerecord-
|
142
|
-
- gemfiles/activerecord-
|
118
|
+
- gemfiles/activerecord-5.2/Gemfile.base
|
119
|
+
- gemfiles/activerecord-5.2/Gemfile.mysql2
|
120
|
+
- gemfiles/activerecord-5.2/Gemfile.postgresql
|
121
|
+
- gemfiles/activerecord-5.2/Gemfile.sqlite3
|
122
|
+
- gemfiles/activerecord-6.0/Gemfile.base
|
123
|
+
- gemfiles/activerecord-6.0/Gemfile.mysql2
|
124
|
+
- gemfiles/activerecord-6.0/Gemfile.postgresql
|
125
|
+
- gemfiles/activerecord-6.0/Gemfile.sqlite3
|
143
126
|
- lib/schema_plus/views.rb
|
144
127
|
- lib/schema_plus/views/active_record/connection_adapters/abstract_adapter.rb
|
145
128
|
- lib/schema_plus/views/active_record/connection_adapters/mysql2_adapter.rb
|
@@ -147,6 +130,7 @@ files:
|
|
147
130
|
- lib/schema_plus/views/active_record/connection_adapters/sqlite3_adapter.rb
|
148
131
|
- lib/schema_plus/views/active_record/migration/command_recorder.rb
|
149
132
|
- lib/schema_plus/views/middleware.rb
|
133
|
+
- lib/schema_plus/views/schema_dump.rb
|
150
134
|
- lib/schema_plus/views/version.rb
|
151
135
|
- lib/schema_plus_views.rb
|
152
136
|
- schema_dev.yml
|
@@ -162,7 +146,7 @@ homepage: https://github.com/SchemaPlus/schema_plus_views
|
|
162
146
|
licenses:
|
163
147
|
- MIT
|
164
148
|
metadata: {}
|
165
|
-
post_install_message:
|
149
|
+
post_install_message:
|
166
150
|
rdoc_options: []
|
167
151
|
require_paths:
|
168
152
|
- lib
|
@@ -170,16 +154,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
154
|
requirements:
|
171
155
|
- - ">="
|
172
156
|
- !ruby/object:Gem::Version
|
173
|
-
version: '
|
157
|
+
version: '2.5'
|
174
158
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
159
|
requirements:
|
176
160
|
- - ">="
|
177
161
|
- !ruby/object:Gem::Version
|
178
162
|
version: '0'
|
179
163
|
requirements: []
|
180
|
-
|
181
|
-
|
182
|
-
signing_key:
|
164
|
+
rubygems_version: 3.0.8
|
165
|
+
signing_key:
|
183
166
|
specification_version: 4
|
184
167
|
summary: Adds support for views to ActiveRecord
|
185
168
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,18 +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.1.5
|
9
|
-
gemfile:
|
10
|
-
- gemfiles/activerecord-4.2/Gemfile.mysql2
|
11
|
-
- gemfiles/activerecord-4.2/Gemfile.postgresql
|
12
|
-
- gemfiles/activerecord-4.2/Gemfile.sqlite3
|
13
|
-
env: POSTGRESQL_DB_USER=postgres MYSQL_DB_USER=travis
|
14
|
-
addons:
|
15
|
-
postgresql: '9.4'
|
16
|
-
before_script: bundle exec rake create_databases
|
17
|
-
after_script: bundle exec rake drop_databases
|
18
|
-
script: bundle exec rake travis
|