brewbygems 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/brewbygems.gemspec +2 -2
- data/lib/rubygems_plugin.rb +12 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/brewbygems.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{brewbygems}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.3.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andre Arko"]
|
12
|
-
s.date = %q{
|
12
|
+
s.date = %q{2010-01-25}
|
13
13
|
s.description = %q{Adds RubyGems post-install and post-uninstall hooks to update Homebrew bin/ symlinks}
|
14
14
|
s.email = %q{andre@arko.net}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/rubygems_plugin.rb
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
Gem::post_install do |installer|
|
2
|
+
cellar_glob = File.join(`brew --prefix`.chomp, "Cellar/*")
|
3
|
+
# Augh RubyGems why is installer.gem_home a Pathname here
|
4
|
+
installing_to_cellar = Pathname.new(installer.gem_home).fnmatch(cellar_glob)
|
5
|
+
has_binary = installer.spec.executables.any?
|
6
|
+
|
2
7
|
unless system("brew link gems")
|
3
8
|
puts "brewbygems: Sorry, you don't seem to have Homebrew installed."
|
4
|
-
end if
|
9
|
+
end if has_binary && installing_to_cellar
|
5
10
|
end
|
6
11
|
|
7
12
|
Gem::post_uninstall do |installer|
|
13
|
+
cellar_glob = File.join(`brew --prefix`.chomp, "Cellar/*")
|
14
|
+
# Augh RubyGems why is installer.gem_home a String here
|
15
|
+
installing_to_cellar = Pathname.new(installer.gem_home).fnmatch(cellar_glob)
|
16
|
+
has_binary = installer.spec.executables.any?
|
17
|
+
|
8
18
|
unless system("brew prune")
|
9
19
|
puts "brewbygems: Sorry, you don't seem to have Homebrew installed."
|
10
|
-
end if
|
20
|
+
end if has_binary && installing_to_cellar
|
11
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brewbygems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andre Arko
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-25 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|