1
0
Fork 0
This commit is contained in:
Gregory Eremin 2013-07-19 19:55:44 +07:00
parent 7c52436ae0
commit 7c3cbe867f
13 changed files with 45 additions and 23 deletions

3
README.md Normal file
View File

@ -0,0 +1,3 @@
## Paste Kitten
:heart: :heart: :heart:

View File

@ -1,4 +1,4 @@
APP_FILE = 'pastemaster.rb'
APP_CLASS = 'Pastemaster'
APP_FILE = 'pastekitten.rb'
APP_CLASS = 'Pastekitten'
require 'sinatra/assetpack/rake'

View File

@ -30,6 +30,19 @@ h1
text-transform uppercase
color #ccc
&:before
display block
content ''
background url(../img/kitten_70.png)
width 43px
height 35px
background-size 43px 35px
background-position top left
background-repeat no-repeat
margin -10px 0 0 5px
float right
opacity .5
.linenos
padding-right .5em
color #ccc

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -1,14 +1,19 @@
doctype html
html
head
title Pastemaster
title Paste Kitten
link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"
== css :application
body
a href="/"
h1
strong Paste
| master
| Kitten
/!
Kitten image author is SkyProductions
http://skyproductions.deviantart.com/art/Kitten-line-art-252996232
.container== yield
script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"
== js :application

View File

@ -17,4 +17,4 @@ html
| color: #444444;
| }
body
| 403 Forbidden
| 403 Purrbidden

View File

@ -1,3 +1,3 @@
require File.expand_path('../pastemaster', __FILE__)
require File.expand_path('../pastekitten', __FILE__)
run Pastemaster.new
run Pastekitten.new

View File

@ -4,8 +4,8 @@ require 'mina/rbenv'
set :user, 'www'
set :domain, '5.9.98.165'
set :deploy_to, '/home/www/apps/pastemaster'
set :repository, 'git@github.com:localhots/pastemaster.git'
set :deploy_to, '/home/www/apps/pastekitten'
set :repository, 'git@github.com:localhots/pastekitten.git'
set :branch, 'master'
set :rbenv_path, '/usr/local/rbenv'
set :app_path, ->{ "#{deploy_to}/#{current_path}" }
@ -55,7 +55,7 @@ namespace :assetpack do
end
namespace :unicorn do
set :unicorn_pid, "/tmp/pastemaster.unicorn.pid"
set :unicorn_pid, "/tmp/pastekitten.unicorn.pid"
desc "Start unicorn"
task :start => :environment do

View File

@ -1,6 +1,6 @@
protocol: postgres
username: pastemaster
password: pastemaster
username: pastekitten
password: pastekitten
host: localhost
port: 5432
database: pastemaster
database: pastekitten

View File

@ -1,11 +1,11 @@
upstream pastemaster_unicorns {
server unix:/tmp/pastemaster.unicorn.sock fail_timeout=0;
upstream pastekitten_unicorns {
server unix:/tmp/pastekitten.unicorn.sock fail_timeout=0;
}
server {
listen pm.localhots.xxx:80;
server_name pm.localhots.xxx;
root /home/www/apps/pastemaster/current;
root /home/www/apps/pastekitten/current;
client_max_body_size 10M;
keepalive_timeout 5;
@ -22,6 +22,6 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://pastemaster_unicorns;
proxy_pass http://pastekitten_unicorns;
}
}

View File

@ -1,9 +1,9 @@
working_directory '/home/www/apps/pastemaster/current'
working_directory '/home/www/apps/pastekitten/current'
worker_processes 2
timeout 10
listen '/tmp/pastemaster.unicorn.sock', backlog: 64
pid '/tmp/pastemaster.unicorn.pid'
listen '/tmp/pastekitten.unicorn.sock', backlog: 64
pid '/tmp/pastekitten.unicorn.pid'
stderr_path '/dev/null'
stdout_path '/dev/null'

View File

@ -21,7 +21,7 @@ require 'config/initializers/configuration'
require 'config/initializers/database'
require 'lib/error_pages'
class Pastemaster < Sinatra::Application
class Pastekitten < Sinatra::Application
set :root, File.dirname(__FILE__)
set :server, 'unicorn'
set :public_folder, 'public'
@ -35,14 +35,15 @@ class Pastemaster < Sinatra::Application
assets do
serve '/assets/js', from: 'app/assets/js'
serve '/assets/css', from: 'app/assets/css'
serve '/assets/img', from: 'app/assets/img'
css :application, '/assets/css/application.css', [
'/assets/css/pastemaster.css',
'/assets/css/pastekitten.css',
'/assets/css/dropdown.css',
'/assets/css/pygments_solarized_modified.css'
]
js :application, '/assets/js/application.js', [
'/assets/js/pastemaster.js',
'/assets/js/pastekitten.js',
'/assets/js/dropdown.js'
]