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
| web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb | |
| worker: bundle exec sidekiq -C config/sidekiq.yml -v -e $RAILS_ENV | |
| web: ~/Sites/api/bin/rails s |
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 CollapseLabelsJob < ActiveJob::Base | |
| queue_as :default | |
| def perform(tracking_sheet) | |
| pdf_paths, destination = tracking_sheet.pdf_paths, File.join(Rails.root, "tmp/#{SecureRandom.hex}.pdf") | |
| paths = pdf_paths.map{ |i| open(i).path }.join(' ') | |
| options = "-q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite" |
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
| Form | |
| employer:belongs_to | |
| name:string | |
| review_required:boolean | |
| signature_required:boolean | |
| Question (has_many :question_answers; multiple choice; text; multiple answer) | |
| text:text | |
| type:string (MultipleAnswerQuestion, MultipleChoiceQuestion, OpenQuestion) | |
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 Shippo::Address < Shippo::TestBase | |
| @@store = {:test => 'Address'} | |
| cattr_reader :store | |
| 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
| require 'test_helper' | |
| class CreateShippoTransactionJobTest < ActiveJob::TestCase | |
| test "the truth" do | |
| @order = FactoryGirl.create(:order) | |
| assert_enqueued_with(:job => CreateShippoTransactionJob) do | |
| @shipment = @order.create_shipment! |
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 String #:nodoc: | |
| # ================= | |
| # = Class Methods = | |
| # ================= | |
| def self.alphanumeric(length = 6) | |
| (1..length).map{ [(0..9), ('a'..'z'), ('A'..'Z')].map(&:to_a).flatten.sample }.join | |
| 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
| <select | |
| name="coffee" | |
| id="coffee" | |
| class='form-control' | |
| ng-model="subscription.great_coffees[$index]" | |
| ng-options='coffee as coffee.name group by coffee.category_name for coffee in coffees track by coffee.id' | |
| > |
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
| web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb | |
| worker: bundle exec sidekiq -c 15 -v -C .config/sidekiq.yml -e $RAILS_ENV |
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
| <form action="/charge" method="POST"> | |
| <script | |
| src="https://checkout.stripe.com/checkout.js" class="stripe-button" | |
| data-key="pk_test_1xBnoR7Mdwx4E1gD2dcgl8TL" | |
| data-image="https://s3.amazonaws.com/stripe-uploads/acct_14qpC2GuKJ7VdKiHmerchant-icon-1419369420301-10846338_1510038909255594_3532245329824431014_n.jpg" | |
| data-name="Share Coffee" | |
| data-description="2 widgets" | |
| data-amount="2000"> | |
| </script> | |
| <input type='hidden' value='http://example.com/my-custom-url'/> |
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
| Refused to display 'https://www.sharecoffeeroasters.com/facebook/contact/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'. |