hola_montells 0.1.0 → 0.2.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a277087dd620afb750446e120a774f29734e85683ee84356cb6377ec71e7333
4
- data.tar.gz: fb75d56e49eabe68f76cedbbbf32e44734ed233344bd15f59f796eaf088028c8
3
+ metadata.gz: b567ddd8afeb340ed3264375b29accf235d23546074b2247060fdaa87e02213a
4
+ data.tar.gz: 721027e8c628526fbcb45e46c826f26fb683c3f623ebbd91ee788331bafdde5e
5
5
  SHA512:
6
- metadata.gz: be4a841f7a1d0ae198e0c590648f7d28566ebc284173a277365fd6a779e32898093061b7f491b6e94e833f213a00233b210574c76a8776bab81002101d636360
7
- data.tar.gz: 9cfd5942352513e2bd90fb2516d082f78f0681da03b4409327ed4941d68cdf2c0eec927ccecc33e6d9e8cfec3da3622f9335867e6e007d4a9fb723e02968bad0
6
+ metadata.gz: 6a68d98e9d2f4ebdc190f6683959e127889b49627c9ce4d51566b07ca7ecc514db56df84f8fce25cee444e4dc8b8ab377056c9aa134bf3e32a8c1698cc1e76d5
7
+ data.tar.gz: 3034bad6e75d73e7e215bf795ee8ed0a960ebf6a3b50c8c0c4786f331c004922da3fddbb9777165c6ac639dbb2be38321f24f74a8d957d297ccb5fa1e5d65c3b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hola_montells (0.1.0)
4
+ hola_montells (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # HolaMontells
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/hola_montells`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Thanks for watching here
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ This is just first gem built. I hope more will come.
6
+
7
+ Not useful value. I was just following the first [how to build a gem](https://guides.rubygems.org/make-your-own-gem/) tutorial
6
8
 
7
9
  ## Installation
8
10
 
@@ -22,19 +24,14 @@ Or install it yourself as:
22
24
 
23
25
  ## Usage
24
26
 
25
- TODO: Write usage instructions here
27
+ require 'hola_montells'
28
+ HolaMontells.hi
29
+ HolaMontells.hi(:englis)
26
30
 
27
31
  ## Development
28
32
 
29
33
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
34
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
-
33
- ## Contributing
34
-
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hola_montells.
36
-
37
-
38
35
  ## License
39
36
 
40
37
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/bin/hola_montells ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'hola_montells'
4
+ puts HolaMontells.hi(ARGV[0])
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = 'Just say ji'
12
12
  spec.description = 'Just how to build gem tutorial'
13
- spec.homepage = 'https://aleph.engineering'
13
+ spec.homepage = 'https://gitlab.com/montells/hola_gem'
14
14
  spec.license = 'MIT'
15
15
  spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
16
16
 
@@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
21
21
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
23
  end
24
- spec.bindir = 'exe'
25
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
+ spec.bindir = 'bin'
25
+ # spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.executables << 'hola_montells'
26
27
  spec.require_paths = ['lib']
27
28
  end
@@ -0,0 +1,16 @@
1
+ module HolaMontells
2
+ class Translator
3
+ def initialize(language)
4
+ @language = language
5
+ end
6
+
7
+ def hi
8
+ case @language
9
+ when :spanish
10
+ 'hola mundo'
11
+ else
12
+ 'hello world'
13
+ end
14
+ end
15
+ end
16
+ end
@@ -1,3 +1,3 @@
1
1
  module HolaMontells
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.4"
3
3
  end
data/lib/hola_montells.rb CHANGED
@@ -1,12 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'hola_montells/version'
4
-
5
3
  module HolaMontells
6
4
  class Error < StandardError; end
7
5
 
8
- def self.hi
9
- puts 'hello world'
6
+ # Say hello given a specified language
7
+ #
8
+ # @param language [Symbol] the desired language
9
+ # @return [String] the greeting on the expected language
10
+ def self.hi(language = :spanish)
11
+ translator = Translator.new(language)
12
+ translator.hi
10
13
  end
11
-
12
14
  end
15
+
16
+ require 'hola_montells/translator'
17
+ require 'hola_montells/version'
metadata CHANGED
@@ -1,19 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_montells
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michel Sánchez Montells
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
11
  date: 2022-03-03 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Just how to build gem tutorial
14
14
  email:
15
15
  - montells@aleph.engineering
16
- executables: []
16
+ executables:
17
+ - hola_montells
17
18
  extensions: []
18
19
  extra_rdoc_files: []
19
20
  files:
@@ -29,15 +30,17 @@ files:
29
30
  - README.md
30
31
  - Rakefile
31
32
  - bin/console
33
+ - bin/hola_montells
32
34
  - bin/setup
33
35
  - hola_montells.gemspec
34
36
  - lib/hola_montells.rb
37
+ - lib/hola_montells/translator.rb
35
38
  - lib/hola_montells/version.rb
36
- homepage: https://aleph.engineering
39
+ homepage: https://gitlab.com/montells/hola_gem
37
40
  licenses:
38
41
  - MIT
39
42
  metadata:
40
- homepage_uri: https://aleph.engineering
43
+ homepage_uri: https://gitlab.com/montells/hola_gem
41
44
  post_install_message:
42
45
  rdoc_options: []
43
46
  require_paths: