ridgepole 0.6.4.beta9 → 0.6.4

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
  SHA1:
3
- metadata.gz: 5c075fe76dfd02963371bcdcd0c26a839ad55284
4
- data.tar.gz: 0ecd43850c8dd50cb969f2b2a63f899a67cb5ca8
3
+ metadata.gz: 4c53abe50208291f89c751bb47e3b9db9b524c45
4
+ data.tar.gz: 85babaf19329e4ccfe3ec9131b6a17cc548540c1
5
5
  SHA512:
6
- metadata.gz: a8c637b6120d3568e7b4310c45c9e390b96e9552f43ca8314db5580bafcc02d826a06b7fa7f276cfcc19843436653e26555d11b6daeed873f377ea11b9b90688
7
- data.tar.gz: 7feae1b43d584b6b5116a0692b0979c7e576c8a46588bdd05607c223b7f9daf6a046a2eb0dddfb700ba0101b6add793885b535899ef0ccaf89aae663d69132d9
6
+ metadata.gz: 6913c4d2e9b388486f4ca9ec3eb1ccac6d86e5ac62d573c3fea97ed921415085fd1191347c55da44baeb7d1fa1ad936907e41e8707462c2f93c8edaf44c67f45
7
+ data.tar.gz: cca33607a613f756c5d0d596a83bbdc6b63e2371e2ebf08951fdb9b03749de9dfc928f1d8fe9bc5e41b7139e60a25ec93adf07b844b3f7015f2ed2243e2b9381
@@ -1,3 +1,3 @@
1
1
  module Ridgepole
2
- VERSION = '0.6.4.beta9'
2
+ VERSION = '0.6.4'
3
3
  end
@@ -0,0 +1,95 @@
1
+ unless postgresql?
2
+ describe 'Ridgepole::Client#diff -> migrate' do
3
+ context 'when create table' do
4
+ let(:dsl) {
5
+ <<-RUBY
6
+ create_table "clubs"#{unsigned_if_enabled}, force: :cascade do |t|
7
+ t.string "name", limit: 255, default: "", null: false
8
+ end
9
+
10
+ add_index "clubs", ["name"], name: "idx_name", unique: true, using: :btree
11
+
12
+ create_table "departments", primary_key: "dept_no"#{unsigned_if_enabled}, force: :cascade do |t|
13
+ t.string "dept_name", limit: 40, null: false
14
+ end
15
+
16
+ add_index "departments", ["dept_name"], name: "dept_name", unique: true, using: :btree
17
+
18
+ create_table "dept_emp", id: false, force: :cascade do |t|
19
+ t.integer "emp_no", limit: 4, null: false
20
+ t.string "dept_no", limit: 4, null: false
21
+ t.date "from_date", null: false
22
+ t.date "to_date", null: false
23
+ end
24
+
25
+ add_index "dept_emp", ["dept_no"], name: "dept_no", using: :btree
26
+ add_index "dept_emp", ["emp_no"], name: "emp_no", using: :btree
27
+
28
+ create_table "dept_manager", id: false, force: :cascade do |t|
29
+ t.string "dept_no", limit: 4, null: false
30
+ t.integer "emp_no", limit: 4, null: false
31
+ t.date "from_date", null: false
32
+ t.date "to_date", null: false
33
+ end
34
+
35
+ add_index "dept_manager", ["dept_no"], name: "dept_no", using: :btree
36
+ add_index "dept_manager", ["emp_no"], name: "emp_no", using: :btree
37
+
38
+ create_table "employee_clubs"#{unsigned_if_enabled}, force: :cascade do |t|
39
+ t.integer "emp_no", limit: 4, null: false#{unsigned_if_enabled}
40
+ t.integer "club_id", limit: 4, null: false#{unsigned_if_enabled}
41
+ end
42
+
43
+ add_index "employee_clubs", ["emp_no", "club_id"], name: "idx_emp_no_club_id", using: :btree
44
+
45
+ create_table "employees", primary_key: "emp_no"#{unsigned_if_enabled}, force: :cascade do |t|
46
+ t.date "birth_date", null: false
47
+ t.string "first_name", limit: 14, null: false
48
+ t.string "last_name", limit: 16, null: false
49
+ t.string "gender", limit: 1, null: false
50
+ t.date "hire_date", null: false
51
+ end
52
+
53
+ create_table "salaries", id: false, force: :cascade do |t|
54
+ t.integer "emp_no", limit: 4, null: false
55
+ t.integer "salary", limit: 4, null: false
56
+ t.date "from_date", null: false
57
+ t.date "to_date", null: false
58
+ end
59
+
60
+ add_index "salaries", ["emp_no"], name: "emp_no", using: :btree
61
+
62
+ create_table "titles", id: false, force: :cascade do |t|
63
+ t.integer "emp_no", limit: 4, null: false
64
+ t.string "title", limit: 50, null: false
65
+ t.date "from_date", null: false
66
+ t.date "to_date"
67
+ end
68
+
69
+ add_index "titles", ["emp_no"], name: "emp_no", using: :btree
70
+ RUBY
71
+ }
72
+
73
+ let(:actual_dsl) {
74
+ dsl.delete_create_table('clubs')
75
+ .delete_create_table('employee_clubs')
76
+ .delete_create_table('employees')
77
+ }
78
+
79
+ let(:expected_dsl) { dsl }
80
+
81
+ before { client.diff(actual_dsl).migrate }
82
+
83
+ it {
84
+ tempfile("#{File.basename __FILE__}.#{$$}") do |path|
85
+ delta = client(log_file: path).diff(expected_dsl)
86
+ expect(delta.differ?).to be_truthy
87
+ expect(client.dump.delete_empty_lines).to eq actual_dsl.strip_heredoc.strip.delete_empty_lines
88
+ delta.migrate
89
+ expect(client.dump.delete_empty_lines).to eq expected_dsl.strip_heredoc.strip.delete_empty_lines
90
+ expect(File.size(path)).to be > 0
91
+ end
92
+ }
93
+ end
94
+ end
95
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridgepole
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4.beta9
4
+ version: 0.6.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
@@ -14,112 +14,112 @@ dependencies:
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 3.0.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: 3.0.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mysql2
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.3.20
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.3.20
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: pg
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: coveralls
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: activerecord-mysql-awesome
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: 0.0.7
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 0.0.7
125
125
  description: Ridgepole is a tool to manage DB schema. It defines DB schema using Rails
@@ -131,9 +131,9 @@ executables:
131
131
  extensions: []
132
132
  extra_rdoc_files: []
133
133
  files:
134
- - ".gitignore"
135
- - ".rspec"
136
- - ".travis.yml"
134
+ - .gitignore
135
+ - .rspec
136
+ - .travis.yml
137
137
  - Gemfile
138
138
  - LICENSE.txt
139
139
  - README.md
@@ -204,6 +204,7 @@ files:
204
204
  - spec/mysql/migrate/migrate_duplicate_table_spec.rb
205
205
  - spec/mysql/migrate/migrate_empty_spec.rb
206
206
  - spec/mysql/migrate/migrate_execute_spec.rb
207
+ - spec/mysql/migrate/migrate_log_file_spec.rb
207
208
  - spec/mysql/migrate/migrate_merge_mode_spec.rb
208
209
  - spec/mysql/migrate/migrate_noop_spec.rb
209
210
  - spec/mysql/migrate/migrate_rename_column_spec.rb
@@ -258,17 +259,17 @@ require_paths:
258
259
  - lib
259
260
  required_ruby_version: !ruby/object:Gem::Requirement
260
261
  requirements:
261
- - - ">="
262
+ - - '>='
262
263
  - !ruby/object:Gem::Version
263
264
  version: '0'
264
265
  required_rubygems_version: !ruby/object:Gem::Requirement
265
266
  requirements:
266
- - - ">"
267
+ - - '>='
267
268
  - !ruby/object:Gem::Version
268
- version: 1.3.1
269
+ version: '0'
269
270
  requirements: []
270
271
  rubyforge_project:
271
- rubygems_version: 2.4.5.1
272
+ rubygems_version: 2.0.14.1
272
273
  signing_key:
273
274
  specification_version: 4
274
275
  summary: Ridgepole is a tool to manage DB schema.
@@ -320,6 +321,7 @@ test_files:
320
321
  - spec/mysql/migrate/migrate_duplicate_table_spec.rb
321
322
  - spec/mysql/migrate/migrate_empty_spec.rb
322
323
  - spec/mysql/migrate/migrate_execute_spec.rb
324
+ - spec/mysql/migrate/migrate_log_file_spec.rb
323
325
  - spec/mysql/migrate/migrate_merge_mode_spec.rb
324
326
  - spec/mysql/migrate/migrate_noop_spec.rb
325
327
  - spec/mysql/migrate/migrate_rename_column_spec.rb