gity 0.1.3 → 0.1.4

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: 24e3d82d4348b8657a8ffc591187831ab5035bb52f44cc5cf3213a64539af116
4
- data.tar.gz: 400b059ab5c831620d775995cd52c4830a731fd8c922b742a3001a92c134eedd
3
+ metadata.gz: c93ccf96bb60fd989212947809f38159a3c5ccb6c57028674f43a6cd297cb35c
4
+ data.tar.gz: 8bf176af3ce980d6e12df695485d67ede1cbb5ebe18f542a054392542229742e
5
5
  SHA512:
6
- metadata.gz: cc414e26ec6ed146f616dabfdd346c97c54797f9603752665eeb0f1ea8478f59d93a9cc49d243e291e9e8e7cc73871430b0ae8f3ba12216ca5c4c3843a5632c3
7
- data.tar.gz: 14d24905024c00d7b22d66682b7fd6c9e10913c8cb75d74d588353736475138d12880b56873cecf48e78bb3dc43c07f14626fc91358f2570dee42529c0c984f0
6
+ metadata.gz: 78a4d1d582e553402dd24ce21fbdcfa9b6adf7fc737ad91d9971c76a39884eaa5b429e36f695fdf5e849c1e826801b668027a7395fa05a286deddf6ed918ff68
7
+ data.tar.gz: 6b8247cfc6cfd3f8a2bea5a5979e586b6f48cd425558dcfd9c2a187803e2d35b60851fe5c626e371fd62970ba08cc9e536b201b3d118a7fd7c3b46a21c58156b
data/exe/gity CHANGED
@@ -2,11 +2,21 @@
2
2
 
3
3
  require_relative '../lib/gity'
4
4
 
5
+ include TR::CondUtils
6
+ include Gity::Common
7
+
5
8
  if ARGV.length == 0
6
9
  path = Dir.getwd
7
10
  else
8
11
  path = File.expand_path(ARGV.first)
9
12
  end
10
13
 
11
- Gity::Landing.new.run(path)
14
+ begin
15
+ Gity::Landing.new.run(path)
16
+ rescue Gity::Error => ex
17
+ print_header
18
+ _prmt.puts
19
+ STDERR.puts _fmt ex.message, :red
20
+ _prmt.puts
21
+ end
12
22
 
data/lib/gity/common.rb CHANGED
@@ -25,13 +25,6 @@ module Gity
25
25
  opts.each do |f|
26
26
  res = _pastel.send(f, res)
27
27
  end
28
- #opts.each do |k,v|
29
- # case k
30
- # when :color
31
- # res = _pastel.send(v, res)
32
- # else
33
- # end
34
- #end
35
28
  end
36
29
 
37
30
  " #{res}"
@@ -55,7 +48,7 @@ module Gity
55
48
  end
56
49
 
57
50
  def print_header
58
- _prmt.puts _fmt "gity version #{Gity::VERSION}"
51
+ _prmt.puts _fmt "gity version #{Gity::VERSION}", :bright_yellow
59
52
  end
60
53
 
61
54
 
data/lib/gity/landing.rb CHANGED
@@ -16,7 +16,7 @@ module Gity
16
16
  def run(root, opts = {}, &block)
17
17
 
18
18
  @ws = GitCli::Workspace.new(root)
19
- raise Error, "Given path '#{root}' is not a workspace" if not @ws.is_workspace?
19
+ raise Error, "Given path '#{root}' is not a Git workspace" if not @ws.is_workspace?
20
20
 
21
21
  opts = {} if opts.nil?
22
22
  opts[:loop] = true if is_empty?(opts[:loop])
data/lib/gity/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gity
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris