serious 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -6,7 +6,7 @@ require 'yaml'
6
6
 
7
7
  class Serious < Sinatra::Base
8
8
 
9
- set :articles, Proc.new { File.join(root, 'articles') }
9
+ set :articles, Proc.new { File.join(Dir.getwd, 'articles') }
10
10
  set :static, true # Required to serve static files, see http://www.sinatrarb.com/configuration.html
11
11
 
12
12
  not_found do
@@ -58,4 +58,7 @@ $:.unshift File.dirname(__FILE__)
58
58
  require 'serious/article'
59
59
  # Set up default stupid_formatter chain
60
60
  StupidFormatter.chain = [StupidFormatter::Erb, StupidFormatter::RDiscount]
61
- Serious.set :root, Dir.getwd
61
+ Serious.set :root, File.join(File.dirname(__FILE__), 'site')
62
+ Serious.set :title, "Serious"
63
+
64
+
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,12 +3,12 @@
3
3
  <link rel="stylesheet" type="text/css" href="/css/serious.css">
4
4
  <link rel="stylesheet" type="text/css" href="/css/coderay.css">
5
5
  <link rel="alternate" type="application/atom+xml" title="Serious Test Layout" href="/atom.xml" />
6
- <title>Serious Test Layout</title>
6
+ <title><%= @article ? @article.title + " - " : "" %><%= Serious.title %></title>
7
7
  </head>
8
8
 
9
9
  <body>
10
10
  <div id="header">
11
- <h1><a href="/">Serious Blog</a></h1>
11
+ <h1><a href="/"><%= Serious.title %></a></h1>
12
12
  </div>
13
13
  <div id="container">
14
14
  <%= yield %>
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{serious}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Christoph Olszowka"]
@@ -25,22 +25,22 @@ Gem::Specification.new do |s|
25
25
  "VERSION",
26
26
  "lib/serious.rb",
27
27
  "lib/serious/article.rb",
28
+ "lib/site/public/css/coderay.css",
29
+ "lib/site/public/css/serious.css",
30
+ "lib/site/views/404.erb",
31
+ "lib/site/views/_archives.erb",
32
+ "lib/site/views/_article.erb",
33
+ "lib/site/views/archives.erb",
34
+ "lib/site/views/index.erb",
35
+ "lib/site/views/layout.erb",
28
36
  "serious.gemspec",
29
37
  "test/articles/2000-01-01-disco-2000.txt",
30
38
  "test/articles/2009-04-01-foo-bar.txt",
31
39
  "test/articles/2009-12-11-ruby-is-the-shit.txt",
32
40
  "test/articles/2009-12-24-merry-christmas.txt",
33
41
  "test/helper.rb",
34
- "test/public/css/coderay.css",
35
- "test/public/css/serious.css",
36
42
  "test/test_article.rb",
37
- "test/test_serious.rb",
38
- "test/views/404.erb",
39
- "test/views/_archives.erb",
40
- "test/views/_article.erb",
41
- "test/views/archives.erb",
42
- "test/views/index.erb",
43
- "test/views/layout.erb"
43
+ "test/test_serious.rb"
44
44
  ]
45
45
  s.homepage = %q{http://github.com/colszowka/serious}
46
46
  s.rdoc_options = ["--charset=UTF-8"]
@@ -10,7 +10,8 @@ require 'serious'
10
10
 
11
11
  class Test::Unit::TestCase
12
12
  include Rack::Test::Methods
13
- Serious.root = File.dirname(__FILE__)
13
+ Serious.set :title, "Serious Test Blog"
14
+ Serious.set :articles, File.join(File.dirname(__FILE__), 'articles')
14
15
  StupidFormatter.chain = [StupidFormatter::Erb, StupidFormatter::RDiscount]
15
16
 
16
17
  def app
@@ -9,6 +9,9 @@ class TestSerious < Test::Unit::TestCase
9
9
  setup { get '/' }
10
10
 
11
11
  should_respond_with 200
12
+
13
+ should_contain_text "Serious Test Blog", "#header h1 a"
14
+
12
15
  should_contain_elements 3, "ul#articles li"
13
16
  should_contain_text "Merry Christmas!", "ul#articles li:first"
14
17
  should_contain_text "Merry christmas, dear reader!", "ul#articles li:first"
@@ -19,6 +22,7 @@ class TestSerious < Test::Unit::TestCase
19
22
  should_not_contain_text "The number is 4", "ul#articles li"
20
23
 
21
24
  should_contain_text "Foo Bar", "ul#articles"
25
+ should_contain_text "Serious Test Blog", "head title"
22
26
 
23
27
  should_contain_elements 1, "ul.archives li"
24
28
  should_contain_text "Disco 2000", "ul.archives li:first"
@@ -113,6 +117,7 @@ class TestSerious < Test::Unit::TestCase
113
117
 
114
118
  should_respond_with 200
115
119
  should_contain_text "Merry Christmas!", "#container h2:first"
120
+ should_contain_text "Merry Christmas! - Serious Test Blog", "head title"
116
121
  should_contain_text "Merry christmas, dear reader!", ".article .body"
117
122
  should_contain_text "Lorem ipsum dolor...", ".article .body"
118
123
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serious
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoph Olszowka
@@ -80,22 +80,22 @@ files:
80
80
  - VERSION
81
81
  - lib/serious.rb
82
82
  - lib/serious/article.rb
83
+ - lib/site/public/css/coderay.css
84
+ - lib/site/public/css/serious.css
85
+ - lib/site/views/404.erb
86
+ - lib/site/views/_archives.erb
87
+ - lib/site/views/_article.erb
88
+ - lib/site/views/archives.erb
89
+ - lib/site/views/index.erb
90
+ - lib/site/views/layout.erb
83
91
  - serious.gemspec
84
92
  - test/articles/2000-01-01-disco-2000.txt
85
93
  - test/articles/2009-04-01-foo-bar.txt
86
94
  - test/articles/2009-12-11-ruby-is-the-shit.txt
87
95
  - test/articles/2009-12-24-merry-christmas.txt
88
96
  - test/helper.rb
89
- - test/public/css/coderay.css
90
- - test/public/css/serious.css
91
97
  - test/test_article.rb
92
98
  - test/test_serious.rb
93
- - test/views/404.erb
94
- - test/views/_archives.erb
95
- - test/views/_article.erb
96
- - test/views/archives.erb
97
- - test/views/index.erb
98
- - test/views/layout.erb
99
99
  has_rdoc: true
100
100
  homepage: http://github.com/colszowka/serious
101
101
  licenses: []