Skip to content

Commit

Permalink
Merge 05af267 into 0f85c68
Browse files Browse the repository at this point in the history
  • Loading branch information
danmayer committed Apr 26, 2020
2 parents 0f85c68 + 05af267 commit 86e9a50
Show file tree
Hide file tree
Showing 100 changed files with 1,215 additions and 1,279 deletions.
85 changes: 0 additions & 85 deletions .rubocop.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .standard.yml
@@ -0,0 +1,20 @@
ruby_version: 2.3
fix: false # default: false
parallel: true # default: false
format: progress # default: Standard::Formatter
default_ignores: false # default: true

ignore: # default: []
- "lib/**/*":
- Style/IdenticalConditionalBranches # these are just easier to read sometimes
- Style/IfInsideElse # these are just easier to read sometimes
- Standard/SemanticBlocks # not valid in older Ruby
- "vendor/**/*"
- "pkg/**/*"
- "test/**/*":
- Layout/AlignHash
- Style/GlobalVars
- Lint/InterpolationCheck # a test is verifying comments
- Standard/SemanticBlocks # not valid in older Ruby
- "test/benchmarks/benchmark.rake":
- Lint/UselessAssignment # oddity of memory benchmarking
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -36,7 +36,7 @@ services:
script:
- sudo ./lua/install.sh
- $HOME/lua51/bin/busted lua/test/*
- bundle exec rake rubocop
- bundle exec standardrb
- COVERBAND_HASH_REDIS_STORE=t bundle exec rake
- COVERBAND_HASH_REDIS_STORE=t bundle exec rake forked_tests
- bundle exec rake
Expand Down
10 changes: 5 additions & 5 deletions Gemfile
@@ -1,19 +1,19 @@
# frozen_string_literal: true

source 'https://rubygems.org'
source "https://rubygems.org"

# Specify your gem's dependencies in coverband.gemspec
gemspec

# add when debugging
# require 'byebug'; byebug
if ENV['CI']
if ENV["CI"]
# skipping pry-byebug as it has issues on Ruby 2.3 on travis
# and we don't really need it on CI
else
gem 'pry-byebug', platforms: [:mri, :mingw, :x64_mingw]
gem "pry-byebug", platforms: [:mri, :mingw, :x64_mingw]
end

gem 'rails', '~>5'
gem "rails", "~>5"
# these gems are used for testing gem tracking
gem 'irb', require: false
gem "irb", require: false
34 changes: 17 additions & 17 deletions Rakefile
@@ -1,8 +1,8 @@
# frozen_string_literal: true

require 'bundler/gem_tasks'
import 'test/benchmarks/benchmark.rake'
require 'rubocop/rake_task'
require "bundler/gem_tasks"
import "test/benchmarks/benchmark.rake"
require "rubocop/rake_task"

RuboCop::RakeTask.new

Expand All @@ -11,40 +11,40 @@ task default: %i[test]
task 'test:all': %i[rubocop test forked_tests benchmarks:memory benchmarks]

task :test
require 'rake/testtask'
require "rake/testtask"
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
test.libs << "lib" << "test"
# exclude benchmark from the tests as the way it functions resets code coverage during executions
# test.pattern = 'test/unit/*_test.rb'
# using test files opposed to pattern as it outputs which files are run
test.test_files = FileList['test/integration/**/*_test.rb', 'test/coverband/**/*_test.rb']
test.test_files = FileList["test/integration/**/*_test.rb", "test/coverband/**/*_test.rb"]
test.verbose = true
end

Rake::TestTask.new(:forked_tests) do |test|
if RUBY_PLATFORM == 'java'
puts 'forked tests not supported on JRuby'
if RUBY_PLATFORM == "java"
puts "forked tests not supported on JRuby"
else
test.libs << 'lib' << 'test'
test.test_files = FileList['test/forked/**/*_test.rb']
test.libs << "lib" << "test"
test.test_files = FileList["test/forked/**/*_test.rb"]
test.verbose = true
end
end

desc 'load irb with this gem'
desc "load irb with this gem"
task :console do
puts 'running console'
exec 'bundle console'
puts "running console"
exec "bundle console"
end

# This is really just for testing and development because without configuration
# Coverband can't do much
desc 'start webserver'
desc "start webserver"
task :server do
exec 'rackup -I lib'
exec "rackup -I lib"
end

desc 'publish gem with 2 factor auth, reminder how'
desc "publish gem with 2 factor auth, reminder how"
task :publish_gem do
exec 'gem push pkg/coverband-4.2.3.XXX.gem'
exec "gem push pkg/coverband-4.2.3.XXX.gem"
end
2 changes: 1 addition & 1 deletion config.ru
@@ -1,4 +1,4 @@
# frozen_string_literal: true

require ::File.expand_path('../lib/coverband', __FILE__)
require ::File.expand_path("../lib/coverband", __FILE__)
run Coverband::Reporters::Web.new
59 changes: 29 additions & 30 deletions coverband.gemspec
@@ -1,45 +1,44 @@
# frozen_string_literal: true

lib = File.expand_path('lib', __dir__)
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'coverband/version'
require "coverband/version"

Gem::Specification.new do |spec|
spec.name = 'coverband'
spec.version = Coverband::VERSION
spec.authors = ['Dan Mayer', 'Karl Baum']
spec.email = ['dan@mayerdan.com']
spec.description = 'Rack middleware to measure production code usage (LOC runtime usage)'
spec.summary = 'Rack middleware to measure production code usage (LOC runtime usage)'
spec.homepage = 'https://github.com/danmayer/coverband'
spec.license = 'MIT'
spec.name = "coverband"
spec.version = Coverband::VERSION
spec.authors = ["Dan Mayer", "Karl Baum"]
spec.email = ["dan@mayerdan.com"]
spec.description = "Rack middleware to measure production code usage (LOC runtime usage)"
spec.summary = "Rack middleware to measure production code usage (LOC runtime usage)"
spec.homepage = "https://github.com/danmayer/coverband"
spec.license = "MIT"

spec.files = `git ls-files`.split("\n").reject { |f| f.start_with?('docs') }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
spec.files = `git ls-files`.split("\n").reject { |f| f.start_with?("docs") }
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_development_dependency 'benchmark-ips'
spec.add_development_dependency 'capybara'
spec.add_development_dependency 'm'
spec.add_development_dependency 'memory_profiler'
spec.add_development_dependency 'minitest'
spec.add_development_dependency 'minitest-fork_executor'
spec.add_development_dependency 'mocha', '~> 1.7.0'
spec.add_development_dependency 'rack'
spec.add_development_dependency 'rack-test'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'resque'
spec.add_development_dependency 'rubocop'
spec.add_development_dependency 'rubocop-performance'
spec.add_development_dependency "benchmark-ips"
spec.add_development_dependency "capybara"
spec.add_development_dependency "m"
spec.add_development_dependency "memory_profiler"
spec.add_development_dependency "minitest"
spec.add_development_dependency "minitest-fork_executor"
spec.add_development_dependency "mocha", "~> 1.7.0"
spec.add_development_dependency "rack"
spec.add_development_dependency "rack-test"
spec.add_development_dependency "rake"
spec.add_development_dependency "resque"
spec.add_development_dependency "standardrb"

spec.add_development_dependency 'coveralls'
spec.add_development_dependency 'minitest-profile'
spec.add_development_dependency "coveralls"
spec.add_development_dependency "minitest-profile"

# TODO: Remove when other production adapters exist
# because the default configuration of redis store, we really do require
# redis now. I was reluctant to add this, but until we offer another production
# quality adapter, I think this is more honest about requirements and reduces confusion
# without this there was a race condition on calling coverband configure before redis was loaded
spec.add_runtime_dependency 'redis'
spec.add_runtime_dependency "redis"
end

0 comments on commit 86e9a50

Please sign in to comment.