manuscript 0.1.7 → 0.1.8

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.7
1
+ 0.1.8
@@ -8,9 +8,11 @@ module Manuscript
8
8
  end
9
9
 
10
10
  get "/" do
11
+ @user = session[:sso].nil? ? nil : User.new(session[:sso])
11
12
  @page = Page.find_by_name('index')
12
13
  raise Sinatra::NotFound unless @page
13
14
  @page.to_html(@user)
14
15
  end
16
+
15
17
  end
16
18
  end
data/lib/manuscript.rb CHANGED
@@ -27,5 +27,6 @@ module Sinatra
27
27
  set :views, File.dirname(__FILE__) + "/../views"
28
28
  set :static, true
29
29
  set :public, File.dirname(__FILE__) + "/../public"
30
+ set :raise_errors, false
30
31
  end
31
32
  end
data/manuscript.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{manuscript}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["hotink"]
12
- s.date = %q{2010-01-16}
12
+ s.date = %q{2010-01-20}
13
13
  s.description = %q{A gem for publishing a small Hot Ink authenticated site}
14
14
  s.email = %q{chris@hotink.net}
15
15
  s.extra_rdoc_files = [
@@ -13,7 +13,7 @@ describe "PageManager" do
13
13
  end
14
14
 
15
15
  it "should display list with both pages" do
16
- request "/admin/pages"
16
+ get "/admin/pages"
17
17
 
18
18
  last_response.should be_ok
19
19
  last_response.body.should include("index")
@@ -24,12 +24,11 @@ describe "PageManager" do
24
24
  get "/admin/pages/new"
25
25
  last_response.should be_ok
26
26
 
27
- test_time = (Time.now - 1.day).to_s
28
- post "/admin/pages", :page => { :name => test_time, :contents => test_time }
27
+ post "/admin/pages", :page => { :name => "new-page", :contents => "New page contents" }
29
28
  last_response.should be_redirect
30
29
  follow_redirect!
31
30
  last_response.should be_ok
32
- last_response.body.should include(test_time)
31
+ last_response.body.should include("New page contents")
33
32
  end
34
33
 
35
34
  it "should allow pages to be edited" do
@@ -38,12 +37,11 @@ describe "PageManager" do
38
37
  last_response.should be_ok
39
38
  last_response.body.should include(page.contents)
40
39
 
41
- test_time = Time.now.to_s
42
- put "/admin/pages/#{page.id}", :page => { :contents => test_time }
40
+ put "/admin/pages/#{page.id}", :page => { :contents => "Changed page contents" }
43
41
  last_response.should be_redirect
44
42
  follow_redirect!
45
43
  last_response.should be_ok
46
- last_response.body.should include(test_time)
44
+ last_response.body.should include("Changed page contents")
47
45
  end
48
46
  end
49
47
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: manuscript
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - hotink
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-01-16 00:00:00 -05:00
12
+ date: 2010-01-20 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency