prick 0.18.0 → 0.20.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +10 -4
  3. data/README.md +7 -7
  4. data/Rakefile +3 -1
  5. data/TODO +13 -11
  6. data/bin/console +2 -1
  7. data/doc/build-yml.txt +14 -0
  8. data/exe/prick +264 -28
  9. data/lib/builder/batch.rb +147 -0
  10. data/lib/builder/builder.rb +122 -0
  11. data/lib/builder/node.rb +189 -0
  12. data/lib/builder/node_pool.rb +105 -0
  13. data/lib/builder/parser.rb +120 -0
  14. data/lib/local/command.rb +193 -0
  15. data/lib/{prick → local}/git.rb +148 -22
  16. data/lib/local/timer.rb +98 -0
  17. data/lib/prick/constants.rb +54 -66
  18. data/lib/prick/diff.rb +28 -18
  19. data/lib/prick/prick_version.rb +161 -0
  20. data/lib/prick/state.rb +80 -165
  21. data/lib/prick/version.rb +2 -163
  22. data/lib/prick.rb +43 -27
  23. data/lib/share/init/.gitignore +10 -0
  24. data/lib/share/init/.prick-context +2 -0
  25. data/lib/share/init/.rspec +3 -0
  26. data/{share/schema/schema/public → lib/share/init/migration}/.keep +0 -0
  27. data/lib/share/init/prick.yml +6 -0
  28. data/lib/share/init/schema/.keep +0 -0
  29. data/lib/share/init/schema/build.yml +2 -0
  30. data/lib/share/init/schema/prick/.keep +0 -0
  31. data/lib/share/init/schema/prick/build.yml +5 -0
  32. data/lib/share/init/schema/prick/data.sql +6 -0
  33. data/{share/schema → lib/share/init}/schema/prick/tables.sql +2 -3
  34. data/lib/share/init/schema/public/.keep +0 -0
  35. data/lib/share/init/spec/prick_helper.rb +1 -0
  36. data/lib/share/init/spec/prick_spec.rb +6 -0
  37. data/lib/share/init/spec/spec_helper.rb +50 -0
  38. data/lib/share/migrate/migration/build.yml +4 -0
  39. data/lib/share/migrate/migration/diff.after-tables.sql +0 -0
  40. data/lib/share/migrate/migration/diff.before-tables.sql +0 -0
  41. data/lib/share/migrate/migration/diff.tables.sql +0 -0
  42. data/lib/subcommand/prick-build.rb +55 -0
  43. data/lib/subcommand/prick-create.rb +78 -0
  44. data/lib/subcommand/prick-drop.rb +25 -0
  45. data/lib/subcommand/prick-fox.rb +62 -0
  46. data/lib/subcommand/prick-init.rb +46 -0
  47. data/lib/subcommand/prick-make.rb +202 -0
  48. data/lib/subcommand/prick-migrate.rb +37 -0
  49. data/lib/subcommand/prick-release.rb +23 -0
  50. data/lib/subcommand/prick-setup.rb +20 -0
  51. data/lib/subcommand/prick-teardown.rb +18 -0
  52. data/prick.gemspec +43 -16
  53. metadata +161 -72
  54. data/.gitignore +0 -29
  55. data/.travis.yml +0 -7
  56. data/doc/create_release.txt +0 -17
  57. data/doc/flow.txt +0 -98
  58. data/doc/migra +0 -1
  59. data/doc/migrations.txt +0 -172
  60. data/doc/notes.txt +0 -116
  61. data/doc/prick.txt +0 -114
  62. data/doc/sh.prick +0 -316
  63. data/lib/ext/algorithm.rb +0 -14
  64. data/lib/ext/fileutils.rb +0 -26
  65. data/lib/ext/forward_method.rb +0 -18
  66. data/lib/ext/pg.rb +0 -18
  67. data/lib/ext/shortest_path.rb +0 -44
  68. data/lib/prick/archive.rb +0 -124
  69. data/lib/prick/branch.rb +0 -254
  70. data/lib/prick/builder.rb +0 -205
  71. data/lib/prick/cache.rb +0 -34
  72. data/lib/prick/command.rb +0 -102
  73. data/lib/prick/database.rb +0 -82
  74. data/lib/prick/dsort.rb +0 -151
  75. data/lib/prick/ensure.rb +0 -119
  76. data/lib/prick/exceptions.rb +0 -25
  77. data/lib/prick/head.rb +0 -183
  78. data/lib/prick/migration.rb +0 -70
  79. data/lib/prick/program.rb +0 -506
  80. data/lib/prick/project.rb +0 -626
  81. data/lib/prick/rdbms.rb +0 -137
  82. data/lib/prick/schema.rb +0 -27
  83. data/lib/prick/share.rb +0 -64
  84. data/libexec/strip-comments +0 -33
  85. data/make_releases +0 -72
  86. data/make_schema +0 -10
  87. data/share/diff/diff.after-tables.sql +0 -4
  88. data/share/diff/diff.before-tables.sql +0 -4
  89. data/share/diff/diff.tables.sql +0 -8
  90. data/share/features/diff.sql +0 -2
  91. data/share/features/feature/diff.sql +0 -2
  92. data/share/features/feature/migrate.sql +0 -2
  93. data/share/features/features.sql +0 -2
  94. data/share/features/features.yml +0 -2
  95. data/share/features/migrations.sql +0 -4
  96. data/share/gitignore +0 -2
  97. data/share/migration/diff.tables.sql +0 -8
  98. data/share/migration/features.yml +0 -6
  99. data/share/migration/migrate.sql +0 -3
  100. data/share/migration/migrate.yml +0 -8
  101. data/share/migration/tables.sql +0 -3
  102. data/share/schema/build.yml +0 -14
  103. data/share/schema/schema/build.yml +0 -3
  104. data/share/schema/schema/prick/build.yml +0 -14
  105. data/share/schema/schema/prick/data.sql +0 -7
  106. data/share/schema/schema/prick/schema.sql +0 -3
  107. data/share/schema/schema/public/build.yml +0 -13
  108. data/share/schema/schema.sql +0 -3
  109. data/test_assorted +0 -192
  110. data/test_feature +0 -112
  111. data/test_refactor +0 -34
  112. data/test_single_dev +0 -83
@@ -0,0 +1,202 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'builder/builder.rb'
4
+
5
+ module Prick::SubCommand
6
+ def self.make(database, username, schema, timer: nil, dump: nil)
7
+ Timer.on! if timer
8
+ time "Prick::Command#build" do
9
+ begin
10
+ super_conn = PgConn.new
11
+ conn = nil
12
+ builder = nil
13
+ built_at = EPOCH
14
+ clean = false
15
+ create_schemas = []
16
+
17
+ time "Load build object" do
18
+ if super_conn.rdbms.exist? database
19
+ conn = PgConn.new(database, username)
20
+ if conn.schema.exist_table? "prick", "versions"
21
+ built_at = conn.value("select built_at from prick.versions")
22
+ end
23
+ else
24
+ super_conn.rdbms.create database, owner: username
25
+ conn = PgConn.new(database, username)
26
+ clean = true
27
+ end
28
+
29
+ builder = Prick::Build::Builder.new(conn, "schema", clean)
30
+
31
+ if schema
32
+ builder.pool.after_schema(schema).each { |schema|
33
+ conn.schema.drop(schema, cascade: true)
34
+ builder.pool.delete_schema(schema)
35
+ }
36
+ end
37
+
38
+ touched_nodes = builder.nodes.select { |node| File.mtime(node.path) > built_at }
39
+ touched_phases = touched_nodes.map(&:phase).uniq.compact
40
+ touched_kinds = touched_nodes.map(&:kind).uniq.compact
41
+ touched_schema = touched_nodes.first&.schema
42
+ missing_schema = builder.schemas.find { |schema| !conn.schema.exist?(schema) }
43
+ build_schema = builder.schemas.find { |schema| [touched_schema, missing_schema].include? schema }
44
+
45
+ if build_schema.nil?
46
+ puts "#{database} is up to date"
47
+ exit
48
+ end
49
+
50
+ if touched_phases.include?(:decl) || touched_phases.empty?
51
+ create_schemas = [build_schema] + builder.pool.after_schema(build_schema)
52
+ create_schemas.each { |schema| conn.schema.drop(schema, cascade: true) }
53
+ builder.pool.delete_schema(builder.pool.before_schema(build_schema), exclude: [:seed])
54
+ elsif touched_phases.include?(:init) || touched_phases.include?(:term)
55
+ builder.pool.clear(:decl, :seed)
56
+ elsif touched_phases.include?(:seed)
57
+ builder.pool.clear(:init, :decl, :term)
58
+ end
59
+
60
+ builder.group
61
+ end
62
+
63
+ case dump
64
+ when :nodes; builder.nodes.reject { |node| node.is_a?(Build::BuildNode) }.map &:dump
65
+ when :allnodes; builder.nodes.map &:dump
66
+ when :batches; builder.dump
67
+ when nil;
68
+ else
69
+ raise Prick::Error, "Illegal dump type: #{dump.inspect}"
70
+ end
71
+ exit if dump
72
+
73
+ time "Execute build object" do
74
+ builder.execute(conn, create_schemas: create_schemas)
75
+ end
76
+
77
+ rescue Prick::Build::Error => ex
78
+ $stderr.puts ex.message
79
+ exit 1
80
+
81
+ rescue Command::Error => ex
82
+ $stderr.puts ex.message
83
+ exit 1
84
+
85
+ end
86
+ end
87
+ end
88
+ end
89
+
90
+ __END__
91
+ require 'prick_build.rb'
92
+
93
+ require 'pg_conn'
94
+
95
+ require 'ruby-prof'
96
+
97
+ DATABASE = "mikras"
98
+ USERNAME = "mikras"
99
+
100
+ #PROFILE = true
101
+ PROFILE = false
102
+ TIME = true
103
+ #TIME = false
104
+
105
+ EPOCH = Time.at(0).utc
106
+
107
+ schema = ARGV.first
108
+
109
+ time "Program" do
110
+ RubyProf.start if PROFILE
111
+ begin
112
+ conn = nil
113
+ builder = nil
114
+ built_at = EPOCH
115
+ clean = false
116
+ create_schema = true
117
+
118
+ time "Load build object" do
119
+ PgConn.new { |super_conn|
120
+ if super_conn.rdbms.exist? DATABASE
121
+ conn = PgConn.new(DATABASE)
122
+ if conn.schema.exist_table? "prick", "versions"
123
+ built_at = conn.value("select built_at from prick.versions")
124
+ end
125
+ else
126
+ super_conn.rdbms.create DATABASE, owner: USERNAME
127
+ conn = PgConn.new(DATABASE)
128
+ clean = true
129
+ end
130
+ }
131
+
132
+ builder = Prick::Build::Builder.new(conn, "schema", clean)
133
+
134
+ if schema
135
+ builder.pool.after_schema(schema).each { |schema|
136
+ conn.schema.drop(schema, cascade: true)
137
+ builder.pool.delete_schema(schema)
138
+ }
139
+ end
140
+
141
+ touched_nodes = builder.nodes.select { |node| File.mtime(node.path) > built_at }
142
+ touched_phases = touched_nodes.map(&:phase).uniq.compact
143
+ touched_schema = touched_nodes.first&.schema
144
+ missing_schema = builder.schemas.find { |schema| !conn.schema.exist?(schema) }
145
+ build_schema = builder.schemas.find { |schema| [touched_schema, missing_schema].include? schema }
146
+
147
+ # puts "touched_nodes : #{touched_nodes.size} nodes"
148
+ # puts "touched_phases: #{touched_phases.inspect}"
149
+ # puts "touched_schema: #{touched_schema.inspect}"
150
+ # puts "missing_schema: #{missing_schema.inspect}"
151
+ # puts "build_schema : #{build_schema.inspect}"
152
+
153
+ # builder.pool.dump
154
+
155
+ if build_schema.nil?
156
+ puts "#{DATABASE} is up to date"
157
+ exit
158
+ end
159
+
160
+ if touched_phases.include?(:decl) || touched_phases.empty?
161
+ schemas = [build_schema] + builder.pool.after_schema(build_schema)
162
+ schemas.each { |schema| conn.schema.drop(schema, cascade: true) }
163
+ builder.pool.delete_schema(builder.pool.before_schema(build_schema))
164
+ elsif touched_phases.include?(:init) || touched_phases.include?(:term)
165
+ builder.pool.clear(:decl, :seed)
166
+ create_schema = false
167
+ elsif touched_phases.include?(:seed)
168
+ builder.pool.clear(:init, :decl, :term)
169
+ create_schema = false
170
+ end
171
+
172
+ # builder.pool.dump
173
+ builder.group
174
+ end
175
+
176
+ # builder.dump
177
+ # p builder.schemas
178
+ # exit
179
+
180
+ time "Execute build object" do
181
+ builder.execute(conn, create_schema: create_schema)
182
+ end
183
+
184
+ rescue Prick::Build::Error => ex
185
+ $stderr.puts ex.message
186
+ exit 1
187
+
188
+ rescue Command::Error => ex
189
+ $stderr.puts ex.message
190
+ exit 1
191
+ end
192
+ end
193
+
194
+ if PROFILE
195
+ profile = RubyProf.stop
196
+ # printer = RubyProf::GraphHtmlPrinter.new(profile)
197
+ printer = RubyProf::CallStackPrinter.new(profile)
198
+ File.open("t.html", "w") { |file|
199
+ printer.print(file, :min_percent => 2)
200
+ }
201
+ end
202
+
@@ -0,0 +1,37 @@
1
+
2
+ module Prick
3
+ module SubCommand
4
+ # def self.migrate(database, username, file) TODO
5
+ def self.migrate(database, username, file: nil)
6
+ PgConn.new(database, username) { |conn|
7
+ conn.schema.exist_relation? "prick", "versions" or
8
+ raise Prick::Fail, "Can't read version from database"
9
+
10
+ from_version = PrickVersion.new(conn.value "select version from prick.versions") or
11
+ raise Prick::Fail, "Illegal version in table prick.versions"
12
+
13
+ if file
14
+ conn.transaction {
15
+ conn.exec File.read(file)
16
+ }
17
+ else
18
+ to_version = Prick.state.version
19
+ from_version != to_version or raise Prick::Fail, "Already up to date"
20
+ from_version < to_version or raise Prick::Fail, "Can't migrate backwards"
21
+
22
+ migration_dir = "#{MIGRATION_DIR}/#{from_version}"
23
+ File.directory? migration_dir or
24
+ raise Prick::Fail, "Can't migrate from #{from_version} to #{to_version}"
25
+
26
+ puts "Migrating from #{from_version} to #{to_version}"
27
+
28
+ builder = Prick::Build::Builder.new(conn, migration_dir)
29
+ conn.transaction {
30
+ builder.execute conn
31
+ conn.exec File.read(SCHEMA_VERSION_PATH)
32
+ }
33
+ end
34
+ }
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,23 @@
1
+
2
+ module Prick
3
+ module SubCommand
4
+ def self.release(kind)
5
+ constrain kind, :major, :minor, :patch
6
+
7
+ Git.clean? or raise "Won't release: Repository is dirty"
8
+ Git.synchronized? or raise "Won't release: Repository is not synchronized with origin"
9
+
10
+ version = Prick.state.version.increment!(kind).to_s
11
+ Prick.state.save
12
+
13
+ Git.add(Prick.state.file)
14
+ Git.add(Prick.state.schema_file)
15
+ Git.commit "Release #{version}"
16
+ Git.tag.create "v#{version}"
17
+ Git.branch.create version
18
+ Git.push
19
+
20
+ puts version
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'builder/builder.rb'
4
+
5
+ module Prick::SubCommand
6
+ def self.setup(database, username)
7
+ conn = PgConn.new
8
+ if !conn.role.exist? username
9
+ # FIXME Should not be created as superuser but we can't do that before we
10
+ # have a super: option in build
11
+ conn.role.create username, superuser: true, can_login: true, create_role: true
12
+ end
13
+ if !conn.rdbms.exist? database
14
+ conn.rdbms.create database, owner: username
15
+ end
16
+ builder = Prick::Build::Builder.new(conn, "schema")
17
+ # TODO Run builder setup scrips
18
+ end
19
+ end
20
+
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'builder/builder.rb'
4
+
5
+ module Prick::SubCommand
6
+ def self.teardown(database, username)
7
+ conn = PgConn.new # Superuser connection
8
+ if conn.rdbms.exist? database
9
+ conn.rdbms.drop database
10
+ end
11
+ if conn.role.exist? username
12
+ conn.role.drop username, cascade: true
13
+ end
14
+ builder = Prick::Build::Builder.new(conn, "schema")
15
+ # TODO Run builder teardown scrips
16
+ end
17
+ end
18
+
data/prick.gemspec CHANGED
@@ -1,10 +1,6 @@
1
+ # frozen_string_literal: true
1
2
 
2
- #$LOAD_PATH.unshift("/home/clr/prj/shellopts/lib")
3
-
4
- #lib = File.expand_path("../lib", __FILE__)
5
- #$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
- #require "prick/version"
7
- require_relative 'lib/prick/version'
3
+ require_relative "lib/prick/version"
8
4
 
9
5
  Gem::Specification.new do |spec|
10
6
  spec.name = "prick"
@@ -15,23 +11,54 @@ Gem::Specification.new do |spec|
15
11
  spec.summary = "A release control and management system for postgresql"
16
12
  spec.description = "A release control and management system for postgresql"
17
13
  spec.homepage = "http://www.nowhere.com/"
18
- spec.required_ruby_version = Gem::Requirement.new(">= 2.7.1")
19
-
20
- # spec.metadata["homepage_uri"] = spec.homepage
21
- # spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
22
- # spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
14
+ # spec.required_ruby_version = "~> 2.7.1"
23
15
 
24
16
  # Specify which files should be added to the gem when it is released.
25
17
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
26
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
27
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
+ `git ls-files -z`.split("\x0").reject do |f|
20
+ (f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features|old)/|\.(?:git|travis|circleci)|appveyor)})
21
+ end
28
22
  end
29
23
  spec.bindir = "exe"
30
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
25
  spec.require_paths = ["lib"]
32
26
 
33
- # spec.add_dependency "pg"
34
- spec.add_dependency "shellopts", "2.0.0.pre.14"
27
+ # Uncomment to register a new dependency of your gem
28
+ # spec.add_dependency "example-gem", "~> 1.0"
29
+
30
+ # For more information and examples about making a new gem, checkout our
31
+ # guide at: https://bundler.io/guides/creating_gem.html
32
+
33
+ # Add your production dependencies here
34
+ # spec.add_dependency GEM [, VERSION]
35
35
  spec.add_dependency "semantic"
36
+
36
37
  spec.add_dependency "indented_io"
38
+ spec.add_dependency "constrain"
39
+ spec.add_dependency "forward_to"
40
+ spec.add_dependency "bootsnap"
41
+
42
+ # Add your development dependencies here
43
+ # spec.add_development_dependency GEM [, VERSION]
44
+ spec.add_development_dependency "ruby-prof"
45
+
46
+ # Remove when fox goes a gem
47
+ spec.add_dependency "pg"
48
+ spec.add_dependency "dry-inflector"
49
+ spec.add_dependency "boolean"
50
+ spec.add_dependency "developer_exceptions"
51
+ spec.add_dependency "shellopts", "~> 2.0.23"
52
+
53
+ # In development mode override load paths for gems whose source are located
54
+ # as siblings of this project directory
55
+ if File.directory?("#{__dir__}/.git")
56
+ local_projects = Dir["../*"].select { |path|
57
+ File.directory?(path) && File.exist?("#{path}/Gemfile")
58
+ }.map { |relpath| "#{File.absolute_path(relpath)}/lib" }
59
+ $LOAD_PATH.unshift *local_projects
60
+ end
61
+
62
+ # Also un-comment in spec/spec_helper to use simplecov
63
+ # spec.add_development_dependency "simplecov"
37
64
  end
metadata CHANGED
@@ -1,31 +1,31 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prick
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.20.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-21 00:00:00.000000000 Z
11
+ date: 2022-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: shellopts
14
+ name: semantic
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0.pre.14
19
+ version: '0'
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
- version: 2.0.0.pre.14
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: semantic
28
+ name: indented_io
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,77 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: indented_io
42
+ name: constrain
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: forward_to
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bootsnap
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: ruby-prof
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pg
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
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: dry-inflector
43
113
  requirement: !ruby/object:Gem::Requirement
44
114
  requirements:
45
115
  - - ">="
@@ -52,6 +122,48 @@ dependencies:
52
122
  - - ">="
53
123
  - !ruby/object:Gem::Version
54
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: boolean
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :runtime
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: developer_exceptions
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: shellopts
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 2.0.23
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 2.0.23
55
167
  description: A release control and management system for postgresql
56
168
  email:
57
169
  - claus.l.rasmussen@gmail.com
@@ -60,83 +172,60 @@ executables:
60
172
  extensions: []
61
173
  extra_rdoc_files: []
62
174
  files:
63
- - ".gitignore"
64
175
  - ".rspec"
65
176
  - ".ruby-version"
66
- - ".travis.yml"
67
177
  - Gemfile
68
178
  - README.md
69
179
  - Rakefile
70
180
  - TODO
71
181
  - bin/console
72
182
  - bin/setup
73
- - doc/create_release.txt
74
- - doc/flow.txt
75
- - doc/migra
76
- - doc/migrations.txt
77
- - doc/notes.txt
78
- - doc/prick.txt
79
- - doc/sh.prick
183
+ - doc/build-yml.txt
80
184
  - exe/prick
81
- - lib/ext/algorithm.rb
82
- - lib/ext/fileutils.rb
83
- - lib/ext/forward_method.rb
84
- - lib/ext/pg.rb
85
- - lib/ext/shortest_path.rb
185
+ - lib/builder/batch.rb
186
+ - lib/builder/builder.rb
187
+ - lib/builder/node.rb
188
+ - lib/builder/node_pool.rb
189
+ - lib/builder/parser.rb
190
+ - lib/local/command.rb
191
+ - lib/local/git.rb
192
+ - lib/local/timer.rb
86
193
  - lib/prick.rb
87
- - lib/prick/archive.rb
88
- - lib/prick/branch.rb
89
- - lib/prick/builder.rb
90
- - lib/prick/cache.rb
91
- - lib/prick/command.rb
92
194
  - lib/prick/constants.rb
93
- - lib/prick/database.rb
94
195
  - lib/prick/diff.rb
95
- - lib/prick/dsort.rb
96
- - lib/prick/ensure.rb
97
- - lib/prick/exceptions.rb
98
- - lib/prick/git.rb
99
- - lib/prick/head.rb
100
- - lib/prick/migration.rb
101
- - lib/prick/program.rb
102
- - lib/prick/project.rb
103
- - lib/prick/rdbms.rb
104
- - lib/prick/schema.rb
105
- - lib/prick/share.rb
196
+ - lib/prick/prick_version.rb
106
197
  - lib/prick/state.rb
107
198
  - lib/prick/version.rb
108
- - libexec/strip-comments
109
- - make_releases
110
- - make_schema
199
+ - lib/share/init/.gitignore
200
+ - lib/share/init/.prick-context
201
+ - lib/share/init/.rspec
202
+ - lib/share/init/migration/.keep
203
+ - lib/share/init/prick.yml
204
+ - lib/share/init/schema/.keep
205
+ - lib/share/init/schema/build.yml
206
+ - lib/share/init/schema/prick/.keep
207
+ - lib/share/init/schema/prick/build.yml
208
+ - lib/share/init/schema/prick/data.sql
209
+ - lib/share/init/schema/prick/tables.sql
210
+ - lib/share/init/schema/public/.keep
211
+ - lib/share/init/spec/prick_helper.rb
212
+ - lib/share/init/spec/prick_spec.rb
213
+ - lib/share/init/spec/spec_helper.rb
214
+ - lib/share/migrate/migration/build.yml
215
+ - lib/share/migrate/migration/diff.after-tables.sql
216
+ - lib/share/migrate/migration/diff.before-tables.sql
217
+ - lib/share/migrate/migration/diff.tables.sql
218
+ - lib/subcommand/prick-build.rb
219
+ - lib/subcommand/prick-create.rb
220
+ - lib/subcommand/prick-drop.rb
221
+ - lib/subcommand/prick-fox.rb
222
+ - lib/subcommand/prick-init.rb
223
+ - lib/subcommand/prick-make.rb
224
+ - lib/subcommand/prick-migrate.rb
225
+ - lib/subcommand/prick-release.rb
226
+ - lib/subcommand/prick-setup.rb
227
+ - lib/subcommand/prick-teardown.rb
111
228
  - prick.gemspec
112
- - share/diff/diff.after-tables.sql
113
- - share/diff/diff.before-tables.sql
114
- - share/diff/diff.tables.sql
115
- - share/features/diff.sql
116
- - share/features/feature/diff.sql
117
- - share/features/feature/migrate.sql
118
- - share/features/features.sql
119
- - share/features/features.yml
120
- - share/features/migrations.sql
121
- - share/gitignore
122
- - share/migration/diff.tables.sql
123
- - share/migration/features.yml
124
- - share/migration/migrate.sql
125
- - share/migration/migrate.yml
126
- - share/migration/tables.sql
127
- - share/schema/build.yml
128
- - share/schema/schema.sql
129
- - share/schema/schema/build.yml
130
- - share/schema/schema/prick/build.yml
131
- - share/schema/schema/prick/data.sql
132
- - share/schema/schema/prick/schema.sql
133
- - share/schema/schema/prick/tables.sql
134
- - share/schema/schema/public/.keep
135
- - share/schema/schema/public/build.yml
136
- - test_assorted
137
- - test_feature
138
- - test_refactor
139
- - test_single_dev
140
229
  homepage: http://www.nowhere.com/
141
230
  licenses: []
142
231
  metadata: {}
@@ -148,7 +237,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
237
  requirements:
149
238
  - - ">="
150
239
  - !ruby/object:Gem::Version
151
- version: 2.7.1
240
+ version: '0'
152
241
  required_rubygems_version: !ruby/object:Gem::Requirement
153
242
  requirements:
154
243
  - - ">="