another_hola 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +8 -0
- data/lib/another_hola.rb +10 -0
- data/test/test_another_hola.rb +19 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85f77a62d82c10ab0dd46046b2c3979993221fa2
|
4
|
+
data.tar.gz: 7c36126b5b70d7f54f3feb80f56199efa8162b88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02c4dd8023e39f80616b34a614cd3a3d154b42d603f71e234ad63bc335cb7b5c7fcc34f3ad7f4bcc301f701b0e553a2bdd86c069387e899609527dcfca22e308
|
7
|
+
data.tar.gz: 69509f65551070b3455e3526b2d4c1b41430f2b965c31ff72fb50308edbcee4cbb2bf453c84d2c1ffb6aca211eb02135af06c23e887f098801b7d647e1e50b2e
|
data/Rakefile
ADDED
data/lib/another_hola.rb
CHANGED
@@ -1,4 +1,14 @@
|
|
1
|
+
# The main AnotherHola driver
|
1
2
|
class AnotherHola
|
3
|
+
# Say hi to the world!
|
4
|
+
#
|
5
|
+
# Example:
|
6
|
+
# >> AnotherHola.hi("spanish")
|
7
|
+
# => hola mundo
|
8
|
+
#
|
9
|
+
# Arguments:
|
10
|
+
# language: (String)
|
11
|
+
|
2
12
|
def self.hi(language = "english")
|
3
13
|
translator = Translator.new(language)
|
4
14
|
translator.hi
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'another_hola'
|
3
|
+
|
4
|
+
class AnotherHolaTest < Minitest::Test
|
5
|
+
def test_english_hello
|
6
|
+
assert_equal "hello world",
|
7
|
+
AnotherHola.hi("english")
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_any_hello
|
11
|
+
assert_equal "hello world",
|
12
|
+
AnotherHola.hi("ruby")
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_spanish_hello
|
16
|
+
assert_equal "hola mundo",
|
17
|
+
AnotherHola.hi("spanish")
|
18
|
+
end
|
19
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: another_hola
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Salsabila Nadhifah
|
@@ -17,9 +17,11 @@ executables:
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
+
- Rakefile
|
20
21
|
- bin/another_hola
|
21
22
|
- lib/another_hola.rb
|
22
23
|
- lib/another_hola/translator.rb
|
24
|
+
- test/test_another_hola.rb
|
23
25
|
homepage:
|
24
26
|
licenses:
|
25
27
|
- MIT
|
@@ -44,4 +46,5 @@ rubygems_version: 2.6.8
|
|
44
46
|
signing_key:
|
45
47
|
specification_version: 4
|
46
48
|
summary: Another Hola!
|
47
|
-
test_files:
|
49
|
+
test_files:
|
50
|
+
- test/test_another_hola.rb
|