Skip to content

Commit 2b5e7ae

Browse files
committed
alterations to generated gem: no bin stuff. ignore some files for the built gem. allow public push. etc.
1 parent 21842da commit 2b5e7ae

File tree

9 files changed

+13
-47
lines changed

9 files changed

+13
-47
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
/pkg/
77
/spec/reports/
88
/tmp/
9+
/Gemfile.lock
10+
/log/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERN
3636

3737
## License
3838

39-
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
39+
ARMS is open source software available under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Rakefile renamed to Rakefile.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
require "bundler/gem_tasks"
21
require "rake/testtask"
32

43
Rake::TestTask.new(:test) do |t|

arms.gemspec

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
lib = File.expand_path("../lib", __FILE__)
32
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
43
require "arms/version"
@@ -14,23 +13,15 @@ Gem::Specification.new do |spec|
1413
spec.homepage = "TODO: Put your gem's website or public repo URL here."
1514
spec.license = "MIT"
1615

17-
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18-
# to allow pushing to a single host or delete this section to allow pushing to any host.
19-
if spec.respond_to?(:metadata)
20-
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
21-
22-
spec.metadata["homepage_uri"] = spec.homepage
23-
spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here."
24-
spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
25-
else
26-
raise "RubyGems 2.0 or newer is required to protect against " \
27-
"public gem pushes."
28-
end
29-
16+
ignore_files = %w(.gitignore .travis.yml Gemfile test)
17+
ignore_files_re = %r{\A(#{ignore_files.map { |f| Regexp.escape(f) }.join('|')})(/|\z)}
3018
# Specify which files should be added to the gem when it is released.
3119
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32-
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20+
Dir.chdir(File.expand_path('..', __FILE__)) do
21+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(ignore_files_re) }
22+
spec.test_files = `git ls-files -z test`.split("\x0") + [
23+
'.simplecov',
24+
]
3425
end
3526
spec.bindir = "exe"
3627
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }

bin/console

Lines changed: 0 additions & 14 deletions
This file was deleted.

bin/setup

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/arms.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require "arms/version"
22

33
module ARMS
4-
class Error < StandardError; end
5-
# Your code goes here...
4+
class Error < StandardError
5+
end
66
end

lib/arms/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ARMS
2-
VERSION = "0.1.0"
2+
VERSION = "0.0.1"
33
end

test/arms_test.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ class ARMSTest < Minitest::Test
44
def test_that_it_has_a_version_number
55
refute_nil ::ARMS::VERSION
66
end
7-
8-
def test_it_does_something_useful
9-
assert false
10-
end
117
end

0 commit comments

Comments
 (0)