|
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' |
5 | 2 |
|
6 | 3 | 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"] |
11 | 8 |
|
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" |
15 | 12 |
|
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) } |
19 | 27 | spec.require_paths = ["lib"]
|
20 | 28 |
|
21 | 29 | # Because of `require_relative`
|
|
0 commit comments