chrono_trigger 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>chrono_trigger</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ </buildSpec>
9
+ <natures>
10
+ </natures>
11
+ </projectDescription>
@@ -1,3 +1,7 @@
1
+ == 0.2.1 2013-01-15
2
+ * 1 patch
3
+ * Upgraded support for Ruby 1.8.6
4
+
1
5
  == 0.2.0 2013-01-10
2
6
  * 1 enhancement
3
7
  * Upgraded to support Ruby 1.9.x
@@ -11,6 +11,7 @@ lib/chrono_trigger/runner.rb
11
11
  lib/chrono_trigger/shell.rb
12
12
  lib/chrono_trigger/tasks.rb
13
13
  lib/chrono_trigger/trigger.rb
14
+ lib/chrono_trigger/version.rb
14
15
  lib/triggers/test_triggers.rb
15
16
  script/console
16
17
  script/destroy
@@ -28,12 +28,12 @@ Other available options are:
28
28
 
29
29
  == REQUIREMENTS:
30
30
 
31
- * ActiveSupport >= 3.0.0
32
- * Ruby >= 1.9.x
31
+ * ActiveSupport >= 2.3.4
32
+ * Ruby >= 1.8.6
33
33
 
34
34
  == INSTALL:
35
35
 
36
- * sudo gem install chrono_trigger
36
+ * gem install chrono_trigger
37
37
 
38
38
  == LICENSE:
39
39
 
data/Rakefile CHANGED
@@ -1,25 +1,26 @@
1
- # %w[rubygems rake rake/clean fileutils newgem rubigen rake/testtask].each { |f| require f }
2
- # require File.dirname(__FILE__) + '/lib/chrono_trigger'
3
-
4
- require 'rake/testtask'
5
-
6
- Rake::TestTask.new do |t|
7
- t.libs << 'test'
8
- end
9
-
10
- desc "Run tests"
11
- task :default => :test
12
-
13
- begin
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |s|
16
- s.name = "chrono_trigger"
17
- s.summary = "TODO"
18
- s.email = "darful@gmail.com"
19
- s.homepage = ""
20
- s.description = "TODO"
21
- s.authors = ["Jon Ciccone"]
22
- end
23
- rescue LoadError
24
- puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
25
- end
1
+ # %w[rubygems rake rake/clean fileutils newgem rubigen rake/testtask].each { |f| require f }
2
+ # require File.dirname(__FILE__) + '/lib/chrono_trigger'
3
+
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new do |t|
7
+ t.libs << 'test'
8
+ end
9
+
10
+ desc "Run tests"
11
+ task :default => :test
12
+
13
+ begin
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |s|
16
+ s.name = "chrono_trigger"
17
+ s.authors = ["Jon Ciccone"]
18
+ s.date = "2013-01-10"
19
+ s.summary = "Rails cron jobs."
20
+ s.description = "This gem allows you to write, deploy, and maintain cron jobs withing the rails framework."
21
+ s.email = "darful@gmail.com"
22
+ s.homepage = "https://github.com/darful/chrono_trigger"
23
+ end
24
+ rescue LoadError
25
+ puts "Jeweler not available. Install it with: gem install technicalpickles-jeweler -s http://gems.github.com"
26
+ end
@@ -1,4 +1,4 @@
1
- ---
1
+ ---
2
2
  :major: 0
3
3
  :minor: 2
4
- :patch: 0
4
+ :patch: 1
@@ -1,64 +1,67 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
4
+
4
5
  # -*- encoding: utf-8 -*-
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "chrono_trigger"
8
- s.version = "0.2.0"
9
8
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
+ s.name = "chrono_trigger"
11
10
  s.authors = ["Jon Ciccone"]
12
11
  s.date = "2013-01-10"
13
- s.description = "c"
12
+ s.summary = "Rails cron jobs."
13
+ s.description = "This gem allows you to write, deploy, and maintain cron jobs withing the rails framework."
14
14
  s.email = "darful@gmail.com"
15
- s.executables = ["chrono_trigger"]
16
- s.extra_rdoc_files = [
17
- "README.rdoc"
18
- ]
15
+ s.homepage = "https://github.com/darful/chrono_trigger"
16
+ s.version = '0.2.1'
17
+
19
18
  s.files = [
20
- "History.txt",
21
- "Manifest.txt",
22
- "PostInstall.txt",
23
- "README.rdoc",
24
- "Rakefile",
25
- "VERSION.yml",
26
- "bin/chrono_trigger",
27
- "chrono_trigger.gemspec",
28
- "lib/chrono_trigger.rb",
29
- "lib/chrono_trigger/cron_entry.rb",
30
- "lib/chrono_trigger/process.rb",
31
- "lib/chrono_trigger/runner.rb",
32
- "lib/chrono_trigger/shell.rb",
33
- "lib/chrono_trigger/tasks.rb",
34
- "lib/chrono_trigger/trigger.rb",
35
- "lib/tasks/chrono_trigger.rake",
36
- "lib/triggers/test_triggers.rb",
37
- "script/console",
38
- "script/destroy",
39
- "script/generate",
40
- "test/test_chrono_trigger.rb",
41
- "test/test_cron_entry.rb",
42
- "test/test_helper.rb",
43
- "test/test_shell.rb",
44
- "test/test_trigger.rb",
45
- "test/triggers.rb"
19
+ ".project",
20
+ "History.txt",
21
+ "Manifest.txt",
22
+ "PostInstall.txt",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION.yml",
26
+ "bin/chrono_trigger",
27
+ "chrono_trigger.gemspec",
28
+ "lib/chrono_trigger.rb",
29
+ "lib/chrono_trigger/cron_entry.rb",
30
+ "lib/chrono_trigger/process.rb",
31
+ "lib/chrono_trigger/runner.rb",
32
+ "lib/chrono_trigger/shell.rb",
33
+ "lib/chrono_trigger/tasks.rb",
34
+ "lib/chrono_trigger/trigger.rb",
35
+ "lib/chrono_trigger/version.rb",
36
+ "lib/tasks/chrono_trigger.rake",
37
+ "lib/triggers/test_triggers.rb",
38
+ "script/console",
39
+ "script/destroy",
40
+ "script/generate",
41
+ "test/test_chrono_trigger.rb",
42
+ "test/test_cron_entry.rb",
43
+ "test/test_helper.rb",
44
+ "test/test_shell.rb",
45
+ "test/test_trigger.rb",
46
+ "test/triggers.rb"
46
47
  ]
47
- s.homepage = "https://rubygems.org/gems/chrono_trigger"
48
- s.rdoc_options = ["--charset=UTF-8"]
48
+ s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
49
+ s.test_files = s.files.grep(%r{^(test)/})
49
50
  s.require_paths = ["lib"]
50
- s.rubygems_version = "1.8.24"
51
- s.summary = "A cron framework for defining cron tasks using a readable DSL."
52
- s.test_files = [
53
- "test/test_chrono_trigger.rb",
54
- "test/test_cron_entry.rb",
55
- "test/test_helper.rb",
56
- "test/test_shell.rb",
57
- "test/test_trigger.rb",
58
- "test/triggers.rb"
59
- ]
51
+ s.extra_rdoc_files = ["README.rdoc"]
52
+
53
+ s.add_dependency "activesupport", ">= 2.3.4"
54
+ #s.add_dependency "activerecord", ">= 2.3.4"
55
+
56
+ s.add_development_dependency "shoulda", ">= 2.10"
57
+ s.add_development_dependency "mocha", ">= 0.9.5"
58
+
59
+ s.add_development_dependency "rubyforge"
60
+ s.add_development_dependency "git"
61
+ s.add_development_dependency "technicalpickles-jeweler"
60
62
 
61
63
  if s.respond_to? :specification_version then
64
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
62
65
  s.specification_version = 3
63
66
 
64
67
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -1,11 +1,14 @@
1
1
  $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
- module ChronoTrigger
5
- VERSION = '0.2.0'
4
+ if RUBY_VERSION =~ /1\.8\.6/
5
+ require "activerecord"
6
+ else
7
+ require "active_record"
6
8
  end
7
9
 
8
- require "active_support/all"
10
+ require 'active_support/all'
11
+ require "chrono_trigger/version"
9
12
  require "chrono_trigger/shell"
10
13
  require "chrono_trigger/trigger"
11
14
  require "chrono_trigger/cron_entry"
@@ -3,7 +3,7 @@ module ChronoTrigger
3
3
  class Process
4
4
 
5
5
  def run(options={})
6
- @t = Thread.new do
6
+ @thread = Thread.new do
7
7
  setup(options)
8
8
 
9
9
  shell = ChronoTrigger::Shell.new
@@ -14,11 +14,11 @@ module ChronoTrigger
14
14
  end
15
15
  end
16
16
 
17
- @t.join
17
+ @thread.join
18
18
  end
19
19
 
20
20
  def stop
21
- @t.exit
21
+ @thread.exit
22
22
  end
23
23
 
24
24
  private
@@ -27,7 +27,7 @@ module ChronoTrigger
27
27
  ENV['RAILS_ENV'] = options[:env] || "development"
28
28
 
29
29
  application_path = File.join(application_context, 'config', 'environment')
30
- STDOUT.puts "Loading application environment at #{File.join(application_context, 'config', 'environment')} for '#{ENV['RAILS_ENV']}' enviroment."
30
+ STDOUT.puts "Loading application environment at #{File.join(application_context, 'config', 'environment')} for '#{ENV['RAILS_ENV']}' environment."
31
31
  require(application_path)
32
32
  end
33
33
 
@@ -2,6 +2,7 @@ require File.join(File.dirname(__FILE__), 'process')
2
2
  require "logger"
3
3
  require 'optparse'
4
4
  require 'yaml'
5
+ require 'fileutils'
5
6
 
6
7
  module ChronoTrigger
7
8
  class Runner
@@ -0,0 +1,6 @@
1
+ # TODO: ideally we would call this from the gemspec file
2
+ # however, this approach does not work in ruby 1.8.6 (getting gem_original_require error)
3
+
4
+ module ChronoTrigger
5
+ VERSION = "0.2.1"
6
+ end
@@ -1,9 +1,9 @@
1
+ require 'rubygems'
2
+ require 'chrono_trigger'
1
3
  require 'stringio'
2
4
  require 'test/unit'
3
- require File.dirname(__FILE__) + '/../lib/chrono_trigger'
4
5
  require 'shoulda'
5
- require 'mocha/setup'
6
- require 'active_support/all'
6
+ require 'mocha'
7
7
 
8
8
 
9
9
  def quietly
@@ -1,5 +1,4 @@
1
1
  class TestTrigger < Test::Unit::TestCase
2
-
3
2
  context "A Trigger, @trigger," do
4
3
  setup do
5
4
  @trigger = ChronoTrigger::Trigger.new("test trigger")
@@ -155,7 +154,6 @@ class TestTrigger < Test::Unit::TestCase
155
154
  end
156
155
 
157
156
  should "raise an exception, which is caught, then retry the call method" do
158
- require "active_record"
159
157
  ActiveRecord::Base.stubs(:connection).returns(mock({:reconnect! => true}))
160
158
  assert_equal @value, @trigger.execute
161
159
  end
metadata CHANGED
@@ -1,24 +1,122 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: chrono_trigger
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 21
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 1
10
+ version: 0.2.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Jon Ciccone
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2013-01-10 00:00:00.000000000 Z
13
- dependencies: []
14
- description: c
17
+
18
+ date: 2013-01-10 00:00:00 -05:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: activesupport
23
+ prerelease: false
24
+ version_requirements: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 11
30
+ segments:
31
+ - 2
32
+ - 3
33
+ - 4
34
+ version: 2.3.4
35
+ type: :runtime
36
+ requirement: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: shoulda
39
+ prerelease: false
40
+ version_requirements: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 23
46
+ segments:
47
+ - 2
48
+ - 10
49
+ version: "2.10"
50
+ type: :development
51
+ requirement: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: mocha
54
+ prerelease: false
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 49
61
+ segments:
62
+ - 0
63
+ - 9
64
+ - 5
65
+ version: 0.9.5
66
+ type: :development
67
+ requirement: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: rubyforge
70
+ prerelease: false
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 3
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ type: :development
81
+ requirement: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ name: git
84
+ prerelease: false
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ hash: 3
91
+ segments:
92
+ - 0
93
+ version: "0"
94
+ type: :development
95
+ requirement: *id005
96
+ - !ruby/object:Gem::Dependency
97
+ name: technicalpickles-jeweler
98
+ prerelease: false
99
+ version_requirements: &id006 !ruby/object:Gem::Requirement
100
+ none: false
101
+ requirements:
102
+ - - ">="
103
+ - !ruby/object:Gem::Version
104
+ hash: 3
105
+ segments:
106
+ - 0
107
+ version: "0"
108
+ type: :development
109
+ requirement: *id006
110
+ description: This gem allows you to write, deploy, and maintain cron jobs withing the rails framework.
15
111
  email: darful@gmail.com
16
- executables:
112
+ executables:
17
113
  - chrono_trigger
18
114
  extensions: []
19
- extra_rdoc_files:
115
+
116
+ extra_rdoc_files:
20
117
  - README.rdoc
21
- files:
118
+ files:
119
+ - .project
22
120
  - History.txt
23
121
  - Manifest.txt
24
122
  - PostInstall.txt
@@ -34,6 +132,7 @@ files:
34
132
  - lib/chrono_trigger/shell.rb
35
133
  - lib/chrono_trigger/tasks.rb
36
134
  - lib/chrono_trigger/trigger.rb
135
+ - lib/chrono_trigger/version.rb
37
136
  - lib/tasks/chrono_trigger.rake
38
137
  - lib/triggers/test_triggers.rb
39
138
  - script/console
@@ -45,32 +144,41 @@ files:
45
144
  - test/test_shell.rb
46
145
  - test/test_trigger.rb
47
146
  - test/triggers.rb
48
- homepage: https://rubygems.org/gems/chrono_trigger
147
+ has_rdoc: true
148
+ homepage: https://github.com/darful/chrono_trigger
49
149
  licenses: []
150
+
50
151
  post_install_message:
51
- rdoc_options:
52
- - --charset=UTF-8
53
- require_paths:
152
+ rdoc_options: []
153
+
154
+ require_paths:
54
155
  - lib
55
- required_ruby_version: !ruby/object:Gem::Requirement
156
+ required_ruby_version: !ruby/object:Gem::Requirement
56
157
  none: false
57
- requirements:
58
- - - ! '>='
59
- - !ruby/object:Gem::Version
60
- version: '0'
61
- required_rubygems_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ hash: 3
162
+ segments:
163
+ - 0
164
+ version: "0"
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
62
166
  none: false
63
- requirements:
64
- - - ! '>='
65
- - !ruby/object:Gem::Version
66
- version: '0'
167
+ requirements:
168
+ - - ">="
169
+ - !ruby/object:Gem::Version
170
+ hash: 3
171
+ segments:
172
+ - 0
173
+ version: "0"
67
174
  requirements: []
175
+
68
176
  rubyforge_project:
69
- rubygems_version: 1.8.24
177
+ rubygems_version: 1.4.2
70
178
  signing_key:
71
179
  specification_version: 3
72
- summary: A cron framework for defining cron tasks using a readable DSL.
73
- test_files:
180
+ summary: Rails cron jobs.
181
+ test_files:
74
182
  - test/test_chrono_trigger.rb
75
183
  - test/test_cron_entry.rb
76
184
  - test/test_helper.rb