squasher 0.7.0 → 0.7.1
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 +4 -4
- data/lib/squasher/config.rb +4 -4
- data/lib/squasher/version.rb +1 -1
- data/spec/lib/config_spec.rb +1 -1
- data/spec/lib/worker_spec.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c3cc21150f68603733fa84c85d9a50c6d9b08ea34f7c5724341c3b116db2274
|
4
|
+
data.tar.gz: 13d90d21f1d5770b31ed3d334535e94334e1939cb78ca48d61482aa4d312a65c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49013a339324ae6f10fcc30e39c140d989b7fa9a7a208442f46ba70cea1be57792c990972fd9cd9448b33d35b8cbd17a37945276d7472e9c5da86d1868ceed8b
|
7
|
+
data.tar.gz: 14727bb5d71d889d728fee2458479d50a5a1a4a000b4e8b7eabe6cdfca1a672251f6cfd026ad8e52666d2fe066cf80e8ba567274df697927e0847ec090e74548
|
data/lib/squasher/config.rb
CHANGED
@@ -81,7 +81,7 @@ module Squasher
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def migrations_folder?
|
84
|
-
Dir.
|
84
|
+
Dir.exist?(migrations_folder)
|
85
85
|
end
|
86
86
|
|
87
87
|
def dbconfig?
|
@@ -93,7 +93,7 @@ module Squasher
|
|
93
93
|
|
94
94
|
list = [dbconfig_file, schema_file]
|
95
95
|
list.each do |file|
|
96
|
-
next unless File.
|
96
|
+
next unless File.exist?(file)
|
97
97
|
FileUtils.mv file, "#{ file }.sq"
|
98
98
|
end
|
99
99
|
|
@@ -103,7 +103,7 @@ module Squasher
|
|
103
103
|
|
104
104
|
ensure
|
105
105
|
list.each do |file|
|
106
|
-
next unless File.
|
106
|
+
next unless File.exist?("#{ file }.sq")
|
107
107
|
FileUtils.mv "#{ file }.sq", file
|
108
108
|
end
|
109
109
|
end
|
@@ -118,7 +118,7 @@ module Squasher
|
|
118
118
|
|
119
119
|
def dbconfig
|
120
120
|
return @dbconfig if defined?(@dbconfig)
|
121
|
-
return @dbconfig = nil unless File.
|
121
|
+
return @dbconfig = nil unless File.exist?(dbconfig_file)
|
122
122
|
|
123
123
|
@dbconfig = nil
|
124
124
|
|
data/lib/squasher/version.rb
CHANGED
data/spec/lib/config_spec.rb
CHANGED
data/spec/lib/worker_spec.rb
CHANGED
@@ -42,7 +42,7 @@ describe Squasher::Worker do
|
|
42
42
|
|
43
43
|
worker.process
|
44
44
|
|
45
|
-
expect(File.
|
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.
|
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.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergey Pchelintsev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|