jiayi-test 0.0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 8ecffd42df42d3a7f80df1e29eea869c6f55c6bdc5bddaaa67f18289687b1f35
4
+ data.tar.gz: 144136122454f118328e4e581cce886be2d71bacea172ea05ee42200d1cebd02
5
+ SHA512:
6
+ metadata.gz: a31ea14634fb6df54c76cb9cd77d64d636a713b9872f5c9985adfab092d281470bdd68332a7dda47c630cacae5dde040ca819c2e159e2dd75d0a9e129c9bcd22
7
+ data.tar.gz: 36f9a0f0568a4e220ca24930905ca9598976619fa36acbecf3f5e624b698f158b6cab30d2e37e55b6549ee43956ed87505f5dbef6d80bde65b11ae447326fc13
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/jiayi-test ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'jiayi-test'
4
+ puts jiayi-test.hi(ARGV[0])
@@ -0,0 +1,16 @@
1
+ class jiayi-test::Translator
2
+ def initialize(language = "english")
3
+ @language = language
4
+ end
5
+
6
+ def hi
7
+ case @language
8
+ when "spanish"
9
+ "jiayi-test mundo"
10
+ when "korean"
11
+ "anyoung ha se yo"
12
+ else
13
+ "hello world"
14
+ end
15
+ end
16
+ end
data/lib/jiayi-test.rb ADDED
@@ -0,0 +1,8 @@
1
+ class jiayi-test
2
+ def self.hi(language)
3
+ translator = Translator.new(language)
4
+ translator.hi
5
+ end
6
+ end
7
+
8
+ require 'jiayi-test/translator'
@@ -0,0 +1,16 @@
1
+ require 'test/unit'
2
+ require 'jiayi-test'
3
+
4
+ class jiayi-testTest < Test::Unit::TestCase
5
+ def test_english_hello
6
+ assert_equal "hello world", jiayi-test.hi("english")
7
+ end
8
+
9
+ def test_any_hello
10
+ assert_equal "hello world", jiayi-test.hi("ruby")
11
+ end
12
+
13
+ def test_spanish_hello
14
+ assert_equal "jiayi-test mundo", jiayi-test.hi("spanish")
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,47 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jiayi-test
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Nick Quaranto
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2010-04-03 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A simple hello world gem
14
+ email: nick@quaran.to
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - Rakefile
20
+ - bin/jiayi-test
21
+ - lib/jiayi-test.rb
22
+ - lib/jiayi-test/translator.rb
23
+ - test/test_jiayi-test.rb
24
+ homepage: http://rubygems.org/gems/jiayi-test
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
+ rubygems_version: 3.0.3.1
43
+ signing_key:
44
+ specification_version: 3
45
+ summary: jiayi-test!
46
+ test_files:
47
+ - test/test_jiayi-test.rb