nesta 0.9.10 → 0.9.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +27 -0
 - data/Gemfile.lock +4 -6
 - data/lib/nesta.rb +1 -0
 - data/lib/nesta/app.rb +16 -2
 - data/lib/nesta/commands.rb +11 -7
 - data/lib/nesta/models.rb +26 -29
 - data/lib/nesta/version.rb +1 -1
 - data/nesta.gemspec +1 -1
 - data/spec/atom_spec.rb +2 -1
 - data/spec/commands_spec.rb +2 -2
 - data/spec/models_spec.rb +1 -1
 - data/spec/page_spec.rb +51 -22
 - data/views/page.haml +1 -1
 - metadata +94 -39
 
    
        data/CHANGES
    CHANGED
    
    | 
         @@ -1,3 +1,30 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            = 0.9.11 / (22 September 2011)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
             * Use Tilt to render the Markdown, Textile and Haml in content/pages.
         
     | 
| 
      
 4 
     | 
    
         
            +
               RDiscount is now the default Markdown processor. To continue using
         
     | 
| 
      
 5 
     | 
    
         
            +
               Maruku add it to Gemfile and call `Tilt.prefer Tilt::MarukuTemplate`
         
     | 
| 
      
 6 
     | 
    
         
            +
               in your app.rb file.
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
             * Remove trailing slashes from all URLs, redirecting to the URL without
         
     | 
| 
      
 9 
     | 
    
         
            +
               the slash. See ticket #60 on GitHub.
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
             * Added the 'Articles heading' metadata key. When articles are listed
         
     | 
| 
      
 12 
     | 
    
         
            +
               on a category page, Nesta adds a heading above the articles based on
         
     | 
| 
      
 13 
     | 
    
         
            +
               the category's title (e.g. "Articles on Thing").  If you set the
         
     | 
| 
      
 14 
     | 
    
         
            +
               'Articles heading' metadata Nesta will allow you to override the
         
     | 
| 
      
 15 
     | 
    
         
            +
               entire heading for a given page.
         
     | 
| 
      
 16 
     | 
    
         
            +
             
     | 
| 
      
 17 
     | 
    
         
            +
             * Bug fix: require nesta/plugin automatically on load. The
         
     | 
| 
      
 18 
     | 
    
         
            +
               Nesta::Plugin.register method is called by plugins as soon as they
         
     | 
| 
      
 19 
     | 
    
         
            +
               are loaded, so we need to make it available. In 0.9.10 this method
         
     | 
| 
      
 20 
     | 
    
         
            +
               wasn't available until too late.
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
             * Bug fix: Minor updates to the files generated by `nesta plugin:create`.
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
             * Bug fix: Don't allow retrieval of the contents of any file
         
     | 
| 
      
 25 
     | 
    
         
            +
               within the content folder by crafting a relative path containing
         
     | 
| 
      
 26 
     | 
    
         
            +
               the string '../' (Louis Nyffenegger).
         
     | 
| 
      
 27 
     | 
    
         
            +
             
     | 
| 
       1 
28 
     | 
    
         
             
            = 0.9.10 / (9 September 2011)
         
     | 
| 
       2 
29 
     | 
    
         | 
| 
       3 
30 
     | 
    
         
             
             * Load Nesta plugins from gems. Any gem whose name begins with
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    | 
         @@ -1,10 +1,10 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            PATH
         
     | 
| 
       2 
2 
     | 
    
         
             
              remote: .
         
     | 
| 
       3 
3 
     | 
    
         
             
              specs:
         
     | 
| 
       4 
     | 
    
         
            -
                nesta (0.9. 
     | 
| 
      
 4 
     | 
    
         
            +
                nesta (0.9.11)
         
     | 
| 
       5 
5 
     | 
    
         
             
                  RedCloth (~> 4.2)
         
     | 
| 
       6 
6 
     | 
    
         
             
                  haml (~> 3.1)
         
     | 
| 
       7 
     | 
    
         
            -
                   
     | 
| 
      
 7 
     | 
    
         
            +
                  rdiscount (~> 1.6)
         
     | 
| 
       8 
8 
     | 
    
         
             
                  sass (~> 3.1)
         
     | 
| 
       9 
9 
     | 
    
         
             
                  shotgun (>= 0.8)
         
     | 
| 
       10 
10 
     | 
    
         
             
                  sinatra (= 1.2.6)
         
     | 
| 
         @@ -13,16 +13,15 @@ GEM 
     | 
|
| 
       13 
13 
     | 
    
         
             
              remote: http://rubygems.org/
         
     | 
| 
       14 
14 
     | 
    
         
             
              specs:
         
     | 
| 
       15 
15 
     | 
    
         
             
                RedCloth (4.2.8)
         
     | 
| 
       16 
     | 
    
         
            -
                haml (3.1. 
     | 
| 
      
 16 
     | 
    
         
            +
                haml (3.1.3)
         
     | 
| 
       17 
17 
     | 
    
         
             
                hoe (2.12.2)
         
     | 
| 
       18 
18 
     | 
    
         
             
                  rake (~> 0.8)
         
     | 
| 
       19 
19 
     | 
    
         
             
                hpricot (0.8.4)
         
     | 
| 
       20 
     | 
    
         
            -
                maruku (0.6.0)
         
     | 
| 
       21 
     | 
    
         
            -
                  syntax (>= 1.0.0)
         
     | 
| 
       22 
20 
     | 
    
         
             
                rack (1.3.2)
         
     | 
| 
       23 
21 
     | 
    
         
             
                rack-test (0.6.1)
         
     | 
| 
       24 
22 
     | 
    
         
             
                  rack (>= 1.0)
         
     | 
| 
       25 
23 
     | 
    
         
             
                rake (0.9.2)
         
     | 
| 
      
 24 
     | 
    
         
            +
                rdiscount (1.6.8)
         
     | 
| 
       26 
25 
     | 
    
         
             
                rspec (1.3.0)
         
     | 
| 
       27 
26 
     | 
    
         
             
                rspec_hpricot_matchers (1.0)
         
     | 
| 
       28 
27 
     | 
    
         
             
                sass (3.1.7)
         
     | 
| 
         @@ -31,7 +30,6 @@ GEM 
     | 
|
| 
       31 
30 
     | 
    
         
             
                sinatra (1.2.6)
         
     | 
| 
       32 
31 
     | 
    
         
             
                  rack (~> 1.1)
         
     | 
| 
       33 
32 
     | 
    
         
             
                  tilt (< 2.0, >= 1.2.2)
         
     | 
| 
       34 
     | 
    
         
            -
                syntax (1.0.0)
         
     | 
| 
       35 
33 
     | 
    
         
             
                test-unit (1.2.3)
         
     | 
| 
       36 
34 
     | 
    
         
             
                  hoe (>= 1.5.1)
         
     | 
| 
       37 
35 
     | 
    
         
             
                tilt (1.3.3)
         
     | 
    
        data/lib/nesta.rb
    ADDED
    
    | 
         @@ -0,0 +1 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "nesta/plugin"
         
     | 
    
        data/lib/nesta/app.rb
    CHANGED
    
    | 
         @@ -100,6 +100,16 @@ module Nesta 
     | 
|
| 
       100 
100 
     | 
    
         
             
                  def article_summaries(articles)
         
     | 
| 
       101 
101 
     | 
    
         
             
                    haml(:summaries, :layout => false, :locals => { :pages => articles })
         
     | 
| 
       102 
102 
     | 
    
         
             
                  end
         
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                  def articles_heading
         
     | 
| 
      
 105 
     | 
    
         
            +
                    @page.metadata('articles heading') || "Articles on #{@page.heading}"
         
     | 
| 
      
 106 
     | 
    
         
            +
                  end
         
     | 
| 
      
 107 
     | 
    
         
            +
                end
         
     | 
| 
      
 108 
     | 
    
         
            +
             
     | 
| 
      
 109 
     | 
    
         
            +
                before do
         
     | 
| 
      
 110 
     | 
    
         
            +
                  if request.path =~ Regexp.new('./$')
         
     | 
| 
      
 111 
     | 
    
         
            +
                    redirect to(request.path.sub(Regexp.new('/$'), ''))
         
     | 
| 
      
 112 
     | 
    
         
            +
                  end
         
     | 
| 
       103 
113 
     | 
    
         
             
                end
         
     | 
| 
       104 
114 
     | 
    
         | 
| 
       105 
115 
     | 
    
         
             
                not_found do
         
     | 
| 
         @@ -128,9 +138,13 @@ module Nesta 
     | 
|
| 
       128 
138 
     | 
    
         
             
                  cache stylesheet(params[:sheet].to_sym)
         
     | 
| 
       129 
139 
     | 
    
         
             
                end
         
     | 
| 
       130 
140 
     | 
    
         | 
| 
       131 
     | 
    
         
            -
                get %r{/attachments/([\w/.-]+)} do
         
     | 
| 
      
 141 
     | 
    
         
            +
                get %r{/attachments/([\w/.-]+)} do |file|
         
     | 
| 
       132 
142 
     | 
    
         
             
                  file = File.join(Nesta::Config.attachment_path, params[:captures].first)
         
     | 
| 
       133 
     | 
    
         
            -
                   
     | 
| 
      
 143 
     | 
    
         
            +
                  if file =~ /\.\.\//
         
     | 
| 
      
 144 
     | 
    
         
            +
                    not_found
         
     | 
| 
      
 145 
     | 
    
         
            +
                  else 
         
     | 
| 
      
 146 
     | 
    
         
            +
                    send_file(file, :disposition => nil)
         
     | 
| 
      
 147 
     | 
    
         
            +
                  end
         
     | 
| 
       134 
148 
     | 
    
         
             
                end
         
     | 
| 
       135 
149 
     | 
    
         | 
| 
       136 
150 
     | 
    
         
             
                get '/articles.xml' do
         
     | 
    
        data/lib/nesta/commands.rb
    CHANGED
    
    | 
         @@ -166,9 +166,7 @@ module Nesta 
     | 
|
| 
       166 
166 
     | 
    
         
             
              module Plugin
         
     | 
| 
       167 
167 
     | 
    
         
             
                module #{module_name}
         
     | 
| 
       168 
168 
     | 
    
         
             
                  module Helpers
         
     | 
| 
       169 
     | 
    
         
            -
                     
     | 
| 
       170 
     | 
    
         
            -
                      # If your plugin needs any helper methods, add them here...
         
     | 
| 
       171 
     | 
    
         
            -
                    end 
         
     | 
| 
      
 169 
     | 
    
         
            +
                    # If your plugin needs any helper methods, add them here...
         
     | 
| 
       172 
170 
     | 
    
         
             
                  end
         
     | 
| 
       173 
171 
     | 
    
         
             
                end
         
     | 
| 
       174 
172 
     | 
    
         
             
              end
         
     | 
| 
         @@ -182,13 +180,19 @@ end 
     | 
|
| 
       182 
180 
     | 
    
         
             
                    end
         
     | 
| 
       183 
181 
     | 
    
         | 
| 
       184 
182 
     | 
    
         
             
                    def specify_gem_dependency
         
     | 
| 
       185 
     | 
    
         
            -
                      File. 
     | 
| 
      
 183 
     | 
    
         
            +
                      gemspec = File.join(@gem_name, "#{@gem_name}.gemspec")
         
     | 
| 
      
 184 
     | 
    
         
            +
                      File.open(gemspec, 'r+') do |file|
         
     | 
| 
      
 185 
     | 
    
         
            +
                        output = ''
         
     | 
| 
       186 
186 
     | 
    
         
             
                        file.each_line do |line|
         
     | 
| 
       187 
     | 
    
         
            -
                          if line =~ / 
     | 
| 
       188 
     | 
    
         
            -
                             
     | 
| 
       189 
     | 
    
         
            -
                             
     | 
| 
      
 187 
     | 
    
         
            +
                          if line =~ /^end/
         
     | 
| 
      
 188 
     | 
    
         
            +
                            output << '  s.add_dependency("nesta", ">= 0.9.11")' + "\n"
         
     | 
| 
      
 189 
     | 
    
         
            +
                            output << '  s.add_development_dependency("rake")' + "\n"
         
     | 
| 
       190 
190 
     | 
    
         
             
                          end
         
     | 
| 
      
 191 
     | 
    
         
            +
                          output << line
         
     | 
| 
       191 
192 
     | 
    
         
             
                        end
         
     | 
| 
      
 193 
     | 
    
         
            +
                        file.pos = 0
         
     | 
| 
      
 194 
     | 
    
         
            +
                        file.print(output)
         
     | 
| 
      
 195 
     | 
    
         
            +
                        file.truncate(file.pos)
         
     | 
| 
       192 
196 
     | 
    
         
             
                      end
         
     | 
| 
       193 
197 
     | 
    
         
             
                    end
         
     | 
| 
       194 
198 
     | 
    
         | 
    
        data/lib/nesta/models.rb
    CHANGED
    
    | 
         @@ -1,8 +1,10 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            require  
     | 
| 
      
 1 
     | 
    
         
            +
            require 'time'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
             
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 3 
     | 
    
         
            +
            Tilt.register Tilt::MarukuTemplate, 'mdown'
         
     | 
| 
      
 4 
     | 
    
         
            +
            Tilt.register Tilt::KramdownTemplate, 'mdown'
         
     | 
| 
      
 5 
     | 
    
         
            +
            Tilt.register Tilt::BlueClothTemplate, 'mdown'
         
     | 
| 
      
 6 
     | 
    
         
            +
            Tilt.register Tilt::RDiscountTemplate, 'mdown'
         
     | 
| 
      
 7 
     | 
    
         
            +
            Tilt.register Tilt::RedcarpetTemplate, 'mdown'
         
     | 
| 
       6 
8 
     | 
    
         | 
| 
       7 
9 
     | 
    
         
             
            module Nesta
         
     | 
| 
       8 
10 
     | 
    
         
             
              class FileModel
         
     | 
| 
         @@ -11,6 +13,12 @@ module Nesta 
     | 
|
| 
       11 
13 
     | 
    
         | 
| 
       12 
14 
     | 
    
         
             
                attr_reader :filename, :mtime
         
     | 
| 
       13 
15 
     | 
    
         | 
| 
      
 16 
     | 
    
         
            +
                class CaseInsensitiveHash < Hash
         
     | 
| 
      
 17 
     | 
    
         
            +
                  def [](key)
         
     | 
| 
      
 18 
     | 
    
         
            +
                    super(key.to_s.downcase)
         
     | 
| 
      
 19 
     | 
    
         
            +
                  end
         
     | 
| 
      
 20 
     | 
    
         
            +
                end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
       14 
22 
     | 
    
         
             
                def self.model_path(basename = nil)
         
     | 
| 
       15 
23 
     | 
    
         
             
                  Nesta::Config.content_path(basename)
         
     | 
| 
       16 
24 
     | 
    
         
             
                end
         
     | 
| 
         @@ -51,7 +59,7 @@ module Nesta 
     | 
|
| 
       51 
59 
     | 
    
         | 
| 
       52 
60 
     | 
    
         
             
                def initialize(filename)
         
     | 
| 
       53 
61 
     | 
    
         
             
                  @filename = filename
         
     | 
| 
       54 
     | 
    
         
            -
                  @format = filename.split( 
     | 
| 
      
 62 
     | 
    
         
            +
                  @format = filename.split('.').last.to_sym
         
     | 
| 
       55 
63 
     | 
    
         
             
                  if File.zero?(filename)
         
     | 
| 
       56 
64 
     | 
    
         
             
                    @metadata = {}
         
     | 
| 
       57 
65 
     | 
    
         
             
                    @markup = ''
         
     | 
| 
         @@ -83,11 +91,11 @@ module Nesta 
     | 
|
| 
       83 
91 
     | 
    
         
             
                end
         
     | 
| 
       84 
92 
     | 
    
         | 
| 
       85 
93 
     | 
    
         
             
                def layout
         
     | 
| 
       86 
     | 
    
         
            -
                  (metadata( 
     | 
| 
      
 94 
     | 
    
         
            +
                  (metadata('layout') || 'layout').to_sym
         
     | 
| 
       87 
95 
     | 
    
         
             
                end
         
     | 
| 
       88 
96 
     | 
    
         | 
| 
       89 
97 
     | 
    
         
             
                def template
         
     | 
| 
       90 
     | 
    
         
            -
                  (metadata( 
     | 
| 
      
 98 
     | 
    
         
            +
                  (metadata('template') || 'page').to_sym
         
     | 
| 
       91 
99 
     | 
    
         
             
                end
         
     | 
| 
       92 
100 
     | 
    
         | 
| 
       93 
101 
     | 
    
         
             
                def to_html(scope = nil)
         
     | 
| 
         @@ -99,11 +107,11 @@ module Nesta 
     | 
|
| 
       99 
107 
     | 
    
         
             
                end
         
     | 
| 
       100 
108 
     | 
    
         | 
| 
       101 
109 
     | 
    
         
             
                def description
         
     | 
| 
       102 
     | 
    
         
            -
                  metadata( 
     | 
| 
      
 110 
     | 
    
         
            +
                  metadata('description')
         
     | 
| 
       103 
111 
     | 
    
         
             
                end
         
     | 
| 
       104 
112 
     | 
    
         | 
| 
       105 
113 
     | 
    
         
             
                def keywords
         
     | 
| 
       106 
     | 
    
         
            -
                  metadata( 
     | 
| 
      
 114 
     | 
    
         
            +
                  metadata('keywords')
         
     | 
| 
       107 
115 
     | 
    
         
             
                end
         
     | 
| 
       108 
116 
     | 
    
         | 
| 
       109 
117 
     | 
    
         
             
                def metadata(key)
         
     | 
| 
         @@ -111,8 +119,8 @@ module Nesta 
     | 
|
| 
       111 
119 
     | 
    
         
             
                end
         
     | 
| 
       112 
120 
     | 
    
         | 
| 
       113 
121 
     | 
    
         
             
                def flagged_as?(flag)
         
     | 
| 
       114 
     | 
    
         
            -
                  flags = metadata( 
     | 
| 
       115 
     | 
    
         
            -
                  flags && flags.split( 
     | 
| 
      
 122 
     | 
    
         
            +
                  flags = metadata('flags')
         
     | 
| 
      
 123 
     | 
    
         
            +
                  flags && flags.split(',').map { |name| name.strip }.include?(flag)
         
     | 
| 
       116 
124 
     | 
    
         
             
                end
         
     | 
| 
       117 
125 
     | 
    
         | 
| 
       118 
126 
     | 
    
         
             
                private
         
     | 
| 
         @@ -130,7 +138,7 @@ module Nesta 
     | 
|
| 
       130 
138 
     | 
    
         
             
                    raise Sinatra::NotFound
         
     | 
| 
       131 
139 
     | 
    
         
             
                  else
         
     | 
| 
       132 
140 
     | 
    
         
             
                    first_paragraph, remaining = contents.split(/\r?\n\r?\n/, 2)
         
     | 
| 
       133 
     | 
    
         
            -
                    metadata =  
     | 
| 
      
 141 
     | 
    
         
            +
                    metadata = CaseInsensitiveHash.new
         
     | 
| 
       134 
142 
     | 
    
         
             
                    if metadata?(first_paragraph)
         
     | 
| 
       135 
143 
     | 
    
         
             
                      first_paragraph.split("\n").each do |line|
         
     | 
| 
       136 
144 
     | 
    
         
             
                        key, value = line.split(/\s*:\s*/, 2)
         
     | 
| 
         @@ -142,14 +150,8 @@ module Nesta 
     | 
|
| 
       142 
150 
     | 
    
         
             
                  end
         
     | 
| 
       143 
151 
     | 
    
         | 
| 
       144 
152 
     | 
    
         
             
                  def convert_to_html(format, scope, text)
         
     | 
| 
       145 
     | 
    
         
            -
                     
     | 
| 
       146 
     | 
    
         
            -
             
     | 
| 
       147 
     | 
    
         
            -
                        Maruku.new(text).to_html
         
     | 
| 
       148 
     | 
    
         
            -
                      when :haml
         
     | 
| 
       149 
     | 
    
         
            -
                        Haml::Engine.new(text).to_html(scope)
         
     | 
| 
       150 
     | 
    
         
            -
                      when :textile
         
     | 
| 
       151 
     | 
    
         
            -
                        RedCloth.new(text).to_html
         
     | 
| 
       152 
     | 
    
         
            -
                      end
         
     | 
| 
      
 153 
     | 
    
         
            +
                    template = Tilt[format].new { text }
         
     | 
| 
      
 154 
     | 
    
         
            +
                    template.render(scope)
         
     | 
| 
       153 
155 
     | 
    
         
             
                  end
         
     | 
| 
       154 
156 
     | 
    
         
             
              end
         
     | 
| 
       155 
157 
     | 
    
         | 
| 
         @@ -231,23 +233,18 @@ module Nesta 
     | 
|
| 
       231 
233 
     | 
    
         
             
                def summary
         
     | 
| 
       232 
234 
     | 
    
         
             
                  if summary_text = metadata("summary")
         
     | 
| 
       233 
235 
     | 
    
         
             
                    summary_text.gsub!('\n', "\n")
         
     | 
| 
       234 
     | 
    
         
            -
                     
     | 
| 
       235 
     | 
    
         
            -
                    when :textile
         
     | 
| 
       236 
     | 
    
         
            -
                      RedCloth.new(summary_text).to_html
         
     | 
| 
       237 
     | 
    
         
            -
                    else
         
     | 
| 
       238 
     | 
    
         
            -
                      Maruku.new(summary_text).to_html
         
     | 
| 
       239 
     | 
    
         
            -
                    end
         
     | 
| 
      
 236 
     | 
    
         
            +
                    convert_to_html(@format, nil, summary_text)
         
     | 
| 
       240 
237 
     | 
    
         
             
                  end
         
     | 
| 
       241 
238 
     | 
    
         
             
                end
         
     | 
| 
       242 
239 
     | 
    
         | 
| 
       243 
240 
     | 
    
         
             
                def body(scope = nil)
         
     | 
| 
       244 
241 
     | 
    
         
             
                  body_text = case @format
         
     | 
| 
       245 
242 
     | 
    
         
             
                    when :mdown
         
     | 
| 
       246 
     | 
    
         
            -
                      markup.sub(/^#[^#].*$\r?\n(\r?\n)?/,  
     | 
| 
      
 243 
     | 
    
         
            +
                      markup.sub(/^#[^#].*$\r?\n(\r?\n)?/, '')
         
     | 
| 
       247 
244 
     | 
    
         
             
                    when :haml
         
     | 
| 
       248 
     | 
    
         
            -
                      markup.sub(/^\s*%h1\s+.*$\r?\n(\r?\n)?/,  
     | 
| 
      
 245 
     | 
    
         
            +
                      markup.sub(/^\s*%h1\s+.*$\r?\n(\r?\n)?/, '')
         
     | 
| 
       249 
246 
     | 
    
         
             
                    when :textile
         
     | 
| 
       250 
     | 
    
         
            -
                      markup.sub(/^\s*h1\.\s+.*$\r?\n(\r?\n)?/,  
     | 
| 
      
 247 
     | 
    
         
            +
                      markup.sub(/^\s*h1\.\s+.*$\r?\n(\r?\n)?/, '')
         
     | 
| 
       251 
248 
     | 
    
         
             
                    end
         
     | 
| 
       252 
249 
     | 
    
         
             
                  convert_to_html(@format, scope, body_text)
         
     | 
| 
       253 
250 
     | 
    
         
             
                end
         
     | 
    
        data/lib/nesta/version.rb
    CHANGED
    
    
    
        data/nesta.gemspec
    CHANGED
    
    
    
        data/spec/atom_spec.rb
    CHANGED
    
    | 
         @@ -100,7 +100,8 @@ describe "atom feed" do 
     | 
|
| 
       100 
100 
     | 
    
         
             
                end
         
     | 
| 
       101 
101 
     | 
    
         | 
| 
       102 
102 
     | 
    
         
             
                it "should include hostname in URLs" do
         
     | 
| 
       103 
     | 
    
         
            -
                  body.should have_tag("entry/content", 
     | 
| 
      
 103 
     | 
    
         
            +
                  body.should have_tag("entry/content",
         
     | 
| 
      
 104 
     | 
    
         
            +
                                       Regexp.new('href=.+http:\/\/example.org\/foo'))
         
     | 
| 
       104 
105 
     | 
    
         
             
                end
         
     | 
| 
       105 
106 
     | 
    
         | 
| 
       106 
107 
     | 
    
         
             
                it "should not include article heading in content" do
         
     | 
    
        data/spec/commands_spec.rb
    CHANGED
    
    | 
         @@ -207,6 +207,7 @@ describe "nesta" do 
     | 
|
| 
       207 
207 
     | 
    
         
             
                    @init_file = create_gem_file('lib', @gem_name, 'init.rb')
         
     | 
| 
       208 
208 
     | 
    
         
             
                    @gem_spec = create_gem_file("#{@gem_name}.gemspec") do |file|
         
     | 
| 
       209 
209 
     | 
    
         
             
                      file.puts "  # specify any dependencies here; for example:"
         
     | 
| 
      
 210 
     | 
    
         
            +
                      file.puts "end"
         
     | 
| 
       210 
211 
     | 
    
         
             
                    end
         
     | 
| 
       211 
212 
     | 
    
         
             
                  end
         
     | 
| 
       212 
213 
     | 
    
         | 
| 
         @@ -226,7 +227,6 @@ describe "nesta" do 
     | 
|
| 
       226 
227 
     | 
    
         
             
                    boilerplate = <<-EOF
         
     | 
| 
       227 
228 
     | 
    
         
             
                module My::Feature
         
     | 
| 
       228 
229 
     | 
    
         
             
                  module Helpers
         
     | 
| 
       229 
     | 
    
         
            -
                    helpers do
         
     | 
| 
       230 
230 
     | 
    
         
             
                    EOF
         
     | 
| 
       231 
231 
     | 
    
         
             
                    init.should include(boilerplate)
         
     | 
| 
       232 
232 
     | 
    
         
             
                    init.should include('helpers Nesta::Plugin::My::Feature::Helpers')
         
     | 
| 
         @@ -235,7 +235,7 @@ describe "nesta" do 
     | 
|
| 
       235 
235 
     | 
    
         
             
                  it "should specify plugin gem's dependencies" do
         
     | 
| 
       236 
236 
     | 
    
         
             
                    @command.execute
         
     | 
| 
       237 
237 
     | 
    
         
             
                    text = File.read(@gem_spec)
         
     | 
| 
       238 
     | 
    
         
            -
                    text.should include('s.add_dependency("nesta", ">= 0.9. 
     | 
| 
      
 238 
     | 
    
         
            +
                    text.should include('s.add_dependency("nesta", ">= 0.9.11")')
         
     | 
| 
       239 
239 
     | 
    
         
             
                    text.should include('s.add_development_dependency("rake")')
         
     | 
| 
       240 
240 
     | 
    
         
             
                  end
         
     | 
| 
       241 
241 
     | 
    
         
             
                end
         
     | 
    
        data/spec/models_spec.rb
    CHANGED
    
    
    
        data/spec/page_spec.rb
    CHANGED
    
    | 
         @@ -288,19 +288,21 @@ describe "A page" do 
     | 
|
| 
       288 
288 
     | 
    
         
             
                  last_response.should_not be_ok
         
     | 
| 
       289 
289 
     | 
    
         
             
                end
         
     | 
| 
       290 
290 
     | 
    
         
             
              end
         
     | 
| 
       291 
     | 
    
         
            -
             
     | 
| 
      
 291 
     | 
    
         
            +
             
     | 
| 
       292 
292 
     | 
    
         
             
              describe "that has meta data" do
         
     | 
| 
       293 
293 
     | 
    
         
             
                before(:each) do
         
     | 
| 
       294 
294 
     | 
    
         
             
                  @title = 'Different title'
         
     | 
| 
       295 
295 
     | 
    
         
             
                  @content = "Page content"
         
     | 
| 
       296 
296 
     | 
    
         
             
                  @description = "Page about stuff"
         
     | 
| 
       297 
297 
     | 
    
         
             
                  @keywords = "things, stuff"
         
     | 
| 
      
 298 
     | 
    
         
            +
                  @articles_heading = "Posts about this stuff"
         
     | 
| 
       298 
299 
     | 
    
         
             
                  @category = create_category(
         
     | 
| 
       299 
300 
     | 
    
         
             
                    :content => "# My category\n\n#{@content}",
         
     | 
| 
       300 
301 
     | 
    
         
             
                    :metadata => {
         
     | 
| 
       301 
302 
     | 
    
         
             
                      'title' => @title,
         
     | 
| 
       302 
303 
     | 
    
         
             
                      'description' => @description,
         
     | 
| 
       303 
     | 
    
         
            -
                      'keywords' => @keywords
         
     | 
| 
      
 304 
     | 
    
         
            +
                      'keywords' => @keywords,
         
     | 
| 
      
 305 
     | 
    
         
            +
                      'articles heading' => @articles_heading
         
     | 
| 
       304 
306 
     | 
    
         
             
                    }
         
     | 
| 
       305 
307 
     | 
    
         
             
                  )
         
     | 
| 
       306 
308 
     | 
    
         
             
                end
         
     | 
| 
         @@ -308,11 +310,18 @@ describe "A page" do 
     | 
|
| 
       308 
310 
     | 
    
         
             
                it_should_behave_like "page with keyword and description"
         
     | 
| 
       309 
311 
     | 
    
         
             
                it_should_behave_like "page that can display menus"
         
     | 
| 
       310 
312 
     | 
    
         | 
| 
      
 313 
     | 
    
         
            +
                describe "whose URL ends in /" do
         
     | 
| 
      
 314 
     | 
    
         
            +
                  it "should be redirected, removing the slash" do
         
     | 
| 
      
 315 
     | 
    
         
            +
                    get @category.abspath + '/'
         
     | 
| 
      
 316 
     | 
    
         
            +
                    last_response.should be_redirect
         
     | 
| 
      
 317 
     | 
    
         
            +
                  end
         
     | 
| 
      
 318 
     | 
    
         
            +
                end
         
     | 
| 
      
 319 
     | 
    
         
            +
             
     | 
| 
       311 
320 
     | 
    
         
             
                it "should render successfully" do
         
     | 
| 
       312 
321 
     | 
    
         
             
                  do_get
         
     | 
| 
       313 
322 
     | 
    
         
             
                  last_response.should be_ok
         
     | 
| 
       314 
323 
     | 
    
         
             
                end
         
     | 
| 
       315 
     | 
    
         
            -
             
     | 
| 
      
 324 
     | 
    
         
            +
             
     | 
| 
       316 
325 
     | 
    
         
             
                it "should display the heading" do
         
     | 
| 
       317 
326 
     | 
    
         
             
                  do_get
         
     | 
| 
       318 
327 
     | 
    
         
             
                  body.should have_tag('h1', @category.heading)
         
     | 
| 
         @@ -371,6 +380,11 @@ describe "A page" do 
     | 
|
| 
       371 
380 
     | 
    
         
             
                        "h1 a[@href='#{@article.abspath}']", /^\s*#{@article.heading}$/)
         
     | 
| 
       372 
381 
     | 
    
         
             
                    body.should_not have_tag("h3", @article2.heading)
         
     | 
| 
       373 
382 
     | 
    
         
             
                  end
         
     | 
| 
      
 383 
     | 
    
         
            +
             
     | 
| 
      
 384 
     | 
    
         
            +
                  it "should display the article heading" do
         
     | 
| 
      
 385 
     | 
    
         
            +
                    do_get
         
     | 
| 
      
 386 
     | 
    
         
            +
                    body.should have_tag('h1', @articles_heading)
         
     | 
| 
      
 387 
     | 
    
         
            +
                  end
         
     | 
| 
       374 
388 
     | 
    
         
             
                end
         
     | 
| 
       375 
389 
     | 
    
         | 
| 
       376 
390 
     | 
    
         
             
                it "should not include Disqus comments by default" do
         
     | 
| 
         @@ -438,32 +452,47 @@ describe "attachments" do 
     | 
|
| 
       438 
452 
     | 
    
         
             
              include ModelFactory
         
     | 
| 
       439 
453 
     | 
    
         
             
              include RequestSpecHelper
         
     | 
| 
       440 
454 
     | 
    
         | 
| 
       441 
     | 
    
         
            -
               
     | 
| 
      
 455 
     | 
    
         
            +
              before(:each) do
         
     | 
| 
       442 
456 
     | 
    
         
             
                stub_configuration
         
     | 
| 
       443 
457 
     | 
    
         
             
                create_content_directories
         
     | 
| 
       444 
     | 
    
         
            -
                path = File.join(Nesta::Config.attachment_path, "test.txt")
         
     | 
| 
       445 
     | 
    
         
            -
                File.open(path, "w") { |file| file.write("I'm a test attachment") }
         
     | 
| 
       446 
458 
     | 
    
         
             
              end
         
     | 
| 
       447 
     | 
    
         
            -
             
     | 
| 
       448 
     | 
    
         
            -
              before(:each) do
         
     | 
| 
       449 
     | 
    
         
            -
                create_attachment
         
     | 
| 
       450 
     | 
    
         
            -
                get "/attachments/test.txt"
         
     | 
| 
       451 
     | 
    
         
            -
              end
         
     | 
| 
       452 
     | 
    
         
            -
              
         
     | 
| 
      
 459 
     | 
    
         
            +
             
     | 
| 
       453 
460 
     | 
    
         
             
              after(:each) do
         
     | 
| 
       454 
461 
     | 
    
         
             
                remove_temp_directory
         
     | 
| 
       455 
462 
     | 
    
         
             
                Nesta::FileModel.purge_cache
         
     | 
| 
       456 
463 
     | 
    
         
             
              end
         
     | 
| 
       457 
     | 
    
         
            -
             
     | 
| 
       458 
     | 
    
         
            -
               
     | 
| 
       459 
     | 
    
         
            -
                 
     | 
| 
       460 
     | 
    
         
            -
             
     | 
| 
       461 
     | 
    
         
            -
             
     | 
| 
       462 
     | 
    
         
            -
             
     | 
| 
       463 
     | 
    
         
            -
                 
     | 
| 
      
 464 
     | 
    
         
            +
                
         
     | 
| 
      
 465 
     | 
    
         
            +
              describe "in the attachments folder" do
         
     | 
| 
      
 466 
     | 
    
         
            +
                before(:each) do
         
     | 
| 
      
 467 
     | 
    
         
            +
                  path = File.join(Nesta::Config.attachment_path, 'test.txt')
         
     | 
| 
      
 468 
     | 
    
         
            +
                  File.open(path, 'w') { |file| file.write("I'm a test attachment") }
         
     | 
| 
      
 469 
     | 
    
         
            +
                end
         
     | 
| 
      
 470 
     | 
    
         
            +
                
         
     | 
| 
      
 471 
     | 
    
         
            +
                it "should be served successfully" do
         
     | 
| 
      
 472 
     | 
    
         
            +
                  get "/attachments/test.txt"
         
     | 
| 
      
 473 
     | 
    
         
            +
                  last_response.should be_ok
         
     | 
| 
      
 474 
     | 
    
         
            +
                end
         
     | 
| 
      
 475 
     | 
    
         
            +
                
         
     | 
| 
      
 476 
     | 
    
         
            +
                it "should be sent to the client" do
         
     | 
| 
      
 477 
     | 
    
         
            +
                  get "/attachments/test.txt"
         
     | 
| 
      
 478 
     | 
    
         
            +
                  body.should include("I'm a test attachment")
         
     | 
| 
      
 479 
     | 
    
         
            +
                end
         
     | 
| 
      
 480 
     | 
    
         
            +
                
         
     | 
| 
      
 481 
     | 
    
         
            +
                it "should set the appropriate MIME type" do
         
     | 
| 
      
 482 
     | 
    
         
            +
                  get "/attachments/test.txt"
         
     | 
| 
      
 483 
     | 
    
         
            +
                  last_response.headers["Content-Type"].should =~ Regexp.new("^text/plain")
         
     | 
| 
      
 484 
     | 
    
         
            +
                end
         
     | 
| 
       464 
485 
     | 
    
         
             
              end
         
     | 
| 
       465 
     | 
    
         
            -
             
     | 
| 
       466 
     | 
    
         
            -
               
     | 
| 
       467 
     | 
    
         
            -
                 
     | 
| 
      
 486 
     | 
    
         
            +
             
     | 
| 
      
 487 
     | 
    
         
            +
              describe "outside the attachments folder" do
         
     | 
| 
      
 488 
     | 
    
         
            +
                before(:each) do
         
     | 
| 
      
 489 
     | 
    
         
            +
                  path = File.join(Nesta::Config.page_path, 'index.haml')
         
     | 
| 
      
 490 
     | 
    
         
            +
                  File.open(path, 'w') { |file| file.write('%h1 Test page') }
         
     | 
| 
      
 491 
     | 
    
         
            +
                end
         
     | 
| 
      
 492 
     | 
    
         
            +
             
     | 
| 
      
 493 
     | 
    
         
            +
                it "should be directory traversal free" do
         
     | 
| 
      
 494 
     | 
    
         
            +
                  get '/attachments/../pages/index.haml'
         
     | 
| 
      
 495 
     | 
    
         
            +
                  last_response.should_not be_ok
         
     | 
| 
      
 496 
     | 
    
         
            +
                end
         
     | 
| 
       468 
497 
     | 
    
         
             
              end
         
     | 
| 
       469 
498 
     | 
    
         
             
            end
         
     | 
    
        data/views/page.haml
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,8 +1,13 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification 
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: nesta
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
      
 4 
     | 
    
         
            +
              hash: 45
         
     | 
| 
       4 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       5 
     | 
    
         
            -
               
     | 
| 
      
 6 
     | 
    
         
            +
              segments: 
         
     | 
| 
      
 7 
     | 
    
         
            +
              - 0
         
     | 
| 
      
 8 
     | 
    
         
            +
              - 9
         
     | 
| 
      
 9 
     | 
    
         
            +
              - 11
         
     | 
| 
      
 10 
     | 
    
         
            +
              version: 0.9.11
         
     | 
| 
       6 
11 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
12 
     | 
    
         
             
            authors: 
         
     | 
| 
       8 
13 
     | 
    
         
             
            - Graham Ashton
         
     | 
| 
         @@ -10,130 +15,179 @@ autorequire: 
     | 
|
| 
       10 
15 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       11 
16 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       12 
17 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
            date: 2011-09- 
     | 
| 
      
 18 
     | 
    
         
            +
            date: 2011-09-22 00:00:00 +01:00
         
     | 
| 
       14 
19 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       15 
20 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       16 
21 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       17 
     | 
    
         
            -
              name: haml
         
     | 
| 
       18 
22 
     | 
    
         
             
              requirement: &id001 !ruby/object:Gem::Requirement 
         
     | 
| 
       19 
23 
     | 
    
         
             
                none: false
         
     | 
| 
       20 
24 
     | 
    
         
             
                requirements: 
         
     | 
| 
       21 
25 
     | 
    
         
             
                - - ~>
         
     | 
| 
       22 
26 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 27 
     | 
    
         
            +
                    hash: 5
         
     | 
| 
      
 28 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 29 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 30 
     | 
    
         
            +
                    - 1
         
     | 
| 
       23 
31 
     | 
    
         
             
                    version: "3.1"
         
     | 
| 
       24 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       25 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       26 
32 
     | 
    
         
             
              version_requirements: *id001
         
     | 
| 
      
 33 
     | 
    
         
            +
              name: haml
         
     | 
| 
      
 34 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 35 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       27 
36 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       28 
     | 
    
         
            -
              name: sass
         
     | 
| 
       29 
37 
     | 
    
         
             
              requirement: &id002 !ruby/object:Gem::Requirement 
         
     | 
| 
       30 
38 
     | 
    
         
             
                none: false
         
     | 
| 
       31 
39 
     | 
    
         
             
                requirements: 
         
     | 
| 
       32 
40 
     | 
    
         
             
                - - ~>
         
     | 
| 
       33 
41 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 42 
     | 
    
         
            +
                    hash: 5
         
     | 
| 
      
 43 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 44 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 45 
     | 
    
         
            +
                    - 1
         
     | 
| 
       34 
46 
     | 
    
         
             
                    version: "3.1"
         
     | 
| 
       35 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       36 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       37 
47 
     | 
    
         
             
              version_requirements: *id002
         
     | 
| 
      
 48 
     | 
    
         
            +
              name: sass
         
     | 
| 
      
 49 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 50 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       38 
51 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       39 
     | 
    
         
            -
              name: maruku
         
     | 
| 
       40 
52 
     | 
    
         
             
              requirement: &id003 !ruby/object:Gem::Requirement 
         
     | 
| 
       41 
53 
     | 
    
         
             
                none: false
         
     | 
| 
       42 
54 
     | 
    
         
             
                requirements: 
         
     | 
| 
       43 
     | 
    
         
            -
                - -  
     | 
| 
      
 55 
     | 
    
         
            +
                - - ~>
         
     | 
| 
       44 
56 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
       45 
     | 
    
         
            -
                     
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
             
     | 
| 
      
 57 
     | 
    
         
            +
                    hash: 3
         
     | 
| 
      
 58 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 59 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 60 
     | 
    
         
            +
                    - 6
         
     | 
| 
      
 61 
     | 
    
         
            +
                    version: "1.6"
         
     | 
| 
       48 
62 
     | 
    
         
             
              version_requirements: *id003
         
     | 
| 
      
 63 
     | 
    
         
            +
              name: rdiscount
         
     | 
| 
      
 64 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 65 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       49 
66 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       50 
     | 
    
         
            -
              name: RedCloth
         
     | 
| 
       51 
67 
     | 
    
         
             
              requirement: &id004 !ruby/object:Gem::Requirement 
         
     | 
| 
       52 
68 
     | 
    
         
             
                none: false
         
     | 
| 
       53 
69 
     | 
    
         
             
                requirements: 
         
     | 
| 
       54 
70 
     | 
    
         
             
                - - ~>
         
     | 
| 
       55 
71 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 72 
     | 
    
         
            +
                    hash: 31
         
     | 
| 
      
 73 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 74 
     | 
    
         
            +
                    - 4
         
     | 
| 
      
 75 
     | 
    
         
            +
                    - 2
         
     | 
| 
       56 
76 
     | 
    
         
             
                    version: "4.2"
         
     | 
| 
       57 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       58 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       59 
77 
     | 
    
         
             
              version_requirements: *id004
         
     | 
| 
      
 78 
     | 
    
         
            +
              name: RedCloth
         
     | 
| 
      
 79 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 80 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       60 
81 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       61 
     | 
    
         
            -
              name: sinatra
         
     | 
| 
       62 
82 
     | 
    
         
             
              requirement: &id005 !ruby/object:Gem::Requirement 
         
     | 
| 
       63 
83 
     | 
    
         
             
                none: false
         
     | 
| 
       64 
84 
     | 
    
         
             
                requirements: 
         
     | 
| 
       65 
85 
     | 
    
         
             
                - - "="
         
     | 
| 
       66 
86 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 87 
     | 
    
         
            +
                    hash: 19
         
     | 
| 
      
 88 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 89 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 90 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 91 
     | 
    
         
            +
                    - 6
         
     | 
| 
       67 
92 
     | 
    
         
             
                    version: 1.2.6
         
     | 
| 
       68 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       69 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       70 
93 
     | 
    
         
             
              version_requirements: *id005
         
     | 
| 
      
 94 
     | 
    
         
            +
              name: sinatra
         
     | 
| 
      
 95 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 96 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       71 
97 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       72 
     | 
    
         
            -
              name: shotgun
         
     | 
| 
       73 
98 
     | 
    
         
             
              requirement: &id006 !ruby/object:Gem::Requirement 
         
     | 
| 
       74 
99 
     | 
    
         
             
                none: false
         
     | 
| 
       75 
100 
     | 
    
         
             
                requirements: 
         
     | 
| 
       76 
101 
     | 
    
         
             
                - - ">="
         
     | 
| 
       77 
102 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 103 
     | 
    
         
            +
                    hash: 27
         
     | 
| 
      
 104 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 105 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 106 
     | 
    
         
            +
                    - 8
         
     | 
| 
       78 
107 
     | 
    
         
             
                    version: "0.8"
         
     | 
| 
       79 
     | 
    
         
            -
              type: :runtime
         
     | 
| 
       80 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       81 
108 
     | 
    
         
             
              version_requirements: *id006
         
     | 
| 
      
 109 
     | 
    
         
            +
              name: shotgun
         
     | 
| 
      
 110 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 111 
     | 
    
         
            +
              type: :runtime
         
     | 
| 
       82 
112 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       83 
     | 
    
         
            -
              name: hpricot
         
     | 
| 
       84 
113 
     | 
    
         
             
              requirement: &id007 !ruby/object:Gem::Requirement 
         
     | 
| 
       85 
114 
     | 
    
         
             
                none: false
         
     | 
| 
       86 
115 
     | 
    
         
             
                requirements: 
         
     | 
| 
       87 
116 
     | 
    
         
             
                - - "="
         
     | 
| 
       88 
117 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 118 
     | 
    
         
            +
                    hash: 55
         
     | 
| 
      
 119 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 120 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 121 
     | 
    
         
            +
                    - 8
         
     | 
| 
      
 122 
     | 
    
         
            +
                    - 4
         
     | 
| 
       89 
123 
     | 
    
         
             
                    version: 0.8.4
         
     | 
| 
       90 
     | 
    
         
            -
              type: :development
         
     | 
| 
       91 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       92 
124 
     | 
    
         
             
              version_requirements: *id007
         
     | 
| 
      
 125 
     | 
    
         
            +
              name: hpricot
         
     | 
| 
      
 126 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 127 
     | 
    
         
            +
              type: :development
         
     | 
| 
       93 
128 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       94 
     | 
    
         
            -
              name: rack-test
         
     | 
| 
       95 
129 
     | 
    
         
             
              requirement: &id008 !ruby/object:Gem::Requirement 
         
     | 
| 
       96 
130 
     | 
    
         
             
                none: false
         
     | 
| 
       97 
131 
     | 
    
         
             
                requirements: 
         
     | 
| 
       98 
132 
     | 
    
         
             
                - - "="
         
     | 
| 
       99 
133 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 134 
     | 
    
         
            +
                    hash: 5
         
     | 
| 
      
 135 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 136 
     | 
    
         
            +
                    - 0
         
     | 
| 
      
 137 
     | 
    
         
            +
                    - 6
         
     | 
| 
      
 138 
     | 
    
         
            +
                    - 1
         
     | 
| 
       100 
139 
     | 
    
         
             
                    version: 0.6.1
         
     | 
| 
       101 
     | 
    
         
            -
              type: :development
         
     | 
| 
       102 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       103 
140 
     | 
    
         
             
              version_requirements: *id008
         
     | 
| 
      
 141 
     | 
    
         
            +
              name: rack-test
         
     | 
| 
      
 142 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 143 
     | 
    
         
            +
              type: :development
         
     | 
| 
       104 
144 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       105 
     | 
    
         
            -
              name: rspec
         
     | 
| 
       106 
145 
     | 
    
         
             
              requirement: &id009 !ruby/object:Gem::Requirement 
         
     | 
| 
       107 
146 
     | 
    
         
             
                none: false
         
     | 
| 
       108 
147 
     | 
    
         
             
                requirements: 
         
     | 
| 
       109 
148 
     | 
    
         
             
                - - "="
         
     | 
| 
       110 
149 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 150 
     | 
    
         
            +
                    hash: 27
         
     | 
| 
      
 151 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 152 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 153 
     | 
    
         
            +
                    - 3
         
     | 
| 
      
 154 
     | 
    
         
            +
                    - 0
         
     | 
| 
       111 
155 
     | 
    
         
             
                    version: 1.3.0
         
     | 
| 
       112 
     | 
    
         
            -
              type: :development
         
     | 
| 
       113 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       114 
156 
     | 
    
         
             
              version_requirements: *id009
         
     | 
| 
      
 157 
     | 
    
         
            +
              name: rspec
         
     | 
| 
      
 158 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 159 
     | 
    
         
            +
              type: :development
         
     | 
| 
       115 
160 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       116 
     | 
    
         
            -
              name: rspec_hpricot_matchers
         
     | 
| 
       117 
161 
     | 
    
         
             
              requirement: &id010 !ruby/object:Gem::Requirement 
         
     | 
| 
       118 
162 
     | 
    
         
             
                none: false
         
     | 
| 
       119 
163 
     | 
    
         
             
                requirements: 
         
     | 
| 
       120 
164 
     | 
    
         
             
                - - "="
         
     | 
| 
       121 
165 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 166 
     | 
    
         
            +
                    hash: 15
         
     | 
| 
      
 167 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 168 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 169 
     | 
    
         
            +
                    - 0
         
     | 
| 
       122 
170 
     | 
    
         
             
                    version: "1.0"
         
     | 
| 
       123 
     | 
    
         
            -
              type: :development
         
     | 
| 
       124 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       125 
171 
     | 
    
         
             
              version_requirements: *id010
         
     | 
| 
      
 172 
     | 
    
         
            +
              name: rspec_hpricot_matchers
         
     | 
| 
      
 173 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 174 
     | 
    
         
            +
              type: :development
         
     | 
| 
       126 
175 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     | 
| 
       127 
     | 
    
         
            -
              name: test-unit
         
     | 
| 
       128 
176 
     | 
    
         
             
              requirement: &id011 !ruby/object:Gem::Requirement 
         
     | 
| 
       129 
177 
     | 
    
         
             
                none: false
         
     | 
| 
       130 
178 
     | 
    
         
             
                requirements: 
         
     | 
| 
       131 
179 
     | 
    
         
             
                - - "="
         
     | 
| 
       132 
180 
     | 
    
         
             
                  - !ruby/object:Gem::Version 
         
     | 
| 
      
 181 
     | 
    
         
            +
                    hash: 25
         
     | 
| 
      
 182 
     | 
    
         
            +
                    segments: 
         
     | 
| 
      
 183 
     | 
    
         
            +
                    - 1
         
     | 
| 
      
 184 
     | 
    
         
            +
                    - 2
         
     | 
| 
      
 185 
     | 
    
         
            +
                    - 3
         
     | 
| 
       133 
186 
     | 
    
         
             
                    version: 1.2.3
         
     | 
| 
       134 
     | 
    
         
            -
              type: :development
         
     | 
| 
       135 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       136 
187 
     | 
    
         
             
              version_requirements: *id011
         
     | 
| 
      
 188 
     | 
    
         
            +
              name: test-unit
         
     | 
| 
      
 189 
     | 
    
         
            +
              prerelease: false
         
     | 
| 
      
 190 
     | 
    
         
            +
              type: :development
         
     | 
| 
       137 
191 
     | 
    
         
             
            description: |
         
     | 
| 
       138 
192 
     | 
    
         
             
              Nesta is a lightweight Content Management System, written in Ruby using
         
     | 
| 
       139 
193 
     | 
    
         
             
              the Sinatra web framework. Nesta has the simplicity of a static site
         
     | 
| 
         @@ -166,6 +220,7 @@ files: 
     | 
|
| 
       166 
220 
     | 
    
         
             
            - bin/nesta
         
     | 
| 
       167 
221 
     | 
    
         
             
            - config.ru
         
     | 
| 
       168 
222 
     | 
    
         
             
            - config/deploy.rb.sample
         
     | 
| 
      
 223 
     | 
    
         
            +
            - lib/nesta.rb
         
     | 
| 
       169 
224 
     | 
    
         
             
            - lib/nesta/app.rb
         
     | 
| 
       170 
225 
     | 
    
         
             
            - lib/nesta/cache.rb
         
     | 
| 
       171 
226 
     | 
    
         
             
            - lib/nesta/commands.rb
         
     | 
| 
         @@ -238,7 +293,7 @@ required_ruby_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       238 
293 
     | 
    
         
             
              requirements: 
         
     | 
| 
       239 
294 
     | 
    
         
             
              - - ">="
         
     | 
| 
       240 
295 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       241 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 296 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
       242 
297 
     | 
    
         
             
                  segments: 
         
     | 
| 
       243 
298 
     | 
    
         
             
                  - 0
         
     | 
| 
       244 
299 
     | 
    
         
             
                  version: "0"
         
     | 
| 
         @@ -247,7 +302,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       247 
302 
     | 
    
         
             
              requirements: 
         
     | 
| 
       248 
303 
     | 
    
         
             
              - - ">="
         
     | 
| 
       249 
304 
     | 
    
         
             
                - !ruby/object:Gem::Version 
         
     | 
| 
       250 
     | 
    
         
            -
                  hash:  
     | 
| 
      
 305 
     | 
    
         
            +
                  hash: 3
         
     | 
| 
       251 
306 
     | 
    
         
             
                  segments: 
         
     | 
| 
       252 
307 
     | 
    
         
             
                  - 0
         
     | 
| 
       253 
308 
     | 
    
         
             
                  version: "0"
         
     |