rprompt 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,18 @@ else
26
26
  exit 1
27
27
  end
28
28
 
29
- if File.exist?(".git") && gitConfig && gitLayout
29
+ dir = Dir.pwd
30
+ gitRepo = false
31
+
32
+ while dir != '/' do
33
+ if File.exists?("#{dir}/.git")
34
+ gitRepo = true
35
+ break
36
+ end
37
+ dir = File.expand_path('..', dir)
38
+ end
39
+
40
+ if gitRepo && gitConfig && gitLayout
30
41
  if gitConfig[:status]
31
42
  status = Rprompt::GitNumbers.new(gitConfig[:status].merge({:cmd => "git status -s"}))
32
43
  else
@@ -6,7 +6,6 @@ module Rprompt
6
6
  class PromptItem
7
7
  include Deco
8
8
 
9
- # @return [String] symbol character to identify prompt item
10
9
  attr_reader :symbol, :color
11
10
 
12
11
  # @param config [Hash] Prompt item configuration:
@@ -1,4 +1,9 @@
1
1
  module Deco
2
+ # @param args [Hash]
3
+ # - :color: color [String]
4
+ # - :symbol: character [String]
5
+ # - :content: content [String]
6
+ # @return [String] colorized content string and symbol according to configuration
2
7
  def termShow(args)
3
8
  color = args[:color]
4
9
  symbol = args[:symbol]
@@ -1,3 +1,3 @@
1
1
  module Rprompt
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rprompt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-22 00:00:00.000000000 Z
12
+ date: 2013-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler