-
Notifications
You must be signed in to change notification settings - Fork 97
Refactor of gem files and rake tasks #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
javierav
wants to merge
1
commit into
ipaddress-gem:master
Choose a base branch
from
javierav:gem-files
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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", "~> 5.22" | ||
| gem "rake", "~> 13.1" | ||
| gem "simplecov", "~> 0.22", require: false |
This file contains hidden or 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 (~> 5.22) | ||
| rake (~> 13.1) | ||
| simplecov (~> 0.22) | ||
|
|
||
| BUNDLED WITH | ||
| 2.5.6 |
This file contains hidden or 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 hidden or 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 hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 👍🏻