open_gemdocs 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: 163ed0b411faca022538670ef2cf3d1eb32bdd14ab18da40ec40ebd0cacf614d
4
- data.tar.gz: 49da57a40d0e42119d72b22307c4ab65e8220a8dbaff4fdf40ede8614b176381
3
+ metadata.gz: caa6b9319f8f30e6cd853d913be8d48cdbf7391795141d427f5a8fcbb281857c
4
+ data.tar.gz: b7645ceac6e716e4cc04f5a4fc5e773246d461228c3573b7a0edc1765c50d56a
5
5
  SHA512:
6
- metadata.gz: 808f9bdd8aedd3c9207be40d17c1e8c8b8d51e96beda2337f57eb57b3d12eeae505bfd46b60cbee3ca87406dcd511e77f36ca352bbd22a47a68935888b815fed
7
- data.tar.gz: 727d07b3051bdf906d8e5f272ee5f3d3005f5069e0313c141e0298ac17960cb191ad258868df2819e84e11f611fef598dba8d5763e14c1b30305d161b6ec52b1
6
+ metadata.gz: da408504c8dd77206dfe9b277887514e5c46ebe5004ef3e3b629c8163d4c3e119758c66e859a07a312150ec98013cdecc1a98bd042b25851429d9aa61cedd318
7
+ data.tar.gz: 951fb401b1bc62bd133bb96bfe2cff936eef72acf3852ede3fc111892e8cd79b5a24088bc7465195d91b595e1bba93e5c02838f929041d1562a5b0d45653643e
checksums.yaml.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
1
  # OpenGemdocs
2
2
 
3
- This is a simple command line tool that helps open gem documentation. There are two documentation sources you can use.
3
+ This is a simple command line tool that helps open gem documentation. There are two documentation sources this gem supports.
4
4
 
5
5
  1. local gems served with the yarn gem
6
6
  2. [https://gemdocs.org](https://gemdocs.org) - a good ruby gem documentation host
7
7
 
8
- * If ran from a directory with a Gemfile.lock, it will open the documentation for the version of the gem you are using unles you specify `--latest` or `--version` options
9
- * Defaults to open the latest version of the documentation
8
+ * If ran from a directory with a Gemfile.lock, it will open the documentation for the version specified in Gemfile.lock. When using the online source, you can specify `--latest` or `--version` options.
9
+ * Defaults to open the latest version of the documentation if not `--local` or a `Gemfile.lock` is not found in the current directory.
10
10
  * Can specify a version of the docs to view
11
+ * When ran with `--local`, it will either serve docs for all gems you have installed or the versions specified in your Gemfile.
11
12
 
12
13
  ## Installation
13
14
 
@@ -0,0 +1 @@
1
+ 47c51e49929fa17823bb73e851d2647a3cba1f2e70bba6da9b23cf9881a0ad96add9d6b585bd9d4594383f9ee965e756fc739b452f38033c41c1b1ed22af8458
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenGemdocs
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -3,7 +3,7 @@
3
3
  module OpenGemdocs
4
4
  module Yard
5
5
  extend self
6
- SERVER_COMMAND = 'yard server --gems --daemon ./'
6
+ SERVER_COMMAND = 'yard server --daemon'
7
7
 
8
8
  def browse_gem(gem_name)
9
9
  if server_running?
@@ -22,7 +22,13 @@ module OpenGemdocs
22
22
  `gem list yard -i`.strip == 'true'
23
23
  end
24
24
 
25
- def start_yard_server = `#{SERVER_COMMAND}`
25
+ def start_yard_server
26
+ if File.exist?('Gemfile.lock')
27
+ `#{SERVER_COMMAND} --gemfile`
28
+ else
29
+ `#{SERVER_COMMAND} --gems`
30
+ end
31
+ end
26
32
 
27
33
  def server_running? = find_yard_pids.any?
28
34
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_gemdocs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean McCleary
@@ -53,6 +53,7 @@ files:
53
53
  - certs/mrinterweb.pem
54
54
  - checksums/open_gemdocs-0.1.0.gem.sha512
55
55
  - checksums/open_gemdocs-0.2.0.gem.sha512
56
+ - checksums/open_gemdocs-0.2.1.gem.sha512
56
57
  - exe/open-gem-docs
57
58
  - lib/open_gemdocs.rb
58
59
  - lib/open_gemdocs/browser.rb
metadata.gz.sig CHANGED
Binary file