hscode 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/.rubocop.yml +15 -0
- data/.travis.yml +12 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/Guardfile +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +43 -0
- data/Rakefile +16 -0
- data/bin/console +7 -0
- data/bin/hscode +6 -0
- data/bin/setup +8 -0
- data/config/bootstrap.rb +17 -0
- data/hscode.gemspec +37 -0
- data/lib/hscode/http_status_codes.rb +1089 -0
- data/lib/hscode/input_parser.rb +86 -0
- data/lib/hscode/pretty_print.rb +22 -0
- data/lib/hscode/version.rb +3 -0
- data/lib/hscode.rb +37 -0
- metadata +234 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2055736969d0ddddb095352ed20239b6fb0c42a9
|
4
|
+
data.tar.gz: 97ba8fe2b210fb928ba6af8601938b47a64a4824
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ee15ec11297adb2b110f6850f10c2bd2433623b33a84ba43b8e938d7999d6aa5ac4846c385fcb8f8cd6bed7eaaf08056161aed869c3e2562be7fca7f916cbffd
|
7
|
+
data.tar.gz: 1f4a8618bc3979adb4154a91e746905ac0c11d0d8d7a08dc64c35fa09a83e02db3190c7e4e3e2e798ae4ec4d1c72e8ebd8ffb84de5aba4974c9cf33cdf6c2356
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "Gemfile"
|
4
|
+
- "*.gemspec"
|
5
|
+
- "spec/spec_helper.rb"
|
6
|
+
- "config/**/*"
|
7
|
+
UseCache: false
|
8
|
+
Style/Documentation:
|
9
|
+
Exclude:
|
10
|
+
- "lib/**/*"
|
11
|
+
Metrics/ModuleLength:
|
12
|
+
Enabled: false
|
13
|
+
Metrics/MethodLength:
|
14
|
+
Exclude:
|
15
|
+
- "lib/hscode/input_parser.rb"
|
data/.travis.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
sudo: false
|
2
|
+
language: ruby
|
3
|
+
rvm:
|
4
|
+
- 2.3.0
|
5
|
+
before_install:
|
6
|
+
- gem update --system
|
7
|
+
- gem install bundler
|
8
|
+
deploy:
|
9
|
+
provider: rubygems
|
10
|
+
api_key:
|
11
|
+
secure: cd9ccxc+uEbo+ibEVEsDdgbFEjjoWrNfh6JJmtVvkJW25pyNj/kUhUcguCGobUH5o/3HqYBAQMggiT1haV3fzOA+Lp1NEu1EfECtqh9+JNZBqjx1EXn7EGV/M2I5rsxiaWtn6mtPHiKOC6DZMsgZZ1t/n8E9W5w91eqSeSBfsA0lE5juAbNJN4hjB9vFa9/VO0ZcfI9NDyhjYTzZdE058TZ0PANO773k8g252qdtUYDpx7g8TrUlNZzDEcP/Dodq46doNUxJvxz/TI4YyOJ2gA+SkyA93gHcW73ZddR5A7dwOq1DTHvJqlk9Xg5OAF5UqItvYkYlCYyUmFvmcy7HNVEPiImxmvV07W3O/inTiYqn4h8VYyHrYIRdK8T3hSKqocUGbboTclZ7wPUfBKvW9L3AXNLk7OGMclET0zAgXGETJnbPSApqFG9Y36IN+pRfCjrnqrzopb37lc0qai+PzN/VoKWyNqnbO7iYlnuFeGr4+gV3GBN73xkmJEa/hD6G5IOCtFK1cLVTATIiDNBE3NU06n6LD2z9geCpLYHBdswcFAb7CGhgTTxsU1sgcnu3uBOJDxBjGtb42bt54XX90aR2HCgQbarlA22xq+sXvjpvF1382j/fhqNnZyYH91+dHM9qVde7Yiw8waIdZP347BrUZmLRDo3AOhNuDj9b2pw=
|
12
|
+
gem: hscode
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at austin.kabiru@andela.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/Guardfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Austin Kabiru
|
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,43 @@
|
|
1
|
+
[![codebeat badge](https://codebeat.co/badges/b4067adc-06cb-4142-a985-519555be3070)](https://codebeat.co/projects/github-com-akabiru-hscode) [![Dependency Status](https://gemnasium.com/badges/github.com/akabiru/hscode.svg)](https://gemnasium.com/github.com/akabiru/hscode) [![Inline docs](http://inch-ci.org/github/akabiru/hscode.svg?branch=master)](http://inch-ci.org/github/akabiru/hscode) [![Coverage Status](https://coveralls.io/repos/github/akabiru/hscode/badge.svg?branch=master)](https://coveralls.io/github/akabiru/hscode?branch=master) [![Build Status](https://travis-ci.org/akabiru/hscode.svg?branch=master)](https://travis-ci.org/akabiru/hscode)
|
2
|
+
|
3
|
+
# Hscode
|
4
|
+
|
5
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/hscode`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
+
|
7
|
+
TODO: Delete this and the text above, and describe your gem
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Add this line to your application's Gemfile:
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
gem 'hscode'
|
15
|
+
```
|
16
|
+
|
17
|
+
And then execute:
|
18
|
+
|
19
|
+
$ bundle
|
20
|
+
|
21
|
+
Or install it yourself as:
|
22
|
+
|
23
|
+
$ gem install hscode
|
24
|
+
|
25
|
+
## Usage
|
26
|
+
|
27
|
+
TODO: Write usage instructions here
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
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.
|
32
|
+
|
33
|
+
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).
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hscode. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
38
|
+
|
39
|
+
|
40
|
+
## License
|
41
|
+
|
42
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
43
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
require 'rubocop/rake_task'
|
4
|
+
require_relative 'config/bootstrap'
|
5
|
+
|
6
|
+
RSpec::Core::RakeTask.new(:spec)
|
7
|
+
RuboCop::RakeTask.new
|
8
|
+
|
9
|
+
namespace :setup do
|
10
|
+
desc 'source environment variables'
|
11
|
+
task :env do
|
12
|
+
Bootstrap::Config.get
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
task default: [:spec, :rubocop]
|
data/bin/console
ADDED
data/bin/hscode
ADDED
data/bin/setup
ADDED
data/config/bootstrap.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# encoding: UTF-8
|
3
|
+
|
4
|
+
$app_root = File.expand_path('../../', __FILE__)
|
5
|
+
|
6
|
+
require 'yaml'
|
7
|
+
require 'erb'
|
8
|
+
|
9
|
+
module Bootstrap
|
10
|
+
module Config
|
11
|
+
def self.get
|
12
|
+
YAML.load(
|
13
|
+
ERB.new(File.read("#{$app_root}/config/env.yaml")).result
|
14
|
+
).each { |key, value| ENV[key] = value }
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/hscode.gemspec
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hscode/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'hscode'
|
8
|
+
spec.version = Hscode::VERSION
|
9
|
+
spec.version = "#{spec.version}-alpha-#{ENV['TRAVIS_BUILD_NUMBER']}" if ENV['TRAVIS']
|
10
|
+
spec.authors = ['Herbert Kagumba', 'Austin Kabiru']
|
11
|
+
spec.email = ['makabby@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = %q{A HTTP status code lookup command line tool.}
|
14
|
+
spec.description = %q{Quickly look up any status code without leaving your terminal.}
|
15
|
+
spec.homepage = 'https://github.com/akabiru/hscode'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
19
|
+
spec.bindir = 'bin'
|
20
|
+
spec.executables = ['hscode']
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
25
|
+
spec.add_development_dependency 'pry', '~> 0.10'
|
26
|
+
spec.add_development_dependency 'guard', '~> 2.14'
|
27
|
+
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
29
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.12'
|
31
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
32
|
+
|
33
|
+
spec.add_development_dependency 'yard', '~> 0.9'
|
34
|
+
spec.add_development_dependency 'rubocop', '~> 0.42'
|
35
|
+
spec.add_development_dependency 'brakeman', '~> 3.3'
|
36
|
+
spec.add_development_dependency 'rubycritic', '~> 2.9'
|
37
|
+
end
|