-
-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy working setup from master (#420)
* Copy working setup from master * Remove unused configuration (rspec-retry) * Fix broken specs * Make specs more reliable * Fix sidekiq develop (#426) * Mandatory rubocop commit * Allow failures on sidekiq.develop # Conflicts: # lib/sidekiq_unique_jobs/version_check.rb # spec/sidekiq_unique_jobs/key_spec.rb * Mandatory rubocop commit * Fix tests * Update ruby versions Takes care of some security breaches * Prevent JRuby from using Pry * Use pry for jruby * Use fake irb too for the sake of jfuckingruby * Make testing of console_class.start work * Mandatory rubocop commit * Another mandatory rubocop commit * Include .simplecov with rubocop * Cleanup after experiments * Unfortunately truffleruby is sooooo slooooow * Update rubocop 💣 * Fix compatibility with Sidekiq 6.0. logger * Fix .yardopts * Improve performance by avoiding the block arg
- Loading branch information
Showing
43 changed files
with
509 additions
and
278 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
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,20 +1,24 @@ | ||
require 'simplecov-json' | ||
# frozen_string_literal: true | ||
|
||
SimpleCov.command_name 'RSpec' | ||
require "simplecov-json" | ||
|
||
SimpleCov.command_name "RSpec" | ||
# SimpleCov.refuse_coverage_drop | ||
SimpleCov.formatters = [ | ||
SimpleCov::Formatter::HTMLFormatter, | ||
SimpleCov::Formatter::JSONFormatter, | ||
] | ||
|
||
SimpleCov.start do | ||
add_filter '/spec/' | ||
add_filter '/bin/' | ||
add_filter '/gemfiles/' | ||
add_filter '/examples/' | ||
add_filter "/spec/" | ||
add_filter "/bin/" | ||
add_filter "/gemfiles/" | ||
add_filter "/lib/sidekiq/" | ||
add_filter "/lib/sidekiq_unique_jobs/testing.rb" | ||
add_filter "/lib/sidekiq_unique_jobs/core_ext.rb" | ||
|
||
add_group 'Client', 'lib/sidekiq_unique_jobs/client' | ||
add_group 'Locks', 'lib/sidekiq_unique_jobs/lock' | ||
add_group 'Server', 'lib/sidekiq_unique_jobs/server' | ||
add_group 'Timeout', 'lib/sidekiq_unique_jobs/timeout' | ||
add_group "Locks", "lib/sidekiq_unique_jobs/lock" | ||
add_group "Middelware", "lib/sidekiq_unique_jobs/middleware" | ||
add_group "Redis", "lib/sidekiq_unique_jobs/redis" | ||
add_group "Timeout", "lib/sidekiq_unique_jobs/timeout" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,8 @@ | ||
--no-private --markup-provider=redcarpet --markup=markdown lib/**/*.rb - README.md | ||
--no-private | ||
--markup-provider=redcarpet | ||
--markup=markdown | ||
--exclude lib/sidekiq_unique_jobs/testing.rb | ||
--exclude lib/sidekiq_unique_jobs/web/helpers.rb | ||
--readme README.md | ||
--files CHANGELOG.md,LICENSE.txt | ||
lib/sidekiq_unique_jobs/**/*.rb |
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,26 +1,57 @@ | ||
guard :rspec, cmd: "env COV=false bundle exec rspec" do | ||
require "guard/rspec/dsl" | ||
dsl = Guard::RSpec::Dsl.new(self) | ||
|
||
# RSpec files | ||
rspec = dsl.rspec | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" } | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/integration/#{m[1]}_spec.rb" } | ||
watch(%r{^examples/(.+)\.rb$}) { |m| "spec/examples/#{m[1]}_spec.rb" } | ||
watch(rspec.spec_helper) { rspec.spec_dir } | ||
watch(rspec.spec_support) { rspec.spec_dir } | ||
watch(rspec.spec_files) | ||
|
||
ruby = dsl.ruby | ||
dsl.watch_spec_files_for(ruby.lib_files) | ||
end | ||
REEK_ARGS = %w[ | ||
--line-numbers | ||
--color | ||
--documentation | ||
--progress | ||
--single-line | ||
--sort-by smelliness | ||
].freeze | ||
|
||
RUBOCOP_ARGS = %w[ | ||
-P | ||
--format fuubar | ||
].freeze | ||
|
||
RSPEC_OPTIONS = { | ||
cmd: "env COV=true bundle exec rspec", | ||
# cmd_additional_args: "--format documentation", | ||
failed_mode: :focus, | ||
all_on_start: false | ||
} | ||
|
||
scope group: :tdd | ||
clearing :on | ||
notification :terminal_notifier, app_name: "sidekiq-unique-jobs ::", activate: "com.googlecode.iTerm2" if `uname` =~ /Darwin/ | ||
|
||
group :tdd, halt_on_fail: true do | ||
guard :rspec, RSPEC_OPTIONS do | ||
require "guard/rspec/dsl" | ||
dsl = Guard::RSpec::Dsl.new(self) | ||
|
||
# RSpec files | ||
rspec = dsl.rspec | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" } | ||
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/integration/#{m[1]}_spec.rb" } | ||
watch(%r{^spec/support/workers/(.+)\.rb$}) { |m| "spec/workers/#{m[1]}_spec.rb" } | ||
watch(rspec.spec_helper) { rspec.spec_dir } | ||
watch(rspec.spec_support) { rspec.spec_dir } | ||
watch(rspec.spec_files) | ||
|
||
ruby = dsl.ruby | ||
dsl.watch_spec_files_for(ruby.lib_files) | ||
end | ||
|
||
guard :rubocop, all_on_start: false, cli: RUBOCOP_ARGS do | ||
watch(%r{.+\.rb$}) | ||
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) } | ||
end | ||
|
||
guard :rubocop do | ||
watch(%r{.+\.rb$}) | ||
watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) } | ||
guard :reek, all_on_start: false, cli: REEK_ARGS do | ||
watch(%r{.+\.rb$}) | ||
watch('.reek') | ||
end | ||
end | ||
|
||
guard 'reek' do | ||
watch(%r{.+\.rb$}) | ||
watch('.reek') | ||
guard :bundler do | ||
watch('Gemfile') | ||
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
Oops, something went wrong.