cpee-model-management 1.0.8 → 1.0.9
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/implementation.rb +23 -21
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff58402244bdf7eadbd79cebb7c4ef42f302b45354da3bc1634bd866ba273eec
|
4
|
+
data.tar.gz: 3dc2729da1856011a97a42c487117fe2cc7f4e6587e6e54934559bccc68b7148
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 130154f25420d1901fa5dd8e83f15e2eecb6609660d7fd2e30f43e202b7a1a25fbc02e408bcf0575e5d4de6dffad5cdd2561926a4824a6127b9a72c2854e0267
|
7
|
+
data.tar.gz: 6be4a1c311486e3364ce6e96192ca4b654e625ae102204150b34989384ba617abe5b7ba77c40b9f59233f61dfa7185c3d88917dd685629cbd1355c2b87bc62b3
|
@@ -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
|
-
|
39
|
-
|
40
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{
|
41
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
42
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
43
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{
|
44
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{
|
45
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple mv "#{
|
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
|
-
|
52
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
53
|
-
FileUtils.rm_rf(
|
54
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
55
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
56
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
57
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
58
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
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
|
-
|
65
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
66
|
-
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{
|
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)
|