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 NotifierJob | |
| @queue = :notifications | |
| def self.perform(user) | |
| Notifier.welcome(user).deliver | |
| end | |
| end | |
| Resque.enqueue(NotifierJob, User.last) | 
  
    
      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
    
  
  
    
  | */15 * * * * /bin/bash cd /rails/root/ && rake welcome:users > /dev/null 2>&1 | 
  
    
      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
    
  
  
    
  | #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "highline/import" | |
| interval = ask("What time interval?", Integer) { |q| q.default = 15 } | |
| amount = ask("What is the charge?", Integer) { |q| q.default = 1 } | |
| capacity = ask("What is the capacity?", Integer) { |q| q.default = 15 } | |
| average_hours_per_day = ask("Average number of hours per day?", Integer) { |q| q.default = 7 } | 
  
    
      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 "airplay" | |
| require "open-uri" | |
| require "mechanize" | |
| require "digest/md5" | |
| agent = Mechanize.new | |
| page = agent.get("http://www.path.com/login") | |
| login_form = page.form_with(:action => "/login") | |
| login_form["username_or_email"] = "[email address]" | 
  
    
      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
    
  
  
    
  | Checkout github project | 
  
    
      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 Favorite < ActiveRecord::Base | |
| module HasManyExtension | |
| def videos | |
| proxy_owner.favorites.where(:favorite_type => "Video") | |
| end | |
| end | |
| end | |
| class User < ActiveRecord::Base | |
| has_many :favorites, :extend => Favorite::HasManyExtension | 
  
    
      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 MyExtension | |
| def my_method | |
| end | |
| end | |
| class User | |
| include MyExtension | |
| 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
    
  
  
    
  | <? | |
| class MyClass { | |
| public static $my_value; | |
| } | |
| MyClass::$my_value = "testing"; | |
| echo MyClass::$my_value; | 
  
    
      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 Admin::CoursesController do | |
| let(:admin) { Fabricate(:admin) } | |
| let(:course) { Fabricate(:course) } | |
| before(:each) do | |
| sign_in(admin) | |
| 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
    
  
  
    
  | subject do | |
| Course.create!({:title => 'Test Course', :image => File.open(File.join(Rails.root, 'public', 'images', 'test-image.gif'))}) | |
| end | |
| describe "when an image is attached" do | |
| it "should respond to an image object" do | |
| subject.image.class.should == Paperclip::Attachment | |
| end | |
| it "should have a vaild image that's not missing" do |