auto-gemsets 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md ADDED
@@ -0,0 +1,4 @@
1
+ #Changelog
2
+
3
+ ## Version 0.1.6
4
+ - Fixed a bug where the gemset bin path was being duplicated in $PATH
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.6
data/auto-gemsets.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "auto-gemsets"
8
- s.version = "0.1.5"
8
+ s.version = "0.1.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dayton Nolan"]
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  "README.md"
19
19
  ]
20
20
  s.files = [
21
+ "Changelog.md",
21
22
  "Gemfile",
22
23
  "Gemfile.lock",
23
24
  "HELP",
data/auto_gemsets.sh CHANGED
@@ -18,6 +18,7 @@ function auto_gemsets() {
18
18
  export GEM_HOME="${GEMSET_ROOT}/$gemset"
19
19
  export GEM_ROOT="${GEMSET_ROOT}/$gemset" # chruby specific
20
20
  export GEM_PATH="${GEM_HOME}:${DEFAULT_GEMSET}"
21
+ echo "$PATH" | grep -q "${GEMSET_ROOT}/${gemset}/bin" || export PATH="$PATH:${GEMSET_ROOT}/${gemset}/bin"
21
22
  export GEMSET="${gemset}"
22
23
  export GEMFILE="${gemfile}"
23
24
  create_gemset_if_missing && list_gemset
@@ -33,12 +34,14 @@ function auto_gemsets() {
33
34
  function set_default_gemset() {
34
35
  if [ ! -z "${DEFAULT_GEMSET}" ]; then
35
36
  if [ ! "$GEM_PATH" == "${DEFAULT_GEMSET}" ]; then
36
- export GEM_HOME="${DEFAULT_GEMSET}"
37
- export GEM_ROOT="${DEFAULT_GEMSET}"
38
- export GEM_PATH="${DEFAULT_GEMSET}"
37
+ export GEM_HOME="$DEFAULT_GEMSET"
38
+ export GEM_ROOT="$DEFAULT_GEMSET"
39
+ export GEM_PATH="$DEFAULT_GEMSET"
39
40
  export GEMSET="daytonn"
40
41
  export GEMFILE="*default"
41
- export PATH="$PATH:${DEFAULT_GEMSET}/bin"
42
+
43
+ echo "$PATH" | grep -q "${DEFAULT_GEMSET}/bin" || export PATH="$PATH:${DEFAULT_GEMSET}/bin"
44
+
42
45
  if [ -z "$GEMSET_PRELOAD" ]; then
43
46
  list_gemset
44
47
  fi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto-gemsets
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -118,6 +118,7 @@ extra_rdoc_files:
118
118
  - LICENSE
119
119
  - README.md
120
120
  files:
121
+ - Changelog.md
121
122
  - Gemfile
122
123
  - Gemfile.lock
123
124
  - HELP
@@ -148,7 +149,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
148
149
  version: '0'
149
150
  segments:
150
151
  - 0
151
- hash: -4583091469502403605
152
+ hash: 3386426079743793721
152
153
  required_rubygems_version: !ruby/object:Gem::Requirement
153
154
  none: false
154
155
  requirements: