iscinc-hw 1.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: 9e9e8ec47033712d294183899dda85a25b7a08c5
4
+ data.tar.gz: 1bb67b8f5fbeacc6360b21bb85eb50a9da59dedf
5
+ SHA512:
6
+ metadata.gz: 20f9b990d8cd8a80a636ee327b50e5ef1b11a51d711b5926647975d71089e5b581a4aab65bd0105f4fc20e4a06f587ea1345d8dff43de42c28fcafd3c71c14f4
7
+ data.tar.gz: 42bed12ce0c7936f37f5a0d31f5312c566d3edf3f9396988974fbc47c73fcca6e210e0ae9df8c51199c270d0b78fa0bc4f3fa1e978ac4fa726cd9fb76226cdc4
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
data/bin/iscinc-hw ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'iscinc-hw'
4
+ puts iscinc-hw.hi(ARGV[0])
data/lib/iscinc-hw.rb ADDED
@@ -0,0 +1,8 @@
1
+ class iscinc-hw
2
+ def self.hi(language)
3
+ translator = Translator.new(language)
4
+ translator.hi
5
+ end
6
+ end
7
+
8
+ require 'iscinc-hw/translator'
@@ -0,0 +1,16 @@
1
+ class iscinc-hw::Translator
2
+ def initialize(language = "english")
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "german"
9
+ "hallo welt"
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 'iscinc-hw'
3
+
4
+ class iscinc-hwTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", iscinc-hw.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello world", iscinc-hw.hi("ruby")
11
+ end
12
+
13
+ def test_german_hello
14
+ assert_equal "hallo welt", iscinc-hw.hi("german")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,48 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: iscinc-hw
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Suriyaa Kudo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-12-05 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A hello world gem for iSC Inc. projects
14
+ email: SuriyaaKudoIsc@users.noreply.github.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Rakefile
20
+ - bin/iscinc-hw
21
+ - lib/iscinc-hw.rb
22
+ - lib/iscinc-hw/translator.rb
23
+ - test/test_iscinc-hw.rb
24
+ homepage: http://rubygems.org/gems/iscinc-hw
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.2.2
44
+ signing_key:
45
+ specification_version: 3
46
+ summary: Hello World!
47
+ test_files:
48
+ - test/test_iscinc-hw.rb