flydata 0.0.5.1 → 0.0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/flydata.gemspec +3 -2
- data/lib/flydata/command/kill_all.rb +10 -0
- data/lib/flydata/command/sender.rb +10 -2
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.5.
|
1
|
+
0.0.5.2
|
data/flydata.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "flydata"
|
8
|
-
s.version = "0.0.5.
|
8
|
+
s.version = "0.0.5.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Koichi Fujikawa"]
|
12
|
-
s.date = "2013-09-
|
12
|
+
s.date = "2013-09-28"
|
13
13
|
s.description = "FlyData Command Line Interface"
|
14
14
|
s.email = "sysadmin@flydata.co"
|
15
15
|
s.executables = ["flydata"]
|
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
"lib/flydata/cli.rb",
|
32
32
|
"lib/flydata/command/base.rb",
|
33
33
|
"lib/flydata/command/crontab.rb",
|
34
|
+
"lib/flydata/command/kill_all.rb",
|
34
35
|
"lib/flydata/command/login.rb",
|
35
36
|
"lib/flydata/command/restart.rb",
|
36
37
|
"lib/flydata/command/routine.rb",
|
@@ -54,6 +54,14 @@ EOF
|
|
54
54
|
start
|
55
55
|
end
|
56
56
|
end
|
57
|
+
def kill_all
|
58
|
+
if system("ps ax | grep 'flydata' | grep -v grep | awk '{print \"kill \" $1}' | sh")
|
59
|
+
say("Done.")
|
60
|
+
return true
|
61
|
+
else
|
62
|
+
raise 'Something has gone wrong...'
|
63
|
+
end
|
64
|
+
end
|
57
65
|
|
58
66
|
private
|
59
67
|
def wait_until_server_ready
|
@@ -111,8 +119,8 @@ EOF
|
|
111
119
|
process_exist?
|
112
120
|
end
|
113
121
|
def process_exist?
|
114
|
-
|
115
|
-
|
122
|
+
# Returns true if the process is running
|
123
|
+
`[ -f #{FLYDATA_HOME}/flydata.pid ] && pgrep -P \`cat #{FLYDATA_HOME}/flydata.pid\``.to_i > 0
|
116
124
|
end
|
117
125
|
def uploaded_successfully?(data_port_id)
|
118
126
|
res = flydata.get("/data_ports/#{data_port_id}/tail.json")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flydata
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.5.
|
4
|
+
version: 0.0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|
@@ -291,6 +291,7 @@ files:
|
|
291
291
|
- lib/flydata/cli.rb
|
292
292
|
- lib/flydata/command/base.rb
|
293
293
|
- lib/flydata/command/crontab.rb
|
294
|
+
- lib/flydata/command/kill_all.rb
|
294
295
|
- lib/flydata/command/login.rb
|
295
296
|
- lib/flydata/command/restart.rb
|
296
297
|
- lib/flydata/command/routine.rb
|
@@ -329,7 +330,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
329
330
|
version: '0'
|
330
331
|
segments:
|
331
332
|
- 0
|
332
|
-
hash:
|
333
|
+
hash: 256170490305057208
|
333
334
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
334
335
|
none: false
|
335
336
|
requirements:
|