r38y-radio 0.0.1 → 0.0.2

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.
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'lib/radio'
4
+ if ARGV.first
5
+ puts Radio.radioize(ARGV.first)
6
+ else
7
+ puts "Please specify a word to radioize"
8
+ end
@@ -0,0 +1,5 @@
1
+ class String
2
+ def upcase?
3
+ self.upcase == self && !(0..9).to_a.map{|i| i.to_s}.include?(self)
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ require 'stringio'
2
+ require 'test/unit'
3
+ require File.dirname(__FILE__) + '/../lib/radio'
@@ -0,0 +1,13 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class TestRadio < Test::Unit::TestCase
4
+ def test_string_upcase_should_be_true_if_string_is_upcase
5
+ assert 'H'.upcase?
6
+ assert !'h'.upcase?
7
+ assert !'1'.upcase?
8
+ end
9
+
10
+ def test_should_convert_word_to_nato
11
+ assert_equal Radio.radioize('Forge38'), 'FOXTROT-oscar-romeo-golf-echo-Three-Eight'
12
+ end
13
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: r38y-radio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Randy Schmidt
@@ -34,8 +34,8 @@ dependencies:
34
34
  version:
35
35
  description: Radio is a gem for converting words to radio (alpha beta etc)
36
36
  email: randy@umlatte.com
37
- executables: []
38
-
37
+ executables:
38
+ - radioize
39
39
  extensions: []
40
40
 
41
41
  extra_rdoc_files: []
@@ -46,12 +46,14 @@ files:
46
46
  - README.textile
47
47
  - lib
48
48
  - lib/radio
49
- - lib/radio/string
49
+ - lib/radio/string.rb
50
50
  - script
51
51
  - script/console
52
52
  - test
53
- - test/test_helper
54
- - test/test_radio
53
+ - test/test_helper.rb
54
+ - test/test_radio.rb
55
+ - bin
56
+ - bin/radioize
55
57
  has_rdoc: false
56
58
  homepage: http://github.com/r38y/radio
57
59
  post_install_message: