hola_harry 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c07b0861a5f82b5a58da55637508fa8613897e2a179cc18babe9bd7cd1598af5
4
- data.tar.gz: 62ee3329247e4426b3f21c5550f1fc883b3fe3a3cadc8a6ce60eff88ef5f1bc9
3
+ metadata.gz: 98552a32b7a84b52f27aa1b607e0429fec6936a4e30d0b18b55a6c87098a31f6
4
+ data.tar.gz: 440204a60878c611dabf7d8a05ec6cce5a5085688fe847a0e75a16b0e16dfec5
5
5
  SHA512:
6
- metadata.gz: b99606f42a6703174bb72d0c1544f1e6681338ecc2f8ee2e772e4b3c9cfdfee83899ca865ec85fe90ae9773d7c3a3b9965c48b45e7dda94d2690ad0a7a0568ea
7
- data.tar.gz: 0d24a6bfeeb05e8ea550784969b49b61e151f235fb41dfc55b5c3ad10169226b421a5de2c81799b2c194329e6a40b5679e97164bd781100db8b7843887d1c6da
6
+ metadata.gz: 11b16907b0a3135042e786fe955ebbc9a54fda4966fd0854b2b2e8e38c99a8efe74448b3d71863bb5594a5ba889291179483360a5f5cd58a933573d2291e0f8a
7
+ data.tar.gz: e407cf31f86248812fb56b402cb7e9942a81e00d93a1a2fa48f70262b106167441729cd7d50297d48f4e468f4ef365682bcf88569f5fafa8d5e2f0fd93eaf110
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+
3
+ # rspec failure tracking
4
+ spec/examples.txt
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.3.0] - 2022-12-25
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at hgraham594@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,34 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hola_harry (0.3.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.5.0)
10
+ rake (13.0.6)
11
+ rspec (3.12.0)
12
+ rspec-core (~> 3.12.0)
13
+ rspec-expectations (~> 3.12.0)
14
+ rspec-mocks (~> 3.12.0)
15
+ rspec-core (3.12.0)
16
+ rspec-support (~> 3.12.0)
17
+ rspec-expectations (3.12.1)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.12.0)
20
+ rspec-mocks (3.12.1)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.12.0)
23
+ rspec-support (3.12.0)
24
+
25
+ PLATFORMS
26
+ x86_64-linux
27
+
28
+ DEPENDENCIES
29
+ hola_harry!
30
+ rake (~> 13.0)
31
+ rspec (~> 3.0)
32
+
33
+ BUNDLED WITH
34
+ 2.2.11
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2022 Harry Graham
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # hola_harry
2
+ A simple "Hello, World" gem.
3
+
4
+ This gem was created following the [RubyGems "Make your own gem" guide](https://guides.rubygems.org/make-your-own-gem/).
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'hola_harry'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle install
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install hola_harry
21
+
22
+ ## Usage
23
+
24
+ There are two main ways to use this gem.
25
+
26
+ Firstly, it can be used in Ruby code:
27
+ ```ruby
28
+ > HolaHarry.hi
29
+ => "Hello world"
30
+ > HolaHarry.hi('english')
31
+ => "Hello world"
32
+ > HolaHarry.hi('spanish')
33
+ => "Hola mundo"
34
+ ```
35
+
36
+ Secondly, it can be ran as an executable from the command line:
37
+ ```bash
38
+ $ ruby -Ilib bin/hola_harry
39
+ Hello world
40
+ $ ruby -Ilib bin/hola_harry english
41
+ Hello world
42
+ $ ruby -Ilib bin/hola_harry spanish
43
+ Hola mundo
44
+ ```
45
+
46
+ ## Languages currently supported
47
+
48
+ * English
49
+ * Spanish
50
+
51
+ ## Development
52
+
53
+ 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.
54
+
55
+ 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 the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
56
+
57
+ ## Contributing
58
+
59
+ Bug reports and pull requests are welcome on GitHub at https://github.com/harry-graham/hola_harry. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/harry-graham/hola_harry/blob/master/CODE_OF_CONDUCT.md).
60
+
61
+ ## License
62
+
63
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
64
+
65
+ ## Code of Conduct
66
+
67
+ Everyone interacting in the HolaHarry project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/harry-graham/hola_harry/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "bundler/setup"
5
+ require "hola_harry"
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require "irb"
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/hola_harry/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "hola_harry"
7
+ spec.version = HolaHarry::VERSION
8
+ spec.authors = ["Harry Graham"]
9
+ spec.email = ["harry.graham.595@gmail.com"]
10
+
11
+ spec.summary = "A simple \"Hello world\" gem."
12
+ spec.description = "A simple \"Hello world\" gem created following the RubyGems \"Make your own gem\" guide."
13
+ spec.homepage = "https://github.com/harry-graham/hola_harry"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
16
+
17
+ # spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = spec.homepage
21
+ spec.metadata["changelog_uri"] = "https://github.com/harry-graham/hola_harry/blob/main/CHANGELOG.md"
22
+
23
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
25
+ end
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
28
+ spec.require_paths = ["lib"]
29
+
30
+ spec.add_development_dependency 'rake', '~> 13.0'
31
+ spec.add_development_dependency 'rspec', '~> 3.0'
32
+ end
@@ -6,9 +6,9 @@ class HolaHarry::Translator
6
6
  def hi
7
7
  case @language
8
8
  when "spanish"
9
- "hola mundo"
9
+ "Hola mundo"
10
10
  else
11
- "hello world"
11
+ "Hello world"
12
12
  end
13
13
  end
14
14
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HolaHarry
4
+ VERSION = "0.3.0"
5
+ end
data/lib/hola_harry.rb CHANGED
@@ -1,8 +1,14 @@
1
- class HolaHarry
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "hola_harry/version"
4
+
5
+ module HolaHarry
6
+ class Error < StandardError; end
7
+
2
8
  def self.hi(language = "english")
3
9
  translator = Translator.new(language)
4
10
  translator.hi
5
11
  end
6
- end
7
12
 
8
- require 'hola_harry/translator'
13
+ require 'hola_harry/translator'
14
+ end
metadata CHANGED
@@ -1,30 +1,75 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hola_harry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Graham
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-24 00:00:00.000000000 Z
12
- dependencies: []
13
- description: A simple 'hello world' gem created following the RubyGems 'make your
14
- own gem' guide.
15
- email: harry.graham.595@gmail.com
16
- executables:
17
- - hola_harry
11
+ date: 2022-12-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rake
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '13.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '13.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ description: A simple "Hello world" gem created following the RubyGems "Make your
42
+ own gem" guide.
43
+ email:
44
+ - harry.graham.595@gmail.com
45
+ executables: []
18
46
  extensions: []
19
47
  extra_rdoc_files: []
20
48
  files:
49
+ - ".gitignore"
50
+ - ".rspec"
51
+ - ".ruby-version"
52
+ - CHANGELOG.md
53
+ - CODE_OF_CONDUCT.md
54
+ - Gemfile
55
+ - Gemfile.lock
56
+ - LICENSE.txt
57
+ - README.md
58
+ - Rakefile
59
+ - bin/console
21
60
  - bin/hola_harry
61
+ - bin/setup
62
+ - hola_harry.gemspec
22
63
  - lib/hola_harry.rb
23
64
  - lib/hola_harry/translator.rb
24
- homepage: https://rubygems.org/gems/hola_harry
65
+ - lib/hola_harry/version.rb
66
+ homepage: https://github.com/harry-graham/hola_harry
25
67
  licenses:
26
68
  - MIT
27
- metadata: {}
69
+ metadata:
70
+ homepage_uri: https://github.com/harry-graham/hola_harry
71
+ source_code_uri: https://github.com/harry-graham/hola_harry
72
+ changelog_uri: https://github.com/harry-graham/hola_harry/blob/main/CHANGELOG.md
28
73
  post_install_message:
29
74
  rdoc_options: []
30
75
  require_paths:
@@ -33,7 +78,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
33
78
  requirements:
34
79
  - - ">="
35
80
  - !ruby/object:Gem::Version
36
- version: '0'
81
+ version: 3.0.0
37
82
  required_rubygems_version: !ruby/object:Gem::Requirement
38
83
  requirements:
39
84
  - - ">="
@@ -43,5 +88,5 @@ requirements: []
43
88
  rubygems_version: 3.2.3
44
89
  signing_key:
45
90
  specification_version: 4
46
- summary: Hola Harry!
91
+ summary: A simple "Hello world" gem.
47
92
  test_files: []