schema-evolution-manager 0.9.46 → 0.9.47

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: 3085f5d9b7d81f5600db73a8e84ed31094d196b2b58716b3638a56e0e29a7528
4
- data.tar.gz: 1ff2dca48535853cd2645f189e4d6e4b6cd5c922759e4ec5e1f654b418f3f3e2
3
+ metadata.gz: ed6b170d492bc54dae6e23bec8915bc63ee60cf623cc58d7fe501513e5ac51cb
4
+ data.tar.gz: d8cc588c9fdbf909b7f74d0caf5733f2e19fb42904ed5162e884fdca07e520a4
5
5
  SHA512:
6
- metadata.gz: 990bbd858fc897c3bc2f47080e935be13655ebfa5664d35ddeef4f7c3200476c2b0502a3ba1b2c1a5685b46a05f095a1714be78f433e6c818d261e03d711f786
7
- data.tar.gz: de98cbbc8b378680172b8c16b5a211674e37950e6d2909e7db3545f31a353c131da232e678f68c873bd2138e515f35cec2c8f613b18107c27dcc9240aa641349
6
+ metadata.gz: c49a71d7e017ba6a8a2b16dc817e7e02df007e2f715a102daf9d291beb9085145d5ec2fd9da1f769c169df7aef8bdec968d7bda3ce597bf61ec2f9efdac6a4af
7
+ data.tar.gz: 0b7fafcd88dab54fbdfab0bed71763c5c2cfc206514f78bbf25e73cc687f6882282b102729958b90b0775ebce993d2fb0a95c80d78545af606d8b7ab299b10b9
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.46
136
+ git checkout 0.9.47
137
137
  ruby ./configure.rb
138
138
  sudo ./install.rb
139
139
 
data/bin/sem-add CHANGED
@@ -16,7 +16,7 @@ if file.to_s.strip == ""
16
16
  SchemaEvolutionManager::RdocUsage.printAndExit(1)
17
17
  end
18
18
 
19
- SchemaEvolutionManager::Preconditions.check_state(File.exists?(file), "File[#{file}] could not be found")
19
+ SchemaEvolutionManager::Preconditions.check_state(File.exist?(file), "File[#{file}] could not be found")
20
20
  SchemaEvolutionManager::Preconditions.check_state(file.match(/\.sql/i), "File[#{file}] must end with .sql")
21
21
 
22
22
  scripts_dir = File.join(`pwd`.strip, "scripts")
@@ -26,7 +26,7 @@ contents = IO.read(file)
26
26
  now = Time.now.utc.strftime('%Y%m%d-%H%M%S')
27
27
  target = File.join(scripts_dir, "#{now}.sql")
28
28
 
29
- while File.exists?(target)
29
+ while File.exist?(target)
30
30
  sleep 0.1
31
31
  now = Time.now.utc.strftime('%Y%m%d-%H%M%S')
32
32
  target = File.join(scripts_dir, "#{now}.sql")
data/bin/sem-dist CHANGED
@@ -80,7 +80,7 @@ SchemaEvolutionManager::Library.with_temp_file do |tmp|
80
80
  end
81
81
 
82
82
  gzip_file = "#{tarball}.gz"
83
- if File.exists?(gzip_file)
83
+ if File.exist?(gzip_file)
84
84
  puts "Removing old gzip file at #{gzip_file}"
85
85
  FileUtils.rm(gzip_file)
86
86
  end
data/bin/sem-init CHANGED
@@ -54,7 +54,7 @@ Dir.chdir(args.dir) do
54
54
  wrappers = []
55
55
  Dir.glob("#{template_dir}/*").each do |path|
56
56
  wrapper = File.basename(path)
57
- if !File.exists?(wrapper)
57
+ if !File.exist?(wrapper)
58
58
  puts "Creating wrapper script #{wrapper}"
59
59
  copy_file(path, wrapper, subs)
60
60
  SchemaEvolutionManager::Library.system_or_error("chmod +x #{wrapper}")
@@ -67,14 +67,14 @@ Dir.chdir(args.dir) do
67
67
  end
68
68
 
69
69
  readme = "README.md"
70
- if !File.exists?(readme)
70
+ if !File.exist?(readme)
71
71
  puts "Creating #{readme}"
72
72
  copy_file("schema-evolution-manager/template/README.md", "README.md", subs)
73
73
  SchemaEvolutionManager::Library.system_or_error("git add #{readme}")
74
74
  SchemaEvolutionManager::Library.system_or_error("git commit -m 'Adding README.md' README.md")
75
75
  end
76
76
 
77
- if !File.exists?("scripts")
77
+ if !File.exist?("scripts")
78
78
  SchemaEvolutionManager::Library.system_or_error("mkdir scripts")
79
79
  SchemaEvolutionManager::Library.system_or_error("touch scripts/.exists")
80
80
  SchemaEvolutionManager::Library.system_or_error("git add scripts/.exists")
@@ -67,7 +67,7 @@ module SchemaEvolutionManager
67
67
  # executes sql commands from a file in a single transaction
68
68
  def psql_file(filename, path)
69
69
  Preconditions.assert_class(path, String)
70
- Preconditions.check_state(File.exists?(path), "File[%s] not found" % path)
70
+ Preconditions.check_state(File.exist?(path), "File[%s] not found" % path)
71
71
 
72
72
  options = Db.attribute_values(path).join(" ")
73
73
 
@@ -83,7 +83,7 @@ module SchemaEvolutionManager
83
83
  result = `#{command} > #{output} 2>&1`.strip
84
84
  status = $?
85
85
  if status.to_i > 0
86
- errors = File.exists?(output) ? IO.read(output) : result
86
+ errors = File.exist?(output) ? IO.read(output) : result
87
87
  raise ScriptError.new(self, filename, path, errors)
88
88
  end
89
89
  end
@@ -47,7 +47,7 @@ SchemaEvolutionManager::Library.ensure_dir!(version_dir)
47
47
  SchemaEvolutionManager::Library.ensure_dir!(bin_dir)
48
48
 
49
49
  Dir.chdir(lib_dir) do
50
- if File.exists?("schema-evolution-manager")
50
+ if File.exist?("schema-evolution-manager")
51
51
  if File.symlink?("schema-evolution-manager")
52
52
  SchemaEvolutionManager::Library.system_or_error("rm schema-evolution-manager")
53
53
  SchemaEvolutionManager::Library.system_or_error("ln -s %s %s" % [version_name, 'schema-evolution-manager'])
@@ -89,7 +89,7 @@ end
89
89
 
90
90
  # Overrwrite bin/sem-config with proper location of lib dir
91
91
  init_file = File.join(version_dir, "bin/sem-config")
92
- SchemaEvolutionManager::Preconditions.check_state(File.exists?(init_file), "Init file[%s] not found" % init_file)
92
+ SchemaEvolutionManager::Preconditions.check_state(File.exist?(init_file), "Init file[%s] not found" % init_file)
93
93
  File.open(init_file, "w") do |out|
94
94
  out << "load File.join('%s')\n" % File.join(version_dir, 'lib/schema-evolution-manager.rb')
95
95
  end
@@ -91,7 +91,7 @@ module SchemaEvolutionManager
91
91
  end
92
92
 
93
93
  def Library.delete_file_if_exists(path)
94
- if File.exists?(path)
94
+ if File.exist?(path)
95
95
  FileUtils.rm_r(path)
96
96
  end
97
97
  end
@@ -48,7 +48,7 @@ module SchemaEvolutionManager
48
48
 
49
49
  def initialize(path)
50
50
  @path = path
51
- Preconditions.check_state(File.exists?(@path), "File[#{@path}] does not exist")
51
+ Preconditions.check_state(File.exist?(@path), "File[#{@path}] does not exist")
52
52
  @attribute_values = parse_attribute_values
53
53
  end
54
54
 
@@ -60,7 +60,7 @@ module SchemaEvolutionManager
60
60
  # Reads the current version (from the VERSION FILE), returning an
61
61
  # instance of the Version class
62
62
  def Version.read
63
- Preconditions.check_state(File.exists?(VERSION_FILE), "Version file at path[%s] not found" % VERSION_FILE)
63
+ Preconditions.check_state(File.exist?(VERSION_FILE), "Version file at path[%s] not found" % VERSION_FILE)
64
64
  version = IO.read(VERSION_FILE).strip
65
65
  Version.parse(version)
66
66
  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.46
4
+ version: 0.9.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bryzek
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-30 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: '["Michael Bryzek"]'
14
14
  email: mbryzek@alum.mit.edu