urturn-cli 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/urturn +8 -0
- data/lib/webdoc-cli/expression_rest_client.rb +23 -0
- data/lib/webdoc-cli/version.rb +1 -1
- metadata +2 -2
data/bin/urturn
CHANGED
@@ -35,6 +35,14 @@ command 'expression:deploy' do |c|
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
|
38
|
+
desc "Package a new version of your expression that can be uploaded on the expression page."
|
39
|
+
command 'expression:package' do |c|
|
40
|
+
c.action do |global_options,options,args|
|
41
|
+
path = (args.count > 0 ? args[0] : '.')
|
42
|
+
@client.package path
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
38
46
|
|
39
47
|
desc "Show an expression list"
|
40
48
|
command 'expression:list' do |c|
|
@@ -18,6 +18,29 @@ module Webdoc
|
|
18
18
|
@resource = RestClient::Resource.new 'http://' + Webdoc::Cli.host
|
19
19
|
end
|
20
20
|
|
21
|
+
|
22
|
+
# package an expression
|
23
|
+
def package(path='.')
|
24
|
+
bundle(path) do |file|
|
25
|
+
json = JSON.parse(File.read(File.join(path, 'expression.json')))
|
26
|
+
version = json['version']
|
27
|
+
system_name = json['system_name']
|
28
|
+
|
29
|
+
if system_name.nil?
|
30
|
+
Webdoc::Cli.cmd.say("System Name cannot be null")
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
if version.nil?
|
34
|
+
Webdoc::Cli.cmd.say("Version number cannot be null")
|
35
|
+
exit 1
|
36
|
+
end
|
37
|
+
filename = "#{system_name}-#{version}.expression"
|
38
|
+
|
39
|
+
Webdoc::Cli.cmd.say "==> package bundle to #{filename}"
|
40
|
+
FileUtils.cp file.path, filename
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
21
44
|
# Bundle and deploy the expression in the current directory
|
22
45
|
def deploy(path='.')
|
23
46
|
Webdoc::Cli.authenticate_then do |headers|
|
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.
|
4
|
+
version: 0.6.0
|
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:
|
13
|
+
date: 2013-01-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gli
|