Skip to content

DO NOT MERGE: Atomic registry page - #1698

Closed
aweiteka wants to merge 6 commits into
openshift:masterfrom
aweiteka:atomic-registry-page
Closed

aweiteka wants to merge 6 commits into
openshift:masterfrom
aweiteka:atomic-registry-page

Conversation

@aweiteka

@aweiteka aweiteka commented Mar 7, 2016

Copy link
Copy Markdown

This refactors the HTML templates to add an Atomic-branded build.
Depends on #1693 #1694

@aweiteka

aweiteka commented Mar 7, 2016

Copy link
Copy Markdown
Author

@nhr please take a look.

Requires a messy rebase that I'll do after initial feedback.

@aweiteka

Copy link
Copy Markdown
Author

@nhr @adellape any comments on the approach here?

@aweiteka aweiteka changed the title Atomic registry page WIP: Atomic registry page Mar 22, 2016
@aweiteka

Copy link
Copy Markdown
Author

Per IRC chat will need to adjust the approach once asciibinder supports site-specific templates more elegantly. This PR will either be closed or significantly modified.

@aweiteka
aweiteka force-pushed the atomic-registry-page branch from 8cc6f6a to ed10483 Compare March 29, 2016 17:32
@aweiteka
aweiteka force-pushed the atomic-registry-page branch from 8014891 to 6d58e9a Compare March 31, 2016 17:55
Comment thread _templates/page.html.erb
<%= render("_templates/_footer.html.erb", :distro_key => distro_key, :images_path => images_path) %>
</body>
</html>
<%= render((distro_key['atomic'] ? "_templates/_page_atomic.html.erb" : "_templates/_page_atomic.html.erb"),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the second one here should be _page_openshift.html.erb

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the second one here should be _page_openshift.html.erb

@Fryguy good catch. This is a workaround that I need help with.

Rendering the openshift page returns this error:

Error: Could not generate docs: undefined local variable or method `images_path' for #<AsciiBinder::TemplateRenderer:0x007f957b398e98>.

Full output: https://paste.fedoraproject.org/348201/14595147/ It may be a simple ruby issue I'm not aware of. Any ideas?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's really weird and I'm not sure...I'll try checking out your branch and taking a look

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I added some debugging to the asciibinder gem, and narrowed it down to the footer...still trying to understand why that is causing problems though.

/Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:1:in `block in singleton class': undefined local variable or method `images_path' for #<AsciiBinder::TemplateRenderer:0x007f8b2c0b3ad8> (NameError)
    from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-6:in `instance_eval'
    from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-6:in `singleton class'
    from /Users/jfrey/dev/openshift-docs/_templates/_footer.html.erb:-8:in `__tilt_70117841297920'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
    from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:92:in `block in singleton class'
    from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-28:in `instance_eval'
    from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-28:in `singleton class'
    from /Users/jfrey/dev/openshift-docs/_templates/_page_openshift.html.erb:-30:in `__tilt_70117841297920'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
    from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:1:in `block in singleton class'
    from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-29:in `instance_eval'
    from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-29:in `singleton class'
    from /Users/jfrey/dev/openshift-docs/_templates/page.html.erb:-31:in `__tilt_70117841297920'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `call'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:164:in `evaluate'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/tilt-2.0.2/lib/tilt/template.rb:99:in `render'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/template_renderer.rb:24:in `render'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:259:in `page'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:761:in `configure_and_generate_page'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:601:in `block (4 levels) in generate_docs'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:591:in `each'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:591:in `block (3 levels) in generate_docs'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:587:in `each'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:587:in `block (2 levels) in generate_docs'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:544:in `each'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:544:in `block in generate_docs'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:511:in `each'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/lib/ascii_binder/helpers.rb:511:in `generate_docs'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/bin/asciibinder:14:in `call_generate'
    from /Users/jfrey/.gem/ruby/2.2.4/gems/ascii_binder-0.1.2/bin/asciibinder:268:in `<top (required)>'
    from /Users/jfrey/.gem/ruby/2.2.4/bin/asciibinder:23:in `load'
    from /Users/jfrey/.gem/ruby/2.2.4/bin/asciibinder:23:in `<main>'

TODO for me: create a PR on asciibinder to properly expose errors. cc @nhr

@aweiteka aweiteka changed the title WIP: Atomic registry page DO NOT MERGE: Atomic registry page Apr 1, 2016
Comment thread _templates/page.html.erb
</div>
</div>
<div class="visible-xs-block row row-offcanvas row-offcanvas-left">
<%= render("_templates/_footer.html.erb", :distro_key => distro_key, :images_path => images_path) %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh here it is...the old one passed the images path to the footer....

@aweiteka aweiteka closed this Apr 11, 2016
@aweiteka

Copy link
Copy Markdown
Author

Closing. See #1883

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

Successfully merging this pull request may close these issues.

2 participants