urturn-cli 0.6.7 → 0.6.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/urturn +5 -1
- data/lib/webdoc-cli/expression_rest_client.rb +6 -5
- data/lib/webdoc-cli/version.rb +1 -1
- metadata +2 -2
data/bin/urturn
CHANGED
@@ -12,6 +12,9 @@ version Webdoc::Cli::VERSION
|
|
12
12
|
|
13
13
|
flag [:h, :host], :default_value => 'www.urturn.com'
|
14
14
|
|
15
|
+
desc "Force upload, override current expression if needed"
|
16
|
+
switch [:f, :force]
|
17
|
+
|
15
18
|
pre do |global_options, command, options, args|
|
16
19
|
Webdoc::Cli.host = global_options[:host]
|
17
20
|
@client = Webdoc::Cli::ExpressionRestClient.new
|
@@ -33,7 +36,8 @@ desc "Deploy a new version of your expression"
|
|
33
36
|
command 'expression:deploy' do |c|
|
34
37
|
c.action do |global_options,options,args|
|
35
38
|
path = (args.count > 0 ? args[0] : '.')
|
36
|
-
|
39
|
+
puts global_options.inspect
|
40
|
+
@client.deploy path, force: global_options[:force]
|
37
41
|
end
|
38
42
|
end
|
39
43
|
|
@@ -42,16 +42,16 @@ module Webdoc
|
|
42
42
|
end
|
43
43
|
|
44
44
|
# Bundle and deploy the expression in the current directory
|
45
|
-
def deploy(path='.')
|
45
|
+
def deploy(path='.', options={})
|
46
46
|
if(path =~ /\.(expression|zip)$/)
|
47
|
-
File.open(path) {|file| send_bundle(file)}
|
47
|
+
File.open(path) {|file| send_bundle(file, options)}
|
48
48
|
else
|
49
49
|
Webdoc::Cli.cmd.say "==> create bundle"
|
50
|
-
bundle(path) {|file| send_bundle(file) }
|
50
|
+
bundle(path) {|file| send_bundle(file, options) }
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
-
def send_bundle(file)
|
54
|
+
def send_bundle(file, options)
|
55
55
|
Webdoc::Cli.authenticate_then do |headers|
|
56
56
|
request = RestClient::Request.new(
|
57
57
|
:method => :post,
|
@@ -59,7 +59,8 @@ module Webdoc
|
|
59
59
|
:cookies => headers[:cookies],
|
60
60
|
:payload => {
|
61
61
|
:multipart => true,
|
62
|
-
:bundle => file
|
62
|
+
:bundle => file,
|
63
|
+
:force => !!options[:force]
|
63
64
|
}
|
64
65
|
)
|
65
66
|
Webdoc::Cli.cmd.say "==> send bundle to #{Webdoc::Cli.host}"
|
data/lib/webdoc-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urturn-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gli
|