open_gemdocs 0.2.1 → 0.2.3

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: caa6b9319f8f30e6cd853d913be8d48cdbf7391795141d427f5a8fcbb281857c
4
- data.tar.gz: b7645ceac6e716e4cc04f5a4fc5e773246d461228c3573b7a0edc1765c50d56a
3
+ metadata.gz: 9684f9464ae5cbc9eba19ed1caddc8196b31f2005d7344291d867582dfddb747
4
+ data.tar.gz: 50c1a060f146fa2d404a628ce5fc2cf4462ac539bcc0a4dd12ce9654eed28400
5
5
  SHA512:
6
- metadata.gz: da408504c8dd77206dfe9b277887514e5c46ebe5004ef3e3b629c8163d4c3e119758c66e859a07a312150ec98013cdecc1a98bd042b25851429d9aa61cedd318
7
- data.tar.gz: 951fb401b1bc62bd133bb96bfe2cff936eef72acf3852ede3fc111892e8cd79b5a24088bc7465195d91b595e1bba93e5c02838f929041d1562a5b0d45653643e
6
+ metadata.gz: 51d7f7b96bc64e97a3e401ea3bfccf9bfb831d46ddb08825835187257369cee1c04ba0fb560c04cabaa0aa36370ce03b23c4c1b427f7d633348b9d3a328683f2
7
+ data.tar.gz: 39587826433c8ee774d6d6117459975cf14ea5cb7964196c24b9f64895d60f4dc73be82efea0604568336d60e074125bac658b59135641428052d1902fb873e3
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,8 +1,8 @@
1
1
  # OpenGemdocs
2
2
 
3
- This is a simple command line tool that helps open gem documentation. There are two documentation sources this gem supports.
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
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.
@@ -15,7 +15,7 @@ This is a simple command line tool that helps open gem documentation. There are
15
15
  Install the gem and add to the application's Gemfile by executing:
16
16
 
17
17
  ```bash
18
- bundle add open_gemdocs
18
+ bundle add open_gemdocs --group development
19
19
  ```
20
20
 
21
21
  If bundler is not being used to manage dependencies, install the gem by executing:
@@ -0,0 +1 @@
1
+ 9c01c65161cfae3c148eb7e00013337aa034e4b789ca062d87d038ba521ec452ec541fa8174db8c1f4dc53ae421aa6d05749f5d9d46111b82481dc9c6f938c87
@@ -0,0 +1 @@
1
+ bd0a8fc16bd14139184056791b43220f134fd3f33ad9513eba78cec2025c3c20fbcd166d4e644b60dd47fe564bbe83f114ffca6532446293f38c5e299006348c
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
@@ -36,21 +36,6 @@ end.parse!
36
36
 
37
37
  begin
38
38
  if options[:local]
39
- unless OpenGemdocs::Yard.yard_installed?
40
- puts 'To use the local documentation, you need to install Yard.'
41
- puts 'Please install yard with `gem install yard`.'
42
- puts 'Would you like to install it now? (y/n)'
43
- case gets.chomp.downcase
44
- when 'y'
45
- system('gem install yard')
46
- puts 'Yard installed successfully.'
47
- puts 'Now you can use the local documentation with `open-gem-docs --local <gem_name>`'
48
- else
49
- puts 'Yard is required to use the local documentation.'
50
- puts 'Please install it and try again.'
51
- end
52
- exit 0
53
- end
54
39
  OpenGemdocs::Yard.browse_gem(ARGV[0])
55
40
  else
56
41
  OpenGemdocs::Browser.new(gem_name: ARGV[0], version: options[:version], use_latest: options[:latest]).open_browser
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenGemdocs
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.3"
5
5
  end
@@ -18,10 +18,6 @@ module OpenGemdocs
18
18
  puts " When you're done, remember to stop the server with `open-gem-docs --stop`"
19
19
  end
20
20
 
21
- def yard_installed?
22
- `gem list yard -i`.strip == 'true'
23
- end
24
-
25
21
  def start_yard_server
26
22
  if File.exist?('Gemfile.lock')
27
23
  `#{SERVER_COMMAND} --gemfile`
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.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean McCleary
@@ -35,7 +35,21 @@ cert_chain:
35
35
  zOgawVlgqyQ5ACIDUJIr+qMUWjeOKyJ2JTte9Jy4CC4=
36
36
  -----END CERTIFICATE-----
37
37
  date: 1980-01-02 00:00:00.000000000 Z
38
- dependencies: []
38
+ dependencies:
39
+ - !ruby/object:Gem::Dependency
40
+ name: yard
41
+ requirement: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - "~>"
44
+ - !ruby/object:Gem::Version
45
+ version: 0.9.26
46
+ type: :runtime
47
+ prerelease: false
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - "~>"
51
+ - !ruby/object:Gem::Version
52
+ version: 0.9.26
39
53
  description: ''
40
54
  email:
41
55
  - seanmcc@gmail.com
@@ -54,6 +68,8 @@ files:
54
68
  - checksums/open_gemdocs-0.1.0.gem.sha512
55
69
  - checksums/open_gemdocs-0.2.0.gem.sha512
56
70
  - checksums/open_gemdocs-0.2.1.gem.sha512
71
+ - checksums/open_gemdocs-0.2.2.gem.sha512
72
+ - checksums/open_gemdocs-0.2.3.gem.sha512
57
73
  - exe/open-gem-docs
58
74
  - lib/open_gemdocs.rb
59
75
  - lib/open_gemdocs/browser.rb
metadata.gz.sig CHANGED
Binary file