schema-evolution-manager 0.9.44 → 0.9.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e579a1c6bbd83d31417f9a78b9552cd742b458ddbcd8d28a1516ce585a8275d
4
- data.tar.gz: 54d600c6d4174ddadbc56ed2f3a148632fa5986a288f7dc348db034075d9994c
3
+ metadata.gz: 3085f5d9b7d81f5600db73a8e84ed31094d196b2b58716b3638a56e0e29a7528
4
+ data.tar.gz: 1ff2dca48535853cd2645f189e4d6e4b6cd5c922759e4ec5e1f654b418f3f3e2
5
5
  SHA512:
6
- metadata.gz: 2c88ebbd3d1447a5d7798cd7ebaa0c67205f84d408b830cb7200078322f67a3e147f75e620bf437e525d3decc38ca0f884dc7e71bcf64ce46630fee4bf523181
7
- data.tar.gz: 555a38f1b93184951d6a483c0a056756e3a634eb9608389332affa665225e675ead15ed2b40e83481b3b2fc43aac64fcbe8b7cc2bf6b7c29243edb99660ec0da
6
+ metadata.gz: 990bbd858fc897c3bc2f47080e935be13655ebfa5664d35ddeef4f7c3200476c2b0502a3ba1b2c1a5685b46a05f095a1714be78f433e6c818d261e03d711f786
7
+ data.tar.gz: de98cbbc8b378680172b8c16b5a211674e37950e6d2909e7db3545f31a353c131da232e678f68c873bd2138e515f35cec2c8f613b18107c27dcc9240aa641349
data/README.md CHANGED
@@ -123,17 +123,21 @@ First presented at [PGDay NYC 2013](https://speakerdeck.com/mbryzek/schema-evolu
123
123
 
124
124
  ## Installation
125
125
 
126
- There are two ways to install schema evolution manager:
126
+ There are three ways to install schema evolution manager:
127
+
128
+ 1. Via brew
129
+
130
+ brew install schema-evolution-manager
127
131
 
128
132
  1. Direct install using ruby (no dependency on ruby gems)
129
133
 
130
- git clone git://github.com/mbryzek/schema-evolution-manager.git
134
+ git clone git@github.com:mbryzek/schema-evolution-manager.git
131
135
  cd schema-evolution-manager
132
- git checkout 0.9.44
136
+ git checkout 0.9.46
133
137
  ruby ./configure.rb
134
138
  sudo ./install.rb
135
139
 
136
- 2. If you have ruby gems:
140
+ 1. If you have ruby gems:
137
141
 
138
142
  gem install schema-evolution-manager
139
143
 
data/bin/sem-apply CHANGED
@@ -15,7 +15,7 @@ require 'tempfile'
15
15
 
16
16
  load File.join(File.dirname(__FILE__), 'sem-config')
17
17
 
18
- args = SchemaEvolutionManager::Args.from_stdin(:optional => %w(url host port name user dry_run password))
18
+ args = SchemaEvolutionManager::Args.from_stdin(:optional => %w(url host port name user dry_run password set))
19
19
 
20
20
  password = if args.password
21
21
  SchemaEvolutionManager::Ask.for_password("Please enter your password: ")
@@ -5,7 +5,9 @@ module SchemaEvolutionManager
5
5
  # tests around it... so we have our own internal simple implementation.
6
6
  class Args
7
7
 
8
- if !defined?(FLAGS_WITH_ARGUMENTS)
8
+ if !defined?(ARRAY_FLAGS)
9
+ ARRAY_FLAGS = [:set]
10
+
9
11
  FLAGS_WITH_ARGUMENTS = {
10
12
  :artifact_name => "Specifies the name of the artifact. Tag will be appended to this name",
11
13
  :user => "Connect to the database as this username instead of the default",
@@ -16,7 +18,7 @@ module SchemaEvolutionManager
16
18
  :dir => "Path to a directory",
17
19
  :tag => "A git tag (e.g. 0.0.1)",
18
20
  :prefix => "Configure installer to use this prefix",
19
- :set => "Passthrough for postgresql --set argument"
21
+ :set => "Passthrough for postgresql --set argument. Returns an array of the options set"
20
22
  }
21
23
 
22
24
  FLAGS_NO_ARGUMENTS = {
@@ -61,7 +63,7 @@ module SchemaEvolutionManager
61
63
  @user = found_arguments.delete(:user)
62
64
  @dir = found_arguments.delete(:dir)
63
65
  @tag = found_arguments.delete(:tag)
64
- @set = found_arguments.delete(:set)
66
+ @set = found_arguments.delete(:set) || []
65
67
 
66
68
  @dry_run = found_arguments.delete(:dry_run)
67
69
  @password = found_arguments.delete(:password)
@@ -138,7 +140,12 @@ module SchemaEvolutionManager
138
140
  index += 1
139
141
 
140
142
  if FLAGS_WITH_ARGUMENTS.has_key?(flag)
141
- found[flag] = values[index]
143
+ if ARRAY_FLAGS.include?(flag)
144
+ found[flag] ||= []
145
+ found[flag] << values[index]
146
+ else
147
+ found[flag] = values[index]
148
+ end
142
149
  index += 1
143
150
 
144
151
  elsif FLAGS_NO_ARGUMENTS.has_key?(flag)
@@ -2,14 +2,16 @@ module SchemaEvolutionManager
2
2
 
3
3
  class Db
4
4
 
5
- attr_reader :url
5
+ attr_reader :url, :psql_executable_with_options
6
6
 
7
7
  def initialize(url, opts={})
8
8
  @url = Preconditions.check_not_blank(url, "url cannot be blank")
9
9
  password = opts.delete(:password)
10
10
 
11
- set = opts.delete(:set).to_s.strip
12
- @psql_executable_with_options = set.empty? ? "psql" : "psql --set='%s'" % set
11
+ @psql_executable_with_options = "psql"
12
+ (opts.delete(:set) || []).each do |arg|
13
+ @psql_executable_with_options << " --set #{arg}"
14
+ end
13
15
 
14
16
  Preconditions.assert_empty_opts(opts)
15
17
  connection_data = ConnectionData.parse_url(@url)
@@ -8,5 +8,3 @@ VERSION ||= '0.9.43'
8
8
  end
9
9
 
10
10
  end
11
-
12
- end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema-evolution-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.44
4
+ version: 0.9.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bryzek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-23 00:00:00.000000000 Z
11
+ date: 2022-10-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: '["Michael Bryzek"]'
14
14
  email: mbryzek@alum.mit.edu
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.0.3
75
+ rubygems_version: 3.0.3.1
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: Schema evolution manager is a simple schema migration tool for postgresql