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
{ | |
"email" : "svenfuchs@artweb-design.de", | |
"irc" : "svenfuchs", | |
"jabber" : "svenfuchs@jabber.org", | |
"twitter" : "svenfuchs", | |
"github" : "svenfuchs", | |
"blog" : "http://artweb-design.de", | |
"location" : "Germany/Berlin" | |
} |
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
{ "blog" : "http://johndoesblog.com" } |
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
CouchPotato::View::BaseViewSpec.class_eval do | |
def design_document | |
@design_document.gsub('/', '::') # TODO ask alex | |
end | |
end |
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
# locate with umlauts | |
test "locates an element by encoded selector from html containing an encoded umlaut" do | |
html = '<span>Berlin</span><span>München</span>' | |
assert_equal 'München', locate(html, 'München').content | |
end | |
test "locates an element by encoded selector from html containing an non-encoded umlaut" do | |
html = '<span>Berlin</span><span>München</span>' | |
assert_equal 'München', locate(html, 'München').content |
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
class I18n::Railtie | |
# ... | |
config.i18n.fallbacks = ActiveSupport::OrderedOptions.new | |
# ... | |
config.after_initialize do |app| | |
app.config.i18n.each do |setting, value| | |
case setting | |
# ... | |
when :fallbacks | |
init_fallbacks(setting) |
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
source 'http://gemcutter.org' | |
group :ar2 do | |
gem "activerecord", '~> 2.3' | |
end | |
group :ar3 do | |
gem "activerecord", '~> 3' | |
end |
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
Allows to configure locale fallbacks through config.i18n.fallbacks. The default setting config.i18n.fallbacks = true in production.rb will make I18n.t lookup fall back to the I18n.default_locale if a translation could not be found for the current or given locale. | |
# USAGE | |
# do nothing in config (i.e. remove the line in environment/production.rb) | |
# => local fallbacks won't be used | |
# set to true | |
config.fallbacks = true | |
# => uses I18n::Fallbacks.new |
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
I would like to be able to have multiple bundles (or Gemfiles) per project. | |
I'd imagine things to work like this: | |
Gemfile.a1 | |
gem 'a', '~> 1' # depends on gem b (1.0.0) | |
Gemfile.a2 | |
gem 'a', '~> 2' # depends on gem b (2.0.0) | |
Now `bundle install` would install all the relevant versions: |
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
test "ruby: innerHTML=" do | |
div = document.getElementsByTagName('//div').first | |
div.inner_html = '<div><span>hi</span> there</div>' | |
assert_equal "<div><span>hi</span> there</div>", div.innerHTML | |
end | |
# => | |
# 1) Failure: | |
# test_ruby:_innerHTML=(ElementTest) [test/rdom/element_test.rb:35]: | |
# <"<div><span>hi</span> there</div>"> expected but was |
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
$ gem install therubyracer | |
Building native extensions. This could take a while... | |
ERROR: Error installing therubyracer: | |
ERROR: Failed to build gem native extension. | |
/Volumes/Users/sven/.rvm/rubies/ruby-1.8.7-p174/bin/ruby extconf.rb | |
Compiling V8 | |
mkdir -p build | |
cp -r scons build | |
mkdir -p build/scons/install |