cany 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/cany/recipes/rails.rb +7 -3
- data/lib/cany/version.rb +2 -2
- 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: 798f70bef2ee1f34af927e2f60caf453255de41e
|
4
|
+
data.tar.gz: 1ba69954be13b1ad01b82d809149626c0c21b36c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3962a3cc73b61ab855b92f10a9b92df8e5daa799b988b55ee5ba006eb0de239853d5e043fff0951b7fcd6a208ccb9d9eefd02a7f73bbbac886e1280d24ee151e
|
7
|
+
data.tar.gz: 3e66e8fe935e4dbd709f1b77057edb11ac5bdc93d90c010d12cb5993898cd2cac290f80479a738fc2bfaf3bb9e49fae6dd32763fe0f23e2292ff609bfc4d0f17
|
data/CHANGELOG.md
CHANGED
data/lib/cany/recipes/rails.rb
CHANGED
@@ -5,13 +5,14 @@ module Cany
|
|
5
5
|
hook :env
|
6
6
|
|
7
7
|
class DSL < Recipe::DSL
|
8
|
-
delegate :compile_assets
|
8
|
+
delegate :compile_assets, :assets_env
|
9
9
|
end
|
10
10
|
|
11
|
-
attr_accessor :compile_assets
|
11
|
+
attr_accessor :compile_assets, :assets_env
|
12
12
|
|
13
13
|
def initialize(*args)
|
14
14
|
@compile_assets = true
|
15
|
+
@assets_env = 'production'
|
15
16
|
super
|
16
17
|
end
|
17
18
|
|
@@ -26,8 +27,11 @@ module Cany
|
|
26
27
|
|
27
28
|
def build
|
28
29
|
run_hook :env, :before
|
30
|
+
if compile_assets
|
31
|
+
ENV['RAILS_ENV'] = assets_env
|
32
|
+
ruby_bin 'bundle', 'exec', 'rake', 'assets:precompile'
|
33
|
+
end
|
29
34
|
ENV['RAILS_ENV'] = 'production'
|
30
|
-
ruby_bin 'bundle', 'exec', 'rake', 'assets:precompile' if compile_assets
|
31
35
|
inner.build
|
32
36
|
end
|
33
37
|
|
data/lib/cany/version.rb
CHANGED