schnitzelpress 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. data/CHANGES.md +20 -3
  2. data/README.md +4 -2
  3. data/bin/schnitzelpress +1 -1
  4. data/lib/assets/js/jquery-1.7.1.js +673 -0
  5. data/lib/assets/js/jquery-ujs.js +373 -0
  6. data/lib/assets/js/jquery.cookie.js +47 -0
  7. data/lib/{public → assets}/js/schnitzelpress.js +7 -2
  8. data/lib/public/font/fontawesome-webfont.eot +0 -0
  9. data/lib/public/font/fontawesome-webfont.svg +175 -0
  10. data/lib/public/font/fontawesome-webfont.svgz +0 -0
  11. data/lib/public/font/fontawesome-webfont.ttf +0 -0
  12. data/lib/public/font/fontawesome-webfont.woff +0 -0
  13. data/lib/schnitzelpress.rb +21 -5
  14. data/lib/schnitzelpress/actions/admin.rb +21 -1
  15. data/lib/schnitzelpress/actions/assets.rb +36 -0
  16. data/lib/schnitzelpress/actions/auth.rb +16 -3
  17. data/lib/schnitzelpress/actions/blog.rb +10 -12
  18. data/lib/schnitzelpress/app.rb +16 -19
  19. data/lib/schnitzelpress/cache_control.rb +17 -0
  20. data/lib/schnitzelpress/cli.rb +40 -9
  21. data/lib/schnitzelpress/config.rb +43 -0
  22. data/lib/schnitzelpress/env.rb +5 -0
  23. data/lib/schnitzelpress/helpers.rb +168 -4
  24. data/lib/schnitzelpress/markdown_renderer.rb +2 -2
  25. data/lib/schnitzelpress/post.rb +2 -6
  26. data/lib/schnitzelpress/static.rb +1 -1
  27. data/lib/schnitzelpress/version.rb +2 -2
  28. data/lib/templates/new_blog/Gemfile +4 -5
  29. data/lib/templates/new_blog/Gemfile.lock.tt +137 -0
  30. data/lib/templates/new_blog/Procfile +1 -1
  31. data/lib/templates/new_blog/config.ru.tt +6 -17
  32. data/lib/views/admin/admin.haml +3 -2
  33. data/lib/views/admin/config.haml +27 -0
  34. data/lib/views/atom.haml +3 -3
  35. data/lib/views/index.haml +1 -1
  36. data/lib/views/layout.haml +15 -11
  37. data/lib/views/login.haml +4 -0
  38. data/lib/views/partials/_admin_post_list.haml +8 -8
  39. data/lib/views/partials/_disqus.haml +1 -1
  40. data/lib/views/partials/_gauges.haml +1 -1
  41. data/lib/views/partials/_google_analytics.haml +1 -1
  42. data/lib/views/partials/_post.haml +6 -5
  43. data/lib/views/partials/_post_form.haml +3 -1
  44. data/lib/views/post.haml +4 -1
  45. data/lib/views/schnitzelpress.scss +67 -3
  46. data/schnitzelpress.gemspec +5 -2
  47. data/spec/app_spec.rb +5 -11
  48. data/spec/assets_spec.rb +26 -0
  49. data/spec/factories.rb +1 -1
  50. data/spec/post_spec.rb +9 -2
  51. data/spec/spec_helper.rb +2 -1
  52. metadata +115 -71
  53. data/lib/schnitzelpress/rake.rb +0 -20
  54. data/lib/templates/new_blog/Rakefile +0 -2
  55. data/lib/templates/new_blog/app.rb.tt +0 -34
  56. data/lib/templates/new_blog/config/unicorn.rb +0 -5
  57. data/lib/templates/new_blog/public/.gitkeep +0 -0
@@ -1,20 +0,0 @@
1
- require 'schnitzelpress'
2
-
3
- desc 'Run the SchnitzelPress console'
4
- task :console do
5
- require 'pry'
6
- ARGV.clear
7
- pry
8
- end
9
-
10
- namespace :db do
11
- desc 'Import Heroku database to local database'
12
- task :pull do
13
- system "MONGO_URL=\"#{SchnitzelPress.mongo_uri}\" heroku mongo:pull"
14
- end
15
-
16
- desc 'Push local database to Heroku'
17
- task :push do
18
- system "MONGO_URL=\"#{SchnitzelPress.mongo_uri}\" heroku mongo:push"
19
- end
20
- end
@@ -1,2 +0,0 @@
1
- require File.expand_path("../app.rb", __FILE__)
2
- require 'schnitzelpress/rake'
@@ -1,34 +0,0 @@
1
- # encoding: UTF-8
2
- require 'rubygems'
3
- require 'bundler'
4
- Bundler.require
5
-
6
- SchnitzelPress.mongo_uri = case SchnitzelPress.env
7
- when "development" then 'mongodb://localhost/<%= @name %>'
8
- when "production" then ENV['MONGOLAB_URI'] || ENV['MONGOHQ_URL'] || ENV['MONGO_URL']
9
- end
10
-
11
- class App < SchnitzelPress::App
12
- configure do
13
- set :blog_title, "<%= @name %>"
14
- set :blog_description, "A new blog powered by SchnitzelPress."
15
- set :author_name, "Your Name"
16
- set :footer, "powered by [SchnitzelPress #{SchnitzelPress::VERSION}](http://schnitzelpress.org)"
17
-
18
- # Set :uid to your email address. Only the user with this email address
19
- # will be able to log into the administration section of your blog.
20
- #
21
- set :administrator, {
22
- :provider => "browser_id", # don't change this. (for now.)
23
- :uid => "your@email.com"
24
- }
25
-
26
- # The following are optional:
27
- #
28
- # set :disqus_name, "..."
29
- # set :google_analytics_id, "..."
30
- # set :gauges_id, "..."
31
- # set :twitter_id, '...'
32
- # set :read_more, "Read ALL the things"
33
- end
34
- end
@@ -1,5 +0,0 @@
1
- # Amount of workers to spin up. Don't overdo it. :)
2
- worker_processes 3
3
-
4
- # Kill workers hanging for more than 30 seconds.
5
- timeout 30
File without changes