Permalink
Browse files

Rename the whole darn thing to SchnitzelPress.

  • Loading branch information...
1 parent 18a75b9 commit ccde1dfb8bd94ab97245daf6e2963ff9e62b54da @hmans committed Feb 18, 2012
View
@@ -5,9 +5,9 @@ def run(cmd, msg = nil)
puts "\n"
end
-watch("spec/.*_spec\.rb") { |m| run("bundle exec rspec %s" % m[0]) }
-watch("lib/schreihals/(.*)\.rb") { |m| run("bundle exec rspec spec/%s_spec.rb" % m[1]) }
-watch('^spec/(spec_helper|factories)\.rb') { |f| run "bundle exec rake spec", "%s.rb has been modified" % f }
+watch("spec/.*_spec\.rb") { |m| run("bundle exec rspec %s" % m[0]) }
+watch("lib/schnitzelpress/(.*)\.rb") { |m| run("bundle exec rspec spec/%s_spec.rb" % m[1]) }
+watch('^spec/(spec_helper|factories)\.rb') { |f| run "bundle exec rake spec", "%s.rb has been modified" % f }
# Ctrl-\
Signal.trap('QUIT') { run("bundle exec rake spec") }
View
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
-# Specify your gem's dependencies in schreihals.gemspec
+# Specify your gem's dependencies in schnitzelpress.gemspec
gemspec
View
@@ -1,5 +1,5 @@
-# Schreihals
+# SchnitzelPress
## A blogging engine for sane hackers.
-[![Build Status](https://secure.travis-ci.org/hmans/schreihals.png?branch=master)](http://travis-ci.org/hmans/schreihals)
+[![Build Status](https://secure.travis-ci.org/hmans/schnitzelpress.png?branch=master)](http://travis-ci.org/hmans/schnitzelpress)
View
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+require "rubygems"
+require "schnitzelpress/cli"
+
+SchnitzelPress::Cli.start
View
@@ -1,5 +0,0 @@
-#!/usr/bin/env ruby
-require "rubygems"
-require "schreihals/cli"
-
-Schreihals::Cli.start
@@ -1,4 +1,4 @@
-require 'schreihals/version'
+require 'schnitzelpress/version'
require 'sinatra'
require 'haml'
@@ -13,14 +13,14 @@
require 'active_support/core_ext/class'
require 'active_support/concern'
-require 'schreihals/app'
+require 'schnitzelpress/app'
Sass::Engine::DEFAULT_OPTIONS[:load_paths].unshift(File.expand_path("../views", __FILE__))
Sass::Engine::DEFAULT_OPTIONS[:load_paths].unshift(File.expand_path("./views"))
Mongoid.logger.level = 3
-module Schreihals
+module SchnitzelPress
mattr_reader :mongo_uri
def self.mongo_uri=(uri)
@@ -1,4 +1,4 @@
-module Schreihals
+module SchnitzelPress
module Actions
module Admin
extend ActiveSupport::Concern
@@ -1,7 +1,7 @@
require 'omniauth'
require 'omniauth-browserid'
-module Schreihals
+module SchnitzelPress
module Actions
module Auth
extend ActiveSupport::Concern
@@ -1,4 +1,4 @@
-module Schreihals
+module SchnitzelPress
module Actions
module Blog
extend ActiveSupport::Concern
@@ -1,27 +1,27 @@
-require 'schreihals/static'
-require 'schreihals/helpers'
-require 'schreihals/post'
-require 'schreihals/actions/blog'
-require 'schreihals/actions/auth'
-require 'schreihals/actions/admin'
+require 'schnitzelpress/static'
+require 'schnitzelpress/helpers'
+require 'schnitzelpress/post'
+require 'schnitzelpress/actions/blog'
+require 'schnitzelpress/actions/auth'
+require 'schnitzelpress/actions/admin'
-module Schreihals
+module SchnitzelPress
class App < Sinatra::Base
set :views, ['./views/', File.expand_path('../../views/', __FILE__)]
set :public_folder, File.expand_path('../../public/', __FILE__)
- use Schreihals::Static
+ use SchnitzelPress::Static
use Rack::ShowExceptions
use Rack::Cache
use Rack::Session::Cookie
- helpers Schreihals::Helpers
- include Schreihals::Actions::Auth
- include Schreihals::Actions::Admin
- include Schreihals::Actions::Blog
+ helpers SchnitzelPress::Helpers
+ include SchnitzelPress::Actions::Auth
+ include SchnitzelPress::Actions::Admin
+ include SchnitzelPress::Actions::Blog
configure do
- set :blog_title, "My Schreihals Blog"
+ set :blog_title, "My SchnitzelPress Blog"
set :blog_description, ""
set :author_name, "Author"
set :disqus_name, nil
@@ -1,12 +1,12 @@
require "thor"
-module Schreihals
+module SchnitzelPress
class Cli < Thor
include Thor::Actions
source_root(File.expand_path('../../templates', __FILE__))
- desc "create NAME", "Creates a new Schreihals blog."
+ desc "create NAME", "Creates a new SchnitzelPress blog."
method_option :git, :aliases => "-g", :default => false,
:desc => "Initialize a git repository in your blog's directory."
@@ -1,4 +1,4 @@
-module Schreihals
+module SchnitzelPress
module Helpers
def find_template(views, name, engine, &block)
Array(views).each { |v| super(v, name, engine, &block) }
@@ -1,7 +1,7 @@
require 'tilt'
require 'coderay'
-module Schreihals
+module SchnitzelPress
class MarkdownRenderer < Redcarpet::Render::HTML
include Redcarpet::Render::SmartyPants
@@ -1,6 +1,6 @@
-require 'schreihals'
+require 'schnitzelpress'
-desc 'Run the Schreihals console'
+desc 'Run the SchnitzelPress console'
task :console do
require 'irb'
require 'wirble'
@@ -13,7 +13,7 @@
namespace :db do
desc 'Import Heroku database to local database'
task :pull do
- system "MONGO_URL=\"#{Schreihals.mongo_uri}\" heroku mongo:pull"
+ system "MONGO_URL=\"#{SchnitzelPress.mongo_uri}\" heroku mongo:pull"
end
task :push do
@@ -1,4 +1,4 @@
-module Schreihals
+module SchnitzelPress
class Static
def initialize(app, public_dir = './public')
@file = Rack::File.new(public_dir)
@@ -1,3 +1,3 @@
-module Schreihals
+module SchnitzelPress
VERSION = "0.0.4"
end
@@ -6,14 +6,14 @@ group :development do
end
# For now, we're going to be using the development versions of
-# schnitzelstyle and schreihals. I told you you were about
+# schnitzelstyle and schnitzelpress. I told you you were about
# to live dangerously!
#
gem 'schnitzelstyle', git: 'git://github.com/hmans/schnitzelstyle.git'
-gem 'schreihals', git: 'git://github.com/hmans/schreihals.git'
+gem 'schnitzelpress', git: 'git://github.com/hmans/schnitzelpress.git'
# If you'd prefer to use the officially released versions,
# use these instead:
#
# gem 'schnitzelstyle', :path => '../schnitzelstyle'
-# gem 'schreihals', :path => '../schreihals'
+# gem 'schnitzelpress', :path => '../schnitzelpress'
@@ -1,2 +1,2 @@
require File.expand_path("../app.rb", __FILE__)
-require 'schreihals/rake'
+require 'schnitzelpress/rake'
@@ -3,18 +3,18 @@ require 'rubygems'
require 'bundler'
Bundler.require
-Schreihals.mongo_uri =
+SchnitzelPress.mongo_uri =
ENV['MONGOLAB_URI'] ||
ENV['MONGOHQ_URL'] ||
ENV['MONGO_URL'] ||
'mongodb://localhost/<%= @name %>' # used for local development
-class App < Schreihals::App
+class App < SchnitzelPress::App
configure do
set :blog_title, "<%= @name %>"
- set :blog_description, "A new blog powered by Schreihals."
+ set :blog_description, "A new blog powered by SchnitzelPress."
set :author_name, "Your Name"
- set :footer, "powered by [Schreihals](http://schreihals.info)"
+ set :footer, "powered by [SchnitzelPress](http://schnitzelpress.info)"
set :administrator, "browser_id:hendrik@mans.de"
# The following are optional:
View
@@ -1 +1 @@
-@import 'schreihals';
+@import 'schnitzelpress';
View
@@ -1,19 +1,19 @@
# -*- encoding: utf-8 -*-
-require File.expand_path('../lib/schreihals/version', __FILE__)
+require File.expand_path('../lib/schnitzelpress/version', __FILE__)
Gem::Specification.new do |gem|
gem.authors = ["Hendrik Mans"]
gem.email = ["hendrik@mans.de"]
- gem.description = %q{A simple blog engine for hackers.}
- gem.summary = %q{A simple blog engine for hackers.}
- gem.homepage = "http://hmans.net"
+ gem.description = %q{A simple blog engine for sane hackers.}
+ gem.summary = %q{A simple blog engine for sane hackers.}
+ gem.homepage = "http://www.schnitzelpress.org"
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
gem.files = `git ls-files`.split("\n")
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
- gem.name = "schreihals"
+ gem.name = "schnitzelpress"
gem.require_paths = ["lib"]
- gem.version = Schreihals::VERSION
+ gem.version = SchnitzelPress::VERSION
# base dependencies
gem.add_dependency 'rack', '~> 1.4.0'
View
@@ -1,12 +1,12 @@
require 'spec_helper'
-class TestApp < Schreihals::App
+class TestApp < SchnitzelPress::App
configure do
set :blog_title, "A Test Blog"
end
end
-describe Schreihals::App do
+describe SchnitzelPress::App do
include Rack::Test::Methods
def app
View
@@ -1,5 +1,5 @@
FactoryGirl.define do
- factory :post, class: Schreihals::Post do
+ factory :post, class: SchnitzelPress::Post do
title { Faker::Lorem.sentence }
body { Faker::Lorem.paragraphs }
published_at { rand(1.year).minutes.ago }
View
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe Schreihals::Post do
+describe SchnitzelPress::Post do
subject do
Factory.build(:post)
end
@@ -65,7 +65,7 @@
it 'should return the latest published posts' do
2.times { Factory :draft_post }
5.times { Factory :published_post }
- Schreihals::Post.latest.size.should == 5
+ SchnitzelPress::Post.latest.size.should == 5
end
end
View
@@ -5,9 +5,9 @@
require 'rubygems'
require 'bundler/setup'
-require 'schreihals'
+require 'schnitzelpress'
-Schreihals.mongo_uri = 'mongodb://localhost/_schreihals_test'
+SchnitzelPress.mongo_uri = 'mongodb://localhost/_schreihals_test'
require 'awesome_print'
require 'rack/test'
View
@@ -1,68 +0,0 @@
-require_relative 'test_helper'
-
-class MyTestApp < Schreihals::App
- set :documents_source, './test/posts'
- set :blog_title, "A Little Test Blog"
- set :footer, "This is just a test blog. Have fun."
-end
-
-context Schreihals::App do
- setup { Rack::MockRequest.new(MyTestApp.new) }
-
- context "when loading the home page" do
- setup { topic.get '/' }
-
- asserts(:status).equals 200
- asserts(:body).present
- asserts(:content_type).equals 'text/html;charset=utf-8'
- asserts(:body).includes_elements("section.posts article.post", 2)
-
- asserts(:body).includes_html('title' => MyTestApp.settings.blog_title)
- asserts(:body).includes_html('.container>footer' => MyTestApp.settings.footer)
- end
-
- context "when loading a specific post's page" do
- setup { topic.get '/2011/12/23/first-post/' }
-
- asserts(:status).equals 200
- asserts(:body).present
- asserts(:content_type).equals 'text/html;charset=utf-8'
- asserts(:body).includes_elements("article.post", 1)
- asserts(:body).includes_html('article.post header h2 a' => "First Post\.")
- end
-
- context "when loading a static page" do
- setup { topic.get '/static-page/' }
-
- asserts(:status).equals 200
- asserts(:body).present
- asserts(:content_type).equals 'text/html;charset=utf-8'
- asserts(:body).includes_elements("article.post", 1)
- asserts(:body).includes_html('article.post header h2 a' => "A Static Page\.")
- end
-
- context "when loading the ATOM feed" do
- setup { topic.get '/atom.xml' }
-
- asserts(:status).equals 200
- asserts(:body).present
- asserts(:content_type).equals 'application/xml+atom'
- asserts(:body).includes_elements("entry", 2)
- end
-
- context "when loading a static asset provided by schreihals" do
- setup { topic.get '/favicon.ico' }
-
- asserts(:status).equals 200
- asserts(:body).present
- asserts(:content_type).equals 'image/vnd.microsoft.icon'
- end
-
- context "when loading an invalid URL" do
- setup { topic.get '/ooga/booga/foo/to/the/bar' }
-
- asserts(:status).equals 404
- asserts(:body).present
- asserts(:content_type).equals 'text/html;charset=utf-8'
- end
-end
@@ -1,7 +0,0 @@
----
-title: This is the title
-date: 2011-12-24
-datetime: 2011-12-24 12:22:01
----
-
-This is the body.
Oops, something went wrong.

0 comments on commit ccde1df

Please sign in to comment.