ridgepole 0.9.0.beta → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/test.yml +24 -19
  3. data/.rubocop.yml +5 -4
  4. data/.simplecov +6 -0
  5. data/README.md +15 -30
  6. data/bin/ridgepole +0 -2
  7. data/lib/ridgepole/diff.rb +14 -14
  8. data/lib/ridgepole/dsl_parser/table_definition.rb +8 -1
  9. data/lib/ridgepole/version.rb +1 -1
  10. data/ridgepole.gemspec +3 -2
  11. data/spec/erb_helper.rb +1 -5
  12. data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
  13. data/spec/mysql/collation/collation_spec.rb +14 -14
  14. data/spec/mysql/comment/comment_spec.rb +9 -9
  15. data/spec/mysql/diff/diff2_spec.rb +5 -5
  16. data/spec/mysql/diff/diff_spec.rb +3 -3
  17. data/spec/mysql/dump/dump_class_method_spec.rb +12 -12
  18. data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
  19. data/spec/mysql/dump/dump_spec.rb +12 -12
  20. data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
  21. data/spec/mysql/dump/dump_without_table_options_spec.rb +1 -1
  22. data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
  23. data/spec/mysql/fk/migrate_change_fk_spec.rb +88 -20
  24. data/spec/mysql/fk/migrate_create_fk_spec.rb +73 -18
  25. data/spec/mysql/fk/migrate_drop_fk_spec.rb +81 -26
  26. data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
  27. data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
  28. data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
  29. data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
  30. data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +21 -21
  31. data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
  32. data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
  33. data/spec/mysql/migrate/migrate_change_column3_spec.rb +10 -10
  34. data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
  35. data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
  36. data/spec/mysql/migrate/migrate_change_column7_spec.rb +11 -2
  37. data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
  38. data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
  39. data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
  40. data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
  41. data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
  42. data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
  43. data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
  44. data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
  45. data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
  46. data/spec/mysql/migrate/migrate_change_index_spec.rb +27 -27
  47. data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  48. data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
  49. data/spec/mysql/migrate/migrate_create_index_spec.rb +78 -18
  50. data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
  51. data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
  52. data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
  53. data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
  54. data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
  55. data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
  56. data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
  57. data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
  58. data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
  59. data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
  60. data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
  61. data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
  62. data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
  63. data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
  64. data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
  65. data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
  66. data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
  67. data/spec/mysql/migrate/migrate_primary_key_spec.rb +1 -1
  68. data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
  69. data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
  70. data/spec/mysql/migrate/migrate_same_spec.rb +12 -12
  71. data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
  72. data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
  73. data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
  74. data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
  75. data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
  76. data/spec/mysql/text_blob_types/text_blob_types_spec.rb +1 -1
  77. data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
  78. data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
  79. data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
  80. data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
  81. data/spec/mysql57/json/add_json_column_spec.rb +2 -2
  82. data/spec/mysql57/json/change_json_column_spec.rb +6 -6
  83. data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
  84. data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
  85. data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
  86. data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
  87. data/spec/postgresql/dump/dump_spec.rb +12 -12
  88. data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
  89. data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
  90. data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
  91. data/spec/postgresql/migrate/migrate_add_column_spec.rb +16 -16
  92. data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
  93. data/spec/postgresql/migrate/migrate_change_column_spec.rb +16 -16
  94. data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
  95. data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
  96. data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
  97. data/spec/postgresql/migrate/migrate_drop_column_spec.rb +18 -18
  98. data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
  99. data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
  100. data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
  101. data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
  102. data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
  103. data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
  104. data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
  105. data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
  106. data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
  107. data/spec/postgresql/migrate/migrate_same_spec.rb +12 -12
  108. data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
  109. data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
  110. data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
  111. data/spec/processing_for_ci.rb +13 -0
  112. data/spec/spec_const.rb +1 -1
  113. data/spec/spec_helper.rb +2 -1
  114. metadata +39 -37
  115. data/omnibus-ridgepole/.gitignore +0 -10
  116. data/omnibus-ridgepole/Dockerfile.centos +0 -25
  117. data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
  118. data/omnibus-ridgepole/Gemfile +0 -24
  119. data/omnibus-ridgepole/README.md +0 -15
  120. data/omnibus-ridgepole/Rakefile +0 -38
  121. data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
  122. data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
  123. data/omnibus-ridgepole/omnibus.rb +0 -54
  124. data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
  125. data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
  126. data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
  127. data/spec/processing_for_travis.rb +0 -11
@@ -1,15 +0,0 @@
1
- omnibus-ridgepole
2
- -----------------
3
-
4
- ## Installation
5
-
6
- ```sh
7
- bundle install
8
- bundle exec rake docker:image:build
9
- ```
10
-
11
- ## Build omnibus-ridgepole
12
-
13
- ```sh
14
- bundle exec rake omnibus:build
15
- ```
@@ -1,38 +0,0 @@
1
- DOCKER_IMAGE_UBUNTU = 'omnibus-ridgepole-ubuntu'
2
- DOCKER_IMAGE_CENTOS = 'omnibus-ridgepole-chentos'
3
-
4
- namespace :docker do
5
- namespace :image do
6
- task build: ['build:ubuntu', 'build:centos']
7
-
8
- namespace :build do
9
- task :ubuntu do
10
- sh 'docker', 'build', '-t', DOCKER_IMAGE_UBUNTU, '-f', 'Dockerfile.ubuntu', '.'
11
- end
12
-
13
- task :centos do
14
- sh 'docker', 'build', '-t', DOCKER_IMAGE_CENTOS, '-f', 'Dockerfile.centos', '.'
15
- end
16
- end
17
- end
18
-
19
- namespace :omnibus do
20
- task :build do
21
- sh 'omnibus', 'build', 'ridgepole'
22
- end
23
- end
24
- end
25
-
26
- namespace :omnibus do
27
- task build: ['docker:image:build', 'build:ubuntu', 'build:centos']
28
-
29
- namespace :build do
30
- task :ubuntu do
31
- sh 'docker', 'run', '-v', "#{pwd}:/omnibus-ridgepole", DOCKER_IMAGE_UBUNTU, 'bundle', 'exec', 'rake docker:omnibus:build'
32
- end
33
-
34
- task :centos do
35
- sh 'docker', 'run', '-v', "#{pwd}:/omnibus-ridgepole", DOCKER_IMAGE_CENTOS, 'bundle', 'exec', 'rake docker:omnibus:build'
36
- end
37
- end
38
- end
@@ -1,27 +0,0 @@
1
- require 'json'
2
- require 'open-uri'
3
-
4
- name 'ridgepole'
5
- maintainer 'winebarrel <sugawara@winebarrel.jp>'
6
- homepage 'https://github.com/winebarrel/ridgepole'
7
-
8
- # Defaults to C:/ridgepole on Windows
9
- # and /opt/ridgepole on all other platforms
10
- install_dir "#{default_root}/#{name}"
11
-
12
- build_version JSON.parse(open('https://rubygems.org/api/v1/gems/ridgepole.json', &:read)).fetch('version')
13
- build_iteration 1
14
-
15
- dependency 'preparation'
16
-
17
- # ridgepole dependencies/components
18
- override :ruby, version: '2.5.1'
19
- dependency 'ruby'
20
- dependency 'rubygems'
21
- dependency 'ridgepole'
22
-
23
- # Version manifest file
24
- dependency 'version-manifest'
25
-
26
- exclude '**/.git'
27
- exclude '**/bundler/git'
@@ -1,13 +0,0 @@
1
- require 'json'
2
- require 'open-uri'
3
-
4
- name 'ridgepole'
5
-
6
- default_version JSON.parse(open('https://rubygems.org/api/v1/gems/ridgepole.json', &:read)).fetch('version')
7
-
8
- license 'MIT'
9
- skip_transitive_dependency_licensing true
10
-
11
- build do
12
- gem 'install ridgepole -N'
13
- end
@@ -1,54 +0,0 @@
1
- #
2
- # This file is used to configure the ridgepole project. It contains
3
- # some minimal configuration examples for working with Omnibus. For a full list
4
- # of configurable options, please see the documentation for +omnibus/config.rb+.
5
- #
6
-
7
- # Build internally
8
- # ------------------------------
9
- # By default, Omnibus uses system folders (like +/var+ and +/opt+) to build and
10
- # cache components. If you would to build everything internally, you can
11
- # uncomment the following options. This will prevent the need for root
12
- # permissions in most cases.
13
- #
14
- # Uncomment this line to change the default base directory to "local"
15
- # -------------------------------------------------------------------
16
- # base_dir './local'
17
- #
18
- # Alternatively you can tune the individual values
19
- # ------------------------------------------------
20
- # cache_dir './local/omnibus/cache'
21
- # git_cache_dir './local/omnibus/cache/git_cache'
22
- # source_dir './local/omnibus/src'
23
- # build_dir './local/omnibus/build'
24
- # package_dir './local/omnibus/pkg'
25
- # package_tmp './local/omnibus/pkg-tmp'
26
-
27
- # Disable git caching
28
- # ------------------------------
29
- # use_git_caching false
30
-
31
- # Enable S3 asset caching
32
- # ------------------------------
33
- # use_s3_caching true
34
- # s3_access_key ENV['AWS_ACCESS_KEY_ID']
35
- # s3_secret_key ENV['AWS_SECRET_ACCESS_KEY']
36
- # s3_profile ENV['AWS_S3_PROFILE']
37
- # s3_bucket ENV['AWS_S3_BUCKET']
38
-
39
- # Customize compiler bits
40
- # ------------------------------
41
- # solaris_compiler 'gcc'
42
- # build_retries 5
43
- # fetcher_read_timeout 120
44
- # fetcher_retries 5
45
-
46
- # Load additional software
47
- # ------------------------------
48
- # software_gems ['omnibus-software', 'my-company-software']
49
- # local_software_dirs ['/path/to/local/software']
50
-
51
- # Windows architecture defaults
52
- # ------------------------------
53
- windows_arch %w{x86 x64}.include?((ENV['OMNIBUS_WINDOWS_ARCH'] || '').downcase) ?
54
- ENV['OMNIBUS_WINDOWS_ARCH'].downcase.to_sym : :x86
@@ -1 +0,0 @@
1
- ln -sf /opt/ridgepole/embedded/bin/ridgepole /usr/bin
@@ -1 +0,0 @@
1
- rm -f /usr/bin/ridgepole
@@ -1,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- describe 'Ridgepole::Client (with bigint pk)', condition: 5.0 do
4
- let(:id_primary_key_create_table) do
5
- <<-RUBY
6
- create_table "books", id: :primary_key, limit: 8, force: :cascade do |t|
7
- t.string "title", null: false
8
- t.integer "author_id", null: false
9
- t.datetime "created_at"
10
- t.datetime "updated_at"
11
- end
12
- RUBY
13
- end
14
-
15
- let(:id_bigint_create_table) do
16
- <<-RUBY
17
- create_table "books", id: :bigint, force: :cascade do |t|
18
- t.string "title", null: false
19
- t.integer "author_id", null: false
20
- t.datetime "created_at"
21
- t.datetime "updated_at"
22
- end
23
- RUBY
24
- end
25
-
26
- context 'when with limit:8' do
27
- subject { client }
28
-
29
- before { subject.diff(id_primary_key_create_table).migrate }
30
-
31
- it {
32
- expect(show_create_table(:books)).to include '`id` bigint(20) NOT NULL AUTO_INCREMENT'
33
- expect(subject.dump).to match_fuzzy id_bigint_create_table
34
- }
35
- end
36
-
37
- context 'when with id:bigint' do
38
- subject { client }
39
-
40
- before { subject.diff(id_bigint_create_table).migrate }
41
-
42
- it {
43
- expect(show_create_table(:books)).to include '`id` bigint(20) NOT NULL AUTO_INCREMENT'
44
- expect(subject.dump).to match_fuzzy id_bigint_create_table
45
- }
46
- end
47
- end
@@ -1,11 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- if ENV['TRAVIS']
4
- require 'simplecov'
5
- require 'coveralls'
6
-
7
- SimpleCov.formatter = Coveralls::SimpleCov::Formatter
8
- SimpleCov.start do
9
- add_filter 'spec/'
10
- end
11
- end