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
| developer@comunit:~/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mail-2.6.5$ rdoc --verbose | |
| Parsing sources... | |
| 0% [ 1/150] CHANGELOG.rdoc | |
| 1% [ 2/150] CONTRIBUTING.md | |
| 2% [ 3/150] Dependencies.txt | |
| 2% [ 4/150] Gemfile | |
| 3% [ 5/150] MIT-LICENSE | |
| 4% [ 6/150] README.md | |
| 4% [ 7/150] Rakefile | |
| 5% [ 8/150] TODO.rdoc |
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
| --database=postgresql --skip-test --skip-turbolinks |
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
| input[type=text] { | |
| background: #fff image_url('comunit/base/icons/search.svg') no-repeat center right / 2.4rem 2.4rem; | |
| border-radius: 1.4rem; | |
| box-sizing: border-box; | |
| box-shadow: 0 0 .5rem .5rem rgba(255, 255, 255, .5); | |
| display: inline-block; | |
| font-size: $normal_font_size; | |
| height: 2.8rem; | |
| line-height: 2.4rem; | |
| margin: 0 .4rem; |
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 Comment do | |
| let(:comment) { build(:comment) } | |
| let(:user) { create(:user) } | |
| let(:dream) { create(:dream) } | |
| context "integrity" do | |
| it "has non-blank body" do | |
| comment.body = ' ' |
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
| # controller | |
| class UsersController < ApplicationController | |
| def send_recovery | |
| user = User.where(email: params[:email].to_s.downcase).first | |
| if user.nil? | |
| flash[:message] = t('email_not_found') | |
| redirect_to recover_form_users_path | |
| else | |
| send_recovery_code user | |
| redirect_to recover_users_path |
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 'mina/bundler' | |
| require 'mina/rails' | |
| require 'mina/git' | |
| require 'mina/rbenv' | |
| # Basic settings: | |
| # domain - The hostname to SSH to. | |
| # deploy_to - Path to deploy into. | |
| # repository - Git repo to clone from. (needed by mina/git) | |
| # branch - Branch name to deploy. (needed by mina/git) |
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
| upstream site { | |
| server unix:///var/www/example.com/shared/tmp/puma.sock; | |
| } | |
| server { | |
| listen 80; | |
| server_name example.com www.example.com; | |
| root /var/www/example.com/current/public; | |
| access_log /var/log/nginx/example.com/access.log main; | |
| error_log /var/log/nginx/example.com/error.log info; |
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 'pathname' | |
| environment 'production' | |
| app_root = Pathname.new('../../../../current').expand_path(__FILE__) | |
| tmp_dir = app_root.join('tmp') | |
| pids_dir = tmp_dir.join('pids') | |
| logs_dir = app_root.join('log') | |
| pidfile pids_dir.join('puma.pid').to_s |
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
| <?php | |
| $tick = function($name) { error_log($name . ': ' . (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT'])); } | |
| foo(); | |
| $tick('foo'); | |
| bar(); | |
| $tick('bar'); | |
| baz(); |
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
| <?php | |
| class Car | |
| { | |
| protected $power; | |
| protected $doors; | |
| public static function factory($type, Engine $engine, Transmission $transmission) | |
| { | |
| $instance = null; | |
| switch ($type) { |