cpee-model-management 1.0.4 → 1.0.5
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 +8 -8
- data/lib/cpee-model-management/implementation.rb +18 -17
- 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: 2301d22c5a02dcace2fa736c3b41b88d02866c2cb2f3b68b2554e0766224486e
|
4
|
+
data.tar.gz: d8f20b6c8c5c620dab0f582566a3445f6b48498cecd36ea7670096d80319166c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8de486ecdffc9c0cf93a7ca043e0d1363210d679223528270f9aa02e97aa2106386bb9a0240237f0c115321ea58127e13d0c24e33e414695ee1896676e88fa7
|
7
|
+
data.tar.gz: 711f92a0d044bd8bfc77cb56cd899df56343fd9fe80f9bc92170f4d86b0c5cced06edfd95f273879dbc59f59a27deaa7be4a25b5e572668621c062df7b9d82bd
|
@@ -4,11 +4,11 @@ author = ARGV[2]
|
|
4
4
|
|
5
5
|
Dir.chdir(File.join(models,File.dirname(new)))
|
6
6
|
new = File.basename(new)
|
7
|
-
`git add "#{new}" 2>/dev/null`
|
8
|
-
`git add "#{new}.active" 2>/dev/null`
|
9
|
-
`git add "#{new}.active-uuid" 2>/dev/null`
|
10
|
-
`git add "#{new}.author" 2>/dev/null`
|
11
|
-
`git add "#{new}.creator" 2>/dev/null`
|
12
|
-
`git add "#{new}.stage" 2>/dev/null`
|
13
|
-
`git commit -m "#{author.gsub(/"/,"'")}"`
|
14
|
-
`git push` rescue nil
|
7
|
+
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}" 2>/dev/null`
|
8
|
+
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple add "#{new}.active" 2>/dev/null`
|
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`
|
13
|
+
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple commit -m "#{author.gsub(/"/,"'")}"`
|
14
|
+
`GIT_TERMINAL_PROMPT=0 git push` rescue nil
|
@@ -23,6 +23,7 @@ require 'riddl/client'
|
|
23
23
|
require 'riddl/protocols/utils'
|
24
24
|
require 'fileutils'
|
25
25
|
require 'pathname'
|
26
|
+
require 'shellwords'
|
26
27
|
|
27
28
|
module CPEE
|
28
29
|
module ModelManagement
|
@@ -36,39 +37,39 @@ module CPEE
|
|
36
37
|
p2 = Pathname.new(File.dirname(new))
|
37
38
|
old = File.basename(old)
|
38
39
|
new = File.join(p1.relative_path_from(p1).to_s,File.basename(new))
|
39
|
-
`git mv "#{old}" "#{new}" 2>/dev/null`
|
40
|
-
`git rm -rf "#{old + '.active'}" 2>/dev/null`
|
41
|
-
`git rm -rf "#{old + '.active-uuid'}" 2>/dev/null`
|
42
|
-
`git mv "#{old + '.author'}" "#{new + '.author'}" 2>/dev/null`
|
43
|
-
`git mv "#{old + '.creator'}" "#{new + '.creator'}" 2>/dev/null`
|
44
|
-
`git mv "#{old + '.stage'}" "#{new + '.stage'}" 2>/dev/null`
|
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`
|
45
46
|
Dir.chdir(cdir)
|
46
47
|
end
|
47
48
|
def self::git_rm(models,new)
|
48
49
|
cdir = Dir.pwd
|
49
50
|
Dir.chdir(File.join(models,File.dirname(new)))
|
50
51
|
new = File.basename(new)
|
51
|
-
`git rm -rf "#{new}" 2>/dev/null`
|
52
|
+
`git -c user.name='Christine Ashcreek' -c user.email=dev@null.com -c push.default=simple rm -rf "#{new}" 2>/dev/null`
|
52
53
|
FileUtils.rm_rf(new)
|
53
|
-
`git rm -rf "#{new}.active" 2>/dev/null`
|
54
|
-
`git rm -rf "#{new}.active-uuid" 2>/dev/null`
|
55
|
-
`git rm -rf "#{new}.author" 2>/dev/null`
|
56
|
-
`git rm -rf "#{new}.creator" 2>/dev/null`
|
57
|
-
`git rm -rf "#{new}.stage" 2>/dev/null`
|
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`
|
58
59
|
Dir.chdir(cdir)
|
59
60
|
end
|
60
61
|
def self::git_shift(models,new)
|
61
62
|
cdir = Dir.pwd
|
62
63
|
Dir.chdir(File.join(models,File.dirname(new)))
|
63
64
|
new = File.basename(new)
|
64
|
-
`git rm -rf "#{new}.active" 2>/dev/null`
|
65
|
-
`git rm -rf "#{new}.active-uuid" 2>/dev/null`
|
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
67
|
Dir.chdir(cdir)
|
67
68
|
end
|
68
69
|
def self::git_commit(models,new,author)
|
69
|
-
|
70
|
-
|
71
|
-
|
70
|
+
rp = File.realpath(models)
|
71
|
+
crb = File.join(__dir__,'commit.rb')
|
72
|
+
system 'ruby ' + crb + ' ' + [rp, new, author].shelljoin + ' &'
|
72
73
|
end
|
73
74
|
def self::fs_mv(models,old,new)
|
74
75
|
fname = File.join(models,old)
|