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 'active_support/concern' | |
| module CrossDomainHelper | |
| extend ActiveSupport::Concern | |
| included do | |
| after_filter :cors_set_access_control_headers | |
| def cors_preflight_check | |
| #Short circuit API request and allow | |
| # TODO : Set explicitly allowed routes |
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
| 5000 |
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
| Selenium::WebDriver::Element.class_eval do | |
| def click_with_scroll | |
| point = bridge.getElementLocationOnceScrolledIntoView @id | |
| bridge.executeScript("window.scrollTo(0, #{point[:y]})") | |
| click_without_scroll | |
| end | |
| alias_method_chain :click, :scroll | |
| 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
| class Model < ActiveRecord::Base | |
| include RedisCache | |
| redis_cache :key_attribute => :name | |
| 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
| begin | |
| require 'rspec/core' | |
| require 'rspec/core/rake_task' | |
| #Divide & Conquer spec suite | |
| #Each of these divisions should be represented by their own rspec rake task | |
| DIVIDED_SPEC_RUNS = [ 'spec/controllers/', 'spec/models/', 'spec/middleware' ] | |
| DIVIDED_REQUEST_RUNS = [ 'spec/requests/major_chunk_1/', 'spec/requests/major_chunk_2/', 'spec/requests/major_chunk_3/' ] | |
| DIVIDED_TESTS = DIVIDED_SPEC_RUNS + DIVIDED_REQUEST_RUNS |
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
| [user] | |
| name = Tom Meier | |
| email = [email protected] | |
| [alias] | |
| st = status | |
| ci = commit | |
| br = branch | |
| co = checkout | |
| df = diff | |
| lg = log -p |
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
| File to import not found or unreadable:skin/icons/*.png. Load paths: Sass::Rails::Importer(/data/releases/20120423050001/app/assets/stylesheets/search.css.sass) /data/shared/bundled_gems/ruby/1.9.1/gems/compass-0.12.1/frameworks/compass/stylesheets /data/shared/bundled_gems/ruby/1.9.1/gems/compass-0.12.1/frameworks/blueprint/stylesheets (in /data/releases/20120423050001/app/assets/stylesheets/search.css.sass) | |
| app/assets/stylesheets/skin/common/constants.css.sass:4 | |
| app/assets/stylesheets/search.css.sass:3 | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/import_node.rb:64:in `rescue in import' | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/import_node.rb:42:in `import' | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/import_node.rb:25:in `imported_file' | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/visitors/perform.rb:149:in `rescue in visit_import' | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/visitors/perform.rb:154:in `visit_import' | |
| [GEM_ROOT]/gems/sass-3.1.15/lib/sass/tree/visitors/base.rb:37:in `visit' |
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
| (function($) { | |
| window.Album = Backbone.Model.extend({ | |
| isFirstTrack: function(index) { | |
| return index == 0; | |
| }, | |
| isLastTrack: function(index) { | |
| return index >= this.get('tracks').length - 1; | |
| } | |
| }); |
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
| use_vcr_cassette 'some/cassette', :tag => :bad_staging_api |
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
| c.after_http_request(lambda { VCR.current_cassette && VCR.current_cassette.tags.include?(:bad_staging_api) }) do |req, res| | |
| puts "OVERWRITING WILDCARDS" | |
| res.body.gsub!('<TOTAL_RATE>', "836.00") | |
| puts res.body | |
| end |