Rubyfu gem is a simple way to run and read Rubyfu book offline as it is online. This gem should be continuously updated as the online version gets updated, but it's not instantly syncing.
Well, the gem contains and HTML version of the book and it uses watir-webdriver
gem to open the html file which gets served by Webrick
ruby web server. So the webserver will serve the book, the browser will open it on the localhost.
- Install rubyfu gem
gem install rubyfu
- Usage You can simply just run it from your command-line
rubyfu
Or use more options
rubyfu -h
Usage: rubyfu [OPTIONS]
Help menu:
-p, --port NUM Port to listen on. Default 9911
-h, --help Show the full help screen.
Examples:
rubyfu
rubyfu --port 9911
example
rubyfu -p 9911
There are several things that can be enhanced or contributed with,
- Fork then clone the Rubyfu book repository
git clone https://github.com/[YOURUSER]/RubyFu.git
- Generate/Build an HTML Using gitbook-cli application
cd Rubyfu
gitbook install
gitbook build
This will generate a folder named _book
contains HTML version of the book
- Fork then clone the Rubyfu gem repository
git clone https://github.com/[YOURUSER]/RubyfuGem.git
- Paste the generated HTML book (
_book
) folder inrubyfu/_book
gem directory, then push it
cp -a _book ../RubyfuGem/
- Crate a new pull request (PR) to https://github.com/rubyfu/RubyfuGem/
To report any issue, please refere to issues Done!
-
The gem misses and important mission, which is the synchronization between the webrick and *browser process so if you close the browser, the webrick will keep working in the background.
-
Make gem update smarter
Currently, each time we update the book, we've to update the gem even we did nothing with the gem's code
- Gem's command-line should check the latest gem version
- Gem should check the latest book contents (create a repo, maybe?)
- If the gem is latestet, and book content is not, then the content only should get updated, make sense!
- If the gem is not latest then update the gem and gem update shall contain latest content.
rake build
gem push pkg/
The gem is available as open source under the terms of the MIT License.