Name | Total Lines | Lines of Code | Total Coverage | Code Coverage |
---|---|---|---|---|
lib/fumoffu/generators/fumoffu_config_generator.rb | 49 | 29 | 100.00%
|
100.00%
|
Code reported as executed by Ruby looks like this...and this: this line is also marked as covered.Lines considered as run by rcov, but not reported by Ruby, look like this,and this: these lines were inferred by rcov (using simple heuristics).Finally, here's a line marked as not executed.
1 module Fumoffu |
2 module Generators |
3 class Configuration |
4 # :call-seq: |
5 # generate() |
6 # |
7 # Use this to generate the application configuration skeleton |
8 # |
9 # Fumoffu::Generators::Configuration.generate |
10 # |
11 # Generate default configuration files for the engine component of the application |
12 # which by default contains 2 parts the file used for the initialization of the application |
13 # and also the tasks related the application engine. |
14 # |
15 def self.generate |
16 source_dir = File.dirname(__FILE__) |
17 mkdir_p "#{Fumoffu::Application.app_dir}/engine", :verbose => false |
18 mkdir_p "#{Fumoffu::Application.app_dir}/engine/config", :verbose => false |
19 |
20 self.generate_engine |
21 mkdir_p "#{Fumoffu::Application.app_dir}/engine/config/tasks", :verbose => false |
22 |
23 # We include the default files |
24 cp "#{source_dir}/tasks/package.rake", "#{Fumoffu::Application.app_dir}/engine/config/tasks", :verbose => false |
25 cp "#{source_dir}/tasks/generator.rake", "#{Fumoffu::Application.app_dir}/engine/config/tasks", :verbose => false |
26 cp "#{source_dir}/templates/build_configuration.rb", "#{Fumoffu::Application.app_dir}/", :verbose => false |
27 cp "#{source_dir}/templates/Gemfile", "#{Fumoffu::Application.app_dir}/", :verbose => false |
28 cp "#{source_dir}/templates/Rakefile", "#{Fumoffu::Application.app_dir}/", :verbose => false |
29 end |
30 |
31 |
32 protected |
33 |
34 def self.generate_engine |
35 source_dir = File.dirname(__FILE__)+"/templates" |
36 # We generate the containers |
37 init_dir = "#{Fumoffu::Application.app_dir}/engine/config/initializers" |
38 mkdir_p init_dir, :verbose => false |
39 |
40 # We copy the required files |
41 cp "#{source_dir}/engine/config/initializers/app_classes.rb", init_dir, :verbose => false |
42 cp "#{source_dir}/engine/config/initializers/configuration.rb", init_dir, :verbose => false |
43 cp "#{source_dir}/engine/config/initializers/init.rb", init_dir, :verbose => false |
44 cp "#{source_dir}/engine/config/initializers/java_classes.rb", init_dir, :verbose => false |
45 cp "#{source_dir}/engine/config/initializers/ruby_classes.rb", init_dir, :verbose => false |
46 end |
47 end |
48 end |
49 end |
Generated on Tue Apr 19 07:59:25 +0200 2011 with rcov 0.9.8