ohmygems 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: fc45fe06cea0f0481abd310161ea5ed4aa9f43da
4
+ data.tar.gz: d6e877bc5d7dee452f51ceed92ea93387e50851b
5
+ SHA512:
6
+ metadata.gz: 8659555499cadea2846c9aa3e6b3be9cbe7ed2d70d598c3a86453484950c5f72ee012822e2723fa698f708bc50ae130cb90188ceada22cde244860a3ff398369
7
+ data.tar.gz: f923169e49491f9a77b38715ea5c09bb5486b581c9aaeb2b5c95370ec7107c7cc555040ede2f2d130f86aa27fa614b0c9e82d94acc89f7dac91cbf7667602617
@@ -0,0 +1,2 @@
1
+ n�Z��g�d�'k ��yM���8;:~���&<Gw9�W$֟z�6�%?���zSv�|�<DŽ'���{���Z�_�F0%��e��C�8j�z�bO��Z�n��>& �)��
2
+ �B���R@r>� 7�xXpǴ��2Y���3�yc�L.Gcjh��G�S9�A8�1!l!>ul����_$A8�u�7Xܗ]�9���̪�B@�ל&�
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,18 @@
1
+ === 1.2.0 / 2014-06-17
2
+
3
+ * 6 minor enhancements:
4
+
5
+ * Added 'omg env' command to show relevant environment info. (blowmage)
6
+ * Added OMG_NAME variable to make it easier to program. (blowmage)
7
+ * Added ohmygems_auto. (blowmage)
8
+ * Added ohmygems_chruby. (blowmage)
9
+ * Expanded help and made prettier.
10
+ * Removed env info from normal repo switch handling. (blowmage)
11
+
12
+ * 1 bug fix:
13
+
14
+ * Put gem PATH item in front of original.
15
+
1
16
  === 1.1.0 / 2013-02-24
2
17
 
3
18
  * 3 minor enhancements
@@ -3,3 +3,5 @@ Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
5
  ohmygems
6
+ ohmygems_auto
7
+ ohmygems_chruby
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ Hoe.spec "ohmygems" do
10
10
 
11
11
  license "MIT"
12
12
 
13
- self.version = "1.1.0"
13
+ self.version = "1.2.0"
14
14
 
15
15
  self.post_install_message = <<-"EOM"
16
16
 
@@ -18,6 +18,14 @@ Hoe.spec "ohmygems" do
18
18
 
19
19
  source $(gem env gemdir)/gems/ohmygems-#{self.version}/ohmygems
20
20
 
21
+ If you are using chruby to manage rubies, also add:
22
+
23
+ source $(gem env gemdir)/gems/ohmygems-#{self.version}/ohmygems_chruby
24
+
25
+ If you want to auto set the gem env with a .ruby-gemset file, add:
26
+
27
+ source $(gem env gemdir)/gems/ohmygems-#{self.version}/ohmygems_auto
28
+
21
29
  EOM
22
30
  end
23
31
 
data/ohmygems CHANGED
@@ -10,16 +10,20 @@ ohmygems() {
10
10
  fi
11
11
 
12
12
  if [ -z "$name" ]; then
13
- echo "usage: ohmygems <name or reset>"
13
+ echo "usage: ohmygems <cmd or repo>"
14
14
  echo
15
- echo " Switches gem home to a (potentially new) named repo."
16
- echo " Your previous gems are still visible,"
17
- echo " but new gem installs will install into ~/.gems/repos/<name>."
18
- echo " Use 'reset' to go back to normal."
15
+ echo "Commands:"
19
16
  echo
20
- echo "Available repos in ~/.gem/repos:"
17
+ echo " env = show current state."
18
+ echo " reset = go back to normal state."
19
+ echo " <repo> = Switches gem home to a (potentially new) named repo."
20
+ echo " Your previous gems are still visible,"
21
+ echo " but new gem installs will install into ~/.gem/repos/<name>."
22
+
23
+ echo
24
+ echo "Repos: (in ~/.gem/repos)"
21
25
  echo
22
- ls ~/.gem/repos | pr -o2 -l1
26
+ ls ~/.gem/repos | pr -4 -o2 -l1
23
27
  echo
24
28
  return
25
29
  elif [ $name = "reset" ]; then
@@ -33,18 +37,21 @@ ohmygems() {
33
37
 
34
38
  GEM_PATH=${ORIG_GEM_PATH}
35
39
  PATH=$ORIG_PATH
40
+ unset OMG_NAME
41
+ elif [ $name = "env" ]; then
42
+ echo Oh My Gems environment: ${OMG_NAME:-none}
43
+ echo
44
+ echo GEM_PATH=${GEM_PATH:-not set}
45
+ echo GEM_HOME=${GEM_HOME:-not set}
46
+ echo PATH=$PATH
36
47
  else
37
48
  echo Switching to $name
38
49
 
50
+ export OMG_NAME=${name}
39
51
  export GEM_HOME=~/.gem/repos/${name}
40
52
  export GEM_PATH=${ORIG_GEM_HOME}:${ORIG_GEM_PATH}
41
- export PATH=${ORIG_PATH}:${GEM_HOME}/bin
53
+ export PATH=${GEM_HOME}/bin:${ORIG_PATH}
42
54
  fi
43
-
44
- echo
45
- echo GEM_PATH=${GEM_PATH:-not set}
46
- echo GEM_HOME=${GEM_HOME:-not set}
47
- echo PATH=$PATH
48
55
  }
49
56
 
50
57
  alias omg=ohmygems
@@ -0,0 +1,23 @@
1
+ # -*- sh -*-
2
+
3
+ function ohmygems_auto() {
4
+ local dir="$PWD"
5
+ local gemset
6
+
7
+ until [[ -z "$dir" ]]; do
8
+ if { read -r gemset <"$dir/.ruby-gemset"; } 2>/dev/null || [[ -n "$gemset" ]]; then
9
+ ohmygems "$gemset"
10
+ return $?
11
+ fi
12
+
13
+ dir="${dir%/*}"
14
+ done
15
+ }
16
+
17
+ if [[ -n "$ZSH_VERSION" ]]; then
18
+ if [[ ! "$preexec_functions" == *ohmygems_auto* ]]; then
19
+ preexec_functions+=("ohmygems_auto")
20
+ fi
21
+ elif [[ -n "$BASH_VERSION" ]]; then
22
+ trap '[[ "$BASH_COMMAND" != "$PROMPT_COMMAND" ]] && ohmygems_auto' DEBUG
23
+ fi
@@ -0,0 +1,31 @@
1
+ # Reload ohmygems when chruby is called.
2
+ # Inspired by chruby's after hook wiki:
3
+ # https://github.com/postmodern/chruby/wiki/Implementing-an-'after-use'-hook
4
+
5
+ save_function() {
6
+ local ORIG_FUNC=$(declare -f $1)
7
+ local NEWNAME_FUNC="$2${ORIG_FUNC#$1}"
8
+ eval "$NEWNAME_FUNC"
9
+ }
10
+
11
+ save_function chruby ohmygems_chruby
12
+
13
+ function chruby () {
14
+ # Are we in a gemset?
15
+ omg_name=${OMG_NAME}
16
+
17
+ # Reset ohmygems
18
+ ohmygems reset
19
+ # Including removing the ENV variables
20
+ unset ORIG_GEM_PATH
21
+ unset ORIG_GEM_HOME
22
+ unset ORIG_PATH
23
+
24
+ # Switch ruby
25
+ ohmygems_chruby $*
26
+
27
+ # Reload gem repo after switching rubies
28
+ if [ -n "$omg_name" ]; then
29
+ ohmygems ${omg_name}
30
+ fi
31
+ }
metadata CHANGED
@@ -1,24 +1,18 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ohmygems
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 1
8
- - 1
9
- - 0
10
- version: 1.1.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Ryan Davis
14
8
  autorequire:
15
9
  bindir: bin
16
- cert_chain:
10
+ cert_chain:
17
11
  - |
18
12
  -----BEGIN CERTIFICATE-----
19
- MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBATANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
20
14
  ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
21
- GRYDY29tMB4XDTA5MDMwNjE4NTMxNVoXDTEwMDMwNjE4NTMxNVowRTETMBEGA1UE
15
+ GRYDY29tMB4XDTEzMDkxNjIzMDQxMloXDTE0MDkxNjIzMDQxMlowRTETMBEGA1UE
22
16
  AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
23
17
  JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
24
18
  b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
@@ -28,61 +22,57 @@ cert_chain:
28
22
  qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
29
23
  gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
30
24
  HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
31
- AQAY59gYvDxqSqgC92nAP9P8dnGgfZgLxP237xS6XxFGJSghdz/nI6pusfCWKM8m
32
- vzjjH2wUMSSf3tNudQ3rCGLf2epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
33
- w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
34
- l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
35
- n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
36
- FBHgymkyj/AOSqKRIpXPhjC6
25
+ AQCFZ7JTzoy1gcG4d8A6dmOJy7ygtO5MFpRIz8HuKCF5566nOvpy7aHhDDzFmQuu
26
+ FX3zDU6ghx5cQIueDhf2SGOncyBmmJRRYawm3wI0o1MeN6LZJ/3cRaOTjSFy6+S6
27
+ zqDmHBp8fVA2TGJtO0BLNkbGVrBJjh0UPmSoGzWlRhEVnYC33TpDAbNA+u39UrQI
28
+ ynwhNN7YbnmSR7+JU2cUjBFv2iPBO+TGuWC+9L2zn3NHjuc6tnmSYipA9y8Hv+As
29
+ Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
30
+ xx3n58i0lQkBE1EpKE0lFu/y
37
31
  -----END CERTIFICATE-----
38
-
39
- date: 2013-02-24 00:00:00 Z
40
- dependencies:
41
- - !ruby/object:Gem::Dependency
32
+ date: 2014-06-17 00:00:00.000000000 Z
33
+ dependencies:
34
+ - !ruby/object:Gem::Dependency
42
35
  name: minitest
43
- prerelease: false
44
- requirement: &id001 !ruby/object:Gem::Requirement
45
- none: false
46
- requirements:
36
+ requirement: !ruby/object:Gem::Requirement
37
+ requirements:
47
38
  - - ~>
48
- - !ruby/object:Gem::Version
49
- hash: 23
50
- segments:
51
- - 4
52
- - 6
53
- version: "4.6"
39
+ - !ruby/object:Gem::Version
40
+ version: '5.3'
54
41
  type: :development
55
- version_requirements: *id001
56
- - !ruby/object:Gem::Dependency
57
- name: rdoc
58
42
  prerelease: false
59
- requirement: &id002 !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
43
+ version_requirements: !ruby/object:Gem::Requirement
44
+ requirements:
62
45
  - - ~>
63
- - !ruby/object:Gem::Version
64
- hash: 19
65
- segments:
66
- - 3
67
- - 10
68
- version: "3.10"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.3'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rdoc
50
+ requirement: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '4.0'
69
55
  type: :development
70
- version_requirements: *id002
71
- - !ruby/object:Gem::Dependency
72
- name: hoe
73
56
  prerelease: false
74
- requirement: &id003 !ruby/object:Gem::Requirement
75
- none: false
76
- requirements:
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
77
59
  - - ~>
78
- - !ruby/object:Gem::Version
79
- hash: 13
80
- segments:
81
- - 3
82
- - 5
83
- version: "3.5"
60
+ - !ruby/object:Gem::Version
61
+ version: '4.0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: hoe
64
+ requirement: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '3.12'
84
69
  type: :development
85
- version_requirements: *id003
70
+ prerelease: false
71
+ version_requirements: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '3.12'
86
76
  description: |-
87
77
  I'm tired of the complications that tools like bundler and rvm inject
88
78
  into my system and my workflow. I don't want 4 billion gems installed
@@ -90,71 +80,71 @@ description: |-
90
80
  don't want rvm to regress on undefined variables over and over and
91
81
  over (and I don't want to report it anymore when it does). I want as
92
82
  much simplicity as I can afford and still be able to get my job done.
93
-
83
+
94
84
  I've found pretty good balance using rbenv (only when needed) and by
95
85
  using this 45 line shell function `ohmygems` (aliased to `omg`, of
96
86
  course).
97
-
87
+
98
88
  I still have my system-level gems as my previous GEM_HOME gets moved
99
89
  into GEM_PATH so things like minitest and autotest are always
100
90
  available. But now I have private gems that are incredibly easy to
101
91
  switch around and only rely on simple environment variables to manage.
102
-
92
+
103
93
  To go back to normal, simply run `omg reset`.
104
- email:
94
+ email:
105
95
  - ryand-ruby@zenspider.com
106
96
  executables: []
107
-
108
97
  extensions: []
109
-
110
- extra_rdoc_files:
98
+ extra_rdoc_files:
111
99
  - History.txt
112
100
  - Manifest.txt
113
101
  - README.txt
114
- files:
102
+ files:
115
103
  - History.txt
116
104
  - Manifest.txt
117
105
  - README.txt
118
106
  - Rakefile
119
107
  - ohmygems
108
+ - ohmygems_auto
109
+ - ohmygems_chruby
120
110
  homepage: https://github.com/seattlerb/ohmygems
121
- licenses:
111
+ licenses:
122
112
  - MIT
123
- post_install_message: |+
124
-
113
+ metadata: {}
114
+ post_install_message: |2+
115
+
125
116
  Add the following to your ~/.bashrc or equivalent:
126
-
127
- source $(gem env gemdir)/gems/ohmygems-1.1.0/ohmygems
128
-
129
- rdoc_options:
117
+
118
+ source $(gem env gemdir)/gems/ohmygems-1.2.0/ohmygems
119
+
120
+ If you are using chruby to manage rubies, also add:
121
+
122
+ source $(gem env gemdir)/gems/ohmygems-1.2.0/ohmygems_chruby
123
+
124
+ If you want to auto set the gem env with a .ruby-gemset file, add:
125
+
126
+ source $(gem env gemdir)/gems/ohmygems-1.2.0/ohmygems_auto
127
+
128
+ rdoc_options:
130
129
  - --main
131
130
  - README.txt
132
- require_paths:
131
+ require_paths:
133
132
  - lib
134
- required_ruby_version: !ruby/object:Gem::Requirement
135
- none: false
136
- requirements:
137
- - - ">="
138
- - !ruby/object:Gem::Version
139
- hash: 3
140
- segments:
141
- - 0
142
- version: "0"
143
- required_rubygems_version: !ruby/object:Gem::Requirement
144
- none: false
145
- requirements:
146
- - - ">="
147
- - !ruby/object:Gem::Version
148
- hash: 3
149
- segments:
150
- - 0
151
- version: "0"
133
+ required_ruby_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - '>='
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ required_rubygems_version: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
152
143
  requirements: []
153
-
154
- rubyforge_project: ohmygems
155
- rubygems_version: 1.8.25
144
+ rubyforge_project:
145
+ rubygems_version: 2.2.1
156
146
  signing_key:
157
- specification_version: 3
158
- summary: I'm tired of the complications that tools like bundler and rvm inject into my system and my workflow
147
+ specification_version: 4
148
+ summary: I'm tired of the complications that tools like bundler and rvm inject into
149
+ my system and my workflow
159
150
  test_files: []
160
-
metadata.gz.sig CHANGED
Binary file