Skip to content

Commit 3dcc9e3

Browse files
committed
Cleanup/modernize Gem setup
Moving the executable to ./exe, updating metadata, etc...
1 parent 9af074b commit 3dcc9e3

File tree

3 files changed

+25
-18
lines changed

3 files changed

+25
-18
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.ruby-version
44
Gemfile.lock
55
coverage
6-
bin/autospec
76
bin/rspec
87
bin/rake
98
doc/
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env ruby
22

3-
require 'git_tracker'
3+
require "git_tracker"
44
GitTracker::Runner.execute(*ARGV)

git_tracker.gemspec

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,39 @@ Gem::Specification.new do |spec|
55
spec.version = GitTracker::VERSION
66
spec.authors = ["Steven Harman"]
77
spec.email = ["steven@harmanly.com"]
8-
spec.homepage = "https://github.com/stevenharman/git_tracker"
8+
99
spec.summary = "Teaching Git about Pivotal Tracker."
10-
spec.description = <<-EOF
10+
spec.description = <<~EOF
1111
Some simple tricks that make working with Pivotal Tracker even
1212
better... and easier... um, besier!
1313
EOF
14+
spec.homepage = "https://github.com/stevenharman/git_tracker"
15+
spec.license = "MIT"
16+
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
1417

15-
spec.add_development_dependency "rspec", "~> 3.8"
18+
spec.metadata = {
19+
"homepage_uri" => spec.homepage,
20+
"source_code_uri" => spec.homepage,
21+
"bug_tracker_uri" => "#{spec.homepage}/issues",
22+
"changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md"
23+
}
24+
25+
# Specify which files should be added to the gem when it is released.
26+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27+
spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
28+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29+
end
30+
spec.bindir = "exe"
31+
spec.executables = %w[git-tracker]
32+
spec.require_paths = ["lib"]
33+
spec.platform = Gem::Platform::RUBY
34+
35+
spec.add_development_dependency "activesupport", "~> 6.0"
1636
spec.add_development_dependency "pry", "~> 0.12"
1737
spec.add_development_dependency "rake", "~> 12.0"
38+
spec.add_development_dependency "rspec", "~> 3.8"
1839
# Simplecov 0.18+ is currently broken for the cc-test-reporter.
1940
# Until it's fixed, we need to stick to something pre-0.18
2041
# see: https://github.com/codeclimate/test-reporter/issues/413
2142
spec.add_development_dependency "simplecov", "~> 0.17.0"
22-
23-
if RUBY_VERSION >= "2.2.2"
24-
spec.add_development_dependency "activesupport", "~> 5.0"
25-
else
26-
spec.add_development_dependency "activesupport", "~> 4.0"
27-
end
28-
29-
spec.files = `git ls-files`.split("\n")
30-
spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
31-
spec.executables = %w[git-tracker]
32-
spec.platform = Gem::Platform::RUBY
33-
spec.require_paths = ["lib"]
34-
spec.required_ruby_version = ">= 2.4.0"
3543
end

0 commit comments

Comments
 (0)