howzit 2.0.7 → 2.0.8

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: 8ad8cdc085654826428d432429473e7b12375288058f3c0ce993f94937441485
4
- data.tar.gz: 8dfda4d862d35559b0cd9a1e89c4a69597aa16ef9dba5dac29eff1ee61ed295a
3
+ metadata.gz: a199c0d74513fee2be1dcd71390927d7776cecf50bd6b075504f9ed82fc548b0
4
+ data.tar.gz: d3668793cf618dc1d785cab3a7c87b93c3f5cc4edc546ab20b0c10de8986f7a1
5
5
  SHA512:
6
- metadata.gz: 9ec8eea72d9177717e0ed6dcd07c35d9eb12f998dabea1347efae1dca1fc145a8c5e4b8317f1cf4805606a86209e389643c959aa60deb240ebd2808ddbe456f4
7
- data.tar.gz: a9f3e5472866af519bc053ab50ef3f6a5089ddc4334e9687cb64dd9a8e026d00a0b2bb12d1246631f209892de9bb03168cb05cbaa852d97c44734395b00b122b
6
+ metadata.gz: cdc109a75df7f9757c3870092b3d3550dba228d4ddc9ff0d58befc5cb1174676808f4a29c8e0805b3e5150bf2c425b8f1d5ccebef226b6fffc96085562094f07
7
+ data.tar.gz: 394947ec4f9a437af899a4806e2daa60a1ffbd040785ff249dffe258030e88426a594a0b1afbea413839a72173daaf4cfbda4ef8643049296627c7928677fd68
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ### 2.0.8
2
+
3
+ 2022-08-04 13:28
4
+
5
+ #### FIXED
6
+
7
+ - Bugfixes
8
+
1
9
  ### 2.0.7
2
10
 
3
11
  2022-08-04 13:04
data/lib/howzit/config.rb CHANGED
@@ -22,14 +22,27 @@ module Howzit
22
22
  wrap: 0
23
23
  }.deep_freeze
24
24
 
25
+ ##
26
+ ## Initialize a config object
27
+ ##
25
28
  def initialize
26
29
  load_options
27
30
  end
28
31
 
32
+ ##
33
+ ## Write a config to a file
34
+ ##
35
+ ## @param config The configuration
36
+ ##
29
37
  def write_config(config)
30
38
  File.open(config_file, 'w') { |f| f.puts config.to_yaml }
31
39
  end
32
40
 
41
+ ##
42
+ ## Test if a file should be ignored based on YAML file
43
+ ##
44
+ ## @param filename The filename to test
45
+ ##
33
46
  def should_ignore(filename)
34
47
  return false unless File.exist?(ignore_file)
35
48
 
@@ -47,10 +60,18 @@ module Howzit
47
60
  ignore
48
61
  end
49
62
 
63
+ ##
64
+ ## Find the template folder
65
+ ##
66
+ ## @return [String] path to template folder
67
+ ##
50
68
  def template_folder
51
69
  File.join(config_dir, 'templates')
52
70
  end
53
71
 
72
+ ##
73
+ ## Initiate the editor for the config
74
+ ##
54
75
  def editor
55
76
  edit_config(DEFAULTS)
56
77
  end
@@ -91,12 +112,12 @@ module Howzit
91
112
 
92
113
  def create_config(d)
93
114
  unless File.directory?(config_dir)
94
- Howzit.console.info "Creating config directory at #{config_dir}"
115
+ Howzit::ConsoleLogger.new(1).info "Creating config directory at #{config_dir}"
95
116
  FileUtils.mkdir_p(config_dir)
96
117
  end
97
118
 
98
119
  unless File.exist?(config_file)
99
- Howzit.console.info "Writing fresh config file to #{config_file}"
120
+ Howzit::ConsoleLogger.new(1).info "Writing fresh config file to #{config_file}"
100
121
  write_config(d)
101
122
  end
102
123
  config_file
@@ -13,7 +13,7 @@ module Howzit
13
13
  attr_accessor :log_level
14
14
 
15
15
  def initialize(level = nil)
16
- @log_level = level || Howzit.options[:log_level]
16
+ @log_level = level.to_i || Howzit.options[:log_level]
17
17
  end
18
18
 
19
19
  def reset_level
@@ -3,5 +3,5 @@
3
3
  # Primary module for this gem.
4
4
  module Howzit
5
5
  # Current Howzit version.
6
- VERSION = '2.0.7'
6
+ VERSION = '2.0.8'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howzit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.7
4
+ version: 2.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra