whenever-delorean 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -4,22 +4,22 @@ Helper for integration testing. It helps you trigger your whener runners.
4
4
 
5
5
  En example usage. The below will result in TestHelper.a_dummy_method being called 30 times
6
6
 
7
- ```
8
- # config/schedule.rb
9
7
 
10
- every 1.week, :at => '4:30 am' do
8
+ # config/schedule.rb
9
+
10
+ every 1.week, :at => '4:30 am' do
11
11
  runner "TestHelper.something_else"
12
- end
12
+ end
13
13
 
14
- every 1.day, :at => '4:30 am' do
14
+ every 1.day, :at => '4:30 am' do
15
15
  runner "TestHelper.a_dummy_method"
16
16
  end
17
- ```
18
17
 
19
- ```
18
+
19
+
20
20
  # In your integration test
21
21
  WheneverDelorean.time_travel_to("30 days from now", :only => /a_dummy_method/)
22
- ```
22
+
23
23
 
24
24
  == Contributing to whenever-delorean
25
25
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -83,7 +83,7 @@ class WheneverDelorean
83
83
  end
84
84
 
85
85
  def schedule_data
86
- File.read(Rails.root+"/config/schedule.rb")
86
+ File.read(Rails.root+"config/schedule.rb")
87
87
  end
88
88
 
89
89
  def get_run_times(cron_time)
@@ -10,8 +10,8 @@ describe "WheneverDelorean" do
10
10
 
11
11
  it "should take us to the supplied time and trigger all whenever jobbs we pass" do
12
12
 
13
- Rails.should_receive(:root).and_return("/dummy-rails-root")
14
- File.should_receive(:read).with("/dummy-rails-root/config/schedule.rb").and_return(%{
13
+ Rails.should_receive(:root).and_return(Pathname.new("/dummy-rails-root"))
14
+ File.should_receive(:read).with(Pathname.new("/dummy-rails-root/config/schedule.rb")).and_return(%{
15
15
  every 1.day, :at => '4:30 am' do
16
16
  runner "TestHelper.a_dummy_method"
17
17
  end
@@ -24,8 +24,8 @@ describe "WheneverDelorean" do
24
24
 
25
25
  it 'should only run runners matching the regex' do
26
26
 
27
- Rails.should_receive(:root).and_return("/dummy-rails-root")
28
- File.should_receive(:read).with("/dummy-rails-root/config/schedule.rb").and_return(%{
27
+ Rails.should_receive(:root).and_return(Pathname.new("/dummy-rails-root"))
28
+ File.should_receive(:read).with(Pathname.new("/dummy-rails-root/config/schedule.rb")).and_return(%{
29
29
  every 1.day, :at => '4:30 am' do
30
30
  runner "TestHelper.a_dummy_method"
31
31
  end
@@ -43,8 +43,8 @@ describe "WheneverDelorean" do
43
43
 
44
44
  it 'should be able to handle multable runners' do
45
45
 
46
- Rails.should_receive(:root).and_return("/dummy-rails-root")
47
- File.should_receive(:read).with("/dummy-rails-root/config/schedule.rb").and_return(%{
46
+ Rails.should_receive(:root).and_return(Pathname.new("/dummy-rails-root"))
47
+ File.should_receive(:read).with(Pathname.new("/dummy-rails-root/config/schedule.rb")).and_return(%{
48
48
  every 1.day, :at => '4:30 am' do
49
49
  runner "TestHelper.a_dummy_method"
50
50
  end
@@ -62,8 +62,8 @@ describe "WheneverDelorean" do
62
62
 
63
63
  it 'should ignore rake tasks' do
64
64
 
65
- Rails.should_receive(:root).and_return("/dummy-rails-root")
66
- File.should_receive(:read).with("/dummy-rails-root/config/schedule.rb").and_return(%{
65
+ Rails.should_receive(:root).and_return(Pathname.new("/dummy-rails-root"))
66
+ File.should_receive(:read).with(Pathname.new("/dummy-rails-root/config/schedule.rb")).and_return(%{
67
67
  every 1.day, :at => '4:30 am' do
68
68
  rake "TestHelper.a_dummy_method"
69
69
  end
@@ -267,8 +267,8 @@ describe "WheneverDelorean" do
267
267
 
268
268
  it 'should return the data from the config/schedule.rb file' do
269
269
 
270
- Rails.should_receive(:root).and_return("/dummy_root")
271
- File.should_receive(:read).with("/dummy_root/config/schedule.rb").and_return("dummy data")
270
+ Rails.should_receive(:root).and_return(Pathname.new("/dummy_root"))
271
+ File.should_receive(:read).with(Pathname.new("/dummy_root/config/schedule.rb")).and_return("dummy data")
272
272
 
273
273
  subject.send(:schedule_data).should == "dummy data"
274
274
 
@@ -0,0 +1,70 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "whenever-delorean"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Darwin"]
12
+ s.date = "2013-04-22"
13
+ s.description = "Helper for integration testing. It helps you trigger your whener runners."
14
+ s.email = "darwin.git@marianna.se"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".rspec",
22
+ "Gemfile",
23
+ "Gemfile.lock",
24
+ "LICENSE.txt",
25
+ "README.rdoc",
26
+ "Rakefile",
27
+ "VERSION",
28
+ "lib/whenever-delorean.rb",
29
+ "spec/integration/whenever-delorean_spec.rb",
30
+ "spec/spec_helper.rb",
31
+ "spec/unit/whenever-delorean_spec.rb",
32
+ "whenever-delorean.gemspec"
33
+ ]
34
+ s.homepage = "http://github.com/bjornblomqvist/whenever-delorean"
35
+ s.licenses = ["LGPL"]
36
+ s.require_paths = ["lib"]
37
+ s.rubygems_version = "1.8.24"
38
+ s.summary = "Triggers your whener runners for you."
39
+
40
+ if s.respond_to? :specification_version then
41
+ s.specification_version = 3
42
+
43
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<delorean>, ["~> 2.1"])
45
+ s.add_runtime_dependency(%q<whenever>, ["~> 0.8"])
46
+ s.add_runtime_dependency(%q<parse-cron>, ["~> 0.1.2"])
47
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
48
+ s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
49
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
50
+ s.add_development_dependency(%q<ZenTest>, [">= 0"])
51
+ else
52
+ s.add_dependency(%q<delorean>, ["~> 2.1"])
53
+ s.add_dependency(%q<whenever>, ["~> 0.8"])
54
+ s.add_dependency(%q<parse-cron>, ["~> 0.1.2"])
55
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
56
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
57
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
58
+ s.add_dependency(%q<ZenTest>, [">= 0"])
59
+ end
60
+ else
61
+ s.add_dependency(%q<delorean>, ["~> 2.1"])
62
+ s.add_dependency(%q<whenever>, ["~> 0.8"])
63
+ s.add_dependency(%q<parse-cron>, ["~> 0.1.2"])
64
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
65
+ s.add_dependency(%q<rdoc>, ["~> 3.12"])
66
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
67
+ s.add_dependency(%q<ZenTest>, [">= 0"])
68
+ end
69
+ end
70
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whenever-delorean
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -143,6 +143,7 @@ files:
143
143
  - spec/integration/whenever-delorean_spec.rb
144
144
  - spec/spec_helper.rb
145
145
  - spec/unit/whenever-delorean_spec.rb
146
+ - whenever-delorean.gemspec
146
147
  homepage: http://github.com/bjornblomqvist/whenever-delorean
147
148
  licenses:
148
149
  - LGPL
@@ -158,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
158
159
  version: '0'
159
160
  segments:
160
161
  - 0
161
- hash: 136335431411580159
162
+ hash: 2185189826732141046
162
163
  required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  none: false
164
165
  requirements: