yle_tf 1.1.0.rc1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/yle_tf/config/migration.rb +9 -2
- data/lib/yle_tf/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb4e7fc05d7f0f0d5c7f2a268d8fc35e89b9b188ad791bb0b40073ced1c99bd3
|
4
|
+
data.tar.gz: b04514a89cbf3b88da4d36c2bc1a896c2801e2bdd0c68e87df6a43a967ba1e86
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1cb5d2a5c7cf0dc68ff19ff89f925542a251439d9a9c99458e003c867ba7421cfb0ec94e59c3ea027ac2a8f981a86d6cb60aca9ec754f6b7e9a9d0278efd4747
|
7
|
+
data.tar.gz: 3f8289688e55497d80ab25e16cbefd13ad830f378d17c829af8cb28188d34096f25a296f91ea219ff8f84dba3828f295e87d4811758821e40f0d44110553ef4f
|
@@ -42,7 +42,14 @@ class YleTf
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def migrated_config
|
45
|
-
migrate_old_backend_config
|
45
|
+
migrate_old_backend_config(&deprecation_warning)
|
46
|
+
end
|
47
|
+
|
48
|
+
# Returns a `Proc` to print deprecation warnings unless denied by an env var
|
49
|
+
def deprecation_warning
|
50
|
+
return nil if ENV['TF_OLD_CONFIG_WARNINGS'] == 'false'
|
51
|
+
|
52
|
+
->(new_config) do
|
46
53
|
Logger.warn("Old configuration found in #{config_source}")
|
47
54
|
Logger.warn("Please migrate to relevant parts of:\n" \
|
48
55
|
"#{sanitize_config(new_config)}")
|
@@ -60,7 +67,7 @@ class YleTf
|
|
60
67
|
migrate_old_backend_config_keys(prev_config, type, keys) { changed = true }
|
61
68
|
end
|
62
69
|
|
63
|
-
yield(new_config) if changed
|
70
|
+
yield(new_config) if changed && block_given?
|
64
71
|
|
65
72
|
new_config
|
66
73
|
end
|
data/lib/yle_tf/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yle_tf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yleisradio
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-01-
|
13
|
+
date: 2019-01-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -164,9 +164,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '2.3'
|
165
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
166
166
|
requirements:
|
167
|
-
- - "
|
167
|
+
- - ">="
|
168
168
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
169
|
+
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubygems_version: 3.0.1
|
172
172
|
signing_key:
|