diff --git a/README.md b/README.md new file mode 100644 index 0000000..c859ec2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +## Paste Kitten + +:heart: :heart: :heart: diff --git a/Rakefile b/Rakefile index d07427e..8a26d5b 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,4 @@ -APP_FILE = 'pastemaster.rb' -APP_CLASS = 'Pastemaster' +APP_FILE = 'pastekitten.rb' +APP_CLASS = 'Pastekitten' require 'sinatra/assetpack/rake' diff --git a/app/assets/css/pastemaster.styl b/app/assets/css/pastekitten.styl similarity index 85% rename from app/assets/css/pastemaster.styl rename to app/assets/css/pastekitten.styl index 7307401..d2407ae 100644 --- a/app/assets/css/pastemaster.styl +++ b/app/assets/css/pastekitten.styl @@ -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 diff --git a/app/assets/img/kitten_70.png b/app/assets/img/kitten_70.png new file mode 100644 index 0000000..316d6d7 Binary files /dev/null and b/app/assets/img/kitten_70.png differ diff --git a/app/assets/js/pastemaster.coffee b/app/assets/js/pastekitten.coffee similarity index 100% rename from app/assets/js/pastemaster.coffee rename to app/assets/js/pastekitten.coffee diff --git a/app/views/default.slim b/app/views/default.slim index fac3856..8c2192b 100644 --- a/app/views/default.slim +++ b/app/views/default.slim @@ -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 diff --git a/app/views/error_403.slim b/app/views/error_403.slim index ac40b01..4147cea 100644 --- a/app/views/error_403.slim +++ b/app/views/error_403.slim @@ -17,4 +17,4 @@ html | color: #444444; | } body - | 403 Forbidden + | 403 Purrbidden diff --git a/config.ru b/config.ru index 6fc39a5..09478c6 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,3 @@ -require File.expand_path('../pastemaster', __FILE__) +require File.expand_path('../pastekitten', __FILE__) -run Pastemaster.new +run Pastekitten.new diff --git a/config/deploy.rb b/config/deploy.rb index 15b5519..1c14013 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -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 diff --git a/config/examples/database.yml b/config/examples/database.yml index 18ed089..f2bbd53 100644 --- a/config/examples/database.yml +++ b/config/examples/database.yml @@ -1,6 +1,6 @@ protocol: postgres -username: pastemaster -password: pastemaster +username: pastekitten +password: pastekitten host: localhost port: 5432 -database: pastemaster +database: pastekitten diff --git a/config/nginx.conf b/config/nginx.conf index 6c8815d..5c224a2 100644 --- a/config/nginx.conf +++ b/config/nginx.conf @@ -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; } } diff --git a/config/unicorn.rb b/config/unicorn.rb index bd8a01c..e3881a6 100644 --- a/config/unicorn.rb +++ b/config/unicorn.rb @@ -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' diff --git a/pastemaster.rb b/pastekitten.rb similarity index 91% rename from pastemaster.rb rename to pastekitten.rb index d1a96d2..e579da8 100644 --- a/pastemaster.rb +++ b/pastekitten.rb @@ -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' ]