migration_signature 0.1.0 → 0.2.0

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: 21b9a40066ce68440305cfca161d1f774d80be846ea19ea2938df5612e7c32cc
4
- data.tar.gz: 03713b084e7381e46b17bcbfd67a7f3ca8647a1b8ef363d7a9862d40e999c3f7
3
+ metadata.gz: 2aa4f1083e48de2aaa45a2639d9d8729856744028729cfe7d44dbd915e124931
4
+ data.tar.gz: 93a74936010c03f4a0b8457c712818bd9ca639be9dd4d2388b05dfbcbd9f5c75
5
5
  SHA512:
6
- metadata.gz: ac6c41cbc16270c4823ff650bfc6b71310bfbf35fc87755fd8acfff2dac71433bec24cd57978f38b4d4a9100ceeff8785c0107f3617c0e0edd1430e9857dd015
7
- data.tar.gz: 7db7de487a64a60bb53a815d6b00b05690a2673178d9d02c7487a0157a00d695c5b1cba2d574f83dae0d37b08392d7e3ed87beb39f96f8b629e5f3463819ed10
6
+ metadata.gz: 972796d9e80b429fde40c72dda06ab77d519f3559b23c0a6d14602b90f88382b3eb3c5fc2b64626b3140d18d9d96a3d30f0001eabdb748c3ec7645cd413f8cfa
7
+ data.tar.gz: 70d28e646946b9004a1f60d69d00f2fc83363963c589e062ac47ff38a31df39f5f016ec7678a17cb827c7693bea152249dd38127b60fc6c086b5c33ded68df54
@@ -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 = YAML.safe_load(File.read(CONFIG_FILE_PATH), [Regexp]) || {}
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
@@ -32,7 +32,7 @@ module MigrationSignature
32
32
  unless signature?
33
33
  new_lines.unshift("\n")
34
34
  # add blank line between magic comments and content
35
- if !new_lines[1].empty? && !new_lines[2].start_with?('#')
35
+ if !new_lines[1].empty? && !new_lines[1].start_with?('#')
36
36
  new_lines.unshift("\n")
37
37
  end
38
38
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MigrationSignature
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
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.1.0
4
+ version: 0.2.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: 2019-06-21 00:00:00.000000000 Z
11
+ date: 2023-08-03 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
- rubyforge_project:
92
- rubygems_version: 2.7.9
93
- signing_key:
91
+ rubygems_version: 3.4.1
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.