cpee-model-management 1.0.16 → 1.0.17
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.
- checksums.yaml +4 -4
- data/cpee-model-management.gemspec +1 -1
- data/lib/cpee-model-management/commit.rb +1 -3
- data/lib/cpee-model-management/implementation.rb +17 -4
- data/ui/js/design.js +6 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3a70760a747bb5dd295cac87766307d1d3775767af440e3090d2e108757837d
|
4
|
+
data.tar.gz: ed59f63e220bb3c6fb8e096ce21ee41f5542c59fff051e48c0d04ff7ee8ccd79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd9497631d3a6d95a98b0f829211aa13712626bf1aac340a4bdb19eb80ee1b26e624bfa3e5766d1f8cceeb37d215f75b8c05478566802daf667a297eb4c4b075
|
7
|
+
data.tar.gz: 04c947de228d452fa277b01213c0a4a5deaa8d47bd3b357a94593c350c1ae15a728c470a38023a4298d9a2db808580bfe187cb1fe19dcf9bd4b634819a25a0a2
|
@@ -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}.
|
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}"
|
42
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active'}"
|
43
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active-uuid'}"
|
44
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.attrs'}" "#{tnew + '.
|
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.
|
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-
|
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.
|
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."
|