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
# Gemfile | |
source 'https://rubygems.org' | |
gem 'sinatra' | |
group :test, :development do | |
gem 'rspec' | |
end | |
group :test 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
# app.rb | |
ENV['RACK_ENV'] ||= 'development' | |
require 'bundler' | |
Bundler.require :default, ENV['RACK_ENV'].to_sym | |
require_relative 'helpers' | |
require_relative 'routes/secrets' | |
require_relative 'routes/sessions' |
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
# rakefile | |
require 'rspec/core/rake_task' | |
RSpec::Core::RakeTask.new :specs do |task| | |
task.pattern = Dir['spec/**/*_spec.rb'] | |
end | |
task :default => ['specs'] |
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
# spec/spec_helper.rb | |
ENV['RACK_ENV'] = 'test' | |
require_relative File.join('..', 'app') | |
RSpec.configure do |config| | |
include Rack::Test::Methods | |
def app | |
SimpleApp |
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
# spec/features/root_spec.rb | |
require_relative '../spec_helper' | |
describe 'Root Path' do | |
describe 'GET /' do | |
before { get '/' } | |
it 'is successful' do | |
expect(last_response.status).to eq 200 | |
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
--no-doc | |
--style-measure 80 | |
--abc-max 9 | |
--abc-glob {rakefile,Gemfile,**/*.{rb,rake,example}} | |
--style-glob {rakefile,Gemfile,**/*.{rb,rake,example}} | |
--style-exclude db/schema.rb | |
--style-exclude config/initializers/secret_token.rb | |
--abc-exclude Class#method |
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
cd /path/to/project1 | |
tmux new -s project1 -d | |
tmux split-window -h -p 66 | |
tmux select-pane -t 0 | |
tmux send-keys 'ruby ~/.vim/bundle/vim_test_runner/test_runner' 'C-m' | |
tmux split-window -v -p 25 | |
tmux select-pane -t 2 | |
tmux send-keys 'echo hello me' |
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 TestApp | |
def run | |
puts "foo is correctly 'foo': #{foo.inspect}" | |
unless foo | |
puts 'foo is nil' # This line is never hit, but the next line appears to get executed. | |
foo = nil # Remove this line and it works as expected. | |
end | |
puts "foo is incorrectly nil: #{foo.inspect}" | |
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
#!/usr/bin/env ruby | |
### Bundle env | |
# Bundler 1.6.2 | |
# Ruby 2.1.2 (2014-05-08 patchlevel 95) [x86_64-linux] | |
# Rubygems 2.2.2 | |
# rvm 1.26.10 (latest) | |
# GEM_HOME /home/toadjamb/.rvm/gems/ruby-2.1.2 | |
# GEM_PATH /home/toadjamb/.rvm/gems/ruby-2.1.2:/home/toadjamb/.rvm/gems/ruby-2.1.2@global |
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
#!/bin/sh | |
BRANCH=$(git branch --list master) | |
AUTHOR=$(git config --global user.name) | |
echo --------------------------------------------------------------- | |
echo $AUTHOR | |
echo --------------------------------------------------------------- | |
if [ "$BRANCH" == '* master' ]; then |
OlderNewer