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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/raykit/console.rb +23 -15
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb92bd4b230c24678ca4790c19ade36f6f739815b1f3c62de64c8ad8422b5b6b
4
- data.tar.gz: eb5e79b969aa3733c750c5145b297534265a3afe04f89dbf8e675e66f4bac804
3
+ metadata.gz: a91e005fb5ef363140890ee87a837e867049d806d556c6e80b83f1cbcef082bb
4
+ data.tar.gz: '08c94f3f16fe3f133033fa33236b8a13ca254228e349cc5726ad2dde54bf7ba9'
5
5
  SHA512:
6
- metadata.gz: 06ea87f13ac4a5a072ecd16d1a712a12864713d8abd857fee03f37b78a3162b07d2a9ebaee4fd788ce6dbc201176ccbb69c4370d5c186a819e6b905fae19692a
7
- data.tar.gz: '09c8272dd20c8812bdbec3faee214d947f8b4e316ff35cf3d7262d3480237eaf76dbd751ddef64bc4e7c918e8634c88e4d584cc87c9183a87e5df59a19fe7756'
6
+ metadata.gz: 5eadcba6270468473e52b4221935ca91fb071e7fe732c18e54f605b3d6d6a168c5371527b6daa9806cf54cc547c26c6ff03c49a6eaff6e615ad7859d9cf1c3fa
7
+ data.tar.gz: b4bdbef2e42b6ecd5ee55551f3d86c23e1b63816e27f269b80cc012799c9769f66b9f1f88b9680b9f033fcab679757f0436f6518868b0ed86a1d432a088bb26f
@@ -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
- #puts work.directory
159
- #work.pull
160
-
161
- Dir.chdir(work.directory) do
162
- diff=`git diff`.strip
163
- status=`git status`.strip
164
- if(diff.length == 0 && status.include?('nothing to commit'))
165
- cmd = Command.new('git pull')
166
- cmd.summary if(@opts.verbose?)
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
- if(cmd.exitstatus != 0)
169
- puts cmd.output
170
- puts cmd.error
171
- puts
172
- if(@opts.quit?)
173
- abort Rainbow(elapsed_str).red.bright + " " + Rainbow(cmd.command).white
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: raykit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.153
4
+ version: 0.0.154
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow