hola_allanb 0.0.1 → 0.0.2

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +8 -0
  3. data/lib/hola.rb +10 -1
  4. data/test/test_hola.rb +19 -0
  5. metadata +6 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d6b3999c029a2b2cf46d295909db2f55080fdc9b47a39becbc47f3a642ed490
4
- data.tar.gz: 9e555d160bb339e0024cdf849f126f53cdb5855a359bec656d10943f7c2cd79e
3
+ metadata.gz: 1f75d835758f0e4597a325da4a815f7d292c5e4bef6b96b3921cc27c4f7655f6
4
+ data.tar.gz: 39a7de57026e365a9b0e8c91133bfc8454c152e298e468f07787da04d0b2ed31
5
5
  SHA512:
6
- metadata.gz: 66ad17f5c2b2e4fd3228add3d2a9a5124707384022ee6bccd0a3557f6be6217a15e54f6e0d06a760680d7e535a187557fe7d81e5471c6998a963bd47a97aba25
7
- data.tar.gz: 892c25da79544ab59fb89a136e7173e6d57debf3b152de822bd6f1200b450b1a43dab39c5fcd577c6f84b386d8b6b28157e9b7eca6b1d83683767df4e4dece09
6
+ metadata.gz: 2033888b3304f0bdd296d0087735ec02c1b56198d9409254f19f1686024d45769c82f93d3b2d2ad13350b34541f55432b66511455440ad009fca0d403774302b
7
+ data.tar.gz: 14140174ade9c777e632846d4c5b1466163ec5058aa40700f5236e17e57de4f72eaf34189ff23b1d33ab49bdacb24f75961b67e816c577b31d25cb422c15517f
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/lib/hola.rb CHANGED
@@ -1,6 +1,15 @@
1
1
  require 'hola/translator'
2
-
2
+ # The main Hola drive
3
3
  class Hola
4
+ # say hi to the whole world!
5
+ #
6
+ # example:
7
+ # >> Hola.hi("spanish")
8
+ # => hola mundo
9
+ #
10
+ # Arguments:
11
+ # language: (String)
12
+
4
13
  def self.hi(language = "english")
5
14
  translator = Translator.new(language)
6
15
  translator.hi
data/test/test_hola.rb ADDED
@@ -0,0 +1,19 @@
1
+ require 'minitest/autorun'
2
+ require 'hola'
3
+
4
+ class HolaTest < MiniTest::Test
5
+ def test_english_hello
6
+ assert_equal "hello world!",
7
+ Hola.hi("english")
8
+ end
9
+
10
+ def test_any_hello
11
+ assert_equal "hello world!",
12
+ Hola.hi("ruby")
13
+ end
14
+
15
+ def test_spanish_hello
16
+ assert_equal "hola mundo",
17
+ Hola.hi("spanish")
18
+ end
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_allanb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - allanb
@@ -10,16 +10,18 @@ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2022-09-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: a simple hello world gem
13
+ description: A very simple hello world gem
14
14
  email: ab2other@gmail.com
15
15
  executables:
16
16
  - hola
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - Rakefile
20
21
  - bin/hola
21
22
  - lib/hola.rb
22
23
  - lib/hola/translator.rb
24
+ - test/test_hola.rb
23
25
  homepage: http://www.rubygems.org/gems/hola_allanb
24
26
  licenses:
25
27
  - MIT
@@ -43,4 +45,5 @@ rubygems_version: 3.1.6
43
45
  signing_key:
44
46
  specification_version: 4
45
47
  summary: hola! allanb
46
- test_files: []
48
+ test_files:
49
+ - test/test_hola.rb