cpee-model-management 1.0.16 → 1.0.17

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
  SHA256:
3
- metadata.gz: eb4c3a55fe08f20e52d1908aa0285f9783d8413a470bd0b034829569d7d39620
4
- data.tar.gz: f0eeae82d2bc796f2976375113f0bd8616cb59e9b4e95541f3175f9cbd6565d1
3
+ metadata.gz: d3a70760a747bb5dd295cac87766307d1d3775767af440e3090d2e108757837d
4
+ data.tar.gz: ed59f63e220bb3c6fb8e096ce21ee41f5542c59fff051e48c0d04ff7ee8ccd79
5
5
  SHA512:
6
- metadata.gz: dce3271b164de9f31aa0aef4dde102501c448a93067f0259d787446facbc72a119e617f35c09a02778e20114a07acdb08a9b76493a297ac05130c7ad0b542786
7
- data.tar.gz: 1eac23abe60a8d110ff7e2b154502b4756629576b7d6c2a225360160ab31288fcb4d9e4ba58eed489261fcd21334fac96d9b18aab355e8b60d5b2374cfea5d60
6
+ metadata.gz: fd9497631d3a6d95a98b0f829211aa13712626bf1aac340a4bdb19eb80ee1b26e624bfa3e5766d1f8cceeb37d215f75b8c05478566802daf667a297eb4c4b075
7
+ data.tar.gz: 04c947de228d452fa277b01213c0a4a5deaa8d47bd3b357a94593c350c1ae15a728c470a38023a4298d9a2db808580bfe187cb1fe19dcf9bd4b634819a25a0a2
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-model-management"
3
- s.version = "1.0.16"
3
+ s.version = "1.0.17"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "(Lifecycle) manage your process models in a directory or git repo."
@@ -7,8 +7,6 @@ new = File.basename(new)
7
7
  `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}" 2>/dev/null`
8
8
  `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.active" 2>/dev/null`
9
9
  `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.active-uuid" 2>/dev/null`
10
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.author" 2>/dev/null`
11
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.creator" 2>/dev/null`
12
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.stage" 2>/dev/null`
10
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.attrs" 2>/dev/null`
13
11
  `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple commit -m "#{author.gsub(/"/,"'")}"`
14
12
  `GIT_TERMINAL_PROMPT=0 git push` rescue nil
@@ -38,10 +38,10 @@ module CPEE
38
38
  p2 = Pathname.new(File.dirname(new))
39
39
  told = File.basename(old)
40
40
  tnew = File.join(p1.relative_path_from(p1).to_s,File.basename(new))
41
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told}" "#{tnew}" 2>/dev/null`
42
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active'}" 2>/dev/null`
43
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active-uuid'}" 2>/dev/null`
44
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.attrs'}" "#{tnew + '.author'}" 2>/dev/null`
41
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told}" "#{tnew}" 2>/dev/null`
42
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active'}" 2>/dev/null`
43
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active-uuid'}" 2>/dev/null`
44
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.attrs'}" "#{tnew + '.attrs'}" 2>/dev/null`
45
45
  Dir.chdir(cdir)
46
46
  CPEE::ModelManagement::fs_mv(models,old,new) # fallback
47
47
  end
@@ -320,6 +320,19 @@ module CPEE
320
320
  attrs['author'] = author
321
321
  File.write(fname + '.attrs',JSON::pretty_generate(attrs))
322
322
 
323
+ Dir.glob(File.join(fname + '/*.xml')).each do |f|
324
+ XML::Smart::modify(f) do |doc|
325
+ doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
326
+ doc.find('/p:testset/p:attributes/p:design_dir').each do |ele|
327
+ ele.text = nname + '.dir'
328
+ end
329
+ attrs = doc.find('/p:testset/p:attributes/*').map do |e|
330
+ [e.qname.name,e.text]
331
+ end.to_h
332
+ end
333
+ File.write(f + '.attrs',JSON::pretty_generate(attrs))
334
+ end
335
+
323
336
  CPEE::ModelManagement::op author, 'mv', models, File.join(nname + '.dir'), File.join(name + '.dir')
324
337
  CPEE::ModelManagement::notify conns, 'rename', models, fnname, fname
325
338
  nil
data/ui/js/design.js CHANGED
@@ -88,6 +88,12 @@ function paint(gdir,gstage) {
88
88
  $('[data-class=guarded] abbr',clone).attr('title',data['guarded'] || '');
89
89
  $('[data-class=guarded] abbr',clone).text((data['guarded'] || '').match(/none/i) ? '' : (data['guarded'] || '').charAt(0).toUpperCase());
90
90
  $('[data-class=resource]',clone).text(data['guarded_id'] || '');
91
+
92
+ if (data['guarded']) {
93
+ $('[data-class=guarded] abbr',clone).attr('title',data['guarded']);
94
+ $('[data-class=guarded] abbr',clone).text(data['guarded'].match(/none/i) ? '' : data['guarded'].charAt(0).toUpperCase());
95
+ $('[data-class=resource]',clone).text(data['guarded_what']);
96
+ }
91
97
  }
92
98
  $('[data-class=author]',clone).text(data['author']);
93
99
  $('[data-class=date]',clone).text(new Date(data['date']).strftime('%Y-%m-%d, %H:%M:%S'));
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee-model-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
8
8
  autorequire:
9
9
  bindir: tools
10
10
  cert_chain: []
11
- date: 2021-07-01 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riddl
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.1.6
106
+ rubygems_version: 3.2.22
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: "(Lifecycle) manage your process models in a directory or git repo."