hola-nicklink483 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 +15 -0
- data/Rakefile +8 -0
- data/bin/hola +4 -0
- data/lib/hola.rb +8 -0
- data/lib/hola/translator.rb +18 -0
- data/test/test_hola.rb +16 -0
- metadata +48 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
!binary "U0hBMQ==":
|
|
3
|
+
metadata.gz: !binary |-
|
|
4
|
+
NTA5MjIwM2IzMThmOGEyMzhjNjVhMjQzNDgyNDFhMDRlOGIwZWVlYw==
|
|
5
|
+
data.tar.gz: !binary |-
|
|
6
|
+
ZjA1MDJjY2E3Y2E0NWFlZGYxMzAxYWY0ZDlkMDhiN2YzOGQ0YjM1MA==
|
|
7
|
+
!binary "U0hBNTEy":
|
|
8
|
+
metadata.gz: !binary |-
|
|
9
|
+
ZjVjNmU1Y2Y3NzQ2OTkzZjc3YjZhZGRkODNlNDMwZGQ4YTQ0YTA2OWEwNzE5
|
|
10
|
+
NTRhMjM1OWE0MmY5ZjE4MDIxYmVmNGI5NDhlNGMxYmY0NTY1Mzk5YTJkZWNl
|
|
11
|
+
ZTA1MGUyMGQ0NDE4M2E1MjkzYzQzODJkYTRhZDk5ZDRjNjE0MGE=
|
|
12
|
+
data.tar.gz: !binary |-
|
|
13
|
+
ZjBiYTdkODMyMWQxNjAyMTAyYTY2ZDhkNGI0NTAxNzllZjdlNmZlMDMzYjVj
|
|
14
|
+
MmQ5ZGU4NzQ1NjNhYWJhM2ZjMjdhODRmNWQ3ZWE1YTA3YWExN2IwNDU5M2Nm
|
|
15
|
+
NjhmMjRhODQ0MjY0YzdlZjJkZWFlNDZhOTdjZDlhYzYyYTY1MTI=
|
data/Rakefile
ADDED
data/bin/hola
ADDED
data/lib/hola.rb
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
class Hola::Translator
|
|
2
|
+
def initialize(language = "english")
|
|
3
|
+
@language = language
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
def hi
|
|
7
|
+
case @language
|
|
8
|
+
when "english"
|
|
9
|
+
"hello world"
|
|
10
|
+
when "spanish"
|
|
11
|
+
"hola mundo"
|
|
12
|
+
when "korean"
|
|
13
|
+
"anyoung ha se yo"
|
|
14
|
+
else
|
|
15
|
+
"hello world"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
data/test/test_hola.rb
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require 'test/unit'
|
|
2
|
+
require 'hola'
|
|
3
|
+
|
|
4
|
+
class HolaTest < Test::Unit::TestCase
|
|
5
|
+
def test_english_hello
|
|
6
|
+
assert_equal "hello world", Hola.hi("english")
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def test_any_hello
|
|
10
|
+
assert_equal "hello world", Hola.hi("ruby")
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def test_spanish_hello
|
|
14
|
+
assert_equal "hola mundo", Hola.hi("spanish")
|
|
15
|
+
end
|
|
16
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: hola-nicklink483
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Dominic Muller
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2013-06-08 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: A simple hello world gem
|
|
14
|
+
email: nicklink483@gmail.com
|
|
15
|
+
executables: []
|
|
16
|
+
extensions: []
|
|
17
|
+
extra_rdoc_files: []
|
|
18
|
+
files:
|
|
19
|
+
- Rakefile
|
|
20
|
+
- lib/hola.rb
|
|
21
|
+
- lib/hola/translator.rb
|
|
22
|
+
- bin/hola
|
|
23
|
+
- test/test_hola.rb
|
|
24
|
+
homepage: http://rubygems.org/gems/hola_nicklink483
|
|
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.rb
|