iyyov 1.0.2-java → 1.1.0-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,10 @@
1
+ === 1.1.0 (2010-12-7)
2
+ * Fix LogRotator.max_size initialized default. (issues/1)
3
+ * Change name of daemon to plain 'iyyov' (in keeping with standard
4
+ daemon naming.)
5
+ * Upgrade to slf4j ~> 1.6.1, logback ~> 1.0.0
6
+ * Upgrade (dev dependencies) minitest < 2.1, hashdot-test-daemon ~> 1.2
7
+
1
8
  === 1.0.2 (2010-3-14)
2
9
  * Include a host-based.rb selection config example.
3
10
  * Futher README.rdoc improvements.
data/Manifest.txt CHANGED
@@ -1,9 +1,15 @@
1
- Manifest.txt
2
1
  History.rdoc
2
+ Manifest.txt
3
3
  README.rdoc
4
4
  Rakefile
5
5
  bin/iyyov-fg
6
- init/iyyov-daemon
6
+ config/async.rb
7
+ config/crontab
8
+ config/host-based.rb
9
+ config/jobs.rb
10
+ config/load-all.rb
11
+ config/init.d/iyyov
12
+ init/iyyov
7
13
  lib/iyyov/base.rb
8
14
  lib/iyyov.rb
9
15
  lib/iyyov/context.rb
@@ -13,12 +19,6 @@ lib/iyyov/log_rotator.rb
13
19
  lib/iyyov/scheduler.rb
14
20
  lib/iyyov/shutdown_handler.rb
15
21
  lib/iyyov/task.rb
16
- config/async.rb
17
- config/crontab
18
- config/jobs.rb
19
- config/load-all.rb
20
- config/host-based.rb
21
- config/init.d/iyyov
22
22
  test/jobs-bad.rb
23
23
  test/jobs-dupe.rb
24
24
  test/setup.rb
data/README.rdoc CHANGED
@@ -55,8 +55,8 @@ configurations. Sample jobs.rb configuration:
55
55
  The simple form of the define_daemon creates an Iyyov::Daemon
56
56
  based on the following conventions:
57
57
 
58
- * The required name by default is used as a gem name as well as init
59
- script name.
58
+ * The required name is used as the default gem name as well and
59
+ default init script name.
60
60
  * Most all set attributes may be lambda's.
61
61
  * If a version is specified, the default Daemon.exe_path will be an
62
62
  init script with the same name and provided by the same named gem
@@ -77,8 +77,8 @@ achieve this:
77
77
  * inittab or upstart (which also supports monitoring/restarting iyyov itself)
78
78
  * Crontab (an example is provided at gem or source config/crontab)
79
79
 
80
- Iyyov itself contains a Hashdot annotated init/iyyov-daemon script
81
- used by the above provided examples.
80
+ Iyyov itself contains a Hashdot annotated init/iyyov script used by
81
+ the above provided examples.
82
82
 
83
83
  == License
84
84
 
data/Rakefile CHANGED
@@ -28,17 +28,17 @@ t = RJack::TarPit.new( 'iyyov', Iyyov::VERSION, :java_platform )
28
28
  t.specify do |h|
29
29
  h.developer( 'David Kellum', 'dek-oss@gravitext.com' )
30
30
  h.testlib = :minitest
31
- h.extra_deps += [ [ 'rjack-slf4j', '~> 1.5.11' ],
32
- [ 'rjack-logback', '~> 0.9.18' ],
33
- [ 'logrotate', '= 1.2.1' ] ]
34
- h.extra_dev_deps += [ [ 'minitest', '~> 1.5.0' ],
35
- [ 'hashdot-test-daemon', '~> 1.0' ] ]
31
+ h.extra_deps += [ [ 'rjack-slf4j', '~> 1.6.1' ],
32
+ [ 'rjack-logback', '~> 1.0.0' ],
33
+ [ 'logrotate', '= 1.2.1' ] ]
34
+ h.extra_dev_deps += [ [ 'minitest', '>= 1.5.0', '< 2.1' ],
35
+ [ 'hashdot-test-daemon', '~> 1.2' ] ]
36
36
  end
37
37
 
38
38
  # Version/date consistency checks:
39
39
 
40
40
  task :chk_init_v do
41
- t.test_line_match( 'init/iyyov-daemon',
41
+ t.test_line_match( 'init/iyyov',
42
42
  /^gem.+#{t.name}/, /= #{t.version}/ )
43
43
  end
44
44
  task :chk_rcd_v do
data/bin/iyyov-fg CHANGED
@@ -4,7 +4,7 @@
4
4
  #. hashdot.vm.options += -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
5
5
 
6
6
  #--
7
- # Copyright (C) 2010 David Kellum
7
+ # Copyright (c) 2010 David Kellum
8
8
  #
9
9
  # Licensed under the Apache License, Version 2.0 (the "License"); you
10
10
  # may not use this file except in compliance with the License. You
@@ -24,8 +24,8 @@ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
24
24
  require 'rubygems'
25
25
  require 'rjack-logback'
26
26
 
27
- Logback.config_console( :thread => true, :lwidth => 35,
28
- :level => Logback::INFO )
27
+ RJack::Logback.config_console( :thread => true, :lwidth => 35,
28
+ :level => RJack::Logback::INFO )
29
29
 
30
30
  require 'optparse'
31
31
  require 'iyyov'
@@ -39,7 +39,7 @@ Options:
39
39
  END
40
40
 
41
41
  opts.on( "-d", "--debug", "Enable debug logging" ) do
42
- Logback.root.level = Logback::DEBUG
42
+ RJack::Logback.root.level = Logback::DEBUG
43
43
  end
44
44
 
45
45
  opts.on( "-v", "--version", "Show version and exit" ) do
data/config/async.rb CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  Iyyov.context do |c|
3
3
  count = 0
4
- log = SLF4J["hello"]
4
+ log = RJack::SLF4J["hello"]
5
5
  c.schedule_at( :name => "hello", :mode => :async, :period => 1.5 ) do
6
6
  count += 1
7
7
  sleep count
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.0.2-java/init/iyyov-daemon jobs.rb
2
+ */1 * * * * cd /opt/var/iyyov && /opt/jruby/gems/gems/iyyov-1.1.0-java/init/iyyov jobs.rb
data/config/host-based.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  Iyyov.context do |c|
2
2
 
3
3
  hostname = `hostname -s`.strip
4
- SLF4J[ File.basename( __FILE__ ) ].info( "Setup services for [#{hostname}]." )
4
+ RJack::SLF4J[ File.basename( __FILE__ ) ].info( "Setup services for [#{hostname}]." )
5
5
 
6
6
  case hostname
7
7
 
data/config/init.d/iyyov CHANGED
@@ -4,7 +4,7 @@
4
4
  #
5
5
  # chkconfig: 2345 88 12
6
6
  # description: Iyyov monitoring daemon
7
- # processname: iyyov-daemon
7
+ # processname: iyyov
8
8
  # config: /opt/var/iyyov/jobs.rb
9
9
 
10
10
  . /etc/rc.d/init.d/functions
@@ -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.0.2"
17
+ version="1.1.0"
18
18
 
19
19
  # User to run the daemon as (should own rundir)
20
20
  user="iyyov"
@@ -25,7 +25,7 @@ rundir="/opt/var/iyyov"
25
25
  # Add PATH to jruby if non-standard
26
26
  export PATH=/opt/bin:$PATH
27
27
 
28
- prog="iyyov-daemon"
28
+ prog="iyyov"
29
29
  daemon="${gem_home}/gems/iyyov-${version}-java/init/${prog}"
30
30
  config="${rundir}/jobs.rb"
31
31
  pidfile="${rundir}/${prog}.pid"
@@ -1,13 +1,13 @@
1
1
  #!/usr/bin/env jruby
2
2
  #-*- ruby -*-
3
3
  #. hashdot.profile += daemon
4
- #. hashdot.pid_file = ./iyyov-daemon.pid
5
- #. hashdot.io_redirect.file = ./iyyov-daemon.log
4
+ #. hashdot.pid_file = ./iyyov.pid
5
+ #. hashdot.io_redirect.file = ./iyyov.log
6
6
  #. hashdot.vm.options += -Xmx64m
7
7
  #. hashdot.vm.options += -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
8
8
 
9
9
  #--
10
- # Copyright (C) 2010 David Kellum
10
+ # Copyright (c) 2010 David Kellum
11
11
  #
12
12
  # Licensed under the Apache License, Version 2.0 (the "License"); you
13
13
  # may not use this file except in compliance with the License. You
@@ -24,7 +24,7 @@
24
24
 
25
25
  require 'rubygems'
26
26
 
27
- gem( "iyyov", "= 1.0.2" )
27
+ gem( "iyyov", "= 1.1.0" )
28
28
 
29
29
  require 'rjack-logback'
30
30
  RJack::Logback.config_console( :full => true, :thread => true )
data/lib/iyyov/base.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -16,5 +16,5 @@
16
16
 
17
17
  module Iyyov
18
18
  # Iyyov version
19
- VERSION = '1.0.2'
19
+ VERSION = '1.1.0'
20
20
  end
data/lib/iyyov/context.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
data/lib/iyyov/daemon.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -20,10 +20,10 @@ require 'fileutils'
20
20
  require 'iyyov/log_rotator'
21
21
 
22
22
  module Iyyov
23
- include RJack
24
23
 
25
24
  # A daemon instance to start and monitor
26
25
  class Daemon
26
+ include RJack
27
27
 
28
28
  # Name of this daemon. Must be unique in combination with any
29
29
  # specified instance.
data/lib/iyyov/errors.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -68,7 +68,7 @@ module Iyyov
68
68
 
69
69
  def initialize( log = nil )
70
70
  @log = log
71
- max_size_mb = 256
71
+ self.max_size_mb = 256
72
72
  @count = 3
73
73
  @gzip = true
74
74
  @signal = "HUP"
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -30,7 +30,7 @@ module Iyyov
30
30
  @queue = Java::java.util.PriorityQueue.new( 67, TimeComp.new )
31
31
  @lock = Mutex.new
32
32
  @shutdown_handler = nil
33
- @log = SLF4J[ self.class ]
33
+ @log = RJack::SLF4J[ self.class ]
34
34
  end
35
35
 
36
36
  def add( t, now = Time.now )
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
data/lib/iyyov/task.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -22,6 +22,7 @@ module Iyyov
22
22
 
23
23
  # A task to be scheduled and run.
24
24
  class Task
25
+ include RJack
25
26
 
26
27
  # Regular interval between subsequent executions in seconds.
27
28
  #
data/lib/iyyov.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
data/test/setup.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #--
2
- # Copyright (C) 2010 David Kellum
2
+ # Copyright (c) 2010 David Kellum
3
3
  #
4
4
  # Licensed under the Apache License, Version 2.0 (the "License"); you
5
5
  # may not use this file except in compliance with the License. You
@@ -33,7 +33,7 @@ end
33
33
 
34
34
  time_it( "logback" ) do
35
35
  require 'rjack-logback'
36
- RJack::Logback.config_console( :level => Logback::INFO, :stderr => true )
36
+ RJack::Logback.config_console( :level => RJack::Logback::INFO, :stderr => true )
37
37
  end
38
38
 
39
39
  time_it( "test/unit" ) do
data/test/test_context.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env jruby
2
2
  #.hashdot.profile += jruby-shortlived
3
3
  #--
4
- # Copyright (C) 2010 David Kellum
4
+ # Copyright (c) 2010 David Kellum
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you
7
7
  # may not use this file except in compliance with the License. You
data/test/test_daemon.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env jruby
2
2
  #.hashdot.profile += jruby-shortlived
3
3
  #--
4
- # Copyright (C) 2010 David Kellum
4
+ # Copyright (c) 2010 David Kellum
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you
7
7
  # may not use this file except in compliance with the License. You
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env jruby
2
2
  #.hashdot.profile += jruby-shortlived
3
3
  #--
4
- # Copyright (C) 2010 David Kellum
4
+ # Copyright (c) 2010 David Kellum
5
5
  #
6
6
  # Licensed under the Apache License, Version 2.0 (the "License"); you
7
7
  # may not use this file except in compliance with the License. You
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iyyov
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 1
8
+ - 0
9
+ version: 1.1.0
5
10
  platform: java
6
11
  authors:
7
12
  - David Kellum
@@ -9,69 +14,98 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-03-13 23:00:00 -08:00
17
+ date: 2010-12-07 00:00:00 -08:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rjack-slf4j
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
20
24
  requirements:
21
25
  - - ~>
22
26
  - !ruby/object:Gem::Version
23
- version: 1.5.11
24
- version:
27
+ segments:
28
+ - 1
29
+ - 6
30
+ - 1
31
+ version: 1.6.1
32
+ type: :runtime
33
+ version_requirements: *id001
25
34
  - !ruby/object:Gem::Dependency
26
35
  name: rjack-logback
27
- type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
30
38
  requirements:
31
39
  - - ~>
32
40
  - !ruby/object:Gem::Version
33
- version: 0.9.18
34
- version:
41
+ segments:
42
+ - 1
43
+ - 0
44
+ - 0
45
+ version: 1.0.0
46
+ type: :runtime
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: logrotate
37
- type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
40
52
  requirements:
41
53
  - - "="
42
54
  - !ruby/object:Gem::Version
55
+ segments:
56
+ - 1
57
+ - 2
58
+ - 1
43
59
  version: 1.2.1
44
- version:
60
+ type: :runtime
61
+ version_requirements: *id003
45
62
  - !ruby/object:Gem::Dependency
46
63
  name: minitest
47
- type: :development
48
- version_requirement:
49
- version_requirements: !ruby/object:Gem::Requirement
64
+ prerelease: false
65
+ requirement: &id004 !ruby/object:Gem::Requirement
50
66
  requirements:
51
- - - ~>
67
+ - - ">="
52
68
  - !ruby/object:Gem::Version
69
+ segments:
70
+ - 1
71
+ - 5
72
+ - 0
53
73
  version: 1.5.0
54
- version:
74
+ - - <
75
+ - !ruby/object:Gem::Version
76
+ segments:
77
+ - 2
78
+ - 1
79
+ version: "2.1"
80
+ type: :development
81
+ version_requirements: *id004
55
82
  - !ruby/object:Gem::Dependency
56
83
  name: hashdot-test-daemon
57
- type: :development
58
- version_requirement:
59
- version_requirements: !ruby/object:Gem::Requirement
84
+ prerelease: false
85
+ requirement: &id005 !ruby/object:Gem::Requirement
60
86
  requirements:
61
87
  - - ~>
62
88
  - !ruby/object:Gem::Version
63
- version: "1.0"
64
- version:
89
+ segments:
90
+ - 1
91
+ - 2
92
+ version: "1.2"
93
+ type: :development
94
+ version_requirements: *id005
65
95
  - !ruby/object:Gem::Dependency
66
96
  name: rjack-tarpit
67
- type: :development
68
- version_requirement:
69
- version_requirements: !ruby/object:Gem::Requirement
97
+ prerelease: false
98
+ requirement: &id006 !ruby/object:Gem::Requirement
70
99
  requirements:
71
100
  - - ~>
72
101
  - !ruby/object:Gem::Version
73
- version: 1.2.0
74
- version:
102
+ segments:
103
+ - 1
104
+ - 2
105
+ - 2
106
+ version: 1.2.2
107
+ type: :development
108
+ version_requirements: *id006
75
109
  description: Down-to-earth job control and monitoring.
76
110
  email:
77
111
  - dek-oss@gravitext.com
@@ -81,15 +115,21 @@ extensions: []
81
115
 
82
116
  extra_rdoc_files:
83
117
  - Manifest.txt
84
- - README.rdoc
85
118
  - History.rdoc
119
+ - README.rdoc
86
120
  files:
87
- - Manifest.txt
88
121
  - History.rdoc
122
+ - Manifest.txt
89
123
  - README.rdoc
90
124
  - Rakefile
91
125
  - bin/iyyov-fg
92
- - init/iyyov-daemon
126
+ - config/async.rb
127
+ - config/crontab
128
+ - config/host-based.rb
129
+ - config/jobs.rb
130
+ - config/load-all.rb
131
+ - config/init.d/iyyov
132
+ - init/iyyov
93
133
  - lib/iyyov/base.rb
94
134
  - lib/iyyov.rb
95
135
  - lib/iyyov/context.rb
@@ -99,12 +139,6 @@ files:
99
139
  - lib/iyyov/scheduler.rb
100
140
  - lib/iyyov/shutdown_handler.rb
101
141
  - lib/iyyov/task.rb
102
- - config/async.rb
103
- - config/crontab
104
- - config/jobs.rb
105
- - config/load-all.rb
106
- - config/host-based.rb
107
- - config/init.d/iyyov
108
142
  - test/jobs-bad.rb
109
143
  - test/jobs-dupe.rb
110
144
  - test/setup.rb
@@ -125,22 +159,24 @@ required_ruby_version: !ruby/object:Gem::Requirement
125
159
  requirements:
126
160
  - - ">="
127
161
  - !ruby/object:Gem::Version
162
+ segments:
163
+ - 0
128
164
  version: "0"
129
- version:
130
165
  required_rubygems_version: !ruby/object:Gem::Requirement
131
166
  requirements:
132
167
  - - ">="
133
168
  - !ruby/object:Gem::Version
169
+ segments:
170
+ - 0
134
171
  version: "0"
135
- version:
136
172
  requirements: []
137
173
 
138
174
  rubyforge_project: iyyov
139
- rubygems_version: 1.3.5
175
+ rubygems_version: 1.3.6
140
176
  signing_key:
141
177
  specification_version: 3
142
178
  summary: Down-to-earth job control and monitoring.
143
179
  test_files:
180
+ - test/test_daemon.rb
144
181
  - test/test_context.rb
145
182
  - test/test_scheduler.rb
146
- - test/test_daemon.rb