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
upstream zealous-badger { | |
server 127.0.0.1:49224; | |
} | |
server { | |
listen [::]:80; | |
listen 80; | |
server_name zealous-badger.example.com; | |
location / { | |
proxy_pass http://zealous-badger; | |
proxy_http_version 1.1; |
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
content_for :content do | |
main(class: 'main-container', role: 'main') { | |
render 'shared/express_blog/sidebar' | |
div(class: 'content-body') { | |
render 'shared/express_admin/messages' | |
if content_for?(:page_header) | |
div(class: 'page-header') { | |
div(class: 'row') { | |
div(class: 'small-12 columns') { | |
yield :page_header |
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
source 'https://rubygems.org' | |
gem 'rails', '4.1.6' | |
gem 'sqlite3' | |
gem 'sass-rails', '~> 4.0.3' | |
gem 'uglifier', '>= 1.3.0' | |
gem 'coffee-rails', '~> 4.0.0' | |
gem 'jquery-rails' | |
gem 'turbolinks' | |
gem 'jbuilder', '~> 2.0' |
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
curl -H “Content-Type: application/json" \ | |
-d '{"client_id":"a11bbd9c339e6d8bd84368061089971398e23617d88a7c8dd060555b7cff1077","client_secret":"f079dadcca08a26d5967421f3849447e1e4519d6ba33cabdd4bdd0c86aebded3","grant_type":"password","username":"test@example.com","password":"passw0rd"}' / | |
-X POST http://localhost:3000/oauth/token |
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
# in spec/support/omniauth_macros.rb | |
module OmniauthMacros | |
def mock_auth_hash | |
# The mock_auth configuration allows you to set per-provider (or default) | |
# authentication hashes to return during integration testing. | |
OmniAuth.config.mock_auth[:twitter] = { | |
'provider' => 'twitter', | |
'uid' => '123545', | |
'user_info' => { | |
'name' => 'mockuser', |
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
Failures: | |
1) User when email address is already taken | |
Failure/Error: it { should_not be_valid } | |
expected valid? to return false, got true | |
# ./spec/models/user_spec.rb:73:in `block (3 levels) in <top (required)>' |
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
<% if user_signed_in? %> | |
<% if current_user.id == article.author.id %> | |
<%= link_to 'Edit article', edit_article_path(article) %> | |
<% end %> | |
<% end %> |
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
<% if can? :update, article %> | |
<%= link_to 'Edit', edit_article_path(article) %> | |
<% end %> | |
<% if can? :destroy, article %> | |
<%= link_to 'Destroy', article_path(article), :confirm => 'Are you sure?', :method => :delete %> | |
<% end %> |
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
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: projectname_development | |
pool: 5 | |
host: localhost | |
username: username | |
password: password |
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
<!-- | |
Error: Object doesn't support property or method 'attr' | |
--> | |
<div class='popover' id='playlist_menu'> | |
<ul class='toplay' style='overflow:auto'> | |
<li class='playlist_item' data-id='27' data-order='1' id='videos_27'></li> | |
<li class='playlist_item' data-id='1' data-order='2' id='videos_1'></li> | |
<li class='playlist_item' data-id='52' data-order='3' id='videos_52'></li> | |
</ul> |
OlderNewer