bghost_ has quit [Read error: Connection reset by peer]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
bghost has quit [Ping timeout: 256 seconds]
bghost has joined #nanoc
bghost has quit [Read error: Connection reset by peer]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
bghost has quit [Ping timeout: 252 seconds]
jadd_ has joined #nanoc
jadd_ has quit [Quit: Leaving...]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 246 seconds]
bghost has quit [Ping timeout: 264 seconds]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
bghost has quit [Ping timeout: 264 seconds]
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
bghost has quit [Quit: leaving]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 246 seconds]
Rym has quit [Ping timeout: 252 seconds]
Rym has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 258 seconds]
bghost has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 246 seconds]
Rym__ has joined #nanoc
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
jadd_ has joined #nanoc
<musicmatze>
ddfreyne: I'm here, we can talk here instead of twitter.
<musicmatze>
Gives us much more characters per message :D
<ddfreyne>
musicmatze: Ah cool :)
<musicmatze>
I'm working on a small patch for better error messages from helpers.
<musicmatze>
I don't like these big tracebacks where I have to search what was wrong.
<ddfreyne>
okay cool :)
jadd_ has quit [Ping timeout: 252 seconds]
Rym__ has joined #nanoc
Rym has quit [Ping timeout: 245 seconds]
Rym__ is now known as Rym
bghost has quit [Ping timeout: 255 seconds]
bghost has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
* ddfreyne
is doing some sunday morning spring cleaning… in nanoc 4.x ;)
* musicmatze
is reading testing code of nanoc to write tests for my newly implemented feature. -.-'
Rym__ has joined #nanoc
<musicmatze>
ddfreyne: I wrote code in lib/nanoc/helpers.rb - where to put the tests for it? In test/helper.rb ?
<ddfreyne>
musicmatze: is that in your own site, or a nanoc fork?
<musicmatze>
nanoc fork.
<ddfreyne>
musicmatze: test/helper.rb includes generic code for all tests (it is a test helper, not a test for helpers). test/helpers.rb is what you want (if it exists)
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
<ddfreyne>
musicmatze: If you write a helper x (lib/nanoc/helpers/x.rb) then the test should go in test/helpers/test_x.rb
<musicmatze>
ddreyne: I wrote a helper method for the helpers. I located it in lib/helpers.rb. So I put testing code in test/helpers.rb now.
<ddfreyne>
okay
<ddfreyne>
musicmatze: I’d like to see your changes some time
bghost has quit [Ping timeout: 260 seconds]
<musicmatze>
I'll show you when they are ready.
bghost has joined #nanoc
<ddfreyne>
sure
<musicmatze>
where is the Nanoc::TestCase located?
<musicmatze>
s/the/the class/g
<ddfreyne>
test/helpers.rb
<ddfreyne>
test/helper.rb
<ddfreyne>
rather
<ddfreyne>
At the bottom of the file
<musicmatze>
I assume, testing is based on Test::Unit, right? So I can use #assert_nothing_raised and so on?
<ddfreyne>
indeed
jadd_ has joined #nanoc
<musicmatze>
ddfreyne: Where do I have to call my testing code?
<ddfreyne>
musicmatze: rake test:helpers ← this will execute all tests in test/helpers/
<musicmatze>
All tests are running, but I have to register my tests somewhere.
<musicmatze>
my test file is located in test/, how to call this one?
<musicmatze>
or do I have to move mine into test/helpers/, too?
jadd_ has quit [Ping timeout: 252 seconds]
Rym__ has joined #nanoc
<ddfreyne>
musicmatze: Ahh, just “rake” will work (“rake test:helpers” only works if it’s in test/helpers/)
<ddfreyne>
sorry, got confused for a sec
Rym has quit [Ping timeout: 245 seconds]
Rym__ is now known as Rym
<musicmatze>
Got it work. `mv test/helpers.rb test/helpers/test_helpers.rb` did the job
<ddfreyne>
musicmatze: What are you working on precisely?
<musicmatze>
A helper method for printing better error messages when using helpers. Say, doing `atom_feed(1)` gives a error message with ~30 lines backtrace, where you have to figure out which line is important for you and so on.
<musicmatze>
With the helper, there is "Hey, you gave me an Integer, but I expect a Hash with keys "foo", "bar" and "foobar".
<musicmatze>
Well, the backtrace will still be there, but there also is a error message a normal guy can read!
<ddfreyne>
Ahh, interesting… how do you do that?
<musicmatze>
I wrote a method which gets several arguments: A class (or an Array of), the Object to check and a Hash of options. Based on these options, the error string is build. Optional raise of Nanoc::Errors::GenericTrivial or return of the error-string.
<musicmatze>
Currently writing and fixing tests.
<musicmatze>
There is no #assert_nothing_raised in Nanoc::TestCase ?!
<ddfreyne>
musicmatze: It’s not in MiniTest::Unit::TestCase
<ddfreyne>
musicmatze: it’s redundant anyway… if an error is raised, the test will fail anyway
<telemachus>
And as I remember Ryan feels violently strongly that there never will be such a method in MiniTest.
<musicmatze>
I have to adapt the changes, because some methods raise another error now...
<musicmatze>
but basically it works now.
<ddfreyne>
musicmatze: Ahh, pretty neat
<musicmatze>
I forced raise by now for some functionality in the blogging helper. I'll adapt the old tests for this now and then, there will be a pull request.
jadd_ has joined #nanoc
<musicmatze>
ddfreyne: What is this Mocha::Mock thing? It breaks all tests! :D
<ddfreyne>
musicmatze: Mocha is a mocking framework, but I barely use it anymore
<ddfreyne>
Old tests still use it, though
<ddfreyne>
I’d like to get rid of it entirely…
<musicmatze>
Okay... It breaks tests because it is passed to #url_for and the checker in this method raises a GenericTrivial ...
<musicmatze>
So ... if you're fine with this I'll submit a pullreq now. Else I try to fix it!
jadd_ has quit [Ping timeout: 256 seconds]
<ddfreyne>
musicmatze: Ideally no tests should fail
<musicmatze>
Also if this patch is for experimental-4.x ?
<ddfreyne>
musicmatze: Also, it’s often a better idea to test whether the given object responds to the right methods (duck typing)… that’s often not possible though
<ddfreyne>
musicmatze: Yes, experimental-4.x should have zero failing tests all the time :)
<musicmatze>
Okay, I'll try to fix them after lunch! :D
<ddfreyne>
musicmatze: Rename awaits to expects too
<musicmatze>
Ok.
<guardian>
hello
Rym__ has joined #nanoc
<ddfreyne>
hi
<guardian>
ddfreyne: a binary filter that does nothing. does it have to copy filename to output_filename?
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
<ddfreyne>
guardian: Yes, but then it doesn’t make any sense to have a filter in the first place, no?
<guardian>
I'm balancing
<guardian>
1) run the filter and eventually do nothing depending on item metadata
<guardian>
2) in Rules, don't run the filter depending on item metadata
<guardian>
concrete case: image_resize filter with an image that has [:resize_type] == :none
<ddfreyne>
Hmmm, I see
<ddfreyne>
Yeah, not sure what is best. I would go for doing it in the Rules
Rym has quit [Ping timeout: 245 seconds]
Rym has joined #nanoc
<ddfreyne>
So now (in 4.x) if you put `rules_store_identifier: monkey` in config.yaml and implement a RulesStore with identifier: monkey you can implement your own Rule-loading mechanism :D
<ddfreyne>
So you could load them from a database too, if you’d want to. Or provide a hardcoded, safe set of Rules that could be used in a shared hosting service…
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 246 seconds]
Rym__ has joined #nanoc
Rym has quit [Ping timeout: 258 seconds]
Rym__ is now known as Rym
* ddfreyne
is off, back in a few hours. seeya!
<musicmatze>
Weather outside is to good to sit in-door and hack ruby! I won't patch these thinks now...
jadd_ has joined #nanoc
Rym__ has joined #nanoc
jadd_ has quit [Ping timeout: 245 seconds]
Rym___ has joined #nanoc
Rym has quit [Ping timeout: 245 seconds]
Rym___ is now known as Rym
Rym__ has quit [Ping timeout: 258 seconds]
Rym__ has joined #nanoc
Rym has quit [Ping timeout: 260 seconds]
Rym__ is now known as Rym
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 248 seconds]
<guardian>
I need help with Gemfile in the context of nanoc
<guardian>
in my Gemfile, if I only add gem 'listen'
<guardian>
Please add the following to your Gemfile to satisfy the dependency:
<guardian>
gem 'rb-fsevent', '~> 0.9'
<guardian>
is there another way? it doesn't sound right to add rb-fsevent to my Gemfile since it's mac specific
<guardian>
I expected the dependency chain to be transitive
<guardian>
my nanoc site —> depends on listen —> depends on rb-fsevent (since I'm on mac)
<guardian>
and on linux that would be
<guardian>
my nanoc site —> depends on listen —> depends on rb-inotify
<guardian>
can someone explain me? or should I put both rb-inotify and rb-fsevent in my Gemfile?
LBo has joined #nanoc
LBo has quit [Client Quit]
LBo has joined #nanoc
LBo has quit [Client Quit]
LBo has joined #nanoc
LBo has quit [Quit: Oogjes dicht en snaveltjes toe...]
LBo has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 248 seconds]
<VitamineD>
guardian: you can have optional deps
<VitamineD>
# linux-specific:
<VitamineD>
# mac-specific
<VitamineD>
gem 'rb-inotify', :require => false
<VitamineD>
gem 'rb-fsevent', :require => false
<VitamineD>
I think the result is bundler will load it if it's already installed but won't complain otherwise
louquillio has quit [Remote host closed the connection]
jadd_ has joined #nanoc
<guardian>
oh ok
<guardian>
thanks!
jadd_ has quit [Ping timeout: 256 seconds]
bghost has quit [Read error: Connection reset by peer]
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 255 seconds]
bghost has joined #nanoc
jadd_ has joined #nanoc
jadd_ has quit [Ping timeout: 252 seconds]
louquillio has joined #nanoc
bghost has quit [Ping timeout: 255 seconds]
* ddfreyne
yawns
<ddfreyne>
I dug a pond today
<ddfreyne>
it was hard work :D
<guardian>
I'm uploading my site
<guardian>
*fingers crossed*
<guardian>
that's a bit sad I'm now sick of it. x browser is no fun
<ddfreyne>
Hmm, I don’t really care much about cross browser stuff
<ddfreyne>
nanoc.ws was built solely on Safari
<ddfreyne>
Requires IE9+ but I don’t care ;)
bghost has joined #nanoc
bghost has quit [Changing host]
bghost has joined #nanoc
jadd_ has joined #nanoc
<ddfreyne>
!twitter ddfreyne
<number-six>
@ddfreyne: @YannLugrin I e-mailed you a while ago about taking over guard-nanoc. Do you have time to discuss this?
<ddfreyne>
Let’s see
jadd_ has quit [Ping timeout: 256 seconds]
<bobthecow>
still no response?Q
bghost has quit [Ping timeout: 246 seconds]
bghost has joined #nanoc
bghost has joined #nanoc
bghost has quit [Changing host]
<ddfreyne>
No :(
<ddfreyne>
bobthecow: What do you suggest instead of @items['/foo.*'] ?
<ddfreyne>
bobthecow: Also, I attempted at introducing identifiers with extensions today, but it looks like I need to refactor quite a bit of stuff or it’ll be too hard