ddfreyne changed the topic of #nanoc to: 3.6.9 (apr 15th) | web http://nanoc.ws/ | repo http://bit.ly/XE6e3G | issues http://bit.ly/VfXaSV | forum http://ho.io/n-discuss | irclog http://irclog.whitequark.org/nanoc
jugglinmike has quit [Quit: Leaving.]
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
alerante has quit [Remote host closed the connection]
alerante has joined #nanoc
jarr0dsz has quit [Quit: Textual IRC Client: www.textualapp.com]
alerante has quit [Ping timeout: 276 seconds]
<ddfreyne> bobthecow: Moving an executable from one gem to another is seriously hard.
<ddfreyne> bobthecow: I now get stuff like
<ddfreyne> Bundler is using a binstub that was created for a different gem.
<ddfreyne> and installing nanoc and nanoc-cli at the same time is not really possible.
<ddfreyne> So it seems like bin/nanoc will have to live in the nanoc gem…
<ddfreyne> That said:
<ddfreyne> \o/
relix has joined #nanoc
<guardian> morning
jutah has joined #nanoc
<cDlm> why doesn't it work to just update both gems at the same time ?
cDlm has quit [Quit: Computer has gone to sleep.]
cDlm has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 258 seconds]
<ddfreyne> cDlm: Having the same binary in multiple gems is problematic because one will overwrite the other
<cDlm> of course
<cDlm> i meant put it in one gem at the same time as you remove it from the other
<cDlm> and update dependency constraints accordingly
<cDlm> if two packages provide the same ressource, it's a conflict
<bobthecow> ddfreyne: you need to override `hyphens: auto` for <code> :)
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
alerante has joined #nanoc
jugglinmike has joined #nanoc
achal has joined #nanoc
<ddfreyne> bobthecow: Good point
<ddfreyne> cDlm: Still doesn't work. Nothing prevents you from having nanoc and nanoc-cli installed side by side.
<cDlm> maybe I don't understand what you want nanoc and nanoc-cli to provide
<cDlm> nanoc is the umbrella package ?
<guardian> "bobthecow | ddfreyne: you need to override `hyphens: auto` for <code> :)" <-- what does it refer to? a filter?
<cDlm> guardian: css in the upgrade guide, I guess
<bobthecow> guardian: refers to css in the entire website.
<bobthecow> it currently sets the whole website to auto-hyphenate everything.
<bobthecow> but that's problematic inside <code> tags, since those are supposed to contain literal code.
<bobthecow> see my screenshot :)
<guardian> I get it now
<guardian> is there a way to render this prettier? '/x/' =~ %r{^#{y}}
<guardian> y is supposed to be a string
<bobthecow> for regexp with strings in them, i always use the constructor rather than literal regexp.
<bobthecow> Regexp.new("^#{y}")
<guardian> ok
<guardian> I have another question
<guardian> I have a image() helper that inserts an image
<guardian> when the parent item is in :teaser rep, it takes the :teaser rep of the image
<guardian> when the parent item is in :default rep, it takes the :default rep of the image
<guardian> this is achieved with this code fragment: rep = image.rep_named(item_rep.name)
<guardian> and as you can see, I'm using item_rep.name and not @item_rep.name
<guardian> I recall I onced asked the question but I fail to find the answer: I think it should be @item_rep but I *think* some versions of nanoc didn't support @item_rep in helpers
<guardian> does that ring a bell?
<bobthecow> does not ring a bell.
<guardian> ok
<guardian> ddfreyne: is gem 'nanoc-asciidoctor' enough? or do I need to install standalone asciidoctor beside the nanoc filter?
cDlm has quit [Ping timeout: 240 seconds]
<ddfreyne> guardian: That is enough
<ddfreyne> guardian: But `image.rep_named(item_rep.name)` is *exactly* the same as `item_rep`
<ddfreyne> It's going full circle.
<guardian> nope
<ddfreyne> Nope?
<ddfreyne> Oh oops, I read that as `item` not `image`
<ddfreyne> Never mind.
<guardian> nope, item == a blog pos, while image == @items.find { ... } == the image to be inserted :)
<guardian> bleh from https://groups.google.com/forum/#!topic/nanoc/OLFd-9gcAzw I clicked http://asciidoctor.org/rdoc/Asciidoctor.html#method-c-render which mentions Asciidoctor::Document#initialize for details
<guardian> Asciidoctor::Document#initialize is not clickable and when inspecting Asciidoctor::Document's doc... well it tells I can set options like :safe or :header_footer but in the end that doesn't tell much
<ddfreyne> guardian: Yeah, RDoc is kinda crappy
<guardian> are there options you would advise me to set?
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ddfreyne> guardian: not sure
relix has joined #nanoc
<guardian> re
jarr0dsz has joined #nanoc
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has joined #nanoc
<guardian> ddfreyne: so you dislike reassigning @config?
<guardian> ddfreyne: is @config = parent_config(@config) ok?
<ddfreyne> guardian: It should ideally be calculated, then assigned once
<ddfreyne> (In other words, why assign something when you are going to reassign it anyway?)
cDlm has joined #nanoc
<guardian> I'm asking because that's what's current code doing: https://github.com/nanoc/nanoc/blob/master/lib/nanoc/base/source_data/site.rb#L366-377
<guardian> what's the way to debug tests? if I add puts statements, it breaks everything
<ddfreyne> guardian: Yeah, that code is icky… hmmm.
<guardian> ok
<guardian> and about debugging tests? :)
<ddfreyne> If you can refactor that, that'd be cool (somethign like @config = build_config_with_parents(filename))
<ddfreyne> guardian: You can use puts… why would it break?
<ddfreyne> (STDOUT.puts actually, because otherwise it will be swallowed)
<ddfreyne> $stdout is reassigned during test run
<guardian> ok
<guardian> and can I execute a single test?
<ddfreyne> You can run a subset (e.g. rake test:base)
<guardian> that I figured it out already
<guardian> so that the finest granularity
<guardian> ?
<ddfreyne> Yes
<ddfreyne> guardian: I assume the tests pass?
<guardian> yes
<guardian> just read your comment
<guardian> it seem sI can't config_paths + config_path
<guardian> because config_paths is an Array and config_path a String
<guardian> I get TypeError: no implicit conversion of String into Array
<ddfreyne> Oh yeah, needs to be + [config_path]
<guardian> ok
<guardian> I didn't know which would be preferred
<ddfreyne> I avoid mutating objects as much as possible
<guardian> pushed
<ddfreyne> And if I need mutation, it should be the main effect, rather than a side effect
<ddfreyne> guardian: Will take a closer view tomorrow
<ddfreyne> Tired now, ttyl!
<guardian> no problem
<guardian> good night
achal has quit [Quit: Connection closed for inactivity]
jarr0dsz has quit [Quit: Textual IRC Client: www.textualapp.com]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]