rails_templater 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +7 -0
- data/README.textile +7 -2
- data/TODO.textile +3 -2
- data/lib/rails_templater/version.rb +1 -1
- data/lib/template_framework/recipes/code_coverage.rb +8 -0
- data/lib/template_framework/recipes/cover_me.rb +8 -0
- data/lib/template_framework/recipes/mongoid.rb +1 -1
- data/lib/template_framework/recipes/rcov.rb +1 -0
- data/lib/template_framework/recipes/rspec.rb +3 -1
- data/lib/template_framework/recipes/sass.rb +9 -3
- data/lib/template_framework/recipes/template_engine.rb +2 -2
- data/lib/template_framework/recipes/test_unit.rb +7 -1
- data/lib/template_framework/template_runner.rb +1 -1
- data/lib/template_framework/templates/git/gitignore +2 -1
- metadata +6 -3
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
0.2.0 (February 6, 2011)
|
2
|
+
* Added 960 Grid System option to Compass (via guilleiguaran)
|
3
|
+
* Added shoulda-context option for TestUnit (via guilleiguaran)
|
4
|
+
* Added CoverMe code coverage recipe for Ruby 1.9 (via guilleiguaran)
|
5
|
+
* Added RCov code coverage recipe for Ruby 1.8 (via guilleiguaran)
|
6
|
+
* Mongoid recipe is now using 2.0.0.rc.7
|
7
|
+
|
1
8
|
0.1.2 (February 1, 2011)
|
2
9
|
|
3
10
|
* Added the Slim template engine (via fredwu)
|
data/README.textile
CHANGED
@@ -26,6 +26,7 @@ h3. Testing
|
|
26
26
|
* "RSpec":http://github.com/rspec/rspec
|
27
27
|
** "Remarkable":http://github.com/remarkable/remarkable for ActiveModel RSpec matchers (optional)
|
28
28
|
* TestUnit
|
29
|
+
** "Shoulda-Context":http://github.com/thoughtbot/shoulda-context for contexts in TestUnit (optional)
|
29
30
|
|
30
31
|
h4. Fixture Replacement
|
31
32
|
|
@@ -35,6 +36,10 @@ h4. Integration Testing
|
|
35
36
|
|
36
37
|
* "Cucumber":http://github.com/aslakhellesoy/cucumber-rails (optional)
|
37
38
|
|
39
|
+
h4. Code Coverage
|
40
|
+
|
41
|
+
* "RCov":http://github.com/relevance/rcov (optional, only for Ruby 1.8)
|
42
|
+
|
38
43
|
h3. JavaScript
|
39
44
|
|
40
45
|
* "jQuery":http://jquery.com/
|
@@ -43,8 +48,8 @@ h3. JavaScript
|
|
43
48
|
h3. Template Engine
|
44
49
|
|
45
50
|
* ERB
|
46
|
-
* "Haml":http://haml-lang.com
|
47
|
-
* "Slim":http://github.com/stonean/slim
|
51
|
+
* "Haml":http://haml-lang.com
|
52
|
+
* "Slim":http://github.com/stonean/slim
|
48
53
|
|
49
54
|
h3. Stylesheets
|
50
55
|
|
data/TODO.textile
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
h1. TODO
|
2
2
|
|
3
3
|
* Add more options for Fixture Replacement
|
4
|
-
* Add some RVM support
|
4
|
+
* Add some RVM support
|
5
5
|
* Devise recipe
|
6
6
|
* SimpleForm recipe
|
7
|
-
* Shoulda RSpec matchers for ActiveRecord
|
7
|
+
* Shoulda RSpec matchers for ActiveRecord
|
8
|
+
* Add RCov support to TestUnit via a rake task
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Code Coverage
|
2
|
+
if RUBY_VERSION >= "1.9"
|
3
|
+
apply(templater.recipe('cover_me')) if yes?("\n\nWould you like to add CoverMe for code coverage? [y|n]: ", Thor::Shell::Color::BLUE)
|
4
|
+
else
|
5
|
+
if templater.testing_framework.rspec?
|
6
|
+
apply(templater.recipe('rcov')) if yes?("\n\nWould you like to add RCov for code coverage? [y|n]: ", Thor::Shell::Color::BLUE)
|
7
|
+
end
|
8
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
gem 'cover_me', '>= 1.0.0.rc5', :group => :test
|
2
|
+
|
3
|
+
templater.post_bundler do
|
4
|
+
generate "cover_me:install"
|
5
|
+
|
6
|
+
testing_framework_helper = templater.testing_framework.rspec? ? 'spec/spec_helper.rb' : 'test/test_helper.rb'
|
7
|
+
inject_into_file testing_framework_helper, "\nrequire 'cover_me'", :after => "ENV[\"RAILS_ENV\"] ||= 'test'"
|
8
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
say("\nReplacing ActiveRecord with Mongoid\n", Thor::Shell::Color::YELLOW )
|
2
2
|
|
3
|
-
gem 'mongoid', '2.0.0.rc.
|
3
|
+
gem 'mongoid', '2.0.0.rc.7'
|
4
4
|
gem 'bson_ext', '~> 1.2'
|
5
5
|
|
6
6
|
gsub_file 'config/application.rb', 'require "active_record/railtie"', '# require "active_record/railtie"'
|
@@ -0,0 +1 @@
|
|
1
|
+
gem "rcov", :group => [:development]
|
@@ -19,4 +19,6 @@ templater.post_bundler do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
apply(templater.recipe('remarkable')) if yes?("\n\nWould you like to add Remarkable RSpec matchers? [y|n]: ", Thor::Shell::Color::BLUE)
|
22
|
-
|
22
|
+
|
23
|
+
# Fixture Replacement
|
24
|
+
apply templater.recipe('factory_girl')
|
@@ -8,7 +8,8 @@ if yes?("\n[Stylesheets] Would you like to use Sass for Syntactically Awesome St
|
|
8
8
|
'Option' => 'Design Framework',
|
9
9
|
'1' => 'Compass',
|
10
10
|
'2' => 'Compass with blueprint semantic',
|
11
|
-
'3' => 'Compass with blueprint basic'
|
11
|
+
'3' => 'Compass with blueprint basic',
|
12
|
+
'4' => 'Compass with 960.gs'
|
12
13
|
}
|
13
14
|
|
14
15
|
print_table design_options.to_a, :ident => 4
|
@@ -21,6 +22,8 @@ if yes?("\n[Stylesheets] Would you like to use Sass for Syntactically Awesome St
|
|
21
22
|
:compass_blueprint_semantic
|
22
23
|
when "3"
|
23
24
|
:compass_blueprint
|
25
|
+
when "4"
|
26
|
+
:compass_960
|
24
27
|
else
|
25
28
|
:none
|
26
29
|
end
|
@@ -30,14 +33,17 @@ if yes?("\n[Stylesheets] Would you like to use Sass for Syntactically Awesome St
|
|
30
33
|
|
31
34
|
compass_sass_dir = "app/stylesheets"
|
32
35
|
compass_css_dir = "public/stylesheets/compiled"
|
33
|
-
|
36
|
+
framework_option = case design_framework
|
34
37
|
when :compass_blueprint
|
35
38
|
"--using blueprint/basic"
|
36
39
|
when :compass_blueprint_semantic
|
37
40
|
"--using blueprint/semantic"
|
41
|
+
when :compass_960
|
42
|
+
gem 'compass-960-plugin'
|
43
|
+
"-r ninesixty --using 960"
|
38
44
|
end
|
39
45
|
|
40
|
-
compass_command = "compass init rails . #{
|
46
|
+
compass_command = "bundle exec compass init rails . #{framework_option} --css-dir=#{compass_css_dir} --sass-dir=#{compass_sass_dir} "
|
41
47
|
|
42
48
|
templater.post_bundler do
|
43
49
|
run compass_command
|
@@ -4,14 +4,14 @@ template_engine_options = {
|
|
4
4
|
'Option' => 'Template Engine',
|
5
5
|
'1' => 'Haml',
|
6
6
|
'2' => 'Slim',
|
7
|
-
'3' => '
|
7
|
+
'3' => 'ERB',
|
8
8
|
}
|
9
9
|
|
10
10
|
print_table template_engine_options.to_a, :ident => 4
|
11
11
|
|
12
12
|
template_engine_selection = ask("\nOption: ", Thor::Shell::Color::BLUE)
|
13
13
|
if template_engine_selection.present?
|
14
|
-
templater.template_engine.type = template_engine_options[template_engine_selection].
|
14
|
+
templater.template_engine.type = template_engine_options[template_engine_selection].downcase.to_sym
|
15
15
|
end
|
16
16
|
|
17
17
|
$stdout << "\n\n"
|
@@ -1 +1,7 @@
|
|
1
|
-
gsub_file 'config/application.rb', '# require "rails/test_unit/railtie"', 'require "rails/test_unit/railtie"'
|
1
|
+
gsub_file 'config/application.rb', '# require "rails/test_unit/railtie"', 'require "rails/test_unit/railtie"'
|
2
|
+
|
3
|
+
if yes?("\nWould you like to use Shoulda contexts? [y|n]: ", Thor::Shell::Color::BLUE)
|
4
|
+
gem 'shoulda-context', :group => :test
|
5
|
+
end
|
6
|
+
|
7
|
+
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(File.expand_path('./../../', __FILE__))
|
|
3
3
|
require 'rails_templater'
|
4
4
|
require File.join(File.dirname(__FILE__), 'core_ext.rb')
|
5
5
|
|
6
|
-
%w(default orm testing_framework javascript_framework template_engine sass cucumber).each do |recipe|
|
6
|
+
%w(default orm testing_framework code_coverage javascript_framework template_engine sass cucumber).each do |recipe|
|
7
7
|
apply templater.recipe(recipe)
|
8
8
|
end
|
9
9
|
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
- 1
|
8
7
|
- 2
|
9
|
-
|
8
|
+
- 0
|
9
|
+
version: 0.2.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kevin Faustino
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2011-02-
|
17
|
+
date: 2011-02-06 00:00:00 -05:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -109,6 +109,8 @@ files:
|
|
109
109
|
- lib/template_framework/generators/factory_girl/model/model_generator.rb
|
110
110
|
- lib/template_framework/generators/factory_girl/model/templates/fixtures.rb
|
111
111
|
- lib/template_framework/recipes/active_record.rb
|
112
|
+
- lib/template_framework/recipes/code_coverage.rb
|
113
|
+
- lib/template_framework/recipes/cover_me.rb
|
112
114
|
- lib/template_framework/recipes/cucumber.rb
|
113
115
|
- lib/template_framework/recipes/default.rb
|
114
116
|
- lib/template_framework/recipes/factory_girl.rb
|
@@ -118,6 +120,7 @@ files:
|
|
118
120
|
- lib/template_framework/recipes/jquery.rb
|
119
121
|
- lib/template_framework/recipes/mongoid.rb
|
120
122
|
- lib/template_framework/recipes/orm.rb
|
123
|
+
- lib/template_framework/recipes/rcov.rb
|
121
124
|
- lib/template_framework/recipes/remarkable.rb
|
122
125
|
- lib/template_framework/recipes/rspec.rb
|
123
126
|
- lib/template_framework/recipes/sass.rb
|