Skip to content

Instantly share code, notes, and snippets.

Started by user unknown or anonymous hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune -- origin +refs/heads/e2e-tests:refs/remotes/origin/e2e-tests" returned status code 128: stdout: stderr: Load key "/var/lib/jenkins/caches/git-1c9c72e67638797008dc3ca4d7195c83@tmp/jenkins-gitclient-ssh4452361500527433848.key": invalid format [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

@sirramongabriel
sirramongabriel / authentication_spec.
Created January 19, 2020 20:03
Apologies, I haven't cleaned this up after my pair a few min ago.
require "rails_helper"
require "spec_helper"
describe "API authentication" , :type => :request do
let!(:user) { Fabricate(:user) }
context "when faliure" do
it "has missing or invalid credentials" do
post "/api/v1/sessions"#, :format => :json
class ApplicationService
def self.call(*args, &block)
new(*args, &block).call
end
end
PdfManager::MedicalRecordForm::CreatePdf.call(
resident: set_resident,
account: @account,
medical_record_form: @medical_record_form,
medical_record_forms: @medical_record_forms
)
module PdfManager::MedicalRecordForm
class CreatePdf < ApplicationService
def initialize(args)
@pdfs = []
@provider = args[:provider]
@account = args[:account]
@resident = args[:resident]
@medical_record_form = args[:medical_record_form]
@medical_record_forms = args[:medical_record_forms]
end
module PdfManager::MedicalRecordForm
class CreatePdf < ApplicationService
# attrs aren't needed to test
# attr_reader :provider, :account, :resident, :medical_record_form, :medical_record_forms
def initialize(args)
# @pdf = FillablePDF.new('app/pdfs/medication_record_form.pdf')
@pdfs = []
# Not needed in test
# @provider = args[:provider]
# @account = args[:account]
def sample_method
count = 0
med_name_count = 0
given_at_count = 0
# Ignore current_month var as it is for the histogram
# current_month = (Date.current.beginning_of_month..Date.current.end_of_month).to_a
@pdf = FillablePDF.new('app/pdfs/medication_record_form.pdf')
all_meds.each_slice(5) do |page|
page.map do |med|
trial_start_date = current_provider.created_at
if free_trial_completed?(trial_start_date)
current_provider.update(in_free_trial: false)
elsif in_sixty_day_trial?(trial_start_date)
current_provider.update(in_free_trial: true)
elsif in_thirty_day_trial?(trial_start_date)
current_provider.update(in_free_trial: true)
end
@sirramongabriel
sirramongabriel / rubocop.yml
Created September 14, 2019 16:31
The following file doesn't work for me when running rubocop.
require: rubocop-rails
inherit_from:
- http://www.example.com/rubocop.yml
- ../.rubocop.yml
AllCops:
Exclude:
- 'db/**/*'
- 'config/**/*'
/etc/initramfs/post-update.d//zz-kernelstub: line 7: kernelstub: command not found
run-parts: /etc/initramfs/post-update.d//zz-kernelstub exited with return code 127
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic-hwe-18.04:
linux-image-generic-hwe-18.04 depends on linux-firmware; however:
Package linux-firmware is not configured yet.
dpkg: error processing package linux-image-generic-hwe-18.04 (--configure):
dependency problems - leaving unconfigured