schema-evolution-manager 0.9.53 → 0.9.54

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: 0d5bef9063ede01772251882e1ff8652bda678ec8401a3344e706f303b48c420
4
- data.tar.gz: 0ad47d946818ce331acc713730a8e456a7a8948823d8e40cc2b7e55936bc9e6c
3
+ metadata.gz: a9ddc3923455520f86e450ced4cbfb288a7988548ae6b30f92cdaa90149fdf18
4
+ data.tar.gz: 7cf20d30bb1e013afdb8e455143586c807ee7f2cc6c66e10fdf557f69c8a6a49
5
5
  SHA512:
6
- metadata.gz: 707c14f6b932b1c7e02da6b40ae385d12006355afedbbe275213b8eea8092b7d01187ab046d38578c5719d2fa39ac2f78fcf83677cee324b66f655ea41dde389
7
- data.tar.gz: 83f0713085aa02e47f80136da6b61ad8679af7a36650d36d40236e77a0d6b4946f1767c23f716552b08db9d1d5e1f3ee062d1a32a905b20c09c0eee539f2a7ef
6
+ metadata.gz: 9efe8e3b9e596632f79435731ddc16a6b0ce310e1748b172709b8438d82450778fc9cce8aa1f1f880681a45d6b648e7cfd6f2ae0b86f80d53620f87353a52bb2
7
+ data.tar.gz: 5d62cf2f42fb940d0a049f611ea21f83b8cab78e1d4a36e7d4003719ae544d1c4e583306b0da64dcf39eb110cb9d65a45fd9b26f8a7baf0a141b507ecb68080e
data/README.md CHANGED
@@ -133,7 +133,7 @@ There are three ways to install schema evolution manager:
133
133
 
134
134
  git clone git@github.com:mbryzek/schema-evolution-manager.git
135
135
  cd schema-evolution-manager
136
- git checkout 0.9.53
136
+ git checkout 0.9.54
137
137
  ruby ./configure.rb
138
138
  sudo ./install.rb
139
139
 
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 non_interactive password set))
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: ")
@@ -24,11 +24,11 @@ password = if args.password
24
24
  end
25
25
 
26
26
  db = SchemaEvolutionManager::Db.from_args(args, :password => password)
27
- util = SchemaEvolutionManager::ApplyUtil.new(db, :dry_run => args.dry_run || false, :non_interactive => args.non_interactive || false)
27
+ util = SchemaEvolutionManager::ApplyUtil.new(db, :dry_run => args.dry_run || false)
28
28
 
29
29
  begin
30
30
  db.bootstrap!
31
-
31
+
32
32
  puts "Upgrading schema for #{db.url}"
33
33
  count = util.apply!("./scripts")
34
34
  if count == 0
@@ -8,11 +8,6 @@ module SchemaEvolutionManager
8
8
  @dry_run = true
9
9
  end
10
10
 
11
- @non_interactive = opts.delete(:non_interactive)
12
- if @non_interactive.nil?
13
- @non_interactive = false
14
- end
15
-
16
11
  @db = Preconditions.assert_class(db, Db)
17
12
  @scripts = Scripts.new(@db, Scripts::SCRIPTS)
18
13
  end
@@ -21,32 +16,14 @@ module SchemaEvolutionManager
21
16
  @dry_run
22
17
  end
23
18
 
24
- def non_interactive?
25
- @non_interactive
26
- end
27
-
28
19
  # Applies scripts in order, returning number of scripts applied
29
20
  def apply!(dir)
30
21
  Preconditions.check_state(File.directory?(dir),
31
22
  "Dir[%s] does not exist" % dir)
32
23
 
33
- pending_scripts = []
24
+ count = 0
34
25
  @scripts.each_pending(dir) do |filename, path|
35
- pending_scripts << [filename, path]
36
- end
37
-
38
- if pending_scripts.size > 1 && !dry_run? && !non_interactive?
39
- puts "Please confirm that you would like to apply all (#{pending_scripts.size}) of the pending scripts:"
40
- pending_scripts.each do |filename, path|
41
- puts " #{filename}"
42
- end
43
- continue = SchemaEvolutionManager::Ask.for_boolean("Continue?")
44
- if !continue
45
- return 0
46
- end
47
- end
48
-
49
- pending_scripts.each do |filename, path|
26
+ count += 1
50
27
  if @dry_run
51
28
  puts "[DRY RUN] Applying #{filename}"
52
29
  puts path
@@ -58,8 +35,9 @@ module SchemaEvolutionManager
58
35
  puts " Done"
59
36
  end
60
37
  end
61
- pending_scripts.size
38
+ count
62
39
  end
63
40
 
64
41
  end
42
+
65
43
  end
@@ -67,7 +67,7 @@ module SchemaEvolutionManager
67
67
  @set = found_arguments.delete(:set) || []
68
68
 
69
69
  @dry_run = found_arguments.delete(:dry_run)
70
- @non_interactive = found_arguments.delete(:non_interactive)
70
+ @non_interactice = found_arguments.delete(:non_interactive)
71
71
  @password = found_arguments.delete(:password)
72
72
  @help = found_arguments.delete(:help)
73
73
  @verbose = found_arguments.delete(:verbose)
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.53
4
+ version: 0.9.54
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bryzek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-10 00:00:00.000000000 Z
11
+ date: 2024-07-18 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: '["Michael Bryzek"]'
14
14
  email: mbryzek@alum.mit.edu