bshell 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/bshell +33 -0
- metadata +67 -0
data/bin/bshell
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
case ARGV[0]
|
4
|
+
when 'prompt_config'
|
5
|
+
exit unless ENV['BSHELL_BOOT']=='1'
|
6
|
+
ENV['BSHELL_BOOT']=''
|
7
|
+
|
8
|
+
if ENV['BUNDLE_BIN_PATH']
|
9
|
+
gemfile = ENV['BUNDLE_GEMFILE']
|
10
|
+
dir = File.dirname(gemfile)
|
11
|
+
|
12
|
+
if File.file?(dir + '/config/application.rb') # Rails
|
13
|
+
f = File.new(dir + '/config/application.rb') # Not Rails
|
14
|
+
project_name = f.read.match(/module (.*)$/)[1]
|
15
|
+
else
|
16
|
+
project_name = File.basename(dir)
|
17
|
+
end
|
18
|
+
|
19
|
+
# use BUNDLER_PROJECT_NAME in your shell config to customize your prompt
|
20
|
+
# example:
|
21
|
+
# export $PROMPT=$BUNDLER_PROJECT_NAME$PROMPT
|
22
|
+
ENV['BUNDLER_PROJECT_NAME'] = project_name
|
23
|
+
|
24
|
+
# irrelevant for most environments because the user's shell
|
25
|
+
# config will immediately overwrite PROMPT
|
26
|
+
ENV['PROMPT'] = project_name + ' ' + ENV['PROMPT'] unless ENV['BSHELL_DO_NOT_SET_PROMPT']
|
27
|
+
|
28
|
+
exec ENV['SHELL']
|
29
|
+
end
|
30
|
+
else
|
31
|
+
ENV['BSHELL_BOOT']='1'
|
32
|
+
exec "bundle exec #{ENV['SHELL']}"
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bshell
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- John Joseph Bachir
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-09-14 00:00:00 -04:00
|
19
|
+
default_executable:
|
20
|
+
dependencies: []
|
21
|
+
|
22
|
+
description:
|
23
|
+
email: j@jjb.cc
|
24
|
+
executables:
|
25
|
+
- bshell
|
26
|
+
extensions: []
|
27
|
+
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
30
|
+
files:
|
31
|
+
- bin/bshell
|
32
|
+
has_rdoc: false
|
33
|
+
homepage: https://github.com/jjb/bshell/
|
34
|
+
licenses: []
|
35
|
+
|
36
|
+
post_install_message:
|
37
|
+
rdoc_options: []
|
38
|
+
|
39
|
+
require_paths:
|
40
|
+
- .
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
hash: 3
|
47
|
+
segments:
|
48
|
+
- 0
|
49
|
+
version: "0"
|
50
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 3
|
56
|
+
segments:
|
57
|
+
- 0
|
58
|
+
version: "0"
|
59
|
+
requirements: []
|
60
|
+
|
61
|
+
rubyforge_project: bshell
|
62
|
+
rubygems_version: 1.6.2
|
63
|
+
signing_key:
|
64
|
+
specification_version: 3
|
65
|
+
summary: bshell lets you enter into a shell where all commands happen in the bundle exec environment.
|
66
|
+
test_files: []
|
67
|
+
|