hashrocket-hashrocket-terraformation 0.0.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.
Files changed (56) hide show
  1. data/LICENSE +1 -0
  2. data/README.rdoc +14 -0
  3. data/Rakefile +30 -0
  4. data/bin/terrarails +94 -0
  5. data/rails_generators/terracontroller/USAGE +26 -0
  6. data/rails_generators/terracontroller/templates/controller_spec.rb.erb +20 -0
  7. data/rails_generators/terracontroller/templates/view.builder.erb +2 -0
  8. data/rails_generators/terracontroller/templates/view.erb +2 -0
  9. data/rails_generators/terracontroller/templates/view.haml.erb +2 -0
  10. data/rails_generators/terracontroller/templates/view.rjs.erb +1 -0
  11. data/rails_generators/terracontroller/templates/view.rss.builder.erb +18 -0
  12. data/rails_generators/terracontroller/templates/view_spec.rb.erb +15 -0
  13. data/rails_generators/terracontroller/terracontroller_generator.rb +44 -0
  14. data/rails_generators/terraformation/USAGE +2 -0
  15. data/rails_generators/terraformation/templates/application.html.haml.erb +25 -0
  16. data/rails_generators/terraformation/templates/blueprint/ie.css +22 -0
  17. data/rails_generators/terraformation/templates/blueprint/print.css +29 -0
  18. data/rails_generators/terraformation/templates/blueprint/screen.css +226 -0
  19. data/rails_generators/terraformation/templates/clear_test_default.rake +3 -0
  20. data/rails_generators/terraformation/templates/cucumber +8 -0
  21. data/rails_generators/terraformation/templates/cucumber.rake +15 -0
  22. data/rails_generators/terraformation/templates/gitignore +11 -0
  23. data/rails_generators/terraformation/templates/jquery.js +19 -0
  24. data/rails_generators/terraformation/templates/null_gitignore +2 -0
  25. data/rails_generators/terraformation/templates/paths.rb +23 -0
  26. data/rails_generators/terraformation/templates/rcov.opts +2 -0
  27. data/rails_generators/terraformation/templates/rspec.rake +149 -0
  28. data/rails_generators/terraformation/templates/spec.opts +2 -0
  29. data/rails_generators/terraformation/templates/spec_helper.rb +12 -0
  30. data/rails_generators/terraformation/terraformation_generator.rb +86 -0
  31. data/rails_generators/terraforming.rb +51 -0
  32. data/rails_generators/terrahelper/USAGE +9 -0
  33. data/rails_generators/terrahelper/templates/helper.rb.erb +10 -0
  34. data/rails_generators/terrahelper/templates/helper_spec.rb.erb +13 -0
  35. data/rails_generators/terrahelper/terrahelper_generator.rb +27 -0
  36. data/rails_generators/terramodel/USAGE +11 -0
  37. data/rails_generators/terramodel/templates/model_exemplar.rb.erb +5 -0
  38. data/rails_generators/terramodel/templates/model_factory.rb.erb +5 -0
  39. data/rails_generators/terramodel/templates/model_spec.rb.erb +17 -0
  40. data/rails_generators/terramodel/terramodel_generator.rb +54 -0
  41. data/rails_generators/terraresource/USAGE +20 -0
  42. data/rails_generators/terraresource/terraresource_generator.rb +93 -0
  43. data/rails_generators/terrascaffold/USAGE +2 -0
  44. data/rails_generators/terrascaffold/templates/controller.rb.erb +85 -0
  45. data/rails_generators/terrascaffold/templates/controller_spec.rb.erb +173 -0
  46. data/rails_generators/terrascaffold/templates/partial_form.html.haml.erb +7 -0
  47. data/rails_generators/terrascaffold/templates/view_edit.html.haml.erb +8 -0
  48. data/rails_generators/terrascaffold/templates/view_edit.html_spec.rb.erb +23 -0
  49. data/rails_generators/terrascaffold/templates/view_index.html.haml.erb +18 -0
  50. data/rails_generators/terrascaffold/templates/view_index.html_spec.rb.erb +25 -0
  51. data/rails_generators/terrascaffold/templates/view_new.html.haml.erb +7 -0
  52. data/rails_generators/terrascaffold/templates/view_new.html_spec.rb.erb +23 -0
  53. data/rails_generators/terrascaffold/templates/view_show.html.haml.erb +8 -0
  54. data/rails_generators/terrascaffold/templates/view_show.html_spec.rb.erb +21 -0
  55. data/rails_generators/terrascaffold/terrascaffold_generator.rb +97 -0
  56. metadata +121 -0
data/LICENSE ADDED
@@ -0,0 +1 @@
1
+ All rights reserved (for now).
data/README.rdoc ADDED
@@ -0,0 +1,14 @@
1
+ = Terraformation
2
+
3
+ Terraform your application with these Hashrocket best practice generators.
4
+
5
+ == Installation
6
+
7
+ Install as a plugin or a gem. Run script/generate with no arguments to see
8
+ the available generators. The gem version also makes available a terrarails
9
+ script for creating a new application.
10
+
11
+ == Credits
12
+
13
+ Cannibalized from the rails and rspec generators by a team of ravenous
14
+ rocketeers.
data/Rakefile ADDED
@@ -0,0 +1,30 @@
1
+ require 'rake/rdoctask'
2
+ require 'rake/gempackagetask'
3
+ require 'fileutils'
4
+
5
+ spec = Gem::Specification.new do |s|
6
+ s.name = "hashrocket-terraformation"
7
+ s.version = '0.0.0'
8
+ s.summary = "Terraform your app with style"
9
+ s.email = "info@hashrocket.com"
10
+ s.homepage = "http://github.com/hashrocket/terraformation"
11
+ s.has_rdoc = false
12
+ s.authors = ["a team of ravenous rocketeers"]
13
+ s.files = %w( LICENSE README.rdoc Rakefile ) + Dir["{bin,rails_generators}/**/*"].sort
14
+ s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
15
+ s.executables = ["terrarails"]
16
+ end
17
+
18
+ Rake::GemPackageTask.new(spec) do |package|
19
+ package.gem_spec = spec
20
+ end
21
+
22
+ desc "Generate the static gemspec required for github"
23
+ task :gemspec do
24
+ open("terraformation.gemspec", "w").write(spec.to_ruby)
25
+ end
26
+
27
+ desc "Install terraformation"
28
+ task :install => :repackage do
29
+ sh %{sudo gem install pkg/#{spec.name}-#{spec.version}}
30
+ end
data/bin/terrarails ADDED
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if instance_of?(Object) # Invoked directly
4
+ if %w(-h --help).include?(ARGV.first)
5
+ $stderr.puts "With no arguments, runs rake rails:template LOCATION=<filename>"
6
+ $stderr.puts "Otherwise, runs rails --template <filename> ..."
7
+ exit 1
8
+ elsif ARGV.empty?
9
+ exec('rake', 'rails:template', "LOCATION=#{__FILE__}")
10
+ else
11
+ exec('rails', '--template', __FILE__, *ARGV)
12
+ end
13
+ end
14
+
15
+ def self.unlink(file)
16
+ File.unlink(file)
17
+ log 'rm', file
18
+ rescue Errno::ENOENT
19
+ log 'missing', file
20
+ end
21
+
22
+ # Clean up trailing whitespace and ensure a final newline
23
+ def self.reformat(*files)
24
+ files.each do |file|
25
+ body = begin; File.read(file); rescue Errno::ENOENT; next; end
26
+ if body.gsub!(/ +$/,'') || body[-1,1] != "\n"
27
+ log 'reformat', file
28
+ File.open(file,'w') do |f|
29
+ f.puts body
30
+ end
31
+ end
32
+ end
33
+ end
34
+
35
+ unless File.exist?('config/database.example.yml')
36
+ file 'config/database.example.yml', File.read('config/database.yml')
37
+ end
38
+
39
+ unlink 'test/performance/browsing_test.rb'
40
+ %w(test/fixtures test/functional test/integration test/performance test/unit).each do |d|
41
+ begin
42
+ Dir.unlink(d)
43
+ rescue Errno::ENOENT, Errno::ENOTEMPTY
44
+ end
45
+ end
46
+ if File.directory?('test') && Dir.entries('test').sort == %w(. .. test_helper.rb)
47
+ unlink 'test/test_helper.rb'
48
+ Dir.unlink 'test'
49
+ end
50
+
51
+ %w(prototype controls dragdrop effects).each do |lib|
52
+ unlink "public/javascripts/#{lib}.js"
53
+ end
54
+ if File.size('public/javascripts/application.js') < 200
55
+ unlink 'public/javascripts/application.js'
56
+ file 'public/javascripts/application.js', "jQuery(function($){\n});\n"
57
+ end
58
+ unlink 'public/images/rails.png'
59
+ unlink 'public/index.html'
60
+
61
+ application_name = File.basename(root).gsub('_',' ').capitalize
62
+ if File.size('README') == 10011
63
+ unlink 'README'
64
+ file 'README', "= #{application_name}\n"
65
+ end
66
+ if File.size('doc/README_FOR_APP') == 211
67
+ unlink 'doc/README_FOR_APP'
68
+ file 'doc/README_FOR_APP', "= #{application_name}\n"
69
+ end
70
+
71
+ gsub_file 'app/helpers/application_helper.rb', /\A# Methods added to this .*\n/, ''
72
+ gsub_file 'config/environment.rb', /(?:^\s*# config\.gem .*\n)+/, <<-EOS
73
+ config.gem "haml", :version => ">= 2.0.7"
74
+ config.gem "rspec-rails", :version => ">= 1.1.12", :lib => false
75
+ config.gem "cucumber", :version => ">= 0.1.16", :lib => false
76
+ config.gem "webrat", :version => ">= 0.4.1", :lib => false
77
+ EOS
78
+ gsub_file 'config/routes.rb', /^(ActionController::Routing::Routes\.draw do \|map\|\n)(?:^\s*\n|^\s*#.*\n)*/, '\\1'
79
+
80
+ reformat *Dir.glob('config/environments/*.rb')
81
+ reformat 'config/environment.rb', 'config/routes.rb', 'config/boot.rb', 'config/initializers/session_store.rb', 'script/about'
82
+
83
+ added_cucumber = !File.directory?('features')
84
+ generate 'terraformation', '--skip', '--full'
85
+ if added_cucumber
86
+ reformat 'features/support/env.rb', 'features/step_definitions/webrat_steps.rb'
87
+ end
88
+
89
+ unless File.directory?('.git')
90
+ git :init
91
+ git :add => '.'
92
+ git :config => 'branch.master.remote origin'
93
+ git :config => 'branch.master.merge refs/heads/master'
94
+ end
@@ -0,0 +1,26 @@
1
+ Description:
2
+ The terracontroller generator creates a new controller and optionally its
3
+ views.
4
+
5
+ Views are given a .html.haml suffix by default but this can be overridden
6
+ by giving one or both extensions on the command line.
7
+
8
+ Example:
9
+ ./script/generate terracontroller planets rotate revolve
10
+ ...
11
+ create spec/controllers/planets_controller_spec.rb
12
+ create app/controllers/planets_controller.rb
13
+ create spec/views/planets/rotate.html_spec.rb
14
+ create app/views/planets/rotate.html.haml
15
+ create spec/views/planets/revolve.html_spec.rb
16
+ create app/views/planets/revolve.html.haml
17
+
18
+ Advanced Example:
19
+ ./script/generate terracontroller 'admin/planets' rotate.html rotate.rss
20
+ ...
21
+ create spec/controllers/admin/planets_controller_spec.rb
22
+ create app/controllers/admin/planets_controller.rb
23
+ create spec/views/admin/planets/rotate.html_spec.rb
24
+ create app/views/admin/planets/rotate.html.haml
25
+ create spec/views/admin/planets/rotate.rss_spec.rb
26
+ create app/views/admin/planets/rotate.rss.builder
@@ -0,0 +1,20 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../spec_helper')
2
+
3
+ describe <%= class_name %>Controller do
4
+ <% unless actions.empty? -%>
5
+ <% for action in actions -%>
6
+
7
+ describe "GET '<%= action %>'" do
8
+ def do_request
9
+ get :<%= action %>
10
+ end
11
+ protected :do_request
12
+
13
+ it "should be successful" do
14
+ do_request
15
+ response.should be_success
16
+ end
17
+ end
18
+ <% end -%>
19
+ <% end -%>
20
+ end
@@ -0,0 +1,2 @@
1
+ xml.h2 "<%= class_name %>#<%= action %>"
2
+ xml.p "Find me in <%= path %>"
@@ -0,0 +1,2 @@
1
+ <h2><%= class_name %>#<%= action %></h2>
2
+ <p>Find me in <%= path %></p>
@@ -0,0 +1,2 @@
1
+ %h2 <%= class_name %>#<%= action %>
2
+ %p Find me in <%= path %>
@@ -0,0 +1 @@
1
+ page.alert "<%= class_name %>#<%= action %>\nFind me in <%= path %>"
@@ -0,0 +1,18 @@
1
+ xml.instruct!
2
+ xml.rss :version => 2.0, 'xmlns:atom' => "http://www.w3.org/2005/Atom" do
3
+ xml.channel do
4
+ xml.title "<%= class_name %>#<%= action %>"
5
+ xml.description "Find me in <%= path %>"
6
+ xml.language "en-us"
7
+ xml.link url_for(params.merge(:format => nil, :only_path => false))
8
+ xml.atom :link, :href => url_for(params.merge(:only_path => false)), :rel => 'self'
9
+
10
+ xml.item do
11
+ xml.title "Title"
12
+ xml.description "Descriptions"
13
+ xml.pubDate "#{Time.now.to_s(:rfc822)}"
14
+ xml.link request.request_uri
15
+ xml.guid request.request_uri
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '<%= '/..' * class_nesting_depth %>/../../spec_helper')
2
+
3
+ describe "/<%= class_name.underscore %>/<%= name %>.<%= format %>" do
4
+ before do
5
+ <% if format == "html" -%>
6
+ render '<%= class_name.underscore %>/<%= name %>.<%= format %>'
7
+ <% else -%>
8
+ render '<%= class_name.underscore %>/<%= name %>.<%= format %>.<%= engine %>'
9
+ <% end -%>
10
+ end
11
+
12
+ it "should render" do
13
+ response.body.should be
14
+ end
15
+ end
@@ -0,0 +1,44 @@
1
+ require 'rails_generator/generators/components/controller/controller_generator'
2
+ require File.dirname(__FILE__) + '/../terraforming'
3
+
4
+ class TerracontrollerGenerator < ControllerGenerator
5
+ include Terraforming
6
+
7
+ def manifest
8
+ record do |m|
9
+ views
10
+ usage unless args.empty?
11
+
12
+ m.class_collisions class_path, "#{class_name}Controller"
13
+
14
+ m.directory File.join('app/controllers', class_path)
15
+ m.directory File.join('app/views', class_path, file_name)
16
+ m.directory File.join('spec/controllers', class_path)
17
+ m.directory File.join('spec/views', class_path, file_name)
18
+
19
+ m.template 'controller_spec.rb.erb',
20
+ File.join('spec/controllers', class_path, "#{file_name}_controller_spec.rb")
21
+ m.template 'controller:controller.rb',
22
+ File.join('app/controllers', class_path, "#{file_name}_controller.rb")
23
+
24
+ views.each do |view|
25
+ name, format, engine = view.split('.')
26
+ m.template 'view_spec.rb.erb',
27
+ File.join('spec/views', class_path, file_name, "#{name}.#{format}_spec.rb"),
28
+ :assigns => { :name => name, :format => format, :engine => engine }
29
+ path = File.join('app/views', class_path, file_name, view)
30
+ template = ["view.#{format}.#{engine}.erb", "view.#{engine}.erb", "view.erb"].detect {|f| File.exist?(source_path(f))}
31
+ m.template template,
32
+ path,
33
+ :assigns => { :action => "#{name}.#{format}", :path => path }
34
+ end
35
+ end
36
+ end
37
+
38
+ protected
39
+
40
+ def banner
41
+ "Usage: #{$0} terracontroller ControllerName [action]"
42
+ end
43
+
44
+ end
@@ -0,0 +1,2 @@
1
+ Description:
2
+ Hashrocket bare bones bootstrap. At least one option is required.
@@ -0,0 +1,25 @@
1
+ !!!
2
+ %html{html_attrs}
3
+ %head
4
+ %meta{'http-equiv' => 'Content-Type', :content => 'text/html;charset=utf-8'}
5
+ %meta{'http-equiv' => 'Content-Script-Type', :content => 'text/javascript'}
6
+ - if protect_against_forgery?
7
+ %meta{:name => 'authenticity_token', :content => form_authenticity_token}
8
+ %title= h(@title || "<%= File.basename(destination_path('')).gsub('_', ' ').capitalize %>")
9
+ <% if exist?("public/stylesheets/blueprint") -%>
10
+ = stylesheet_link_tag 'blueprint/screen', :media => 'screen, projection'
11
+ = stylesheet_link_tag 'blueprint/print', :media => 'print'
12
+ /[if IE]
13
+ = stylesheet_link_tag 'blueprint/ie', :media => 'screen, projection'
14
+ <% end -%>
15
+ <% if exist?("public/stylesheets/application.css") -%>
16
+ = stylesheet_link_tag 'application', :media => 'screen, projection'
17
+ <% end -%>
18
+ <% if exist?("public/javascripts/jquery.js") -%>
19
+ = javascript_include_tag 'jquery'
20
+ <% end -%>
21
+ = javascript_include_tag 'application'
22
+ = yield :head
23
+ %body
24
+ .container
25
+ = yield
@@ -0,0 +1,22 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+ Blueprint CSS Framework 0.7.1
4
+ http://blueprintcss.googlecode.com
5
+
6
+ * Copyright (c) 2007-2008. See LICENSE for more info.
7
+ * See README for instructions on how to use Blueprint.
8
+ * For credits and origins, see AUTHORS.
9
+ * This is a compressed file. See the sources in the 'src' directory.
10
+
11
+ ----------------------------------------------------------------------- */
12
+
13
+ /* ie.css */
14
+ body {text-align:center;}
15
+ .container {text-align:left;}
16
+ * html .column {overflow-x:hidden;}
17
+ * html legend {margin:-18px -8px 16px 0;padding:0;}
18
+ ol {margin-left:2em;}
19
+ sup {vertical-align:text-top;}
20
+ sub {vertical-align:text-bottom;}
21
+ html>body p code {*white-space:normal;}
22
+ hr {margin:-8px auto 11px;}
@@ -0,0 +1,29 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+ Blueprint CSS Framework 0.7.1
4
+ http://blueprintcss.googlecode.com
5
+
6
+ * Copyright (c) 2007-2008. See LICENSE for more info.
7
+ * See README for instructions on how to use Blueprint.
8
+ * For credits and origins, see AUTHORS.
9
+ * This is a compressed file. See the sources in the 'src' directory.
10
+
11
+ ----------------------------------------------------------------------- */
12
+
13
+ /* print.css */
14
+ body {line-height:1.5;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;color:#000;background:none;font-size:10pt;}
15
+ .container {background:none;}
16
+ hr {background:#ccc;color:#ccc;width:100%;height:2px;margin:2em 0;padding:0;border:none;}
17
+ hr.space {background:#fff;color:#fff;}
18
+ h1, h2, h3, h4, h5, h6 {font-family:"Helvetica Neue", Arial, "Lucida Grande", sans-serif;}
19
+ code {font:.9em "Courier New", Monaco, Courier, monospace;}
20
+ img {float:left;margin:1.5em 1.5em 1.5em 0;}
21
+ a img {border:none;}
22
+ p img.top {margin-top:0;}
23
+ blockquote {margin:1.5em;padding:1em;font-style:italic;font-size:.9em;}
24
+ .small {font-size:.9em;}
25
+ .large {font-size:1.1em;}
26
+ .quiet {color:#999;}
27
+ .hide {display:none;}
28
+ a:link, a:visited {background:transparent;font-weight:700;text-decoration:underline;}
29
+ a:link:after, a:visited:after {content:" (" attr(href) ") ";font-size:90%;}
@@ -0,0 +1,226 @@
1
+ /* -----------------------------------------------------------------------
2
+
3
+ Blueprint CSS Framework 0.7.1
4
+ http://blueprintcss.googlecode.com
5
+
6
+ * Copyright (c) 2007-2008. See LICENSE for more info.
7
+ * See README for instructions on how to use Blueprint.
8
+ * For credits and origins, see AUTHORS.
9
+ * This is a compressed file. See the sources in the 'src' directory.
10
+
11
+ ----------------------------------------------------------------------- */
12
+
13
+ /* reset.css */
14
+ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
15
+ body {line-height:1.5;}
16
+ table {border-collapse:separate;border-spacing:0;}
17
+ caption, th, td {text-align:left;font-weight:normal;}
18
+ table, td, th {vertical-align:middle;}
19
+ blockquote:before, blockquote:after, q:before, q:after {content:"";}
20
+ blockquote, q {quotes:"" "";}
21
+ a img {border:none;}
22
+
23
+ /* typography.css */
24
+ body {font-size:75%;color:#222;background:#fff;font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;}
25
+ h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
26
+ h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
27
+ h2 {font-size:2em;margin-bottom:0.75em;}
28
+ h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
29
+ h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;height:1.25em;}
30
+ h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
31
+ h6 {font-size:1em;font-weight:bold;}
32
+ h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
33
+ p {margin:0 0 1.5em;}
34
+ p img {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
35
+ p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
36
+ a:focus, a:hover {color:#000;}
37
+ a {color:#009;text-decoration:underline;}
38
+ blockquote {margin:1.5em;color:#666;font-style:italic;}
39
+ strong {font-weight:bold;}
40
+ em, dfn {font-style:italic;}
41
+ dfn {font-weight:bold;}
42
+ sup, sub {line-height:0;}
43
+ abbr, acronym {border-bottom:1px dotted #666;}
44
+ address {margin:0 0 1.5em;font-style:italic;}
45
+ del {color:#666;}
46
+ pre, code {margin:1.5em 0;white-space:pre;}
47
+ pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
48
+ li ul, li ol {margin:0 1.5em;}
49
+ ul, ol {margin:0 1.5em 1.5em 1.5em;}
50
+ ul {list-style-type:disc;}
51
+ ol {list-style-type:decimal;}
52
+ dl {margin:0 0 1.5em 0;}
53
+ dl dt {font-weight:bold;}
54
+ dd {margin-left:1.5em;}
55
+ table {margin-bottom:1.4em;width:100%;}
56
+ th {font-weight:bold;background:#C3D9FF;}
57
+ th, td {padding:4px 10px 4px 5px;}
58
+ tr.even td {background:#E5ECF9;}
59
+ tfoot {font-style:italic;}
60
+ caption {background:#eee;}
61
+ .small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
62
+ .large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
63
+ .hide {display:none;}
64
+ .quiet {color:#666;}
65
+ .loud {color:#000;}
66
+ .highlight {background:#ff0;}
67
+ .added {background:#060;color:#fff;}
68
+ .removed {background:#900;color:#fff;}
69
+ .first {margin-left:0;padding-left:0;}
70
+ .last {margin-right:0;padding-right:0;}
71
+ .top {margin-top:0;padding-top:0;}
72
+ .bottom {margin-bottom:0;padding-bottom:0;}
73
+
74
+ /* grid.css */
75
+ .container {width:950px;margin:0 auto;}
76
+ .showgrid {background:url(src/grid.png);}
77
+ body {margin:1.5em 0;}
78
+ div.span-1, div.span-2, div.span-3, div.span-4, div.span-5, div.span-6, div.span-7, div.span-8, div.span-9, div.span-10, div.span-11, div.span-12, div.span-13, div.span-14, div.span-15, div.span-16, div.span-17, div.span-18, div.span-19, div.span-20, div.span-21, div.span-22, div.span-23, div.span-24 {float:left;margin-right:10px;}
79
+ div.last {margin-right:0;}
80
+ .span-1 {width:30px;}
81
+ .span-2 {width:70px;}
82
+ .span-3 {width:110px;}
83
+ .span-4 {width:150px;}
84
+ .span-5 {width:190px;}
85
+ .span-6 {width:230px;}
86
+ .span-7 {width:270px;}
87
+ .span-8 {width:310px;}
88
+ .span-9 {width:350px;}
89
+ .span-10 {width:390px;}
90
+ .span-11 {width:430px;}
91
+ .span-12 {width:470px;}
92
+ .span-13 {width:510px;}
93
+ .span-14 {width:550px;}
94
+ .span-15 {width:590px;}
95
+ .span-16 {width:630px;}
96
+ .span-17 {width:670px;}
97
+ .span-18 {width:710px;}
98
+ .span-19 {width:750px;}
99
+ .span-20 {width:790px;}
100
+ .span-21 {width:830px;}
101
+ .span-22 {width:870px;}
102
+ .span-23 {width:910px;}
103
+ .span-24, div.span-24 {width:950px;margin:0;}
104
+ .append-1 {padding-right:40px;}
105
+ .append-2 {padding-right:80px;}
106
+ .append-3 {padding-right:120px;}
107
+ .append-4 {padding-right:160px;}
108
+ .append-5 {padding-right:200px;}
109
+ .append-6 {padding-right:240px;}
110
+ .append-7 {padding-right:280px;}
111
+ .append-8 {padding-right:320px;}
112
+ .append-9 {padding-right:360px;}
113
+ .append-10 {padding-right:400px;}
114
+ .append-11 {padding-right:440px;}
115
+ .append-12 {padding-right:480px;}
116
+ .append-13 {padding-right:520px;}
117
+ .append-14 {padding-right:560px;}
118
+ .append-15 {padding-right:600px;}
119
+ .append-16 {padding-right:640px;}
120
+ .append-17 {padding-right:680px;}
121
+ .append-18 {padding-right:720px;}
122
+ .append-19 {padding-right:760px;}
123
+ .append-20 {padding-right:800px;}
124
+ .append-21 {padding-right:840px;}
125
+ .append-22 {padding-right:880px;}
126
+ .append-23 {padding-right:920px;}
127
+ .prepend-1 {padding-left:40px;}
128
+ .prepend-2 {padding-left:80px;}
129
+ .prepend-3 {padding-left:120px;}
130
+ .prepend-4 {padding-left:160px;}
131
+ .prepend-5 {padding-left:200px;}
132
+ .prepend-6 {padding-left:240px;}
133
+ .prepend-7 {padding-left:280px;}
134
+ .prepend-8 {padding-left:320px;}
135
+ .prepend-9 {padding-left:360px;}
136
+ .prepend-10 {padding-left:400px;}
137
+ .prepend-11 {padding-left:440px;}
138
+ .prepend-12 {padding-left:480px;}
139
+ .prepend-13 {padding-left:520px;}
140
+ .prepend-14 {padding-left:560px;}
141
+ .prepend-15 {padding-left:600px;}
142
+ .prepend-16 {padding-left:640px;}
143
+ .prepend-17 {padding-left:680px;}
144
+ .prepend-18 {padding-left:720px;}
145
+ .prepend-19 {padding-left:760px;}
146
+ .prepend-20 {padding-left:800px;}
147
+ .prepend-21 {padding-left:840px;}
148
+ .prepend-22 {padding-left:880px;}
149
+ .prepend-23 {padding-left:920px;}
150
+ div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
151
+ div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
152
+ .pull-1 {margin-left:-40px;}
153
+ .pull-2 {margin-left:-80px;}
154
+ .pull-3 {margin-left:-120px;}
155
+ .pull-4 {margin-left:-160px;}
156
+ .pull-5 {margin-left:-200px;}
157
+ .pull-6 {margin-left:-240px;}
158
+ .pull-7 {margin-left:-280px;}
159
+ .pull-8 {margin-left:-320px;}
160
+ .pull-9 {margin-left:-360px;}
161
+ .pull-10 {margin-left:-400px;}
162
+ .pull-11 {margin-left:-440px;}
163
+ .pull-12 {margin-left:-480px;}
164
+ .pull-13 {margin-left:-520px;}
165
+ .pull-14 {margin-left:-560px;}
166
+ .pull-15 {margin-left:-600px;}
167
+ .pull-16 {margin-left:-640px;}
168
+ .pull-17 {margin-left:-680px;}
169
+ .pull-18 {margin-left:-720px;}
170
+ .pull-19 {margin-left:-760px;}
171
+ .pull-20 {margin-left:-800px;}
172
+ .pull-21 {margin-left:-840px;}
173
+ .pull-22 {margin-left:-880px;}
174
+ .pull-23 {margin-left:-920px;}
175
+ .pull-24 {margin-left:-960px;}
176
+ .pull-1, .pull-2, .pull-3, .pull-4, .pull-5, .pull-6, .pull-7, .pull-8, .pull-9, .pull-10, .pull-11, .pull-12, .pull-13, .pull-14, .pull-15, .pull-16, .pull-17, .pull-18, .pull-19, .pull-20, .pull-21, .pull-22, .pull-23, .pull-24 {float:left;position:relative;}
177
+ .push-1 {margin:0 -40px 1.5em 40px;}
178
+ .push-2 {margin:0 -80px 1.5em 80px;}
179
+ .push-3 {margin:0 -120px 1.5em 120px;}
180
+ .push-4 {margin:0 -160px 1.5em 160px;}
181
+ .push-5 {margin:0 -200px 1.5em 200px;}
182
+ .push-6 {margin:0 -240px 1.5em 240px;}
183
+ .push-7 {margin:0 -280px 1.5em 280px;}
184
+ .push-8 {margin:0 -320px 1.5em 320px;}
185
+ .push-9 {margin:0 -360px 1.5em 360px;}
186
+ .push-10 {margin:0 -400px 1.5em 400px;}
187
+ .push-11 {margin:0 -440px 1.5em 440px;}
188
+ .push-12 {margin:0 -480px 1.5em 480px;}
189
+ .push-13 {margin:0 -520px 1.5em 520px;}
190
+ .push-14 {margin:0 -560px 1.5em 560px;}
191
+ .push-15 {margin:0 -600px 1.5em 600px;}
192
+ .push-16 {margin:0 -640px 1.5em 640px;}
193
+ .push-17 {margin:0 -680px 1.5em 680px;}
194
+ .push-18 {margin:0 -720px 1.5em 720px;}
195
+ .push-19 {margin:0 -760px 1.5em 760px;}
196
+ .push-20 {margin:0 -800px 1.5em 800px;}
197
+ .push-21 {margin:0 -840px 1.5em 840px;}
198
+ .push-22 {margin:0 -880px 1.5em 880px;}
199
+ .push-23 {margin:0 -920px 1.5em 920px;}
200
+ .push-24 {margin:0 -960px 1.5em 960px;}
201
+ .push-1, .push-2, .push-3, .push-4, .push-5, .push-6, .push-7, .push-8, .push-9, .push-10, .push-11, .push-12, .push-13, .push-14, .push-15, .push-16, .push-17, .push-18, .push-19, .push-20, .push-21, .push-22, .push-23, .push-24 {float:right;position:relative;}
202
+ .box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
203
+ hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
204
+ hr.space {background:#fff;color:#fff;}
205
+ .clearfix:after, .container:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
206
+ .clearfix, .container {display:inline-block;}
207
+ * html .clearfix, * html .container {height:1%;}
208
+ .clearfix, .container {display:block;}
209
+ .clear {clear:both;}
210
+
211
+ /* forms.css */
212
+ label {font-weight:bold;}
213
+ fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
214
+ legend {font-weight:bold;font-size:1.2em;}
215
+ input.text, input.title, textarea, select {margin:0.5em 0;border:1px solid #bbb;}
216
+ input.text:focus, input.title:focus, textarea:focus, select:focus {border:1px solid #666;}
217
+ input.text, input.title {width:300px;padding:5px;}
218
+ input.title {font-size:1.5em;}
219
+ textarea {width:390px;height:250px;padding:5px;}
220
+ .error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
221
+ .error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
222
+ .notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
223
+ .success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
224
+ .error a {color:#8a1f11;}
225
+ .notice a {color:#514721;}
226
+ .success a {color:#264409;}
@@ -0,0 +1,3 @@
1
+ unless File.exist?(File.join(Rails.root, 'test', 'test_helper.rb'))
2
+ Rake::Task[:default].clear
3
+ end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+ begin
3
+ load File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/cucumber/bin/cucumber")
4
+ rescue LoadError => e
5
+ raise unless e.to_s =~ /cucumber/
6
+ require "rubygems"
7
+ load File.join(Gem.bindir, "cucumber")
8
+ end
@@ -0,0 +1,15 @@
1
+ begin
2
+ $:.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib')
3
+ require 'cucumber/rake/task'
4
+
5
+ Cucumber::Rake::Task.new(:features) do |t|
6
+ t.cucumber_opts = "--format pretty"
7
+ end
8
+ task :features => 'db:test:prepare'
9
+ rescue MissingSourceFile => e
10
+ task :features do
11
+ raise e
12
+ end
13
+ end
14
+
15
+ task :default => :features
@@ -0,0 +1,11 @@
1
+ /config/database.yml
2
+ /coverage
3
+ /db/*.sqlite3
4
+ /db/schema.rb
5
+ /doc/api
6
+ /doc/app
7
+ /doc/plugins
8
+ /public/system
9
+ .DS_Store
10
+ *~
11
+ .*.sw?