hello-world-rubygems 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 129955ccc3a16a767ca37a465b581d6901853fe550cc3a8301eac9493f90725c
4
+ data.tar.gz: a2753581d4ad59b56f7d47308cc90874b03c1100a5ae8838fccf4a2ad845ef11
5
+ SHA512:
6
+ metadata.gz: 1a2514d0e485e550655964a1fa7eb58b554ca6534bbf39dc3d71b971270baa510b099babb0e4d4ff9ec7b5a742ad3fff68a84b78d1dd4d458eea834845cb4754
7
+ data.tar.gz: 1389f847cad77d163b23260c2029f55731d06fa3312c3306d05bb53ae90e189d8d0aaafdb1acd0ef59a48f5c53bcb364f028304d368009b6ce57d52644a3128f
@@ -0,0 +1,72 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: CI
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ linting:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v2
21
+ - name: Set up Ruby
22
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
23
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
24
+ # uses: ruby/setup-ruby@v1
25
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
26
+ with:
27
+ ruby-version: 2.6
28
+ - name: Install rubocop
29
+ run: gem install rubocop
30
+ - name: Install dependencies
31
+ run: bundle install --retry 3
32
+ - name: Run Linter
33
+ run: bundle exec rubocop
34
+
35
+ unittest:
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: actions/checkout@v2
39
+ - name: Set up Ruby
40
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
41
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
42
+ # uses: ruby/setup-ruby@v1
43
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
44
+ with:
45
+ ruby-version: 2.6
46
+ - name: Install dependencies
47
+ run: bundle install --retry 3
48
+ - name: Run tests
49
+ run: bundle exec rake test
50
+
51
+ coverage:
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v2
55
+ - name: Set up Ruby
56
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
57
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
58
+ # uses: ruby/setup-ruby@v1
59
+ uses: ruby/setup-ruby@ec106b438a1ff6ff109590de34ddc62c540232e0
60
+ with:
61
+ ruby-version: 2.6
62
+ - name: Install simplecov
63
+ run: gem install simplecov
64
+ - name: Install dependencies
65
+ run: bundle install --retry 3
66
+ - name: Test & publish code coverage to codeclimate
67
+ uses: paambaati/codeclimate-action@v2.6.0
68
+ env:
69
+ # Set CC_TEST_REPORTER_ID as secret of your repo
70
+ CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}}
71
+ with:
72
+ coverageCommand: bundle exec rake
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ # Do NOT put your Gemfile.lock under VC for gems (https://stackoverflow.com/questions/4151495/should-gemfile-lock-be-included-in-gitignore)
2
+ Gemfile.lock
3
+
4
+ # Tests
5
+ /coverage/
6
+ /spec/reports/
7
+
8
+ # Cache and Temp files
9
+ /.bundle/
10
+ /.yardoc
11
+ /_yardoc/
12
+ /doc/
13
+ /pkg/
14
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,41 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.4
3
+ Exclude:
4
+ - "*.gemspec"
5
+ - "gemfiles/*"
6
+ - gems/**/*
7
+ - node_modules/**/*
8
+ - vendor/bundle/**/*
9
+ - Rakefile
10
+ - Gemfile
11
+
12
+ Layout/SpaceAroundMethodCallOperator:
13
+ Enabled: false
14
+
15
+ Lint/RaiseException:
16
+ Enabled: false
17
+ Lint/ScriptPermission:
18
+ Enabled: false
19
+ Lint/StructNewOverride:
20
+ Enabled: false
21
+
22
+ Metrics/AbcSize:
23
+ Enabled: false
24
+ Metrics/ClassLength:
25
+ Enabled: false
26
+ Metrics/MethodLength:
27
+ Enabled: false
28
+
29
+ Naming/FileName:
30
+ Enabled: false
31
+
32
+ Style/ExponentialNotation:
33
+ Enabled: false
34
+ Style/HashEachMethods:
35
+ Enabled: true
36
+ Style/HashTransformKeys:
37
+ Enabled: true
38
+ Style/HashTransformValues:
39
+ Enabled: true
40
+ Style/WordArray:
41
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.6
7
+ before_install: gem install bundler -v 2.0.2
data/.whitesource ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "checkRunSettings": {
3
+ "vulnerableCheckRunConclusionLevel": "failure"
4
+ },
5
+ "issueSettings": {
6
+ "minSeverityLevel": "LOW"
7
+ }
8
+ }
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ The [Releases](https://github.com/n13org/hello-world-rubygems/releases) of the `hello world`.
4
+
5
+ 1. Create the project
6
+ 1. Update Metadata of the gem spec
7
+ 1. Fix default unittests
8
+ 1. Add GitHub Action "rake test" as CI
9
+ 1. Add Visual Code workspace
10
+ 1. Add RuboCop as Code Style Linter
11
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in hello-world-rubygems.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 n13.org
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,41 @@
1
+ # Hello::World::Rubygems
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/hello/world/rubygems`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ Here is the step by step [Blog Post][Blog Post] related to that ruby gem package.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'hello-world-rubygems'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install hello-world-rubygems
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
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/n13org/hello-world-rubygems.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ [Blog Post]: https://notes.kargware.com/2020/05/05/My-first-gem-on-rubygems.org
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList["test/**/*_test.rb"]
8
+ end
9
+
10
+ task :default => :test
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 'hello/world/rubygems'
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,8 @@
1
+ {
2
+ "folders": [
3
+ {
4
+ "path": "."
5
+ }
6
+ ],
7
+ "settings": {}
8
+ }
@@ -0,0 +1,34 @@
1
+ lib = File.expand_path("lib", __dir__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require "hello/world/rubygems/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "hello-world-rubygems"
7
+ spec.version = Hello::World::Rubygems::VERSION
8
+ spec.authors = ["n13-org", "KargWare"]
9
+ spec.email = ["rubygems.org@n13.org"]
10
+
11
+ spec.summary = %q{A hello world gem project for rubygems.org}
12
+ spec.description = %q{A `hello-world` gem, written in ruby, including tests (minitest), Rakefile and GitHub Actions to publish a package to rubygems.org}
13
+ spec.homepage = "https://github.com/n13org/hello-world-rubygems"
14
+ spec.license = "MIT"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/n13org/hello-world-rubygems"
18
+ spec.metadata["changelog_uri"] = "https://github.com/n13org/hello-world-rubygems/blob/master/CHANGELOG.md"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
23
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
+ end
25
+ spec.bindir = "exe"
26
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
+ spec.require_paths = ["lib"]
28
+
29
+ spec.add_development_dependency "bundler", "~> 2.0"
30
+ spec.add_development_dependency "rake", "~> 12.3.3"
31
+ spec.add_development_dependency "minitest", "~> 5.0"
32
+ spec.add_development_dependency "rubocop", "~> 0.82.0"
33
+ spec.add_development_dependency "simplecov", "~> 0.18.5"
34
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'hello/world/rubygems/version'
4
+
5
+ module Hello
6
+ module World
7
+ module Rubygems
8
+ class Error < StandardError; end
9
+ # Your code goes here...
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Hello
4
+ module World
5
+ module Rubygems
6
+ VERSION = '0.1.1'
7
+ end
8
+ end
9
+ end
metadata ADDED
@@ -0,0 +1,134 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: hello-world-rubygems
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - n13-org
8
+ - KargWare
9
+ autorequire:
10
+ bindir: exe
11
+ cert_chain: []
12
+ date: 2021-02-01 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '2.0'
21
+ type: :development
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 12.3.3
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 12.3.3
42
+ - !ruby/object:Gem::Dependency
43
+ name: minitest
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '5.0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '5.0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 0.82.0
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.82.0
70
+ - !ruby/object:Gem::Dependency
71
+ name: simplecov
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.18.5
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 0.18.5
84
+ description: A `hello-world` gem, written in ruby, including tests (minitest), Rakefile
85
+ and GitHub Actions to publish a package to rubygems.org
86
+ email:
87
+ - rubygems.org@n13.org
88
+ executables: []
89
+ extensions: []
90
+ extra_rdoc_files: []
91
+ files:
92
+ - ".github/workflows/ci.yml"
93
+ - ".gitignore"
94
+ - ".rubocop.yml"
95
+ - ".travis.yml"
96
+ - ".whitesource"
97
+ - CHANGELOG.md
98
+ - Gemfile
99
+ - LICENSE.txt
100
+ - README.md
101
+ - Rakefile
102
+ - bin/console
103
+ - bin/setup
104
+ - hello-world-rubygems.code-workspace
105
+ - hello-world-rubygems.gemspec
106
+ - lib/hello/world/rubygems.rb
107
+ - lib/hello/world/rubygems/version.rb
108
+ homepage: https://github.com/n13org/hello-world-rubygems
109
+ licenses:
110
+ - MIT
111
+ metadata:
112
+ homepage_uri: https://github.com/n13org/hello-world-rubygems
113
+ source_code_uri: https://github.com/n13org/hello-world-rubygems
114
+ changelog_uri: https://github.com/n13org/hello-world-rubygems/blob/master/CHANGELOG.md
115
+ post_install_message:
116
+ rdoc_options: []
117
+ require_paths:
118
+ - lib
119
+ required_ruby_version: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ requirements: []
130
+ rubygems_version: 3.0.8
131
+ signing_key:
132
+ specification_version: 4
133
+ summary: A hello world gem project for rubygems.org
134
+ test_files: []