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
| expected #<Subscription id: nil, plan_id: 2, user_id: nil, stripe_customer_token: nil, created_at: nil, updated_at: nil, status: nil, canceled_at: nil, period_end_at: nil> | |
| got #<Subscription id: nil, plan_id: 2, user_id: nil, stripe_customer_token: nil, created_at: nil, updated_at: nil, status: nil, canceled_at: nil, period_end_at: nil> |
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 'spec_helper' | |
| describe SubscriptionsController do | |
| context "Actions" do | |
| before do | |
| stub_out_user(controller, @user = Factory.stub(:user)) | |
| @plan = Factory(:plan) | |
| @params = {} | |
| 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
| $ rake -T | |
| (in /Users/apraditya/Work/my_os_projects/rapi_doc) | |
| rake aborted! | |
| uninitialized constant Rake::DSL | |
| /Users/apraditya/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/rake.rb:2482:in `const_missing' | |
| /Users/apraditya/.rvm/gems/ruby-1.9.2-p180@rapidoc/gems/rake-0.9.2.2/lib/rake/tasklib.rb:8:in `<class:TaskLib>' | |
| /Users/apraditya/.rvm/gems/ruby-1.9.2-p180@rapidoc/gems/rake-0.9.2.2/lib/rake/tasklib.rb:6:in `<module:Rake>' | |
| /Users/apraditya/.rvm/gems/ruby-1.9.2-p180@rapidoc/gems/rake-0.9.2.2/lib/rake/tasklib.rb:3:in `<top (required)>' | |
| /Users/apraditya/.rvm/gems/ruby-1.9.2-p180@rapidoc/gems/jeweler-1.6.4/lib/jeweler/tasks.rb:2:in `require' | |
| /Users/apraditya/.rvm/gems/ruby-1.9.2-p180@rapidoc/gems/jeweler-1.6.4/lib/jeweler/tasks.rb:2:in `<top (required)>' |
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 BooksController < ApplicationController | |
| # GET /books | |
| # GET /books.json | |
| #=begin apidoc | |
| #url:: /books | |
| #method:: GET | |
| #access:: FREE | |
| #return:: [JSON|XML] - list of book objects | |
| #param:: page:int - the page, default is 1 | |
| #param:: per_page:int - max items per page, default is 10 |
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
| 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)>' |
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
| 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 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
| 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 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 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 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
| 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 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 '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" |
OlderNewer