assistor 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 076ce5c505b2401756f570d5cd6d7029620d5f8c
4
- data.tar.gz: 8f0aa2a897cd547bb6d816809fdc1f57a8926ffb
3
+ metadata.gz: 264bca886df08dba506ee6c4de145d501be9ce17
4
+ data.tar.gz: 6dd73ee78a783abeab0ae3b172e33267c6248156
5
5
  SHA512:
6
- metadata.gz: 00b36cf07fd1bec003667a0d2fd5e78d426eb1af3ffaa8b90410fda844b4baf1fb406c67e3a9a86f18ed21a9bf4478c72ccb441839a5f2d2ad629a8b8bce83ba
7
- data.tar.gz: 96745595c9bb58ffe73c0a065213775ca501d5ccd3603c5010e5ff2b489833b1c11f5be9a0dabe4faff771e7ba0ec5d4af43dd8c1d8d7fb1c8982d0f22a32e83
6
+ metadata.gz: 52fc67de9df4303ca9e32cfebefed22cadf392ab093166666507cd8805e956e56439212aefd86e74e6d4607b1c8a6e25bea122b3a7a665bb257d7de6c777bc2d
7
+ data.tar.gz: 877900ed7ac6d7f3fb05ff8139e65e8ca90dcb460bab3cf4e639a1ee8f0ed86feac11b92690830166b2c120d784d2baaca41e46fb52aba3c4eb4c8438e09858d
@@ -1,5 +1,7 @@
1
1
  require 'logger'
2
2
  require 'tmpdir'
3
+ require 'forwardable'
4
+ require 'securerandom'
3
5
 
4
6
  require 'assistor/version'
5
7
  require 'assistor/log_file'
@@ -106,7 +106,7 @@ module Assistor
106
106
  def with_pid_file
107
107
  pid_file.create Process.pid
108
108
  yield
109
- pid_file.delete pid_file
109
+ pid_file.delete
110
110
  end
111
111
  end
112
112
  end
@@ -44,7 +44,7 @@ module Assistor
44
44
  end
45
45
 
46
46
  def decrease
47
- @size -= 1
47
+ @size -= 1 if @size > 0
48
48
  end
49
49
  end
50
50
  end
@@ -17,7 +17,6 @@ module Assistor
17
17
  loop do
18
18
  sleep(delay) unless assist(queue)
19
19
  end
20
- stop
21
20
  rescue => e
22
21
  log_file.error e
23
22
  end
@@ -1,3 +1,3 @@
1
1
  module Assistor
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assistor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomasz Kowalewski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.13'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.13'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ~>
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.44.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.44.1
69
69
  description: Simple background processing framework for Ruby
@@ -77,7 +77,6 @@ files:
77
77
  - CODE_OF_CONDUCT.md
78
78
  - LICENSE.txt
79
79
  - README.md
80
- - lib/assistor.rb
81
80
  - lib/assistor/abstract_job.rb
82
81
  - lib/assistor/abstract_queue.rb
83
82
  - lib/assistor/assistant.rb
@@ -87,6 +86,7 @@ files:
87
86
  - lib/assistor/log_file.rb
88
87
  - lib/assistor/pid_file.rb
89
88
  - lib/assistor/version.rb
89
+ - lib/assistor.rb
90
90
  homepage: https://github.com/tkowalewski/assistor
91
91
  licenses:
92
92
  - MIT
@@ -97,18 +97,19 @@ require_paths:
97
97
  - lib
98
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ">="
100
+ - - '>='
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ">="
105
+ - - '>='
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.0.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: Simple background processing framework for Ruby
114
114
  test_files: []
115
+ has_rdoc: