-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor of gem files and rake tasks
- Loading branch information
Showing
17 changed files
with
170 additions
and
229 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,20 +1,3 @@ | ||
*.a | ||
/.bundle/ | ||
*.bundle | ||
/coverage/ | ||
/doc/ | ||
.DS_Store | ||
/Gemfile.lock | ||
ipaddr.html | ||
mkmf.log | ||
*.o | ||
/pkg/ | ||
rdoc | ||
server.rb | ||
*.so | ||
/spec/reports/ | ||
*.sw? | ||
/tmp/ | ||
/_yardoc/ | ||
.idea/ | ||
**/*.gem | ||
/coverage | ||
/pkg | ||
/rdoc |
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,12 +1,7 @@ | ||
source "https://rubygems.org" | ||
|
||
group :development do | ||
gem 'bundler', '>= 1.0' | ||
gem 'rake', '10.5.0' | ||
gem 'minitest', '~> 5.8', '>= 5.8.4' | ||
gem 'pry', '>= 0.10.1' | ||
gem 'travis', '>= 1.8.2' | ||
gem 'jeweler', '>=2.0.1' | ||
gem 'codeclimate-test-reporter' | ||
gem 'simplecov' | ||
end | ||
gemspec | ||
|
||
gem "minitest" | ||
gem "rake" | ||
gem "simplecov", require: false |
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,31 @@ | ||
PATH | ||
remote: . | ||
specs: | ||
ipaddress (0.8.3) | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
docile (1.4.0) | ||
minitest (5.22.2) | ||
rake (13.1.0) | ||
simplecov (0.22.0) | ||
docile (~> 1.1) | ||
simplecov-html (~> 0.11) | ||
simplecov_json_formatter (~> 0.1) | ||
simplecov-html (0.12.3) | ||
simplecov_json_formatter (0.1.4) | ||
|
||
PLATFORMS | ||
arm64-darwin | ||
x86_64-darwin | ||
x86_64-linux | ||
|
||
DEPENDENCIES | ||
ipaddress! | ||
minitest | ||
rake | ||
simplecov | ||
|
||
BUNDLED WITH | ||
2.5.6 |
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,69 +1,22 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/clean' | ||
require "bundler/gem_tasks" | ||
require "rake/clean" | ||
require "rake/testtask" | ||
require "rdoc/task" | ||
|
||
require_relative "lib/ipaddress/version" | ||
|
||
require 'rake/testtask' | ||
Rake::TestTask.new(:test) do |test| | ||
test.libs << 'lib' << 'test' | ||
test.pattern = 'test/**/*_test.rb' | ||
test.verbose = true | ||
test.warning = true | ||
end | ||
|
||
begin | ||
require 'rcov/rcovtask' | ||
Rcov::RcovTask.new do |test| | ||
test.libs << 'test' | ||
test.pattern = 'test/**/*_test.rb' | ||
test.verbose = true | ||
end | ||
rescue LoadError | ||
task :rcov do | ||
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov" | ||
end | ||
end | ||
|
||
|
||
task :default => :test | ||
|
||
require 'rdoc/task' | ||
Rake::RDocTask.new do |rdoc| | ||
if File.exist?('VERSION.yml') | ||
config = YAML.load(File.read('VERSION.yml')) | ||
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}" | ||
else | ||
version = "" | ||
end | ||
|
||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = "ipaddress #{version}" | ||
rdoc.title = "ipaddress #{IPAddress::VERSION}" | ||
rdoc.rdoc_files.include('README*') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end | ||
|
||
desc "Open an irb session preloaded with this library" | ||
task :console do | ||
sh "irb -rubygems -I lib -r ipaddress.rb" | ||
end | ||
|
||
desc "Look for TODO and FIXME tags in the code" | ||
task :todo do | ||
def egrep(pattern) | ||
Dir['**/*.rb'].each do |fn| | ||
count = 0 | ||
open(fn) do |f| | ||
while line = f.gets | ||
count += 1 | ||
if line =~ pattern | ||
puts "#{fn}:#{count}:#{line}" | ||
end | ||
end | ||
end | ||
end | ||
end | ||
egrep /(FIXME|TODO|TBD)/ | ||
Rake::TestTask.new(:test) do |test| | ||
test.libs << 'lib' << 'test' | ||
test.pattern = 'test/**/*_test.rb' | ||
test.verbose = true | ||
test.warning = true | ||
end | ||
|
||
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |raketask| load raketask } | ||
task :default => :test |
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,7 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require "bundler/setup" | ||
require "irb" | ||
require "ipaddress" | ||
|
||
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,27 @@ | ||
#!/usr/bin/env ruby | ||
# frozen_string_literal: true | ||
|
||
# | ||
# This file was generated by Bundler. | ||
# | ||
# The application 'rake' is installed as part of a gem, and | ||
# this file is here to facilitate running it. | ||
# | ||
|
||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__) | ||
|
||
bundle_binstub = File.expand_path("bundle", __dir__) | ||
|
||
if File.file?(bundle_binstub) | ||
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler") | ||
load(bundle_binstub) | ||
else | ||
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. | ||
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") | ||
end | ||
end | ||
|
||
require "rubygems" | ||
require "bundler/setup" | ||
|
||
load Gem.bin_path("rake", "rake") |
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,6 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
IFS=$'\n\t' | ||
set -vx | ||
|
||
bundle install |
Oops, something went wrong.