git_cli 0.12.0 → 0.13.7

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: 5be69142b682051500f560cd461828a05e192cfba2d841c0ca6bf5c88cca8603
4
- data.tar.gz: 77b4e22ee8abe86cfd5e9e484acc828a8c1f20eb6d5fbb97cc59f6ad0f9bdda6
3
+ metadata.gz: 952f15237a2e49d3e82598183eb30435bdeabfd225bb4b04019085c8eb4fa366
4
+ data.tar.gz: 4ca2979fa6c816852bdcb7d3aa474ac404a6185ad53eaa3c73e90d6664898316
5
5
  SHA512:
6
- metadata.gz: cd03421558a2184ee2d9268940379c5379e560face017047dacac7f6bf5cc26ab2db844213079cfa08cfcf300a04515b4bf00fcde8110bd4cd4fa718ef6d0ee8
7
- data.tar.gz: 49a04c97c966df79dacbf1a2a94cf884dd8762bffd9a200e6ad21580494481052230e427216abbec1fbb374d7b8993d60ea08ca1af5cdf1c84b246368ce5c3d6
6
+ metadata.gz: 50fb332c98fdcac1cddac55751b3ad99dbe80aa208c01fd34338eada1b5dd9d2ea4bf09ad1de994094fe23ff15def81f96c535365602888e88e97d284e23a2d3
7
+ data.tar.gz: 7fd0949806ee2eb6a196b0415bf641379d73cff45bef62008bf4b56a1b685094492c501c3c2f8d5eea680a885a4a70d31f68de8b32262065ad706257a314737b
data/Gemfile.lock CHANGED
@@ -1,31 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git_cli (0.12.0)
4
+ git_cli (0.13.7)
5
5
  ptools (~> 1.4.0)
6
- teLogger
7
- toolrack
6
+ teLogger (> 0.2)
7
+ toolrack (> 0.23)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- colorize (0.8.1)
13
- gvcs (0.1.2)
14
- minitest (5.18.0)
12
+ colorize (1.1.0)
13
+ diff-lcs (1.5.0)
14
+ minitest (5.20.0)
15
15
  pastel (0.8.0)
16
16
  tty-color (~> 0.5)
17
17
  ptools (1.4.3)
18
18
  rake (12.3.3)
19
- release-gem (0.1.19)
20
- colorize
21
- git_cli
22
- gvcs
23
- teLogger
24
- toolrack
25
- tty-command
26
- tty-prompt
19
+ release-gem (0.3.3)
20
+ colorize (~> 1.1)
21
+ git_cli (~> 0.13)
22
+ pastel (~> 0.8)
23
+ teLogger (~> 0.2)
24
+ toolrack (~> 0.23)
25
+ tty-command (~> 0.10)
26
+ tty-prompt (~> 0.23)
27
+ rspec (3.12.0)
28
+ rspec-core (~> 3.12.0)
29
+ rspec-expectations (~> 3.12.0)
30
+ rspec-mocks (~> 3.12.0)
31
+ rspec-core (3.12.2)
32
+ rspec-support (~> 3.12.0)
33
+ rspec-expectations (3.12.3)
34
+ diff-lcs (>= 1.2.0, < 2.0)
35
+ rspec-support (~> 3.12.0)
36
+ rspec-mocks (3.12.6)
37
+ diff-lcs (>= 1.2.0, < 2.0)
38
+ rspec-support (~> 3.12.0)
39
+ rspec-support (3.12.1)
27
40
  teLogger (0.2.2)
28
- toolrack (0.22.1)
41
+ toolrack (0.23.3)
29
42
  tty-color (0.6.0)
30
43
  tty-command (0.10.1)
31
44
  pastel (~> 0.8)
@@ -48,6 +61,7 @@ DEPENDENCIES
48
61
  minitest (~> 5.0)
49
62
  rake (~> 12.0)
50
63
  release-gem
64
+ rspec
51
65
 
52
66
  BUNDLED WITH
53
- 2.2.28
67
+ 2.4.19
data/README.md CHANGED
@@ -29,21 +29,12 @@ Example usage:
29
29
  ```ruby
30
30
  require 'git_cli'
31
31
 
32
- # Gvcs is artificial namespace to shield the actual
33
- # GitCli package name. It is designed so that if we
34
- # have another VCS coming all client code can remain
35
- # unchanged since the specific package name is not
36
- # being used in client application. The new VCS provider
37
- # can just provide all functions via the interface
38
- # Only draw back is this cannot run multiple VCS at the
39
- # same time
40
- #
41
32
  # vcs is encapsulation of general functions (read below)
42
- vcs = Gvcs::Vcs.new
33
+ vcs = GitCli::Vcs.new
43
34
  vcs.init(path) # init workspace at the given path
44
35
  vcs.clone("/source/repos", "/destination/repos") # clone a project
45
36
 
46
- workspace = Gvcs::Workspace.new(vcs, "/any/git/repository")
37
+ workspace = GitCli::Workspace.new(vcs, "/any/git/repository")
47
38
  # workspace now can invoke all supported git operations
48
39
 
49
40
  ```
@@ -55,75 +46,161 @@ The following operations are supported on the git command line:
55
46
  - vcs.init("/path/to/new/workspace")
56
47
  - vcs.clone("/source/repos","/path/to/workspace")
57
48
  - Workspace command
58
- - workspace.root\_path # git rev-parse --show-toplevel
59
- - workspace.is\_workspace? # call git status see if error thrown
60
- - workspace.repos # returns list of remote repositories
61
- - workspace.clean? # return true if there is no new,deleted,modified and staged files
62
- - workspace.add("/path/a","/path/b","/path/c/a") # git add
63
- - workspace.remove\_staging("/path/a","/path/b","/path/c/a") # git reset
64
- - workspace.remove\_vcs("/path/a","/path/b","/path/c/a") # git rm --cached
65
- - workspace.commit("commit message", { files: ["/path/a"."/path/b"] }) # git commit -m
66
- - workspace.commit\_all("commit message") # git commit -am
67
- - workspace.status # git status [Returns list of GitCli::Delta::VCSItem carries attributes @path, @full and @type]
68
- - workspace.modified\_files # git diff --name-only --diff-filter=M [returns modified directories and files in an array]
69
- - workspace.conflicted\_files # git diff --name-only --diff-filter=U [returns conflicted directories and files in an array]
70
- - workspace.new\_files # git ls-files --others --exclude-standard --directory [returns new directories and files (non tracked) in an array]
71
- - workspace.deleted\_files # git ls-files -d [returns deleted directories and files in an array]
72
- - workspace.staged\_files # git diff --name-only --cached [returns staged directories and files in an array]
73
- - workspace.reset\_file\_changes("/path/to/file") # git checkout --
74
- - workspace.reset\_all\_changes # git reset --hard
75
- - workspace.calculat\_distance("origin/HEAD","HEAD") # git rev-list 'origin/HEAD'..'HEAD' --count [returns integer value how far is it]
76
- - workspace.is\_local\_ahead\_of\_remote?("origin/HEAD","branch-main") # aggregated from calculate\_distance() with default _to_ value fixed at "HEAD" [returns boolean]
77
- - workspace.is\_remote\_ahead\_of\_local?("origin/HEAD","branch-main") # aggregated from calculate\_distance() with default _from_ value fixed at "HEAD" [returns boolean]
78
- - workspace.push("origin","master") # git push origin master
79
- - workspace.push\_with\_tags("origin","master") # git push origin master --tags
80
- - workspace.pull("origin","master") # git pull
81
- - workspace.current\_branch # git branch --show-current [returns branch name]
82
- - workspace.local\_branches # git branch [return local branches in an array]
83
- - workspace.remote\_branches # git branch -r [return remote branches in an array]
84
- - workspace.all\_branches # concate output of local\_branches and remote\_branches [returns array]
85
- - workspace.switch\_branch("new-branch") # git checkout new-branch
86
- - workspace.create\_branch("new-branch") # git branch new-branch
87
- - workspace.download\_all\_remote\_branches\_name # git fetch -all
88
- - workspace.merge\_branch("development") # git merge development
89
- - workspace.delete\_branch("development") # git branch -d development
90
- - workspace.diff # git diff
91
- - workspace.diff\_file("/path/a") # git diff /path/a
92
- - workspace.diff\_branch("master/HEAD","development/HEAD") # git diff master/HEAD..development/HEAD
93
- - workspace.diff\_working\_with\_last\_commit # git diff HEAD^ HEAD
94
- - workspace.diff\_index\_with\_last\_commit # git diff --cached
95
- - workspace.ignore("/path/a","/path/b") # Append entries into .gitignore file
96
- - workspace.ignore\_rules # read the .gitignore files and returns its content in an array
97
- - workspace.update\_ignore\_rules("\*.log") # add non file entries into .gitignore
98
- - workspace.show\_log(commit\_id) # git show commit\_id
99
- - workspace.all\_tags # git tag [returns array]
100
- - workspace.tag\_info("tag name", "%H|%ad|%an|%s") # git show tag\_name --format="%H|%ad|%an|%s"
101
- - workspace.create\_tag(tagname) # git tag tagname
102
- - workspace.create\_tag(tagname, message) # git tag -a tagname -m message
103
- - workspace.create\_tag\_from\_commit(tagname, commit) # git tag -a tagname commit
104
- - workspace.create\_tag\_from\_commit(tagname, commit, message) # git tag -a tagname -m message commit
105
- - workspace.fetch\_tag\_to\_local # git fetch --all --tags
106
- - workspace.show\_tag\_detail(tagname) # git show tagname
107
- - workspace.delete\_tag(tagname) # git tag -d tagname
108
- - workspace.delete\_remote\_tag("origin","tagname") # git push origin --delete tagname
109
- - workspace.checkout\_tag(tagname, branch) # git checkout tags/tagname -b branch
110
- - workspace.tag\_points\_at?("HEAD") # git tag --points-at HEAD [Return boolean]
111
- - workspace.remote\_config # git remote -vv [return Hash with repos name as key, points to hash with "push" or "fetch" as key]
112
- - workspace.add\_remote(name, url) # git remote add name url
113
- - workspace.remove\_remote(name) # git remote remove name
114
- - workspace.stash\_changes(msg) # git stash save "msg"
115
- - workspace.stash\_all\_chanegs(msg) # git stash save --include-untracked
116
- - workspace.stash\_all\_chanegs(msg, true) # git stash save --include-untracked(-u) --all(-a)
117
- - workspace.stash\_list # git stash list [returns boolean and hash of stash info]
118
- - workspace.stash\_restore # git stash apply
119
- - workspace.stash\_restore(id) # git stash apply id --> ID can be obtained from stash\_list. Something like "stash@{0}"
120
- - workspace.stash\_restore\_and\_remove # git stash pop
121
- - workspace.stash\_restore\_and\_remove(id) # git stash pop id --> ID can be obtained from stash\_list. Something like "stash@{0}"
122
- - workspace.stash\_to\_new\_branch(branch) # git stash branch
123
- - workspace.stash\_to\_new\_branch(branch, id) # git stash branch id
124
- - workspace.stash\_clear # git stash clear
125
- - workspace.stash\_remove # git stash drop
126
- - workspace.stash\_remove(id) # git stash drop id
49
+ - workspace.root\_path
50
+ > git rev-parse --show-toplevel
51
+ - workspace.is\_workspace?
52
+ - Call git status see if error thrown
53
+ - workspace.repos
54
+ - Returns list of remote repositories
55
+ - workspace.clean?
56
+ - Return true if there is no new,deleted,modified and staged files
57
+ - workspace.add("/path/a","/path/b","/path/c/a")
58
+ > git add
59
+ - workspace.remove\_staging("/path/a","/path/b","/path/c/a")
60
+ > git reset
61
+ - workspace.remove\_vcs("/path/a","/path/b","/path/c/a")
62
+ > git rm --cached
63
+ - workspace.commit("commit message", { files: ["/path/a"."/path/b"] })
64
+ > git commit /path/a /path/b -m "commit message"
65
+ - workspace.commit\_all("commit message")
66
+ > git commit -am
67
+ - workspace.status
68
+ - Returns list of GitCli::Delta::VCSItem carries attributes @path, @full and @type
69
+ > git status
70
+ - workspace.modFiles
71
+ - Returns modified files (GitCli::Delta::VCSItem) in an array
72
+ > git diff --name-only --diff-filter=M
73
+ - workspace.cftFiles
74
+ - Returns conflicted files (GitCli::Delta::VCSItem) in an array
75
+ > git diff --name-only --diff-filter=U
76
+ - workspace.newFiles
77
+ - Returns and files (non tracked) (GitCli::Delta::VCSItem) in an array
78
+ > git ls-files --others --exclude-standard --directory
79
+ - workspace.delFiles
80
+ - Returns deleted files (GitCli::Delta::VCSItem) in an array
81
+ > git ls-files -d
82
+ - workspace.stgFiles
83
+ - Returns staged files (GitCli::Delta::VCSItem) in an array
84
+ > git diff --name-only --cached
85
+ - workspace.reset\_file\_changes("/path/to/file")
86
+ > git checkout --
87
+ - workspace.reset\_all\_changes
88
+ > git reset --hard
89
+ - workspace.calculat\_distance("origin/HEAD","HEAD")
90
+ - Returns integer value how far is it
91
+ > git rev-list 'origin/HEAD'..'HEAD' --count
92
+ - workspace.is\_local\_ahead\_of\_remote?("origin/HEAD","branch-main")
93
+ - Aggregated from calculate\_distance() with default _to_ value fixed at "HEAD"
94
+ - Returns boolean
95
+ - workspace.is\_remote\_ahead\_of\_local?("origin/HEAD","branch-main")
96
+ - aggregated from calculate\_distance() with default _from_ value fixed at "HEAD"
97
+ - Returns boolean
98
+ - workspace.push("origin","master")
99
+ > git push origin master
100
+ - workspace.push\_with\_tags("origin","master")
101
+ > git push origin master --tags
102
+ - workspace.pull("origin","master")
103
+ > git pull origin master
104
+ - workspace.current\_branch
105
+ - Returns branch name
106
+ > git branch --show-current
107
+ - workspace.local\_branches
108
+ - Return local branches in an array
109
+ > git branch
110
+ - workspace.remote\_branches
111
+ - Return remote branches in an array
112
+ > git branch -r
113
+ - workspace.all\_branches
114
+ - Concate output of local\_branches and remote\_branches
115
+ - Returns array
116
+ - workspace.switch\_branch("new-branch")
117
+ > git checkout new-branch
118
+ - workspace.create\_branch("new-branch")
119
+ > git branch new-branch
120
+ - workspace.download\_all\_remote\_branches\_name
121
+ > git fetch -all
122
+ - workspace.merge\_branch("development")
123
+ > git merge development
124
+ - workspace.delete\_branch("development")
125
+ > git branch -d development
126
+ - workspace.diff
127
+ > git diff
128
+ - workspace.diff\_file("/path/a")
129
+ > git diff /path/a
130
+ - workspace.diff\_branch("master/HEAD","development/HEAD")
131
+ > git diff master/HEAD..development/HEAD
132
+ - workspace.diff\_working\_with\_last\_commit
133
+ > git diff HEAD^ HEAD
134
+ - workspace.diff\_index\_with\_last\_commit
135
+ > git diff --cached
136
+ - workspace.ignore("/path/a","/path/b")
137
+ - Append entries into .gitignore file
138
+ - workspace.ignore\_rules
139
+ - Read the .gitignore files and returns its content in an array
140
+ - workspace.update\_ignore\_rules("\*.log")
141
+ - Add non file entries into .gitignore
142
+ - workspace.show\_log(commit\_id)
143
+ > git show commit\_id
144
+ - workspace.all\_tags
145
+ - Returns array
146
+ > git tag
147
+ - workspace.tag\_info("tagname", "%H|%ad|%an|%s")
148
+ > git show tagname --format="%H|%ad|%an|%s"
149
+ - workspace.create\_tag(tagname)
150
+ > git tag tagname
151
+ - workspace.create\_tag(tagname, message)
152
+ > git tag -a tagname -m message
153
+ - workspace.create\_tag\_from\_commit(tagname, commit)
154
+ > git tag -a tagname commit
155
+ - workspace.create\_tag\_from\_commit(tagname, commit, message)
156
+ > git tag -a tagname -m message commit
157
+ - workspace.fetch\_tag\_to\_local
158
+ > git fetch --all --tags
159
+ - workspace.show\_tag\_detail(tagname)
160
+ > git show tagname
161
+ - workspace.delete\_tag(tagname)
162
+ > git tag -d tagname
163
+ - workspace.delete\_remote\_tag("origin","tagname")
164
+ > git push origin --delete tagname
165
+ - workspace.checkout\_tag(tagname, branch)
166
+ > git checkout tags/tagname -b branch
167
+ - workspace.tag\_points\_at?("HEAD")
168
+ - Return boolean
169
+ > git tag --points-at HEAD
170
+ - workspace.remote\_config
171
+ - Return Hash with repos name as key, points to hash with "push" or "fetch" as key
172
+ > git remote -vv
173
+ - workspace.add\_remote(name, url)
174
+ > git remote add name url
175
+ - workspace.remove\_remote(name)
176
+ > git remote remove name
177
+ - workspace.stash\_changes(msg)
178
+ > git stash save "msg"
179
+ - workspace.stash\_all\_chanegs(msg)
180
+ > git stash save --include-untracked
181
+ - workspace.stash\_all\_chanegs(msg, true)
182
+ > git stash save --include-untracked(-u) --all(-a)
183
+ - workspace.stash\_list
184
+ - Returns boolean and hash of stash info
185
+ > git stash list
186
+ - workspace.stash\_restore
187
+ > git stash apply
188
+ - workspace.stash\_restore(id)
189
+ > git stash apply id --> ID can be obtained from stash\_list. Something like "stash@{0}"
190
+ - workspace.stash\_restore\_and\_remove
191
+ > git stash pop
192
+ - workspace.stash\_restore\_and\_remove(id)
193
+ > git stash pop id --> ID can be obtained from stash\_list. Something like "stash@{0}"
194
+ - workspace.stash\_to\_new\_branch(branch)
195
+ > git stash branch
196
+ - workspace.stash\_to\_new\_branch(branch, id)
197
+ > git stash branch id
198
+ - workspace.stash\_clear
199
+ > git stash clear
200
+ - workspace.stash\_remove
201
+ > git stash drop
202
+ - workspace.stash\_remove(id)
203
+ > git stash drop id
127
204
 
128
205
 
129
206
 
data/git_cli.gemspec CHANGED
@@ -28,12 +28,12 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  #spec.add_dependency "tlogger"
31
- spec.add_dependency 'teLogger'
32
- spec.add_dependency "toolrack"
31
+ spec.add_dependency 'teLogger', "> 0.2"
32
+ spec.add_dependency "toolrack", "> 0.23"
33
33
  #spec.add_dependency "gvcs"
34
34
  spec.add_dependency "ptools", "~> 1.4.0"
35
35
 
36
- #spec.add_development_dependency 'devops_helper' #, ">= 0.2.0"
37
- #spec.add_development_dependency 'devops_assist' #, ">= 0.2.0"
36
+ spec.add_development_dependency 'rspec'
37
+
38
38
  spec.add_development_dependency 'release-gem'
39
39
  end
data/lib/git_cli/delta.rb CHANGED
@@ -199,6 +199,10 @@ module GitCli
199
199
  def modFiles
200
200
  modified.first
201
201
  end
202
+ def has_modified_file?
203
+ modFiles.length > 0
204
+ end
205
+ alias_method :has_modified_files?, :has_modified_file?
202
206
 
203
207
  def conflicted_files
204
208
 
@@ -241,6 +245,10 @@ module GitCli
241
245
  def cftFiles
242
246
  conflicted.first
243
247
  end
248
+ def has_conflicted_file?
249
+ ctfFiles.length > 0
250
+ end
251
+ alias_method :has_conflicted_files?, :has_conflicted_file?
244
252
 
245
253
  def new_files
246
254
 
@@ -280,6 +288,10 @@ module GitCli
280
288
  def newFiles
281
289
  new_files.reverse.first
282
290
  end
291
+ def has_new_file?
292
+ newFiles.length >0
293
+ end
294
+ alias_method :has_new_files?, :has_new_file?
283
295
 
284
296
  def deleted_files
285
297
 
@@ -322,6 +334,10 @@ module GitCli
322
334
  def delFiles
323
335
  deleted.first
324
336
  end
337
+ def has_deleted_file?
338
+ delFiles.length > 0
339
+ end
340
+ alias_method :has_deleted_files?, :has_deleted_file?
325
341
 
326
342
  def staged_files
327
343
 
@@ -364,6 +380,10 @@ module GitCli
364
380
  def stgFiles
365
381
  staged.first
366
382
  end
383
+ def has_staged_file?
384
+ stgFiles.length > 0
385
+ end
386
+ alias_method :has_staged_files?, :has_staged_file?
367
387
 
368
388
  def reset_file_changes(path)
369
389
 
@@ -32,9 +32,10 @@ module GitCli
32
32
  end
33
33
 
34
34
  def ignore_rules
35
- st, root = workspace_root
35
+ #st, root = workspace_root
36
+ root = workspace_root
36
37
  root.strip!
37
- if st
38
+ #if st
38
39
  rulesFile = File.join(root,".gitignore")
39
40
  if File.exist?(rulesFile)
40
41
  File.open(rulesFile,"r") do |f|
@@ -45,20 +46,21 @@ module GitCli
45
46
  else
46
47
  []
47
48
  end
48
- else
49
- []
50
- end
49
+ #else
50
+ # []
51
+ #end
51
52
  end
52
53
 
53
54
  def update_ignore_rules(rules)
54
- st, root = workspace_root
55
+ #st, root = workspace_root
56
+ root = workspace_root
55
57
  root.strip!
56
- if st
58
+ #if st
57
59
  rulesFile = File.join(root,".gitignore")
58
60
  File.open(rulesFile,"w") do |f|
59
61
  f.write rules
60
62
  end
61
- end
63
+ #end
62
64
  log_debug ".gitignore files is updated!"
63
65
  [true,".gitignore file is updated"]
64
66
  end
@@ -67,17 +69,18 @@ module GitCli
67
69
  def with_ignore_file(mode = "a", &block)
68
70
  mode = "a" if is_empty?(mode)
69
71
  if block
70
- st, root = workspace_root
72
+ #st, root = workspace_root
73
+ root = workspace_root
71
74
  root.strip!
72
- if st
75
+ #if st
73
76
  igPath = File.join(root,".gitignore")
74
77
  FileUtils.touch(igPath) if not File.exist?(igPath)
75
78
  File.open(igPath,mode) do |f|
76
79
  block.call(f)
77
80
  end
78
- else
79
- raise GitCliException, "Cannot get workspace root. Probably not a GIT workspace?"
80
- end
81
+ #else
82
+ # raise GitCliException, "Cannot get workspace root. Probably not a GIT workspace?"
83
+ #end
81
84
  end
82
85
  end
83
86
 
data/lib/git_cli/log.rb CHANGED
@@ -64,6 +64,7 @@ module GitCli
64
64
  end
65
65
 
66
66
  end # log
67
+ alias_method :log, :logs
67
68
 
68
69
  def show_log(cid)
69
70
 
@@ -15,5 +15,5 @@
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  module GitCli
18
- VERSION = "0.12.0"
18
+ VERSION = "0.13.7"
19
19
  end
data/lib/git_cli.rb CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  require "git_cli/version"
18
18
 
19
- require 'gvcs'
19
+ #require 'gvcs'
20
20
  require 'toolrack'
21
21
 
22
22
  require_relative "git_cli/git_core"
@@ -47,7 +47,8 @@ module GitCli
47
47
 
48
48
  def os_exec(path, &block)
49
49
 
50
- Gvcs::Config.instance.command_output.puts("Git command : #{path}") if Gvcs::Config.instance.is_show_vcs_command?
50
+ #Gvcs::Config.instance.command_output.puts("Git command : #{path}") if Gvcs::Config.instance.is_show_vcs_command?
51
+ log_debug("Git command : #{path}")
51
52
 
52
53
  # redirect stderr to stdout
53
54
  path = "#{path} 2>&1"
@@ -147,7 +148,7 @@ module GitCli
147
148
  raise_if_empty(path, "Workspace path cannot be empty", GitCliException)
148
149
 
149
150
  if is_empty?(vcs)
150
- @vcs = Gvcs::Vcs.new
151
+ @vcs = GitCli::Vcs.new
151
152
  else
152
153
  @vcs = vcs
153
154
  end
@@ -232,12 +233,14 @@ module GitCli
232
233
  @wsRoot
233
234
 
234
235
  end # workspace_root
236
+ #class <<self
235
237
  alias_method :root_path, :workspace_root
238
+ #end
236
239
 
237
240
  def load_remote_to_repos
238
241
  conf = remote_config
239
242
  conf.each do |k,v|
240
- repo = Gvcs::Repository.new(k, v.values.first)
243
+ repo = GitCli::Repository.new(k, v.values.first)
241
244
  repo.support_fetch if v.keys.include?("fetch")
242
245
  repo.support_push if v.keys.include?("push")
243
246
  add_repos(repo)
@@ -257,7 +260,13 @@ module GitCli
257
260
  dd, df = deleted_files
258
261
  sd, sf = staged_files
259
262
 
260
- (nd.length == 0 and nf.length == 0 and md.length == 0 and mf.length == 0 and dd.length == 0 and df.length == 0 and sd.length == 0 and sf.length == 0)
263
+ #log_debug "New Dir : #{nd}"
264
+ #log_debug "Mod Dir : #{md}"
265
+ #log_debug "Del Dir : #{dd}"
266
+ #log_debug "Stg Dir : #{sd}"
267
+
268
+ #(nd.length == 0 and nf.length == 0 and md.length == 0 and mf.length == 0 and dd.length == 0 and df.length == 0 and sd.length == 0 and sf.length == 0)
269
+ (nf.length == 0 and mf.length == 0 and df.length == 0 and sf.length == 0)
261
270
  end
262
271
  alias_method :clean?, :is_clean?
263
272
  alias_method :clear?, :is_clean?
@@ -323,7 +332,7 @@ module GitCli
323
332
  end
324
333
 
325
334
  # backward compatibility
326
- Gvcs::Vcs = GitCli::Vcs
327
- Gvcs::Workspace = GitCli::Workspace
328
- Gvcs::Repository = GitCli::Repository
335
+ #Gvcs::Vcs = GitCli::Vcs
336
+ #Gvcs::Workspace = GitCli::Workspace
337
+ #Gvcs::Repository = GitCli::Repository
329
338
 
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Liaw
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-07 00:00:00.000000000 Z
11
+ date: 2023-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: teLogger
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: '0.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: '0.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: toolrack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ">"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '0.23'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ">"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: '0.23'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: ptools
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: 1.4.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: release-gem
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -111,7 +125,7 @@ homepage: https://github.com/chrisliaw/git_cli
111
125
  licenses:
112
126
  - GPL-3.0
113
127
  metadata: {}
114
- post_install_message:
128
+ post_install_message:
115
129
  rdoc_options: []
116
130
  require_paths:
117
131
  - lib
@@ -126,8 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
140
  - !ruby/object:Gem::Version
127
141
  version: '0'
128
142
  requirements: []
129
- rubygems_version: 3.4.10
130
- signing_key:
143
+ rubygems_version: 3.4.6
144
+ signing_key:
131
145
  specification_version: 4
132
146
  summary: GIT command line interface
133
147
  test_files: []