i0n_rails3_generators 0.2.5 → 0.2.6
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.
- data/config/version.yml +1 -1
- data/lib/generators/i0n/layout/layout_generator.rb +19 -11
- metadata +1 -1
data/config/version.yml
CHANGED
@@ -1,32 +1,40 @@
|
|
1
1
|
module I0n
|
2
2
|
module Generators
|
3
3
|
class LayoutGenerator < Rails::Generators::Base
|
4
|
-
require 'rails/generators'
|
5
|
-
require 'rails/generators/migration'
|
6
|
-
include Rails::Generators::Migration
|
7
4
|
|
8
5
|
source_root File.expand_path('../templates', __FILE__)
|
9
6
|
|
10
|
-
def
|
11
|
-
|
7
|
+
def setup_application
|
8
|
+
application do
|
9
|
+
"
|
10
|
+
config.generators do |g|
|
11
|
+
g.stylesheets false
|
12
|
+
g.template_engine :haml
|
13
|
+
end
|
14
|
+
"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def setup_gemfile
|
19
|
+
gem("i0n_rails_3_generators", :group => ["test", "development"])
|
12
20
|
end
|
13
21
|
|
14
22
|
def create_compass_config
|
15
|
-
copy_file
|
16
|
-
copy_file
|
23
|
+
copy_file "config/initializers/compass.rb", "#{Rails.root}/config/initializers/compass.rb"
|
24
|
+
copy_file "config/compass.rb", "#{Rails.root}/config/compass.rb"
|
17
25
|
end
|
18
26
|
|
19
27
|
def create_sass_extensions
|
20
|
-
copy_file
|
28
|
+
copy_file "lib/sass_extensions.rb", "#{Rails.root}/lib/sass_extensions.rb"
|
21
29
|
end
|
22
30
|
|
23
31
|
def create_sass_directory
|
24
|
-
directory
|
32
|
+
directory "app/sass", "#{Rails.root}/app/sass"
|
25
33
|
end
|
26
34
|
|
27
35
|
def create_layout
|
28
|
-
copy_file
|
29
|
-
copy_file
|
36
|
+
copy_file "app/views/layouts/application.haml", "#{Rails.root}/app/views/layouts/application.haml"
|
37
|
+
copy_file "app/views/shared/_error_messages.haml", "#{Rails.root}/app/views/shared/_error_messages.haml"
|
30
38
|
end
|
31
39
|
|
32
40
|
end
|