fbomb 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +14 -6
  2. data/bin/fbomb +45 -6
  3. data/fbomb.gemspec +1 -1
  4. data/lib/fbomb.rb +1 -1
  5. metadata +34 -33
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: ae0e9bf62b7183017ecf2e8d4effa40ad2fa6844
4
- data.tar.gz: 520bc229755bc1620634fcabe104221edbc09b97
5
- SHA512:
6
- metadata.gz: 3f90e4795cc7d9cbf364e0193f2307a95acb9bf14811871f7b63a61db7ab0eb5de05031cba04abaa557a0dc1604efaee9089494bc7ce5b236552853fd005847d
7
- data.tar.gz: 00c3929e73db2e6e3216d51884a522cb5580e56ddb3546329ae1300aba2450701df9f54094172005c7c4fa1edb480166ffc359244222287ec5faedf99af5909e
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZDdhN2U3OGIxYmQ4ZjE5Y2M0MzUxY2RlYjUzOTQxYTMzM2FlMDI3OQ==
5
+ data.tar.gz: !binary |-
6
+ NDIwMDkzODk0MWUwMTJlYjFiNzk0YmE1ZGMzZmRmMDQ3MWI3MDczOQ==
7
+ !binary "U0hBNTEy":
8
+ metadata.gz: !binary |-
9
+ YWE2YjY4N2FlZjg3ZGViYWNjY2Q3YmY0NmY4NjIwMDFiNGQwYWI3ZmEyN2Ew
10
+ NzA5ZmY5Yjk1ZjE1ZWM3MDZhOWM5OWU5ZTA2ZjYwZTQ3OWFkMjQ4ZjEzOGIz
11
+ NWNjN2RjZGQzZGEyNjgxNDMyM2U4MmYxMWYyZDkwMzYyNTFhNGE=
12
+ data.tar.gz: !binary |-
13
+ MzAxZDgyZjIyMzg2NDNlMWQwMjhmYmEzNjc4NGVjNWNmZWI0MjA4NTAxNDUx
14
+ YzFkMzNmZWNmYzg5ZjM4YWI3YjJkMTg3OGY5NmM2MzI4MWZiN2Y5M2M5OGYx
15
+ MDlhN2U3MTdiZTI3MjQxZDFmZDk5NmVhZGIyZDU3ODVlMTMxZDI=
data/bin/fbomb CHANGED
@@ -30,6 +30,22 @@ Main {
30
30
 
31
31
 
32
32
  option('--force', '-f')
33
+ option('--state=state', '-s')
34
+
35
+ def before_run
36
+ if params[:state].given
37
+ path = File.expand_path(params[:state].values.first)
38
+ dirname, basename = File.split(path)
39
+
40
+ if dirname == '/'
41
+ dirname = path
42
+ basename = '.fbomb'
43
+ end
44
+
45
+ ENV['STATE_DIRNAME'] = dirname
46
+ ENV['STATE_BASENAME'] = basename
47
+ end
48
+ end
33
49
 
34
50
  ##
35
51
  #
@@ -139,9 +155,13 @@ Main {
139
155
  mode(:stop) do
140
156
  def run
141
157
  pid = IO.read(File.join(dotdir, 'pid')).to_i
142
- Process.kill(-9, pid)
143
- rescue
144
- nil
158
+ 10.times do
159
+ begin
160
+ Process.kill(-9, pid)
161
+ rescue
162
+ nil
163
+ end
164
+ end
145
165
  end
146
166
  end
147
167
 
@@ -154,6 +174,13 @@ Main {
154
174
  end
155
175
  end
156
176
 
177
+ mode(:log) do
178
+ def run
179
+ log = IO.read(File.join(dotdir, 'log'))
180
+ exec "tail -F #{ log.inspect }"
181
+ end
182
+ end
183
+
157
184
  mode(:speak) do
158
185
  option('--tag=tag', '-t')
159
186
 
@@ -177,12 +204,24 @@ Main {
177
204
  $cmd = [Util.which_ruby, File.expand_path(__FILE__), *ARGV].join(' ')
178
205
 
179
206
  if params['daemon'].given?
180
- #DATA.flock(File::LOCK_EX|File::LOCK_NB) or exit!(42)
181
- Dir.chdir('/tmp')
207
+ Dir.chdir(dotdir)
208
+
209
+ lock = File.join(dotdir, 'lock')
210
+ FileUtils.touch(lock)
211
+ open(lock, 'a+') do |fd|
212
+ fd.flock(File::LOCK_EX|File::LOCK_NB) or exit!(42)
213
+ end
214
+
182
215
  exit! if fork
183
216
  exit! if fork
217
+
184
218
  open(File.join(dotdir, 'pid'), 'w'){|fd| fd.write($$)}
185
- open('/dev/null', 'w+') do |fd|
219
+
220
+ log = File.join(dotdir, 'log')
221
+ FileUtils.touch(log)
222
+
223
+ open(log, 'a+') do |fd|
224
+ fd.puts "process #{ $$ } started..."
186
225
  STDOUT.reopen(fd)
187
226
  STDERR.reopen(fd)
188
227
  end
data/fbomb.gemspec CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "fbomb"
6
- spec.version = "3.1.0"
6
+ spec.version = "3.2.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "fbomb"
9
9
  spec.description = "description: fbomb kicks the ass"
data/lib/fbomb.rb CHANGED
@@ -13,7 +13,7 @@
13
13
  # libs
14
14
  #
15
15
  module FBomb
16
- Version = '3.1.0' unless defined?(Version)
16
+ Version = '3.2.0' unless defined?(Version)
17
17
 
18
18
  def version
19
19
  FBomb::Version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbomb
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ara T. Howard
@@ -14,199 +14,199 @@ dependencies:
14
14
  name: flowdock
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.4.0
20
20
  type: :runtime
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: 0.4.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eventmachine
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.0.3
34
34
  type: :runtime
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: 1.0.3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: em-http-request
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ! '>='
46
46
  - !ruby/object:Gem::Version
47
47
  version: 1.1.2
48
48
  type: :runtime
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: 1.1.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: json
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.8.1
62
62
  type: :runtime
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: 1.8.1
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: coerce
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: 0.0.6
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.0.6
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: fukung
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: 1.1.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: 1.1.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: main
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: 4.7.6
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: 4.7.6
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: nokogiri
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - ! '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: 1.5.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - ! '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: 1.5.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: google-search
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - ! '>='
130
130
  - !ruby/object:Gem::Version
131
131
  version: 1.0.2
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - ! '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.0.2
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: unidecode
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - ">="
143
+ - - ! '>='
144
144
  - !ruby/object:Gem::Version
145
145
  version: 1.0.0
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - ">="
150
+ - - ! '>='
151
151
  - !ruby/object:Gem::Version
152
152
  version: 1.0.0
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: systemu
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">="
157
+ - - ! '>='
158
158
  - !ruby/object:Gem::Version
159
159
  version: 2.3.0
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - ">="
164
+ - - ! '>='
165
165
  - !ruby/object:Gem::Version
166
166
  version: 2.3.0
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: pry
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - ">="
171
+ - - ! '>='
172
172
  - !ruby/object:Gem::Version
173
173
  version: 0.9.6.2
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - ">="
178
+ - - ! '>='
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.9.6.2
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: mechanize
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - ! '>='
186
186
  - !ruby/object:Gem::Version
187
187
  version: 2.7.3
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - ! '>='
193
193
  - !ruby/object:Gem::Version
194
194
  version: 2.7.3
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: mime-types
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - ">="
199
+ - - ! '>='
200
200
  - !ruby/object:Gem::Version
201
201
  version: '1.16'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - ">="
206
+ - - ! '>='
207
207
  - !ruby/object:Gem::Version
208
208
  version: '1.16'
209
- description: 'description: fbomb kicks the ass'
209
+ description: ! 'description: fbomb kicks the ass'
210
210
  email: ara.t.howard@gmail.com
211
211
  executables:
212
212
  - fbomb
@@ -281,18 +281,19 @@ require_paths:
281
281
  - lib
282
282
  required_ruby_version: !ruby/object:Gem::Requirement
283
283
  requirements:
284
- - - ">="
284
+ - - ! '>='
285
285
  - !ruby/object:Gem::Version
286
286
  version: '0'
287
287
  required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  requirements:
289
- - - ">="
289
+ - - ! '>='
290
290
  - !ruby/object:Gem::Version
291
291
  version: '0'
292
292
  requirements: []
293
293
  rubyforge_project: codeforpeople
294
- rubygems_version: 2.4.5.1
294
+ rubygems_version: 2.0.3
295
295
  signing_key:
296
296
  specification_version: 4
297
297
  summary: fbomb
298
298
  test_files: []
299
+ has_rdoc: