gem-home 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -1
- data/gem-home.gemspec +1 -1
- data/lib/rubygems/commands/docs_command.rb +6 -1
- data/lib/rubygems/commands/home_command.rb +6 -1
- data/lib/rubygems/commands/issues_command.rb +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 192bbdf71cc3f19da865ca8d131cc87fa9743d58
|
4
|
+
data.tar.gz: 7b7096f92f122fdd6e7b0c7ec5470a2274f47e74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c74357ae5e9ea5dc143c262b0d03eb66e1027aa5d6549d379c26c291f03680bb53852871b3bbeba04df12d17b9d78351a664f23f46cdac5e0316a25c6e997cc
|
7
|
+
data.tar.gz: 9ea400270cbc884eb030ef89d86e3b4b5ea021c5feab9eb66d55c6f1e9581a3ea2e693a66f2ff33483e23fcd3ae3834456b08789f0cca7440cb9eb350548649e
|
data/README.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Gem::Home
|
2
2
|
|
3
|
-
|
3
|
+
Adds some useful extensions to the default `gem` command
|
4
|
+
|
5
|
+
The gem tries to do some clever things to get you somewhere no matters what:
|
6
|
+
* First the explicit docs, homepage or issues links are used from the spec
|
7
|
+
* If not present, and the gem is stored on github, it'll use the relevant github links
|
8
|
+
* If not on github, the gem falls back to the rubydoc page for the gem
|
4
9
|
|
5
10
|
## Installation
|
6
11
|
|
@@ -10,8 +15,11 @@ Ads some useful extensions to the default `gem` command
|
|
10
15
|
|
11
16
|
```bash
|
12
17
|
gem home gem-name
|
18
|
+
# opens the gem's homepage
|
13
19
|
gem issues gem-name
|
20
|
+
# opens the gem's issue tracker for bug reporting
|
14
21
|
gem docs gem-name
|
22
|
+
# opens the gem's documentation
|
15
23
|
```
|
16
24
|
|
17
25
|
## Contributing
|
data/gem-home.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "gem-home"
|
7
|
-
spec.version = "0.0.
|
7
|
+
spec.version = "0.0.2"
|
8
8
|
spec.authors = ["Ryan"]
|
9
9
|
spec.email = ["ryan@mazondo.com"]
|
10
10
|
spec.summary = "Adds convenience methods to the gem command"
|
@@ -10,6 +10,11 @@ class Gem::Commands::DocsCommand < Gem::Command
|
|
10
10
|
|
11
11
|
name = get_one_gem_name
|
12
12
|
link = ::Gem::Home::SpecLoader.get_docs_url(name)
|
13
|
-
|
13
|
+
if link
|
14
|
+
::Gem::Home::Browser.open_link(link)
|
15
|
+
else
|
16
|
+
puts "We did our best, but there are no links for this gem"
|
17
|
+
exit 1
|
18
|
+
end
|
14
19
|
end
|
15
20
|
end
|
@@ -10,6 +10,11 @@ class Gem::Commands::HomeCommand < Gem::Command
|
|
10
10
|
|
11
11
|
name = get_one_gem_name
|
12
12
|
link = ::Gem::Home::SpecLoader.get_home_url(name)
|
13
|
-
|
13
|
+
if link
|
14
|
+
::Gem::Home::Browser.open_link(link)
|
15
|
+
else
|
16
|
+
puts "We did our best, but there are no links for this gem"
|
17
|
+
exit 1
|
18
|
+
end
|
14
19
|
end
|
15
20
|
end
|
@@ -10,6 +10,11 @@ class Gem::Commands::IssuesCommand < Gem::Command
|
|
10
10
|
|
11
11
|
name = get_one_gem_name
|
12
12
|
link = ::Gem::Home::SpecLoader.get_issues_url(name)
|
13
|
-
|
13
|
+
if link
|
14
|
+
::Gem::Home::Browser.open_link(link)
|
15
|
+
else
|
16
|
+
puts "We did our best, but there are no links for this gem"
|
17
|
+
exit 1
|
18
|
+
end
|
14
19
|
end
|
15
20
|
end
|