This file contains 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
#!/usr/bin/env ruby | |
outdated_gems = ARGF.read | |
hash = { major: [], minor: [], patch: [] } | |
group_hash = {} | |
outdated_gems.split("\r").each do |line| | |
line.delete!("\n") | |
gem_name, installed, newest, _requested, group_name = line.split(/\s{2,}/) | |
if gem_name.nil? || gem_name == 'Gem' || newest.nil? || newest.scan(/\./).empty? |
This file contains 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
{ | |
"app/lib/publishers/*.rb": { | |
"command": "publisher", | |
"template": "class %S\nend" | |
}, | |
"app/lib/listeners/*.rb": { | |
"command": "listener", | |
"template": "class %S\nend" | |
}, | |
"app/resources/*_resource.rb": { |
This file contains 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
// app/assets/stylesheets/components.css.scss | |
label.label-block { | |
display: block; | |
} | |
.checkboxes_in_column { | |
@extend .row; | |
span.checkbox { |
This file contains 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 'open-uri' | |
require 'json' | |
app_id = 'YOUR_FACEBOOK_APP_ID' | |
app_secret = 'YOUR_FACEBOOK_APP_SECRET' | |
full_name = 'John Smith' | |
token_request_url = "https://graph.facebook.com/oauth/access_token?client_id=#{app_id}" | |
token_request_url += "&client_secret=#{app_secret}&grant_type=client_credentials" |
This file contains 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 OpengraphMethods | |
def og_site_name | |
"the site name" | |
end | |
#def og_title | |
# opengraph_from_method [:title, :full_name], use_postfix: true | |
#end | |
def og_description |
This file contains 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 User < ActiveRecord::Base | |
include OpengraphMethods | |
def opengraph_title | |
opengraph_site_name # doesn't create the meta entry | |
# These don't create as well | |
send(:opengraph_site_name) | |
send(:opengraph_site_name).to_s | |
'this one works' |
This file contains 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
GIT | |
remote: git://github.com/radar/forem.git | |
revision: 515839e73bccbcb2f228e23082538bc86e7114fc | |
ref: 515839e73b | |
specs: | |
forem (1.0.0.beta1) | |
cancan | |
forem-redcarpet (= 1.0.0) | |
rails (~> 3.1) | |
simple_form |
This file contains 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
Factory.define :user do |u| | |
u.password 'password' | |
u.password_confirmation { |u| u.password } | |
u.confirmation_sent_at Time.new | |
u.confirmed_at Time.new | |
u.location 'US' | |
end | |
Factory.define :admin, :parent => :user do |admin| | |
admin.sequence(:name) { |n| "Admin #{n}" } |
This file contains 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
Failure/Error: @rateable_object = Fabricate :script | |
AWS::S3::Errors::AccessDenied: | |
Access Denied | |
# (eval):3:in `create_bucket' | |
# ./spec/models/user_spec.rb:140:in `block (5 levels) in <top (required)>' |
NewerOlder