schema-evolution-manager 0.9.45 → 0.9.46

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
  SHA256:
3
- metadata.gz: f9aa2e5f4ca0f466a5af46ed97fca2186cdd699ac4e0c5cf05b2e9572aee0583
4
- data.tar.gz: 452714b924c36169ddc725fe75ba1315153a27564adce616afb04f8aa5920649
3
+ metadata.gz: 3085f5d9b7d81f5600db73a8e84ed31094d196b2b58716b3638a56e0e29a7528
4
+ data.tar.gz: 1ff2dca48535853cd2645f189e4d6e4b6cd5c922759e4ec5e1f654b418f3f3e2
5
5
  SHA512:
6
- metadata.gz: a3b69b1dad0e1128683d5c6d880766f766681c9db47aff820f4d798d25d4a278fc01e7e3138f8ae75c0a53501c0ef47c48479614a41187762778eb70e44ed2c8
7
- data.tar.gz: 1279727ee5dcc9a99059870cc29ed278e62dd881d544a6a7ac34c9631e882eaea43da06a91de0c90f063ea5ee37dc06cf580dfc429454b6c5d737707eb03781e
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.45
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)
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.45
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