squasher 0.7.0 → 0.7.2

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: b1881315f750432477c45c63915b6118af4f165ba9c00fcf2b253d34d14bf49d
4
- data.tar.gz: 22a3270dafb3aafae0b4eabe0720cb069a2aef9718f30150953295bdcd36084b
3
+ metadata.gz: d58b6246f12c84f3e639e620a90d461314bf5d0b8e452d812b4e3ed2e845baae
4
+ data.tar.gz: 720447fa89a2a8c64f12ab1d0c73b21a71e5e920ad95f6656aa3dd193fc59399
5
5
  SHA512:
6
- metadata.gz: 54a095db328fdbf39dac24d7d509271a14e7765d313b36fccdfefc43d6a20d5eb36659884ed90b6fec0fcc901f10182c8ded4bb33bcc37835674107e28a81a93
7
- data.tar.gz: 722b7b612648974304e842405b980f628d2939aa8816d918fda4bc0c2ea27209e9ed5dab769d909bbfcc9f825cdae276527c9db90593a33bc742715daca57229
6
+ metadata.gz: 0bac4b5782dfd94e7f008321f4473b5e7d7bfdf90bf16afbbc777c892223df991d6b9e4cc6a571cf9b6b05203407b395baa217f214a0a20ba04dc6a85ab8d5dd
7
+ data.tar.gz: 6bd32f9b1fde3da1a34cfdada1898813f0ce3a5db191dcbdf5e48189fe7e86ba3907df40c500be087266226147cb66e6bd58f62a6e60b616ae750143c5aa24e0
data/.travis.yml CHANGED
@@ -4,9 +4,10 @@ cache: bundler
4
4
  language: ruby
5
5
  rvm:
6
6
  - ruby-head
7
- - 2.3
8
- - 2.2
9
- - 2.1
10
- - 2.0
7
+ - 3.1
8
+ - 3.0
9
+ - 2.7
10
+ - 2.6
11
+ - 2.5
11
12
  notifications:
12
13
  email: false
@@ -9,8 +9,9 @@ module Squasher
9
9
 
10
10
  def process(path)
11
11
  @error = false
12
-
13
- str = YAML.load(ERB.new(File.read(path)).result(binding))
12
+ # Support for Psych 4 (the default yaml parser for Ruby 3.1)
13
+ opts = Gem::Version.new(Psych::VERSION).segments.first < 4 ? {} : { aliases: true }
14
+ str = YAML.load(ERB.new(File.read(path)).result(binding), **opts)
14
15
  [str, @error]
15
16
  end
16
17
 
@@ -81,7 +82,7 @@ module Squasher
81
82
  end
82
83
 
83
84
  def migrations_folder?
84
- Dir.exists?(migrations_folder)
85
+ Dir.exist?(migrations_folder)
85
86
  end
86
87
 
87
88
  def dbconfig?
@@ -93,7 +94,7 @@ module Squasher
93
94
 
94
95
  list = [dbconfig_file, schema_file]
95
96
  list.each do |file|
96
- next unless File.exists?(file)
97
+ next unless File.exist?(file)
97
98
  FileUtils.mv file, "#{ file }.sq"
98
99
  end
99
100
 
@@ -103,7 +104,7 @@ module Squasher
103
104
 
104
105
  ensure
105
106
  list.each do |file|
106
- next unless File.exists?("#{ file }.sq")
107
+ next unless File.exist?("#{ file }.sq")
107
108
  FileUtils.mv "#{ file }.sq", file
108
109
  end
109
110
  end
@@ -118,7 +119,7 @@ module Squasher
118
119
 
119
120
  def dbconfig
120
121
  return @dbconfig if defined?(@dbconfig)
121
- return @dbconfig = nil unless File.exists?(dbconfig_file)
122
+ return @dbconfig = nil unless File.exist?(dbconfig_file)
122
123
 
123
124
  @dbconfig = nil
124
125
 
@@ -1,3 +1,3 @@
1
1
  module Squasher
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.2"
3
3
  end
@@ -64,7 +64,7 @@ describe Squasher::Config do
64
64
  end
65
65
 
66
66
  def file_exists?(*parts)
67
- File.exists?(File.join(fake_root, *parts))
67
+ File.exist?(File.join(fake_root, *parts))
68
68
  end
69
69
  end
70
70
 
@@ -42,7 +42,7 @@ describe Squasher::Worker do
42
42
 
43
43
  worker.process
44
44
 
45
- expect(File.exists?(new_migration_path)).to be_truthy
45
+ expect(File.exist?(new_migration_path)).to be_truthy
46
46
  File.open(new_migration_path) do |stream|
47
47
  content = stream.read
48
48
  expect(content).to include("InitSchema")
@@ -69,7 +69,7 @@ describe Squasher::Worker do
69
69
  expect(Squasher).to receive(:ask).with(:apply_clean).and_return(false)
70
70
  worker.process
71
71
 
72
- expect(File.exists?(new_migration_path)).to be_truthy
72
+ expect(File.exist?(new_migration_path)).to be_truthy
73
73
  File.open(new_migration_path) do |stream|
74
74
  content = stream.read
75
75
  expect(content.strip).to eq(%q{
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squasher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Pchelintsev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-15 00:00:00.000000000 Z
11
+ date: 2023-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
- rubygems_version: 3.2.32
114
+ rubygems_version: 3.3.7
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: Squash your old migrations