mirror of
https://github.com/plashchynski/crono.git
synced 2026-06-12 01:34:25 +02:00
Rename to Crono
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
+3
-3
@@ -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
|
||||
+2
-2
@@ -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"
|
||||
#
|
||||
@@ -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"
|
||||
Reference in New Issue
Block a user