Coder Social home page Coder Social logo

rubydocs / app Goto Github PK

View Code? Open in Web Editor NEW
51.0 5.0 9.0 739 KB

Fancy docs for any Ruby project

Home Page: https://rubydocs.org

License: MIT License

Ruby 75.85% HTML 16.81% JavaScript 1.17% SCSS 1.16% Haml 3.77% Shell 1.25%
ruby docs docs-generator documentation documentation-generator documentation-tool documentation-site rubydocs rails

app's Introduction

RubyDocs

RubyDocs lets you create fast and searchable docs for any Ruby project by using the sdoc documentation tool.

The application is live at https://rubydocs.org/

If you find a bug or have an idea for a new feature, please open an issue!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Support

If you find RubyDocs useful and would like to support the ongoing development, buy me a coffee or become a sponsor!

License

This project is licensed under the MIT License - see the LICENSE.txt file for details.

app's People

Contributors

cryptogopher avatar dependabot[bot] avatar deppbot avatar exe-boss avatar manuelmeurer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

app's Issues

JSON API – implementation details

How would you generated and store the documentation bits? Are the ri files generated from the sdoc files? Currently the HTML docs are generated on the server and then synced to S3.

The generation flow:

  1. Generate ri files with gem rdoc --ri GEM_NAME
    These files will look like this:
    screen shot 2014-06-03 at 19 38 47
  2. Generate markdown files (they are close to plain text) with ri -f markdown Array >> Array.md

I plan to store files in the same files structure as ri stores .ri files.
Class/module name for a directory, files with names corresponding to method names inside this directory.
screen shot 2014-06-03 at 19 44 21
screen shot 2014-06-03 at 19 38 47
For Ruby 2.1.2 these files will be store along with sdoc files in ruby-2-1-2/markdown/ directory. And will be synced to S3 as well.

How would the API for receiving the docs look like?
Let's say http://api.rubydocs.org/search?q=QUERY&project=PROJECT&version=VERSION.
Where:
QUERY is required and looks like "Array#map", "Array", "map", etc.
PROJECT isn't required and looks like "Ruby", "Rails", etc.
VERSION isn't required and looks like "1.9.3-p545", "4.1.1", etc.

How/why would you need to retrieve the generated sdoc files?
As you wrote: So http://docs.rubydocs.org/ruby-2-1-2/ simply points to http://rubydocs.s3-website-us-east-1.amazonaws.com/ruby-2-1-2/. The "docs" subdomain points to a MaxCDN host which fetches the files from the S3 static website.
So, when you request http://api.rubydocs.org/search?q=Array%23map&project=ruby&version=2.1.2 API will respond with JSON like {project: 'Ruby', version: '2.1.2', content: 'CONTENT'}. CONTENT will come from http://rubydocs.s3-website-us-east-1.amazonaws.com/ruby-2-1-2/markdown/Array/map-i.md.

New Ruby version

Hey Manuel,

a couple of new Ruby versions were released last night.

I though I could help you by adding the new versions to this app. But then I realized that there is no configuration file that covers all available versions. In fact I wasn't able to figure out how the app learns about new versions at all (I didn't look too deep in the code though).

Can you please explain how the update process for new versions works?

Docs are no longer available

Hey, just in case you're not aware, all docs seem to report either:

  • a key error: does not exist (i.e. Capybara)
  • "Docs are being generated" splash screen (Nokogiri)
  • "The change you wanted was rejected"/"No access" error message

image
image
image

Thanks!

Where are the downloads gone?

Hello!

I used to download the generated docs all the time, but I noticed that the feature has been dropped: e0c46a9

I guess there's some good reason, but is there any possibility to add it again? Maybe even some way to clone the project and generate the docs from CLI? The offline docs are a must for me :)

Thanks for this wonderful project!

JSON API – use cases

Use cases:

1. In the text editor (Sublime Text 2)

Actor: A Ruby programmer
Action: looks into someone else's code and finds an unfamiliar method.
Goal: He wants to browse this method's documentation.
Solution: He uses a plugin through a keyboard shortcut and instantly gets a documentation in a separate tab. He gets a link to RubyDocs.org HTML documentation as well.

screen shot 2014-06-02 at 17 47 23

Advantages: Getting the current Ruby version implicitly, based on .ruby-version file, .rvmrc file, etc. Quick and easy access to documentation while staying in "the zone".
Similar: https://github.com/kemayo/sublime-text-2-goto-documentation. Disadvantages: Not working with Ruby on Rails. Opens a browser.

2. In the group chat (HipChat)

Actor: A Ruby programmer
Action: chats with a Ruby team lead about a refactoring issue.
Goal: He wants to get a description of some class in order to address recent team lead's tips.
Solution: He asks a team's chat robot about a description of some class and instantly gets a documentation in an answer.

screen shot 2014-06-02 at 18 07 05

Advantages: Quick and easy access to documentation while staying in "the zone".
Similar: https://github.com/sergey-alekseev/lita-answers.

JavaScript issues?

Hey there,

I am not sure if this is just on my end or if there is a JavaScript problem.

When I search for a method and then click on the method's name, both frames load the documentation and the list on the left shows the same content (see screenshot):

bildschirmfoto 2016-04-27 um 14 26 42

This seems to happen in both the online and the downloaded version.

Furthermore I notice that the list on the left doesn't show anymore in what class the method was found (see screenshot)

bildschirmfoto 2016-04-28 um 10 59 50

Please ping me if you need further information or might need a hand.

feature request: Add non-expiring "latest" URLS

duckduckgo has a !rubydocs bang search for this site which points https://rubydocs.org/d/ruby-2-3-1/?q= , Unfortunately, this no longer works because the ruby 2.3.1 docs seem to have been dropped.

In fact, this !bang will break periodically as whatever version it refers to is dropped from the index. It would be great if there were a URL like https://rubydocs.org/d/ruby-latest that we could point duckduckgo at that will be vaild for as long as the site exists!

BTW, thanks for the site, it's very helpful!!

Add arel to projects

Hey there,

firstly I want to say thank you for your docs, they're a must for me!

I use arel a lot and browsing its docs on rubydocs.info is a nightmare for the latency spikes it has. Do you think is it possible to add it to the supported projects? I could even try to create a PR if you are willing to accept it.

Cheers!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.