Skip to content

Instantly share code, notes, and snippets.

View jathayde's full-sized avatar
🚜

John Athayde jathayde

🚜
View GitHub Profile
@jathayde
jathayde / Gemfile
Created April 10, 2014 18:44
SUSY 2 with Rails 3.2.x
#
# This uses Ruby 2.x and Rails 3.2.16
group :assets do
gem "sass", "~> 3.3.2"
gem 'sass-rails', '~> 3.2.6'
gem 'autoprefixer-rails', '~>1.0'
gem 'coffee-rails', '~> 3.2.1'
gem 'compass', '1.0.0.alpha.18'
gem 'compass-rails', '~> 1.1.3'
@jathayde
jathayde / gist:11222235
Created April 23, 2014 16:24
keybase.md
### Keybase proof
I hereby claim:
* I am boboroshi on github.
* I am johnathayde (https://keybase.io/johnathayde) on keybase.
* I have a public key whose fingerprint is E9C8 C72A DF6A C118 850C 8622 C966 6A6E 5075 F63F
To claim this, I am signing this object:
def legend_html
if render_label?
template.content_tag(:legend, label_text)
else
"".html_safe
end
end
@jathayde
jathayde / _mixin_verticalLoop.scss
Created July 13, 2016 13:29
A SCSS loop to combine verticals (product offerings) with icons and color backgrounds.
@mixin verticalLoop($vertical) {
$vertical-image-path: "#{$image-path-content}/icons/verticals/";
@each $color in color-black, color-white, color-honeycomb, color-clementine,
color-slushie, color-frosting, color-aloe, color-berry, color-wasabi,
color-grape, color-spice, color-wine, color-whale, color-honeycombLight,
color-clementineLight, color-slushieLight, color-frostingLight,
color-teaLight, color-berryLight, color-grapeLight, color-grayLightest,
color-grayLighter, color-grayLight, color-gray, color-grayDark,
color-grayDarker, color-grayDarkest {
&.vertical-icon {

Keybase proof

I hereby claim:

  • I am boboroshi on github.
  • I am johnathayde (https://keybase.io/johnathayde) on keybase.
  • I have a public key ASCJYNTZ9-UO2E4bjd2qMlEegaVqSTtq9fyyDnQbXAXPBAo

To claim this, I am signing this object:

@jathayde
jathayde / Rspec output
Created October 12, 2017 19:09
Rspec error on issue
Failures:
1) Issue#ordered_issues issue_type abbreviation sorts in A, B, C order, then numerics ascending
Failure/Error: self.combined = "#{issue_type.abbreviation}#{issue_number}#{variety}"
NoMethodError:
undefined method `abbreviation' for nil:NilClass
# ./app/models/issue.rb:126:in `set_combined'
# ./spec/models/issue_spec.rb:109:in `block (4 levels) in <top (required)>'
# -e:1:in `<main>'
FactoryGirl.define do
factory :issue do
association :issueable, factory: :lodge
issue_number { Faker::Number.number(2) }
quantity_issued { Faker::Number.number(2) }
description 'Test description for test issue'
oa_bb_category_id '1'
category_id '1'
issue_type_id '1'
border_color_id '1'
FactoryGirl.define do
factory :issue do
before(:each) do
@lodge_issue = FactoryGirl.create(:lodge_issue)
@issue = @lodge_issue.issue
end
transient do
combined_value nil
<% if user_signed_in? %>
<div id="follow_lodge">
<!-- does not work when uncommented, renders code as text inline -->
<%#= render 'follows_lodges/create.js' %>
<!-- does work, but then fails on url gen, which is seperate issue -->
<%= render partial: 'shared/follow_lodge', locals: {@issueable => @followable} %>
</div>
<% end %>
(0.2ms) BEGIN
(0.1ms) COMMIT
(0.1ms) BEGIN
(0.2ms) SAVEPOINT active_record_1
User Exists (1.9ms) SELECT 1 AS one FROM "users" WHERE ("users"."id" IS NOT NULL) AND "users"."slug" = $1 LIMIT $2 [["slug", "jessika-mcglynn"], ["LIMIT", 1]]
User Exists (1.8ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "[email protected]"], ["LIMIT", 1]]
User Exists (1.0ms) SELECT 1 AS one FROM "users" WHERE "users"."username" = $1 LIMIT $2 [["username", "Jessika McGlynn"], ["LIMIT", 1]]
User Exists (0.6ms) SELECT 1 AS one FROM "users" WHERE "users"."email" = $1 LIMIT $2 [["email", "[email protected]"], ["LIMIT", 1]]
SQL (0.9ms) INSERT INTO "users" ("email", "encrypted_password", "created_at", "updated_at", "username", "firstname", "lastname", "slug", "roles_mask") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9) RETURNING "id" [["email", "[email protected]"], ["encrypted_password", "$2a$04$CZcmrXODtPxTI47klkAVweVdm1FDjI8fMqzXqObWeEg45O9.BM1E6"], ["created_at", "2018