ddfreyne changed the topic of #nanoc to: 3.6.8 (mar 22th) | 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
alerante has quit [Remote host closed the connection]
terinjokes has quit [Ping timeout: 258 seconds]
terinjokes has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
alerante has joined #nanoc
alerante has quit [Ping timeout: 245 seconds]
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
<ddfreyne> New release!
<ddfreyne> Ahem.
<travis-ci> [travis-ci] nanoc/nanoc/release-3.6.x 47dd94c Denis Defreyne: The build passed.
<travis-ci> [travis-ci] nanoc/nanoc/3.6.9 47dd94c Denis Defreyne: The build passed.
<travis-ci> [travis-ci] nanoc/nanoc/master 3eeebe2 Denis Defreyne: The build passed.
alerante has joined #nanoc
alerante has quit [Ping timeout: 258 seconds]
cDlm has quit [Quit: Computer has gone to sleep.]
relix has joined #nanoc
louquillio_ has quit [Ping timeout: 245 seconds]
louquillio_ has joined #nanoc
cDlm has joined #nanoc
cDlm has quit [Remote host closed the connection]
cDlm has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 245 seconds]
FunkyPenguin has quit [Ping timeout: 265 seconds]
FunkyPenguin has joined #nanoc
FunkyPenguin has quit [Excess Flood]
FunkyPenguin has joined #nanoc
FunkyPenguin has quit [Ping timeout: 240 seconds]
FunkyPenguin has joined #nanoc
alerante has joined #nanoc
alerante has quit [Ping timeout: 265 seconds]
FunkyPenguin has quit [Ping timeout: 245 seconds]
FunkyPenguin has joined #nanoc
<guardian> o/
cDlm has quit [Ping timeout: 245 seconds]
<ddfreyne> Hi
alerante has joined #nanoc
jugglinmike has joined #nanoc
<guardian> ah this WARN: Unresolved specs during Gem::Specification.reset:
<guardian> cri (~> 2.3)
<guardian> I get it every time I upgrade nanoc
<guardian> then I uninstall cri then reinstall back and the warning disappears
<bobthecow> guardian: are you using a gemfile?
<guardian> yes
<ddfreyne> guardian: I have the same issue, and I don't know how to fix it
<ddfreyne> It is super weird.
<bobthecow> have you guys tried blowing away your gems and starting over?
achal has joined #nanoc
<guardian> I think I did since I don't bother using rbenv or rvm. Once in a while I update brew's ruby and I do bundle install
forcev has joined #nanoc
<ddfreyne> (And I don't think it is a nanoc/cri issue… at least I hope so)
FunkyPenguin has quit [Ping timeout: 240 seconds]
alerante has quit [Remote host closed the connection]
forcev is now known as FunkyPenguin
FunkyPenguin has quit [Changing host]
FunkyPenguin has joined #nanoc
cDlm has joined #nanoc
cDlm has quit [Ping timeout: 265 seconds]
alerante has joined #nanoc
alerante has quit [Ping timeout: 276 seconds]
<guardian> ddfreyne: you once mentioned you indexed a nanoc site with lunr.js. Do I recall right?
cDlm has joined #nanoc
<ddfreyne> guardian: Yup
<ddfreyne> guardian: We've switched to using Elastic Search
<ddfreyne> lunr.js is kinda crappy.
<guardian> oh
<guardian> but on a nanoc site?
<guardian> I need a search solution for a static site, that works totally on the client side
jarr0dsz has joined #nanoc
<travis-ci> [travis-ci] nanoc/nanoc/old-4.x 3080245 Denis Defreyne: The build is still failing.
<GitHub11> [nanoc-core] ddfreyne pushed 1 new commit to master: http://git.io/gc0Qqw
<GitHub11> nanoc-core/master 5559b64 Denis Defreyne: Merge changes from nanoc (up to 3080245634acffbb22bc0b7275a01a4165819750)
<bobthecow> guardian: "that works totally on the client side" seems like an arbitrary restriction.
<guardian> bobthecow: nope because I'm using nanoc to build a static site which is zipped and given to the customer. It's totally offline, customers open the doc/ folder and click index.html and start reading the documentation
<bobthecow> okay, that's a good reason then :)
<guardian> bobthecow: either there's something ready, either I'll filter every content and build an index myself, stored as a compact trie
<guardian> bobthecow: which I can use to perform search queries
<travis-ci> [travis-ci] nanoc/nanoc-core/master 5559b64 Denis Defreyne: The build passed.
<guardian> elasticsearch means connecting to a backend right?
alerante has joined #nanoc
<bobthecow> yeah.
<guardian> so... I did
<guardian> gem cleanup cri
<guardian> Cleaning up installed gems...
<guardian> Attempting to uninstall cri-2.5.0
<guardian> Successfully uninstalled cri-2.5.0
<guardian> Clean Up Complete
<guardian> and I don't have the warning anymore
<guardian> also, I have in my Gemfile gem 'nanoc', '~>3.6', '>=3.6.6'
<guardian> but I don't even remember what it means
<guardian> why not just '>=3.6.6' ?
<bobthecow> because that includes 4.x
<guardian> oh ok
<bobthecow> so either '>= 3.6.6', '< 4'
<bobthecow> or '~> 3.6', '>= 3.6.6'
<guardian> thanks for the clarifications
<bobthecow> npm has a "semver" operator which is better than the twiddle wakka rubygems uses.
<bobthecow> "^ 3.6.6" means '>= 3.6.6', '< 4'
<bobthecow> where '~ 3.6.6' only means '>= 3.6.6', '< 3.7'
<bobthecow> where (ruby's) '~> 3.6.6' only means '>= 3.6.6', '< 3.7'
<guardian> ah
<guardian> so I could change '~>3.6', '>=3.6.6' to '~>3.6.6'
<bobthecow> no, you wouldn't want to.
<guardian> ah no
<guardian> I want 3.7
<bobthecow> right. which is where npm's semver operator comes in.
<guardian> got it
<bobthecow> ~> just rounds up the last number in the version.
<bobthecow> in general, use ~> x.y in your rubygem to get semver awesomeness.
<bobthecow> because that'll include >= x.y, < (x+1)
<bobthecow> which is what semver says you can expect to work.
<bobthecow> but if you run into a case where you need something from a point release, e.g. x.y.z, you have to add that additional constraint manually
<bobthecow> ~> x.y, >= x.y.z
<guardian> I installed 3.7 from source and now I get this http://pastebin.com/4RwSimbR
<guardian> what could be the reason please?
<guardian> well it's master which version file says 3.7
<guardian> is there something prettier than eval_gemfile File.join(File.dirname(__FILE__), "_factory/Gemfile") ???
<guardian> hmmm next question:
<guardian> at the beginning of my Rules file I do "puts __FILE__"
<guardian> and it displays: .//Users/greedo/Projects/pempek.net/Rules
<guardian> notice the leading ".//Users"
<bobthecow> where are you running it from?
<guardian> from its parent folder
<guardian> but I don't experiment this with 3.6.9
<guardian> it's something I did in https://github.com/nanoc/nanoc/pull/420 I think
<guardian> but I can't find what
<bobthecow> so you're experiencing this in your branch, not in the released version?
<guardian> yes in my branch
<guardian> but I'm surprised changes I did can alter __FILE__
<guardian> I thought it would be a readonly var
<bobthecow> gotcha. i was going to say, i'm not seeing that at all :)
<guardian> it's code I did in #420
<bobthecow> the second parameter to #instance_eval explicitly sets the "filename" for your eval
<guardian> apparently it's rules_filename = File.absolute_path(rules_filename)
<bobthecow> so you're saying "eval this file, and say that, for the purposes of this eval, your filename is #{rules_filename}"
<bobthecow> you can make it whatever you want :)
<guardian> ok well I found the bug
<guardian> I take an absolute path but then, I kept dsl.instance_eval(@data, "./#{rules_filename}")
<bobthecow> but you shouldn't use an absolute path anyway.
<bobthecow> everything in nanoc is relative to the cwd.
<guardian> I'm fighting with RMagick
<guardian> in my Gemfile I have gem 'rmagick'
<guardian> and in my helpers (e.g. lib/images.rb) I have require 'RMagick'
<guardian> and on my Mac it spits out tons of warnings about already initalized stuff
<guardian> it's all because of case sensitivity between rmagick and RMagick
<guardian> I ended up removing all require 'RMagick' clauses in my helpers and now it works both on Linux and Mac
<guardian> is it a bad idea to remove those require clauses from my helper code?
<guardian> looks like nanoc is bundler aware and I don't need those require clauses in my helpers, do you confirm?
<bobthecow> nanoc will not be bundler aware in the future.
<bobthecow> can you do `require 'RMagick' unless defined?('RMagick')` or something?
<guardian> maybe
<guardian> but what I'm facing seems really to be nanoc specific
<guardian> or... maybe... I use a gem that requires 'rmagick' while I'm doing require 'RMagick'
<guardian> http://pastebin.com/vRW98qPE see lines go in pairs
<bobthecow> why are you requiring 'RMagick'?
<guardian> why am I requiring it? or why am I requiring in this precise case?
<guardian> I have helpers in lib/ that make use of RMagick, and I thought I had to require it before using it. But apparently, when I don't require it my helpers still work
<bobthecow> no, why don't you switch to the lowercase version?
<guardian> because that's not the way to go
<guardian> require 'RMagick' is the way to go
<bobthecow> RMagick's insistence that the gem be required uppercase is really dumb.
<guardian> and if you require 'rmagick' on debian/ubuntu it fails
<bobthecow> it's not very ruby.
<bobthecow> they should name their file lowercase.
<bobthecow> oh.
<bobthecow> add :require => false to your gemfile.
<bobthecow> gem 'rmagick', :require => false
<bobthecow> *that*.
<bobthecow> that's why they should rename their file.
<bobthecow> because it's stupid to do things different :)
<bobthecow> looking at this gem, it doesn't follow standard ruby practices very well.
<bobthecow> maybe because it's old and hasn't been kept updated?
<cDlm> isn't there a gem 'foo', :require => 'Foo' possibility ?
<guardian> ... that's the only one available
<bobthecow> cDlm: yeah, that too.
<bobthecow> depends whether guardian is trying to make his stuff work without bundler, or require it.
achal has quit [Quit: Connection closed for inactivity]
<guardian> well I think I prefer , :require => 'RMagick'
<guardian> and "work without bundler" well it's in the context of a nanoc site
<guardian> bobthecow: you said "nanoc 4 will be bundler aware"
<bobthecow> will not.
<guardian> ah
<guardian> ok
<guardian> because it currently is hence the autorequire in lowercase
<bobthecow> nanoc 4 will require you to run `bundle exec nanoc`
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bobthecow> which you should be doing anyway.
<guardian> really?
<guardian> I'm not ruby-literate enough to figure out why
<guardian> well of course I can figure out why if I google it :)
<bobthecow> because it's problematic assuming that you want to run under bundler.
<bobthecow> i don't really care either way, because i use rbenv with a plugin that generates bundler aware binstubs for everything.
<bobthecow> so i never run anything with bundle exec :)
<guardian> thanks cDlm btw
<guardian> ok enough poking with ruby and nanoc, thank you for the help again, much appreciated
<guardian> my "nanoc factory" idea is developing well
<guardian> I just built 2 different sites/docs based on a single framework/factory rules, layouts etc