acts_as_service 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_service}
8
- s.version = "0.0.4"
8
+ s.version = "0.0.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brian Percival"]
12
- s.date = %q{2011-01-17}
12
+ s.date = %q{2011-01-18}
13
13
  s.description = %q{A gem with a mixin to let you turn a class into something that runs like a service,
14
14
  which you can MyService.start, MyService.stop, and MyService.restart. It tracks
15
15
  its own pid. For now, pretty sure it requires that the class is running inside
@@ -96,15 +96,15 @@ module ActsAsService
96
96
  if self.respond_to?(:after_start)
97
97
  after_start
98
98
  end
99
- _sleep_till = Time.now - 1
99
+ _sleep_till = Time.zone.now - 1
100
100
  while (_status == ACTS_AS_SERVICE_RUNNING)
101
- if Time.now >= _sleep_till
101
+ if Time.zone.now >= _sleep_till
102
102
  perform_work_chunk
103
103
 
104
104
  # only reset sleep till if asked to; otherwise, just perform next
105
105
  # work chunk right away (never change _sleep_till)
106
106
  if self.respond_to?(:sleep_time)
107
- _sleep_till = Time.now + self.sleep_time
107
+ _sleep_till = Time.zone.now + self.sleep_time
108
108
  end
109
109
  else
110
110
  _check_time_interval = if self.respond_to? :sleep_check_timeout
@@ -113,7 +113,7 @@ module ActsAsService
113
113
  SLEEP_CHECK_TIMEOUT
114
114
  end
115
115
 
116
- sleep [_check_time_interval, _sleep_till - Time.now].min
116
+ sleep [_check_time_interval, _sleep_till - Time.zone.now].min
117
117
  end
118
118
  end
119
119
  puts "Shutting down #{_display_name} (#{_pid})"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_service
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Percival
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-17 00:00:00 -08:00
18
+ date: 2011-01-18 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies: []
21
21