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 'minitest/mock' | |
| require 'minitest/unit' | |
| require 'date' | |
| MiniTest::Unit.autorun | |
| class TestMailPurge < MiniTest::Unit::TestCase | |
| class MailPurge | |
| def initialize(imap) | |
| @imap = imap |
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 Agent < ActiveRecord::Base | |
| validates :first_name, :last_name, :email, presence: true | |
| validates :email, uniqueness: true | |
| has_many :missions | |
| scope :on_assignment, -> { Agent.joins(:missions).where(missions: { status: 'active' }) } | |
| scope :not_on_assignment, -> { where.not(id: Agent.on_assignment.pluck(:id)) } | |
| def name | |
| "#{first_name} #{last_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
| Capybara.app_host = "http://localhost:3001" | |
| Capybara.run_server = false |
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
| # A simple plugin for Jekyll that allows you to use {% url "alt text" %} to add images to your posts. | |
| # It will automatically check those images for width and height. | |
| # | |
| # Requires http://imagesize.rubyforge.org/ | |
| require 'image_size' | |
| require 'open-uri' | |
| module Jekyll |
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 'thread' | |
| class AsyncConsole | |
| # | |
| # Creates a new Asynchronous Console, within the given context. | |
| # | |
| # @param [Module] context | |
| # The context to evaluate code within. | |
| # |
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
| *.gem | |
| *.rbc | |
| /.config | |
| /coverage/ | |
| /InstalledFiles | |
| /pkg/ | |
| /spec/reports/ | |
| /spec/examples.txt | |
| /test/tmp/ | |
| /test/version_tmp/ |
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 :rubygems | |
| gem "puma" | |
| gem "sinatra" |
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
| # in /etc/systemd/system | |
| [Unit] | |
| Description=Bluetooth Agent | |
| [Service] | |
| ExecStart=/usr/bin/bt-agent -c NoInputNoOutput | |
| Type=simple | |
| [Install] | |
| WantedBy=multi-user.target |
