pro 1.1.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: 218f37b379ff1daf81b8fe9d35b07b8966aedcbb
4
- data.tar.gz: 1a00825b3e77f87452f237b30c11e3827c9a6e6c
3
+ metadata.gz: 63079f19619b64657ba432602c14a49280d8c88d
4
+ data.tar.gz: 9008156d9a7146ca522918df5906ccab6abf5181
5
5
  SHA512:
6
- metadata.gz: 237b2f95989c62e6807f5c17ee318ec2b12f23c7f5bf3db54cb192bb5a75d679e78dc6e4b991bf51b8ab1c37a9c2039131069d1f5a2a2f6ad76130b6a8dba599
7
- data.tar.gz: 507ac61607b98f9c38138bf0ef82680efb5a766663265666cc8407ca432d7e667edbe93888d881018e037afed6428af037ab54fe562d82eb1014dffa5f64b03d
6
+ metadata.gz: edbb9cf7545a74a4836be3cf91c7dd5bdea16d8071626a2ac7b72b76a92043442b4fbd2a8f171356d3c33f90ebde8b34883f7cbae13d24590143d6e27b98e3e0
7
+ data.tar.gz: 07def415c46488bbc7ebd5c2f98f73928c6e0b951d084e326020d647a8997f3b82b383222874458627e65033af9881ae76e3c43bc4d66d6e091825e20798321d
data/README.md CHANGED
@@ -4,8 +4,7 @@
4
4
  It includes features like instantly cd'ing to your git repos and getting a
5
5
  status overview, and running an arbitrary command in every git repo.
6
6
 
7
- Note that pro only currently works on Unix systems. **If you experience speed issues
8
- see the section on setting a pro base.**
7
+ Note that pro only currently works on Unix systems.
9
8
 
10
9
  ## CD'ing to a project's repository
11
10
 
@@ -51,7 +50,7 @@ Notice that it double checks before running so you don't accidentally run
51
50
 
52
51
  ## The Pro Base
53
52
 
54
- `pro` can use a base directory to speed up its search for git repos. By default it
53
+ `pro` can use a base directory to narrow down its search for git repos. By default it
55
54
  uses your home folder.
56
55
 
57
56
  To set the base directory set the PRO_BASE environment variable or make
@@ -60,6 +59,15 @@ each with a path to a folder to search. Pro will search the path in the PRO_BASE
60
59
  variable as well as all paths in the .proBase file. If neither exists then the home
61
60
  directory will be used.
62
61
 
62
+ ## Indexing
63
+
64
+ Whenever you run a `pro` command or `pd` it will kick off a background indexing process.
65
+ This process can run anywhere from less than a second to a minuted depending on the number
66
+ of files in your pro bases.
67
+
68
+ On update the cache is invalidated and you may have to wait a while before your command
69
+ finishes.
70
+
63
71
  ## Installation
64
72
 
65
73
  `pro` is bundled as a Ruby gem. To install run:
@@ -89,6 +97,8 @@ You may also want to set your Pro Base. See the above section.
89
97
  pro status <name> - prints the output of 'git status' on the repo.
90
98
  pro run - prompts for a command to run in all git repos.
91
99
  pro run <command> - runs the given command in all git repos.
100
+ pro list - prints the paths to all repos. Intended for scripting.
101
+ pro bases - prints the paths to all bases. Intended for scripting.
92
102
  pro install - Install the pro cd command. cd to a directory by fuzzy git repo matching.
93
103
  pro help - display help
94
104
 
data/lib/pro/commands.rb CHANGED
@@ -126,7 +126,8 @@ module Pro
126
126
  name = 'pd' if name.empty?
127
127
  # sub into function
128
128
  func = SHELL_FUNCTION.sub("{{name}}",name)
129
- ['~/.profile', '~/.bashrc','~/.zshrc'].each do |rel_path|
129
+ did_any = false
130
+ ['~/.profile', '~/.bashrc','~/.zshrc','~/.bash_profile'].each do |rel_path|
130
131
  # check if file exists
131
132
  path = File.expand_path(rel_path)
132
133
  next unless File.exists?(path)
@@ -137,8 +138,14 @@ module Pro
137
138
  File.open(path,'a') do |file|
138
139
  file.puts func
139
140
  end
141
+ did_any = true
142
+ end
143
+ if did_any
144
+ puts "Done! #{name} will be available in new shells."
145
+ else
146
+ STDERR.puts "WARNING: Did not install in any shell dotfiles.".red
147
+ STDERR.puts "Maybe you should create the shell config file you want.".red
140
148
  end
141
- puts "Done! #{name} will be available in new shells."
142
149
  end
143
150
  end
144
151
  end
data/lib/pro/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pro
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tristan Hume