gem-home 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 665486b62cff1fd7cb2bf5b07a53d010061ff940
4
- data.tar.gz: a268b8d2c0d1ff8f815ac6760d2d6b781db0e571
3
+ metadata.gz: 192bbdf71cc3f19da865ca8d131cc87fa9743d58
4
+ data.tar.gz: 7b7096f92f122fdd6e7b0c7ec5470a2274f47e74
5
5
  SHA512:
6
- metadata.gz: d160b81688a73cb441cd70814a626d087d3d2a266d207b244d2dfdb6bf03d76ab610bba7749d202485dabac6ed2898429fe5ab3f7cfcf1e3c2b1af53c9f5c0d7
7
- data.tar.gz: c8e75b1f44b7215bbfcd63129d85f9a2b83415f872119b2b97ce9f0d46f313915cf297b9be84278dab8778ea769448542b4413108d53868b7459d2d9a1962172
6
+ metadata.gz: 1c74357ae5e9ea5dc143c262b0d03eb66e1027aa5d6549d379c26c291f03680bb53852871b3bbeba04df12d17b9d78351a664f23f46cdac5e0316a25c6e997cc
7
+ data.tar.gz: 9ea400270cbc884eb030ef89d86e3b4b5ea021c5feab9eb66d55c6f1e9581a3ea2e693a66f2ff33483e23fcd3ae3834456b08789f0cca7440cb9eb350548649e
data/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # Gem::Home
2
2
 
3
- Ads some useful extensions to the default `gem` command
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
@@ -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.1"
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
- ::Gem::Home::Browser.open_link(link)
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
- ::Gem::Home::Browser.open_link(link)
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
- ::Gem::Home::Browser.open_link(link)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem-home
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan