process_settings 0.12.0 → 0.13.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/combine_process_settings +21 -1
- data/lib/process_settings/testing/helpers.rb +7 -8
- data/lib/process_settings/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a93ffd2546ada2c2794eb403f89339324d4086c3075fd0454b36bbb351c95506
|
4
|
+
data.tar.gz: 4ffafc1e201ad9e82abda0241d304d0832098270522dc76e92d364fb5f21c924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f8491c6fdc5e5161a7a14f57c0a8f5a040bc471119336f33d26677413a056b96244f737a87f98b555a91febada1f67a74feb3daabb669f308a0a24db275e4d3
|
7
|
+
data.tar.gz: f92777b0129ba9bf468b533afc99a7180cf9ace6e47109ea280b0ef92ad77e4882bbf0a8d5fe94d9e6d47b070fa4e98a978139c2355d3c958af4ad886f71880a
|
@@ -75,18 +75,38 @@ 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 warn_if_old_libyaml_version
|
81
|
+
if Gem::Version.new(Psych::LIBYAML_VERSION) < Gem::Version.new(MINIMUM_LIBYAML_VERSION)
|
82
|
+
warn <<~EOS
|
83
|
+
|
84
|
+
#{PROGRAM_NAME} warning: libyaml version #{Psych::LIBYAML_VERSION} is out of date; it should be at least #{MINIMUM_LIBYAML_VERSION}. On a Mac, 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
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
|
78
96
|
#
|
79
97
|
# main
|
80
98
|
#
|
81
99
|
|
82
100
|
options = parse_options(ARGV.dup)
|
83
101
|
|
102
|
+
warn_if_old_libyaml_version
|
103
|
+
|
84
104
|
combined_settings = read_and_combine_settings(Pathname.new(options.root_folder) + SETTINGS_FOLDER)
|
85
105
|
|
86
106
|
version_number = options.version || default_version_number(options.initial_filename)
|
87
107
|
combined_settings << end_marker(version_number)
|
88
108
|
|
89
|
-
yaml = combined_settings.to_yaml.gsub(/: $/,
|
109
|
+
yaml = combined_settings.to_yaml.gsub(/: $/, ':') # libyaml before 0.2.5 wrote trailing space for nil
|
90
110
|
yaml_with_warning_comment = add_warning_comment(yaml, options.root_folder, PROGRAM_NAME, SETTINGS_FOLDER)
|
91
111
|
|
92
112
|
output_filename = options.output_filename
|
@@ -11,15 +11,14 @@ module ProcessSettings
|
|
11
11
|
module Helpers
|
12
12
|
class << self
|
13
13
|
def included(including_klass)
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
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.
|
4
|
+
version: 0.13.3
|
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: '0'
|
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: []
|