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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8203ca939d1933be0bb2aae8ba26d4a7a8b385fce0f65c52f4d707cf6260f323
4
- data.tar.gz: 0e518cdaa2a4ecbdb76dae38b86b4f31a178e345c0e16fb10f469d1df8f950ab
3
+ metadata.gz: eb4e7fc05d7f0f0d5c7f2a268d8fc35e89b9b188ad791bb0b40073ced1c99bd3
4
+ data.tar.gz: b04514a89cbf3b88da4d36c2bc1a896c2801e2bdd0c68e87df6a43a967ba1e86
5
5
  SHA512:
6
- metadata.gz: 9127c39276c80009aa7d233f7398ec0ee2ea2784eac1d9fc460c245c5f654fb36a910d4c52bd3453cd9db19595d207f4f545de2aa408e1866cb84b9a534d3cd8
7
- data.tar.gz: 5c851247db9645aeef3711baa47f40ff682b21ae7030ae1a8a90b3acb6eb70dbb70a8a3f044f92b7d235f87f678a8919cc563368861042fa8c82ed48bf843997
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 do |new_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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class YleTf
4
- VERSION = '1.1.0.rc1'
4
+ VERSION = '1.1.0'
5
5
  end
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.rc1
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-01 00:00:00.000000000 Z
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: 1.3.1
169
+ version: '0'
170
170
  requirements: []
171
171
  rubygems_version: 3.0.1
172
172
  signing_key: