View Gemfile
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 "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
ruby file: ".ruby-version" | |
gem "bootsnap", require: false | |
gem "faraday" | |
gem "faulty" | |
gem "puma", "~> 6.0" | |
gem "rack", "< 3" # Capybara emits warnings on rack 3 |
View Gemfile
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
group :test do | |
gem "minitest" | |
gem "vcr" | |
gem "webmock", "~> 1.15.0" | |
end |
View application.html.erb
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
<%= render("shared/navbar") %> | |
<div class="container"> | |
<%= render("shared/alerts") %> | |
<%= render("shared/page_header") %> | |
<%= yield %> | |
<%= render("shared/footer") %> |
View compress_requests.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
class CompressedRequests | |
def initialize(app) | |
@app = app | |
end | |
def method_handled?(env) | |
!!(env['REQUEST_METHOD'] =~ /(POST|PUT)/) | |
end | |
def encoding_handled?(env) |
View gist:5882055
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
~$ which ruby | |
/Users/mbrictson/.rbenv/shims/ruby | |
~$ gem env | |
RubyGems Environment: | |
- RUBYGEMS VERSION: 2.0.3 | |
- RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.4.0] | |
- INSTALLATION DIRECTORY: /Users/mbrictson/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0 | |
- RUBY EXECUTABLE: /Users/mbrictson/.rbenv/versions/2.0.0-p247/bin/ruby | |
- EXECUTABLE DIRECTORY: /Users/mbrictson/.rbenv/versions/2.0.0-p247/bin | |
- RUBYGEMS PLATFORMS: |
View Gemfile
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 'database_cleaner', group: :test |
View Gemfile
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
group :assets do | |
gem 'compass-rails','~> 1.0.0.rc.2' | |
gem 'compass-colors' | |
gem 'sassy-buttons' | |
gem 'sass-rails', '~> 3.2.3' | |
# non-compass gems omitted for brevity | |
end |
View gist:1679652
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
public class MyApplication extends WebApplication | |
{ | |
@Override | |
protected void init() | |
{ | |
super.init(); | |
// Enable CDN when in deployment mode | |
if(usesDeploymentConfig()) | |
{ | |
new SimpleCDN("//age39p8hg23.cloudfront.net").install(this); |
View connection.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
# Define a simple class with a DEBUG constant | |
# | |
Connection = Struct.new(:name, :state) do | |
DEBUG = false | |
def self.debug? | |
DEBUG | |
end | |
end | |
# A quick sanity check |
View gist:1566248
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
# Vendorfile for use with vendorer command. https://github.com/grosser/vendorer | |
# Run `vendorer` to install jQuery and jQuery UI dependencies into vendor/assets/javascripts. | |
JQUERY_VER = "1.7.1" | |
JQUERY_UI_VER = "1.8.16" | |
# Helper methods to extend vendorer functionality # | |
################################################### |
NewerOlder