moneypools-whenever 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  .DS_Store
2
2
  pkg
3
- doc
3
+ docmoneypools-whenever.gemspec
data/Rakefile CHANGED
@@ -29,4 +29,4 @@ end
29
29
 
30
30
  task :test => :check_dependencies
31
31
 
32
- task :default => :test
32
+ task :default => :test
@@ -10,21 +10,10 @@ module Whenever
10
10
  end
11
11
 
12
12
  def to_single_job
13
- options = @options.dup
14
- default_redirection = options.delete(:output)
15
-
16
13
  concatenation = @dependent ? " && " : "; "
17
- tasks_with_redirection = map do |t|
18
- if redirection = t.output_redirection.nil? || t.output_redirection == :not_set ? default_redirection : t.output_redirection
19
- t.output + " " + Output::Cron::OutputRedirection.new(redirection).to_s
20
- else
21
- t.output
22
- end
23
- end
24
-
25
- single_task = tasks_with_redirection.join(concatenation)
14
+ task = map(&:output).join(concatenation)
26
15
 
27
- Job::Default.new(options.merge(:task => single_task))
16
+ Job::Default.new(@options.merge(:task => task))
28
17
  end
29
18
  end
30
- end
19
+ end
@@ -1,3 +1,3 @@
1
1
  module Whenever
2
- VERSION = '0.4.1'
2
+ VERSION = '0.4.2'
3
3
  end unless defined?(Whenever::VERSION)
@@ -0,0 +1,86 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{moneypools-whenever}
8
+ s.version = "0.4.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Javan Makhmali"]
12
+ s.date = %q{2009-11-30}
13
+ s.description = %q{Clean ruby syntax for defining and deploying messy cron jobs.}
14
+ s.email = %q{javan@javan.us}
15
+ s.executables = ["whenever", "wheneverize"]
16
+ s.extra_rdoc_files = [
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".gitignore",
21
+ "CHANGELOG.rdoc",
22
+ "README.rdoc",
23
+ "Rakefile",
24
+ "bin/whenever",
25
+ "bin/wheneverize",
26
+ "lib/whenever.rb",
27
+ "lib/whenever/base.rb",
28
+ "lib/whenever/command_line.rb",
29
+ "lib/whenever/job_list.rb",
30
+ "lib/whenever/job_sequence.rb",
31
+ "lib/whenever/job_types/cap_task.rb",
32
+ "lib/whenever/job_types/default.rb",
33
+ "lib/whenever/job_types/rake_task.rb",
34
+ "lib/whenever/job_types/runner.rb",
35
+ "lib/whenever/outputs/cron.rb",
36
+ "lib/whenever/outputs/cron/output_redirection.rb",
37
+ "lib/whenever/version.rb",
38
+ "moneypools-whenever.gemspec",
39
+ "test/command_line_test.rb",
40
+ "test/cron_test.rb",
41
+ "test/in_sequence_test.rb",
42
+ "test/job_sequence_test.rb",
43
+ "test/output_at_test.rb",
44
+ "test/output_cap_test.rb",
45
+ "test/output_command_test.rb",
46
+ "test/output_env_test.rb",
47
+ "test/output_rake_test.rb",
48
+ "test/output_redirection_test.rb",
49
+ "test/output_runner_test.rb",
50
+ "test/test_helper.rb",
51
+ "whenever.gemspec"
52
+ ]
53
+ s.homepage = %q{http://github.com/javan/whenever}
54
+ s.rdoc_options = ["--charset=UTF-8"]
55
+ s.require_paths = ["lib"]
56
+ s.rubygems_version = %q{1.3.5}
57
+ s.summary = %q{Clean ruby syntax for defining and deploying messy cron jobs.}
58
+ s.test_files = [
59
+ "test/command_line_test.rb",
60
+ "test/cron_test.rb",
61
+ "test/in_sequence_test.rb",
62
+ "test/job_sequence_test.rb",
63
+ "test/output_at_test.rb",
64
+ "test/output_cap_test.rb",
65
+ "test/output_command_test.rb",
66
+ "test/output_env_test.rb",
67
+ "test/output_rake_test.rb",
68
+ "test/output_redirection_test.rb",
69
+ "test/output_runner_test.rb",
70
+ "test/test_helper.rb"
71
+ ]
72
+
73
+ if s.respond_to? :specification_version then
74
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
75
+ s.specification_version = 3
76
+
77
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
78
+ s.add_runtime_dependency(%q<chronic>, [">= 0.2.3"])
79
+ else
80
+ s.add_dependency(%q<chronic>, [">= 0.2.3"])
81
+ end
82
+ else
83
+ s.add_dependency(%q<chronic>, [">= 0.2.3"])
84
+ end
85
+ end
86
+
@@ -19,47 +19,6 @@ class InSequenceTest < Test::Unit::TestCase
19
19
  end
20
20
  end
21
21
 
22
- context "A pair of tasks in a sequence with output redirection" do
23
- setup do
24
- @output = Whenever.cron \
25
- <<-file
26
- set :path, '/my/path'
27
- every 1.day, :at => "20:15" do
28
- in_sequence do
29
- rake "first_task", :output => 'logfile1'
30
- rake "second_task", :output => 'logfile2'
31
- end
32
- end
33
- file
34
- end
35
-
36
- should "produce a set of tasks using individual output options" do
37
- assert_match 'rake first_task >> logfile1', @output
38
- assert_match 'rake second_task >> logfile2', @output
39
- end
40
- end
41
-
42
- context "A pair of tasks in a sequence with two levels of output redirection" do
43
- setup do
44
- @output = Whenever.cron \
45
- <<-file
46
- set :path, '/my/path'
47
- every 1.day, :at => "20:15" do
48
- in_sequence :output => 'fallthrough' do
49
- rake "first_task"
50
- rake "second_task", :output => 'logfile2'
51
- end
52
- end
53
- file
54
- end
55
-
56
- should "use the sequence level redirection as a default" do
57
- assert_match 'rake first_task >> fallthrough', @output
58
- assert_match 'rake second_task >> logfile2', @output
59
- end
60
- end
61
-
62
-
63
22
  context "A pair of tasks in the same time block that should be executed in a dependent sequence" do
64
23
  setup do
65
24
  @output = Whenever.cron \
data/whenever.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Javan Makhmali"]
12
- s.date = %q{2009-12-02}
12
+ s.date = %q{2009-11-30}
13
13
  s.description = %q{Clean ruby syntax for defining and deploying messy cron jobs.}
14
14
  s.email = %q{javan@javan.us}
15
15
  s.executables = ["whenever", "wheneverize"]
@@ -27,8 +27,6 @@ Gem::Specification.new do |s|
27
27
  "lib/whenever/base.rb",
28
28
  "lib/whenever/command_line.rb",
29
29
  "lib/whenever/job_list.rb",
30
- "lib/whenever/job_sequence.rb",
31
- "lib/whenever/job_types/cap_task.rb",
32
30
  "lib/whenever/job_types/default.rb",
33
31
  "lib/whenever/job_types/rake_task.rb",
34
32
  "lib/whenever/job_types/runner.rb",
@@ -37,10 +35,7 @@ Gem::Specification.new do |s|
37
35
  "lib/whenever/version.rb",
38
36
  "test/command_line_test.rb",
39
37
  "test/cron_test.rb",
40
- "test/in_sequence_test.rb",
41
- "test/job_sequence_test.rb",
42
38
  "test/output_at_test.rb",
43
- "test/output_cap_test.rb",
44
39
  "test/output_command_test.rb",
45
40
  "test/output_env_test.rb",
46
41
  "test/output_rake_test.rb",
@@ -57,10 +52,7 @@ Gem::Specification.new do |s|
57
52
  s.test_files = [
58
53
  "test/command_line_test.rb",
59
54
  "test/cron_test.rb",
60
- "test/in_sequence_test.rb",
61
- "test/job_sequence_test.rb",
62
55
  "test/output_at_test.rb",
63
- "test/output_cap_test.rb",
64
56
  "test/output_command_test.rb",
65
57
  "test/output_env_test.rb",
66
58
  "test/output_rake_test.rb",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moneypools-whenever
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javan Makhmali
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-02 00:00:00 -06:00
12
+ date: 2009-11-30 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -50,6 +50,7 @@ files:
50
50
  - lib/whenever/outputs/cron.rb
51
51
  - lib/whenever/outputs/cron/output_redirection.rb
52
52
  - lib/whenever/version.rb
53
+ - moneypools-whenever.gemspec
53
54
  - test/command_line_test.rb
54
55
  - test/cron_test.rb
55
56
  - test/in_sequence_test.rb