This file contains hidden or 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
doug@apollo: ~/code/2013/books/ruby-science (master) | |
$ git pull | |
remote: Counting objects: 9, done. | |
remote: Compressing objects: 100% (2/2), done. | |
remote: Total 5 (delta 3), reused 5 (delta 3) | |
Unpacking objects: 100% (5/5), done. | |
From https://github.com/thoughtbot/ruby-science | |
6a66cc9..4b2d9e2 hw-tell-dont-ask -> origin/hw-tell-dont-ask | |
Already up-to-date. | |
doug@apollo: ~/code/2013/books/ruby-science (master) |
This file contains hidden or 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
doug@apollo: ~/code/2012/books/ruby-science (master) | |
$ git pull | |
remote: Counting objects: 731, done. | |
remote: Compressing objects: 100% (424/424), done. | |
remote: Total 610 (delta 379), reused 389 (delta 175) | |
Receiving objects: 100% (610/610), 2.94 MiB | 1.25 MiB/s, done. | |
Resolving deltas: 100% (379/379), completed with 77 local objects. | |
From https://github.com/thoughtbot/ruby-science | |
c43b2c1..6a66cc9 master -> origin/master | |
+ 4e55f10...7070c40 dc-introduction-edits -> origin/dc-introduction-edits (forced update) |
This file contains hidden or 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
guard 'rspec', :version => 2 do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } | |
watch('spec/spec_helper.rb') { "spec" } | |
# Rails example | |
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } | |
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" } | |
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] } | |
watch(%r{^spec/support/(.+)\.rb$}) { "spec" } |
This file contains hidden or 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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains hidden or 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 BootstrapFormBuilder < ActionView::Helpers::FormBuilder | |
def get_error_text(object, field, options) | |
if object.nil? || options[:hide_errors] | |
"" | |
else | |
errors = object.errors[field.to_sym] | |
if errors.empty? then "" else errors.first end | |
end | |
end |
This file contains hidden or 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
Then /^(?:|I )should see "([^\"]*)"(?: within "([^\"]*)")?$/ do |text, selector| | |
with_scope(selector) do | |
if defined?(Spec::Rails::Matchers) | |
page.should have_xpath("//*[text()='#{text}']", :visible => true) | |
else | |
assert page.has_xpath("//*[text()='#{text}']", :visible => true) | |
end | |
end | |
end |
This file contains hidden or 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
# Forked to get it working with Rails 3 and RSpec 2 | |
# Updated to aggregate Cucumber and rspec correctly | |
# Updated to not fail in production when Cucumber, rspec aren't available | |
# | |
# From http://github.com/jaymcgavren | |
# | |
# Save this as rcov.rake in lib/tasks and use rcov:all => | |
# to get accurate spec/feature coverage data | |
# | |
# Use rcov:rspec or rcov:cucumber |
This file contains hidden or 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
doug@zeus ~/code/templates/spikes | |
$ rails new newbie -m ../greendog99/template.rb | |
create | |
create README | |
create Rakefile | |
create config.ru | |
create .gitignore | |
create Gemfile | |
create app | |
create app/controllers/application_controller.rb |
This file contains hidden or 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
doug@zeus ~/code/spikes/vern | |
$ rails g clearance:install | |
identical config/initializers/clearance.rb | |
insert app/controllers/application_controller.rb | |
insert app/models/user.rb | |
identical spec/factories/clearance.rb | |
******************************************************************************* | |
Next steps: |
This file contains hidden or 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
some errors are ...[BUG] Segmentation fault, | |
$ script/console | |
Loading development environment (Rails 2.3.4) | |
~> Console extensions: wirble hirb ap rails2 rails3 pm interactive_editor | |
/Users/doug/code/work/brash/web/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
/Users/doug/code/work/brash/web/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb:73: [BUG] Segmentation fault | |
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.6.0] |