hola_van_winkle 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 226422b40e21a97eec60fbb9a49b75359fc4a291
4
+ data.tar.gz: 7e08eceaceec8b9d6a33e24e4aa12e506d491f32
5
+ SHA512:
6
+ metadata.gz: 58ab81d3905eb4ca53a2fe53c38520fdc9b17c4c3e6f55f09b5f2d9abd3b37a14685cf3c2cc8ff04aa7b13a2f7f1e9b8f09e00ee0daead3f75db1dd02474b254
7
+ data.tar.gz: a70c5e3de32d7118d50cb1d4f71881ef5ca67d18747c07a66617754bf01e594b6b0e765667a0e49ecc3d7e6bcff2b17c3f276360256273d6da5de4cbe8b3261d
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ require 'rake/testtask'
2
+
3
+ Rake::TestTask.new do |t|
4
+ t.libs << 'test'
5
+ end
6
+
7
+ desc "Run tests"
8
+ task :default => :test
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_van_winkle'
4
+ puts HolaVanWinkle.hi(ARGV[0])
@@ -0,0 +1,8 @@
1
+ class HolaVanWinkle
2
+ def self.hi(language)
3
+ translator = Translator.new(language)
4
+ translator.hi
5
+ end
6
+ end
7
+
8
+ require 'hola/translator'
@@ -0,0 +1,16 @@
1
+ class HolaVanWinkle::Translator
2
+ def initialize(language = "english")
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "hola mundo"
10
+ when "korean"
11
+ "anyoung ha se yo"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'hola_van_winkle'
3
+
4
+ class HolaVanWinkleTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", HolaVanWinkle.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello world", HolaVanWinkle.hi("ruby")
11
+ end
12
+
13
+ def test_spanish_hello
14
+ assert_equal "hola mundo", HolaVanWinkle.hi("spanish")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hola_van_winkle
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nick Quaranto and Sally Lehman
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-01-21 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple hello world gem
14
+ email: rothsa@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Rakefile
20
+ - lib/hola_van_winkle.rb
21
+ - lib/hola_van_winkle/translator.rb
22
+ - bin/hola_van_winkle
23
+ - test/test_hola_van_winkle.rb
24
+ homepage: http://rubygems.org/gems/hola_van_winkle
25
+ licenses: []
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubyforge_project:
43
+ rubygems_version: 2.0.3
44
+ signing_key:
45
+ specification_version: 3
46
+ summary: Hola!
47
+ test_files:
48
+ - test/test_hola_van_winkle.rb