This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Code/dm-more-sam/dm-migrations (master)$ rake | |
(in /Users/xavier/Code/dm-more-sam/dm-migrations) | |
Loaded suite . | |
Started | |
Finished in 0.000166 seconds. | |
0 tests, 0 assertions, 0 failures, 0 errors | |
rm -r coverage | |
Loaded sqlite3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DRY temporary variables that require single use only, without assignment... seems | |
# useful for configuration files perhaps? urgh. | |
class Object | |
def with(object) | |
yield(object) | |
end | |
end | |
@reports = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/Code/dm-more-sam (master)$ rake spec | |
(in /Users/xavier/Code/dm-more-sam) | |
(in /Users/xavier/Code/dm-more-sam/adapters/dm-couchdb-adapter) | |
(in /Users/xavier/Code/dm-more-sam/adapters/dm-ferret-adapter) | |
rm -r coverage | |
FerretAdapter | |
- should work with a model using id | |
- should work with a model using another key than id | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Observations: | |
- Most breakage came from changes outside the project (dm-core, extlib changes broke dm-more) | |
- Hard to test dm-more in totality, need to install_gems *before* you run rake spec, which is odd | |
- (dkubb) "almost all of the problems people are mentioning on the mailing list are Windows related" | |
Conclusions | |
- Run dm-more tests against new code when dm-core is committed to | |
- Either automatically install dependency gems prior to running specs, or alter the load path to use edge code | |
Bonus points |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'midiator' | |
# Upped the tempo, reveals new curiosities | |
midi = MIDIator::Interface.new | |
midi.use("dls_synth") | |
#midi.autodetect_driver | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value = "Don T Alias" | |
first_name, last_name = value.reverse.split(' ', 2).reverse.collect(&:reverse) | |
first_name = first_name.to_s | |
last_name = last_name.to_s | |
# Refactored: | |
tokens = value.split(' ') | |
to_assign = ['' , '' ] if tokens.size == 0 | |
to_assign = [tokens[0] , '' ] if tokens.size == 1 | |
to_assign = [tokens[0..-2].join(' '), tokens.last] if tokens.size > 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original | |
(function($) { | |
$.stuff = function(bitoftext) { | |
$.stuff.report = function() { console.log(bitoftext) }; | |
} | |
$.stuff.report = function() { | |
throw("Constructor not called!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Live tables! | |
// This example works on http://en.wikipedia.org/wiki/Table_(information) | |
// Paste into firebug console | |
require = function (src){ | |
var script = document.createElement('script'); | |
script.setAttribute('type', 'text/javascript'); | |
script.setAttribute('src', src); | |
// InsertBefore for IE. | |
// IE crashes on using appendChild before the head tag has been closed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/vendor/expectations-1.0.0/lib/expectations/suite_results.rb b/vendor/expectations-1.0.0/lib/expectations/suite_results.rb | |
index 2beb638..34d45e0 100644 | |
--- a/vendor/expectations-1.0.0/lib/expectations/suite_results.rb | |
+++ b/vendor/expectations-1.0.0/lib/expectations/suite_results.rb | |
@@ -3,11 +3,11 @@ class Expectations::SuiteResults | |
def initialize(out) | |
self.out, self.expectations = out, [] | |
- out.print "Expectations " | |
+ out.print "Expectations " unless ENV["FORMAT"] == "yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Breakfast (smoothie) | |
4 bananas | |
1 large handful spinach | |
1 cup soy milk | |
1/2 cup almonds | |
1/4 cup blueberries | |
2 tbsp. protein powder (soy) | |
Snack | |
1 banana |