Rename to Crono

This commit is contained in:
Dzmitry Plashchynski
2015-03-03 13:51:40 +02:00
parent 6b185c44ac
commit 3652e9525a
18 changed files with 45 additions and 45 deletions
+8
View File
@@ -0,0 +1,8 @@
module Crono
end
require "active_support/all"
require "crono/version.rb"
require "crono/period.rb"
require "crono/config.rb"
require "crono/performer_proxy.rb"
+3 -3
View File
@@ -1,6 +1,6 @@
require 'periodicity'
require 'crono'
module Periodicity
module Crono
class CLI
include Singleton
@@ -10,7 +10,7 @@ module Periodicity
end
def print_banner
puts "Loading Periodicity #{Periodicity::VERSION}"
puts "Loading Crono #{Crono::VERSION}"
puts "Running in #{RUBY_DESCRIPTION}"
end
@@ -1,4 +1,4 @@
module Periodicity
module Crono
class Config
include Singleton
@@ -1,4 +1,4 @@
module Periodicity
module Crono
class PerformerProxy
def initialize(performer)
@performer = performer
@@ -1,4 +1,4 @@
module Periodicity
module Crono
class Period
def initialize(period, at: nil)
@period = period
@@ -1,3 +1,3 @@
module Periodicity
module Crono
VERSION = "0.0.1"
end
@@ -1,11 +1,11 @@
module Periodicity
module Crono
module Generators
class InstallGenerator < ::Rails::Generators::Base
desc "Installs periodicity and generates the necessary configuration files"
desc "Installs crono and generates the necessary configuration files"
source_root File.expand_path("../templates", __FILE__)
def copy_config
template 'periodicity.rb.erb', 'config/initializers/periodicity.rb'
template 'crono.rb.erb', 'config/initializers/crono.rb'
end
end
end
@@ -1,9 +1,9 @@
# Periodicity configuration file
# Crono configuration file
#
# Here you can specify periodic jobs and their schedule.
# You can specify a periodic job as a ActiveJob class in `app/jobs/`
# Actually you can use any class. The only requirement is that
# the class should implement a method `perform` without arguments.
#
# Periodicity.perform(TestJob).every 2.days, at: "15:30"
# Crono.perform(TestJob).every 2.days, at: "15:30"
#
-8
View File
@@ -1,8 +0,0 @@
module Periodicity
end
require "active_support/all"
require "periodicity/version.rb"
require "periodicity/period.rb"
require "periodicity/config.rb"
require "periodicity/performer_proxy.rb"