process_settings 0.11.1.pre.1 → 0.13.3.pre.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 074a7a2fc453de9cd6f46546ebe6040c61ebc2532df5bcfa07cb6841b70ef793
4
- data.tar.gz: 01b1658b4a8d7cef95367cc91685c544417fac81633a736cbab87d791dda17ba
3
+ metadata.gz: 5deb78cad7b19dfbdf5690d0c141a99281b9acb76d83afb1b3a3c4462d9be0d1
4
+ data.tar.gz: 195cd80b52702c33e97533447022148a33d7c03e6c7525654d86bf71298a45c1
5
5
  SHA512:
6
- metadata.gz: 0025db7a10cc0157579a3bb3890b092626f613e01da5dd132e9017e634393b7fa15eb724070be939fe17e37816df08c43585dbdecf37f0437fd5b25261dc3874
7
- data.tar.gz: c517c8d7e7d96f17e1fb1de6e0484793cbc9e9ae32add2238b48fae6b4619cb862e03ba7d3786490134acf1226f41db2b4bf204b4862010e51d5a1fc5c16e26f
6
+ metadata.gz: 43e042004e010c603b3bb63c55ab9e00dd7ef52809ecf5c7da7abac83a5a82c9ec6f15de118c051f737ba1aaeb0990bb8111cf6c1f31ceabcfc60c2c78f3f520
7
+ data.tar.gz: 2adf52ea2cd89a9d675aee0304b0cc5bdadae7ceabe3b5093d88830f20f70f4ecb61f720f34c5e5f97fad46a7bb9339ff0e3c4e076435e744d5d8cac97be2f5f
@@ -75,12 +75,34 @@ def add_warning_comment(yaml, root_folder, program_name, settings_folder)
75
75
  yaml.sub("\n", "\n" + warning_comment)
76
76
  end
77
77
 
78
+ MINIMUM_LIBYAML_VERSION = '0.2.5' # So that null (nil) values don't have trailing spaces.
79
+
80
+ def check_libyaml_version
81
+ if Gem::Version.new(Psych::LIBYAML_VERSION) < Gem::Version.new(MINIMUM_LIBYAML_VERSION)
82
+ warn <<~EOS
83
+
84
+ #{PROGRAM_NAME} error: libyaml version #{Psych::LIBYAML_VERSION} must be at least #{MINIMUM_LIBYAML_VERSION}. Try:
85
+
86
+ brew update && brew upgrade libyaml
87
+
88
+ You may also need:
89
+
90
+ gem install psych -- --enable-bundled-libyaml
91
+ EOS
92
+
93
+ exit(1)
94
+ end
95
+ end
96
+
97
+
78
98
  #
79
99
  # main
80
100
  #
81
101
 
82
102
  options = parse_options(ARGV.dup)
83
103
 
104
+ check_libyaml_version
105
+
84
106
  combined_settings = read_and_combine_settings(Pathname.new(options.root_folder) + SETTINGS_FOLDER)
85
107
 
86
108
  version_number = options.version || default_version_number(options.initial_filename)
@@ -11,15 +11,14 @@ module ProcessSettings
11
11
  module Helpers
12
12
  class << self
13
13
  def included(including_klass)
14
- after_method =
15
- if including_klass.respond_to?(:after)
16
- :after
17
- else
18
- :teardown
14
+ if including_klass.respond_to?(:after) # rspec
15
+ including_klass.after do
16
+ ProcessSettings.instance = initial_instance
17
+ end
18
+ else # minitest
19
+ including_klass.define_method(:teardown) do
20
+ ProcessSettings.instance = initial_instance
19
21
  end
20
-
21
- including_klass.send(after_method) do
22
- ProcessSettings.instance = initial_instance
23
22
  end
24
23
  end
25
24
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProcessSettings
4
- VERSION = '0.11.1.pre.1'
4
+ VERSION = '0.13.3.pre.1'
5
5
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: process_settings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1.pre.1
4
+ version: 0.13.3.pre.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Invoca
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2019-09-19 00:00:00.000000000 Z
@@ -58,6 +58,20 @@ dependencies:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
60
  version: '3.0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: psych
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '3.2'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '3.2'
61
75
  description: Targeted process settings that dynamically reload without restarting
62
76
  the process
63
77
  email: development+ps@invoca.com
@@ -97,7 +111,7 @@ licenses:
97
111
  metadata:
98
112
  source_code_uri: https://github.com/Invoca/process_settings
99
113
  allowed_push_host: https://rubygems.org
100
- post_install_message:
114
+ post_install_message:
101
115
  rdoc_options: []
102
116
  require_paths:
103
117
  - lib
@@ -113,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
127
  version: 1.3.1
114
128
  requirements: []
115
129
  rubygems_version: 3.0.3
116
- signing_key:
130
+ signing_key:
117
131
  specification_version: 4
118
132
  summary: Dynamic process settings
119
133
  test_files: []