cpee 1.3.211 → 1.3.212

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9dfbc4a7336bc2c8c2362dcbf908e405513651b
4
- data.tar.gz: 1a598ec52063b0be720385d56ad43a6a34a5675b
3
+ metadata.gz: d73a9bb53d9229c30830b55083ce1a8f94ccdb67
4
+ data.tar.gz: dd414c3f30f5905fac89916c1ae9dae138602482
5
5
  SHA512:
6
- metadata.gz: 51fa98d57404c06840e661579968c1972320fa78c164e972a2d3d29c85a8fc2aeff9ecc82b397b4a093e1d6acc76e025cdf5f97989f97492255e5eb4daa1804c
7
- data.tar.gz: c44f85f3d3596ffc9fb9c8b70d3ee1570a37c0a8121e156d3b67c00485a8a2b265a0e316604f7dca675850594c413eb05db20c18fe488e847aa2f77c65116dda
6
+ metadata.gz: 44d934d06075d382982f24a1c880032caffc918de1ee86191db25ddc4b4bb6b4cc43a45e9dabfcf7fdd04956eee13ff002fa1946a0d1af21903a35323c50646a
7
+ data.tar.gz: 54d9791c816f0db90fad04d321ed8c884ad93611531d85ca0f12c3b48aa0194d6a30c38aa27136d2608f655f96fa3ef299a101ee0507b5acffadb5d60ec19037
@@ -56,11 +56,10 @@ var sub_less = 'topic' + '=' + 'activity' + '&' +// {{{
56
56
  'events' + '=' + 'change';// }}}
57
57
 
58
58
  $(document).ready(function() {// {{{
59
- console.log(location.protocol);
60
59
  if (location.protocol.match(/^file/)) {
61
60
  $("input[name=base-url]").val("http://localhost:" + $('body').data('defaultport'));
62
61
  } else {
63
- $("input[name=base-url]").val(location.protocol + "//" + location.host + ":" + $('body').data('defaultport'));
62
+ $("input[name=base-url]").val(location.protocol + "//" + location.hostname + ":" + $('body').data('defaultport'));
64
63
  }
65
64
  $("button[name=base]").click(function(){ create_instance(null,false); });
66
65
  $("button[name=instance]").click(function(){ ui_activate_tab("#tabinstance"); monitor_instance(false,false); });
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "1.3.211"
3
+ s.version = "1.3.212"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
data/tools/cpee CHANGED
@@ -3,17 +3,34 @@ curpath = __dir__
3
3
  require 'rubygems'
4
4
  require 'optparse'
5
5
  require 'fileutils'
6
+ require 'webrick'
7
+
8
+ def wrap(s, width=78, indent=10)
9
+ lines = []
10
+ line, s = s[0..indent-2], s[indent..-1]
11
+ s.split(/\s+/).each do |word|
12
+ if line.size + word.size >= width
13
+ lines << line
14
+ line = (" " * (indent)) + word
15
+ else
16
+ line << " " << word
17
+ end
18
+ end
19
+ lines << line if line
20
+ return lines.join "\n"
21
+ end
6
22
 
7
23
  ARGV.options { |opt|
8
24
  opt.summary_indent = ' ' * 2
9
- opt.banner = "Usage:\n#{opt.summary_indent}#{File.basename($0)} [options] [new|ui DIRECTORY]\n"
25
+ opt.banner = "Usage:\n#{opt.summary_indent}#{File.basename($0)} [options] [ui] | [new DIR]\n"
10
26
  opt.on("Options:")
11
27
  opt.on("--help", "-h", "This text") { puts opt; exit }
12
- opt.on("[new DIRECTORY] scaffolds a sample execution engine. Everything except instances can be removed for default behaviour.")
13
- opt.on("[ui DIRECTORY] symlinks/updates the UI.")
28
+ opt.on("")
29
+ opt.on(wrap("[new DIR] scaffolds a sample execution engine. Everything except instances can be removed for default behaviour."))
30
+ opt.on(wrap("[ui] starts a simple static web server with the ui on http://localhost:8080. Copy #{File.realpath(curpath + '/../cockpit')} if you want stuff in apache or nginx."))
14
31
  opt.parse!
15
32
  }
16
- if ARGV.length != 2 || !%w(ui new).include?(ARGV[0])
33
+ if ARGV.length == 0 || (ARGV.length == 1 && ARGV[0] != 'ui') || (ARGV.length == 2 && ARGV[1] != 'new') || ARGV.length > 2
17
34
  puts ARGV.options
18
35
  exit
19
36
  end
@@ -21,11 +38,9 @@ command = ARGV[0]
21
38
  dir = ARGV[1]
22
39
 
23
40
  if command == 'ui'
24
- if !File.exists?(dir) || File.symlink?(dir)
25
- FileUtils.ln_sf("#{curpath}/../cockpit",dir)
26
- else
27
- puts "File or directory with this name already exists."
28
- end
41
+ s = WEBrick::HTTPServer.new(:Port => 8080, :DocumentRoot => "#{curpath}/../cockpit")
42
+ trap("INT"){ s.shutdown }
43
+ s.start
29
44
  else
30
45
  if !File.exists?(dir)
31
46
  FileUtils.cp_r("#{curpath}/server/",dir)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.211
4
+ version: 1.3.212
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler