cliutils 1.0.5 → 1.0.6

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: ca5b15c24edde2e480643aa5000e91a68943f766
4
- data.tar.gz: d283212ce924d7ece2287cea5f9dc32c3afb15f6
3
+ metadata.gz: 8839468d53bb07c10d7e1d3bbda3fce0d65d9f4c
4
+ data.tar.gz: 7bea2c8039d87cbb73660649f42350501a84efe6
5
5
  SHA512:
6
- metadata.gz: a5b85729adf2be08e8855619f406dd68a2671292a0c90b2f8afab1669096929bf8a45a7ea54e0637ac299d4d59542be50b07bc5dfea22c0446969a305147bbcd
7
- data.tar.gz: 74445a9470d3f3a226f15af32a678c4abfbd832b0ac7258c7e0d70278ca60bc3e38cb17797c6e253e939c5cecf7ee7e874d74772168f97dcff6dc601688681b2
6
+ metadata.gz: 67a30a0cc57dbc88a773262a2ac543424b1ff1dd7952bf7ecf7419e2c93a74fce2cb8d6a1b8aa45bfb1b11f801f336bf0c646d5b871e31cb0dc71730cca4cf61
7
+ data.tar.gz: c10b1b10d0f32a72a389a513727c3c9e1c3da504fd3981a1896dfce648d0b3d036e6c46cc86e8216204663523dca8dfbae93e8ed5db94219c05e62af2c997e38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cliutils (1.0.5)
4
+ cliutils (1.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.6 (2014-03-30)
2
+
3
+ * Added convenience logging constant to Configuration
4
+
1
5
  # 1.0.5 (2014-03-30)
2
6
 
3
7
  * Fixed a bug with Configuration singleton
@@ -5,6 +5,15 @@ module CLIUtils
5
5
  # Manages any configuration values and the flat YAML file
6
6
  # into which they get stored.
7
7
  module Configuration
8
+ # Allows easy access to Logger levels.
9
+ LOG_LEVELS = {
10
+ 'DEBUG' => Logger::DEBUG,
11
+ 'INFO' => Logger::INFO,
12
+ 'WARN' => Logger::WARN,
13
+ 'ERROR' => Logger::ERROR,
14
+ 'FATAL' => Logger::FATAL,
15
+ }
16
+
8
17
  # Hook that triggers when this module is included.
9
18
  # @param [Object] k The includer object
10
19
  # @return [void]
@@ -5,7 +5,13 @@ module CLIUtils
5
5
  # Manages any configuration values and the flat YAML file
6
6
  # into which they get stored.
7
7
  class Configurator
8
- attr_reader :config_path, :data
8
+ # Stores the path to the configuration file.
9
+ # @return [String]
10
+ attr_reader :config_path
11
+
12
+ # Stores the configuration data itself.
13
+ # @return [Hash]
14
+ attr_reader :data
9
15
 
10
16
  # Initializes configuration from a flat file.
11
17
  # @param [String] path The filepath to the config YAML
@@ -3,6 +3,8 @@ module CLIUtils
3
3
  # Delegates certain Logger methods to a number of different
4
4
  # targets.
5
5
  class LoggerDelegator
6
+ # The endpoints to which delegation occurs.
7
+ # @return [Array]
6
8
  attr_reader :targets
7
9
 
8
10
  # Initializes and creates methods for the passed targets.
@@ -5,7 +5,17 @@ module CLIUtils
5
5
  # those to a user via a prompt, and collect the results.
6
6
  class Prefs
7
7
  include PrettyIO
8
- attr_reader :answers, :config_path, :prompts
8
+ # Stores answers to prompt questions.
9
+ # @return [Hash]
10
+ attr_reader :answers
11
+
12
+ # Stores the filepath (if it exists) to the prefs file.
13
+ # @return [String]
14
+ attr_reader :config_path
15
+
16
+ # Stores answers to prompt questions.
17
+ # @return [Hash]
18
+ attr_reader :prompts
9
19
 
10
20
  # Reads prompt data from and stores it.
11
21
  # @param [<String, Hash, Array>] data Filepath to YAML, Hash, or Array
@@ -12,7 +12,12 @@ module CLIUtils
12
12
  module PrettyIO
13
13
 
14
14
  class << self
15
+ # Determines whether wrapping should be enabled.
16
+ # @return [Boolean]
15
17
  attr_accessor :wrap
18
+
19
+ # Determines when strings should begin to wrap
20
+ # @return [Integer]
16
21
  attr_accessor :wrap_char_limit
17
22
  end
18
23
 
@@ -1,4 +1,4 @@
1
1
  module CLIUtils
2
2
  # The current version of the gem
3
- VERSION = "1.0.5"
3
+ VERSION = "1.0.6"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cliutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bach