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
| port = Number(process.env.VMC_APP_PORT || process.env.C9_PORT || process.env.PORT || 5000) | |
| zappa = require('zappa') | |
| zappa port, -> | |
| publicDir = __dirname + '/public' | |
| use 'logger', 'bodyParser', 'methodOverride', app.router | |
| use express.compiler(src: publicDir, enable: ['sass', 'coffeescript']) | |
| use 'static' |
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
| ENV["RAILS_ENV"] = "test" | |
| require File.expand_path('../../config/environment', __FILE__) | |
| require 'rails/test_help' | |
| class ActiveSupport::TestCase | |
| # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. | |
| # | |
| # Note: You'll currently still have to declare fixtures explicitly in integration tests | |
| # -- they do not yet inherit this setting | |
| fixtures :all |
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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.1' | |
| # Bundle edge Rails instead: | |
| # gem 'rails', :git => 'git://github.com/rails/rails.git' | |
| gem 'pg' | |
| gem 'devise' | |
| gem 'awesome_print' |
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
| require 'spec_helper' | |
| # For use alongside Jasminerice | |
| # Requirements: Capybara, Underscorejs | |
| # Remember this is a request spec, so place in spec/requests/ or | |
| # tag scenario with request: tue. | |
| feature "JasmineSpecs" do | |
| scenario "should all pass", js: true do | |
| visit "/jasmine" |
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
| knife ec2 server create -Z us-east-1a -S saucelabs --template-file bootstrap/ubuntu10.10-ruby193p125.erb -G sauce-labs -x ubuntu -I ami-1933fe70 -f m1.small -r "role[base],role[production],role[gotime]" -E production-legacy -T "Name=Sauce Labs Test Worker" |
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
| # Run me with: | |
| # | |
| # $ nginx -p /path/to/this/file/ -c nginx.conf | |
| # | |
| # All requests are then routed to authenticated user's index, so | |
| # | |
| # GET http://user:password@localhost:8080/_search?q=* | |
| # | |
| # is rewritten to: | |
| # |
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
| require 'webmock/rspec' | |
| module FakeSpecHelpers | |
| def servers_return_healthy | |
| puts "WARNING: Stubbing out healthy servers in an integration run" if ENV["INTEGRATION"] == "true" | |
| WebMock.stub_request(:any, /.*api.parse.com\/.*/).to_rack(FakeParse) | |
| WebMock.stub_request(:any, /.*semaphoreapp.com\/.*/).to_rack(FakeSemaphore) | |
| WebMock.stub_request(:any, /.*api.pusherapp.com\/.*/).to_rack(FakePusher) | |
| 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
| @import "bootstrap-tokenfield/dist/css/bootstrap-tokenfield"; | |
| @import "bootstrap-tokenfield/dist/css/tokenfield-typeahead"; | |
| @import "typeahead-overrides"; |
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 EagerPagination < SimpleDelegator | |
| attr_reader :records, :scope | |
| def initialize(records, scope) | |
| super(records) | |
| @records = records | |
| @scope = scope | |
| end | |
| def each |
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
| # Monads! | |
| class SearchBuilder | |
| class << self | |
| def filter(filters) | |
| new.filter(filters) | |
| end | |
| def match(fields, query, options = {}) | |
| new.match(fields, query, options) | |
| end |
OlderNewer