migration_signature 0.1.1 → 0.3.0
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/exe/migration_signature +3 -16
- data/lib/migration_signature/config.rb +5 -1
- data/lib/migration_signature/version.rb +1 -1
- data/lib/migration_signature.rb +0 -6
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 266b77979d8a37706f7fd4f202859e870bd363b16aee9284cfa8b182985de8c4
|
4
|
+
data.tar.gz: a803a8e480466956a85ac4e84e557f9f6a4490df989d0ff8d50b794a5ad0a2a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c72aeec8544c98ed8127e50b37272cd130b042380a0f044116eb8c2f3c17b6191deaa0cdc647b813370741ca75184983d7d223c7858f3d7c7bc086a2e3afdf81
|
7
|
+
data.tar.gz: c3d35d3f056fe8c3556cdb81660352d93606c9238af2bb6e601ce9234e9c003839c2d75613277aa954516055f4a3f9376717264cb7e831a24e1a938ff7252be2
|
data/exe/migration_signature
CHANGED
@@ -6,11 +6,9 @@ require 'optparse'
|
|
6
6
|
|
7
7
|
OptionParser.new do |parser|
|
8
8
|
parser.banner = <<~BANNER
|
9
|
-
Usage: migration_signature {check
|
9
|
+
Usage: migration_signature {check}
|
10
10
|
|
11
11
|
check - Check all your migration files for present and correct migration signatures
|
12
|
-
buildall - Rebuild all migration signatures for all files (should only be used in setup)
|
13
|
-
build <file> - Rebuild a migration signature for a single migration
|
14
12
|
|
15
13
|
BANNER
|
16
14
|
|
@@ -22,7 +20,7 @@ end.parse!
|
|
22
20
|
|
23
21
|
action = ARGV[0]
|
24
22
|
unless action
|
25
|
-
warn 'You must supply one of {check
|
23
|
+
warn 'You must supply one of {check}'
|
26
24
|
exit 1
|
27
25
|
end
|
28
26
|
|
@@ -33,18 +31,7 @@ if action == 'check'
|
|
33
31
|
warn e.message
|
34
32
|
exit 1
|
35
33
|
end
|
36
|
-
elsif action == 'buildall'
|
37
|
-
MigrationSignature.build_all
|
38
|
-
elsif action == 'build'
|
39
|
-
file = ARGV[1]
|
40
|
-
|
41
|
-
unless file
|
42
|
-
warn 'You must supply a file to build a signature for'
|
43
|
-
exit 1
|
44
|
-
end
|
45
|
-
|
46
|
-
MigrationSignature.build_file(file)
|
47
34
|
else
|
48
|
-
warn 'You must supply one of {check
|
35
|
+
warn 'You must supply one of {check}'
|
49
36
|
exit 1
|
50
37
|
end
|
@@ -14,7 +14,11 @@ module MigrationSignature
|
|
14
14
|
return new(DEFAULTS) unless File.exist?(CONFIG_FILE_PATH)
|
15
15
|
|
16
16
|
require 'yaml'
|
17
|
-
hash =
|
17
|
+
hash = if Gem::Version.new(Psych::VERSION) >= Gem::Version.new("4.0.0")
|
18
|
+
YAML.safe_load(File.read(CONFIG_FILE_PATH), permitted_classes: [Regexp])
|
19
|
+
else
|
20
|
+
YAML.safe_load(File.read(CONFIG_FILE_PATH), [Regexp])
|
21
|
+
end || {}
|
18
22
|
|
19
23
|
new(DEFAULTS.merge(hash))
|
20
24
|
end
|
data/lib/migration_signature.rb
CHANGED
@@ -21,12 +21,6 @@ module MigrationSignature
|
|
21
21
|
true
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.build_all
|
25
|
-
config.all_runnable_files.each do |path|
|
26
|
-
MigrationSignature::MigrationFile.new(path).update_signature!
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
24
|
def self.build_file(file)
|
31
25
|
mf = MigrationSignature::MigrationFile.new(file)
|
32
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: migration_signature
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Allie
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -73,7 +73,7 @@ homepage: https://github.com/TandaHQ/migration_signature
|
|
73
73
|
licenses:
|
74
74
|
- MIT
|
75
75
|
metadata: {}
|
76
|
-
post_install_message:
|
76
|
+
post_install_message:
|
77
77
|
rdoc_options: []
|
78
78
|
require_paths:
|
79
79
|
- lib
|
@@ -88,9 +88,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0'
|
90
90
|
requirements: []
|
91
|
-
|
92
|
-
|
93
|
-
signing_key:
|
91
|
+
rubygems_version: 3.4.10
|
92
|
+
signing_key:
|
94
93
|
specification_version: 4
|
95
94
|
summary: Generate signatures for migration files when they are run and check them
|
96
95
|
in CI.
|