Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdoc-merge: badges don't appear anymore #71

Closed
gamov opened this issue Feb 26, 2014 · 9 comments
Closed

sdoc-merge: badges don't appear anymore #71

gamov opened this issue Feb 26, 2014 · 9 comments

Comments

@gamov
Copy link
Contributor

gamov commented Feb 26, 2014

I had to add:

    result.badge = info[6]; 

After line: https://github.com/rdoc/rdoc/blob/master/lib/rdoc/generator/template/json_index/js/searcher.js#L174
for the badges to appear.
Since this file doesn't below to this gem BUT this modification is needed for this gem to work properly, I'm not sure how to proceed.

@zzak
Copy link
Member

zzak commented Feb 26, 2014

@gamov Could you show me an example?

@gamov
Copy link
Contributor Author

gamov commented Feb 26, 2014

hi @zzak, what kind of example would you like to see? html code snippet? A zip of a generated doc?

@zzak
Copy link
Member

zzak commented Feb 26, 2014

What do you mean by "badges"?
Could you show me the code you're generating documentation for and the resulting html output?

@gamov
Copy link
Contributor Author

gamov commented Feb 26, 2014

The 'Ruby' Badge (telling you from which doc is the item from):

<li class="current"><h1><b>assert_equal</b><i>(exp, act, msg = nil)</i></h1><p>
   <span class="badge badge_1">Ruby</span>
MiniTest::Assertions</p><p class="snippet">Fails unless <code>exp == act</code> printing the difference between the</p></li>

The span is completely absent without my fix because it is simply not copied from the index.

Generated from:

 ##
    # Fails unless <tt>exp == act</tt> printing the difference between
    # the two, if possible.
    #
    # If there is no visible difference but the assertion fails, you
    # should suspect that your #== is buggy, or your inspect output is
    # missing crucial details.
    #
    # For floats use assert_in_delta.
    #
    # See also: MiniTest::Assertions.diff

    def assert_equal exp, act, msg = nil
      msg = message(msg, "") { diff exp, act }
      assert(exp == act, msg)
    end

@zzak
Copy link
Member

zzak commented Aug 11, 2014

@gamov I'm thinking of removing sdoc-merge in a future release of sdoc.

If you can convince me we should fix this, and how to fix it; please let me know.

@gamov
Copy link
Contributor Author

gamov commented Aug 13, 2014

Why
Well, to me, this tool is essential. It lets me merge docs that exactly match my environment (in my case: rails 3.0.20 / ruby 1.9.3 / haml 4.
I used to rely on railsapi.com but it didn't have my combination (and it's not loading at the moment).
How
The solution is in my first post but it requires access to rdoc repository, do you have it?

@zzak
Copy link
Member

zzak commented Mar 11, 2016

@gamov Sorry for the late response!

Yes, I have commit to RDoc, so this can be fixed upstream :)

Please re-open if you have any issues!

@zzak zzak closed this as completed Mar 11, 2016
zzak pushed a commit to ruby/rdoc that referenced this issue Mar 11, 2016
@zzak
Copy link
Member

zzak commented Mar 11, 2016

@gamov Can you try with rdoc master?

Just add gem 'rdoc', github: 'rdoc/rdoc' to your application's Gemfile, thanks!!

@gamov
Copy link
Contributor Author

gamov commented Mar 15, 2016

I don't use it within an app, but from the command line, this way:

 ./sdoc-merge --title "Ruby 1.9.3, Rails 3.0.20" --op merged  --names "rails, ruby" output/rails-3.0.20 output/ruby-1.9.3

Master triggered the following exception:

/Users/gamov/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/rdoc.rb:101:in `const_missing': uninitialized constant RDoc::Generator (NameError)
    from /Users/gamov/Temp/@NoTM/gits/sdoc/lib/sdoc/generator.rb:94:in `<top (required)>'
    from /Users/gamov/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/gamov/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/gamov/Temp/@NoTM/gits/sdoc/lib/sdoc.rb:7:in `<top (required)>'
    from /Users/gamov/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/gamov/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /Users/gamov/Temp/@NoTM/gits/sdoc/bin/sdoc-merge:2:in `<main>'

I have actually switched to Dash (https://kapeli.com/dash) for my documentation needs, it's great and merges in realtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants