raykit 0.0.153 → 0.0.154
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/lib/raykit/console.rb +23 -15
- 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: a91e005fb5ef363140890ee87a837e867049d806d556c6e80b83f1cbcef082bb
|
4
|
+
data.tar.gz: '08c94f3f16fe3f133033fa33236b8a13ca254228e349cc5726ad2dde54bf7ba9'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5eadcba6270468473e52b4221935ca91fb071e7fe732c18e54f605b3d6d6a168c5371527b6daa9806cf54cc547c26c6ff03c49a6eaff6e615ad7859d9cf1c3fa
|
7
|
+
data.tar.gz: b4bdbef2e42b6ecd5ee55551f3d86c23e1b63816e27f269b80cc012799c9769f66b9f1f88b9680b9f033fcab679757f0436f6518868b0ed86a1d432a088bb26f
|
data/lib/raykit/console.rb
CHANGED
@@ -155,22 +155,30 @@ module Raykit
|
|
155
155
|
repo=Raykit::Git::Repository.new(url)
|
156
156
|
work=Raykit::Git::Directory.new(repo.get_dev_dir('work'))
|
157
157
|
if(Dir.exist?(work.directory))
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
158
|
+
git_dir = work.directory + '/.git'
|
159
|
+
if(!Directory.exist?(git_dir))
|
160
|
+
issue = work.directory + ' is not a git directory';
|
161
|
+
if(@opts.quit?)
|
162
|
+
abort Rainbow(issue).blue.bright
|
163
|
+
else
|
164
|
+
puts Rainbow(issue).blue.bright
|
165
|
+
end
|
166
|
+
else
|
167
|
+
Dir.chdir(work.directory) do
|
168
|
+
diff=`git diff`.strip
|
169
|
+
status=`git status`.strip
|
170
|
+
if(diff.length == 0 && status.include?('nothing to commit'))
|
171
|
+
cmd = Command.new('git pull')
|
172
|
+
cmd.summary if(@opts.verbose?)
|
167
173
|
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
+
if(cmd.exitstatus != 0)
|
175
|
+
puts Rainbow('error occurred for pull of ' + url).blue
|
176
|
+
puts cmd.output
|
177
|
+
puts cmd.error
|
178
|
+
puts
|
179
|
+
if(@opts.quit?)
|
180
|
+
abort Rainbow(elapsed_str).red.bright + " " + Rainbow(cmd.command).white
|
181
|
+
end
|
174
182
|
end
|
175
183
|
end
|
176
184
|
end
|