open_gemdocs 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: 163ed0b411faca022538670ef2cf3d1eb32bdd14ab18da40ec40ebd0cacf614d
4
- data.tar.gz: 49da57a40d0e42119d72b22307c4ab65e8220a8dbaff4fdf40ede8614b176381
3
+ metadata.gz: b3b77411ddcdfaa696359a3fac6f61d78342a7137ad190b4ba9f9a0075717861
4
+ data.tar.gz: 7660e4c4ebc1d654cba3cf25348f6b05be92d62e3ef20e935d237a1fe5ddb692
5
5
  SHA512:
6
- metadata.gz: 808f9bdd8aedd3c9207be40d17c1e8c8b8d51e96beda2337f57eb57b3d12eeae505bfd46b60cbee3ca87406dcd511e77f36ca352bbd22a47a68935888b815fed
7
- data.tar.gz: 727d07b3051bdf906d8e5f272ee5f3d3005f5069e0313c141e0298ac17960cb191ad258868df2819e84e11f611fef598dba8d5763e14c1b30305d161b6ec52b1
6
+ metadata.gz: d8fd831a4cc43d04b5b07991de61549895d76da155a18c31035bd1b99bb773ab020b049e0dfddb5be07133e4ca2538c24a5cd939706f8675decc3835ff2ebaac
7
+ data.tar.gz: 607c5ef41e813a04f44f2fc6af9e3e1b19b81f2da366a5ff79906b95b79cd27c180b7c790c302e83400a29dd85b3d0963ebe8d5458ea89430e45f6c1dbec2b55
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2025-04-26
4
+ ### Changed
5
+ - Fixed a bug where the `--local` option was not working correctly when a specific gem was specified. The command now correctly serves the documentation for the specified gem from the local server.
6
+
7
+ ## [0.2.0] - 2025-04-26
8
+ ### Added
9
+ - Added support for serving local documentation for all installed gems using the `--local` option. This allows users to view documentation for gems that are not available online.
10
+
3
11
  ## [0.1.0] - 2025-04-25
4
12
 
5
13
  - Initial release
data/README.md CHANGED
@@ -1,20 +1,21 @@
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 ruby gem that provides a simple command line tool that helps open gem documentation. There are two documentation sources this gem supports.
4
4
 
5
- 1. local gems served with the yarn gem
5
+ 1. local gems served with the yard gem via `yard server --gems` or `yard server --gemfile` accessible at http://localhost:8808.
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
 
14
15
  Install the gem and add to the application's Gemfile by executing:
15
16
 
16
17
  ```bash
17
- bundle add open_gemdocs
18
+ bundle add open_gemdocs --group development
18
19
  ```
19
20
 
20
21
  If bundler is not being used to manage dependencies, install the gem by executing:
@@ -0,0 +1 @@
1
+ 47c51e49929fa17823bb73e851d2647a3cba1f2e70bba6da9b23cf9881a0ad96add9d6b585bd9d4594383f9ee965e756fc739b452f38033c41c1b1ed22af8458
@@ -0,0 +1 @@
1
+ 9c01c65161cfae3c148eb7e00013337aa034e4b789ca062d87d038ba521ec452ec541fa8174db8c1f4dc53ae421aa6d05749f5d9d46111b82481dc9c6f938c87
data/exe/open-gem-docs CHANGED
@@ -28,7 +28,7 @@ OptionParser.new do |opts|
28
28
  exit
29
29
  end
30
30
 
31
- opts.on('-s', '--stop', 'stops the yarn server') do
31
+ opts.on('-s', '--stop', 'stops the yard server') do
32
32
  OpenGemdocs::Yard.stop_server
33
33
  exit
34
34
  end
@@ -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.2"
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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean McCleary
@@ -53,6 +53,8 @@ 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
57
+ - checksums/open_gemdocs-0.2.2.gem.sha512
56
58
  - exe/open-gem-docs
57
59
  - lib/open_gemdocs.rb
58
60
  - lib/open_gemdocs/browser.rb
metadata.gz.sig CHANGED
Binary file