cpee-model-management 1.0.8 → 1.0.9

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: 800b85d124c0e17d95c1ec8db33ba65f527c63c3612ad7e48eef6ffd52613a53
4
- data.tar.gz: 6258a4c173733ad24e85b19b7fa7f0157292865b0311f6805689767ae0cc43f2
3
+ metadata.gz: ff58402244bdf7eadbd79cebb7c4ef42f302b45354da3bc1634bd866ba273eec
4
+ data.tar.gz: 3dc2729da1856011a97a42c487117fe2cc7f4e6587e6e54934559bccc68b7148
5
5
  SHA512:
6
- metadata.gz: 26618e7be924364b745337b089a15ffbb9c01786e352a5db8d04b256ad8b070cdc45da9e520d360dd9d3d613c43e5caee12f304c61fda5540e61d147726cba60
7
- data.tar.gz: 66c4bddc35f6fa5c3271d5dff4089fad8b53d68f9f825ca9cecb491f0fbbb47fdd03d8188df8c46c7b1a010d4b0bf2f57487803e642edba9c311ad9753d84b21
6
+ metadata.gz: 130154f25420d1901fa5dd8e83f15e2eecb6609660d7fd2e30f43e202b7a1a25fbc02e408bcf0575e5d4de6dffad5cdd2561926a4824a6127b9a72c2854e0267
7
+ data.tar.gz: 6be4a1c311486e3364ce6e96192ca4b654e625ae102204150b34989384ba617abe5b7ba77c40b9f59233f61dfa7185c3d88917dd685629cbd1355c2b87bc62b3
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-model-management"
3
- s.version = "1.0.8"
3
+ s.version = "1.0.9"
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."
@@ -35,36 +35,39 @@ module CPEE
35
35
  Dir.chdir(File.join(models,File.dirname(old)))
36
36
  p1 = Pathname.new(File.dirname(old))
37
37
  p2 = Pathname.new(File.dirname(new))
38
- old = File.basename(old)
39
- new = File.join(p1.relative_path_from(p1).to_s,File.basename(new))
40
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{old}" "#{new}" 2>/dev/null`
41
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{old + '.active'}" 2>/dev/null`
42
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{old + '.active-uuid'}" 2>/dev/null`
43
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{old + '.author'}" "#{new + '.author'}" 2>/dev/null`
44
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{old + '.creator'}" "#{new + '.creator'}" 2>/dev/null`
45
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{old + '.stage'}" "#{new + '.stage'}" 2>/dev/null`
38
+ told = File.basename(old)
39
+ tnew = File.join(p1.relative_path_from(p1).to_s,File.basename(new))
40
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told}" "#{tnew}" 2>/dev/null`
41
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active'}" 2>/dev/null`
42
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{told + '.active-uuid'}" 2>/dev/null`
43
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.author'}" "#{tnew + '.author'}" 2>/dev/null`
44
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.creator'}" "#{tnew + '.creator'}" 2>/dev/null`
45
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{told + '.stage'}" "#{tnew + '.stage'}" 2>/dev/null`
46
46
  Dir.chdir(cdir)
47
+ CPEE::ModelManagement::fs_mv(models,old,new) # fallback
47
48
  end
48
49
  def self::git_rm(models,new)
49
50
  cdir = Dir.pwd
50
51
  Dir.chdir(File.join(models,File.dirname(new)))
51
- new = File.basename(new)
52
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}" 2>/dev/null`
53
- FileUtils.rm_rf(new)
54
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.active" 2>/dev/null`
55
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.active-uuid" 2>/dev/null`
56
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.author" 2>/dev/null`
57
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.creator" 2>/dev/null`
58
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.stage" 2>/dev/null`
52
+ tnew = File.basename(new)
53
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}" 2>/dev/null`
54
+ FileUtils.rm_rf(tnew)
55
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}.active" 2>/dev/null`
56
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}.active-uuid" 2>/dev/null`
57
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}.author" 2>/dev/null`
58
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}.creator" 2>/dev/null`
59
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{tnew}.stage" 2>/dev/null`
59
60
  Dir.chdir(cdir)
61
+ CPEE::ModelManagement::fs_rm(models,new) # fallback
60
62
  end
61
63
  def self::git_shift(models,new)
62
64
  cdir = Dir.pwd
63
65
  Dir.chdir(File.join(models,File.dirname(new)))
64
- new = File.basename(new)
65
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.active" 2>/dev/null`
66
- `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}.active-uuid" 2>/dev/null`
66
+ nnew = File.basename(new)
67
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{nnew}.active" 2>/dev/null`
68
+ `git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{nnew}.active-uuid" 2>/dev/null`
67
69
  Dir.chdir(cdir)
70
+ CPEE::ModelManagement::fs_shift(models,new) # fallback
68
71
  end
69
72
  def self::git_commit(models,new,author)
70
73
  rp = File.realpath(models)
@@ -74,7 +77,7 @@ module CPEE
74
77
  def self::fs_mv(models,old,new)
75
78
  fname = File.join(models,old)
76
79
  fnname = File.join(models,new)
77
- FileUtils.mv(fname,fnname)
80
+ FileUtils.mv(fname,fnname) rescue nil
78
81
  File.delete(fname + '.active',fnname + '.active') rescue nil
79
82
  File.delete(fname + '.active-uuid',fnname + '.active-uuid') rescue nil
80
83
  FileUtils.mv(fname + '.author',fnname + '.author') rescue nil
@@ -104,7 +107,6 @@ module CPEE
104
107
  fname = File.join(models,new)
105
108
  File.delete(fname + '.active') rescue nil
106
109
  File.delete(fname + '.active-uuid') rescue nil
107
- Dir.chdir(cdir)
108
110
  end
109
111
 
110
112
  def self::git_dir(models,file)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee-model-management
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler