droiuby 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/drby +9 -2
- data/lib/droiuby/project.rb +3 -3
- metadata +2 -2
data/bin/drby
CHANGED
@@ -19,6 +19,7 @@ options = OptionParser.new do |o|
|
|
19
19
|
drby live [PROJECT_NAME] [options] # runs a web instance of the app and tells Droiuby to load it.
|
20
20
|
drby new PROJECT_NAME [options] # Create a new project
|
21
21
|
drby pack [PROJECT_NAME] [options] # zips and packages an app
|
22
|
+
drby reload # uploads and then reload the current app
|
22
23
|
drby switch INSTANCE_NAME [options] # Switch to the specified instance
|
23
24
|
drby bundle # unzips all gems in vendor/cache for deployment to droiuby\n"
|
24
25
|
|
@@ -52,11 +53,18 @@ case command
|
|
52
53
|
exit(1)
|
53
54
|
end
|
54
55
|
project.create(project_name,'')
|
56
|
+
when 'reload'
|
57
|
+
project_name = ARGV[1]
|
58
|
+
project.package(project_name, nil, true)
|
59
|
+
project.upload(project_name, $device_ip, nil, false, false)
|
60
|
+
project.reload($device_ip)
|
55
61
|
when 'console'
|
56
62
|
puts "droiuby console"
|
57
63
|
while buf = Readline.readline("droiuby > ", true)
|
58
64
|
|
59
|
-
if buf
|
65
|
+
Readline::HISTORY.pop if /^\s*$/ =~ buf
|
66
|
+
|
67
|
+
if ( buf=='refresh!' || buf=='reload!')
|
60
68
|
project.reload($device_ip)
|
61
69
|
next
|
62
70
|
end
|
@@ -75,7 +83,6 @@ case command
|
|
75
83
|
puts res['result']
|
76
84
|
end
|
77
85
|
when 'list'
|
78
|
-
project = Project.new
|
79
86
|
project.list($device_ip)
|
80
87
|
when 'switch'
|
81
88
|
instance_name = nil
|
data/lib/droiuby/project.rb
CHANGED
@@ -189,10 +189,10 @@ class Project < Thor
|
|
189
189
|
trap("INT"){ server.shutdown }
|
190
190
|
server.start
|
191
191
|
end
|
192
|
-
|
192
|
+
|
193
193
|
desc "upload NAME DEVICE_IP [WORKSPACE_DIR]","uploads a droiuby application to target device running droiuby client"
|
194
194
|
|
195
|
-
def upload(name, device_ip, source_dir = 'projects', framework = false)
|
195
|
+
def upload(name, device_ip, source_dir = 'projects', framework = false, run = true)
|
196
196
|
|
197
197
|
source_dir = if name.blank? || framework
|
198
198
|
Dir.pwd
|
@@ -218,7 +218,7 @@ class Project < Thor
|
|
218
218
|
|
219
219
|
params = {
|
220
220
|
"name" => name,
|
221
|
-
"run" =>
|
221
|
+
"run" => run ? 'true' : 'false',
|
222
222
|
"file" => UploadIO.new(zip, "application/zip", src_package,"content-disposition" => "form-data; name=\"file\"; filename=\"#{File.basename(src_package)}\"\r\n")}
|
223
223
|
|
224
224
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: droiuby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
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-12-
|
12
|
+
date: 2013-12-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|