schked 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b8d89cfb704a3c2a42eb8a57b8c461fbe22f1e1f038b7a38909607a669b840f
4
- data.tar.gz: 1fb1b70fb8f1fff49beb7448fb5a7a0b607869aaa8c951fe8c51e442dfb99322
3
+ metadata.gz: c833def90c649d088fa908f0cd1b2244a679b836fe656f44223cf50daa69c119
4
+ data.tar.gz: 42851a6a3368e9135000c8cb0fce776aef10d1e30073a81740a25f4e98480b99
5
5
  SHA512:
6
- metadata.gz: b45e31ed32a9f19601be142cce9db9554d94d4f5654710134ee05652185da0a4c9739942021fd8f9d07a8866d13caa67a2e59b131d41da456d67248e5893f5de
7
- data.tar.gz: a1bf9c75bfb98079388fa9000b1a9d9586bf0e0fb744959b72b273ef545a6bdfc09ebbd333d8899ae98b98be2bfc328e3d446c62f0347b2b8b37bc5473bcc818
6
+ metadata.gz: b1b6f573abbb66989f9b09b0efd5b9a11d280338e112b13abf23f78abfbbb7c65fe57bd2c49b87ef7a8b46300ed24a67b6281c780f0dbbf35862cfcf0e4b5c1c
7
+ data.tar.gz: 3a3420426665511f2d2427e009d21a7d6ba7cf469fe167bdd50783b08c844571c381cd02040e02e567bc31c97e4c698157a7a93658e8bfb11a4247e4ee1b9cdb
data/lib/schked/config.rb CHANGED
@@ -10,6 +10,10 @@ module Schked
10
10
  @paths ||= []
11
11
  end
12
12
 
13
+ def logger?
14
+ !!@logger
15
+ end
16
+
13
17
  def logger
14
18
  @logger ||= Logger.new(STDOUT).tap { |l| l.level = Logger::INFO }
15
19
  end
@@ -4,9 +4,19 @@ require "rails/railtie"
4
4
 
5
5
  module Schked
6
6
  class Railtie < Rails::Railtie
7
- initializer "schked.paths" do |app|
8
- Schked.config.paths << app.root.join("config", "schedule.rb")
9
- Schked.config.logger = ::Rails.logger
7
+ class PathsConfig
8
+ def self.call(app)
9
+ if (root_schedule = app.root.join("config", "schedule.rb")).exist?
10
+ path = root_schedule.to_s
11
+ Schked.config.paths << path unless Schked.config.paths.include?(path)
12
+ end
13
+ end
14
+ end
15
+
16
+ initializer("schked.paths", &PathsConfig.method(:call))
17
+
18
+ config.to_prepare do
19
+ Schked.config.logger = ::Rails.logger unless Schked.config.logger?
10
20
  end
11
21
  end
12
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Schked
4
- VERSION = "0.2.1"
4
+ VERSION = "0.3.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schked
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi@evilmartians.com
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2019-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rufus-scheduler
@@ -39,19 +39,47 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.16'
47
+ version: '2.2'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
53
60
  - !ruby/object:Gem::Version
54
61
  version: '1.16'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '1.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: combustion
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '1.1'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.1'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: pry-byebug
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +100,14 @@ dependencies:
72
100
  requirements:
73
101
  - - "~>"
74
102
  - !ruby/object:Gem::Version
75
- version: '10.0'
103
+ version: '12.3'
76
104
  type: :development
77
105
  prerelease: false
78
106
  version_requirements: !ruby/object:Gem::Requirement
79
107
  requirements:
80
108
  - - "~>"
81
109
  - !ruby/object:Gem::Version
82
- version: '10.0'
110
+ version: '12.3'
83
111
  - !ruby/object:Gem::Dependency
84
112
  name: rspec
85
113
  requirement: !ruby/object:Gem::Requirement
@@ -126,16 +154,16 @@ dependencies:
126
154
  name: standard
127
155
  requirement: !ruby/object:Gem::Requirement
128
156
  requirements:
129
- - - ">="
157
+ - - "~>"
130
158
  - !ruby/object:Gem::Version
131
- version: '0'
159
+ version: 0.0.39
132
160
  type: :development
133
161
  prerelease: false
134
162
  version_requirements: !ruby/object:Gem::Requirement
135
163
  requirements:
136
- - - ">="
164
+ - - "~>"
137
165
  - !ruby/object:Gem::Version
138
- version: '0'
166
+ version: 0.0.39
139
167
  description: Rufus-scheduler wrapper to run recurring jobs
140
168
  email:
141
169
  executables: