cliutils 2.1.0 → 2.1.1

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
  SHA1:
3
- metadata.gz: 2853602f0ebaccd9bcfe4b6b1372d6fced7bf18b
4
- data.tar.gz: 794dd1a40731aba8a6e7f1e3a41eb6aa43fc6818
3
+ metadata.gz: 68db9f1432d7c3406a8e3e0d8da2b36ebb3f9ca2
4
+ data.tar.gz: 6f94550ad158c2fe248ce3a96d55c79b10205858
5
5
  SHA512:
6
- metadata.gz: 156f2abebd0cf0f60b36d978604c08980ceba30f6f071ade567a82bc637d83a38627c9e37df30176d89d0f4f156caf1ea32b62f3b9e7fac17952d4083b59d84c
7
- data.tar.gz: a434896e1b247f2c283b47aa05b0698fa2f1dd7dcceb0d7b423e2f4c9329b4c634398a7bd9d419622a44867f3feec934be3c9fa5edcbbdba3f3d8763e73e68f0
6
+ metadata.gz: 0f4cdd934a27ce5806633a2d6a4949e7f6d60a6f1bf60563952cc602035cee1609443a445844b1923b882163795dfab6ce306503ea8ada5d7b11654b048697b9
7
+ data.tar.gz: f00af86450a6e7d39bb695c926ddb7005b23f28ebe90ff3983f619b0eaed384bc699b449a85675bab7cc4e561ec4ce88824ace3b90ce37a80e81f40b1f49a1ae
data/HISTORY.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 2.1.1 (2014-04-26)
2
+
3
+ * Fixed a bug in which older Ruby versions wouldn't load Pref assets correctly
4
+
1
5
  # 2.1.0 (2014-04-20)
2
6
 
3
7
  * Added ability to register/deregister Pref Actions
data/README.md CHANGED
@@ -31,6 +31,15 @@ CLIUtils offers:
31
31
  * [Wiki](https://github.com/bachya/cliutils/wiki "CLIUtils Wiki")
32
32
  * [YARD documentation](http://rubydoc.info/github/bachya/cliutils/master/frames "YARD Documentation")
33
33
 
34
+ # Compatibility
35
+
36
+ CLIUtils is certified against the following:
37
+
38
+ * Ruby 2.1.0
39
+ * Ruby 2.0.0
40
+ * Ruby 1.9.3
41
+ * jruby-19mode
42
+
34
43
  # Installation
35
44
 
36
45
  Add this line to your application's Gemfile:
@@ -8,5 +8,5 @@ module CLIUtils
8
8
  SUMMARY = 'Sugary goodness for Ruby CLI apps.'
9
9
 
10
10
  # The current version of the gem
11
- VERSION = '2.1.0'
11
+ VERSION = '2.1.1'
12
12
  end
@@ -300,7 +300,7 @@ module CLIUtils
300
300
  # the user with a message and skip over it.
301
301
  begin
302
302
  require File.expand_path(asset_path)
303
- Object.const_get("CLIUtils::#{ asset_name }").new
303
+ Object.const_get('CLIUtils').const_get(asset_name).new
304
304
  rescue LoadError => e
305
305
  messenger.warn("Skipping undefined Pref #{ @@asset_labels[type][:class_suffix] }: #{ path_or_name }")
306
306
  nil
@@ -0,0 +1,11 @@
1
+ module CLIUtils
2
+ # Pref Action to open a URL in the default
3
+ # browser.
4
+ class TestAction < PrefAction
5
+ # Runs the action.
6
+ # @return [void]
7
+ def run
8
+ puts 'here'
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module CLIUtils
2
+ # A Behavior to prefix a Pref answer with a string
3
+ class TestBehavior < PrefBehavior
4
+ # Evaluates the behavior against the text.
5
+ # @param [Object] text The "text" to evaluate
6
+ # @return [String]
7
+ def evaluate(text)
8
+ "test_behavior: #{ text }"
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ require 'uri'
2
+
3
+ module CLIUtils
4
+ # A Validator to verify whether a Pref answer
5
+ # is a valid URL.
6
+ class TestValidator < PrefValidator
7
+ # Runs the Validator against the answer.
8
+ # @param [Object] text The "text" to evaluate
9
+ # @return [String]
10
+ def validate(text)
11
+ @is_valid = text.to_s == "bachya"
12
+ @message = "String did not equal 'bachya': #{ text }"
13
+ end
14
+ end
15
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cliutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Bach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-25 00:00:00.000000000 Z
11
+ date: 2014-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -138,6 +138,9 @@ files:
138
138
  - test/prefs_test.rb
139
139
  - test/string_extesions_test.rb
140
140
  - test/test_files/prefstest.yaml
141
+ - test/test_files/test_action.rb
142
+ - test/test_files/test_behavior.rb
143
+ - test/test_files/test_validator.rb
141
144
  - test/test_helper.rb
142
145
  homepage: https://github.com/bachya/cliutils
143
146
  licenses:
@@ -172,5 +175,8 @@ test_files:
172
175
  - test/prefs_test.rb
173
176
  - test/string_extesions_test.rb
174
177
  - test/test_files/prefstest.yaml
178
+ - test/test_files/test_action.rb
179
+ - test/test_files/test_behavior.rb
180
+ - test/test_files/test_validator.rb
175
181
  - test/test_helper.rb
176
182
  has_rdoc: