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/rspec-mode.el b/rspec-mode.el | |
index 22caf94..57fe566 100644 | |
--- a/rspec-mode.el | |
+++ b/rspec-mode.el | |
@@ -356,7 +356,10 @@ | |
(if rspec-use-rvm | |
(rvm-activate-corresponding-ruby)) | |
(rspec-register-verify-redo (cons 'rspec-run opts)) | |
- (compile (mapconcat 'identity (list (rspec-runner) (rspec-spec-directory (rspec-project-root)) (rspec-runner-options opts)) " ")) | |
+ (let ((curdir (file-name-as-directory default-directory))) |
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
# load libraries | |
def load_gem(gem_name, gem_require=nil, &block) | |
gem_require = gem_require || gem_name | |
begin | |
if unbundled_require(gem_name, gem_require) | |
yield if block_given? | |
end | |
rescue Exception => e | |
warn "Couldn't load #{gem_name}: #{e}" | |
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
# A sample Guardfile | |
# More info at https://github.com/guard/guard#readme | |
group :interactive do | |
guard 'spork', :rspec_env => {'RAILS_ENV' => 'test'}, :wait => 50 do | |
watch('config/application.rb') | |
watch('config/environment.rb') | |
watch(%r{^config/environments/.+\.rb$}) | |
watch(%r{^config/initializers/.+\.rb$}) |
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
require 'rubygems' | |
require 'spork' | |
#GC.disable | |
Spork.prefork do | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' |
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 rake | |
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
if Rails.env.development? || Rails.env.test? | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new(:spec) | |
namespace :spec do |
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
(def input-map { "q" "quit" | |
"tweet" "tweeting" | |
"dm" "direct messaging" | |
"help" "helping" }) | |
(defn process_input [input] | |
(when-let [value (input-map input)] | |
print value)) |
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 BmodelGenerator < Rails::Generators::NamedBase | |
source_root File.expand_path('../templates', __FILE__) | |
argument :url, type: :string, default: 'url-goes-here' | |
def generate_view | |
template "model.js.erb", File.join('app', 'assets', 'javascripts', 'models', "#{file_name}.js") | |
%x{echo //= require models/#{file_name} | pbcopy} | |
%x{#{ENV['EDITOR']} #{File.join('app', 'assets', 'javascripts', 'application.js')}} | |
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
(function() { | |
// Underscore methods that we want to implement on Array. | |
var methods = [ | |
'all', | |
'any', | |
'compact', | |
'contains', | |
'countBy', | |
'detect', | |
'difference', |
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
App.Models.BaseModel = Backbone.Model.extend({ | |
preParse: function(data){}, | |
constructor: function(attributes, options){ | |
options = options || {}; | |
options.parse = true; | |
Backbone.Model.call(this, attributes, options); | |
}, |
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
App.Views.MyView = Backbone.View.extend({ | |
initialize: function() { | |
_.bindAll(this); //Ignore this for now =) | |
this.template = JST['path/to/template']; | |
this.render(); | |
}, | |
render: function() { | |
this.$el.html(this.template({ | |
collection: this.collection |
OlderNewer