yle_tf 0.2.0 → 0.2.1

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
  SHA1:
3
- metadata.gz: dc3f6bcfcb30e2863c067ca306b13a834ec66444
4
- data.tar.gz: 3ba84a88565e830b0686f49532259fab3c466d82
3
+ metadata.gz: 89780c316c7e6aba53458bb71b37b8c050b41eca
4
+ data.tar.gz: '068f7d640747c7b3fb4d36d3e31878425dc3078a'
5
5
  SHA512:
6
- metadata.gz: d438544dfde60a06feb23f9c12ba19230c6892fdaeaa43bcf7aa3360f1d34469b65ec13fd8184b920ba6ec76602644e2f1583678f469bbac66f5116b13302f68
7
- data.tar.gz: 7a136fb090de4474ffd55e664d371374cd70dcab53dd6851f2c85ed6ce89364b5eb105e42c6131c5863d0894c7c990bc974566a227da31d92d6b5ff6159a66c5
6
+ metadata.gz: 55746eb13356d123a2d29db472425230f4bf1de9a41de21ab09ce2372b19c6b9be72ec97444ed3f7ab801a4e52335462ad933d328e58b10f183888a29bee0a48
7
+ data.tar.gz: 4161e0d3d3a127eed59e3266604b08ff069a6c52e97e90614568464213dab3636f9a05c29d5de67fbcc986ad310609a561838133a75fa2d263239794bfb0ed53
data/lib/yle_tf/cli.rb CHANGED
@@ -66,7 +66,7 @@ class YleTf
66
66
  end
67
67
 
68
68
  self.debug = true if @tf_options[:debug]
69
- YleTf::Logger.color = !@tf_options[:no_color]
69
+ YleTf::Logger.color = false if @tf_options[:no_color]
70
70
  end
71
71
 
72
72
  # Returns `Symbol` for the arg, e.g. `"--foo-bar"` -> `:foo_bar`
data/lib/yle_tf/logger.rb CHANGED
@@ -8,6 +8,10 @@ class YleTf
8
8
  # Prints to STDERR, so it does not mess with e.g. `terraform output`.
9
9
  module Logger
10
10
  LEVELS = %i[debug info warn error fatal].freeze
11
+ DEVICE = STDERR
12
+
13
+ # Default to colorful error messages on a TTY
14
+ @color = DEVICE.respond_to?(:tty?) && DEVICE.tty?
11
15
 
12
16
  class << self
13
17
  extend Forwardable
@@ -16,7 +20,7 @@ class YleTf
16
20
  end
17
21
 
18
22
  def self.logger
19
- @logger ||= ::Logger.new(STDERR).tap do |logger|
23
+ @logger ||= ::Logger.new(DEVICE).tap do |logger|
20
24
  patch_for_old_ruby(logger)
21
25
  logger.level = log_level
22
26
  logger.formatter = log_formatter
@@ -21,7 +21,7 @@ class YleTf
21
21
  def self.load_bundler_plugins
22
22
  return if !bundler_set_up?
23
23
 
24
- Logger.debug { print_bundler_plugin_list }
24
+ print_bundler_plugin_list if Logger.debug?
25
25
  Bundler.require(BUNDLER_PLUGIN_GROUP)
26
26
  end
27
27
 
@@ -1,3 +1,3 @@
1
1
  class YleTf
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.1'.freeze
3
3
  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: 0.2.0
4
+ version: 0.2.1
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: 2017-09-18 00:00:00.000000000 Z
13
+ date: 2017-09-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler