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
| source 'https://rubygems.org' | |
| gem 'rails', '3.2.13' | |
| gem 'ruby_desk' | |
| gem "settingslogic" |
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 ChainMethod | |
| def initialize(method_name, params = [], callbacks = {}) | |
| @method_name = method_name | |
| @params = params.to_a | |
| @callbacks = callbacks | |
| end | |
| def call(base_object) | |
| # calling before_callback if passed | |
| @callbacks[:before_callback].call(@params, base_object) if @callbacks[:before_callback].is_a?(Proc) |
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' | |
| puts 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
| # -*- encoding : utf-8 -*- | |
| require 'spec_helper' | |
| OmniAuth.config.test_mode = true | |
| OmniAuth.config.add_mock(:facebook, {:uid => '123545', | |
| :info => { :email => '[email protected]', | |
| :first_name => "First", | |
| :last_name => "Last"} | |
| }) | |
| OmniAuth.config.add_mock(:vkontakte, {:uid => '123545', |
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 'rubygems' | |
| require 'rspec/core/rake_task' | |
| require 'yard' | |
| desc "Run all examples" | |
| RSpec::Core::RakeTask.new(:spec) do |t| | |
| #t.rspec_path = 'bin/rspec' | |
| t.rspec_opts = %w[--color] | |
| end |
NewerOlder