manuscript 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/.document +5 -0
  2. data/.gitignore +21 -0
  3. data/LICENSE +20 -0
  4. data/README.rdoc +75 -0
  5. data/Rakefile +67 -0
  6. data/VERSION +1 -0
  7. data/config.ru +14 -0
  8. data/db/migrate/001_create_pages.rb +12 -0
  9. data/db/migrate/002_create_templates.rb +12 -0
  10. data/db/migrate/003_add_template_id_to_pages.rb +9 -0
  11. data/db/migrate/004_add_layouts_to_templates.rb +11 -0
  12. data/db/migrate/005_create_template_files.rb +14 -0
  13. data/lib/manuscript/base.rb +9 -0
  14. data/lib/manuscript/keymaster.rb +23 -0
  15. data/lib/manuscript/layout_template.rb +4 -0
  16. data/lib/manuscript/page.rb +20 -0
  17. data/lib/manuscript/page_manager.rb +41 -0
  18. data/lib/manuscript/page_template.rb +13 -0
  19. data/lib/manuscript/template.rb +15 -0
  20. data/lib/manuscript/template_file.rb +11 -0
  21. data/lib/manuscript/template_file_manager.rb +31 -0
  22. data/lib/manuscript/template_manager.rb +44 -0
  23. data/lib/manuscript.rb +30 -0
  24. data/manuscript.gemspec +120 -0
  25. data/public/css/base.css +10 -0
  26. data/public/template_files/000/000/001/RackMultipart20100113-62534-1r8ld4k-0. +4 -0
  27. data/public/template_files/000/000/002/RackMultipart20100113-62565-1r8ld4k-0. +4 -0
  28. data/public/template_files/000/000/003/RackMultipart20100113-62784-1r8ld4k-0. +0 -0
  29. data/public/template_files/000/000/004/test.png +0 -0
  30. data/public/template_files/000/000/005/feed-pink.png +0 -0
  31. data/spec/manuscript/base_spec.rb +24 -0
  32. data/spec/manuscript/layout_template_spec.rb +14 -0
  33. data/spec/manuscript/page_manager_spec.rb +50 -0
  34. data/spec/manuscript/page_spec.rb +30 -0
  35. data/spec/manuscript/page_template_spec.rb +23 -0
  36. data/spec/manuscript/template_file_manager_spec.rb +10 -0
  37. data/spec/manuscript/template_file_spec.rb +4 -0
  38. data/spec/manuscript/template_manager_spec.rb +60 -0
  39. data/spec/spec.opts +1 -0
  40. data/spec/spec_helper.rb +22 -0
  41. data/views/layout.haml +9 -0
  42. data/views/menu.haml +7 -0
  43. data/views/new_template_file.haml +7 -0
  44. data/views/page.haml +25 -0
  45. data/views/pages.haml +7 -0
  46. data/views/template.haml +32 -0
  47. data/views/template_files.haml +6 -0
  48. data/views/templates.haml +15 -0
  49. metadata +190 -0
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ README.rdoc
2
+ lib/**/*.rb
3
+ bin/*
4
+ features/**/*.feature
5
+ LICENSE
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 chrisdinn
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,75 @@
1
+ = Manuscript
2
+
3
+ <b>Manuscript</b> is a wildly simple website publishing system built on Rack using Sinatra (http://github.com/sinatra/sinatra). It's intended
4
+ for use with Hot Ink (http://github.com/hotink/hotink), but as you'll see when we talk about set-up, you can roll it anyway you'd like.
5
+
6
+ Manuscript is meant to handle very simple static content websites. For example: http://cup.ca. The very simple admin interface allows users to
7
+ upload template files (like images and css), to write templates (to hold the code), and write page text in Markdown (to make page maintenance
8
+ easy).
9
+
10
+ == Roll your own database
11
+
12
+ Getting a database in shape for Manuscript to use production is a little complicated at the moment, but it's manageable. To start off, install the gem:
13
+
14
+ gem install manuscript --source http://gemcutter.org
15
+
16
+ Then, clone this repository (this is only used to configure the database) wherever you want to <b>deploy</b> your Manuscript:
17
+
18
+ git clone git://github.com/chrisdinn/manuscript.git
19
+
20
+ Edit the ActiveRecord configuration settings in <tt>Rakefile</tt>, at the bottom in the <tt>:environment</tt> task. You can name your database
21
+ whatever you want. Like so:
22
+
23
+ task :environment do
24
+ require 'manuscript'
25
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'manuscript.sqlite3.db'
26
+ end
27
+
28
+ Then, in the project's directory:
29
+
30
+ rake db:migrate
31
+
32
+ Now you've got a ready-for-production database.
33
+
34
+ == Setting up your Manuscript
35
+
36
+ In the repository directory, edit the file called <tt>config.ru</tt> to match your desired set up:
37
+
38
+ require 'rubygems'
39
+ require 'manuscript'
40
+
41
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'manuscript.sqlite3.db'
42
+
43
+ use Rack::Session::Cookie
44
+ use Gatekeeper::Middleware do |sso|
45
+ sso.sso_url = "http://hotink.theorem.ca/sso"
46
+ end
47
+ use Manuscript::Keymaster, :hotink_account_id => 1
48
+ use Manuscript::PageManager
49
+ use Manuscript::TemplateManager
50
+ use Manuscript::TemplateFileManager
51
+ run Manuscript::Base.new
52
+
53
+ Manuscript::Keymaster works with the Gatekeeper gem to handle authentication with a Hot Ink SSO server. If your Hot Ink installation is located somewhere
54
+ else, be sure you set its address in the Gatekeeper::Middleware config block shown above. Set the Manuscript::Keymaster config option :hotink_account_id
55
+ to the id number of the Hot Ink account that owns this Manuscript.
56
+
57
+ You can then deploy this like any other Rack app. You can even test it out:
58
+
59
+ rackup config.ru
60
+
61
+ To start settings things up, visit "/admin" from your application's host and port.
62
+
63
+ == Note on Patches/Pull Requests
64
+
65
+ * Fork the project.
66
+ * Make your feature addition or bug fix.
67
+ * Add tests for it. This is important so I don't break it in a
68
+ future version unintentionally.
69
+ * Commit, do not mess with rakefile, version, or history.
70
+ (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
71
+ * Send me a pull request. Bonus points for topic branches.
72
+
73
+ == Copyright
74
+
75
+ Copyright (c) 2010 Chris Dinn. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,67 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
+ require 'rubygems'
3
+ require 'rake'
4
+
5
+ begin
6
+ require 'jeweler'
7
+ Jeweler::Tasks.new do |gem|
8
+ gem.name = "manuscript"
9
+ gem.summary = "A gem for publishing a small Hot Ink authenticated site"
10
+ gem.description = "A gem for publishing a small Hot Ink authenticated site"
11
+ gem.email = "chris@hotink.net"
12
+ gem.homepage = "http://github.com/hotink/manuscript"
13
+ gem.authors = ["hotink"]
14
+ gem.add_dependency 'activerecord', '>= 2.3.5'
15
+ gem.add_dependency 'rdiscount', '>= 1.3.5'
16
+ gem.add_dependency 'sinatra', '>= 0.9.4'
17
+ gem.add_dependency 'haml', '>= 2.2.12'
18
+ gem.add_dependency 'gatekeeper', '>= 0.1.1'
19
+ gem.add_dependency 'liquid', '>= 2.0.0'
20
+ gem.add_dependency 'paperclip', '>= 2.3.1.1'
21
+ gem.add_development_dependency "rspec", ">= 1.2.9"
22
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
23
+ end
24
+ Jeweler::GemcutterTasks.new
25
+ rescue LoadError
26
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
27
+ end
28
+
29
+ require 'spec/rake/spectask'
30
+ Spec::Rake::SpecTask.new(:spec) do |spec|
31
+ spec.libs << 'lib' << 'spec'
32
+ spec.spec_files = FileList['spec/**/*_spec.rb']
33
+ end
34
+
35
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
36
+ spec.libs << 'lib' << 'spec'
37
+ spec.pattern = 'spec/**/*_spec.rb'
38
+ spec.rcov = true
39
+ end
40
+
41
+ task :spec => :check_dependencies
42
+
43
+ task :default => :spec
44
+
45
+ require 'rake/rdoctask'
46
+ Rake::RDocTask.new do |rdoc|
47
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
+
49
+ rdoc.rdoc_dir = 'rdoc'
50
+ rdoc.title = "manuscript #{version}"
51
+ rdoc.rdoc_files.include('README*')
52
+ rdoc.rdoc_files.include('lib/**/*.rb')
53
+ end
54
+
55
+ namespace :db do
56
+ desc "Migrate the database"
57
+ task(:migrate => :environment) do
58
+ ActiveRecord::Base.logger = Logger.new(STDOUT)
59
+ ActiveRecord::Migration.verbose = true
60
+ ActiveRecord::Migrator.migrate("db/migrate")
61
+ end
62
+ end
63
+
64
+ task :environment do
65
+ require 'manuscript'
66
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'manuscript.sqlite3.db'
67
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/config.ru ADDED
@@ -0,0 +1,14 @@
1
+ require 'rubygems'
2
+ require 'manuscript'
3
+
4
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'manuscript.sqlite3.db'
5
+
6
+ use Rack::Session::Cookie
7
+ use Gatekeeper::Middleware do |sso|
8
+ sso.sso_url = "http://hotink.theorem.ca/sso"
9
+ end
10
+ use Manuscript::Keymaster, :hotink_account_id => 1
11
+ use Manuscript::PageManager
12
+ use Manuscript::TemplateManager
13
+ use Manuscript::TemplateFileManager
14
+ run Manuscript::Base.new
@@ -0,0 +1,12 @@
1
+ class CreatePages < ActiveRecord::Migration
2
+ def self.up
3
+ create_table "pages" do |t|
4
+ t.string "name"
5
+ t.text "contents"
6
+ end
7
+ end
8
+
9
+ def self.down
10
+ drop_table "templates"
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateTemplates < ActiveRecord::Migration
2
+ def self.up
3
+ create_table "templates" do |t|
4
+ t.string "name"
5
+ t.text "code"
6
+ end
7
+ end
8
+
9
+ def self.down
10
+ drop_table "templates"
11
+ end
12
+ end
@@ -0,0 +1,9 @@
1
+ class AddTemplateIdToPages < ActiveRecord::Migration
2
+ def self.up
3
+ add_column "pages", "template_id", "integer"
4
+ end
5
+
6
+ def self.down
7
+ remove_column "pages", "template_id"
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ class AddLayoutsToTemplates < ActiveRecord::Migration
2
+ def self.up
3
+ add_column "templates", "type", "string"
4
+ add_column "templates", "layout_id", "integer"
5
+ end
6
+
7
+ def self.down
8
+ remove_column "templates", "type"
9
+ remove_column "templates", "layout_id"
10
+ end
11
+ end
@@ -0,0 +1,14 @@
1
+ class CreateTemplateFiles < ActiveRecord::Migration
2
+ def self.up
3
+ create_table "template_files" do |t|
4
+ t.string "file_file_name"
5
+ t.string "file_content_type"
6
+ t.integer "file_file_size"
7
+ t.datetime "file_updated_at"
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table "template_files"
13
+ end
14
+ end
@@ -0,0 +1,9 @@
1
+ module Manuscript
2
+ class Base < Sinatra::Base
3
+ get "/:page_name" do
4
+ @page = Page.find_by_name(params[:page_name])
5
+ raise Sinatra::NotFound unless @page
6
+ @page.to_html
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,23 @@
1
+ module Manuscript
2
+ class Keymaster
3
+
4
+ def initialize(app, options={})
5
+ @app = app
6
+ @hotink_account_id = options[:hotink_account_id] || 1
7
+ end
8
+
9
+ def call(env)
10
+ request = Rack::Request.new(env)
11
+ session = env['rack.session']
12
+ if env['PATH_INFO']=~/^\/admin/
13
+ if (session[:sso] && session[:sso][:user_id]) && (session[:sso][:is_admin?]=='true' || session[:sso]["account_#{@hotink_account_id}_manager"]=='true')
14
+ @app.call(env)
15
+ else
16
+ [302, {"Location" => "/sso/login?return_to=#{request.url}"}, "Redirecting to SSO server..."]
17
+ end
18
+ else
19
+ @app.call(env)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,4 @@
1
+ module Manuscript
2
+ class LayoutTemplate < Template
3
+ end
4
+ end
@@ -0,0 +1,20 @@
1
+ require 'rdiscount'
2
+
3
+ module Manuscript
4
+
5
+ class Page < ActiveRecord::Base
6
+ belongs_to :template
7
+
8
+ validates_presence_of :name
9
+ validates_uniqueness_of :name
10
+
11
+ def to_html
12
+ if template
13
+ template.render({'contents' => RDiscount.new(contents).to_html})
14
+ else
15
+ RDiscount.new(contents).to_html
16
+ end
17
+ end
18
+ end
19
+
20
+ end
@@ -0,0 +1,41 @@
1
+ module Manuscript
2
+
3
+ class PageManager < Sinatra::Base
4
+ enable :methodoverride
5
+
6
+ get "/admin/?" do
7
+ redirect "/admin/pages"
8
+ end
9
+
10
+ get "/admin/pages/?" do
11
+ @pages = Page.all
12
+ haml :pages
13
+ end
14
+
15
+ get "/admin/pages/new" do
16
+ @templates = Manuscript::PageTemplate.all
17
+ @page = Page.new
18
+ haml :page
19
+ end
20
+
21
+ post "/admin/pages/?" do
22
+ @page = Page.create!(params[:page])
23
+ redirect "/admin/pages/#{@page.id}/edit"
24
+ end
25
+
26
+ get "/admin/pages/:id/edit" do
27
+ @templates = Manuscript::PageTemplate.all
28
+ @page = Page.find_by_id params[:id]
29
+ halt 404, "Page not found" unless @page
30
+ haml :page
31
+ end
32
+
33
+ put "/admin/pages/:id/?" do
34
+ @page = Page.find_by_id params[:id]
35
+ halt 404, "Page not found" unless @page
36
+ @page.update_attributes!(params[:page])
37
+ redirect "/admin/pages/#{@page.id}/edit"
38
+ end
39
+ end
40
+
41
+ end
@@ -0,0 +1,13 @@
1
+ module Manuscript
2
+ class PageTemplate < Template
3
+ belongs_to :layout, :class_name => "LayoutTemplate"
4
+
5
+ def render(options)
6
+ if layout
7
+ layout.render({ 'contents' => super(options) })
8
+ else
9
+ super(options)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,15 @@
1
+ require 'liquid'
2
+
3
+ module Manuscript
4
+ class Template < ActiveRecord::Base
5
+ validates_presence_of :name
6
+
7
+ def render(options)
8
+ Liquid::Template.parse(code).render(options)
9
+ end
10
+
11
+ def layout?
12
+ self.kind_of? Manuscript::LayoutTemplate
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ require 'paperclip'
2
+
3
+ module Manuscript
4
+ class TemplateFile < ActiveRecord::Base
5
+ validates_presence_of :file_file_name
6
+
7
+ has_attached_file :file,
8
+ :path => "./public/template_files/:id_partition/:basename.:extension",
9
+ :url => "/template_files/:id_partition/:basename.:extension"
10
+ end
11
+ end
@@ -0,0 +1,31 @@
1
+
2
+ module Manuscript
3
+ class TemplateFileManager < Sinatra::Base
4
+ enable :methodoverride
5
+
6
+ get '/admin/template_files/?' do
7
+ @files = TemplateFile.all
8
+ haml :template_files
9
+ end
10
+
11
+ get '/admin/template_files/new/?' do
12
+ haml :new_template_file
13
+ end
14
+
15
+ post '/admin/template_files' do
16
+ new_file = params[:template_file][:file][:tempfile]
17
+ new_file.original_filename = params[:template_file][:file][:filename]
18
+
19
+ @file = TemplateFile.new
20
+ @file.file = new_file
21
+ @file.save
22
+ puts @file.inspect
23
+ puts params.inspect
24
+ redirect '/admin/template_files'
25
+ end
26
+ end
27
+ end
28
+
29
+ class Tempfile
30
+ attr_accessor :original_filename
31
+ end
@@ -0,0 +1,44 @@
1
+ module Manuscript
2
+ class TemplateManager < Sinatra::Base
3
+ enable :methodoverride
4
+
5
+ get "/admin/templates/?" do
6
+ @templates = PageTemplate.all
7
+ @layouts = LayoutTemplate.all
8
+ haml :templates
9
+ end
10
+
11
+ get "/admin/templates/new" do
12
+ @template = PageTemplate.new
13
+ haml :template
14
+ end
15
+
16
+ get "/admin/layouts/new" do
17
+ @template = LayoutTemplate.new
18
+ haml :template
19
+ end
20
+
21
+ post "/admin/templates/?" do
22
+ @template = PageTemplate.create(params[:template])
23
+ redirect "/admin/templates/#{@template.id}/edit"
24
+ end
25
+
26
+ post "/admin/layouts/?" do
27
+ @template = LayoutTemplate.create(params[:template])
28
+ redirect "/admin/templates/#{@template.id}/edit"
29
+ end
30
+
31
+ get "/admin/templates/:id/edit" do
32
+ @template = Template.find_by_id params[:id]
33
+ halt 404, "Template not found" unless @template
34
+ haml :template
35
+ end
36
+
37
+ put "/admin/templates/:id/?" do
38
+ @template = Template.find_by_id params[:id]
39
+ halt 404, "Template not found" unless @template
40
+ @template.update_attributes(params[:template])
41
+ redirect "/admin/templates/#{@template.id}/edit"
42
+ end
43
+ end
44
+ end
data/lib/manuscript.rb ADDED
@@ -0,0 +1,30 @@
1
+ require 'rack/static'
2
+
3
+ require 'gatekeeper'
4
+ require 'gatekeeper/helpers/authentication'
5
+
6
+ require 'sinatra/base'
7
+ require 'haml'
8
+ require 'active_record'
9
+ require 'logger'
10
+
11
+ require 'manuscript/base'
12
+ require 'manuscript/keymaster'
13
+ require 'manuscript/page'
14
+ require 'manuscript/page_manager'
15
+ require 'manuscript/template'
16
+ require 'manuscript/page_template'
17
+ require 'manuscript/layout_template'
18
+ require 'manuscript/template_manager'
19
+ require 'manuscript/template_file'
20
+ require 'manuscript/template_file_manager'
21
+
22
+ ActiveRecord::Base.logger = Logger.new(STDERR)
23
+
24
+ module Sinatra
25
+ class Base
26
+ set :views, File.dirname(__FILE__) + "/../views"
27
+ set :static, true
28
+ set :public, File.dirname(__FILE__) + "/../public"
29
+ end
30
+ end
@@ -0,0 +1,120 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{manuscript}
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["hotink"]
12
+ s.date = %q{2010-01-13}
13
+ s.description = %q{A gem for publishing a small Hot Ink authenticated site}
14
+ s.email = %q{chris@hotink.net}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".gitignore",
22
+ "LICENSE",
23
+ "README.rdoc",
24
+ "Rakefile",
25
+ "VERSION",
26
+ "config.ru",
27
+ "db/migrate/001_create_pages.rb",
28
+ "db/migrate/002_create_templates.rb",
29
+ "db/migrate/003_add_template_id_to_pages.rb",
30
+ "db/migrate/004_add_layouts_to_templates.rb",
31
+ "db/migrate/005_create_template_files.rb",
32
+ "lib/manuscript.rb",
33
+ "lib/manuscript/base.rb",
34
+ "lib/manuscript/keymaster.rb",
35
+ "lib/manuscript/layout_template.rb",
36
+ "lib/manuscript/page.rb",
37
+ "lib/manuscript/page_manager.rb",
38
+ "lib/manuscript/page_template.rb",
39
+ "lib/manuscript/template.rb",
40
+ "lib/manuscript/template_file.rb",
41
+ "lib/manuscript/template_file_manager.rb",
42
+ "lib/manuscript/template_manager.rb",
43
+ "manuscript.gemspec",
44
+ "public/css/base.css",
45
+ "public/template_files/000/000/001/RackMultipart20100113-62534-1r8ld4k-0.",
46
+ "public/template_files/000/000/002/RackMultipart20100113-62565-1r8ld4k-0.",
47
+ "public/template_files/000/000/003/RackMultipart20100113-62784-1r8ld4k-0.",
48
+ "public/template_files/000/000/004/test.png",
49
+ "public/template_files/000/000/005/feed-pink.png",
50
+ "spec/manuscript/base_spec.rb",
51
+ "spec/manuscript/layout_template_spec.rb",
52
+ "spec/manuscript/page_manager_spec.rb",
53
+ "spec/manuscript/page_spec.rb",
54
+ "spec/manuscript/page_template_spec.rb",
55
+ "spec/manuscript/template_file_manager_spec.rb",
56
+ "spec/manuscript/template_file_spec.rb",
57
+ "spec/manuscript/template_manager_spec.rb",
58
+ "spec/spec.opts",
59
+ "spec/spec_helper.rb",
60
+ "views/layout.haml",
61
+ "views/menu.haml",
62
+ "views/new_template_file.haml",
63
+ "views/page.haml",
64
+ "views/pages.haml",
65
+ "views/template.haml",
66
+ "views/template_files.haml",
67
+ "views/templates.haml"
68
+ ]
69
+ s.homepage = %q{http://github.com/hotink/manuscript}
70
+ s.rdoc_options = ["--charset=UTF-8"]
71
+ s.require_paths = ["lib"]
72
+ s.rubygems_version = %q{1.3.5}
73
+ s.summary = %q{A gem for publishing a small Hot Ink authenticated site}
74
+ s.test_files = [
75
+ "spec/manuscript/base_spec.rb",
76
+ "spec/manuscript/layout_template_spec.rb",
77
+ "spec/manuscript/page_manager_spec.rb",
78
+ "spec/manuscript/page_spec.rb",
79
+ "spec/manuscript/page_template_spec.rb",
80
+ "spec/manuscript/template_file_manager_spec.rb",
81
+ "spec/manuscript/template_file_spec.rb",
82
+ "spec/manuscript/template_manager_spec.rb",
83
+ "spec/spec_helper.rb"
84
+ ]
85
+
86
+ if s.respond_to? :specification_version then
87
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
88
+ s.specification_version = 3
89
+
90
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
91
+ s.add_runtime_dependency(%q<activerecord>, [">= 2.3.5"])
92
+ s.add_runtime_dependency(%q<rdiscount>, [">= 1.3.5"])
93
+ s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
94
+ s.add_runtime_dependency(%q<haml>, [">= 2.2.12"])
95
+ s.add_runtime_dependency(%q<gatekeeper>, [">= 0.1.1"])
96
+ s.add_runtime_dependency(%q<liquid>, [">= 2.0.0"])
97
+ s.add_runtime_dependency(%q<paperclip>, [">= 2.3.1.1"])
98
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
99
+ else
100
+ s.add_dependency(%q<activerecord>, [">= 2.3.5"])
101
+ s.add_dependency(%q<rdiscount>, [">= 1.3.5"])
102
+ s.add_dependency(%q<sinatra>, [">= 0.9.4"])
103
+ s.add_dependency(%q<haml>, [">= 2.2.12"])
104
+ s.add_dependency(%q<gatekeeper>, [">= 0.1.1"])
105
+ s.add_dependency(%q<liquid>, [">= 2.0.0"])
106
+ s.add_dependency(%q<paperclip>, [">= 2.3.1.1"])
107
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
108
+ end
109
+ else
110
+ s.add_dependency(%q<activerecord>, [">= 2.3.5"])
111
+ s.add_dependency(%q<rdiscount>, [">= 1.3.5"])
112
+ s.add_dependency(%q<sinatra>, [">= 0.9.4"])
113
+ s.add_dependency(%q<haml>, [">= 2.2.12"])
114
+ s.add_dependency(%q<gatekeeper>, [">= 0.1.1"])
115
+ s.add_dependency(%q<liquid>, [">= 2.0.0"])
116
+ s.add_dependency(%q<paperclip>, [">= 2.3.1.1"])
117
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
118
+ end
119
+ end
120
+
@@ -0,0 +1,10 @@
1
+ body { font-size: 16px; line-height: 1.1em; font-family: "Helvetica Neue", verdana, tahoma, arial, sans-serif; }
2
+ div#page_container { width: 960px; }
3
+
4
+ ol.menu { list-style: none; padding-left: 0; }
5
+ ol.menu li { display: inline; margin: 0 10px; }
6
+
7
+ form label { display:block; padding: 10px 0; }
8
+ form input[type="text"] { font-size: 18px; width: 600px;}
9
+ form textarea { font-family: "andale mono", courier, tahoma, mono; font-size: 15px; width: 940px; height: 500px; }
10
+ form input[type="submit"] { float: right; }
@@ -0,0 +1,4 @@
1
+ ECQ3LGMOKSE6JLF24QCNOWHJ3OJAHL7TW5V67TWNXROYG5M544MT-
2
+ UVBPX6B6YEI66T44YNXK4NBBS5URF7NTVE4XJMQ5L3TNA2H67QCZ-
3
+ 2XNJGLWWESCRJKETJ5EYFMQCGUSO3AGDYCND4TSTYBVQQ46SINAW-
4
+ 5V532ZINT3THCHNYM36MFVED7BWHKRAR5DXG6L54PUET4XEHQ
@@ -0,0 +1,4 @@
1
+ ECQ3LGMOKSE6JLF24QCNOWHJ3OJAHL7TW5V67TWNXROYG5M544MT-
2
+ UVBPX6B6YEI66T44YNXK4NBBS5URF7NTVE4XJMQ5L3TNA2H67QCZ-
3
+ 2XNJGLWWESCRJKETJ5EYFMQCGUSO3AGDYCND4TSTYBVQQ46SINAW-
4
+ 5V532ZINT3THCHNYM36MFVED7BWHKRAR5DXG6L54PUET4XEHQ
@@ -0,0 +1,24 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::Base do
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ Manuscript::Base
8
+ end
9
+
10
+ before do
11
+ @page = Manuscript::Page.create!(:name => "sample", :contents => "Here are some **Sample issue contents**." )
12
+ end
13
+
14
+ it "should display rendered pages" do
15
+ get "/#{@page.name}"
16
+ last_response.should be_ok
17
+ last_response.body.should == @page.to_html
18
+ end
19
+
20
+ it "should only display existing pages" do
21
+ get "/#{@page.name.reverse}"
22
+ last_response.should be_not_found
23
+ end
24
+ end
@@ -0,0 +1,14 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::LayoutTemplate do
4
+ before do
5
+ @template = Manuscript::LayoutTemplate.new(:name =>"Test template", :code => "<h1>Hello templaters!</h1> {{ contents }}" )
6
+ end
7
+
8
+ it { should validate_presence_of(:name) }
9
+
10
+ it "should render itself with appropriate options" do
11
+ options = {'contents' => "I'll show you some page contents"}
12
+ @template.render(options).should == Liquid::Template.parse(@template.code).render(options)
13
+ end
14
+ end
@@ -0,0 +1,50 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe "PageManager" do
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ Manuscript::PageManager
8
+ end
9
+
10
+ describe "when there are two pages" do
11
+ before do
12
+ @pages = Manuscript::Page.create([{:name => "index", :contents => "Page 1"}, {:name => "contact", :contents => "Page 2"}])
13
+ end
14
+
15
+ it "should display list with both pages" do
16
+ request "/admin/pages"
17
+
18
+ last_response.should be_ok
19
+ last_response.body.should include("index")
20
+ last_response.body.should include("contact")
21
+ end
22
+
23
+ it "should allow new page to be created" do
24
+ get "/admin/pages/new"
25
+ last_response.should be_ok
26
+
27
+ test_time = (Time.now - 1.day).to_s
28
+ post "/admin/pages", :page => { :name => test_time, :contents => test_time }
29
+ last_response.should be_redirect
30
+ follow_redirect!
31
+ last_response.should be_ok
32
+ last_response.body.should include(test_time)
33
+ end
34
+
35
+ it "should allow pages to be edited" do
36
+ page = Manuscript::Page.first
37
+ get "/admin/pages/#{page.id}/edit"
38
+ last_response.should be_ok
39
+ last_response.body.should include(page.contents)
40
+
41
+ test_time = Time.now.to_s
42
+ put "/admin/pages/#{page.id}", :page => { :contents => test_time }
43
+ last_response.should be_redirect
44
+ follow_redirect!
45
+ last_response.should be_ok
46
+ last_response.body.should include(test_time)
47
+ end
48
+ end
49
+
50
+ end
@@ -0,0 +1,30 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::Page do
4
+
5
+ subject { Manuscript::Page.create!(:name => 'words', :contents => 'we got em') }
6
+
7
+ it { should validate_presence_of(:name) }
8
+ it { should validate_uniqueness_of(:name) }
9
+ it { should belong_to(:template) }
10
+
11
+ describe "rendering a page as HTML" do
12
+ before do
13
+ @page = Manuscript::Page.create!(:name => 'words', :contents => 'we **got** em')
14
+ end
15
+
16
+ describe "when the page has no template" do
17
+ it "should render its contents as html directly" do
18
+ @page.to_html.should == RDiscount.new(@page.contents).to_html
19
+ end
20
+ end
21
+
22
+ describe "when the page has a template" do
23
+ it "should render its content inside the appropriate template" do
24
+ @page.template = Manuscript::Template.new(:name =>"Test template", :code => "<h1>Hello templaters!</h1> {{ contents }}" )
25
+ @page.to_html.should == Liquid::Template.parse(@page.template.code).render({'contents' => RDiscount.new(@page.contents).to_html})
26
+ end
27
+ end
28
+ end
29
+
30
+ end
@@ -0,0 +1,23 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::PageTemplate do
4
+ before do
5
+ @template = Manuscript::PageTemplate.new(:name =>"Test template", :code => "<h1>Hello templaters!</h1> {{ contents }}" )
6
+ end
7
+
8
+ it { should validate_presence_of(:name) }
9
+ it { should belong_to(:layout) }
10
+
11
+ it "should render itself with contents if no layout provided" do
12
+ options = {'contents' => "I'll show you some page contents"}
13
+ @template.render(options).should == Liquid::Template.parse(@template.code).render(options)
14
+ end
15
+
16
+ it "should render itself with contents AND layout if layout is provided" do
17
+ @layout = Manuscript::LayoutTemplate.new(:name => "Layout test", :code => "<h1> Laid out!</h1> {{ contents }}")
18
+ options = {'contents' => "I'll show you some page contents"}
19
+ @template.layout = @layout
20
+
21
+ @template.render(options).should == Liquid::Template.parse(@layout.code).render({'contents' => Liquid::Template.parse(@template.code).render(options)})
22
+ end
23
+ end
@@ -0,0 +1,10 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::TemplateFileManager do
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ Manuscript::TemplateFileManager
8
+ end
9
+
10
+ end
@@ -0,0 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::TemplateFile do
4
+ end
@@ -0,0 +1,60 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
2
+
3
+ describe Manuscript::TemplateManager do
4
+ include Rack::Test::Methods
5
+
6
+ def app
7
+ Manuscript::TemplateManager
8
+ end
9
+
10
+ describe "when there are templates and layouts" do
11
+ before do
12
+ Manuscript::PageTemplate.create([{:name => "Template 1"}, {:name => "Template 2"}])
13
+ Manuscript::LayoutTemplate.create([{:name => "Layout 1"}, {:name => "Layout 2"}])
14
+ end
15
+
16
+ it "should display list with both templates and both layouts" do
17
+ get "/admin/templates"
18
+ last_response.should be_ok
19
+ last_response.body.should include("Template 1")
20
+ last_response.body.should include("Template 2")
21
+ last_response.body.should include("Layout 1")
22
+ last_response.body.should include("Layout 2")
23
+ end
24
+
25
+ it "should allow new template to be created" do
26
+ get "/admin/templates/new"
27
+ last_response.should be_ok
28
+
29
+ post "/admin/templates", :template => { :name => "New template" }
30
+ last_response.should be_redirect
31
+ follow_redirect!
32
+ last_response.should be_ok
33
+ last_response.body.should include("New template")
34
+ end
35
+
36
+ it "should allow new layout to be created" do
37
+ get "/admin/layouts/new"
38
+ last_response.should be_ok
39
+
40
+ post "/admin/layouts", :template => { :name => "New layout" }
41
+ last_response.should be_redirect
42
+ follow_redirect!
43
+ last_response.body.should include("New layout")
44
+ end
45
+
46
+ it "should allow templates to be edited" do
47
+ template = Manuscript::Template.first
48
+ get "/admin/templates/#{template.id}/edit"
49
+ last_response.should be_ok
50
+ last_response.body.should include(template.name)
51
+
52
+ put "/admin/templates/#{template.id}", :template => { :name => "My new template" }
53
+ last_response.should be_redirect
54
+ follow_redirect!
55
+ last_response.should be_ok
56
+ last_response.body.should include("My new template")
57
+ end
58
+ end
59
+
60
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1 @@
1
+ --color
@@ -0,0 +1,22 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+
4
+ require 'active_record'
5
+ ActiveRecord::Base.establish_connection :adapter => 'sqlite3', :database => 'manuscript_test.sqlite3.db'
6
+
7
+ require 'manuscript'
8
+ require 'spec'
9
+ require 'spec/autorun'
10
+ require 'rack/test'
11
+ require 'shoulda/active_record'
12
+
13
+ require 'database_cleaner'
14
+ DatabaseCleaner.strategy = :truncation
15
+
16
+ Spec::Runner.configure do |config|
17
+ config.include(Shoulda::ActiveRecord::Matchers)
18
+
19
+ config.after(:each) do
20
+ DatabaseCleaner.clean
21
+ end
22
+ end
data/views/layout.haml ADDED
@@ -0,0 +1,9 @@
1
+ %html
2
+ %head
3
+ %title Manuscript, simple content management
4
+ %link{ :rel=>'stylesheet', :href=>'/css/base.css', :type=>'text/css', :media=>'screen' }
5
+ %body
6
+ #page_container
7
+ = haml(:menu, :layout => false)
8
+ = yield
9
+
data/views/menu.haml ADDED
@@ -0,0 +1,7 @@
1
+ %ol.menu
2
+ %li
3
+ %a{:href => "/admin/pages"} Pages
4
+ %li
5
+ %a{:href => "/admin/templates"} Templates
6
+ %li
7
+ %a{:href => "/admin/template_files"} Files
@@ -0,0 +1,7 @@
1
+ %p
2
+ %a{ :href => "/admin/template_files" } &laquo back
3
+ %form{:method =>:post, :action => "/admin/template_files", :enctype => "multipart/form-data"}
4
+ %label
5
+ Upload template file
6
+ %input{:type => 'file', :name => 'template_file[file]', :id => 'template_file_file'}
7
+ %input{ :type => :submit }
data/views/page.haml ADDED
@@ -0,0 +1,25 @@
1
+ %p
2
+ %a{ :href => "/admin/pages" } &laquo back
3
+ %form{:method =>:post, :action => "/admin/pages/#{@page.id unless @page.new_record? }"}
4
+ - unless @page.new_record?
5
+ %input{ :type => :hidden, :name => "_method", :value => :put }
6
+ %fieldset
7
+ %legend Edit page
8
+ %input{ :type => :submit }
9
+ %label
10
+ Name
11
+ %input{:type => :text, :name => "page[name]", :value => "#{@page.name}"}
12
+ %label
13
+ Template
14
+ %select{:name => "page[template_id]"}
15
+ %option{:value=>""} None
16
+ - @templates.each do |template|
17
+ - if template==@page.template
18
+ %option{:value => "#{template.id}", :selected => "selected"}
19
+ = template.name
20
+ - else
21
+ %option{:value => "#{template.id}"}
22
+ = template.name
23
+ %label{:for => "page_contents" }
24
+ Contents
25
+ %textarea{:name => "page[contents]", :id => "page_contents"}= @page.contents
data/views/pages.haml ADDED
@@ -0,0 +1,7 @@
1
+ %h1 Pages
2
+ %ol
3
+ - @pages.each do |page|
4
+ %li
5
+ %a{:href => "/admin/pages/#{page.id}/edit"}
6
+ = page.name
7
+ %a{ :href => "/admin/pages/new" } New page
@@ -0,0 +1,32 @@
1
+ %p
2
+ %a{ :href => "/admin/templates" } &laquo back
3
+
4
+ - if @template.layout?
5
+ %h1 Layout
6
+ - else
7
+ %h1 Template
8
+
9
+ %form{:method =>:post, :action => "/admin/#{(@template.layout?&&@template.new_record?) ? "layouts" : "templates"}/#{@template.id unless @template.new_record?}"}
10
+ - unless @template.new_record?
11
+ %input{ :type => :hidden, :name => "_method", :value => :put }
12
+ %fieldset
13
+ %legend Edit template
14
+ %input{ :type => :submit }
15
+ %label
16
+ Name
17
+ %input{:type => :text, :name => "template[name]", :value => "#{@template.name}"}
18
+ - unless @template.layout?
19
+ %label
20
+ Layout
21
+ %select{:name => "template[layout_id]"}
22
+ %option{:value=>""} None
23
+ - Manuscript::LayoutTemplate.all.each do |layout|
24
+ - if layout==@template.layout
25
+ %option{:value => "#{layout.id}", :selected => "selected"}
26
+ = layout.name
27
+ - else
28
+ %option{:value => "#{layout.id}"}
29
+ = layout.name
30
+ %label
31
+ Code
32
+ %textarea{:name => "template[code]"}= @template.code
@@ -0,0 +1,6 @@
1
+ %h1 Template files
2
+ %ol
3
+ - @files.each do |file|
4
+ %li
5
+ = file.file.url
6
+ %a{ :href => "/admin/template_files/new" } Upload a file
@@ -0,0 +1,15 @@
1
+ %h1 Templates
2
+ %ol
3
+ - @templates.each do |template|
4
+ %li
5
+ %a{:href => "/admin/templates/#{template.id}/edit"}
6
+ = template.name
7
+ %a{ :href => "/admin/templates/new" } New template
8
+
9
+ %h1 Layouts
10
+ %ol
11
+ - @layouts.each do |template|
12
+ %li
13
+ %a{:href => "/admin/templates/#{template.id}/edit"}
14
+ = template.name
15
+ %a{ :href => "/admin/layouts/new" } New layout
metadata ADDED
@@ -0,0 +1,190 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: manuscript
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - hotink
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2010-01-13 00:00:00 -05:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.3.5
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: rdiscount
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.3.5
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: sinatra
37
+ type: :runtime
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 0.9.4
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: haml
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 2.2.12
54
+ version:
55
+ - !ruby/object:Gem::Dependency
56
+ name: gatekeeper
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: 0.1.1
64
+ version:
65
+ - !ruby/object:Gem::Dependency
66
+ name: liquid
67
+ type: :runtime
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 2.0.0
74
+ version:
75
+ - !ruby/object:Gem::Dependency
76
+ name: paperclip
77
+ type: :runtime
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 2.3.1.1
84
+ version:
85
+ - !ruby/object:Gem::Dependency
86
+ name: rspec
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: 1.2.9
94
+ version:
95
+ description: A gem for publishing a small Hot Ink authenticated site
96
+ email: chris@hotink.net
97
+ executables: []
98
+
99
+ extensions: []
100
+
101
+ extra_rdoc_files:
102
+ - LICENSE
103
+ - README.rdoc
104
+ files:
105
+ - .document
106
+ - .gitignore
107
+ - LICENSE
108
+ - README.rdoc
109
+ - Rakefile
110
+ - VERSION
111
+ - config.ru
112
+ - db/migrate/001_create_pages.rb
113
+ - db/migrate/002_create_templates.rb
114
+ - db/migrate/003_add_template_id_to_pages.rb
115
+ - db/migrate/004_add_layouts_to_templates.rb
116
+ - db/migrate/005_create_template_files.rb
117
+ - lib/manuscript.rb
118
+ - lib/manuscript/base.rb
119
+ - lib/manuscript/keymaster.rb
120
+ - lib/manuscript/layout_template.rb
121
+ - lib/manuscript/page.rb
122
+ - lib/manuscript/page_manager.rb
123
+ - lib/manuscript/page_template.rb
124
+ - lib/manuscript/template.rb
125
+ - lib/manuscript/template_file.rb
126
+ - lib/manuscript/template_file_manager.rb
127
+ - lib/manuscript/template_manager.rb
128
+ - manuscript.gemspec
129
+ - public/css/base.css
130
+ - public/template_files/000/000/001/RackMultipart20100113-62534-1r8ld4k-0.
131
+ - public/template_files/000/000/002/RackMultipart20100113-62565-1r8ld4k-0.
132
+ - public/template_files/000/000/003/RackMultipart20100113-62784-1r8ld4k-0.
133
+ - public/template_files/000/000/004/test.png
134
+ - public/template_files/000/000/005/feed-pink.png
135
+ - spec/manuscript/base_spec.rb
136
+ - spec/manuscript/layout_template_spec.rb
137
+ - spec/manuscript/page_manager_spec.rb
138
+ - spec/manuscript/page_spec.rb
139
+ - spec/manuscript/page_template_spec.rb
140
+ - spec/manuscript/template_file_manager_spec.rb
141
+ - spec/manuscript/template_file_spec.rb
142
+ - spec/manuscript/template_manager_spec.rb
143
+ - spec/spec.opts
144
+ - spec/spec_helper.rb
145
+ - views/layout.haml
146
+ - views/menu.haml
147
+ - views/new_template_file.haml
148
+ - views/page.haml
149
+ - views/pages.haml
150
+ - views/template.haml
151
+ - views/template_files.haml
152
+ - views/templates.haml
153
+ has_rdoc: true
154
+ homepage: http://github.com/hotink/manuscript
155
+ licenses: []
156
+
157
+ post_install_message:
158
+ rdoc_options:
159
+ - --charset=UTF-8
160
+ require_paths:
161
+ - lib
162
+ required_ruby_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: "0"
167
+ version:
168
+ required_rubygems_version: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: "0"
173
+ version:
174
+ requirements: []
175
+
176
+ rubyforge_project:
177
+ rubygems_version: 1.3.5
178
+ signing_key:
179
+ specification_version: 3
180
+ summary: A gem for publishing a small Hot Ink authenticated site
181
+ test_files:
182
+ - spec/manuscript/base_spec.rb
183
+ - spec/manuscript/layout_template_spec.rb
184
+ - spec/manuscript/page_manager_spec.rb
185
+ - spec/manuscript/page_spec.rb
186
+ - spec/manuscript/page_template_spec.rb
187
+ - spec/manuscript/template_file_manager_spec.rb
188
+ - spec/manuscript/template_file_spec.rb
189
+ - spec/manuscript/template_manager_spec.rb
190
+ - spec/spec_helper.rb