appjob 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "appjob/version"
3
+ require 'lib/appjob/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "appjob"
@@ -1,8 +1,7 @@
1
- require "appjob/version"
1
+ require 'appjob/version'
2
2
 
3
3
  class Appjob
4
4
  include Singleton
5
-
6
5
  EVERY_PATH = File.join(Rails.root,'config','every.rb')
7
6
 
8
7
  def self.job(at, to_job)
@@ -15,7 +14,7 @@ class Appjob
15
14
  if defined? Rails and RAILS_ENV and RAILS_ROOT
16
15
  log 'Init ok, env='+Rails.env.to_s
17
16
  Thread.abort_on_exception = true
18
- FileUtils.mv(File.join(File.dirname(__FILE__),'appjob','every.rb'), EVERY_PATH) unless File.exist? EVERY_PATH
17
+ FileUtils.cp(File.join(File.dirname(__FILE__),'appjob','every.rb'), EVERY_PATH) unless File.exist? EVERY_PATH
19
18
  eval(File.read(EVERY_PATH))
20
19
  else
21
20
  puts 'Appjob: No rails app detected'
@@ -1,3 +1,4 @@
1
1
  every 10.seconds do 'log "10 sec task"' end
2
2
  every 15.seconds do 'log "15 sec task"' end
3
3
  log "find me at app/config/every.rb"
4
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appjob
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeks
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-25 00:00:00 +04:00
18
+ date: 2011-10-26 00:00:00 +04:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -36,7 +36,6 @@ files:
36
36
  - appjob.gemspec
37
37
  - lib/appjob.rb
38
38
  - lib/appjob/every.rb
39
- - lib/appjob/version.rb
40
39
  has_rdoc: true
41
40
  homepage: http://github.com/ya-jeks/appjob
42
41
  licenses: []
@@ -1,3 +0,0 @@
1
- class Appjob
2
- VERSION = "0.0.7"
3
- end