mirror of
https://github.com/jimeh/blank_gem.git
synced 2026-02-18 20:56:38 +00:00
feat!: Implement blank_gem that does nothing.
This commit is contained in:
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
/.bundle/
|
||||
/.yardoc
|
||||
/_yardoc/
|
||||
/coverage/
|
||||
/doc/
|
||||
/pkg/
|
||||
/spec/reports/
|
||||
/tmp/
|
||||
|
||||
Gemfile.lock
|
||||
|
||||
# rspec failure tracking
|
||||
.rspec_status
|
||||
8
.versionrc.js
Normal file
8
.versionrc.js
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = config = {};
|
||||
|
||||
config.bumpFiles = [
|
||||
{
|
||||
filename: "VERSION",
|
||||
type: "plain-text"
|
||||
}
|
||||
];
|
||||
8
Gemfile
Normal file
8
Gemfile
Normal file
@@ -0,0 +1,8 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
# Specify your gem's dependencies in blank_gem.gemspec
|
||||
gemspec
|
||||
|
||||
gem 'rake'
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jim Myhrberg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
9
Makefile
Normal file
9
Makefile
Normal file
@@ -0,0 +1,9 @@
|
||||
.PHONY: new-version
|
||||
new-version:
|
||||
$(if $(shell command -v npx),, \
|
||||
$(error No npx executable in PATH, please install NodeJS))
|
||||
$(if $(shell command -v standard-version),, \
|
||||
$(error No standard-version executable in PATH, \
|
||||
install with: npm i -g standard-version))
|
||||
|
||||
npx standard-version
|
||||
29
README.md
Normal file
29
README.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# BlankGem
|
||||
|
||||
A blank/empty Ruby gem that does nothing. Useful for testing that only specific
|
||||
Bundler groups are loaded when using a dummy group.
|
||||
|
||||
## Installation
|
||||
|
||||
Add this line to your application's Gemfile, ideally under a group you'll never
|
||||
want:
|
||||
|
||||
```ruby
|
||||
gem 'blank_gem', group: :never
|
||||
```
|
||||
|
||||
And then execute:
|
||||
|
||||
$ bundle install
|
||||
|
||||
## Usage
|
||||
|
||||
Simply set Bundler's `without` option to exclude the group you've put the
|
||||
`blank_gem` within. For example:
|
||||
|
||||
$ bundle config set without 'never'
|
||||
|
||||
## Contributing
|
||||
|
||||
Bug reports and pull requests are welcome on GitHub at
|
||||
https://github.com/jimeh/blank_gem.
|
||||
3
Rakefile
Normal file
3
Rakefile
Normal file
@@ -0,0 +1,3 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'bundler/gem_tasks'
|
||||
32
blank_gem.gemspec
Normal file
32
blank_gem.gemspec
Normal file
@@ -0,0 +1,32 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative 'lib/blank_gem/version'
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = 'blank_gem'
|
||||
spec.version = BlankGem::VERSION
|
||||
spec.authors = ['Jim Myhrberg']
|
||||
spec.email = ['contact@jimeh.me']
|
||||
|
||||
spec.summary = 'A blank/empty Ruby gem that does nothing.'
|
||||
spec.description = 'A blank/empty Ruby gem that does nothing. Useful for ' \
|
||||
'testing that only specific Bundler groups are loaded ' \
|
||||
'when using a dummy group.'
|
||||
spec.homepage = 'https://github.com/jimeh/blank_gem'
|
||||
spec.required_ruby_version = Gem::Requirement.new('>= 2.0.0')
|
||||
|
||||
spec.metadata['homepage_uri'] = spec.homepage
|
||||
spec.metadata['source_code_uri'] = spec.homepage
|
||||
spec.metadata['changelog_uri'] = spec.homepage
|
||||
|
||||
spec.files = Dir.glob('lib/**/*') + [
|
||||
'Gemfile',
|
||||
'LICENSE',
|
||||
'README.md',
|
||||
'Rakefile',
|
||||
'VERSION'
|
||||
]
|
||||
spec.bindir = 'exe'
|
||||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
||||
spec.require_paths = ['lib']
|
||||
end
|
||||
5
lib/blank_gem.rb
Normal file
5
lib/blank_gem.rb
Normal file
@@ -0,0 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'blank_gem/version'
|
||||
|
||||
module BlankGem; end
|
||||
7
lib/blank_gem/version.rb
Normal file
7
lib/blank_gem/version.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module BlankGem
|
||||
VERSION = File.read(
|
||||
File.expand_path(File.join('..', '..', 'VERSION'), __dir__)
|
||||
)
|
||||
end
|
||||
Reference in New Issue
Block a user