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.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +24 -19
- data/.rubocop.yml +5 -4
- data/.simplecov +6 -0
- data/README.md +15 -30
- data/bin/ridgepole +0 -2
- data/lib/ridgepole/diff.rb +14 -14
- data/lib/ridgepole/dsl_parser/table_definition.rb +8 -1
- data/lib/ridgepole/version.rb +1 -1
- data/ridgepole.gemspec +3 -2
- data/spec/erb_helper.rb +1 -5
- data/spec/mysql/bigint_pk/int_pk_spec.rb +1 -1
- data/spec/mysql/collation/collation_spec.rb +14 -14
- data/spec/mysql/comment/comment_spec.rb +9 -9
- data/spec/mysql/diff/diff2_spec.rb +5 -5
- data/spec/mysql/diff/diff_spec.rb +3 -3
- data/spec/mysql/dump/dump_class_method_spec.rb +12 -12
- data/spec/mysql/dump/dump_some_tables_spec.rb +4 -4
- data/spec/mysql/dump/dump_spec.rb +12 -12
- data/spec/mysql/dump/dump_unknown_column_type_spec.rb +2 -2
- data/spec/mysql/dump/dump_without_table_options_spec.rb +1 -1
- data/spec/mysql/fk/migrate_change_fk2_spec.rb +2 -2
- data/spec/mysql/fk/migrate_change_fk_spec.rb +88 -20
- data/spec/mysql/fk/migrate_create_fk_spec.rb +73 -18
- data/spec/mysql/fk/migrate_drop_fk_spec.rb +81 -26
- data/spec/mysql/fk/migrate_fk_with_column_spec.rb +16 -16
- data/spec/mysql/fk/migrate_ignore_fk_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_add_column_order_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_add_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_add_column_with_alter_extra_spec.rb +21 -21
- data/spec/mysql/migrate/migrate_add_column_with_script_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_change_column2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_column3_spec.rb +10 -10
- data/spec/mysql/migrate/migrate_change_column5_spec.rb +3 -3
- data/spec/mysql/migrate/migrate_change_column6_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_column7_spec.rb +11 -2
- data/spec/mysql/migrate/migrate_change_column_default_spec.rb +2 -14
- data/spec/mysql/migrate/migrate_change_column_spec.rb +21 -21
- data/spec/mysql/migrate/migrate_change_index2_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_change_index3_spec.rb +7 -7
- data/spec/mysql/migrate/migrate_change_index4_spec.rb +6 -6
- data/spec/mysql/migrate/migrate_change_index5_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index6_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_change_index7_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index8_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_change_index_spec.rb +27 -27
- data/spec/mysql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_create_index2_spec.rb +24 -24
- data/spec/mysql/migrate/migrate_create_index_spec.rb +78 -18
- data/spec/mysql/migrate/migrate_create_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_create_table_with_ignore_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_index_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_create_table_with_script_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_index2_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_column_and_index_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_drop_column_and_unique_index_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_drop_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/mysql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_empty_spec.rb +9 -9
- data/spec/mysql/migrate/migrate_execute_spec.rb +32 -32
- data/spec/mysql/migrate/migrate_ignore_column_spec.rb +4 -4
- data/spec/mysql/migrate/migrate_ignore_index_spec.rb +5 -5
- data/spec/mysql/migrate/migrate_log_file_spec.rb +16 -16
- data/spec/mysql/migrate/migrate_merge_mode_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_noop_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_primary_key_spec.rb +1 -1
- data/spec/mysql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_rename_table_spec.rb +22 -22
- data/spec/mysql/migrate/migrate_same_spec.rb +12 -12
- data/spec/mysql/migrate/migrate_skip_column_comment_change_spec.rb +2 -2
- data/spec/mysql/migrate/migrate_skip_drop_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_column_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_skip_rename_table_spec.rb +18 -18
- data/spec/mysql/migrate/migrate_with_pre_post_query_spec.rb +18 -18
- data/spec/mysql/text_blob_types/text_blob_types_spec.rb +1 -1
- data/spec/mysql/~default_name_fk/migrate_change_fk_spec.rb +6 -6
- data/spec/mysql/~default_name_fk/migrate_create_fk_spec.rb +9 -9
- data/spec/mysql/~default_name_fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/mysql/~dump_auto_increment/migrate_create_table_with_index_spec.rb +5 -5
- data/spec/mysql57/json/add_json_column_spec.rb +2 -2
- data/spec/mysql57/json/change_json_column_spec.rb +6 -6
- data/spec/mysql57/json/drop_json_column_spec.rb +2 -2
- data/spec/mysql57/virtual/add_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/change_virtual_column_spec.rb +1 -1
- data/spec/mysql57/virtual/drop_virtual_column_spec.rb +1 -1
- data/spec/postgresql/dump/dump_spec.rb +12 -12
- data/spec/postgresql/fk/migrate_change_fk_spec.rb +6 -6
- data/spec/postgresql/fk/migrate_create_fk_spec.rb +5 -5
- data/spec/postgresql/fk/migrate_drop_fk_spec.rb +8 -8
- data/spec/postgresql/migrate/migrate_add_column_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_add_expression_index_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_change_column_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_change_index_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_check_relation_column_type_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_create_table_spec.rb +14 -14
- data/spec/postgresql/migrate/migrate_drop_column_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_drop_column_with_index_spec.rb +17 -17
- data/spec/postgresql/migrate/migrate_drop_expression_index_spec.rb +3 -3
- data/spec/postgresql/migrate/migrate_drop_index_spec.rb +15 -15
- data/spec/postgresql/migrate/migrate_drop_table_spec.rb +16 -16
- data/spec/postgresql/migrate/migrate_primary_key2_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_primary_key_spec.rb +1 -1
- data/spec/postgresql/migrate/migrate_references_spec.rb +6 -6
- data/spec/postgresql/migrate/migrate_rename_column_spec.rb +18 -18
- data/spec/postgresql/migrate/migrate_rename_table_spec.rb +20 -20
- data/spec/postgresql/migrate/migrate_same_spec.rb +12 -12
- data/spec/postgresql/~default_name_fk/migrate_change_fk_spec.rb +3 -3
- data/spec/postgresql/~default_name_fk/migrate_create_fk_spec.rb +4 -4
- data/spec/postgresql/~default_name_fk/migrate_drop_fk_spec.rb +4 -4
- data/spec/processing_for_ci.rb +13 -0
- data/spec/spec_const.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- metadata +39 -37
- data/omnibus-ridgepole/.gitignore +0 -10
- data/omnibus-ridgepole/Dockerfile.centos +0 -25
- data/omnibus-ridgepole/Dockerfile.ubuntu +0 -21
- data/omnibus-ridgepole/Gemfile +0 -24
- data/omnibus-ridgepole/README.md +0 -15
- data/omnibus-ridgepole/Rakefile +0 -38
- data/omnibus-ridgepole/config/projects/ridgepole.rb +0 -27
- data/omnibus-ridgepole/config/software/ridgepole.rb +0 -13
- data/omnibus-ridgepole/omnibus.rb +0 -54
- data/omnibus-ridgepole/package-scripts/ridgepole/postinst +0 -1
- data/omnibus-ridgepole/package-scripts/ridgepole/postrm +0 -1
- data/spec/mysql/bigint_pk/bigint_pk_spec.rb +0 -47
- data/spec/processing_for_travis.rb +0 -11
data/omnibus-ridgepole/README.md
DELETED
data/omnibus-ridgepole/Rakefile
DELETED
@@ -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
|