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
| var disableTouchMove = function(evt) { | |
| evt.preventDefault(); | |
| ); | |
| document.body.addEventListener('touchmove', disableTouchMove); | |
| document.body.style.top = '-' + window.scrollY + 'px'; |
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
| 0xeFE8E473c06FE6bB297534048b0B8167040162dd |
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
| module Spree | |
| class Gateway::NewGateway < Gateway | |
| preference :login, :string | |
| preference :password, :string | |
| preference :signature, :string | |
| preference :currency_code, :string | |
| def provider_class | |
| ActiveMerchant::Billing::New | |
| 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
| def wait_for_ajax | |
| return unless respond_to?(:evaluate_script) | |
| wait_until { finished_all_ajax_requests? } | |
| end | |
| def finished_all_ajax_requests? | |
| evaluate_script("!window.jQuery") || evaluate_script("jQuery.active").zero? | |
| end | |
| def wait_until(max_execution_time_in_seconds = Capybara.default_wait_time) |
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
| stage: | |
| before: | |
| - apt-get install -y zip unzip | |
| - export REDIS_URL=redis://localhost:6379/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
| inherit_from: .rubocop_todo.yml | |
| AllCops: | |
| RunRailsCops: true | |
| Exclude: | |
| - bin/* | |
| - config/**/* | |
| - db/**/* | |
| - Gemfile |
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
| rvm: | |
| - 2.1.3 | |
| env: | |
| global: | |
| - DATABASE_URL=postgres://postgres@localhost/app | |
| matrix: | |
| - BUILD_CMD='rspec' | |
| - BUILD_CMD='rake assets:precompile RAILS_ENV=production' | |
| - BUILD_CMD='rake db:setup RAILS_ENV=development' |
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 Seed | |
| @ids = {} | |
| @classes = {} | |
| def self.create(factory_name, attributes = nil) | |
| raise "attributes must be a hash" if attributes && !attributes.is_a?(Hash) | |
| model = FactoryGirl.create(factory_name, attributes) | |
| @ids[factory_name] = model.id | |
| @classes[factory_name] = model.class |
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
| config.before(:suite) do | |
| $factory_girl_results = {} | |
| $factory_girl_total_times = {} | |
| $factory_girl_total_time = 0 | |
| ActiveSupport::Notifications.subscribe("factory_girl.run_factory") do |name, start, finish, id, payload| | |
| factory_name = payload[:name] | |
| strategy_name = payload[:strategy] | |
| $factory_girl_results[factory_name] ||= {} | |
| $factory_girl_results[factory_name][strategy_name] ||= 0 | |
| $factory_girl_results[factory_name][strategy_name] += 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
| set :deploy_lock_file, "#{shared_path}/tmp/deploing_lock_file" | |
| namespace :deploy do | |
| desc "Check if somebody already is deploing" | |
| task :check_lock do | |
| result = capture("if [ -f #{deploy_lock_file} ]; then cat #{deploy_lock_file}; else echo '0'; fi").strip | |
| if result != '0' | |
| run "echo '#{result} already deploing' 1>&2" | |
| exit |
NewerOlder