Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
45 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,33 @@ | ||
# coding: utf-8 | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'GB2260/version' | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "GB2260" | ||
spec.name = 'GB2260' | ||
spec.version = GB2260::VERSION | ||
spec.authors = ["WolfLee"] | ||
spec.email = ["liyuan0228@gmail.com"] | ||
spec.authors = ['WolfLee'] | ||
spec.email = ['me@wolfl.ee'] | ||
|
||
spec.summary = %q{The Ruby implementation for looking up the Chinese administrative divisions.} | ||
spec.homepage = "https://github.com/wolflee/GB2260.rb" | ||
spec.license = "MIT" | ||
spec.summary = 'The Ruby implementation for looking up the Chinese administrative divisions.' | ||
spec.homepage = 'https://github.com/wolflee/GB2260.rb' | ||
spec.license = 'MIT' | ||
|
||
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or | ||
# delete this section to allow pushing this gem to any host. | ||
if spec.respond_to?(:metadata) | ||
spec.metadata['allowed_push_host'] = "https://rubygems.org" | ||
else | ||
raise "RubyGems 2.0 or newer is required to protect against public gem pushes." | ||
end | ||
raise 'RubyGems 2.0 or newer is required to protect against public gem pushes.' unless spec.respond_to?(:metadata) | ||
spec.metadata['allowed_push_host'] = 'https://rubygems.org' | ||
|
||
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } | ||
spec.files << Dir["data/*.txt"] | ||
spec.bindir = "exe" | ||
spec.files << Dir['data/**/*.tsv'] | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } | ||
spec.require_paths = ["lib"] | ||
spec.require_paths = ['lib'] | ||
|
||
spec.add_development_dependency "bundler", "~> 1.10" | ||
spec.add_development_dependency "rake", "~> 10.0" | ||
spec.add_development_dependency "rspec" | ||
spec.add_development_dependency "coveralls" | ||
spec.add_development_dependency 'bundler', '~> 1.10' | ||
spec.add_development_dependency 'rake', '~> 12.0' | ||
spec.add_development_dependency 'rspec', '~> 3.6' | ||
spec.add_development_dependency 'coveralls' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
class GB2260 | ||
LATEST_REVISION = '2014'.freeze | ||
DEFAULT_REVISION = 'stats/201607'.freeze | ||
PROVINCE_SUFFIX = '0000'.freeze | ||
PREFECTURE_SUFFIX = '00'.freeze | ||
NAMESPACE_SEPARATOR = '/'.freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters