iyyov 1.1.1-java → 1.1.2-java

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,12 @@
1
+ === 1.1.2 (2011-9-11)
2
+ * Add Task.log accessor.
3
+ * Fixes for ruby 1.9 compatibility; to_a -> Array()
4
+ * Use Gem::Specification.find_by_name when available, per Rubygems
5
+ 1.8.x deprecations.
6
+ * Broaden to rjack-logback ~> 1.1
7
+ * Upgrade to tarpit ~> 1.3.3 (build)
8
+ * Broaden to minitest ~> 2.2 (build)
9
+
1
10
  === 1.1.1 (2011-3-26)
2
11
  * Fix one more bare Logback reference for iyyov-fg -d
3
12
  * Expose Daemon.log, for extensions.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@
3
3
  $LOAD_PATH << './lib'
4
4
 
5
5
  require 'rubygems'
6
- gem 'rjack-tarpit', '~> 1.3.0'
6
+ gem 'rjack-tarpit', '~> 1.3.3'
7
7
  require 'rjack-tarpit'
8
8
 
9
9
  require 'iyyov/base'
@@ -14,9 +14,9 @@ t.specify do |h|
14
14
  h.developer( 'David Kellum', 'dek-oss@gravitext.com' )
15
15
  h.testlib = :minitest
16
16
  h.extra_deps += [ [ 'rjack-slf4j', '~> 1.6.1' ],
17
- [ 'rjack-logback', '~> 1.1.1' ],
17
+ [ 'rjack-logback', '~> 1.1' ],
18
18
  [ 'logrotate', '= 1.2.1' ] ]
19
- h.extra_dev_deps += [ [ 'minitest', '>= 1.5.0', '< 2.1' ],
19
+ h.extra_dev_deps += [ [ 'minitest', '~> 2.2' ],
20
20
  [ 'hashdot-test-daemon', '~> 1.2' ] ]
21
21
  end
22
22
 
data/config/crontab CHANGED
@@ -1,2 +1,2 @@
1
1
  # PATH=/opt/bin
2
- */1 * * * * cd /opt/var/iyyov && /opt/jruby/gems/gems/iyyov-1.1.1-java/init/iyyov jobs.rb
2
+ */1 * * * * cd /opt/var/iyyov && /opt/jruby/gems/gems/iyyov-1.1.2-java/init/iyyov jobs.rb
data/config/init.d/iyyov CHANGED
@@ -14,7 +14,7 @@
14
14
  gem_home="/opt/jruby/gems"
15
15
 
16
16
  # (Exact) Gem version of iyyov to run
17
- version="1.1.1"
17
+ version="1.1.2"
18
18
 
19
19
  # User to run the daemon as (should own rundir)
20
20
  user="iyyov"
data/init/iyyov CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  require 'rubygems'
26
26
 
27
- gem( "iyyov", "= 1.1.1" )
27
+ gem( "iyyov", "= 1.1.2" )
28
28
 
29
29
  require 'rjack-logback'
30
30
  RJack::Logback.config_console( :full => true, :thread => true )
data/lib/iyyov/base.rb CHANGED
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Iyyov
18
18
  # Iyyov version
19
- VERSION = '1.1.1'
19
+ VERSION = '1.1.2'
20
20
  end
data/lib/iyyov/daemon.rb CHANGED
@@ -227,7 +227,12 @@ module Iyyov
227
227
  end
228
228
 
229
229
  def find_gem_spec
230
- @gem_spec ||= Gem.source_index.find_name( gem_name, version ).last
230
+ @gem_spec ||=
231
+ if Gem::Specification.respond_to?( :find_by_name )
232
+ Gem::Specification.find_by_name( gem_name, version )
233
+ else
234
+ Gem.source_index.find_name( gem_name, version ).last
235
+ end
231
236
  unless @gem_spec
232
237
  raise( Gem::GemNotFoundException, "Missing gem #{gem_name} (#{version})" )
233
238
  end
@@ -236,7 +241,7 @@ module Iyyov
236
241
 
237
242
  def start
238
243
  epath = File.expand_path( exe_path )
239
- eargs = args.to_a.map { |a| a.to_s.strip }.compact
244
+ eargs = args.map { |a| a.to_s.strip }.compact
240
245
  aversion = @gem_spec && @gem_spec.version
241
246
  @log.info { ( [ "starting", aversion || epath ] + eargs ).join(' ') }
242
247
 
@@ -250,7 +255,7 @@ module Iyyov
250
255
 
251
256
  @state = :up
252
257
  true
253
- rescue Gem::GemNotFoundException, DaemonFailed, Errno::ENOENT => e
258
+ rescue Gem::LoadError, Gem::GemNotFoundException, DaemonFailed, Errno::ENOENT => e
254
259
  @log.error( e.to_s )
255
260
  @state = :failed
256
261
  false
@@ -260,7 +265,7 @@ module Iyyov
260
265
  # running instance.
261
266
  def exec_key
262
267
  keys = [ run_dir, exe_path ].map { |p| File.expand_path( p ) }
263
- keys += args.to_a.map { |a| a.to_s.strip }.compact
268
+ keys += args.map { |a| a.to_s.strip }.compact
264
269
  keys.compact
265
270
  end
266
271
 
data/lib/iyyov/task.rb CHANGED
@@ -32,7 +32,7 @@ module Iyyov
32
32
  # One or more fixed time values in 24hour format, local
33
33
  # timezone, i.e: [ "11:30", "23:30" ]
34
34
  #
35
- # ~to_a[String] (default: nil, use period)
35
+ # Array(String) (default: nil, use period)
36
36
  attr_accessor :fixed_times
37
37
 
38
38
  # Array or range for days of week in which fixed_times apply. Days
@@ -55,6 +55,9 @@ module Iyyov
55
55
  # Once schedule succeeds, the absolute next time to execute.
56
56
  attr_reader :next_time
57
57
 
58
+ # SLF4J logger
59
+ attr_reader :log
60
+
58
61
  # New task given options matching accessors and block containing
59
62
  # work.
60
63
  def initialize( opts = {}, &block )
@@ -169,7 +172,7 @@ module Iyyov
169
172
  ntime = nil
170
173
  while ntime.nil? && day <= last
171
174
  if fixed_days.include?( day.wday )
172
- fixed_times.to_a.each do |ft|
175
+ Array( fixed_times ).each do |ft|
173
176
  ft = time_on_date( day, Time.parse( ft, now ) )
174
177
  ntime = ft if ( ( ft > now ) && ( ntime.nil? || ft < ntime ) )
175
178
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: iyyov
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.1.1
5
+ version: 1.1.2
6
6
  platform: java
7
7
  authors:
8
8
  - David Kellum
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-26 00:00:00 -07:00
14
- default_executable:
13
+ date: 2011-09-11 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rjack-slf4j
@@ -32,7 +31,7 @@ dependencies:
32
31
  requirements:
33
32
  - - ~>
34
33
  - !ruby/object:Gem::Version
35
- version: 1.1.1
34
+ version: "1.1"
36
35
  type: :runtime
37
36
  version_requirements: *id002
38
37
  - !ruby/object:Gem::Dependency
@@ -52,12 +51,9 @@ dependencies:
52
51
  requirement: &id004 !ruby/object:Gem::Requirement
53
52
  none: false
54
53
  requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: 1.5.0
58
- - - <
54
+ - - ~>
59
55
  - !ruby/object:Gem::Version
60
- version: "2.1"
56
+ version: "2.2"
61
57
  type: :development
62
58
  version_requirements: *id004
63
59
  - !ruby/object:Gem::Dependency
@@ -79,7 +75,7 @@ dependencies:
79
75
  requirements:
80
76
  - - ~>
81
77
  - !ruby/object:Gem::Version
82
- version: 1.3.0
78
+ version: 1.3.3
83
79
  type: :development
84
80
  version_requirements: *id006
85
81
  description: Down-to-earth job control and monitoring.
@@ -121,7 +117,6 @@ files:
121
117
  - test/test_context.rb
122
118
  - test/test_daemon.rb
123
119
  - test/test_scheduler.rb
124
- has_rdoc: true
125
120
  homepage: http://github.com/dekellum/iyyov
126
121
  licenses: []
127
122
 
@@ -146,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
141
  requirements: []
147
142
 
148
143
  rubyforge_project: iyyov
149
- rubygems_version: 1.5.1
144
+ rubygems_version: 1.8.10
150
145
  signing_key:
151
146
  specification_version: 3
152
147
  summary: Down-to-earth job control and monitoring.