lib/rufus/scheduler.rb in rufus-scheduler-3.3.1 vs lib/rufus/scheduler.rb in rufus-scheduler-3.3.2
- old
+ new
@@ -1,7 +1,7 @@
#--
-# Copyright (c) 2006-2016, John Mettraux, jmettraux@gmail.com
+# Copyright (c) 2006-2017, John Mettraux, jmettraux@gmail.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@@ -37,11 +37,11 @@
require 'rufus/scheduler/jobs'
require 'rufus/scheduler/cronline'
require 'rufus/scheduler/job_array'
require 'rufus/scheduler/locks'
- VERSION = '3.3.1'
+ VERSION = '3.3.2'
#
# A common error class for rufus-scheduler
#
class Error < StandardError; end
@@ -126,11 +126,11 @@
# For now, let's assume the people pointing at rufus-scheduler/master
# on GitHub know what they do...
#
def self.start_new
- fail "this is rufus-scheduler 3.0, use .new instead of .start_new"
+ fail "this is rufus-scheduler 3.x, use .new instead of .start_new"
end
def shutdown(opt=nil)
@started_at = nil
@@ -303,10 +303,10 @@
jobs = jobs.select { |j| j.running? }
elsif ! opts[:all]
jobs = jobs.reject { |j| j.next_time.nil? || j.unscheduled_at }
end
- tags = Array(opts[:tag] || opts[:tags]).collect { |t| t.to_s }
+ tags = Array(opts[:tag] || opts[:tags]).collect(&:to_s)
jobs = jobs.reject { |j| tags.find { |t| ! j.tags.include?(t) } }
jobs
end