Skip to content

Commit

Permalink
More rubocop config tweaks, adding encoding comments for 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Feb 11, 2014
1 parent feddb60 commit c7c7af1
Show file tree
Hide file tree
Showing 27 changed files with 48 additions and 13 deletions.
9 changes: 8 additions & 1 deletion .rubocop.yml
Expand Up @@ -5,14 +5,21 @@
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

AllCops:
Includes:
- Gemfile
- Rakefile
- '*.gemspec'
- 'bin/*'

# Offence count: 1
CaseEquality:
Enabled: false

# Offence count: 1
# Configuration parameters: CountComments.
ClassLength:
Max: 318
Max: 319

# Offence count: 4
CyclomaticComplexity:
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
@@ -1,5 +1,4 @@
# vim:fileencoding=utf-8
source 'https://rubygems.org'

gemspec

gem 'yajl-ruby', '>= 1.1.0', :platforms => :mri, :group => :test
1 change: 1 addition & 0 deletions Rakefile
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'bundler/gem_tasks'
require 'rake/testtask'
require 'rubocop/rake_task'
Expand Down
1 change: 1 addition & 0 deletions lib/resque/scheduler.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'rufus/scheduler'
require 'resque/scheduler_locking'
require 'resque_scheduler/logger_builder'
Expand Down
1 change: 1 addition & 0 deletions lib/resque/scheduler/lock.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
%w[base basic resilient].each do |file|
require "resque/scheduler/lock/#{file}"
end
2 changes: 2 additions & 0 deletions lib/resque/scheduler/lock/base.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

module Resque
class Scheduler
module Lock
Expand Down
1 change: 1 addition & 0 deletions lib/resque/scheduler/lock/basic.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'resque/scheduler/lock/base'

module Resque
Expand Down
1 change: 1 addition & 0 deletions lib/resque/scheduler/lock/resilient.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'resque/scheduler/lock/base'

module Resque
Expand Down
2 changes: 2 additions & 0 deletions lib/resque/scheduler_locking.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

# ### Locking the scheduler process
#
# There are two places in resque-scheduler that need to be synchonized in order
Expand Down
1 change: 1 addition & 0 deletions lib/resque_scheduler.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'rubygems'
require 'resque'
require 'resque_scheduler/version'
Expand Down
2 changes: 1 addition & 1 deletion lib/resque_scheduler/cli.rb
Expand Up @@ -17,7 +17,7 @@ class Cli
},
{
args: ['-B', '--background', 'Run in the background [BACKGROUND]'],
callback: ->(options) { ->(b) { options[:background] = b } }
callback: ->(options) { ->(b) { options[:background] = b } }
},
{
args: ['-D', '--dynamic-schedule',
Expand Down
2 changes: 2 additions & 0 deletions lib/resque_scheduler/plugin.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

module ResqueScheduler
module Plugin
def self.hooks(job, pattern)
Expand Down
1 change: 1 addition & 0 deletions lib/resque_scheduler/server.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'resque_scheduler'
require 'resque/server'
require 'json'
Expand Down
2 changes: 2 additions & 0 deletions lib/resque_scheduler/util.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

module ResqueScheduler
class Util
# In order to upgrade to resque(1.25) which has deprecated following
Expand Down
18 changes: 9 additions & 9 deletions resque-scheduler.gemspec
Expand Up @@ -4,20 +4,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'resque_scheduler/version'

Gem::Specification.new do |spec|
spec.name = 'resque-scheduler'
spec.version = ResqueScheduler::VERSION
spec.authors = ['Ben VandenBos']
spec.email = ['bvandenbos@gmail.com']
spec.homepage = 'http://github.com/resque/resque-scheduler'
spec.summary = 'Light weight job scheduling on top of Resque'
spec.name = 'resque-scheduler'
spec.version = ResqueScheduler::VERSION
spec.authors = ['Ben VandenBos']
spec.email = ['bvandenbos@gmail.com']
spec.homepage = 'http://github.com/resque/resque-scheduler'
spec.summary = 'Light weight job scheduling on top of Resque'
spec.description = %q{Light weight job scheduling on top of Resque.
Adds methods enqueue_at/enqueue_in to schedule jobs in the future.
Also supports queueing jobs on a fixed, cron-like schedule.}
spec.license = 'MIT'

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

spec.add_development_dependency 'bundler', '~> 1.5'
Expand Down
2 changes: 2 additions & 0 deletions script/migrate_to_timestamps_set.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

require 'redis'
require 'resque'

Expand Down
1 change: 1 addition & 0 deletions test/cli_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'Cli' do
Expand Down
1 change: 1 addition & 0 deletions test/delayed_queue_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'DelayedQueue' do
Expand Down
1 change: 1 addition & 0 deletions test/resque-web_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

require 'resque/server/test_helper'
Expand Down
2 changes: 2 additions & 0 deletions test/scheduler_args_test.rb
@@ -1,3 +1,5 @@
# vim:fileencoding=utf-8

require_relative 'test_helper'

context 'scheduling jobs with arguments' do
Expand Down
1 change: 1 addition & 0 deletions test/scheduler_hooks_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'scheduling jobs with hooks' do
Expand Down
1 change: 1 addition & 0 deletions test/scheduler_locking_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

module LockTestHelper
Expand Down
1 change: 1 addition & 0 deletions test/scheduler_setup_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'Resque::Scheduler' do
Expand Down
1 change: 1 addition & 0 deletions test/scheduler_task_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'Resque::Scheduler' do
Expand Down
1 change: 1 addition & 0 deletions test/scheduler_test.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require_relative 'test_helper'

context 'Resque::Scheduler' do
Expand Down
1 change: 1 addition & 0 deletions test/support/redis_instance.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'socket'
require 'timeout'
require 'fileutils'
Expand Down
1 change: 1 addition & 0 deletions test/test_helper.rb
@@ -1,3 +1,4 @@
# vim:fileencoding=utf-8
require 'simplecov'

require 'test/unit'
Expand Down

0 comments on commit c7c7af1

Please sign in to comment.