sanji 1.0.0.pre.5 → 1.0.0.pre.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.
- checksums.yaml +4 -4
- data/lib/sanji.yml +1 -1
- data/lib/sanji/recipes/frontend.rb +12 -8
- data/lib/sanji/recipes/reform.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be44ca01be2800361c2d212fc914c24206368502
|
4
|
+
data.tar.gz: 38e84d77da15e4824ce7643bdae1a33f58922934
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26e72b46571f80f3a4043a10b439fa09e740a00135031ae1a82e1e1376ebb5b014e4a480c088b1f52db6df1bd1938819c11e080ea0671ca5013754ba4cb2aa1e
|
7
|
+
data.tar.gz: 460ffe97b8a2fa61aafc4e29e9f369df495d448660bb62f283ecdda0e67bb8c1a51219abbb443ba4a5c6152c48dc9da1ba0c9c838088b2f5d442a67a30cebf7b
|
data/lib/sanji.yml
CHANGED
@@ -2,6 +2,7 @@ class Sanji::Recipes::Frontend < Sanji::Recipe
|
|
2
2
|
|
3
3
|
def after_create
|
4
4
|
self.application_css_to_scss
|
5
|
+
self.delete_application_scss_contents
|
5
6
|
|
6
7
|
if self.use_bootstrap?
|
7
8
|
self.setup_bootstrap
|
@@ -18,6 +19,10 @@ class Sanji::Recipes::Frontend < Sanji::Recipe
|
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
22
|
+
def delete_application_scss_contents
|
23
|
+
a.gsub_file 'app/assets/stylesheets/application.scss', /(\S|\s)*/, ''
|
24
|
+
end
|
25
|
+
|
21
26
|
def use_bootstrap?
|
22
27
|
a.yes? 'Use twitter bootstrap css and javascripts?'
|
23
28
|
end
|
@@ -25,11 +30,10 @@ class Sanji::Recipes::Frontend < Sanji::Recipe
|
|
25
30
|
def setup_bootstrap
|
26
31
|
a.add_gem 'bootstrap-sass'
|
27
32
|
|
28
|
-
a.
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
end
|
33
|
+
a.append_to_file 'app/assets/stylesheets/application.scss' do
|
34
|
+
"@import 'bootstrap-sprockets';\n" \
|
35
|
+
"@import 'bootstrap';\n"
|
36
|
+
end
|
33
37
|
|
34
38
|
a.insert_into_file 'app/assets/javascripts/application.js',
|
35
39
|
"//= require bootstrap-sprockets\n",
|
@@ -39,9 +43,9 @@ class Sanji::Recipes::Frontend < Sanji::Recipe
|
|
39
43
|
def setup_normalize
|
40
44
|
a.add_gem 'normalize-rails'
|
41
45
|
|
42
|
-
a.
|
43
|
-
"@import 'normalize-rails';\n"
|
44
|
-
|
46
|
+
a.append_to_file 'app/assets/stylesheets/application.scss' do
|
47
|
+
"@import 'normalize-rails';\n"
|
48
|
+
end
|
45
49
|
end
|
46
50
|
|
47
51
|
end
|
data/lib/sanji/recipes/reform.rb
CHANGED