schreihals 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. data/.gitignore +1 -1
  2. data/.rspec +1 -0
  3. data/.travis.yml +9 -0
  4. data/.watchr +6 -5
  5. data/LICENSE +2 -2
  6. data/README.md +2 -54
  7. data/Rakefile +4 -9
  8. data/lib/schreihals.rb +10 -9
  9. data/lib/schreihals/actions/admin.rb +49 -0
  10. data/lib/schreihals/actions/auth.rb +29 -0
  11. data/lib/schreihals/actions/blog.rb +68 -0
  12. data/lib/schreihals/app.rb +15 -43
  13. data/lib/schreihals/cli.rb +0 -14
  14. data/lib/schreihals/helpers.rb +38 -5
  15. data/lib/schreihals/post.rb +126 -44
  16. data/lib/schreihals/rake.rb +21 -0
  17. data/lib/schreihals/version.rb +1 -1
  18. data/lib/templates/new_blog/Gemfile +17 -1
  19. data/lib/templates/new_blog/Rakefile +2 -0
  20. data/lib/templates/new_blog/app.rb.tt +28 -0
  21. data/lib/templates/new_blog/config.ru.tt +2 -14
  22. data/{example/public/media → lib/templates/new_blog/public}/.gitkeep +0 -0
  23. data/lib/views/admin/admin.haml +12 -0
  24. data/lib/views/admin/edit.haml +3 -0
  25. data/lib/views/admin/new.haml +3 -0
  26. data/lib/views/atom.haml +12 -10
  27. data/lib/views/index.haml +3 -0
  28. data/lib/views/layout.haml +4 -3
  29. data/lib/views/partials/_admin_post_list.haml +11 -0
  30. data/lib/views/partials/_form_field.haml +27 -0
  31. data/lib/views/partials/_post.haml +16 -12
  32. data/lib/views/partials/_post_form.haml +12 -0
  33. data/lib/views/schreihals.scss +61 -25
  34. data/schreihals.gemspec +27 -11
  35. data/spec/app_spec.rb +56 -0
  36. data/spec/factories.rb +15 -0
  37. data/spec/post_spec.rb +60 -0
  38. data/spec/spec_helper.rb +35 -0
  39. data/{test → test.old}/app_test.rb +0 -0
  40. data/{test → test.old}/files/simple_document.md +0 -0
  41. data/test.old/post_test.rb +62 -0
  42. data/{test → test.old}/posts/2011-12-23-first-post.md +0 -0
  43. data/{test → test.old}/posts/2011-12-24-second-post.md +0 -0
  44. data/{test → test.old}/posts/static-page.md +0 -0
  45. data/{test → test.old}/test_helper.rb +0 -0
  46. metadata +158 -87
  47. data/example/Gemfile +0 -5
  48. data/example/config.ru +0 -8
  49. data/example/posts/2010-06-17-pythton-is-great.md +0 -9
  50. data/example/posts/2011-12-22-ruby-is-great.md +0 -16
  51. data/lib/schreihals/actions.rb +0 -45
  52. data/lib/schreihals/document.rb +0 -52
  53. data/lib/templates/first-post.md.tt +0 -1
  54. data/lib/templates/new-post.md.tt +0 -13
  55. data/lib/templates/new_blog/posts/.gitkeep +0 -0
  56. data/lib/templates/new_blog/public/media/.gitkeep +0 -0
  57. data/test/document_test.rb +0 -41
@@ -0,0 +1,12 @@
1
+ %form.post{ action: @post.new_record? ? '/admin/new' : "/admin/edit/#{@post.id}", method: 'post' }
2
+ = form_field @post, :title
3
+ = form_field @post, :link
4
+ = form_field @post, :body, type: :textarea
5
+ = form_field @post, :slug, label: 'URL Slug', extra: @post.previous_slugs.any? ? "Previous slugs: #{@post.previous_slugs.join ', '}" : nil
6
+ = form_field @post, :published_at
7
+ = form_field @post, :status, type: :dropdown, options: [[:draft, "Draft"], [:published, "Published"]]
8
+ = form_field @post, :summary
9
+ = form_field @post, :read_more, label: "'Read More' Link Text"
10
+
11
+ .buttons
12
+ %input{ type: 'submit', value: @post.new_record? ? 'Create Post' : 'Update Post' }
@@ -1,51 +1,87 @@
1
1
  // load stuff!
2
- @import 'schnitzelstyle';
3
- @import 'schnitzelstyle/coderay';
4
- @import 'schnitzelstyle/export';
5
-
6
- @include schnitzel-complete;
7
- @include schnitzel-export;
2
+ @import 'schnitzelstyle/complete';
8
3
 
9
4
  /* misc crap */
10
5
  .social_media_buttons {
11
6
  margin: 1em 0;
12
7
  }
13
8
 
9
+ @mixin smallish {
10
+ font: $font-footer;
11
+ font-size: 80%;
12
+ color: lighten($color-text, 30%);
13
+ a {
14
+ color: lighten($color-text, 30%);
15
+ border: none;
16
+ }
17
+ a:hover {
18
+ text-decoration: underline;
19
+ }
20
+ }
21
+
14
22
  /* posts */
15
23
  article.post {
16
- header {
17
- .info {
18
- display: inline;
19
- margin-left: 1em;
20
- color: #999;
24
+ &.draft header h1 { background-color: #ccc; }
25
+ &.link header {
26
+ font: $font-header;
27
+ font-weight: bold;
28
+ padding: 2px 10px;
29
+ background-color: darken($color-page-background, 5%);
30
+ display: inline-block;
31
+ line-height: 150%;
32
+ border-bottom: 2px solid $color-link-underline;
33
+ color: darken($color-page-background, 30%);
34
+ a {
35
+ border: none;
21
36
  }
22
37
  }
23
38
 
24
- &.draft header h2 { background-color: #ccc; }
39
+ div.summary {
40
+ margin-bottom: 2em;
25
41
 
26
- div.summary p {
27
- font: $font-header;
28
- font-size: 115%;
29
- line-height: 150%;
30
- color: #000;
42
+ p {
43
+ font: $font-header;
44
+ font-size: 125%;
45
+ line-height: 150%;
46
+ color: #000;
31
47
 
32
- @media only screen and (max-width: 640px) {
33
- line-height: 130%;
48
+ @media only screen and (max-width: 640px) {
49
+ line-height: 130%;
34
50
 
35
- section.posts & {
36
- font-size: 100%;
51
+ section.posts & {
52
+ font-size: 100%;
53
+ }
37
54
  }
38
55
  }
39
56
  }
40
57
 
41
- p.permalink {
42
- a {
43
- color: lighten($color-text, 30%);
44
- border: none;
58
+ footer {
59
+ margin-top: 0.5em;
60
+
61
+ p.permalink {
62
+ @include smallish;
45
63
  }
46
64
  }
47
65
  }
48
66
 
67
+ /* admin post lists */
68
+ ul.admin-post-list {
69
+ max-height: 300px;
70
+ padding-bottom: 5px;
71
+ overflow: auto;
72
+ }
73
+
74
+ /* admin links */
75
+ ul.admin {
76
+ @include smallish;
77
+ list-style: none;
78
+
79
+ li {
80
+ display: inline;
81
+ margin-right: 0.5em;
82
+ }
83
+ }
84
+
49
85
  /* disqus */
50
86
  #dsq-content {
51
87
  a {
@@ -15,25 +15,41 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Schreihals::VERSION
17
17
 
18
+ # base dependencies
18
19
  gem.add_dependency 'rack', '~> 1.4.0'
19
20
  gem.add_dependency 'sinatra', '~> 1.3.2'
20
- gem.add_dependency 'activesupport', '~> 3.1.0'
21
- gem.add_dependency 'shotgun'
21
+ gem.add_dependency 'activesupport', '~> 3.2.0'
22
+ gem.add_dependency 'rack-cache'
23
+
24
+ # database related
25
+ gem.add_dependency 'mongoid', '~> 2.4'
26
+ gem.add_dependency 'bson_ext', '~> 1.5'
27
+
28
+ # authentication
29
+ gem.add_dependency 'omniauth'
30
+ gem.add_dependency 'omniauth-browserid'
31
+
32
+ # frontend/views/assets related
22
33
  gem.add_dependency 'haml'
23
34
  gem.add_dependency 'sass'
24
- gem.add_dependency 'coderay'
25
35
  gem.add_dependency 'redcarpet'
26
- gem.add_dependency 'rack-cache'
27
- gem.add_dependency 'rack-codehighlighter'
28
- gem.add_dependency 'schnitzelstyle', '~> 0.0.2'
29
- gem.add_dependency 'nokogiri'
30
- gem.add_dependency 'thor'
31
- gem.add_dependency 'psych'
36
+ gem.add_dependency 'coderay'
37
+ gem.add_dependency 'schnitzelstyle', '~> 0.0.4'
32
38
  gem.add_dependency 'i18n'
33
39
  gem.add_dependency 'tilt', '~> 1.3.0'
34
40
 
35
- gem.add_development_dependency 'rake'
36
- gem.add_development_dependency 'riot'
41
+ # CLI related
42
+ gem.add_dependency 'thor'
43
+ gem.add_dependency 'rake'
44
+ gem.add_dependency 'wirble'
45
+
46
+ # development dependencies
47
+ gem.add_development_dependency 'rspec', '>= 2.8.0'
48
+ gem.add_development_dependency 'rspec-html-matchers'
49
+ gem.add_development_dependency 'database_cleaner'
50
+ gem.add_development_dependency 'factory_girl'
51
+ gem.add_development_dependency 'timecop'
52
+ gem.add_development_dependency 'shotgun'
37
53
  gem.add_development_dependency 'rack-test'
38
54
  gem.add_development_dependency 'watchr'
39
55
  gem.add_development_dependency 'awesome_print'
@@ -0,0 +1,56 @@
1
+ require 'spec_helper'
2
+
3
+ class TestApp < Schreihals::App
4
+ configure do
5
+ set :blog_title, "A Test Blog"
6
+ end
7
+ end
8
+
9
+ describe Schreihals::App do
10
+ include Rack::Test::Methods
11
+
12
+ def app
13
+ TestApp
14
+ end
15
+
16
+ describe 'the home page' do
17
+ before do
18
+ 2.times { Factory(:draft_post) }
19
+ 5.times { Factory(:published_post) }
20
+ get '/'
21
+ end
22
+
23
+ subject { last_response }
24
+
25
+ it { should be_ok }
26
+ its(:body) { should have_tag 'title', text: "A Test Blog" }
27
+ its(:body) { should have_tag 'section.posts > article.post.published', count: 5 }
28
+ its(:body) { should_not have_tag 'section.posts > article.post.draft' }
29
+ end
30
+
31
+ describe 'the public feed url' do
32
+ before do
33
+ TestApp.set :feed_url, 'http://feeds.feedburner.com/example_org'
34
+ get '/feed'
35
+ end
36
+
37
+ subject { last_response }
38
+ it { should be_redirect }
39
+ its(:status) { should == 302 }
40
+ specify { subject["Location"].should == 'http://feeds.feedburner.com/example_org' }
41
+ end
42
+
43
+ describe 'viewing a single post' do
44
+ context 'when the post has multiple slugs' do
45
+ before do
46
+ @post = Factory(:post, slugs: ['ancient-slug', 'old-slug', 'current-slug'])
47
+ end
48
+
49
+ it 'should enforce the canonical URL' do
50
+ get "/#{@post.year}/#{@post.month}/#{@post.day}/ancient-slug/"
51
+ last_response.should be_redirect
52
+ last_response["Location"].should == "http://example.org/#{@post.year}/#{@post.month}/#{@post.day}/current-slug/"
53
+ end
54
+ end
55
+ end
56
+ end
@@ -0,0 +1,15 @@
1
+ FactoryGirl.define do
2
+ factory :post, class: Schreihals::Post do
3
+ title "It's a Post!"
4
+ body "Hello world.\n\nI'm a really interesting post!"
5
+ published_at "2012-01-02 12:23:13"
6
+ end
7
+
8
+ factory :published_post, parent: :post do
9
+ status :published
10
+ end
11
+
12
+ factory :draft_post, parent: :post do
13
+ status :draft
14
+ end
15
+ end
@@ -0,0 +1,60 @@
1
+ require 'spec_helper'
2
+
3
+ describe Schreihals::Post do
4
+ subject do
5
+ Factory.build(:post)
6
+ end
7
+
8
+ context 'slugs' do
9
+ before do
10
+ subject.slugs = ['some-slug', 'another-slug']
11
+ subject.slug = 'a-new-slug'
12
+ end
13
+
14
+ its(:slugs) { should == ['some-slug', 'another-slug', 'a-new-slug'] }
15
+ its(:slug) { should == 'a-new-slug'}
16
+ end
17
+
18
+ context 'saving' do
19
+ context "when no slug is set" do
20
+ before { subject.slug = nil }
21
+ it "should set its slug to a sluggified version of its title" do
22
+ expect { subject.save }.to change(subject, :slug).from(nil).to('it-s-a-post')
23
+ end
24
+ end
25
+
26
+ context "when post is being pubslihed and no published_at is set" do
27
+ before { subject.published_at = nil ; subject.status = :published }
28
+ it "should set its published_at to the current time" do
29
+ expect { subject.save }.to change(subject, :published_at).from(nil).to(Time.now)
30
+ end
31
+ end
32
+
33
+ it "should store blank attributes as nil" do
34
+ subject.link = ""
35
+ expect { subject.save }.to change(subject, :link).from("").to(nil)
36
+ end
37
+
38
+ it "should remove leading and trailing spaces from string attributes" do
39
+ subject.link = " moo "
40
+ subject.link.should == " moo "
41
+ subject.save
42
+ subject.link.should == "moo"
43
+ end
44
+ end
45
+
46
+ describe '.latest' do
47
+ it 'should return the latest published posts' do
48
+ 2.times { Factory :draft_post }
49
+ 5.times { Factory :published_post }
50
+ Schreihals::Post.latest.size.should == 5
51
+ end
52
+ end
53
+
54
+ context 'date methods' do
55
+ before { subject.published_at = "2012-01-02 12:23:13" }
56
+ its(:year) { should == 2012 }
57
+ its(:month) { should == 01 }
58
+ its(:day) { should == 02 }
59
+ end
60
+ end
@@ -0,0 +1,35 @@
1
+ SPEC_DIR = File.dirname(__FILE__)
2
+ lib_path = File.expand_path("#{SPEC_DIR}/../lib")
3
+ $LOAD_PATH.unshift lib_path unless $LOAD_PATH.include?(lib_path)
4
+
5
+ require 'rubygems'
6
+ require 'bundler/setup'
7
+
8
+ require 'schreihals'
9
+
10
+ Schreihals.mongo_uri = 'mongodb://localhost/_schreihals_test'
11
+
12
+ require 'awesome_print'
13
+ require 'rack/test'
14
+ require 'rspec-html-matchers'
15
+ require 'database_cleaner'
16
+ require 'factory_girl'
17
+ require File.expand_path("../factories.rb", __FILE__)
18
+ require 'timecop'
19
+ Timecop.freeze
20
+
21
+ set :environment, :test
22
+
23
+ RSpec.configure do |config|
24
+ config.before(:suite) do
25
+ DatabaseCleaner[:mongoid].strategy = :truncation
26
+ end
27
+
28
+ config.before(:each) do
29
+ DatabaseCleaner[:mongoid].start
30
+ end
31
+
32
+ config.after(:each) do
33
+ DatabaseCleaner[:mongoid].clean
34
+ end
35
+ end
File without changes
@@ -0,0 +1,62 @@
1
+ require_relative 'test_helper'
2
+
3
+ context Schreihals::Post do
4
+ # setup { Rack::MockRequest.new(MyTestApp.new) }
5
+
6
+ # context "when loading the home page" do
7
+ # setup { topic.get '/' }
8
+
9
+ # asserts(:status).equals 200
10
+ # asserts(:body).present
11
+ # asserts(:content_type).equals 'text/html;charset=utf-8'
12
+ # asserts(:body).includes_elements("section.posts article.post", 2)
13
+
14
+ # asserts(:body).includes_html('title' => MyTestApp.settings.blog_title)
15
+ # asserts(:body).includes_html('.container>footer' => MyTestApp.settings.footer)
16
+ # end
17
+
18
+ # context "when loading a specific post's page" do
19
+ # setup { topic.get '/2011/12/23/first-post/' }
20
+
21
+ # asserts(:status).equals 200
22
+ # asserts(:body).present
23
+ # asserts(:content_type).equals 'text/html;charset=utf-8'
24
+ # asserts(:body).includes_elements("article.post", 1)
25
+ # asserts(:body).includes_html('article.post header h2 a' => "First Post\.")
26
+ # end
27
+
28
+ # context "when loading a static page" do
29
+ # setup { topic.get '/static-page/' }
30
+
31
+ # asserts(:status).equals 200
32
+ # asserts(:body).present
33
+ # asserts(:content_type).equals 'text/html;charset=utf-8'
34
+ # asserts(:body).includes_elements("article.post", 1)
35
+ # asserts(:body).includes_html('article.post header h2 a' => "A Static Page\.")
36
+ # end
37
+
38
+ # context "when loading the ATOM feed" do
39
+ # setup { topic.get '/atom.xml' }
40
+
41
+ # asserts(:status).equals 200
42
+ # asserts(:body).present
43
+ # asserts(:content_type).equals 'application/xml+atom'
44
+ # asserts(:body).includes_elements("entry", 2)
45
+ # end
46
+
47
+ # context "when loading a static asset provided by schreihals" do
48
+ # setup { topic.get '/favicon.ico' }
49
+
50
+ # asserts(:status).equals 200
51
+ # asserts(:body).present
52
+ # asserts(:content_type).equals 'image/vnd.microsoft.icon'
53
+ # end
54
+
55
+ # context "when loading an invalid URL" do
56
+ # setup { topic.get '/ooga/booga/foo/to/the/bar' }
57
+
58
+ # asserts(:status).equals 404
59
+ # asserts(:body).present
60
+ # asserts(:content_type).equals 'text/html;charset=utf-8'
61
+ # end
62
+ end
File without changes
File without changes
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schreihals
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-09 00:00:00.000000000 Z
12
+ date: 2012-02-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
16
- requirement: &70360914055160 !ruby/object:Gem::Requirement
16
+ requirement: &70180323564280 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.4.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70360914055160
24
+ version_requirements: *70180323564280
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: sinatra
27
- requirement: &70360914054280 !ruby/object:Gem::Requirement
27
+ requirement: &70180323547200 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: 1.3.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70360914054280
35
+ version_requirements: *70180323547200
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
- requirement: &70360914053660 !ruby/object:Gem::Requirement
38
+ requirement: &70180323545120 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: 3.1.0
43
+ version: 3.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70360914053660
46
+ version_requirements: *70180323545120
47
47
  - !ruby/object:Gem::Dependency
48
- name: shotgun
49
- requirement: &70360914052360 !ruby/object:Gem::Requirement
48
+ name: rack-cache
49
+ requirement: &70180323541900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,32 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70360914052360
57
+ version_requirements: *70180323541900
58
58
  - !ruby/object:Gem::Dependency
59
- name: haml
60
- requirement: &70360914050460 !ruby/object:Gem::Requirement
59
+ name: mongoid
60
+ requirement: &70180323515600 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ~>
64
+ - !ruby/object:Gem::Version
65
+ version: '2.4'
66
+ type: :runtime
67
+ prerelease: false
68
+ version_requirements: *70180323515600
69
+ - !ruby/object:Gem::Dependency
70
+ name: bson_ext
71
+ requirement: &70180323513800 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ~>
75
+ - !ruby/object:Gem::Version
76
+ version: '1.5'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70180323513800
80
+ - !ruby/object:Gem::Dependency
81
+ name: omniauth
82
+ requirement: &70180323510180 !ruby/object:Gem::Requirement
61
83
  none: false
62
84
  requirements:
63
85
  - - ! '>='
@@ -65,10 +87,10 @@ dependencies:
65
87
  version: '0'
66
88
  type: :runtime
67
89
  prerelease: false
68
- version_requirements: *70360914050460
90
+ version_requirements: *70180323510180
69
91
  - !ruby/object:Gem::Dependency
70
- name: sass
71
- requirement: &70360914049220 !ruby/object:Gem::Requirement
92
+ name: omniauth-browserid
93
+ requirement: &70180323509500 !ruby/object:Gem::Requirement
72
94
  none: false
73
95
  requirements:
74
96
  - - ! '>='
@@ -76,10 +98,10 @@ dependencies:
76
98
  version: '0'
77
99
  type: :runtime
78
100
  prerelease: false
79
- version_requirements: *70360914049220
101
+ version_requirements: *70180323509500
80
102
  - !ruby/object:Gem::Dependency
81
- name: coderay
82
- requirement: &70360914048400 !ruby/object:Gem::Requirement
103
+ name: haml
104
+ requirement: &70180323494380 !ruby/object:Gem::Requirement
83
105
  none: false
84
106
  requirements:
85
107
  - - ! '>='
@@ -87,10 +109,10 @@ dependencies:
87
109
  version: '0'
88
110
  type: :runtime
89
111
  prerelease: false
90
- version_requirements: *70360914048400
112
+ version_requirements: *70180323494380
91
113
  - !ruby/object:Gem::Dependency
92
- name: redcarpet
93
- requirement: &70360914047760 !ruby/object:Gem::Requirement
114
+ name: sass
115
+ requirement: &70180323492400 !ruby/object:Gem::Requirement
94
116
  none: false
95
117
  requirements:
96
118
  - - ! '>='
@@ -98,10 +120,10 @@ dependencies:
98
120
  version: '0'
99
121
  type: :runtime
100
122
  prerelease: false
101
- version_requirements: *70360914047760
123
+ version_requirements: *70180323492400
102
124
  - !ruby/object:Gem::Dependency
103
- name: rack-cache
104
- requirement: &70360914047100 !ruby/object:Gem::Requirement
125
+ name: redcarpet
126
+ requirement: &70180323491060 !ruby/object:Gem::Requirement
105
127
  none: false
106
128
  requirements:
107
129
  - - ! '>='
@@ -109,10 +131,10 @@ dependencies:
109
131
  version: '0'
110
132
  type: :runtime
111
133
  prerelease: false
112
- version_requirements: *70360914047100
134
+ version_requirements: *70180323491060
113
135
  - !ruby/object:Gem::Dependency
114
- name: rack-codehighlighter
115
- requirement: &70360914044680 !ruby/object:Gem::Requirement
136
+ name: coderay
137
+ requirement: &70180323489280 !ruby/object:Gem::Requirement
116
138
  none: false
117
139
  requirements:
118
140
  - - ! '>='
@@ -120,21 +142,21 @@ dependencies:
120
142
  version: '0'
121
143
  type: :runtime
122
144
  prerelease: false
123
- version_requirements: *70360914044680
145
+ version_requirements: *70180323489280
124
146
  - !ruby/object:Gem::Dependency
125
147
  name: schnitzelstyle
126
- requirement: &70360914043620 !ruby/object:Gem::Requirement
148
+ requirement: &70180323488540 !ruby/object:Gem::Requirement
127
149
  none: false
128
150
  requirements:
129
151
  - - ~>
130
152
  - !ruby/object:Gem::Version
131
- version: 0.0.2
153
+ version: 0.0.4
132
154
  type: :runtime
133
155
  prerelease: false
134
- version_requirements: *70360914043620
156
+ version_requirements: *70180323488540
135
157
  - !ruby/object:Gem::Dependency
136
- name: nokogiri
137
- requirement: &70360914042680 !ruby/object:Gem::Requirement
158
+ name: i18n
159
+ requirement: &70180323487860 !ruby/object:Gem::Requirement
138
160
  none: false
139
161
  requirements:
140
162
  - - ! '>='
@@ -142,10 +164,21 @@ dependencies:
142
164
  version: '0'
143
165
  type: :runtime
144
166
  prerelease: false
145
- version_requirements: *70360914042680
167
+ version_requirements: *70180323487860
168
+ - !ruby/object:Gem::Dependency
169
+ name: tilt
170
+ requirement: &70180323475360 !ruby/object:Gem::Requirement
171
+ none: false
172
+ requirements:
173
+ - - ~>
174
+ - !ruby/object:Gem::Version
175
+ version: 1.3.0
176
+ type: :runtime
177
+ prerelease: false
178
+ version_requirements: *70180323475360
146
179
  - !ruby/object:Gem::Dependency
147
180
  name: thor
148
- requirement: &70360914040900 !ruby/object:Gem::Requirement
181
+ requirement: &70180323474060 !ruby/object:Gem::Requirement
149
182
  none: false
150
183
  requirements:
151
184
  - - ! '>='
@@ -153,10 +186,10 @@ dependencies:
153
186
  version: '0'
154
187
  type: :runtime
155
188
  prerelease: false
156
- version_requirements: *70360914040900
189
+ version_requirements: *70180323474060
157
190
  - !ruby/object:Gem::Dependency
158
- name: psych
159
- requirement: &70360914039880 !ruby/object:Gem::Requirement
191
+ name: rake
192
+ requirement: &70180323473500 !ruby/object:Gem::Requirement
160
193
  none: false
161
194
  requirements:
162
195
  - - ! '>='
@@ -164,10 +197,10 @@ dependencies:
164
197
  version: '0'
165
198
  type: :runtime
166
199
  prerelease: false
167
- version_requirements: *70360914039880
200
+ version_requirements: *70180323473500
168
201
  - !ruby/object:Gem::Dependency
169
- name: i18n
170
- requirement: &70360914039120 !ruby/object:Gem::Requirement
202
+ name: wirble
203
+ requirement: &70180323472740 !ruby/object:Gem::Requirement
171
204
  none: false
172
205
  requirements:
173
206
  - - ! '>='
@@ -175,21 +208,32 @@ dependencies:
175
208
  version: '0'
176
209
  type: :runtime
177
210
  prerelease: false
178
- version_requirements: *70360914039120
211
+ version_requirements: *70180323472740
179
212
  - !ruby/object:Gem::Dependency
180
- name: tilt
181
- requirement: &70360914038380 !ruby/object:Gem::Requirement
213
+ name: rspec
214
+ requirement: &70180323471820 !ruby/object:Gem::Requirement
182
215
  none: false
183
216
  requirements:
184
- - - ~>
217
+ - - ! '>='
185
218
  - !ruby/object:Gem::Version
186
- version: 1.3.0
187
- type: :runtime
219
+ version: 2.8.0
220
+ type: :development
188
221
  prerelease: false
189
- version_requirements: *70360914038380
222
+ version_requirements: *70180323471820
190
223
  - !ruby/object:Gem::Dependency
191
- name: rake
192
- requirement: &70360914037380 !ruby/object:Gem::Requirement
224
+ name: rspec-html-matchers
225
+ requirement: &70180323471020 !ruby/object:Gem::Requirement
226
+ none: false
227
+ requirements:
228
+ - - ! '>='
229
+ - !ruby/object:Gem::Version
230
+ version: '0'
231
+ type: :development
232
+ prerelease: false
233
+ version_requirements: *70180323471020
234
+ - !ruby/object:Gem::Dependency
235
+ name: database_cleaner
236
+ requirement: &70180323469980 !ruby/object:Gem::Requirement
193
237
  none: false
194
238
  requirements:
195
239
  - - ! '>='
@@ -197,10 +241,32 @@ dependencies:
197
241
  version: '0'
198
242
  type: :development
199
243
  prerelease: false
200
- version_requirements: *70360914037380
244
+ version_requirements: *70180323469980
201
245
  - !ruby/object:Gem::Dependency
202
- name: riot
203
- requirement: &70360914035900 !ruby/object:Gem::Requirement
246
+ name: factory_girl
247
+ requirement: &70180323469060 !ruby/object:Gem::Requirement
248
+ none: false
249
+ requirements:
250
+ - - ! '>='
251
+ - !ruby/object:Gem::Version
252
+ version: '0'
253
+ type: :development
254
+ prerelease: false
255
+ version_requirements: *70180323469060
256
+ - !ruby/object:Gem::Dependency
257
+ name: timecop
258
+ requirement: &70180323468560 !ruby/object:Gem::Requirement
259
+ none: false
260
+ requirements:
261
+ - - ! '>='
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: *70180323468560
267
+ - !ruby/object:Gem::Dependency
268
+ name: shotgun
269
+ requirement: &70180323467960 !ruby/object:Gem::Requirement
204
270
  none: false
205
271
  requirements:
206
272
  - - ! '>='
@@ -208,10 +274,10 @@ dependencies:
208
274
  version: '0'
209
275
  type: :development
210
276
  prerelease: false
211
- version_requirements: *70360914035900
277
+ version_requirements: *70180323467960
212
278
  - !ruby/object:Gem::Dependency
213
279
  name: rack-test
214
- requirement: &70360914034700 !ruby/object:Gem::Requirement
280
+ requirement: &70180323466920 !ruby/object:Gem::Requirement
215
281
  none: false
216
282
  requirements:
217
283
  - - ! '>='
@@ -219,10 +285,10 @@ dependencies:
219
285
  version: '0'
220
286
  type: :development
221
287
  prerelease: false
222
- version_requirements: *70360914034700
288
+ version_requirements: *70180323466920
223
289
  - !ruby/object:Gem::Dependency
224
290
  name: watchr
225
- requirement: &70360914033060 !ruby/object:Gem::Requirement
291
+ requirement: &70180323465320 !ruby/object:Gem::Requirement
226
292
  none: false
227
293
  requirements:
228
294
  - - ! '>='
@@ -230,10 +296,10 @@ dependencies:
230
296
  version: '0'
231
297
  type: :development
232
298
  prerelease: false
233
- version_requirements: *70360914033060
299
+ version_requirements: *70180323465320
234
300
  - !ruby/object:Gem::Dependency
235
301
  name: awesome_print
236
- requirement: &70360914031420 !ruby/object:Gem::Requirement
302
+ requirement: &70180323464460 !ruby/object:Gem::Requirement
237
303
  none: false
238
304
  requirements:
239
305
  - - ! '>='
@@ -241,7 +307,7 @@ dependencies:
241
307
  version: '0'
242
308
  type: :development
243
309
  prerelease: false
244
- version_requirements: *70360914031420
310
+ version_requirements: *70180323464460
245
311
  description: A simple blog engine for hackers.
246
312
  email:
247
313
  - hendrik@mans.de
@@ -251,54 +317,62 @@ extensions: []
251
317
  extra_rdoc_files: []
252
318
  files:
253
319
  - .gitignore
320
+ - .rspec
321
+ - .travis.yml
254
322
  - .watchr
255
323
  - Gemfile
256
324
  - LICENSE
257
325
  - README.md
258
326
  - Rakefile
259
327
  - bin/schreihals
260
- - example/Gemfile
261
- - example/config.ru
262
- - example/posts/2010-06-17-pythton-is-great.md
263
- - example/posts/2011-12-22-ruby-is-great.md
264
- - example/public/media/.gitkeep
265
328
  - lib/public/.gitkeep
266
329
  - lib/public/favicon.ico
267
330
  - lib/schreihals.rb
268
- - lib/schreihals/actions.rb
331
+ - lib/schreihals/actions/admin.rb
332
+ - lib/schreihals/actions/auth.rb
333
+ - lib/schreihals/actions/blog.rb
269
334
  - lib/schreihals/app.rb
270
335
  - lib/schreihals/cli.rb
271
- - lib/schreihals/document.rb
272
336
  - lib/schreihals/helpers.rb
273
337
  - lib/schreihals/post.rb
338
+ - lib/schreihals/rake.rb
274
339
  - lib/schreihals/static.rb
275
340
  - lib/schreihals/version.rb
276
- - lib/templates/first-post.md.tt
277
- - lib/templates/new-post.md.tt
278
341
  - lib/templates/new_blog/.gitignore
279
342
  - lib/templates/new_blog/Gemfile
343
+ - lib/templates/new_blog/Rakefile
344
+ - lib/templates/new_blog/app.rb.tt
280
345
  - lib/templates/new_blog/config.ru.tt
281
- - lib/templates/new_blog/posts/.gitkeep
282
- - lib/templates/new_blog/public/media/.gitkeep
346
+ - lib/templates/new_blog/public/.gitkeep
283
347
  - lib/views/404.haml
348
+ - lib/views/admin/admin.haml
349
+ - lib/views/admin/edit.haml
350
+ - lib/views/admin/new.haml
284
351
  - lib/views/atom.haml
285
352
  - lib/views/blog.scss
286
353
  - lib/views/index.haml
287
354
  - lib/views/layout.haml
355
+ - lib/views/partials/_admin_post_list.haml
288
356
  - lib/views/partials/_disqus.haml
357
+ - lib/views/partials/_form_field.haml
289
358
  - lib/views/partials/_gauges.haml
290
359
  - lib/views/partials/_google_analytics.haml
291
360
  - lib/views/partials/_post.haml
361
+ - lib/views/partials/_post_form.haml
292
362
  - lib/views/post.haml
293
363
  - lib/views/schreihals.scss
294
364
  - schreihals.gemspec
295
- - test/app_test.rb
296
- - test/document_test.rb
297
- - test/files/simple_document.md
298
- - test/posts/2011-12-23-first-post.md
299
- - test/posts/2011-12-24-second-post.md
300
- - test/posts/static-page.md
301
- - test/test_helper.rb
365
+ - spec/app_spec.rb
366
+ - spec/factories.rb
367
+ - spec/post_spec.rb
368
+ - spec/spec_helper.rb
369
+ - test.old/app_test.rb
370
+ - test.old/files/simple_document.md
371
+ - test.old/post_test.rb
372
+ - test.old/posts/2011-12-23-first-post.md
373
+ - test.old/posts/2011-12-24-second-post.md
374
+ - test.old/posts/static-page.md
375
+ - test.old/test_helper.rb
302
376
  homepage: http://hmans.net
303
377
  licenses: []
304
378
  post_install_message:
@@ -324,10 +398,7 @@ signing_key:
324
398
  specification_version: 3
325
399
  summary: A simple blog engine for hackers.
326
400
  test_files:
327
- - test/app_test.rb
328
- - test/document_test.rb
329
- - test/files/simple_document.md
330
- - test/posts/2011-12-23-first-post.md
331
- - test/posts/2011-12-24-second-post.md
332
- - test/posts/static-page.md
333
- - test/test_helper.rb
401
+ - spec/app_spec.rb
402
+ - spec/factories.rb
403
+ - spec/post_spec.rb
404
+ - spec/spec_helper.rb