terraformation 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +6 -2
- data/bin/terrarails +5 -5
- data/rails_generators/terraformation/templates/application.html.haml.erb +5 -5
- data/rails_generators/terraformation/templates/cucumber.rake +10 -1
- data/rails_generators/terraformation/templates/paths.rb +1 -4
- data/rails_generators/terraformation/templates/spec_helper.rb +5 -3
- data/rails_generators/terraformation/terraformation_generator.rb +2 -2
- metadata +44 -6
- data/rails_generators/terraformation/templates/cucumber +0 -9
data/Rakefile
CHANGED
@@ -4,8 +4,8 @@ require 'fileutils'
|
|
4
4
|
|
5
5
|
spec = Gem::Specification.new do |s|
|
6
6
|
s.name = "terraformation"
|
7
|
-
s.version = "0.1.
|
8
|
-
s.summary = "
|
7
|
+
s.version = "0.1.3"
|
8
|
+
s.summary = "Generators with a Hashrocket twist"
|
9
9
|
s.email = "info@hashrocket.com"
|
10
10
|
s.homepage = "http://github.com/hashrocket/terraformation"
|
11
11
|
s.has_rdoc = false
|
@@ -13,6 +13,10 @@ spec = Gem::Specification.new do |s|
|
|
13
13
|
s.files = %w( LICENSE README.rdoc Rakefile ) + Dir["{bin,rails_generators}/**/*"].sort
|
14
14
|
s.extra_rdoc_files = ["README.rdoc", "LICENSE"]
|
15
15
|
s.executables = ["terrarails"]
|
16
|
+
s.add_dependency("haml", "2.2.14")
|
17
|
+
s.add_dependency("rspec-rails", "1.2.9")
|
18
|
+
s.add_dependency("cucumber", "0.4.4")
|
19
|
+
s.add_dependency("webrat", "0.5.3")
|
16
20
|
end
|
17
21
|
|
18
22
|
Rake::GemPackageTask.new(spec) do |package|
|
data/bin/terrarails
CHANGED
@@ -73,14 +73,14 @@ generate 'terraformation', '--skip', '--full'
|
|
73
73
|
|
74
74
|
gsub_file 'app/helpers/application_helper.rb', /\A# Methods added to this .*\n/, ''
|
75
75
|
gsub_file 'config/environment.rb', /(?:^\s*# config\.gem .*\n)+/, <<-EOS
|
76
|
-
config.gem
|
77
|
-
config.gem
|
78
|
-
config.gem
|
79
|
-
config.gem
|
76
|
+
config.gem 'haml', :version => '2.2.14'
|
77
|
+
config.gem 'rspec-rails', :version => '1.2.9', :lib => false
|
78
|
+
config.gem 'cucumber', :version => '0.4.4', :lib => false
|
79
|
+
config.gem 'webrat', :version => '0.5.3', :lib => false
|
80
80
|
EOS
|
81
81
|
gsub_file 'config/routes.rb', /^(ActionController::Routing::Routes\.draw do \|map\|\n)(?:^\s*\n|^\s*#.*\n)*/, '\\1'
|
82
82
|
|
83
|
-
reformat
|
83
|
+
reformat(*Dir.glob('config/environments/*.rb'))
|
84
84
|
reformat 'config/environment.rb', 'config/routes.rb', 'config/boot.rb', 'config/initializers/session_store.rb', 'script/about'
|
85
85
|
|
86
86
|
if added_cucumber
|
@@ -1,11 +1,11 @@
|
|
1
1
|
!!!
|
2
|
-
%html{html_attrs}
|
2
|
+
%html{html_attrs(I18n.locale)}
|
3
3
|
%head
|
4
|
-
%meta
|
5
|
-
%meta
|
4
|
+
%meta(http-equiv='Content-Type' content='text/html;charset=utf-8')
|
5
|
+
%meta(http-equiv='Content-Script-Type' content='text/javascript')
|
6
6
|
- if protect_against_forgery?
|
7
|
-
%meta
|
8
|
-
%title
|
7
|
+
%meta(name='authenticity_token' content=form_authenticity_token)
|
8
|
+
%title&= @title || "<%= File.basename(destination_path('')).gsub('_', ' ').capitalize %>"
|
9
9
|
<% if exist?("public/stylesheets/blueprint") -%>
|
10
10
|
= stylesheet_link_tag 'blueprint/screen', :media => 'screen, projection'
|
11
11
|
= stylesheet_link_tag 'blueprint/print', :media => 'print'
|
@@ -1,16 +1,25 @@
|
|
1
|
-
|
1
|
+
# Find vendored gem or plugin of cucumber
|
2
|
+
vendored_cucumber_dir = Dir["#{RAILS_ROOT}/vendor/{gems,plugins}/cucumber*"].first
|
3
|
+
$LOAD_PATH.unshift("#{vendored_cucumber_dir}/lib") unless vendored_cucumber_dir.nil?
|
2
4
|
|
3
5
|
unless ARGV.any? {|a| a =~ /^gems/}
|
4
6
|
|
5
7
|
begin
|
6
8
|
require 'cucumber/rake/task'
|
9
|
+
|
10
|
+
# Use vendored cucumber binary if possible. If it's not vendored,
|
11
|
+
# Cucumber::Rake::Task will automatically use installed gem's cucumber binary
|
12
|
+
vendored_cucumber_binary = "#{vendored_cucumber_dir}/bin/cucumber" unless vendored_cucumber_dir.nil?
|
13
|
+
|
7
14
|
namespace :cucumber do
|
8
15
|
Cucumber::Rake::Task.new({:ok => 'db:test:prepare'}, 'Run features that should pass') do |t|
|
16
|
+
t.binary = vendored_cucumber_binary
|
9
17
|
t.fork = true # You may get faster startup if you set this to false
|
10
18
|
t.cucumber_opts = "--tags ~@wip --strict --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
|
11
19
|
end
|
12
20
|
|
13
21
|
Cucumber::Rake::Task.new({:wip => 'db:test:prepare'}, 'Run features that are being worked on') do |t|
|
22
|
+
t.binary = vendored_cucumber_binary
|
14
23
|
t.fork = true # You may get faster startup if you set this to false
|
15
24
|
t.cucumber_opts = "--tags @wip:2 --wip --format #{ENV['CUCUMBER_FORMAT'] || 'pretty'}"
|
16
25
|
end
|
@@ -1,8 +1,10 @@
|
|
1
|
-
ENV["RAILS_ENV"]
|
2
|
-
require File.expand_path(File.dirname(__FILE__)
|
3
|
-
require 'spec'
|
1
|
+
ENV["RAILS_ENV"] ||= 'test'
|
2
|
+
require File.expand_path(File.join(File.dirname(__FILE__),'..','config','environment'))
|
3
|
+
require 'spec/autorun'
|
4
4
|
require 'spec/rails'
|
5
5
|
|
6
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
|
7
|
+
|
6
8
|
Spec::Runner.configure do |config|
|
7
9
|
config.use_transactional_fixtures = true
|
8
10
|
config.use_instantiated_fixtures = false
|
@@ -43,7 +43,6 @@ class TerraformationGenerator < Rails::Generator::Base
|
|
43
43
|
|
44
44
|
m.file 'rspec:script/autospec', 'script/autospec', script_options
|
45
45
|
m.file 'rspec:script/spec', 'script/spec', script_options
|
46
|
-
m.file 'rspec:script/spec_server', 'script/spec_server', script_options
|
47
46
|
|
48
47
|
m.directory 'spec'
|
49
48
|
m.file 'rcov.opts', 'spec/rcov.opts'
|
@@ -52,8 +51,9 @@ class TerraformationGenerator < Rails::Generator::Base
|
|
52
51
|
end
|
53
52
|
|
54
53
|
if option?(:cucumber)
|
54
|
+
require 'cucumber' # for Cucumber::VERSION
|
55
55
|
m.file 'cucumber.rake', 'lib/tasks/cucumber.rake'
|
56
|
-
m.file 'cucumber',
|
56
|
+
m.file 'cucumber:cucumber', 'script/cucumber', script_options
|
57
57
|
m.file 'cucumber_environment.rb', 'config/environments/cucumber.rb'
|
58
58
|
|
59
59
|
m.directory 'features'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraformation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hashrocket
|
@@ -9,10 +9,49 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-28 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: haml
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - "="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 2.2.14
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec-rails
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.2.9
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: cucumber
|
37
|
+
type: :runtime
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 0.4.4
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: webrat
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.5.3
|
54
|
+
version:
|
16
55
|
description:
|
17
56
|
email: info@hashrocket.com
|
18
57
|
executables:
|
@@ -42,7 +81,6 @@ files:
|
|
42
81
|
- rails_generators/terraformation/templates/blueprint/print.css
|
43
82
|
- rails_generators/terraformation/templates/blueprint/screen.css
|
44
83
|
- rails_generators/terraformation/templates/clear_test_default.rake
|
45
|
-
- rails_generators/terraformation/templates/cucumber
|
46
84
|
- rails_generators/terraformation/templates/cucumber.rake
|
47
85
|
- rails_generators/terraformation/templates/cucumber_environment.rb
|
48
86
|
- rails_generators/terraformation/templates/gitignore
|
@@ -106,6 +144,6 @@ rubyforge_project:
|
|
106
144
|
rubygems_version: 1.3.5
|
107
145
|
signing_key:
|
108
146
|
specification_version: 3
|
109
|
-
summary:
|
147
|
+
summary: Generators with a Hashrocket twist
|
110
148
|
test_files: []
|
111
149
|
|