gem 'activeadmin', git: 'https://github.com/activeadmin/activeadmin.git'
gem 'devise'
gem 'sass', '~>3.0'
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
| server { | |
| listen 81; | |
| root /home/dmitry/project/public; | |
| location / { | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_redirect off; |
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
| ┌── info ──────────────────────────────┐ | |
| J-_-L │ http://github.com/janlelis/clipboard │ | |
| ├── usage ─────────────────────────────┤ | |
| │ require 'clipboard' │ | |
| │ Clipboard.copy '42' │ | |
| │ Clipboard.paste #=> 42 │ | |
| └──────────────────────────────────────┘ |
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 | |
| validates :username, presence: :true | |
| validates :password_digest, presence: :true | |
| has_secure_password | |
| 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
| /*! normalize.css v3.0.2 | MIT License | git.io/normalize */ | |
| html { | |
| font-family: sans-serif; | |
| -ms-text-size-adjust: 100%; | |
| -webkit-text-size-adjust: 100%; | |
| } | |
| body { | |
| margin: 0; | |
| } |
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 Model < ActiveRecord::Base | |
| def self.search(term) | |
| words = sanitize(term.parameterize(" ").scan(/\w+/) * "+") | |
| where("name @@ to_tsquery('portuguese', #{words})") | |
| end | |
| 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
| require 'rails_helper' | |
| describe BookCreator do | |
| context 'create a book by isbn' do | |
| before do | |
| VCR.use_cassette('search-isbn') do | |
| book | |
| end | |
| 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 ApplicationController < ActionController::Base | |
| protect_from_forgery :with => :exception | |
| helper_method :categories_ordered | |
| def categories_odered | |
| Category.order(:name) | |
| end | |
| 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 HomeController < ApplicationController | |
| def foo | |
| render layout: false | |
| end | |
| 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
| from ruby:2.3.0 | |
| env DEBIAN_FRONTEND noninteractive | |
| run sed -i '/deb-src/d' /etc/apt/sources.list | |
| run apt-get update | |
| run apt-get install -y build-essential postgresql-client nodejs | |
| env PHANTOMJS_VERSION 1.9.8 |