Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade the project to the conventions of the latest Ruby, Bundler, R…
…Spec, and Guard-RSpec But in order to preserve as much compatibility as possible with Ruby v1.8.7, don't touch: * The RubyGem's 'required_ruby_version' property * The RubyGem's mime-types dependency * Old-style hashrocket hash literals
- Loading branch information
Showing
107 changed files
with
1,901 additions
and
1,875 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,9 +1,12 @@ | ||
.bundle/ | ||
.rbx | ||
.ruby-gemset | ||
.ruby-version | ||
.yardoc/ | ||
*.gem | ||
Gemfile.lock | ||
doc/ | ||
pkg/* | ||
/.bundle/ | ||
/.rbx | ||
/.ruby-* | ||
/.yardoc/ | ||
/Gemfile.lock | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/spec/examples.txt | ||
/spec/reports/ | ||
/tmp/ |
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,2 +1,3 @@ | ||
--color | ||
--format progress | ||
--format documentation | ||
--require spec_helper |
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,26 +1,28 @@ | ||
source 'http://rubygems.org' | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
|
||
gem 'jruby-openssl', '~> 0', :platforms => :jruby | ||
|
||
group :debug do | ||
gem 'ruby-debug', '~> 0', :platforms => :mri_18 | ||
gem 'ruby-debug19', '~> 0', :platforms => :mri_19, :require => 'ruby-debug' | ||
gem 'pry-byebug', '~> 3' | ||
end | ||
|
||
group :development do | ||
gem 'codeclimate-test-reporter', '~> 0', :platforms => :mri_20, :require => false | ||
if RUBY_VERSION.start_with?('1.8') | ||
gem 'codeclimate-test-reporter', '> 0', '< 0.4.2', | ||
:require => false | ||
else | ||
gem 'codeclimate-test-reporter', '~> 0', :require => false | ||
end | ||
end | ||
|
||
group :doc do | ||
gem 'yard', '~> 0', :platforms => [:ruby, :mswin, :mingw] | ||
gem 'rdiscount', :platforms => [:ruby, :mswin, :mingw] | ||
gem 'yard', '~> 0', :require => false | ||
gem 'rdiscount', '~> 2', :require => false | ||
end | ||
|
||
group :tooling do | ||
gem 'guard-rspec', '~> 3' | ||
gem 'guard-rspec', '~> 4', :require => false | ||
if RUBY_PLATFORM =~ /darwin/i | ||
gem 'rb-fsevent', '~> 0', :require => false | ||
gem 'rb-fsevent', '~> 0', :require => false | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,35 @@ | ||
interactor :off | ||
require 'guard/rspec/dsl' | ||
|
||
guard :rspec, :cli => '--debug' do | ||
# Run the corresponding spec(s) (or all specs) when code changes. | ||
watch(%r{^lib/(.+)\.rb$}) do |match| | ||
corresponding_specs = Dir["spec/{integration,unit}/#{match[1]}_spec.rb"] | ||
corresponding_specs.empty? ? 'spec' : corresponding_specs | ||
end | ||
debug_option = begin | ||
require 'pry-byebug' | ||
' --require pry-byebug' | ||
rescue LoadError | ||
nil | ||
end | ||
guard :rspec, :all_on_start => true, | ||
:all_after_pass => true, | ||
:cmd => "bundle exec rspec --format progress#{debug_option}" do | ||
dsl = Guard::RSpec::Dsl.new(self) | ||
rspec, ruby = dsl.rspec, dsl.ruby | ||
|
||
# Run a spec when it changes. | ||
watch %r{^spec/.+_spec\.rb$} | ||
# RSpec files | ||
watch('.rspec') { rspec.spec_dir } | ||
watch rspec.spec_helper { rspec.spec_dir } | ||
watch rspec.spec_support { rspec.spec_dir } | ||
watch rspec.spec_files | ||
|
||
# Run all specs when the RSpec configuration changes. | ||
watch('.rspec' ) { 'spec' } | ||
watch('spec/spec_helper.rb') { 'spec' } | ||
# Run all specs when a shared spec changes. | ||
watch(%r{^spec/.+_sharedspec\.rb$}) { rspec.spec_dir } | ||
|
||
# Run all specs when the bundle changes. | ||
watch('Gemfile.lock') { 'spec' } | ||
watch('Gemfile.lock') { rspec.spec_dir } | ||
|
||
# Ruby files | ||
dsl.watch_spec_files_for ruby.lib_files | ||
|
||
# Run the corresponding spec(s) (or all specs) when code changes. | ||
watch(%r{^lib/(.+)\.rb$}) do |match| | ||
corresponding_specs = Dir["spec/{integration,unit}/#{match[1]}_spec.rb"] | ||
corresponding_specs.empty? ? rspec.spec_dir : corresponding_specs | ||
end | ||
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "htty" | ||
|
||
# You can add fixtures and/or initialization code here to make experimenting | ||
# with your gem easier. You can also use a different console, if you like. | ||
|
||
# (If you use this, don't forget to add pry to your Gemfile!) | ||
# require "pry" | ||
# Pry.start | ||
|
||
require "irb" | ||
IRB.start |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
|
||
which bundle || gem install bundler | ||
bundle | ||
|
||
# Do any other automated setup that you need to do here |
File renamed without changes.
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,36 +1,34 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path('../lib', __FILE__) | ||
# coding: utf-8 | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'htty/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = 'htty' | ||
s.version = HTTY::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.authors = ['Nils Jonsson'] | ||
s.email = ['htty@nilsjonsson.com'] | ||
s.homepage = 'http://htty.github.io' | ||
s.summary = 'The HTTP TTY' | ||
s.description = <<-end_description.gsub(/^\s+/, '').chomp | ||
htty is a console application for interacting with web servers. | ||
It's a fun way to explore web APIs and to learn the ins and | ||
outs of HTTP. | ||
end_description | ||
s.license = 'MIT' | ||
Gem::Specification.new do |spec| | ||
spec.name = 'htty' | ||
spec.version = HTTY::VERSION | ||
spec.authors = ['Nils Jonsson'] | ||
spec.email = ['nils@alumni.rice.edu'] | ||
|
||
s.required_ruby_version = '>= 1.8.7' | ||
spec.summary = 'The HTTP TTY' | ||
spec.description = <<-end_description.gsub(/^\s+/, '').chomp | ||
htty is a console application for interacting with web | ||
servers. It's a fun way to explore web APIs and to learn | ||
the ins and outs of HTTP. | ||
end_description | ||
spec.homepage = 'http://htty.github.io' | ||
spec.license = 'MIT' | ||
|
||
s.add_dependency 'mime-types', '~> 1' | ||
spec.required_ruby_version = '>= 1.8.7' | ||
|
||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'rspec', '~> 2' | ||
spec.add_dependency 'mime-types', '~> 1' | ||
spec.add_development_dependency 'bundler', '~> 1' | ||
spec.add_development_dependency 'rake', '~> 10' | ||
spec.add_development_dependency 'rspec', '~> 3' | ||
|
||
s.rubyforge_project = 'htty' | ||
s.has_rdoc = true | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
s.executables = `git ls-files -- bin/*`.split("\n").map do |f| | ||
File.basename f | ||
end | ||
s.require_paths = %w(lib) | ||
spec.files = `git ls-files -z`.split("\x0").reject do |f| | ||
f.match(%r{^(test|spec|features)/}) | ||
end | ||
spec.bindir = 'exe' | ||
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename f } | ||
spec.require_paths = %w(lib) | ||
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
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
Oops, something went wrong.