Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

final changes based on new test/dummy structure from enginex run

  • Loading branch information...
commit 013bc4278970ae6ecc80287db9e26382d121beb4 1 parent 9d58900
@mjankowski mjankowski authored
View
6 .gitignore
@@ -1,2 +1,8 @@
*.swp
*.swo
+.bundle/
+log/*.log
+pkg/
+test/dummy/db/*.sqlite3
+test/dummy/log/*.log
+test/dummy/tmp/
View
5 Gemfile
@@ -0,0 +1,5 @@
+source "http://rubygems.org"
+
+gem "rails", "3.0.3"
+gem "sqlite3-ruby", :require => "sqlite3"
+gem "shoulda"
View
75 Gemfile.lock
@@ -0,0 +1,75 @@
+GEM
+ remote: http://rubygems.org/
+ specs:
+ abstract (1.0.0)
+ actionmailer (3.0.3)
+ actionpack (= 3.0.3)
+ mail (~> 2.2.9)
+ actionpack (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ erubis (~> 2.6.6)
+ i18n (~> 0.4)
+ rack (~> 1.2.1)
+ rack-mount (~> 0.6.13)
+ rack-test (~> 0.5.6)
+ tzinfo (~> 0.3.23)
+ activemodel (3.0.3)
+ activesupport (= 3.0.3)
+ builder (~> 2.1.2)
+ i18n (~> 0.4)
+ activerecord (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ arel (~> 2.0.2)
+ tzinfo (~> 0.3.23)
+ activeresource (3.0.3)
+ activemodel (= 3.0.3)
+ activesupport (= 3.0.3)
+ activesupport (3.0.3)
+ arel (2.0.6)
+ builder (2.1.2)
+ erubis (2.6.6)
+ abstract (>= 1.0.0)
+ i18n (0.5.0)
+ mail (2.2.12)
+ activesupport (>= 2.3.6)
+ i18n (>= 0.4.0)
+ mime-types (~> 1.16)
+ treetop (~> 1.4.8)
+ mime-types (1.16)
+ polyglot (0.3.1)
+ rack (1.2.1)
+ rack-mount (0.6.13)
+ rack (>= 1.0.0)
+ rack-test (0.5.6)
+ rack (>= 1.0)
+ rails (3.0.3)
+ actionmailer (= 3.0.3)
+ actionpack (= 3.0.3)
+ activerecord (= 3.0.3)
+ activeresource (= 3.0.3)
+ activesupport (= 3.0.3)
+ bundler (~> 1.0)
+ railties (= 3.0.3)
+ railties (3.0.3)
+ actionpack (= 3.0.3)
+ activesupport (= 3.0.3)
+ rake (>= 0.8.7)
+ thor (~> 0.14.4)
+ rake (0.8.7)
+ shoulda (2.11.3)
+ sqlite3-ruby (1.3.2)
+ thor (0.14.6)
+ treetop (1.4.9)
+ polyglot (>= 0.3.1)
+ tzinfo (0.3.23)
+
+PLATFORMS
+ ruby
+
+DEPENDENCIES
+ rails (= 3.0.3)
+ shoulda
+ sqlite3-ruby
View
31 README.markdown → README.rdoc
@@ -1,22 +1,25 @@
-High Voltage
-============
+== High Voltage
Rails engine for static pages.
... but be careful. [Danger!](http://www.youtube.com/watch?v=HD5tnb2RBYg)
-Static pages?
--------------
+= Static pages?
Yeah, like "About us", "Directions", marketing pages, etc.
-Installation
-------------
+= Installation
$ gem install high_voltage
-Usage
------
+Include in your Gemfile:
+
+ gem "high_voltage"
+
+For Rails versions prior to 3.0, use the rails2 branch of high_voltage:
+https://github.com/thoughtbot/high_voltage/tree/rails2
+
+= Usage
Write your static pages and put them in the RAILS_ROOT/app/views/pages directory.
@@ -29,8 +32,7 @@ After putting something interesting there, you can link to it from anywhere in y
Bam.
-Routes
-------
+= Routes
By default, the static page routes will be like /pages/:id (where :id is the view filename).
@@ -46,8 +48,7 @@ You'll notice in your config/routes.rb file that the High Voltage routes are gen
HighVoltage::Routes.draw(map)
-Override
---------
+= Override
Most common reasons to override? Authentication, layouts.
@@ -62,8 +63,7 @@ Then modify it to subclass from High Voltage, adding whatever you need:
layout "danger"
end
-Testing
--------
+= Testing
Just a suggestion, but you can test your pages using Shoulda pretty easily:
@@ -84,7 +84,6 @@ If you're not using a custom PagesController be sure to test <code>HighVoltage::
Enjoy!
-License
--------
+= License
Copyright (c) thoughtbot, inc -- released under the MIT license.
View
22 Rakefile
@@ -1,23 +1,29 @@
+# encoding: UTF-8
+require 'rubygems'
+begin
+ require 'bundler/setup'
+rescue LoadError
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
+end
+
require 'rake'
-require 'rake/testtask'
require 'rake/rdoctask'
-desc 'Default: run unit tests.'
-task :default => :test
+require 'rake/testtask'
-desc 'Test the nothing_to_see_here_move_along plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
- t.verbose = true
+ t.verbose = false
end
-desc 'Generate documentation for the nothing_to_see_here_move_along plugin.'
+task :default => :test
+
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
- rdoc.title = 'NothingToSeeHereMoveAlong'
+ rdoc.title = 'HighVoltage'
rdoc.options << '--line-numbers' << '--inline-source'
- rdoc.rdoc_files.include('README')
+ rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
end
Please sign in to comment.
Something went wrong with that request. Please try again.