Skip to content

Instantly share code, notes, and snippets.

$ jruby -S bundle update
Updating git://github.com/jnicklas/capybara.git
Updating git://github.com/btakita/rr.git
Updating git://github.com/cavalle/steak.git
Fetching source index for http://rubygems.org/
Installing bouncy-castle-java (1.5.0145.2)
Using bundler (1.0.0.rc.4)
Installing celerity (0.8.0.beta.4)
Installing jruby-openssl (0.7.1)
Updating .gem files in vendor/cache
GIT
remote: git://github.com/btakita/rr.git
revision: f3693bd
specs:
rr (0.10.11)
GIT
remote: git://github.com/cavalle/steak.git
revision: 1ef6b30
specs:
$ git status
# On branch master
# Changed but not updated:
# (use "git add/rm <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Gemfile.lock
# deleted: vendor/cache/celerity-0.8.0.beta.3.gem
# deleted: vendor/cache/factory_girl-1.3.1.gem
# deleted: vendor/cache/haml-3.0.15.gem
$ bin/rspec spec
/Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/runtime.rb:27:in `setup': You have already activated json_pure 1.4.3, but your Gemfile requires json_pure 1.4.6. Consider using bundle exec. (Gem::LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/runtime.rb:17:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler.rb:95:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/setup.rb:6
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from bin/rspec:12
$ bundle exec rspec spec
/Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/runtime.rb:27:in `setup': You have already activated json_pure 1.4.3, but your Gemfile requires json_pure 1.4.6. Consider using bundle exec. (Gem::LoadError)
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/spec_set.rb:12:in `each'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/runtime.rb:17:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler.rb:95:in `setup'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/cli.rb:290:in `exec'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/vendor/thor/task.rb:22:in `send'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Library/Ruby/Gems/1.8/gems/bundler-1.0.0.rc.4/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
[["ALLOCA", ""],
["AR", "ar"],
["ARCHFILE", ""],
["ARCH_FLAG", ""],
["AS", "as"],
["ASFLAGS", ""],
["CC", "gcc"],
["CCDLFLAGS", " -fPIC"],
["CFLAGS", "-g -O2 "],
["COMMON_HEADERS", ""],
@wincent
wincent / gist:633716
Created October 19, 2010 06:30
routing_example_group_helpers.rb
module RoutingExampleGroupHelpers
extend ActiveSupport::Concern
extend RSpec::Matchers::DSL
module DestinationParser
def parse_destination destination
string_or_hash, options_hash = destination[0], destination[1]
case string_or_hash
when String
controller, action = string_or_hash.split('#')
@wincent
wincent / gist:633723
Created October 19, 2010 06:36
articles_routing_spec.rb
require 'spec_helper'
describe ArticlesController do
describe 'routing' do
specify { get('/wiki').should have_routing('articles#index') }
specify { get('/wiki/new').should have_routing('articles#new') }
specify { get('/wiki/Rails_3.0_upgrade_notes').should have_routing('articles#show', :id => 'Rails_3.0_upgrade_notes') }
specify { get('/wiki/Rails_3.0_upgrade_notes/edit').should have_routing('articles#edit', :id => 'Rails_3.0_upgrade_notes') }
specify { put('/wiki/Rails_3.0_upgrade_notes').should have_routing('articles#update', :id => 'Rails_3.0_upgrade_notes') }
specify { delete('/wiki/Rails_3.0_upgrade_notes').should have_routing('articles#destroy', :id => 'Rails_3.0_upgrade_notes') }
@wincent
wincent / gist:659344
Created November 2, 2010 07:13
mass_assignment.rb
module RSpec
module Matchers
class AllowMassAssignmentOf # :nodoc:
def initialize hash = nil
raise if hash.nil?
raise unless hash.kind_of? Hash
raise unless hash.length > 0
@attributes = hash
end
diff --git a/src/window.c b/src/window.c
index abd107b..c3936df 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5561,7 +5561,7 @@ win_new_height(wp, height)
win_comp_scroll(wp);
#ifdef FEAT_GUI_MACVIM
/* The view may have moved, so clear all or display may get corrupted. */
- redraw_win_later(wp, CLEAR);
+ redraw_win_later(wp, NOT_VALID);