urlenc 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f57b895c1180e277c8c858f0f49c98935e1788fab4b7939badb68e59025a73b6
4
+ data.tar.gz: c52e58377947a5dcc9fb5c4005ec6e665b9297d67f5ec5da3aea6098ff37586e
5
+ SHA512:
6
+ metadata.gz: 7b1722caf52befbda799dad4e38a15b2ce85240f724c5c4db86202e911a116d633c17b7e12f1077ebd56a295691f3c48ab0ac4f89f44bdd67a36bfcf028001fd
7
+ data.tar.gz: afe845b0d1f3bebb0db6e96266bed701fe81bb40965369f30940d5d045490063588f384b380ae0e104191423da2ae5ab70a39a136ebc94c877116b182e35d0da
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,34 @@
1
+ # ** Default values of all configuration are written in**
2
+ # https://github.com/rubocop-hq/rubocop/blob/master/config/default.yml
3
+ #
4
+ # Detail examples of each configuration are
5
+ # https://rubocop.readthedocs.io/en/latest/cops_layout
6
+ #
7
+ # General guide-line is
8
+ # https://github.com/rubocop-hq/ruby-style-guide
9
+
10
+ require:
11
+ - rubocop-performance
12
+ - rubocop-rspec
13
+
14
+ AllCops:
15
+ TargetRubyVersion: 2.5
16
+ NewCops: enable
17
+
18
+ Layout/EndAlignment:
19
+ Enabled: true
20
+ AutoCorrect: true
21
+
22
+ Layout/LineLength:
23
+ Enabled: true
24
+ AutoCorrect: false
25
+ Max: 120
26
+
27
+ Metrics/BlockLength:
28
+ Enabled: true
29
+ Max: 30
30
+ ExcludedMethods: ['describe', 'context']
31
+
32
+ Metrics/MethodLength:
33
+ Enabled: true
34
+ Max: 30
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.1
6
+ before_install: gem install bundler -v 2.1.4
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # Changelog
2
+
3
+ ## [v1.0.0](https://github.com/shinyaohtani/urlenc/tree/v1.0.0) (2020-05-20)
4
+
5
+ [Full Changelog](https://github.com/shinyaohtani/urlenc/compare/58edee48598a45d6b4cbb74c12058f99aa96f97c...v1.0.0)
6
+
7
+ - first release
8
+
9
+
10
+
11
+ \* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at shinya.ohtani@cookpad.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in urlenc.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.0'
data/Gemfile.lock ADDED
@@ -0,0 +1,136 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ urlenc (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ activesupport (6.0.3.1)
10
+ concurrent-ruby (~> 1.0, >= 1.0.2)
11
+ i18n (>= 0.7, < 2)
12
+ minitest (~> 5.1)
13
+ tzinfo (~> 1.1)
14
+ zeitwerk (~> 2.2, >= 2.2.2)
15
+ addressable (2.7.0)
16
+ public_suffix (>= 2.0.2, < 5.0)
17
+ ast (2.4.0)
18
+ async (1.26.1)
19
+ console (~> 1.0)
20
+ nio4r (~> 2.3)
21
+ timers (~> 4.1)
22
+ async-http (0.52.3)
23
+ async (~> 1.25)
24
+ async-io (~> 1.28)
25
+ async-pool (~> 0.2)
26
+ protocol-http (~> 0.20.0)
27
+ protocol-http1 (~> 0.13.0)
28
+ protocol-http2 (~> 0.14.0)
29
+ async-http-faraday (0.9.0)
30
+ async-http (~> 0.42)
31
+ faraday
32
+ async-io (1.29.0)
33
+ async (~> 1.14)
34
+ async-pool (0.3.2)
35
+ async (~> 1.25)
36
+ byebug (11.1.3)
37
+ coderay (1.1.2)
38
+ concurrent-ruby (1.1.6)
39
+ console (1.8.2)
40
+ diff-lcs (1.3)
41
+ faraday (1.0.1)
42
+ multipart-post (>= 1.2, < 3)
43
+ faraday-http-cache (2.2.0)
44
+ faraday (>= 0.8)
45
+ github_changelog_generator (1.15.2)
46
+ activesupport
47
+ async-http-faraday
48
+ faraday-http-cache
49
+ multi_json
50
+ octokit (~> 4.6)
51
+ rainbow (>= 2.2.1)
52
+ rake (>= 10.0)
53
+ retriable (~> 3.0)
54
+ i18n (1.8.2)
55
+ concurrent-ruby (~> 1.0)
56
+ method_source (1.0.0)
57
+ minitest (5.14.1)
58
+ multi_json (1.14.1)
59
+ multipart-post (2.1.1)
60
+ nio4r (2.5.2)
61
+ octokit (4.18.0)
62
+ faraday (>= 0.9)
63
+ sawyer (~> 0.8.0, >= 0.5.3)
64
+ parallel (1.19.1)
65
+ parser (2.7.1.2)
66
+ ast (~> 2.4.0)
67
+ protocol-hpack (1.4.2)
68
+ protocol-http (0.20.0)
69
+ protocol-http1 (0.13.0)
70
+ protocol-http (~> 0.19)
71
+ protocol-http2 (0.14.0)
72
+ protocol-hpack (~> 1.4)
73
+ protocol-http (~> 0.18)
74
+ pry (0.13.1)
75
+ coderay (~> 1.1)
76
+ method_source (~> 1.0)
77
+ pry-byebug (3.9.0)
78
+ byebug (~> 11.0)
79
+ pry (~> 0.13.0)
80
+ public_suffix (4.0.5)
81
+ rainbow (3.0.0)
82
+ rake (12.3.3)
83
+ retriable (3.1.2)
84
+ rexml (3.2.4)
85
+ rspec (3.9.0)
86
+ rspec-core (~> 3.9.0)
87
+ rspec-expectations (~> 3.9.0)
88
+ rspec-mocks (~> 3.9.0)
89
+ rspec-core (3.9.2)
90
+ rspec-support (~> 3.9.3)
91
+ rspec-expectations (3.9.2)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.9.0)
94
+ rspec-mocks (3.9.1)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.9.0)
97
+ rspec-support (3.9.3)
98
+ rubocop (0.83.0)
99
+ parallel (~> 1.10)
100
+ parser (>= 2.7.0.1)
101
+ rainbow (>= 2.2.2, < 4.0)
102
+ rexml
103
+ ruby-progressbar (~> 1.7)
104
+ unicode-display_width (>= 1.4.0, < 2.0)
105
+ rubocop-performance (1.5.2)
106
+ rubocop (>= 0.71.0)
107
+ rubocop-rspec (1.39.0)
108
+ rubocop (>= 0.68.1)
109
+ ruby-progressbar (1.10.1)
110
+ sawyer (0.8.2)
111
+ addressable (>= 2.3.5)
112
+ faraday (> 0.8, < 2.0)
113
+ thread_safe (0.3.6)
114
+ timers (4.3.0)
115
+ tzinfo (1.2.7)
116
+ thread_safe (~> 0.1)
117
+ unicode-display_width (1.7.0)
118
+ zeitwerk (2.3.0)
119
+
120
+ PLATFORMS
121
+ ruby
122
+
123
+ DEPENDENCIES
124
+ bundler (~> 2.0)
125
+ github_changelog_generator (>= 1.15.2)
126
+ pry (>= 0.13.1)
127
+ pry-byebug (>= 3.9.0)
128
+ rake (~> 12.0)
129
+ rspec (~> 3.0)
130
+ rubocop (>= 0.83.0)
131
+ rubocop-performance (>= 1.5.2)
132
+ rubocop-rspec (>= 1.39.0)
133
+ urlenc!
134
+
135
+ BUNDLED WITH
136
+ 2.1.4
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Shinya Ohtani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,65 @@
1
+ # Urlenc
2
+
3
+ The simplest way to URL encode / decode from STDIN. URL encoding is a generic name, more accurately called Percent-encoding. The URL encoding is by far the most well-known name, so we intentionally named this gem Urlenc.
4
+
5
+ See about Percent-encoding: [wikipedia](https://en.wikipedia.org/wiki/Percent-encoding)
6
+
7
+ ## Installation
8
+
9
+ Just install from rubygems:
10
+
11
+ $ gem install urlenc
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ $ # decode
17
+ $ echo "http://sample%20Text%21/" | urlenc -d
18
+ http://sample Text!/
19
+
20
+ $ # encode with split by /
21
+ $ echo "http://sample Text!/" | urlenc -es
22
+ http://sample%20Text%21/
23
+
24
+ $ # or just encode
25
+ $ echo "http://sample Text!/" | urlenc -e
26
+ http%3A%2F%2Fsample%20Text%21%2F
27
+ ```
28
+
29
+ ```
30
+ Usage: urlenc {decode/encode} [options]
31
+ Required:
32
+ -d, --decode Decode/unescape STDIN. %22Sample%20Text%21%22 to "Sample Text!"
33
+ -e, --encode Encode/escape STDIN. "Sample Text!" to %22Sample%20Text%21%22
34
+
35
+ Optional:
36
+ -s, --split Split before Encode/escape. http://sample Text!/ to http://sample%20Text%21/
37
+
38
+ Common options:
39
+ -h, --help Show this message
40
+ -V, --version Show version
41
+ ```
42
+
43
+ ## Development
44
+
45
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
46
+
47
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
48
+
49
+ ## Contributing
50
+
51
+ Bug reports and pull requests are welcome!
52
+ 1. Fork it ( https://github.com/shinyaohtani/urlenc )
53
+ 1. Create your feature branch (git checkout -b my-new-feature)
54
+ 1. Commit your changes (git commit -am 'Add some feature')
55
+ 1. Push to the branch (git push origin my-new-feature)
56
+ 1. Create a new Pull Request
57
+
58
+
59
+ ## License
60
+
61
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
62
+
63
+ ## Code of Conduct
64
+
65
+ Everyone interacting in the Urlenc project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/urlenc/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
9
+ require 'github_changelog_generator/task'
10
+ GitHubChangelogGenerator::RakeTask.new :changelog do |config|
11
+ config.base = 'CHANGELOG.md'
12
+ config.future_release = "v#{Urlenc::VERSION}"
13
+ config.project = 'urlenc'
14
+ config.user = 'shinyaohtani'
15
+ config.verbose = false
16
+
17
+ # other changelog options (values are default)
18
+ #
19
+ # -- labels
20
+ #:config.breaking_labels = ["backwards-incompatible", "Backwards incompatible", "breaking"]
21
+ #:config.bug_labels = ["bug", "Bug", "Type: Bug"]
22
+ #:config.deprecated_labels = ["deprecated", "Deprecated", "Type: Deprecated"]
23
+ #:config.enhancement_labels = ["enhancement", "Enhancement", "Type: Enhancement"]
24
+ #:config.exclude_labels = ['duplicate', 'question', 'invalid', 'wontfix',
25
+ #: 'Duplicate', 'Question', 'Invalid', 'Wontfix',
26
+ #: 'Meta: Exclude From Changelog']
27
+ #:config.removed_labels = ["removed", "Removed", "Type: Removed"]
28
+ #:config.security_labels = ["security", "Security", "Type: Security"]
29
+ #:config.summary_labels = ["Release summary", "release-summary", "Summary", "summary"]
30
+ # -- prefix
31
+ #:config.breaking_prefix = "**Breaking changes:**"
32
+ #:config.bug_prefix = "**Fixed bugs:**"
33
+ #:config.deprecated_prefix = "**Deprecated:**"
34
+ #:config.enhancement_prefix = "**Implemented enhancements:**"
35
+ #:config.header = "# Changelog"
36
+ #:config.issue_prefix = "**Closed issues:**"
37
+ #:config.merge_prefix = "**Merged pull requests:**"
38
+ #:config.removed_prefix = "**Removed:**"
39
+ #:config.security_prefix = "**Security fixes:**"
40
+ #:config.summary_prefix = ""
41
+ # -- others
42
+ #:config.add_issues_wo_labels = true
43
+ #:config.add_pr_wo_labels = true
44
+ #:config.add_sections = {}
45
+ #:config.author = true
46
+ #:config.compare_link = true
47
+ #:config.configure_sections = {}
48
+ #:config.date_format = "%Y-%m-%d"
49
+ #:config.filter_issues_by_milestone = true
50
+ #:config.http_cache = true
51
+ #:config.issue_line_labels = []
52
+ #:config.issues = true
53
+ #:config.max_issues = nil
54
+ #:config.output = "CHANGELOG.md"
55
+ #:config.pulls = true
56
+ #:config.require = []
57
+ #:config.simple_list = false
58
+ #:config.ssl_ca_file = nil
59
+ #:config.unreleased = true
60
+ #:config.unreleased_label = "Unreleased"
61
+ end
data/bin/console ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'urlenc'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/urlenc ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'urlenc'
5
+ conv = Urlenc::Urlenc.new
6
+ conv.parse_options
7
+ conv.run
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Urlenc
4
+ VERSION = '1.0.0'
5
+ DESCRIPTION = <<~DESC
6
+ Command line url-encode/decode helper.
7
+ The simplest way to URL encode / decode from STDIN.
8
+ DESC
9
+ REPOSITORY_URL = 'https://github.com/shinyaohtani/urlenc'
10
+ end
data/lib/urlenc.rb ADDED
@@ -0,0 +1,74 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'urlenc/version'
4
+
5
+ # Usage: urlenc [options]
6
+ # -d, --decode : Decode/unescape STDIN
7
+ # -e, --encode : Encode/escape STDIN
8
+ module Urlenc
9
+ require 'erb'
10
+ require 'optparse'
11
+
12
+ # Usage: urlenc [options]
13
+ # -d, --decode : Decode/unescape STDIN
14
+ # -e, --encode : Encode/escape STDIN
15
+ class Urlenc
16
+ attr_accessor :params
17
+
18
+ def initialize
19
+ @params = {}
20
+ end
21
+
22
+ def parse_options
23
+ OptionParser.new do |opts|
24
+ opts = define_options(opts)
25
+ opts.parse!(ARGV, into: @params)
26
+ if @params[:decode].nil? and @params[:encode].nil?
27
+ puts opts.help
28
+ end
29
+ end
30
+ end
31
+
32
+ def run
33
+ if @params[:decode]
34
+ STDIN.each { |line| puts CGI.unescape(line.chomp) }
35
+ elsif @params[:encode]
36
+ if @params[:split]
37
+ STDIN.each do |line|
38
+ protocol = line.chomp!.slice!(%r{^.+://}) || ''
39
+ puts protocol + line.split('/', -1).map { |e| ERB::Util.url_encode(e) }.join('/')
40
+ end
41
+ else
42
+ STDIN.each { |line| puts ERB::Util.url_encode(line.chomp) }
43
+ end
44
+ end
45
+ end
46
+
47
+ def define_options(opts)
48
+ opts.version = VERSION
49
+ opts.separator ' Required:'
50
+ opts.on('-d', '--decode', 'Decode/unescape STDIN. %22Sample%20Text%21%22 to "Sample Text!"') { |v| v }
51
+ opts.on('-e', '--encode', 'Encode/escape STDIN. "Sample Text!" to %22Sample%20Text%21%22') { |v| v }
52
+ opts.separator ''
53
+ opts.separator ' Optional:'
54
+ opts.on('-s', '--split', 'Split before Encode/escape. http://sample Text!/ to http://sample%20Text%21/') { |v| v }
55
+ opts.separator ''
56
+ opts.separator ' Common options:'
57
+ opts.on_tail('-h', '--help', 'Show this message') do
58
+ puts opts
59
+ exit
60
+ end
61
+ opts.on_tail('-V', '--version', 'Show version') do
62
+ puts opts.ver
63
+ exit
64
+ end
65
+ opts.banner = <<~BANNER
66
+
67
+ #{opts.ver}
68
+ #{DESCRIPTION}
69
+ Usage: #{opts.program_name} {decode/encode} [options]
70
+ BANNER
71
+ opts
72
+ end
73
+ end
74
+ end
data/urlenc.gemspec ADDED
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/urlenc/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'urlenc'
7
+ spec.version = Urlenc::VERSION
8
+ spec.authors = ['Shinya Ohtani (shinyaohtani@github)']
9
+ spec.email = ['shinya_ohtani@yahoo.co.jp']
10
+
11
+ spec.summary = 'The simplest way to URL encode / decode from STDIN.'
12
+ spec.description = Urlenc::DESCRIPTION
13
+ spec.homepage = Urlenc::REPOSITORY_URL + '/tree/master/README.md'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = Urlenc::REPOSITORY_URL
21
+ spec.metadata['changelog_uri'] = Urlenc::REPOSITORY_URL + '/tree/master/CHANGELOG.md'
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
26
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
+ end
28
+ spec.bindir = 'exe'
29
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
+ spec.require_paths = ['lib']
31
+
32
+ spec.add_development_dependency 'bundler', '~> 2.0'
33
+ spec.add_development_dependency 'github_changelog_generator', '>= 1.15.2'
34
+ spec.add_development_dependency 'pry', '>= 0.13.1'
35
+ spec.add_development_dependency 'pry-byebug', '>= 3.9.0'
36
+ spec.add_development_dependency 'rake', '>= 12.3.3'
37
+ spec.add_development_dependency 'rspec', '>= 3.9.0'
38
+ spec.add_development_dependency 'rubocop', '>= 0.83.0'
39
+ spec.add_development_dependency 'rubocop-performance', '>= 1.5.2'
40
+ spec.add_development_dependency 'rubocop-rspec', '>= 1.39.0'
41
+ end
metadata ADDED
@@ -0,0 +1,193 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: urlenc
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Shinya Ohtani (shinyaohtani@github)
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: github_changelog_generator
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.15.2
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: 1.15.2
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: 0.13.1
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.13.1
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry-byebug
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 3.9.0
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 3.9.0
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: 12.3.3
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 12.3.3
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: 3.9.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: 3.9.0
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: 0.83.0
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 0.83.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop-performance
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 1.5.2
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 1.5.2
125
+ - !ruby/object:Gem::Dependency
126
+ name: rubocop-rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: 1.39.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: 1.39.0
139
+ description: |
140
+ Command line url-encode/decode helper.
141
+ The simplest way to URL encode / decode from STDIN.
142
+ email:
143
+ - shinya_ohtani@yahoo.co.jp
144
+ executables:
145
+ - urlenc
146
+ extensions: []
147
+ extra_rdoc_files: []
148
+ files:
149
+ - ".gitignore"
150
+ - ".rspec"
151
+ - ".rubocop.yml"
152
+ - ".travis.yml"
153
+ - CHANGELOG.md
154
+ - CODE_OF_CONDUCT.md
155
+ - Gemfile
156
+ - Gemfile.lock
157
+ - LICENSE.txt
158
+ - README.md
159
+ - Rakefile
160
+ - bin/console
161
+ - bin/setup
162
+ - exe/urlenc
163
+ - lib/urlenc.rb
164
+ - lib/urlenc/version.rb
165
+ - urlenc.gemspec
166
+ homepage: https://github.com/shinyaohtani/urlenc/tree/master/README.md
167
+ licenses:
168
+ - MIT
169
+ metadata:
170
+ allowed_push_host: https://rubygems.org
171
+ homepage_uri: https://github.com/shinyaohtani/urlenc/tree/master/README.md
172
+ source_code_uri: https://github.com/shinyaohtani/urlenc
173
+ changelog_uri: https://github.com/shinyaohtani/urlenc/tree/master/CHANGELOG.md
174
+ post_install_message:
175
+ rdoc_options: []
176
+ require_paths:
177
+ - lib
178
+ required_ruby_version: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: 2.3.0
183
+ required_rubygems_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ requirements: []
189
+ rubygems_version: 3.1.2
190
+ signing_key:
191
+ specification_version: 4
192
+ summary: The simplest way to URL encode / decode from STDIN.
193
+ test_files: []