vesper 0.6.0 → 0.7.0
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/.gitignore +1 -1
- data/bin/vesper +26 -25
- data/lib/vesper/framework/.gitignore +5 -12
- data/lib/vesper/framework/Gemfile +9 -16
- data/lib/vesper/framework/Gemfile.lock +112 -0
- data/lib/vesper/framework/plugins/{timepiece → core-extensions}/Gemfile +0 -0
- data/lib/vesper/framework/plugins/{timepiece → core-extensions}/Readme.md +85 -3
- data/lib/vesper/framework/plugins/{timepiece/application/timepiece.rb → core-extensions/application/date_time.rb} +4 -4
- data/lib/vesper/framework/plugins/{addendums → core-extensions}/application/helpers.rb +0 -0
- data/lib/vesper/framework/plugins/{addendums → core-extensions}/application/number.rb +3 -3
- data/lib/vesper/framework/plugins/{addendums → core-extensions}/application/string.rb +0 -0
- data/lib/vesper/framework/plugins/core-extensions/meta_data.rb +7 -0
- data/lib/vesper/framework/plugins/hot-reloader/Gemfile +1 -0
- data/lib/vesper/framework/plugins/hot-reloader/Readme.md +5 -0
- data/lib/vesper/framework/plugins/hot-reloader/config/hot-reloader.rb +3 -0
- data/lib/vesper/framework/plugins/hot-reloader/meta_data.rb +7 -0
- data/lib/vesper/framework/plugins/{log → logger}/Readme.md +2 -2
- data/lib/vesper/framework/plugins/{log → logger}/application/log.rb +0 -0
- data/lib/vesper/framework/plugins/logger/meta_data.rb +7 -0
- data/lib/vesper/framework/plugins/{log → logger}/tasks/log.rb +0 -0
- data/lib/vesper/framework/plugins/{markdown → markdown-parser}/Gemfile +0 -0
- data/lib/vesper/framework/plugins/{markdown → markdown-parser}/Readme.md +2 -2
- data/lib/vesper/framework/plugins/{markdown/application/markdown.rb → markdown-parser/application/markdown-parser.rb} +0 -0
- data/lib/vesper/framework/plugins/{markdown/config/markdown.rb → markdown-parser/config/markdown-parser.rb} +0 -0
- data/lib/vesper/framework/plugins/markdown-parser/meta_data.rb +7 -0
- data/lib/vesper/plugin/Gemfile +0 -0
- data/lib/vesper/plugin/Readme.md +3 -0
- data/lib/vesper/plugin/application/plugin.rb +3 -0
- data/lib/vesper/plugin/config/plugin.rb +1 -0
- data/lib/vesper/plugin/meta_data.rb +7 -0
- data/lib/vesper/plugin/tasks/plugin.rb +10 -0
- data/lib/vesper/version.rb +1 -1
- data/vesper.gemspec +1 -4
- metadata +44 -57
- data/lib/vesper/framework/plugins/addendums/Readme.md +0 -85
- data/lib/vesper/framework/plugins/addendums/meta_data.rb +0 -4
- data/lib/vesper/framework/plugins/log/meta_data.rb +0 -4
- data/lib/vesper/framework/plugins/markdown/meta_data.rb +0 -4
- data/lib/vesper/framework/plugins/timepiece/meta_data.rb +0 -4
    
        data/.gitignore
    CHANGED
    
    
    
        data/bin/vesper
    CHANGED
    
    | @@ -7,28 +7,24 @@ def show_options | |
| 7 7 | 
             
              puts ''
         | 
| 8 8 | 
             
              puts 'Commands:'
         | 
| 9 9 | 
             
              puts ''
         | 
| 10 | 
            -
              puts '  vesper create application'
         | 
| 11 | 
            -
              puts '    Summary: Create a new Vesper web app.'
         | 
| 12 | 
            -
              puts '    Example: vesper create application MyApp'
         | 
| 13 | 
            -
              puts ''
         | 
| 14 10 | 
             
              puts '  vesper create app'
         | 
| 15 11 | 
             
              puts '    Summary: Create a new Vesper web app.'
         | 
| 16 12 | 
             
              puts '             Alias for vesper create application.'
         | 
| 17 13 | 
             
              puts '    Example: vesper create app MyApp'
         | 
| 18 14 | 
             
              puts ''
         | 
| 19 15 | 
             
              puts '  vesper install plugin'
         | 
| 20 | 
            -
              puts '    Summary: Install a plugin from  | 
| 16 | 
            +
              puts '    Summary: Install a plugin from a git repo.'
         | 
| 21 17 | 
             
              puts '             Should be run from inside an existing Vesper app.'
         | 
| 22 | 
            -
              puts '    Example: vesper install plugin git@github.com: | 
| 18 | 
            +
              puts '    Example: vesper install plugin git@github.com:vesper/mobile-request-router.git'
         | 
| 23 19 | 
             
              puts ''
         | 
| 24 20 | 
             
              puts '  vesper remove plugin'
         | 
| 25 21 | 
             
              puts '    Summary: Removes an existing plugin from a Vesper app.'
         | 
| 26 | 
            -
              puts '    Example: vesper remove plugin  | 
| 22 | 
            +
              puts '    Example: vesper remove plugin mobile-request-router'
         | 
| 27 23 | 
             
              puts ''
         | 
| 28 24 | 
             
              puts '  vesper create plugin'
         | 
| 29 25 | 
             
              puts '    Summary: Creates an empty plugin for development.'
         | 
| 30 26 | 
             
              puts '             Should be run from inside an existing Vesper app.'
         | 
| 31 | 
            -
              puts '    Example: vesper create plugin  | 
| 27 | 
            +
              puts '    Example: vesper create plugin my-plugin'
         | 
| 32 28 | 
             
              puts ''
         | 
| 33 29 | 
             
              puts '  vesper run test'
         | 
| 34 30 | 
             
              puts '    Summary: Runs a test using a file in /tests using MiniTest.'
         | 
| @@ -38,9 +34,9 @@ def show_options | |
| 38 34 | 
             
              puts '    Summary: Runs tests on all the files in /tests using MiniTest'
         | 
| 39 35 | 
             
              puts '    Example: vesper run tests'
         | 
| 40 36 | 
             
              puts ''
         | 
| 41 | 
            -
              puts 'Documentation can be found online at: http://vesperapps.com | 
| 37 | 
            +
              puts 'Documentation can be found online at: http://vesperapps.com'
         | 
| 42 38 | 
             
              puts ''
         | 
| 43 | 
            -
              puts 'Questions and comments should be send to:  | 
| 39 | 
            +
              puts 'Questions and comments should be send to: jarrod@vesperapps.com'
         | 
| 44 40 | 
             
              puts ''
         | 
| 45 41 | 
             
            end
         | 
| 46 42 |  | 
| @@ -49,30 +45,30 @@ def create_app app_name | |
| 49 45 | 
             
              puts "Creating #{app_name}..."
         | 
| 50 46 | 
             
              FileUtils.cp_r File.dirname(__FILE__) + '/../lib/vesper/framework', app_name unless Dir.exists? app_name
         | 
| 51 47 | 
             
              puts "Bundling gems..."
         | 
| 52 | 
            -
               | 
| 48 | 
            +
              system "cd #{app_name} && bundle > /dev/null"
         | 
| 49 | 
            +
              puts ''
         | 
| 50 | 
            +
              puts "#{app_name} is ready. Next steps:"
         | 
| 51 | 
            +
              puts "  cd #{app_name}"
         | 
| 52 | 
            +
              puts "  rackup"
         | 
| 53 | 
            +
              puts ''
         | 
| 53 54 | 
             
            end
         | 
| 54 55 |  | 
| 55 56 |  | 
| 56 | 
            -
            # This should probably use a template, but we'll get to that later...
         | 
| 57 57 | 
             
            def create_plugin plugin_name
         | 
| 58 | 
            +
              plugin_name = plugin_name.downcase
         | 
| 58 59 | 
             
              if Dir.exists? "plugins/#{plugin_name}"
         | 
| 59 60 | 
             
                puts ''
         | 
| 60 61 | 
             
                puts "#{plugin_name} is already installed in /plugins."
         | 
| 61 62 | 
             
                puts ''
         | 
| 62 63 | 
             
              else
         | 
| 63 | 
            -
                puts 'Creating plugin...'
         | 
| 64 | 
            -
                FileUtils. | 
| 65 | 
            -
                 | 
| 66 | 
            -
                File. | 
| 67 | 
            -
                 | 
| 68 | 
            -
                File.new "plugins/#{plugin_name}/config/#{plugin_name}.rb", 'w+'
         | 
| 69 | 
            -
                FileUtils.mkdir "plugins/#{plugin_name}/tasks"
         | 
| 70 | 
            -
                File.new "plugins/#{plugin_name}/tasks/#{plugin_name}.rb", 'w+'
         | 
| 71 | 
            -
                File.new "plugins/#{plugin_name}/Gemfile", 'w+'
         | 
| 72 | 
            -
                File.new "plugins/#{plugin_name}/Readme.md", 'w+'
         | 
| 64 | 
            +
                puts 'Creating plugin...'    
         | 
| 65 | 
            +
                FileUtils.cp_r File.dirname(__FILE__) + '/../lib/vesper/plugin', "plugins/#{plugin_name}"
         | 
| 66 | 
            +
                File.rename "plugins/#{plugin_name}/application/plugin.rb", "plugins/#{plugin_name}/application/#{plugin_name}.rb"
         | 
| 67 | 
            +
                File.rename "plugins/#{plugin_name}/config/plugin.rb", "plugins/#{plugin_name}/config/#{plugin_name}.rb"
         | 
| 68 | 
            +
                File.rename "plugins/#{plugin_name}/tasks/plugin.rb", "plugins/#{plugin_name}/tasks/#{plugin_name}.rb"
         | 
| 73 69 | 
             
                puts ''
         | 
| 74 70 | 
             
                puts "#{plugin_name} has been installed in /plugins."
         | 
| 75 | 
            -
                puts 'For more information on Vesper plugin development, visit: http://vesperapps.com | 
| 71 | 
            +
                puts 'For more information on Vesper plugin development, visit: http://vesperapps.com'
         | 
| 76 72 | 
             
                puts ''
         | 
| 77 73 | 
             
              end
         | 
| 78 74 | 
             
            end
         | 
| @@ -94,15 +90,19 @@ end | |
| 94 90 |  | 
| 95 91 | 
             
            def install_plugin repo
         | 
| 96 92 | 
             
              puts 'Installing plugin...'
         | 
| 97 | 
            -
              new_plugin = Grit::Git.new ' | 
| 93 | 
            +
              new_plugin = Grit::Git.new 'tmp/new_plugin'
         | 
| 98 94 | 
             
              new_plugin.clone({:branch => 'master'}, repo, new_plugin.git_dir)
         | 
| 99 95 | 
             
              FileUtils.rm_rf "#{new_plugin.git_dir}/.git"
         | 
| 100 96 | 
             
              require "./#{new_plugin.git_dir}/meta_data.rb"
         | 
| 101 97 | 
             
              FileUtils.mv new_plugin.git_dir, "plugins/#{META_DATA[:name]}"
         | 
| 102 98 | 
             
              puts 'Bundling gems...'
         | 
| 103 | 
            -
               | 
| 99 | 
            +
              system "bundle > /dev/null"
         | 
| 100 | 
            +
              puts ''
         | 
| 101 | 
            +
              puts "#{META_DATA[:name]} is installed in /plugins."
         | 
| 102 | 
            +
              puts ''
         | 
| 104 103 | 
             
            end
         | 
| 105 104 |  | 
| 105 | 
            +
             | 
| 106 106 | 
             
            def run_test file
         | 
| 107 107 | 
             
              if File.exists? "./tests/#{file}.rb"
         | 
| 108 108 | 
             
                require 'minitest/autorun'
         | 
| @@ -115,6 +115,7 @@ def run_test file | |
| 115 115 | 
             
              end
         | 
| 116 116 | 
             
            end
         | 
| 117 117 |  | 
| 118 | 
            +
             | 
| 118 119 | 
             
            def run_tests
         | 
| 119 120 | 
             
              require 'minitest/autorun'
         | 
| 120 121 | 
             
              require 'vesper'
         | 
| @@ -1,12 +1,5 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 3 | 
            -
             | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
            # Ignore log files, except for messages
         | 
| 8 | 
            -
            	/log/*
         | 
| 9 | 
            -
            	!/log/messages.log
         | 
| 10 | 
            -
             | 
| 11 | 
            -
            # Ignore development database
         | 
| 12 | 
            -
            	/data/*.sqlite3
         | 
| 1 | 
            +
            .DS_Store
         | 
| 2 | 
            +
            /.bundle
         | 
| 3 | 
            +
            /log/*
         | 
| 4 | 
            +
            !/log/messages.log
         | 
| 5 | 
            +
            /data/development.sqlite3
         | 
| @@ -1,20 +1,13 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
              source 'http://rubygems.org'
         | 
| 1 | 
            +
            source 'http://rubygems.org'
         | 
| 3 2 |  | 
| 4 3 |  | 
| 5 | 
            -
             | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
             | 
| 12 | 
            -
              gem 'sinatra', '~> 1.3.1'
         | 
| 4 | 
            +
            gem 'data_mapper', '~> 1.2.0'
         | 
| 5 | 
            +
            # gem 'dm-mysql-adapter'
         | 
| 6 | 
            +
            # gem 'dm-postgres-adapter'
         | 
| 7 | 
            +
            gem 'dm-sqlite-adapter', '~> 1.2.0'
         | 
| 8 | 
            +
            gem 'sinatra', '~> 1.3.1'  
         | 
| 9 | 
            +
            gem 'vesper', :require => false
         | 
| 10 | 
            +
            gem 'whenever', '~> 0.7.0', :require => false
         | 
| 13 11 |  | 
| 14 | 
            -
              gem 'vesper', :require => false
         | 
| 15 12 |  | 
| 16 | 
            -
             | 
| 17 | 
            -
              gem 'whenever', '~> 0.7.0', :require => false
         | 
| 18 | 
            -
              
         | 
| 19 | 
            -
            # Load gems from plugins
         | 
| 20 | 
            -
              Dir["./plugins/**/Gemfile"].each {|gemfile| self.send(:eval, File.open(gemfile, 'r').read)}
         | 
| 13 | 
            +
            Dir["./plugins/**/Gemfile"].each {|gemfile| self.send(:eval, File.open(gemfile, 'r').read)}
         | 
| @@ -0,0 +1,112 @@ | |
| 1 | 
            +
            GEM
         | 
| 2 | 
            +
              remote: http://rubygems.org/
         | 
| 3 | 
            +
              specs:
         | 
| 4 | 
            +
                activesupport (3.1.3)
         | 
| 5 | 
            +
                  multi_json (~> 1.0)
         | 
| 6 | 
            +
                addressable (2.2.6)
         | 
| 7 | 
            +
                backports (2.3.0)
         | 
| 8 | 
            +
                bcrypt-ruby (3.0.1)
         | 
| 9 | 
            +
                chronic (0.6.6)
         | 
| 10 | 
            +
                data_mapper (1.2.0)
         | 
| 11 | 
            +
                  dm-aggregates (~> 1.2.0)
         | 
| 12 | 
            +
                  dm-constraints (~> 1.2.0)
         | 
| 13 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 14 | 
            +
                  dm-migrations (~> 1.2.0)
         | 
| 15 | 
            +
                  dm-serializer (~> 1.2.0)
         | 
| 16 | 
            +
                  dm-timestamps (~> 1.2.0)
         | 
| 17 | 
            +
                  dm-transactions (~> 1.2.0)
         | 
| 18 | 
            +
                  dm-types (~> 1.2.0)
         | 
| 19 | 
            +
                  dm-validations (~> 1.2.0)
         | 
| 20 | 
            +
                data_objects (0.10.7)
         | 
| 21 | 
            +
                  addressable (~> 2.1)
         | 
| 22 | 
            +
                diff-lcs (1.1.3)
         | 
| 23 | 
            +
                dm-aggregates (1.2.0)
         | 
| 24 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 25 | 
            +
                dm-constraints (1.2.0)
         | 
| 26 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 27 | 
            +
                dm-core (1.2.0)
         | 
| 28 | 
            +
                  addressable (~> 2.2.6)
         | 
| 29 | 
            +
                dm-do-adapter (1.2.0)
         | 
| 30 | 
            +
                  data_objects (~> 0.10.6)
         | 
| 31 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 32 | 
            +
                dm-migrations (1.2.0)
         | 
| 33 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 34 | 
            +
                dm-serializer (1.2.1)
         | 
| 35 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 36 | 
            +
                  fastercsv (~> 1.5.4)
         | 
| 37 | 
            +
                  json (~> 1.6.1)
         | 
| 38 | 
            +
                  json_pure (~> 1.6.1)
         | 
| 39 | 
            +
                  multi_json (~> 1.0.3)
         | 
| 40 | 
            +
                dm-sqlite-adapter (1.2.0)
         | 
| 41 | 
            +
                  dm-do-adapter (~> 1.2.0)
         | 
| 42 | 
            +
                  do_sqlite3 (~> 0.10.6)
         | 
| 43 | 
            +
                dm-timestamps (1.2.0)
         | 
| 44 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 45 | 
            +
                dm-transactions (1.2.0)
         | 
| 46 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 47 | 
            +
                dm-types (1.2.1)
         | 
| 48 | 
            +
                  bcrypt-ruby (~> 3.0.0)
         | 
| 49 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 50 | 
            +
                  fastercsv (~> 1.5.4)
         | 
| 51 | 
            +
                  json (~> 1.6.1)
         | 
| 52 | 
            +
                  multi_json (~> 1.0.3)
         | 
| 53 | 
            +
                  stringex (~> 1.3.0)
         | 
| 54 | 
            +
                  uuidtools (~> 2.1.2)
         | 
| 55 | 
            +
                dm-validations (1.2.0)
         | 
| 56 | 
            +
                  dm-core (~> 1.2.0)
         | 
| 57 | 
            +
                do_sqlite3 (0.10.7)
         | 
| 58 | 
            +
                  data_objects (= 0.10.7)
         | 
| 59 | 
            +
                eventmachine (0.12.10)
         | 
| 60 | 
            +
                fastercsv (1.5.4)
         | 
| 61 | 
            +
                grit (2.4.1)
         | 
| 62 | 
            +
                  diff-lcs (~> 1.1)
         | 
| 63 | 
            +
                  mime-types (~> 1.15)
         | 
| 64 | 
            +
                json (1.6.3)
         | 
| 65 | 
            +
                json_pure (1.6.3)
         | 
| 66 | 
            +
                mime-types (1.17.2)
         | 
| 67 | 
            +
                multi_json (1.0.4)
         | 
| 68 | 
            +
                rack (1.3.5)
         | 
| 69 | 
            +
                rack-protection (1.1.4)
         | 
| 70 | 
            +
                  rack
         | 
| 71 | 
            +
                rack-test (0.6.1)
         | 
| 72 | 
            +
                  rack (>= 1.0)
         | 
| 73 | 
            +
                redcarpet (2.0.1)
         | 
| 74 | 
            +
                sinatra (1.3.1)
         | 
| 75 | 
            +
                  rack (~> 1.3, >= 1.3.4)
         | 
| 76 | 
            +
                  rack-protection (~> 1.1, >= 1.1.2)
         | 
| 77 | 
            +
                  tilt (~> 1.3, >= 1.3.3)
         | 
| 78 | 
            +
                sinatra-contrib (1.3.1)
         | 
| 79 | 
            +
                  backports (>= 2.0)
         | 
| 80 | 
            +
                  eventmachine
         | 
| 81 | 
            +
                  rack-protection
         | 
| 82 | 
            +
                  rack-test
         | 
| 83 | 
            +
                  sinatra (~> 1.3.0)
         | 
| 84 | 
            +
                  tilt (~> 1.3)
         | 
| 85 | 
            +
                stringex (1.3.0)
         | 
| 86 | 
            +
                tilt (1.3.3)
         | 
| 87 | 
            +
                uuidtools (2.1.2)
         | 
| 88 | 
            +
                vesper (0.6.0)
         | 
| 89 | 
            +
                  bundler (~> 1.0.21)
         | 
| 90 | 
            +
                  chronic (~> 0.6.5)
         | 
| 91 | 
            +
                  data_mapper (~> 1.2.0)
         | 
| 92 | 
            +
                  dm-sqlite-adapter (~> 1.2.0)
         | 
| 93 | 
            +
                  grit (~> 2.4.1)
         | 
| 94 | 
            +
                  redcarpet (~> 2.0.0)
         | 
| 95 | 
            +
                  sinatra (~> 1.3.1)
         | 
| 96 | 
            +
                  whenever (~> 0.7.0)
         | 
| 97 | 
            +
                whenever (0.7.0)
         | 
| 98 | 
            +
                  activesupport (>= 2.3.4)
         | 
| 99 | 
            +
                  chronic (~> 0.6.3)
         | 
| 100 | 
            +
             | 
| 101 | 
            +
            PLATFORMS
         | 
| 102 | 
            +
              ruby
         | 
| 103 | 
            +
             | 
| 104 | 
            +
            DEPENDENCIES
         | 
| 105 | 
            +
              chronic (~> 0.6.5)
         | 
| 106 | 
            +
              data_mapper (~> 1.2.0)
         | 
| 107 | 
            +
              dm-sqlite-adapter (~> 1.2.0)
         | 
| 108 | 
            +
              redcarpet (~> 2.0.0)
         | 
| 109 | 
            +
              sinatra (~> 1.3.1)
         | 
| 110 | 
            +
              sinatra-contrib (~> 1.3.1)
         | 
| 111 | 
            +
              vesper
         | 
| 112 | 
            +
              whenever (~> 0.7.0)
         | 
| 
            File without changes
         | 
| @@ -1,6 +1,88 @@ | |
| 1 | 
            -
             | 
| 2 | 
            -
             | 
| 3 | 
            -
            >  | 
| 1 | 
            +
            Vesper Core Extensions Plugin
         | 
| 2 | 
            +
            =============================
         | 
| 3 | 
            +
            > Adds useful extensions to Ruby and Sinatra.
         | 
| 4 | 
            +
             | 
| 5 | 
            +
             | 
| 6 | 
            +
            active(path)
         | 
| 7 | 
            +
            ------------
         | 
| 8 | 
            +
            > Adds a class of 'active' to an element that matches the page url.
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            	>> <a href="#" class="<%= active '/home' %>">Home</a>
         | 
| 11 | 
            +
            	=> <a href="#" class="active">Home</a>
         | 
| 12 | 
            +
             | 
| 13 | 
            +
             | 
| 14 | 
            +
            alert
         | 
| 15 | 
            +
            -----
         | 
| 16 | 
            +
            > Displays an alert message div.
         | 
| 17 | 
            +
             | 
| 18 | 
            +
            > Note: Will only display on the next page load.
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            	>> session[:flash] = 'Your message here.' # Before page loads, usually in a route the redirects
         | 
| 21 | 
            +
            	>> <%= alert => # In your view or layout
         | 
| 22 | 
            +
            	=> "<div id='alert'>Your message here.</div>"
         | 
| 23 | 
            +
             | 
| 24 | 
            +
             | 
| 25 | 
            +
            hidden
         | 
| 26 | 
            +
            ------
         | 
| 27 | 
            +
            > Hides an element.
         | 
| 28 | 
            +
             | 
| 29 | 
            +
            > Note: Works will with if/unless (hidden unless @var.empty?).
         | 
| 30 | 
            +
             | 
| 31 | 
            +
            	>> <div style="<%= hidden %>">Content to hide</div>
         | 
| 32 | 
            +
             | 
| 33 | 
            +
             | 
| 34 | 
            +
            dollarize
         | 
| 35 | 
            +
            ---------
         | 
| 36 | 
            +
            > Converts a number to a dollar
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            > Note: This isn't a currency conversion, it's only a string.
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            	>> 1.dollarize
         | 
| 41 | 
            +
            	=> '$1.00'
         | 
| 42 | 
            +
             | 
| 43 | 
            +
             | 
| 44 | 
            +
            even?
         | 
| 45 | 
            +
            -----
         | 
| 46 | 
            +
            > Returns true if a number is even.
         | 
| 47 | 
            +
             | 
| 48 | 
            +
            	>> 2.even?
         | 
| 49 | 
            +
            	=> true
         | 
| 50 | 
            +
             | 
| 51 | 
            +
             | 
| 52 | 
            +
            odd?
         | 
| 53 | 
            +
            ----
         | 
| 54 | 
            +
            > Returns true if a number is odd.
         | 
| 55 | 
            +
             | 
| 56 | 
            +
            	>> 2.even?
         | 
| 57 | 
            +
            	=> false
         | 
| 58 | 
            +
             | 
| 59 | 
            +
             | 
| 60 | 
            +
            truncate_to_decimal(dec = 1)
         | 
| 61 | 
            +
            ----------------------------
         | 
| 62 | 
            +
            > Truncates a number to a float (The standard truncate methods returns an integer).
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            > The dec argument determines how many digits to leave after the decimal; it defaults to 1.
         | 
| 65 | 
            +
             | 
| 66 | 
            +
            > Note: Removes trailing 0s.
         | 
| 67 | 
            +
             | 
| 68 | 
            +
            	>> 1.234.truncate_to_decimal 2
         | 
| 69 | 
            +
            	=> 1.23
         | 
| 70 | 
            +
             | 
| 71 | 
            +
             | 
| 72 | 
            +
            titleize
         | 
| 73 | 
            +
            --------
         | 
| 74 | 
            +
            > Capitalizes the first letter of each word in a string.
         | 
| 75 | 
            +
             | 
| 76 | 
            +
            	>> 'This is a title'.titleize
         | 
| 77 | 
            +
            	=> 'This Is A Title'
         | 
| 78 | 
            +
             | 
| 79 | 
            +
             | 
| 80 | 
            +
            truncate(word_count = 100, end_string = '...')
         | 
| 81 | 
            +
            ----------------------------------------------
         | 
| 82 | 
            +
            > Truncates by word count (not letter).
         | 
| 83 | 
            +
             | 
| 84 | 
            +
            	>> 'One Two Three Four Five'.truncate 3
         | 
| 85 | 
            +
            	=> 'One Two Three...'
         | 
| 4 86 |  | 
| 5 87 |  | 
| 6 88 | 
             
            display
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            module  | 
| 1 | 
            +
            module VesperDateTime
         | 
| 2 2 |  | 
| 3 3 | 
             
              def self.included base
         | 
| 4 4 | 
             
                base.extend ClassMethods
         | 
| @@ -52,6 +52,6 @@ module Timepiece | |
| 52 52 |  | 
| 53 53 | 
             
            end
         | 
| 54 54 |  | 
| 55 | 
            -
            Date.class_eval     { include  | 
| 56 | 
            -
            DateTime.class_eval { include  | 
| 57 | 
            -
            Time.class_eval     { include  | 
| 55 | 
            +
            Date.class_eval     { include VesperDateTime }
         | 
| 56 | 
            +
            DateTime.class_eval { include VesperDateTime }
         | 
| 57 | 
            +
            Time.class_eval     { include VesperDateTime }
         | 
| 
            File without changes
         | 
| @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            module  | 
| 1 | 
            +
            module VesperNumber
         | 
| 2 2 |  | 
| 3 3 | 
             
              def dollarize
         | 
| 4 4 | 
             
                num = self
         | 
| @@ -22,5 +22,5 @@ module Number | |
| 22 22 |  | 
| 23 23 | 
             
            end
         | 
| 24 24 |  | 
| 25 | 
            -
            Fixnum.class_eval { include  | 
| 26 | 
            -
            Float.class_eval  { include  | 
| 25 | 
            +
            Fixnum.class_eval { include VesperNumber }
         | 
| 26 | 
            +
            Float.class_eval  { include VesperNumber }
         | 
| 
            File without changes
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            gem 'sinatra-contrib', '~> 1.3.1'
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| 
            File without changes
         | 
| @@ -0,0 +1 @@ | |
| 1 | 
            +
            # Your user editable config goes here...
         | 
    
        data/lib/vesper/version.rb
    CHANGED
    
    
    
        data/vesper.gemspec
    CHANGED
    
    | @@ -7,7 +7,7 @@ Gem::Specification.new do |s| | |
| 7 7 | 
             
              s.version     = Vesper::VERSION
         | 
| 8 8 | 
             
              s.author      = "Jarrod Taylor"
         | 
| 9 9 | 
             
              s.email       = "jarrodtaylor@me.com"
         | 
| 10 | 
            -
              s.homepage    = "http:// | 
| 10 | 
            +
              s.homepage    = "http://vesperapps.com/"
         | 
| 11 11 | 
             
              s.summary     = "A web framework with a focus on transparency; Vesper combines Rack, Sinatra and DataMapper."
         | 
| 12 12 |  | 
| 13 13 | 
             
              s.files         = `git ls-files`.split("\n")
         | 
| @@ -19,9 +19,6 @@ Gem::Specification.new do |s| | |
| 19 19 |  | 
| 20 20 | 
             
              s.post_install_message = "\nTo see what vesper can do:\n  vesper options\n\nSend any questions or comments to jarrodtaylor@me.com\n\n"
         | 
| 21 21 |  | 
| 22 | 
            -
              s.add_development_dependency "bundler", "~> 1.0.21"
         | 
| 23 | 
            -
             | 
| 24 | 
            -
              s.add_runtime_dependency "bundler", "~> 1.0.21"
         | 
| 25 22 | 
             
              s.add_runtime_dependency "chronic", "~> 0.6.5"
         | 
| 26 23 | 
             
              s.add_runtime_dependency "data_mapper", "~> 1.2.0"
         | 
| 27 24 | 
             
              s.add_runtime_dependency "dm-sqlite-adapter", "~> 1.2.0"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: vesper
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0. | 
| 4 | 
            +
              version: 0.7.0
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -9,33 +9,11 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2011-12- | 
| 12 | 
            +
            date: 2011-12-31 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 15 | 
            -
              name: bundler
         | 
| 16 | 
            -
              requirement: &70186917291680 !ruby/object:Gem::Requirement
         | 
| 17 | 
            -
                none: false
         | 
| 18 | 
            -
                requirements:
         | 
| 19 | 
            -
                - - ~>
         | 
| 20 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 21 | 
            -
                    version: 1.0.21
         | 
| 22 | 
            -
              type: :development
         | 
| 23 | 
            -
              prerelease: false
         | 
| 24 | 
            -
              version_requirements: *70186917291680
         | 
| 25 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 26 | 
            -
              name: bundler
         | 
| 27 | 
            -
              requirement: &70186917291200 !ruby/object:Gem::Requirement
         | 
| 28 | 
            -
                none: false
         | 
| 29 | 
            -
                requirements:
         | 
| 30 | 
            -
                - - ~>
         | 
| 31 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 32 | 
            -
                    version: 1.0.21
         | 
| 33 | 
            -
              type: :runtime
         | 
| 34 | 
            -
              prerelease: false
         | 
| 35 | 
            -
              version_requirements: *70186917291200
         | 
| 36 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 37 15 | 
             
              name: chronic
         | 
| 38 | 
            -
              requirement: & | 
| 16 | 
            +
              requirement: &70103014613180 !ruby/object:Gem::Requirement
         | 
| 39 17 | 
             
                none: false
         | 
| 40 18 | 
             
                requirements:
         | 
| 41 19 | 
             
                - - ~>
         | 
| @@ -43,10 +21,10 @@ dependencies: | |
| 43 21 | 
             
                    version: 0.6.5
         | 
| 44 22 | 
             
              type: :runtime
         | 
| 45 23 | 
             
              prerelease: false
         | 
| 46 | 
            -
              version_requirements: * | 
| 24 | 
            +
              version_requirements: *70103014613180
         | 
| 47 25 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 48 26 | 
             
              name: data_mapper
         | 
| 49 | 
            -
              requirement: & | 
| 27 | 
            +
              requirement: &70103014612720 !ruby/object:Gem::Requirement
         | 
| 50 28 | 
             
                none: false
         | 
| 51 29 | 
             
                requirements:
         | 
| 52 30 | 
             
                - - ~>
         | 
| @@ -54,10 +32,10 @@ dependencies: | |
| 54 32 | 
             
                    version: 1.2.0
         | 
| 55 33 | 
             
              type: :runtime
         | 
| 56 34 | 
             
              prerelease: false
         | 
| 57 | 
            -
              version_requirements: * | 
| 35 | 
            +
              version_requirements: *70103014612720
         | 
| 58 36 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 59 37 | 
             
              name: dm-sqlite-adapter
         | 
| 60 | 
            -
              requirement: & | 
| 38 | 
            +
              requirement: &70103014612260 !ruby/object:Gem::Requirement
         | 
| 61 39 | 
             
                none: false
         | 
| 62 40 | 
             
                requirements:
         | 
| 63 41 | 
             
                - - ~>
         | 
| @@ -65,10 +43,10 @@ dependencies: | |
| 65 43 | 
             
                    version: 1.2.0
         | 
| 66 44 | 
             
              type: :runtime
         | 
| 67 45 | 
             
              prerelease: false
         | 
| 68 | 
            -
              version_requirements: * | 
| 46 | 
            +
              version_requirements: *70103014612260
         | 
| 69 47 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 70 48 | 
             
              name: grit
         | 
| 71 | 
            -
              requirement: & | 
| 49 | 
            +
              requirement: &70103014611800 !ruby/object:Gem::Requirement
         | 
| 72 50 | 
             
                none: false
         | 
| 73 51 | 
             
                requirements:
         | 
| 74 52 | 
             
                - - ~>
         | 
| @@ -76,10 +54,10 @@ dependencies: | |
| 76 54 | 
             
                    version: 2.4.1
         | 
| 77 55 | 
             
              type: :runtime
         | 
| 78 56 | 
             
              prerelease: false
         | 
| 79 | 
            -
              version_requirements: * | 
| 57 | 
            +
              version_requirements: *70103014611800
         | 
| 80 58 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 81 59 | 
             
              name: redcarpet
         | 
| 82 | 
            -
              requirement: & | 
| 60 | 
            +
              requirement: &70103014611340 !ruby/object:Gem::Requirement
         | 
| 83 61 | 
             
                none: false
         | 
| 84 62 | 
             
                requirements:
         | 
| 85 63 | 
             
                - - ~>
         | 
| @@ -87,10 +65,10 @@ dependencies: | |
| 87 65 | 
             
                    version: 2.0.0
         | 
| 88 66 | 
             
              type: :runtime
         | 
| 89 67 | 
             
              prerelease: false
         | 
| 90 | 
            -
              version_requirements: * | 
| 68 | 
            +
              version_requirements: *70103014611340
         | 
| 91 69 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 92 70 | 
             
              name: sinatra
         | 
| 93 | 
            -
              requirement: & | 
| 71 | 
            +
              requirement: &70103014610880 !ruby/object:Gem::Requirement
         | 
| 94 72 | 
             
                none: false
         | 
| 95 73 | 
             
                requirements:
         | 
| 96 74 | 
             
                - - ~>
         | 
| @@ -98,10 +76,10 @@ dependencies: | |
| 98 76 | 
             
                    version: 1.3.1
         | 
| 99 77 | 
             
              type: :runtime
         | 
| 100 78 | 
             
              prerelease: false
         | 
| 101 | 
            -
              version_requirements: * | 
| 79 | 
            +
              version_requirements: *70103014610880
         | 
| 102 80 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 103 81 | 
             
              name: whenever
         | 
| 104 | 
            -
              requirement: & | 
| 82 | 
            +
              requirement: &70103014610420 !ruby/object:Gem::Requirement
         | 
| 105 83 | 
             
                none: false
         | 
| 106 84 | 
             
                requirements:
         | 
| 107 85 | 
             
                - - ~>
         | 
| @@ -109,7 +87,7 @@ dependencies: | |
| 109 87 | 
             
                    version: 0.7.0
         | 
| 110 88 | 
             
              type: :runtime
         | 
| 111 89 | 
             
              prerelease: false
         | 
| 112 | 
            -
              version_requirements: * | 
| 90 | 
            +
              version_requirements: *70103014610420
         | 
| 113 91 | 
             
            description: 
         | 
| 114 92 | 
             
            email: jarrodtaylor@me.com
         | 
| 115 93 | 
             
            executables:
         | 
| @@ -125,6 +103,7 @@ files: | |
| 125 103 | 
             
            - lib/vesper.rb
         | 
| 126 104 | 
             
            - lib/vesper/framework/.gitignore
         | 
| 127 105 | 
             
            - lib/vesper/framework/Gemfile
         | 
| 106 | 
            +
            - lib/vesper/framework/Gemfile.lock
         | 
| 128 107 | 
             
            - lib/vesper/framework/Rakefile
         | 
| 129 108 | 
             
            - lib/vesper/framework/Readme.md
         | 
| 130 109 | 
             
            - lib/vesper/framework/application/hello_world.rb
         | 
| @@ -135,24 +114,26 @@ files: | |
| 135 114 | 
             
            - lib/vesper/framework/data/seeds.rb
         | 
| 136 115 | 
             
            - lib/vesper/framework/data/transmogrify.rb
         | 
| 137 116 | 
             
            - lib/vesper/framework/log/messages.log
         | 
| 138 | 
            -
            - lib/vesper/framework/plugins/ | 
| 139 | 
            -
            - lib/vesper/framework/plugins/ | 
| 140 | 
            -
            - lib/vesper/framework/plugins/ | 
| 141 | 
            -
            - lib/vesper/framework/plugins/ | 
| 142 | 
            -
            - lib/vesper/framework/plugins/ | 
| 143 | 
            -
            - lib/vesper/framework/plugins/ | 
| 144 | 
            -
            - lib/vesper/framework/plugins/ | 
| 145 | 
            -
            - lib/vesper/framework/plugins/ | 
| 146 | 
            -
            - lib/vesper/framework/plugins/ | 
| 147 | 
            -
            - lib/vesper/framework/plugins/ | 
| 148 | 
            -
            - lib/vesper/framework/plugins/ | 
| 149 | 
            -
            - lib/vesper/framework/plugins/ | 
| 150 | 
            -
            - lib/vesper/framework/plugins/ | 
| 151 | 
            -
            - lib/vesper/framework/plugins/ | 
| 152 | 
            -
            - lib/vesper/framework/plugins/ | 
| 153 | 
            -
            - lib/vesper/framework/plugins/ | 
| 154 | 
            -
            - lib/vesper/framework/plugins/ | 
| 155 | 
            -
            - lib/vesper/framework/plugins/ | 
| 117 | 
            +
            - lib/vesper/framework/plugins/core-extensions/Gemfile
         | 
| 118 | 
            +
            - lib/vesper/framework/plugins/core-extensions/Readme.md
         | 
| 119 | 
            +
            - lib/vesper/framework/plugins/core-extensions/application/date_time.rb
         | 
| 120 | 
            +
            - lib/vesper/framework/plugins/core-extensions/application/helpers.rb
         | 
| 121 | 
            +
            - lib/vesper/framework/plugins/core-extensions/application/number.rb
         | 
| 122 | 
            +
            - lib/vesper/framework/plugins/core-extensions/application/string.rb
         | 
| 123 | 
            +
            - lib/vesper/framework/plugins/core-extensions/meta_data.rb
         | 
| 124 | 
            +
            - lib/vesper/framework/plugins/hot-reloader/Gemfile
         | 
| 125 | 
            +
            - lib/vesper/framework/plugins/hot-reloader/Readme.md
         | 
| 126 | 
            +
            - lib/vesper/framework/plugins/hot-reloader/config/hot-reloader.rb
         | 
| 127 | 
            +
            - lib/vesper/framework/plugins/hot-reloader/meta_data.rb
         | 
| 128 | 
            +
            - lib/vesper/framework/plugins/logger/Readme.md
         | 
| 129 | 
            +
            - lib/vesper/framework/plugins/logger/application/log.rb
         | 
| 130 | 
            +
            - lib/vesper/framework/plugins/logger/meta_data.rb
         | 
| 131 | 
            +
            - lib/vesper/framework/plugins/logger/tasks/log.rb
         | 
| 132 | 
            +
            - lib/vesper/framework/plugins/markdown-parser/Gemfile
         | 
| 133 | 
            +
            - lib/vesper/framework/plugins/markdown-parser/Readme.md
         | 
| 134 | 
            +
            - lib/vesper/framework/plugins/markdown-parser/application/markdown-parser.rb
         | 
| 135 | 
            +
            - lib/vesper/framework/plugins/markdown-parser/config/markdown-parser.rb
         | 
| 136 | 
            +
            - lib/vesper/framework/plugins/markdown-parser/meta_data.rb
         | 
| 156 137 | 
             
            - lib/vesper/framework/public/css/design.css
         | 
| 157 138 | 
             
            - lib/vesper/framework/public/img/fyeah.jpg
         | 
| 158 139 | 
             
            - lib/vesper/framework/public/js/hide_addressbar.js
         | 
| @@ -163,10 +144,16 @@ files: | |
| 163 144 | 
             
            - lib/vesper/framework/tmp/restart.txt
         | 
| 164 145 | 
             
            - lib/vesper/framework/views/hello_world.html
         | 
| 165 146 | 
             
            - lib/vesper/framework/views/layout.html
         | 
| 147 | 
            +
            - lib/vesper/plugin/Gemfile
         | 
| 148 | 
            +
            - lib/vesper/plugin/Readme.md
         | 
| 149 | 
            +
            - lib/vesper/plugin/application/plugin.rb
         | 
| 150 | 
            +
            - lib/vesper/plugin/config/plugin.rb
         | 
| 151 | 
            +
            - lib/vesper/plugin/meta_data.rb
         | 
| 152 | 
            +
            - lib/vesper/plugin/tasks/plugin.rb
         | 
| 166 153 | 
             
            - lib/vesper/rake.rb
         | 
| 167 154 | 
             
            - lib/vesper/version.rb
         | 
| 168 155 | 
             
            - vesper.gemspec
         | 
| 169 | 
            -
            homepage: http:// | 
| 156 | 
            +
            homepage: http://vesperapps.com/
         | 
| 170 157 | 
             
            licenses: []
         | 
| 171 158 | 
             
            post_install_message: ! "\nTo see what vesper can do:\n  vesper options\n\nSend any
         | 
| 172 159 | 
             
              questions or comments to jarrodtaylor@me.com\n\n"
         | 
| @@ -1,85 +0,0 @@ | |
| 1 | 
            -
            Addendums Vesper Plugin
         | 
| 2 | 
            -
            =======================
         | 
| 3 | 
            -
            > Adds useful extensions to Ruby and Sinatra
         | 
| 4 | 
            -
             | 
| 5 | 
            -
             | 
| 6 | 
            -
            active(path)
         | 
| 7 | 
            -
            ------------
         | 
| 8 | 
            -
            > Adds a class of 'active' to an element that matches the page url.
         | 
| 9 | 
            -
             | 
| 10 | 
            -
            	>> <a href="#" class="<%= active '/home' %>">Home</a>
         | 
| 11 | 
            -
            	=> <a href="#" class="active">Home</a>
         | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
            alert
         | 
| 15 | 
            -
            -----
         | 
| 16 | 
            -
            > Displays an alert message div.
         | 
| 17 | 
            -
             | 
| 18 | 
            -
            > Note: Will only display on the next page load.
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            	>> session[:flash] = 'Your message here.' # Before page loads, usually in a route the redirects
         | 
| 21 | 
            -
            	>> <%= alert => # In your view or layout
         | 
| 22 | 
            -
            	=> "<div id='alert'>Your message here.</div>"
         | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
            hidden
         | 
| 26 | 
            -
            ------
         | 
| 27 | 
            -
            > Hides an element.
         | 
| 28 | 
            -
             | 
| 29 | 
            -
            > Note: Works will with if/unless (hidden unless @var.empty?).
         | 
| 30 | 
            -
             | 
| 31 | 
            -
            	>> <div style="<%= hidden %>">Content to hide</div>
         | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
            dollarize
         | 
| 35 | 
            -
            ---------
         | 
| 36 | 
            -
            > Converts a number to a dollar
         | 
| 37 | 
            -
             | 
| 38 | 
            -
            > Note: This isn't a currency conversion, it's only a string.
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            	>> 1.dollarize
         | 
| 41 | 
            -
            	=> '$1.00'
         | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
            even?
         | 
| 45 | 
            -
            -----
         | 
| 46 | 
            -
            > Returns true if a number is even.
         | 
| 47 | 
            -
             | 
| 48 | 
            -
            	>> 2.even?
         | 
| 49 | 
            -
            	=> true
         | 
| 50 | 
            -
             | 
| 51 | 
            -
             | 
| 52 | 
            -
            odd?
         | 
| 53 | 
            -
            ----
         | 
| 54 | 
            -
            > Returns true if a number is odd.
         | 
| 55 | 
            -
             | 
| 56 | 
            -
            	>> 2.even?
         | 
| 57 | 
            -
            	=> false
         | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
            truncate_to_decimal(dec = 1)
         | 
| 61 | 
            -
            ----------------------------
         | 
| 62 | 
            -
            > Truncates a number to a float (The standard truncate methods returns an integer).
         | 
| 63 | 
            -
             | 
| 64 | 
            -
            > The dec argument determines how many digits to leave after the decimal; it defaults to 1.
         | 
| 65 | 
            -
             | 
| 66 | 
            -
            > Note: Removes trailing 0s.
         | 
| 67 | 
            -
             | 
| 68 | 
            -
            	>> 1.234.truncate_to_decimal 2
         | 
| 69 | 
            -
            	=> 1.23
         | 
| 70 | 
            -
             | 
| 71 | 
            -
             | 
| 72 | 
            -
            titleize
         | 
| 73 | 
            -
            --------
         | 
| 74 | 
            -
            > Capitalizes the first letter of each word in a string.
         | 
| 75 | 
            -
             | 
| 76 | 
            -
            	>> 'This is a title'.titleize
         | 
| 77 | 
            -
            	=> 'This Is A Title'
         | 
| 78 | 
            -
             | 
| 79 | 
            -
             | 
| 80 | 
            -
            truncate(word_count = 100, end_string = '...')
         | 
| 81 | 
            -
            ----------------------------------------------
         | 
| 82 | 
            -
            > Truncates by word count (not letter).
         | 
| 83 | 
            -
             | 
| 84 | 
            -
            	>> 'One Two Three Four Five'.truncate 3
         | 
| 85 | 
            -
            	=> 'One Two Three...'
         |