Skip to content

Commit 77c70c8

Browse files
Update gemspec
1 parent ca2f3a8 commit 77c70c8

File tree

1 file changed

+22
-14
lines changed

1 file changed

+22
-14
lines changed

json-streamer.gemspec

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
1-
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
3-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4-
require 'json/streamer/version'
1+
require_relative 'lib/json/streamer/version'
52

63
Gem::Specification.new do |spec|
7-
spec.name = "json-streamer"
8-
spec.version = Json::Streamer::VERSION
9-
spec.authors = ["thisismydesign"]
10-
spec.email = ["thisismydesign@users.noreply.github.com"]
4+
spec.name = "json-streamer"
5+
spec.version = Json::Streamer::VERSION
6+
spec.authors = ["thisismydesign"]
7+
spec.email = ["thisismydesign@users.noreply.github.com"]
118

12-
spec.summary = %q{Utility to support JSON streaming allowing you to get data based on various criteria (key, nesting level, etc)}
13-
spec.homepage = "https://github.com/thisismydesign/json-streamer"
14-
spec.license = "MIT"
9+
spec.summary = "Utility to support JSON streaming allowing you to get data based on various criteria (key, nesting level, etc)."
10+
spec.homepage = "https://github.com/thisismydesign/json-streamer"
11+
spec.license = "MIT"
1512

16-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17-
spec.bindir = "exe"
18-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
13+
spec.metadata['homepage_uri'] = spec.homepage
14+
spec.metadata['source_code_uri'] = 'https://github.com/thisismydesign/json-streamer'
15+
16+
# Specify which files should be added to the gem when it is released.
17+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18+
gemspec = File.basename(__FILE__)
19+
spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls|
20+
ls.readlines("\x0", chomp: true).reject do |f|
21+
(f == gemspec) ||
22+
f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile])
23+
end
24+
end
25+
spec.bindir = "exe"
26+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
1927
spec.require_paths = ["lib"]
2028

2129
# Because of `require_relative`

0 commit comments

Comments
 (0)